From 27b2457a0e4a7adb60cc3dfccb751d7c179cf328 Mon Sep 17 00:00:00 2001 From: BBgod118 Date: Tue, 23 Jul 2024 18:54:14 +0800 Subject: [PATCH 1/3] hi3093: One-click build to adapt to the latest hi-mpu code Due to the hi-mpu code update, the one-click build of the hi3093 image is no longer available. 1. Modify the device number file, add the gpu node. 2. Add the general i2c node and annotate the private i2c node. 3. Add the kernel gpu patch to make the 3093 core display usable. 4. Modify the kernel emmc patch file name. 5. Add the uboot side emmc module patch. Signed-off-by: BBgod118 --- .../recipes-bsp/u-boot/u-boot-emmc_2022.07.bb | 1 + .../linux/files/dtbs/hi3093.dts | 198 +++++++++++++--- .../linux/files/dtbs/hi3093_mcs_2with2.dts | 218 +++++++++++++----- .../linux/files/dtbs/hi3093_mcs_3with1.dts | 218 +++++++++++++----- .../recipes-kernel/linux/linux-hi3093-mpu.inc | 3 +- 5 files changed, 497 insertions(+), 141 deletions(-) diff --git a/bsp/meta-hisilicon/recipes-bsp/u-boot/u-boot-emmc_2022.07.bb b/bsp/meta-hisilicon/recipes-bsp/u-boot/u-boot-emmc_2022.07.bb index 6e68cc45579..83337e7f77f 100644 --- a/bsp/meta-hisilicon/recipes-bsp/u-boot/u-boot-emmc_2022.07.bb +++ b/bsp/meta-hisilicon/recipes-bsp/u-boot/u-boot-emmc_2022.07.bb @@ -14,6 +14,7 @@ SRC_URI = " \ file://mpu_solution/src/real_time/baremetal/common/hi309x_baremetal.h \ file://mpu_solution/build/build_sign \ file://mpu_solution/build/version_5.10 \ + file://mpu_solution/src/patches/uboot/uboot-mtd-spi.patch \ " S = "${WORKDIR}/mpu_solution/open_source/u-boot/u-boot" diff --git a/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093.dts b/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093.dts index a5e2950e2db..3d0d12b9f46 100644 --- a/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093.dts +++ b/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093.dts @@ -290,44 +290,163 @@ <0x0 153 0x4>; }; - i2c@2000d000 { - compatible = "hisilicon,hi1711-i2c"; - reg = <0x0 0x08707000 0x0 0x1000>, - <0x0 0x08708000 0x0 0x1000>, - <0x0 0x08709000 0x0 0x1000>, - <0x0 0x0870a000 0x0 0x1000>, - <0x0 0x0870b000 0x0 0x1000>, - <0x0 0x0870c000 0x0 0x1000>, - <0x0 0x0870d000 0x0 0x1000>, - <0x0 0x0870e000 0x0 0x1000>, - <0x0 0x08750000 0x0 0x1000>, - <0x0 0x08751000 0x0 0x1000>, - <0x0 0x08752000 0x0 0x1000>, - <0x0 0x08753000 0x0 0x1000>, - <0x0 0x08754000 0x0 0x1000>, - <0x0 0x08755000 0x0 0x1000>, - <0x0 0x08756000 0x0 0x1000>, - <0x0 0x08757000 0x0 0x1000>, - <0x0 0x08745000 0x0 0x1000>, - <0x0 0x0876e000 0x0 0x1000>;/*0-15 i2creg ,16 ioconfig-T,17 ioconfig-R*/ - interrupts = <0x0 72 0x4>, - <0x0 73 0x4>, - <0x0 74 0x4>, - <0x0 75 0x4>, - <0x0 76 0x4>, - <0x0 77 0x4>, - <0x0 78 0x4>, - <0x0 79 0x4>, - <0x0 80 0x4>, - <0x0 81 0x4>, - <0x0 82 0x4>, - <0x0 83 0x4>, - <0x0 84 0x4>, - <0x0 85 0x4>, - <0x0 86 0x4>, - <0x0 87 0x4>;/*0-15*/ + i2c_bus0: i2c@8707000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08707000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 72 0x4>; + }; + + i2c_bus1: i2c@8708000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08708000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 73 0x4>; + }; + + i2c_bus2: i2c@8709000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08709000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 74 0x4>; }; + i2c_bus3: i2c@870a000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x0870a000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 75 0x4>; + }; + + i2c_bus4: i2c@870b000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x0870b000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 76 0x4>; + }; + + i2c_bus5: i2c@870c000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x0870c000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 77 0x4>; + }; + + i2c_bus6: i2c@870d000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x0870d000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 78 0x4>; + }; + + i2c_bus7: i2c@870e000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x0870e000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 79 0x4>; + }; + + i2c_bus8: i2c@8750000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08750000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 80 0x4>; + }; + + i2c_bus9: i2c@8751000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08751000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 81 0x4>; + }; + + i2c_bus10: i2c@8752000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08752000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 82 0x4>; + }; + + i2c_bus11: i2c@8753000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08753000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 83 0x4>; + }; + + i2c_bus12: i2c@8754000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08754000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 84 0x4>; + }; + + i2c_bus13: i2c@8755000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08755000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 85 0x4>; + }; + + i2c_bus14: i2c@8756000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08756000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 86 0x4>; + }; + + i2c_bus15: i2c@8757000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08757000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 87 0x4>; + }; + + /* + * The i2c@2000d000 node is used to implement the method in the src/non_real_time/drivers/i2c directory. + * This method does not use the Linux kernel framework. + * If you need to use this driver, delete i2c_bus0 to i2c_bus15 and use the i2c@2000d000 node. + */ + /* + * i2c@2000d000 { + * compatible = "hisilicon,hi1711-i2c"; + * reg = <0x0 0x08707000 0x0 0x1000>, + * <0x0 0x08708000 0x0 0x1000>, + * <0x0 0x08709000 0x0 0x1000>, + * <0x0 0x0870a000 0x0 0x1000>, + * <0x0 0x0870b000 0x0 0x1000>, + * <0x0 0x0870c000 0x0 0x1000>, + * <0x0 0x0870d000 0x0 0x1000>, + * <0x0 0x0870e000 0x0 0x1000>, + * <0x0 0x08750000 0x0 0x1000>, + * <0x0 0x08751000 0x0 0x1000>, + * <0x0 0x08752000 0x0 0x1000>, + * <0x0 0x08753000 0x0 0x1000>, + * <0x0 0x08754000 0x0 0x1000>, + * <0x0 0x08755000 0x0 0x1000>, + * <0x0 0x08756000 0x0 0x1000>, + * <0x0 0x08757000 0x0 0x1000>, + * <0x0 0x08745000 0x0 0x1000>, + * <0x0 0x0876e000 0x0 0x1000>;//0-15 i2creg ,16 ioconfig-T,17 ioconfig-R + * interrupts = <0x0 72 0x4>, + * <0x0 73 0x4>, + * <0x0 74 0x4>, + * <0x0 75 0x4>, + * <0x0 76 0x4>, + * <0x0 77 0x4>, + * <0x0 78 0x4>, + * <0x0 79 0x4>, + * <0x0 80 0x4>, + * <0x0 81 0x4>, + * <0x0 82 0x4>, + * <0x0 83 0x4>, + * <0x0 84 0x4>, + * <0x0 85 0x4>, + * <0x0 86 0x4>, + * <0x0 87 0x4>;//0-15 + * }; + */ + smbus@0x08707000 { compatible = "hisilicon,hi1711-smbus"; reg = <0x0 0x08707000 0x0 0x1000>, @@ -747,6 +866,13 @@ compatible = "hisilicon, hi1711-msg_scm3"; interrupts = <0 225 4>;/*inter core communication from secure M3*/ }; + + gpu@18000000 { + compatible = "hisilicon, hi1711-gpu"; + reg = <0x0 0x18000000 0x0 0x200000>, + <0x0 0x80000000 0x0 0x2000000>; + interrupts = <0x0 47 0x4>; + }; }; }; diff --git a/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_2with2.dts b/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_2with2.dts index 5e293a0e78e..5ef96c6b5cf 100644 --- a/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_2with2.dts +++ b/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_2with2.dts @@ -35,22 +35,11 @@ #size-cells = <0x2>; ranges; - client_os_reserved: client_os_reserved@93000000 { - reg = <0x00 0x93000000 0x00 0x4000000>; - no-map; + mcs@90000000 { + reg = <0x0 0x90000000 0x0 0x5000000>; + compatible = "mcs_mem"; + no-map; }; - - client_os_dma_memory_region: client_os-dma-memory@90000000 { - compatible = "shared-dma-pool"; - reg = <0x00 0x90000000 0x00 0x3000000>; - no-map; - }; - }; - - mcs-remoteproc { - compatible = "oe,mcs_remoteproc"; - memory-region = <&client_os_dma_memory_region>, - <&client_os_reserved>; }; psci { @@ -327,45 +316,163 @@ domain=<0x1 0x1 0x1 0x1 0x0>; }; - i2c@2000d000 { - compatible = "hisilicon,hi1711-i2c"; - reg = <0x0 0x08707000 0x0 0x1000>, - <0x0 0x08708000 0x0 0x1000>, - <0x0 0x08709000 0x0 0x1000>, - <0x0 0x0870a000 0x0 0x1000>, - <0x0 0x0870b000 0x0 0x1000>, - <0x0 0x0870c000 0x0 0x1000>, - <0x0 0x0870d000 0x0 0x1000>, - <0x0 0x0870e000 0x0 0x1000>, - <0x0 0x08750000 0x0 0x1000>, - <0x0 0x08751000 0x0 0x1000>, - <0x0 0x08752000 0x0 0x1000>, - <0x0 0x08753000 0x0 0x1000>, - <0x0 0x08754000 0x0 0x1000>, - <0x0 0x08755000 0x0 0x1000>, - <0x0 0x08756000 0x0 0x1000>, - <0x0 0x08757000 0x0 0x1000>, - <0x0 0x08745000 0x0 0x1000>, - <0x0 0x0876e000 0x0 0x1000>;/*0-15 i2creg ,16 ioconfig-T,17 ioconfig-R*/ - interrupts = <0x0 72 0x4>, - <0x0 73 0x4>, - <0x0 74 0x4>, - <0x0 75 0x4>, - <0x0 76 0x4>, - <0x0 77 0x4>, - <0x0 78 0x4>, - <0x0 79 0x4>, - <0x0 80 0x4>, - <0x0 81 0x4>, - <0x0 82 0x4>, - <0x0 83 0x4>, - <0x0 84 0x4>, - <0x0 85 0x4>, - <0x0 86 0x4>, - <0x0 87 0x4>;/*0-15*/ - domain=<0x0 0x0 0x0 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1>; + i2c_bus0: i2c@8707000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08707000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 72 0x4>; }; + i2c_bus1: i2c@8708000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08708000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 73 0x4>; + }; + + i2c_bus2: i2c@8709000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08709000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 74 0x4>; + }; + + i2c_bus3: i2c@870a000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x0870a000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 75 0x4>; + }; + + i2c_bus4: i2c@870b000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x0870b000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 76 0x4>; + }; + + i2c_bus5: i2c@870c000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x0870c000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 77 0x4>; + }; + + i2c_bus6: i2c@870d000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x0870d000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 78 0x4>; + }; + + i2c_bus7: i2c@870e000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x0870e000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 79 0x4>; + }; + + i2c_bus8: i2c@8750000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08750000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 80 0x4>; + }; + + i2c_bus9: i2c@8751000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08751000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 81 0x4>; + }; + + i2c_bus10: i2c@8752000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08752000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 82 0x4>; + }; + + i2c_bus11: i2c@8753000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08753000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 83 0x4>; + }; + + i2c_bus12: i2c@8754000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08754000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 84 0x4>; + }; + + i2c_bus13: i2c@8755000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08755000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 85 0x4>; + }; + + i2c_bus14: i2c@8756000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08756000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 86 0x4>; + }; + + i2c_bus15: i2c@8757000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08757000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 87 0x4>; + }; + + /* + * The i2c@2000d000 node is used to implement the method in the src/non_real_time/drivers/i2c directory. + * This method does not use the Linux kernel framework. + * If you need to use this driver, delete i2c_bus0 to i2c_bus15 and use the i2c@2000d000 node. + */ + /* + * i2c@2000d000 { + * compatible = "hisilicon,hi1711-i2c"; + * reg = <0x0 0x08707000 0x0 0x1000>, + * <0x0 0x08708000 0x0 0x1000>, + * <0x0 0x08709000 0x0 0x1000>, + * <0x0 0x0870a000 0x0 0x1000>, + * <0x0 0x0870b000 0x0 0x1000>, + * <0x0 0x0870c000 0x0 0x1000>, + * <0x0 0x0870d000 0x0 0x1000>, + * <0x0 0x0870e000 0x0 0x1000>, + * <0x0 0x08750000 0x0 0x1000>, + * <0x0 0x08751000 0x0 0x1000>, + * <0x0 0x08752000 0x0 0x1000>, + * <0x0 0x08753000 0x0 0x1000>, + * <0x0 0x08754000 0x0 0x1000>, + * <0x0 0x08755000 0x0 0x1000>, + * <0x0 0x08756000 0x0 0x1000>, + * <0x0 0x08757000 0x0 0x1000>, + * <0x0 0x08745000 0x0 0x1000>, + * <0x0 0x0876e000 0x0 0x1000>;//0-15 i2creg ,16 ioconfig-T,17 ioconfig-R + * interrupts = <0x0 72 0x4>, + * <0x0 73 0x4>, + * <0x0 74 0x4>, + * <0x0 75 0x4>, + * <0x0 76 0x4>, + * <0x0 77 0x4>, + * <0x0 78 0x4>, + * <0x0 79 0x4>, + * <0x0 80 0x4>, + * <0x0 81 0x4>, + * <0x0 82 0x4>, + * <0x0 83 0x4>, + * <0x0 84 0x4>, + * <0x0 85 0x4>, + * <0x0 86 0x4>, + * <0x0 87 0x4>;//0-15 + * }; + */ + smbus@0x08707000 { compatible = "hisilicon,hi1711-smbus"; reg = <0x0 0x08707000 0x0 0x1000>, @@ -791,6 +898,13 @@ compatible = "hisilicon, hi1711-msg_scm3"; interrupts = <0 225 4>;/*inter core communication from secure M3*/ }; + + gpu@18000000 { + compatible = "hisilicon, hi1711-gpu"; + reg = <0x0 0x18000000 0x0 0x200000>, + <0x0 0x80000000 0x0 0x2000000>; + interrupts = <0x0 47 0x4>; + }; }; }; diff --git a/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_3with1.dts b/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_3with1.dts index 05f384f15b8..97e8ad01cc5 100644 --- a/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_3with1.dts +++ b/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_3with1.dts @@ -35,22 +35,11 @@ #size-cells = <0x2>; ranges; - client_os_reserved: client_os_reserved@93000000 { - reg = <0x00 0x93000000 0x00 0x4000000>; - no-map; + mcs@90000000 { + reg = <0x0 0x90000000 0x0 0x5000000>; + compatible = "mcs_mem"; + no-map; }; - - client_os_dma_memory_region: client_os-dma-memory@90000000 { - compatible = "shared-dma-pool"; - reg = <0x00 0x90000000 0x00 0x3000000>; - no-map; - }; - }; - - mcs-remoteproc { - compatible = "oe,mcs_remoteproc"; - memory-region = <&client_os_dma_memory_region>, - <&client_os_reserved>; }; psci { @@ -327,45 +316,163 @@ domain=<0x1 0x1 0x1 0x1 0x0>; }; - i2c@2000d000 { - compatible = "hisilicon,hi1711-i2c"; - reg = <0x0 0x08707000 0x0 0x1000>, - <0x0 0x08708000 0x0 0x1000>, - <0x0 0x08709000 0x0 0x1000>, - <0x0 0x0870a000 0x0 0x1000>, - <0x0 0x0870b000 0x0 0x1000>, - <0x0 0x0870c000 0x0 0x1000>, - <0x0 0x0870d000 0x0 0x1000>, - <0x0 0x0870e000 0x0 0x1000>, - <0x0 0x08750000 0x0 0x1000>, - <0x0 0x08751000 0x0 0x1000>, - <0x0 0x08752000 0x0 0x1000>, - <0x0 0x08753000 0x0 0x1000>, - <0x0 0x08754000 0x0 0x1000>, - <0x0 0x08755000 0x0 0x1000>, - <0x0 0x08756000 0x0 0x1000>, - <0x0 0x08757000 0x0 0x1000>, - <0x0 0x08745000 0x0 0x1000>, - <0x0 0x0876e000 0x0 0x1000>;/*0-15 i2creg ,16 ioconfig-T,17 ioconfig-R*/ - interrupts = <0x0 72 0x4>, - <0x0 73 0x4>, - <0x0 74 0x4>, - <0x0 75 0x4>, - <0x0 76 0x4>, - <0x0 77 0x4>, - <0x0 78 0x4>, - <0x0 79 0x4>, - <0x0 80 0x4>, - <0x0 81 0x4>, - <0x0 82 0x4>, - <0x0 83 0x4>, - <0x0 84 0x4>, - <0x0 85 0x4>, - <0x0 86 0x4>, - <0x0 87 0x4>;/*0-15*/ - domain=<0x0 0x0 0x0 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1>; + i2c_bus0: i2c@8707000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08707000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 72 0x4>; }; + i2c_bus1: i2c@8708000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08708000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 73 0x4>; + }; + + i2c_bus2: i2c@8709000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08709000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 74 0x4>; + }; + + i2c_bus3: i2c@870a000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x0870a000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 75 0x4>; + }; + + i2c_bus4: i2c@870b000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x0870b000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 76 0x4>; + }; + + i2c_bus5: i2c@870c000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x0870c000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 77 0x4>; + }; + + i2c_bus6: i2c@870d000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x0870d000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 78 0x4>; + }; + + i2c_bus7: i2c@870e000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x0870e000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 79 0x4>; + }; + + i2c_bus8: i2c@8750000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08750000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 80 0x4>; + }; + + i2c_bus9: i2c@8751000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08751000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 81 0x4>; + }; + + i2c_bus10: i2c@8752000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08752000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 82 0x4>; + }; + + i2c_bus11: i2c@8753000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08753000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 83 0x4>; + }; + + i2c_bus12: i2c@8754000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08754000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 84 0x4>; + }; + + i2c_bus13: i2c@8755000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08755000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 85 0x4>; + }; + + i2c_bus14: i2c@8756000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08756000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 86 0x4>; + }; + + i2c_bus15: i2c@8757000 { + compatible = "hisilicon,hi309x-i2c"; + reg = <0x0 0x08757000 0x0 0x1000>; + clock-frequency = <100000>; + interrupts = <0x0 87 0x4>; + }; + + /* + * The i2c@2000d000 node is used to implement the method in the src/non_real_time/drivers/i2c directory. + * This method does not use the Linux kernel framework. + * If you need to use this driver, delete i2c_bus0 to i2c_bus15 and use the i2c@2000d000 node. + */ + /* + * i2c@2000d000 { + * compatible = "hisilicon,hi1711-i2c"; + * reg = <0x0 0x08707000 0x0 0x1000>, + * <0x0 0x08708000 0x0 0x1000>, + * <0x0 0x08709000 0x0 0x1000>, + * <0x0 0x0870a000 0x0 0x1000>, + * <0x0 0x0870b000 0x0 0x1000>, + * <0x0 0x0870c000 0x0 0x1000>, + * <0x0 0x0870d000 0x0 0x1000>, + * <0x0 0x0870e000 0x0 0x1000>, + * <0x0 0x08750000 0x0 0x1000>, + * <0x0 0x08751000 0x0 0x1000>, + * <0x0 0x08752000 0x0 0x1000>, + * <0x0 0x08753000 0x0 0x1000>, + * <0x0 0x08754000 0x0 0x1000>, + * <0x0 0x08755000 0x0 0x1000>, + * <0x0 0x08756000 0x0 0x1000>, + * <0x0 0x08757000 0x0 0x1000>, + * <0x0 0x08745000 0x0 0x1000>, + * <0x0 0x0876e000 0x0 0x1000>;//0-15 i2creg ,16 ioconfig-T,17 ioconfig-R + * interrupts = <0x0 72 0x4>, + * <0x0 73 0x4>, + * <0x0 74 0x4>, + * <0x0 75 0x4>, + * <0x0 76 0x4>, + * <0x0 77 0x4>, + * <0x0 78 0x4>, + * <0x0 79 0x4>, + * <0x0 80 0x4>, + * <0x0 81 0x4>, + * <0x0 82 0x4>, + * <0x0 83 0x4>, + * <0x0 84 0x4>, + * <0x0 85 0x4>, + * <0x0 86 0x4>, + * <0x0 87 0x4>;//0-15 + * }; + */ + smbus@0x08707000 { compatible = "hisilicon,hi1711-smbus"; reg = <0x0 0x08707000 0x0 0x1000>, @@ -791,6 +898,13 @@ compatible = "hisilicon, hi1711-msg_scm3"; interrupts = <0 225 4>;/*inter core communication from secure M3*/ }; + + gpu@18000000 { + compatible = "hisilicon, hi1711-gpu"; + reg = <0x0 0x18000000 0x0 0x200000>, + <0x0 0x80000000 0x0 0x2000000>; + interrupts = <0x0 47 0x4>; + }; }; }; diff --git a/bsp/meta-hisilicon/recipes-kernel/linux/linux-hi3093-mpu.inc b/bsp/meta-hisilicon/recipes-kernel/linux/linux-hi3093-mpu.inc index 5ce52464d7b..2ac4b923e92 100644 --- a/bsp/meta-hisilicon/recipes-kernel/linux/linux-hi3093-mpu.inc +++ b/bsp/meta-hisilicon/recipes-kernel/linux/linux-hi3093-mpu.inc @@ -52,7 +52,8 @@ do_copy_headers() { # Due to the large number of patch hunks, # yocto's built-in patch mechanism has abnormal failure issues. # Here is a solution to avoid this issue - grep "Missing single sector read for large sector size" ${S}/drivers/mmc/core/block.c || patch -p1 < ${WORKDIR}/mpu_solution/src/patches/openEuler/kernel-22.03-lts-sp1-mmc.patch + grep "int disable_multi," ${S}/drivers/mmc/core/block.c || patch -p1 < ${WORKDIR}/mpu_solution/src/patches/openEuler/kernel-22.03-lts-sp3-mmc.patch + grep "#include " ${S}/hibmc/hibmc_drm_drv.c || patch -p1 < ${WORKDIR}/mpu_solution/src/patches/openEuler/kernel-gpu-drm-hisilicon-hibmc.patch cd - cp -rf ${WORKDIR}/mpu_solution/platform/securec/include/* ${S}/include/linux mkdir -p ${S}/include/linux/kbox -- Gitee From 3bbf9cce42ea7b6f839715ccab58918eb034b5a9 Mon Sep 17 00:00:00 2001 From: BBgod118 Date: Tue, 23 Jul 2024 19:40:51 +0800 Subject: [PATCH 2/3] hi3093: Restore the mcs node in the device tree file 1. Restore the mcs node in the device tree file to adapt to the latest mica tool. Signed-off-by: BBgod118 --- .../linux/files/dtbs/hi3093_mcs_2with2.dts | 19 +++++++++++++++---- .../linux/files/dtbs/hi3093_mcs_3with1.dts | 19 +++++++++++++++---- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_2with2.dts b/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_2with2.dts index 5ef96c6b5cf..473d0e25957 100644 --- a/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_2with2.dts +++ b/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_2with2.dts @@ -35,11 +35,22 @@ #size-cells = <0x2>; ranges; - mcs@90000000 { - reg = <0x0 0x90000000 0x0 0x5000000>; - compatible = "mcs_mem"; - no-map; + client_os_reserved: client_os_reserved@93000000 { + reg = <0x00 0x93000000 0x00 0x4000000>; + no-map; }; + + client_os_dma_memory_region: client_os-dma-memory@90000000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x90000000 0x00 0x3000000>; + no-map; + }; + }; + + mcs-remoteproc { + compatible = "oe,mcs_remoteproc"; + memory-region = <&client_os_dma_memory_region>, + <&client_os_reserved>; }; psci { diff --git a/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_3with1.dts b/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_3with1.dts index 97e8ad01cc5..77f97ca545a 100644 --- a/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_3with1.dts +++ b/bsp/meta-hisilicon/recipes-kernel/linux/files/dtbs/hi3093_mcs_3with1.dts @@ -35,11 +35,22 @@ #size-cells = <0x2>; ranges; - mcs@90000000 { - reg = <0x0 0x90000000 0x0 0x5000000>; - compatible = "mcs_mem"; - no-map; + client_os_reserved: client_os_reserved@93000000 { + reg = <0x00 0x93000000 0x00 0x4000000>; + no-map; }; + + client_os_dma_memory_region: client_os-dma-memory@90000000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x90000000 0x00 0x3000000>; + no-map; + }; + }; + + mcs-remoteproc { + compatible = "oe,mcs_remoteproc"; + memory-region = <&client_os_dma_memory_region>, + <&client_os_reserved>; }; psci { -- Gitee From 3769c2d2487598bfe47f011b55d0a417c1ceef1d Mon Sep 17 00:00:00 2001 From: BBgod118 Date: Wed, 24 Jul 2024 14:45:04 +0800 Subject: [PATCH 3/3] hi3093: Default network port configuration at startup * Write "sh /hi3093_init.sh" to etc/init.d/rc.sysinit: - so that the hi3093_init.sh script is executed by default when the device starts. - The script initializes the eth2 network port, and the default IP is 192.168.0.11. Signed-off-by: BBgod118 --- bsp/meta-hisilicon/recipes-core/images/pack-hi3093.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/bsp/meta-hisilicon/recipes-core/images/pack-hi3093.inc b/bsp/meta-hisilicon/recipes-core/images/pack-hi3093.inc index b3291cb8e35..cb1e28e682f 100644 --- a/bsp/meta-hisilicon/recipes-core/images/pack-hi3093.inc +++ b/bsp/meta-hisilicon/recipes-core/images/pack-hi3093.inc @@ -10,6 +10,7 @@ make_boot_intrd() { cp -f ./tools-tmp/link_emmc_devs ./ rm -rf ./tools-tmp fi + sed -i '$a\sh /hi3093_init.sh' ./etc/init.d/rc.sysinit cp -fp ./boot/zImage ${OUTPUT_DIR}/ || true rm -f ./boot/Image* || true rm -f ./boot/zImage* || true -- Gitee