diff --git a/Documentation/imx_boot_image_build.md b/Documentation/imx_boot_image_build.md index 8bda273..5fa6310 100644 --- a/Documentation/imx_boot_image_build.md +++ b/Documentation/imx_boot_image_build.md @@ -2,129 +2,125 @@ Supported machines: -* `mcm-imxi8-mini` -* `ucm-imxi8-mini` -* `iot-gate-imx8` +* `IOT-GATE-iMX8` Define a `MACHINE` environment variable for the target product: |Machine|Command Line| |---|---| -|mcm-imx8m-mini|export MACHINE=mcm-imx8m-mini -|ucm-imx8m-mini|export MACHINE=ucm-imx8m-mini -|iot-gate-imx8|export MACHINE=iot-gate-imx8 +|ucm-imx8m-mini|export MACHINE=iot-gate-imx8 Define the following environment variables: |Description|Command Line| |---|---| -|NXP u-boot release|export NXP_UBOOT_RELEASE=lf-5.10.35-2.0.0| -|NXP ATF release|export NXP_ATF_RELEASE=lf-5.10.35-2.0.0| -|NXP mkimage release|export NXP_MKIMAGE_RELEASE=lf-5.10.35-2.0.0| -|NXP firmware name|export NXP_FIRMWARE=firmware-imx-8.12.bin| -|CompuLab branch name|export CPL_BRANCH=rel_imx_5.10.35_2.0.0-stable| - +|NXP firmware name|export NXP_FIRMWARE=firmware-imx-8.14.bin| +|CompuLab release|export CPL_RELEASE=${MACHINE}_r3.1| +|CompuLab branch name|export CPL_BRANCH=lf-5.10.72-2.2.0_${MACHINE}| +|ATF revision|export ATF=lf-5.10.72-2.2.0| +|OPTEE revision|export OPTEE=lf-5.10.72-2.2.0| +|U-Boot revision|export UBOOT=lf-5.10.72-2.2.0| ## Prerequisites It is up to developer to setup arm64 build environment: -* Download and install the [GNU tool chain](https://github.com/compulab-yokneam/meta-bsp-imx8mm/blob/rel_imx_5.10.35_2.0.0-experiment/Documentation/toolchain.md) - +* Download the [ARM tool chain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/9-2-2019-12) +* Set environment variables: +
+export ARCH=arm64 +export CROSS_COMPILE=/opt/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- +* Create a folder to organize the files:
-mkdir imx8mm
-cd imx8mm
-export SRC_ROOT=$(pwd)
+mkdir -p imx8mm/{sources,results}
+export SRC_ROOT=$(readlink -f imx8mm/sources)
+export RESULTS=$(readlink -f imx8mm/results)
+cd ${SRC_ROOT}
* Download CompuLab BSP
-git clone -b ${CPL_BRANCH} https://github.com/compulab-yokneam/meta-bsp-imx8mm.git
+git clone -b ${CPL_RELEASE} https://github.com/compulab-yokneam/meta-bsp-imx8mm.git
export LAYER_DIR=$(pwd)/meta-bsp-imx8mm
-## Mkimage setup
-* Download the mkimage:
-
-git clone https://source.codeaurora.org/external/imx/imx-mkimage.git
-git -C imx-mkimage checkout ${NXP_MKIMAGE_RELEASE}
-
-
-## Arm Trusted Firmware (ATF) setup
-* Download the ATF:
-
-git clone https://source.codeaurora.org/external/imx/imx-atf.git
-git -C imx-atf checkout ${NXP_ATF_RELEASE}
-git -C imx-atf am ${LAYER_DIR}/recipes-bsp/imx-atf/compulab/imx8mm/*.patch
-
-* Make bl31.bin
-
-make -C imx-atf PLAT=imx8mm bl31
-cp -v imx-atf/build/imx8mm/release/bl31.bin ${SRC_ROOT}/imx-mkimage/iMX8M/
-
-
-## Firmware iMX setup
+## Build Procedure
+### Firmware iMX setup
* Download the firmware-imx file:
wget http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/${NXP_FIRMWARE}
bash -x ${NXP_FIRMWARE} --auto-accept
-cp -v $(find firmware* | awk '/train|hdmi_imx8|dp_imx8/' ORS=" ") ${SRC_ROOT}/imx-mkimage/iMX8M/
+cp -v $(find firmware* | awk '/train|hdmi_imx8|dp_imx8/' ORS=" ") ${RESULTS}
-## U-Boot
-* Download the U-Boot source and apply CompuLab BSP patches:
+### Arm Trusted Firmware (ATF) setup
+* Download the ATF:
-git clone https://source.codeaurora.org/external/imx/uboot-imx.git
-git -C uboot-imx checkout ${NXP_UBOOT_RELEASE}
-git -C uboot-imx am ${LAYER_DIR}/recipes-bsp/u-boot/compulab/imx8mm/*.patch
+git clone https://source.codeaurora.org/external/imx/imx-atf.git
+git -C imx-atf checkout ${ATF} -b ${CPL_BRANCH}
-
-* Compile U-Boot:
+* Apply patches if applicable:
-make -C uboot-imx -f defconfig.mk
-make -C uboot-imx
+[[ -d ${LAYER_DIR}/recipes-bsp/imx-atf/compulab/imx8mm ]] && { \
+git -C imx-atf am ${LAYER_DIR}/recipes-bsp/imx-atf/compulab/imx8mm/*.patch
+}
+* Make bl31.bin
-* Copy files to the mkimage directory:
+|Mode |Command
+|---|---|
+|optee build|make -j 16 -C imx-atf PLAT=imx8mm BUILD_BASE=build PLAT=imx8mm IMX_BOOT_UART_BASE=0x30880000 BL32_BASE=0x56000000 BL32_SIZE=0x2000000 SPD=opteed bl31
+|non-optee build|make -j 16 -C imx-atf PLAT=imx8mm BUILD_BASE=build PLAT=imx8mm IMX_BOOT_UART_BASE=0x30880000 BL32_BASE=0x56000000 BL32_SIZE=0x2000000 bl31
+
+* Ceate a symlink in the ${RESULTS} folder:
-cp -v $(find uboot-imx | awk -v v=${MACHINE} '(/u-boot-spl.bin$|u-boot.bin$|u-boot-nodtb.bin$|tools\/mkimage$/)||($0~v".dtb$")' ORS=" ") ${SRC_ROOT}/imx-mkimage/iMX8M/
+ln -s $(readlink -f imx-atf/build/imx8mm/release/bl31.bin) ${RESULTS}/
-
-## Compiling the **flash.bin** imx-boot image:
-* Unset these variables:
+### U-Boot
+* Download the U-Boot source and apply CompuLab BSP patches:
-unset ARCH CROSS_COMPILE
+git clone https://source.codeaurora.org/external/imx/uboot-imx.git
+git -C uboot-imx checkout ${UBOOT} -b ${CPL_BRANCH}
+git -C uboot-imx am ${LAYER_DIR}/recipes-bsp/u-boot/compulab/imx8mm/*.patch
-* Issue:
+* Restore `ARCH` environment variables:
-cd ${SRC_ROOT}/imx-mkimage/iMX8M
-sed "s/\(^dtbs = \).*/\1${MACHINE}.dtb/;s/\(mkimage\)_uboot/\1/" soc.mak > Makefile
-make clean
-make flash_evk SOC=iMX8MM
+export ARCH=arm64
+
+* Compile U-Boot flash.bin:
+
+make -j 16 -C uboot-imx O=${RESULTS} -f defconfig.mk
+make -j 16 -C uboot-imx O=${RESULTS}
## Flashing
-`dd if=flash.bin of=/dev/
+dd if=${RESULTS}/flash.bin of=/dev/ bs=1K seek=33 status=progress
+
diff --git a/Documentation/imx_boot_image_hab_build.md b/Documentation/imx_boot_image_hab_build.md
new file mode 100644
index 0000000..cdf5ede
--- /dev/null
+++ b/Documentation/imx_boot_image_hab_build.md
@@ -0,0 +1,156 @@
+# Building Boot Firmware for CompuLab's i.MX8M Mini products with Mkimage
+
+Supported machines:
+
+* `IOT-GATE-iMX8`
+
+Define a `MACHINE` environment variable for the target product:
+
+|Machine|Command Line|
+|---|---|
+|ucm-imx8m-mini|export MACHINE=iot-gate-imx8
+
+Define the following environment variables:
+
+|Description|Command Line|
+|---|---|
+|NXP firmware name|export NXP_FIRMWARE=firmware-imx-8.14.bin|
+|CompuLab release|export CPL_RELEASE=${MACHINE}_r3.0|
+|CompuLab branch name|export CPL_BRANCH=lf-5.10.72-2.2.0_${MACHINE}|
+|Mkimage revision|export MKIMG=lf-5.10.72-2.2.0|
+|ATF revision|export ATF=lf-5.10.72-2.2.0|
+|OPTEE revision|export OPTEE=lf-5.10.72-2.2.0|
+|U-Boot revision|export UBOOT=lf-5.10.72-2.2.0|
+
+## Prerequisites
+It is up to developer to setup arm64 build environment:
+* Download the [ARM tool chain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads/9-2-2019-12)
+* Set environment variables:
++export ARCH=arm64 +export CROSS_COMPILE=/opt/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- ++* Create a folder to organize the files: +
+mkdir -p imx8mm
+export SRC_ROOT=$(readlink -f imx8mm)
+cd ${SRC_ROOT}
+
+
+* Download CompuLab BSP
+
+git clone -b ${CPL_RELEASE} https://github.com/compulab-yokneam/meta-bsp-imx8mm.git
+export LAYER_DIR=$(pwd)/meta-bsp-imx8mm
+
+
+## Build Procedure
+### Mkimage setup
+* Download the mkimage:
+
+git clone https://source.codeaurora.org/external/imx/imx-mkimage.git
+git -C imx-mkimage checkout ${MKIMG}
+export RESULTS=${SRC_ROOT}/imx-mkimage/iMX8M
+
+
+### Firmware iMX setup
+* Download the firmware-imx file:
+
+wget http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/${NXP_FIRMWARE}
+bash -x ${NXP_FIRMWARE} --auto-accept
+cp -v $(find firmware* | awk '/train|hdmi_imx8|dp_imx8/' ORS=" ") ${RESULTS}
+
+
+### Arm Trusted Firmware (ATF) setup
+* Download the ATF:
+
+git clone https://source.codeaurora.org/external/imx/imx-atf.git
+git -C imx-atf checkout ${ATF} -b ${CPL_BRANCH}
+
+* Apply patches if applicable:
+
+[[ -d ${LAYER_DIR}/recipes-bsp/imx-atf/compulab/imx8mm ]] && { \
+git -C imx-atf am ${LAYER_DIR}/recipes-bsp/imx-atf/compulab/imx8mm/*.patch
+}
+
+* Make bl31.bin
+
+|Mode |Command
+|---|---|
+|optee build|make -j 16 -C imx-atf PLAT=imx8mm BUILD_BASE=build PLAT=imx8mm IMX_BOOT_UART_BASE=0x30880000 BL32_BASE=0x56000000 BL32_SIZE=0x2000000 SPD=opteed bl31
+|non-optee build|make -j 16 -C imx-atf PLAT=imx8mm BUILD_BASE=build PLAT=imx8mm IMX_BOOT_UART_BASE=0x30880000 BL32_BASE=0x56000000 BL32_SIZE=0x2000000 bl31
+
+* Ceate a symlink in the ${RESULTS} folder:
+
+ln -s $(readlink -f imx-atf/build/imx8mm/release/bl31.bin) ${RESULTS}/
+
+
+### OP-TEE Setup
+
+| Skip this for a non-optee build |
+| --- |
+
+* Download the OP-TEE:
+
+git clone https://source.codeaurora.org/external/imx/imx-optee-os
+git -C imx-optee-os checkout ${OPTEE} -b ${CPL_BRANCH}
+
+* Apply patches if applicable:
+
+[[ -d ${LAYER_DIR}/recipes-security/optee-imx/compulab/imx8mm ]] && { \
+git -C imx-optee-os am ${LAYER_DIR}/recipes-security/optee-imx/compulab/imx8mm/*.patch
+}
+
+* Set environment variables:
+
+export ARCH=arm
+export CROSS_COMPILE64=${CROSS_COMPILE}
+
+* Make tee.bin
+
+make -j 16 -C imx-optee-os PLATFORM=imx PLATFORM_FLAVOR=mx8mm_cl_iot_gate
+ln -s $(readlink -f imx-optee-os/out/arm-plat-imx/core/tee-raw.bin) ${RESULTS}/tee.bin
+
+
+### U-Boot
+* Download the U-Boot source and apply CompuLab BSP patches:
+
+git clone https://source.codeaurora.org/external/imx/uboot-imx.git
+git -C uboot-imx checkout ${UBOOT} -b ${CPL_BRANCH}
+git -C uboot-imx am ${LAYER_DIR}/recipes-bsp/u-boot/compulab/imx8mm/*.patch
+
+* Restore `ARCH` environment variables:
++export ARCH=arm64 ++* Compile U-Boot flash.bin: +
+make -j 16 -C uboot-imx -f defconfig.mk +make -j 16 -C uboot-imx ++* Copy files to the results directory +
+cp -v $(find uboot-imx | awk -v v=${MACHINE} '(/u-boot-spl.bin$|u-boot.bin$|u-boot-nodtb.bin$|tools\/mkimage$/)||($0~v".dtb$")' ORS=" ") ${RESULTS}
+
+### Compiling the flash.bin imx-boot image
+* Unset these variables:
++unset ARCH CROSS_COMPILE ++Issue: +
+cd ${RESULTS}
+sed "s/\(^dtbs \).*/\1= ${MACHINE}.dtb/;s/\(mkimage\)_uboot/\1/;s/\(^TEE_LOAD_ADDR \).*/\1= 0x56000000/g" soc.mak > Makefile
+make clean
+make flash_evk SOC=iMX8MM
+
+Issue the following commands to generate log files for the HAB signing operation:
++make SOC=iMX8MM flash_evk 2>&1 | tee flash_evk.log +make SOC=iMX8MM print_fit_hab 2>&1 | tee print_fit_hab.log ++## Flashing +
+echo 0 > /sys/class/block/mmcblk2boot0/force_ro +dd if=flash.bin of=/dev/mmcblk2boot0 bs=1K seek=33 status=progress +echo 1 > /sys/class/block/mmcblk2boot0/force_ro +diff --git a/Documentation/linux_kernel_build.md b/Documentation/linux_kernel_build.md index d5dd89c..7ad4fa3 100644 --- a/Documentation/linux_kernel_build.md +++ b/Documentation/linux_kernel_build.md @@ -2,26 +2,24 @@ Supported machines: -* `mcm-imx8m-mini` -* `ucm-imx8m-mini` +* `iot-gate-imx8` Define a `MACHINE` environment variable for the target product: |Machine|Command Line| |---|---| -|mcm-imx8m-mini|export MACHINE=mcm-imx8m-mini -|ucm-imx8m-mini|export MACHINE=ucm-imx8m-mini +|iot-gate-imx8|export MACHINE=iot-gate-imx8 Define the following environment variables: |Description|Command Line| |---|---| -|NXP release name|export NXP_RELEASE=lf-5.10.35-2.0.0| -|CompuLab branch name|export CPL_BRANCH=rel_imx_5.10.35_2.0.0-stable| +|NXP release name|export NXP_RELEASE=lf-5.10.y| +|CompuLab branch name|export CPL_BRANCH=iot-gate-imx8_r3.0| ## Prerequisites It is up to developer to setup arm64 build environment: -* Download the [GNU tool chain](https://github.com/compulab-yokneam/meta-bsp-imx8mm/blob/rel_imx_5.4.70_2.3.0-stable/Documentation/toolchain.md) +* Download the [GNU tool chain](https://github.com/compulab-yokneam/meta-bsp-imx8mm/blob/iot-gate-imx8_r3.0/Documentation/toolchain.md) * Create a folder to organize the files:
mkdir imx8mm @@ -35,13 +33,13 @@ export PATCHES=$(pwd)/meta-bsp-imx8mm/recipes-kernel/linux/compulab/imx8mm ## CompuLab Linux Kernel setup-git clone https://source.codeaurora.org/external/imx/linux-imx.git -git -C linux-imx checkout -b linux-compulab ${NXP_RELEASE} +git clone -b ${NXP_RELEASE} --single-branch https://source.codeaurora.org/external/imx/linux-imx.git +git -C linux-imx checkout -b linux-compulab git -C linux-imx am ${PATCHES}/*.patch## Compile the Kernel-make -C linux-imx cl-imx8m-mini_defconfig ${MACHINE}.config +make -C linux-imx ${MACHINE}_defconfig make -C linux-imxdiff --git a/Documentation/toolchain.md b/Documentation/toolchain.md index d164f00..8a22af1 100644 --- a/Documentation/toolchain.md +++ b/Documentation/toolchain.md @@ -14,6 +14,6 @@ sudo tar -C /opt -xf gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu.tar.xz * Set environment variables:export ARCH=arm64 -export CROSS_COMPILE=/opt/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-linux-gnu- +export CROSS_COMPILE=/opt/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-diff --git a/README.md b/README.md index 42741b0..ab214b6 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,14 @@ -# Quick Start Guide +# Developer snapshot +# Please do not try this at home -Supported CompuLab machines: -* `mcm-imx8m-mini` -* `ucm-imx8m-mini` +export COMPULAB_MACHINE=ucm-imx8m-mini +export LREPO=imx_5.15.32-2.0.0-compulab.xml +export CLB_RELEASE=rel_imx_5.15.32-2.0.0-experimental -# 1 Setup environment -## 1.1 Prepare NXP BSP -``` -repo init -u git://source.codeaurora.org/external/imx/imx-manifest.git -b imx-linux-hardknott -m imx-5.10.35-2.0.0.xml -``` -## 1.2 Download CompuLab meta layer -``` -wget --directory-prefix .repo/manifests https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx8mm/rel_imx_5.10.35_2.0.0-stable/scripts/imx-5.10.35_2.0.0_compulab.xml -``` -## 1.3 Get entire BSP tree -``` -repo init -m imx-5.10.35_2.0.0_compulab.xml +repo init -u git://source.codeaurora.org/external/imx/imx-manifest.git -b imx-linux-kirkstone -m imx-5.15.32-2.0.0.xml + +mkdir -p .repo/local_manifests +wget --directory-prefix .repo/local_manifests https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx8mm/${CLB_RELEASE}/scripts/${LREPO} repo sync -``` -# 2 Build -## 2.1 Define COMPULAB_MACHINE environment variable -|Machine|Command Line| -|---|---| -|mcm-imx8m-mini|```export COMPULAB_MACHINE=mcm-imx8m-mini``` -|ucm-imx8m-mini|```export COMPULAB_MACHINE=ucm-imx8m-mini``` -## 2.2 Run CompuLab Linux Yocto Project setup -|NOTE|Refer to the [NXP Readme](https://source.codeaurora.org/external/imx/meta-imx/tree/README?h=hardknott-5.10.35-2.0.0) for details about how to select a correct backend & distro.| -|---|---| -``` -MACHINE=${COMPULAB_MACHINE} DISTRO=fsl-imx-xwayland source compulab-setup-env -b build -``` -## 2.3 Build image -``` -bitbake -k compulab-ucm-imx8m-mini -``` - -# 3 Precompiled images -|Machine|Image| -|---|---| -|ucm-imx8m-mini|[compulab-ucm-imx8m-mini-ucm-imx8m-mini-YYYYMMDDhhmmss.rootfs.wic.bz2](https://drive.google.com/file/d/1PLSpK6_F1oTnSQqcTwHmpUboF7tbKLAv/view?usp=sharing) diff --git a/conf/layer.conf b/conf/layer.conf index 7a037fd..73dab1f 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -9,15 +9,16 @@ BBFILE_COLLECTIONS += "compulab-bsp-imx8mm" BBFILE_PATTERN_compulab-bsp-imx8mm := "^${LAYERDIR}/" BBFILE_PRIORITY_compulab-bsp-imx8mm = "9" +BBMASK += "meta-compulab/recipes-bsp" BBMASK += "meta-compulab/recipes-xfce" BBMASK += "meta-compulab/recipes-kernel" BBMASK += "meta-compulab/recipes-graphics" BBMASK += ".*boundary.*" CORE_IMAGE_EXTRA_INSTALL += " kernel-modules " -CORE_IMAGE_EXTRA_INSTALL += "${@bb.utils.contains('DISTRO_CODENAME', 'dunfell', 'firmware-imx-sdma-imx7d', 'firmware-imx-sdma', d)}" +CORE_IMAGE_EXTRA_INSTALL += " firmware-imx-sdma-imx7d " HOSTTOOLS += " git-lfs " HOSTTOOLS += " bison " -LAYERSERIES_COMPAT_compulab-bsp-imx8mm = "sumo thud warrior zeus dunfell hardknott" +LAYERSERIES_COMPAT_compulab-bsp-imx8mm = "kirkstone" diff --git a/conf/machine/compulab-imx8mm.inc b/conf/machine/compulab-imx8mm.inc index 5a96f88..e626b72 100644 --- a/conf/machine/compulab-imx8mm.inc +++ b/conf/machine/compulab-imx8mm.inc @@ -1,12 +1,15 @@ -MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:" +MACHINEOVERRIDES =. "imx-boot-container:mx8:mx8m:mx8mm:compulab-mx8mm:" SOC_DEFAULT_WKS_FILE = "imx-imx-boot-bootpart.wks.in" require conf/machine/include/imx-base.inc -require conf/machine/include/tune-cortexa53.inc +require conf/machine/include/arm/armv8a/tune-cortexa53.inc MACHINE_FEATURES += " pci wifi bluetooth " +IMX_DEFAULT_BOOTLOADER:use-mainline-bsp = "u-boot-compulab" +IMX_DEFAULT_BOOTLOADER:use-nxp-bsp = "u-boot-compulab" + SPL_BINARY = "spl/u-boot-spl.bin" # Set DDR FIRMWARE @@ -27,24 +30,36 @@ UBOOT_SUFFIX = "bin" UBOOT_MAKE_TARGET = "" IMX_BOOT_SEEK = "33" +MACHINE_FIRMWARE:append = " firmware-cypress linux-firmware-ax200" + +MACHINE_FIRMWARE:remove = "linux-firmware-ath10k" + +DEFAULTTUNE:mx8mm-nxp-bsp = "aarch64" + +# PLATFORM_FLAVOR = "mx8mmevk" +# PLATFORM_FLAVOR:ucm-imx8m-mini = "mx8mmevk" +# PLATFORM_FLAVOR:mcm-imx8m-mini = "mx8mmevk" +# PLATFORM_FLAVOR:iot-gate-imx8 = "mx8mmevk" +# Optee parameters OPTEE_BIN_EXT = "8mm" +OPTEE_PLATFORM_FLAVOR = "mx8mm_cl_iot_gate" +PLATFORM_FLAVOR:iot-gate-imx8 = "${OPTEE_PLATFORM_FLAVOR}" +PLATFORM_FLAVOR:mcm-imx8m-mini = "${OPTEE_PLATFORM_FLAVOR}" +PLATFORM_FLAVOR:ucm-imx8m-mini = "${OPTEE_PLATFORM_FLAVOR}" +TEE_LOAD_ADDR = "0x56000000" -MACHINE_FIRMWARE_append = " firmware-cypress linux-firmware-ax200" - -MACHINE_FIRMWARE_remove = "linux-firmware-ath10k" - -DEFAULTTUNE_mx8mm = "aarch64" - -PLATFORM_FLAVOR = "mx8mmevk" -PLATFORM_FLAVOR_ucm-imx8m-mini = "mx8mmevk" -PLATFORM_FLAVOR_mcm-imx8m-mini = "mx8mmevk" -PLATFORM_FLAVOR_iot-gate-imx8 = "mx8mmevk" ATF_MACHINE_NAME = "bl31-imx8mm.bin" PLATFORM = "imx8mm" SOC_TARGET = "iMX8MM" +IMX_BOOT_SOC_TARGET = "iMX8MM" -IMAGE_INSTALL_append = " \ +IMAGE_INSTALL:append = " \ kernel-image \ kernel-modules \ kernel-devicetree \ " + +PREFERRED_PROVIDER_virtual/kernel:compulab-mx8mm = "linux-compulab" +PREFERRED_PROVIDER_virtual/bootloader:compulab-mx8mm = "u-boot-compulab" +PREFERRED_PROVIDER_linux-imx-mfgtool:compulab-mx8mm = "linux-compulab-mfgtool" +PREFERRED_PROVIDER_linux-compulab-mfgtool:compulab-mx8mm = "linux-compulab-mfgtool" diff --git a/conf/machine/iot-gate-imx8.conf b/conf/machine/iot-gate-imx8.conf index c6958f5..c501102 100644 --- a/conf/machine/iot-gate-imx8.conf +++ b/conf/machine/iot-gate-imx8.conf @@ -9,6 +9,11 @@ require compulab-imx8mm.inc KERNEL_DEVICETREE = "compulab/ucm-imx8m-mini.dtb " KERNEL_DEVICETREE += "compulab/sb-iotgimx8.dtb " KERNEL_DEVICETREE += "compulab/sb-iotgimx8-can.dtb " +KERNEL_DEVICETREE += "compulab/sb-iotgimx8-ied.dtb " +KERNEL_DEVICETREE += "compulab/sb-iotgimx8-ied-m4.dtb " +KERNEL_DEVICETREE += "compulab/sb-iotgimx8-poed.dtb " +KERNEL_DEVICETREE += "compulab/sb-iotgimx8-poedv2.dtb " +KERNEL_DEVICETREE += "compulab/sb-iotgimx8-ied-wakeup.dtb " UBOOT_CONFIG ??= "sd" UBOOT_CONFIG[sd] = "iot-gate-imx8_defconfig,sdcard" @@ -16,3 +21,15 @@ UBOOT_CONFIG[mfgtool] = "iot-gate-imx8_defconfig" # Set u-boot DTB UBOOT_DTB_NAME = "iot-gate-imx8.dtb" + +# Prefered components +# PREFERRED_PROVIDER_virtual/kernel_mx8mm = "linux-compulab" +# PREFERRED_PROVIDER_virtual/bootloader_mx8mm = "u-boot-compulab" + +# Block recipes +BBMASK += "meta-compulab/recipes-bsp/u-boot" + +# Optee parameters +OPTEE_PLATFORM_FLAVOR = "mx8mm_cl_iot_gate" +PLATFORM_FLAVOR:iot-gate-imx8 = "${OPTEE_PLATFORM_FLAVOR}" +TEE_LOAD_ADDR = "0x56000000" diff --git a/conf/machine/ucm-imx8m-mini.conf b/conf/machine/ucm-imx8m-mini.conf index d0df5dc..b1e3d1f 100644 --- a/conf/machine/ucm-imx8m-mini.conf +++ b/conf/machine/ucm-imx8m-mini.conf @@ -17,5 +17,5 @@ UBOOT_CONFIG[mfgtool] = "ucm-imx8m-mini_defconfig" # Set u-boot DTB UBOOT_DTB_NAME = "ucm-imx8m-mini.dtb" -CL_RELEASE = '2.2.1' +CL_RELEASE = '2.2' IMAGE_LINK_NAME = "${MACHINE}" diff --git a/recipes-bsp/brcm-patchram/brcm-patchram.bb b/recipes-bsp/brcm-patchram/brcm-patchram.bb index 30d6ab8..fa39c37 100644 --- a/recipes-bsp/brcm-patchram/brcm-patchram.bb +++ b/recipes-bsp/brcm-patchram/brcm-patchram.bb @@ -19,7 +19,7 @@ SRC_URI = "git://chromium.googlesource.com/chromiumos/third_party/broadcom;proto FILES_${PN} = "/usr/bin/*" -do_install_append() { +do_install:append() { install -d ${D}/usr/bin install -m 755 brcm_patchram_plus ${D}/usr/bin } diff --git a/recipes-bsp/bt-start/bt-start_%.bbappend b/recipes-bsp/bt-start/bt-start_%.bbappend deleted file mode 100644 index 1f215fb..0000000 --- a/recipes-bsp/bt-start/bt-start_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI_append = " \ - file://bt-start \ -" - -RDEPENDS_${PN} = "bash brcm-patchram firmware-imx-brcm" diff --git a/recipes-bsp/firmware-imx/firmware-imx_%.bbappend b/recipes-bsp/firmware-imx/firmware-imx_%.bbappend index d0f8164..8b3fea3 100644 --- a/recipes-bsp/firmware-imx/firmware-imx_%.bbappend +++ b/recipes-bsp/firmware-imx/firmware-imx_%.bbappend @@ -1,13 +1,13 @@ BB_STRICT_CHECKSUM = "0" -SRC_URI_append += " \ +SRC_URI:append = " \ https://github.com/compulab-yokneam/bin/raw/master/rootfs/lib/firmware/brcm/480-0081.tar.bz2;protocol=https;md5sum=c6a3119dec228a6fb65642be931ee6aa;sha256sum=e5755109f263a70738f59869704351a15c846a9a3963236ba9742eb4e0e67052 \ " -do_install_append () { +do_install:append () { cp -rfv ${WORKDIR}/lib/firmware/brcm ${D}${base_libdir}/firmware/ } -FILES_${PN}-brcm += "${base_libdir}/firmware/brcm" +FILES:${PN}-brcm += "${base_libdir}/firmware/brcm" PACKAGES =+ "${PN}-brcm" COMPATIBLE_MACHINE_ucm-imx8m-mini = "ucm-imx8m-mini" diff --git a/recipes-bsp/imx-atf/compulab/imx8mm.inc b/recipes-bsp/imx-atf/compulab/imx8mm.inc index eed0ef6..6450355 100644 --- a/recipes-bsp/imx-atf/compulab/imx8mm.inc +++ b/recipes-bsp/imx-atf/compulab/imx8mm.inc @@ -1,6 +1,4 @@ -SRC_URI_append = " \ - file://0001-imx8mm-Set-IMX_BOOT_UART_BASE-for-CompuLab-boards.patch \ - file://0002-imx8mm-Assign-RDC_PDAP_UART4-to-D0.patch \ - file://0003-imx8mm-Set-BL2_BASE-to-the-upper-egde-of-the-1G.patch \ - file://0004-imx8mm-RDC-Remove-UART1-D0-restrictions.patch \ +SRC_URI:append = " \ + file://0001-imx8mm-Assign-RDC_PDAP_UART4-to-D0.patch \ + file://0002-iot-gate-imx8-RDC-Remove-UART2-D0-restrictions.patch \ " diff --git a/recipes-bsp/imx-atf/compulab/imx8mm/0001-imx8mm-Assign-RDC_PDAP_UART4-to-D0.patch b/recipes-bsp/imx-atf/compulab/imx8mm/0001-imx8mm-Assign-RDC_PDAP_UART4-to-D0.patch new file mode 100644 index 0000000..f5ed889 --- /dev/null +++ b/recipes-bsp/imx-atf/compulab/imx8mm/0001-imx8mm-Assign-RDC_PDAP_UART4-to-D0.patch @@ -0,0 +1,26 @@ +From 48afff4126103326193042622273e036f3396d2c Mon Sep 17 00:00:00 2001 +From: Valentin Raevsky+Date: Wed, 8 Jul 2020 11:34:20 +0300 +Subject: [PATCH 1/2] imx8mm: Assign RDC_PDAP_UART4 to D0 + +Signed-off-by: Valentin Raevsky +--- + plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c +index f63b9fcad..a89c7f941 100644 +--- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c ++++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c +@@ -58,7 +58,7 @@ static const struct imx_rdc_cfg rdc[] = { + RDC_MDAn(RDC_MDA_M4, DID1), + + /* peripherals domain permission */ +- RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W), ++ RDC_PDAPn(RDC_PDAP_UART4, D0R | D0W), + RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W), + RDC_PDAPn(RDC_PDAP_UART1, D0R | D0W), + +-- +2.11.0 + diff --git a/recipes-bsp/imx-atf/compulab/imx8mm/0002-iot-gate-imx8-RDC-Remove-UART2-D0-restrictions.patch b/recipes-bsp/imx-atf/compulab/imx8mm/0002-iot-gate-imx8-RDC-Remove-UART2-D0-restrictions.patch new file mode 100644 index 0000000..4fdf4aa --- /dev/null +++ b/recipes-bsp/imx-atf/compulab/imx8mm/0002-iot-gate-imx8-RDC-Remove-UART2-D0-restrictions.patch @@ -0,0 +1,25 @@ +From 3d785a514a3c9251c9db6b4f575153311a848a6c Mon Sep 17 00:00:00 2001 +From: Uri Mashiach +Date: Wed, 4 May 2022 11:03:18 +0300 +Subject: [PATCH 2/2] iot-gate-imx8: RDC: Remove UART2 D0 restrictions + +Signed-off-by: Uri Mashiach +--- + plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c +index a89c7f941..c7bfd3f9e 100644 +--- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c ++++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c +@@ -59,7 +59,6 @@ static const struct imx_rdc_cfg rdc[] = { + + /* peripherals domain permission */ + RDC_PDAPn(RDC_PDAP_UART4, D0R | D0W), +- RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W), + RDC_PDAPn(RDC_PDAP_UART1, D0R | D0W), + + /* memory region */ +-- +2.11.0 + diff --git a/recipes-bsp/imx-atf/imx-atf_2.%.bbappend b/recipes-bsp/imx-atf/imx-atf_2.%.bbappend new file mode 100644 index 0000000..6e48e89 --- /dev/null +++ b/recipes-bsp/imx-atf/imx-atf_2.%.bbappend @@ -0,0 +1,11 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/compulab/imx8mm:" + +require compulab/imx8mm.inc + +ATF_PLATFORM = "imx8mm" + +EXTRA_OEMAKE += "\ + IMX_BOOT_UART_BASE=0x30880000 \ + BL32_BASE=${TEE_LOAD_ADDR} \ + BL32_SIZE=0x2000000 \ +" diff --git a/recipes-bsp/imx-atf/imx-atf_2.4.bbappend b/recipes-bsp/imx-atf/imx-atf_2.4.bbappend index 0b765ec..0f1f5ef 100644 --- a/recipes-bsp/imx-atf/imx-atf_2.4.bbappend +++ b/recipes-bsp/imx-atf/imx-atf_2.4.bbappend @@ -1,3 +1,3 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/compulab/imx8mm:" +FILESEXTRAPATHS:prepend := "${THISDIR}/compulab/imx8mm:" include compulab/imx8mm.inc diff --git a/recipes-bsp/imx-mkimage/imx-boot_%.bbappend b/recipes-bsp/imx-mkimage/imx-boot_%.bbappend index 06c0e1c..c6c56c9 100644 --- a/recipes-bsp/imx-mkimage/imx-boot_%.bbappend +++ b/recipes-bsp/imx-mkimage/imx-boot_%.bbappend @@ -1,12 +1,12 @@ do_compile_preppend () { make_file=${S}/iMX8M/soc.mak if [ -e ${make_file} ]; then - sed -i "s/dtbs = .*dtb/dtbs = ${UBOOT_DTB_NAME}/g" ${make_file} - sed -i "s/\(^TEE_LOAD_ADDR \).*/\1= 0x7e000000/g" ${make_file} + sed -i "s/\(^dtbs \).*/\1= ${UBOOT_DTB_NAME}/g" ${make_file} + sed -i "s/\(^TEE_LOAD_ADDR \).*/\1= 0x56000000/g" ${make_file} fi } -do_install_append () { +do_install:append () { ln -fs ${BOOT_CONFIG_MACHINE}-${target} ${D}/boot/imx-boot } diff --git a/recipes-bsp/recipes-images/base-files_%.bbappend b/recipes-bsp/recipes-images/base-files_%.bbappend index a5173c3..4bf33e2 100644 --- a/recipes-bsp/recipes-images/base-files_%.bbappend +++ b/recipes-bsp/recipes-images/base-files_%.bbappend @@ -1,7 +1,7 @@ DESCRIPTION = "CompuLab release info." LICENSE = "MIT" -do_install_append() { +do_install:append() { for i in issue issue.net; do sed -e "/^Compulab Release/d" -i ${D}/etc/$i sed -e " 1 i $(date +"Compulab Release ${MACHINE} ${CL_RELEASE} %d %b %Y based on")" -i ${D}/etc/$i diff --git a/recipes-bsp/recipes-images/compulab-ucm-imx8m-mini.bb b/recipes-bsp/recipes-images/compulab-ucm-imx8m-mini.bb index 98c4446..f4e0850 100644 --- a/recipes-bsp/recipes-images/compulab-ucm-imx8m-mini.bb +++ b/recipes-bsp/recipes-images/compulab-ucm-imx8m-mini.bb @@ -3,4 +3,4 @@ LICENSE = "MIT" export IMAGE_LINK_NAME="${MACHINE}" -require dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5-validation-imx.bb +#require dynamic-layers/qt6-layer/recipes-fsl/images/imx-image-full.bb diff --git a/recipes-bsp/u-boot-scr/u-boot-script.bbappend b/recipes-bsp/u-boot-scr/u-boot-script.bbappend index cb0c221..5b822df 100644 --- a/recipes-bsp/u-boot-scr/u-boot-script.bbappend +++ b/recipes-bsp/u-boot-scr/u-boot-script.bbappend @@ -1,6 +1,6 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -do_compile_prepend() { +do_compile:prepend() { BOOTLOADER=$(basename $(ls ${WORKDIR}/recipe-sysroot/boot/imx-boot-* | head -1)) sed -i "s|##BOOTLOADER##|${BOOTLOADER}|" ${WORKDIR}/boot.script } diff --git a/recipes-bsp/u-boot/compulab/imx8mm.inc b/recipes-bsp/u-boot/compulab/imx8mm.inc index adc4db4..1a624d3 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm.inc +++ b/recipes-bsp/u-boot/compulab/imx8mm.inc @@ -1,4 +1,5 @@ -SRC_URI_append = " \ + +SRC_URI:append = " \ file://0001-ucm-imx8m-mini-Add-basic-support.patch \ file://0002-ucm-imx8m-mini-update-CPU-model-printed-parameters.patch \ file://0003-ucm-imx8m-mini-Fix-KConfig-warning.patch \ @@ -50,58 +51,81 @@ SRC_URI_append = " \ file://0049-mcm-imx8m-mini-dts-Enable-usbotg2-in-host-mode.patch \ file://0050-mcm-imx8m-mini-config-Remove-unused-stuff.patch \ file://0051-mcm-imx8m-mini-Remove-dram_init_banksize-and-get_eff.patch \ - file://0052-imx8m-soc-Don-t-reduce-the-memory-amount-by-the-opte.patch \ - file://0053-mcm-imx8m-mini-Move-tcm-to-plat-imx8mm.patch \ - file://0054-mcm-imx8m-mini-Refactor-spl-code.patch \ - file://0055-ucm-imx8m-mini-Refactor-the-code-for-2020.04.patch \ - file://0056-cpl-imx8m-mini-Set-LOCALVERSION-intead-of-EXTRAVERSI.patch \ - file://0057-cpl-imx8m-mini-Refactor-.h-configs.patch \ - file://0058-cpl-imx8m-mini-Refactor-.dts.patch \ - file://0059-iot-gate-imx8-Add-basic-support.patch \ - file://0060-mcm-imx8m-mini-config-Update-env-size-offest.patch \ - file://0061-imx8m-mini-env-config-Update-size-offset-value.patch \ - file://0062-imx8-eeprom-Move-to-the-imx8-platform-independent-fo.patch \ - file://0063-imx8-eeprom-Remove-duplicated-code.patch \ - file://0064-imx8mm-plat-Add-the-common-board-file-for-imx8mm-SoC.patch \ - file://0065-imx8m-mini-Refactor-the-usdhc2.patch \ - file://0066-mcm-imx8m-mini-reset-Refactor-the-reset.patch \ - file://0067-imx8m-mini-ddr-Change-the-memory-presets-order.patch \ - file://0068-imx8m-mini-env-Fix-getopt_long-parameters-string.patch \ - file://0069-ucm-imx8m-mini-Fix-reset.patch \ - file://0070-imx8m-mini-spl-Add-__weak-board_fit_config_name_matc.patch \ - file://0071-mcm-imx8m-mini-spl-Add-board_fit_config_name_match.patch \ - file://0072-imx8m-mini-u-boot-Add-__weak-uboot_board_private_ini.patch \ - file://0073-mcm-imx8m-mini-u-boot-Add-uboot_board_private_init.patch \ - file://0074-Add-ddr_init-return-handling.patch \ - file://0075-spl-Enable-Kingston-DRAM-support.patch \ - file://0076-Add-show_suite-function.patch \ - file://0077-Clean-debug-printout.patch \ - file://0078-imx8m-ddr-Add-Nanya-2G-2400-MTS-support.patch \ - file://0079-ucm-imx8m-mini-Enable-status-LED-and-cmd-led.patch \ - file://0080-mcm-and-ucm-Enable-status-LED-for-both-platforms.patch \ - file://0081-Enable-env-address-export-via-FDT.patch \ - file://0082-fw_utils-Enable-actual-env-address-readout.patch \ - file://0083-SPL-Disable-fake-memsize-report.patch \ - file://0084-fdt-Add-export-SoM-data-via-FDT.patch \ - file://0085-board-minor-cleaninig.patch \ - file://0086-rtc-Disable-bus-when-powered-from-battery.patch \ - file://0087-fdt-Add-export-of-base-board-data-via-FDT.patch \ - file://0088-spl-ddr-Enable-DDR-ID-0x1060008.patch \ - file://0089-drivers-video-Add-startek-ili9881c-panel-driver.patch \ - file://0090-cpl-imx8m-mini-Enable-startek-ili9881c-panel-support.patch \ - file://0091-cm-imx8m-mini-config-Enable-startek-ili9881c.patch \ - file://0092-Migration-to-5.10.35.patch \ - file://0093-Fix-enable_cache.patch \ - file://0094-Fix-mmc_autodetect.patch \ - file://0095-config-Enable-video.patch \ - file://0096-readout-some-cleannig.patch \ - file://0097-mmc-Fix-mmc_switch-workflow-issue.patch \ - file://0098-defconfig-Break-down-to-common-and-specific-parts.patch \ - file://0099-spl-lpddr-training-size-optimisation.patch \ - file://0100-spl-Add-SDP-support.patch \ - file://0101-spl-Enable-Samsung-4G-DRAM-0x01061010.patch \ - file://0102-Enable-DDR-Alliance-1G-0x01050008.patch \ - file://0103-make-Add-wrapper-for-compound-config.patch \ - file://0104-net-Enable-phy-Realtek-RTL8211E.patch \ - file://0105-LOCALVERSION-2.2.1-1.1.1.patch \ + file://0052-mcm-imx8m-mini-Move-tcm-to-plat-imx8mm.patch \ + file://0053-mcm-imx8m-mini-Refactor-spl-code.patch \ + file://0054-ucm-imx8m-mini-Refactor-the-code-for-2020.04.patch \ + file://0055-cpl-imx8m-mini-Set-LOCALVERSION-intead-of-EXTRAVERSI.patch \ + file://0056-cpl-imx8m-mini-Refactor-.h-configs.patch \ + file://0057-cpl-imx8m-mini-Refactor-.dts.patch \ + file://0058-iot-gate-imx8-Add-basic-support.patch \ + file://0059-mcm-imx8m-mini-config-Update-env-size-offest.patch \ + file://0060-imx8m-mini-env-config-Update-size-offset-value.patch \ + file://0061-imx8-eeprom-Move-to-the-imx8-platform-independent-fo.patch \ + file://0062-imx8-eeprom-Remove-duplicated-code.patch \ + file://0063-imx8mm-plat-Add-the-common-board-file-for-imx8mm-SoC.patch \ + file://0064-imx8m-mini-Refactor-the-usdhc2.patch \ + file://0065-mcm-imx8m-mini-reset-Refactor-the-reset.patch \ + file://0066-imx8m-mini-ddr-Change-the-memory-presets-order.patch \ + file://0067-imx8m-mini-env-Fix-getopt_long-parameters-string.patch \ + file://0068-ucm-imx8m-mini-Fix-reset.patch \ + file://0069-imx8m-mini-spl-Add-__weak-board_fit_config_name_matc.patch \ + file://0070-mcm-imx8m-mini-spl-Add-board_fit_config_name_match.patch \ + file://0071-imx8m-mini-u-boot-Add-__weak-uboot_board_private_ini.patch \ + file://0072-mcm-imx8m-mini-u-boot-Add-uboot_board_private_init.patch \ + file://0073-Add-ddr_init-return-handling.patch \ + file://0074-spl-Enable-Kingston-DRAM-support.patch \ + file://0075-Add-show_suite-function.patch \ + file://0076-Clean-debug-printout.patch \ + file://0077-imx8m-ddr-Add-Nanya-2G-2400-MTS-support.patch \ + file://0078-ucm-imx8m-mini-Enable-status-LED-and-cmd-led.patch \ + file://0079-mcm-and-ucm-Enable-status-LED-for-both-platforms.patch \ + file://0080-Enable-env-address-export-via-FDT.patch \ + file://0081-fw_utils-Enable-actual-env-address-readout.patch \ + file://0082-SPL-Disable-fake-memsize-report.patch \ + file://0083-fdt-Add-export-SoM-data-via-FDT.patch \ + file://0084-board-minor-cleaninig.patch \ + file://0085-rtc-Disable-bus-when-powered-from-battery.patch \ + file://0086-fdt-Add-export-of-base-board-data-via-FDT.patch \ + file://0087-spl-ddr-Enable-DDR-ID-0x1060008.patch \ + file://0088-drivers-video-Add-startek-ili9881c-panel-driver.patch \ + file://0089-cpl-imx8m-mini-Enable-startek-ili9881c-panel-support.patch \ + file://0090-cm-imx8m-mini-config-Enable-startek-ili9881c.patch \ + file://0091-Migration-to-5.10.35.patch \ + file://0092-Fix-mmc_autodetect.patch \ + file://0093-config-Enable-video.patch \ + file://0094-mmc-Fix-mmc_switch-workflow-issue.patch \ + file://0095-defconfig-Break-down-to-common-and-specific-parts.patch \ + file://0096-spl-lpddr-training-size-optimisation.patch \ + file://0097-spl-Add-SDP-support.patch \ + file://0098-spl-Enable-Samsung-4G-DRAM-0x01061010.patch \ + file://0099-Enable-DDR-Alliance-1G-0x01050008.patch \ + file://0100-make-Add-wrapper-for-compound-config.patch \ + file://0102-defconfig-Enable-EFI_LOADER.patch \ + file://0103-core-Add-EPFNOSUPPORT-handeler.patch \ + file://0104-cpl-imx8m-mini-dts-remove-unrelevant-sections.patch \ + file://0105-iot-gate-imx8-remove-driver-reset-functions.patch \ + file://0106-iot-gate-imx8-dts-set-MMC1-voltage-to-1.8V.patch \ + file://0107-iot-gate-imx8-usb-VBUS-enable-fix.patch \ + file://0108-imx8mm-enable-global-functions-implementation-in-sub.patch \ + file://0109-iot-gate-imx8-RS485-232-selection.patch \ + file://0110-iot-gate-imx8-add-extension-board-support.patch \ + file://0111-iot-gate-imx8-update-boot-sequence.patch \ + file://0112-iot-gate-imx8-prevent-network-interfaces-rename.patch \ + file://0113-iot-gate-imx8-update-prompt.patch \ + file://0114-imx8mm-enable-prompt-update-in-sub-projects.patch \ + file://0115-iot-gate-imx8-hide-temperature-message.patch \ + file://0116-iot-gate-imx8-fix-UART1-mode-GPIO.patch \ + file://0117-iot-gate-imx8-add-support-for-the-IE-TPM-module.patch \ + file://0118-iot-gate-imx8-add-support-for-the-IE-POE-extension-b.patch \ + file://0119-iot-gate-imx8-update-support-for-the-IE-TPM-module.patch \ + file://0120-iot-gate-imx8-add-support-for-the-IE-CL420-module.patch \ + file://0121-iot-gate-imx8-add-support-for-the-POEv2-module.patch \ + file://0122-iot-gate-imx8-enable-USB-to-Ethernet-driver-SMSC-LAN.patch \ + file://0123-cmd-eeprom-fix-disregarding-of-the-i2c_bus-parameter.patch \ + file://0124-Enable-SoC-info-export-via-fdt.patch \ + file://0125-imx8mm-net-enable-phy-Realtek-RTL8211E.patch \ + file://0126-iot-gate-imx8-release-2020.04-iot-gate-imx8-3.0.patch \ " + +# For U-Boot build outside of Yocto +# file://0101-compulab-imx8mm-Add-binman-support.patch diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0001-ucm-imx8m-mini-Add-basic-support.patch b/recipes-bsp/u-boot/compulab/imx8mm/0001-ucm-imx8m-mini-Add-basic-support.patch index 23a14ce..1e372f2 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0001-ucm-imx8m-mini-Add-basic-support.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0001-ucm-imx8m-mini-Add-basic-support.patch @@ -1,34 +1,34 @@ -From 22c3acad098a8c75bd8791eb1ae0e370c0b2984a Mon Sep 17 00:00:00 2001 +From a79e947a2a87a687a2cd9fb6e43e3c5d8d29b262 Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Sun, 18 Jul 2021 23:23:16 +0300 -Subject: [PATCH 01/91] ucm-imx8m-mini: Add basic support +Subject: [PATCH 001/126] ucm-imx8m-mini: Add basic support Signed-off-by: Kirill Kapranov --- - arch/arm/dts/Makefile | 2 + - arch/arm/dts/ucm-imx8m-mini.dts | 452 ++++ - arch/arm/mach-imx/imx8m/Kconfig | 8 + - board/compulab/common/Makefile | 1 + - board/compulab/common/eeprom.c | 4 +- - board/compulab/common/mmc.c | 50 + - board/compulab/common/pfuze.c | 174 ++ - board/compulab/common/pfuze.h | 19 + - board/compulab/common/pfuze_dm.c | 89 + - board/compulab/common/tcpc.h | 454 ++++ - board/compulab/ucm-imx8m-mini/Kconfig | 30 + - board/compulab/ucm-imx8m-mini/Makefile | 16 + - board/compulab/ucm-imx8m-mini/ddr/Makefile | 11 + - board/compulab/ucm-imx8m-mini/ddr/ddr.h | 59 + - board/compulab/ucm-imx8m-mini/ddr/ddr_init.c | 255 +++ - .../ucm-imx8m-mini/ddr/ddrphy_train.c | 1044 +++++++++ - board/compulab/ucm-imx8m-mini/ddr/helper.c | 103 + - .../ddr/wait_ddrphy_training_complete.c | 103 + - board/compulab/ucm-imx8m-mini/lpddr4_timing.c | 1980 +++++++++++++++++ - board/compulab/ucm-imx8m-mini/spl.c | 258 +++ - .../compulab/ucm-imx8m-mini/ucm-imx8m-mini.c | 734 ++++++ - configs/ucm-imx8m-mini_defconfig | 56 + - include/configs/ucm-imx8m-mini.h | 361 +++ - 23 files changed, 6261 insertions(+), 2 deletions(-) + arch/arm/dts/Makefile | 2 + + arch/arm/dts/ucm-imx8m-mini.dts | 452 +++++ + arch/arm/mach-imx/imx8m/Kconfig | 8 + + board/compulab/common/Makefile | 1 + + board/compulab/common/eeprom.c | 4 +- + board/compulab/common/mmc.c | 51 + + board/compulab/common/pfuze.c | 174 ++ + board/compulab/common/pfuze.h | 19 + + board/compulab/common/pfuze_dm.c | 89 + + board/compulab/common/tcpc.h | 454 +++++ + board/compulab/ucm-imx8m-mini/Kconfig | 30 + + board/compulab/ucm-imx8m-mini/Makefile | 16 + + board/compulab/ucm-imx8m-mini/ddr/Makefile | 11 + + board/compulab/ucm-imx8m-mini/ddr/ddr.h | 59 + + board/compulab/ucm-imx8m-mini/ddr/ddr_init.c | 255 +++ + board/compulab/ucm-imx8m-mini/ddr/ddrphy_train.c | 1044 +++++++++++ + board/compulab/ucm-imx8m-mini/ddr/helper.c | 103 + + .../ddr/wait_ddrphy_training_complete.c | 103 + + board/compulab/ucm-imx8m-mini/lpddr4_timing.c | 1980 ++++++++++++++++++++ + board/compulab/ucm-imx8m-mini/spl.c | 258 +++ + board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c | 734 ++++++++ + configs/ucm-imx8m-mini_defconfig | 56 + + include/configs/ucm-imx8m-mini.h | 361 ++++ + 23 files changed, 6262 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/ucm-imx8m-mini.dts create mode 100644 board/compulab/common/mmc.c create mode 100644 board/compulab/common/pfuze.c @@ -50,10 +50,10 @@ Signed-off-by: Kirill Kapranov create mode 100644 include/configs/ucm-imx8m-mini.h diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index aa0c6a75c3..2b81a2bc62 100644 +index 24a387fb60..c31d483784 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -890,6 +890,8 @@ dtb-$(CONFIG_RCAR_GEN2) += \ +@@ -898,6 +898,8 @@ dtb-$(CONFIG_RCAR_GEN2) += \ r8a7794-alt-u-boot.dtb \ r8a7794-silk-u-boot.dtb @@ -521,10 +521,10 @@ index 0000000000..112345b6a3 + status = "disabled"; +}; diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig -index 9e5b6d7ffa..d4c41ba1aa 100644 +index 245b085499..4930b9bee6 100644 --- a/arch/arm/mach-imx/imx8m/Kconfig +++ b/arch/arm/mach-imx/imx8m/Kconfig -@@ -201,6 +201,13 @@ config TARGET_PHYCORE_IMX8MP +@@ -259,6 +259,13 @@ config TARGET_PHYCORE_IMX8MP select IMX8MP select SUPPORT_SPL select IMX8M_LPDDR4 @@ -538,7 +538,7 @@ index 9e5b6d7ffa..d4c41ba1aa 100644 endchoice source "board/freescale/imx8mq_evk/Kconfig" -@@ -217,5 +224,6 @@ source "board/beacon/imx8mm/Kconfig" +@@ -276,5 +283,6 @@ source "board/beacon/imx8mm/Kconfig" source "board/beacon/imx8mn/Kconfig" source "board/phytec/phycore_imx8mm/Kconfig" source "board/phytec/phycore_imx8mp/Kconfig" @@ -582,10 +582,10 @@ index 5206cf5c0a..e23dd68437 100644 uint offset; diff --git a/board/compulab/common/mmc.c b/board/compulab/common/mmc.c new file mode 100644 -index 0000000000..9fc3e68728 +index 0000000000..52b15ab5f3 --- /dev/null +++ b/board/compulab/common/mmc.c -@@ -0,0 +1,50 @@ +@@ -0,0 +1,51 @@ +/* + * Copyright (C) 2016 Freescale Semiconductor, Inc. + * Copyright 2018 NXP @@ -598,6 +598,7 @@ index 0000000000..9fc3e68728 +#include +#include +#include ++#include + +static int check_mmc_autodetect(void) +{ @@ -6485,5 +6486,5 @@ index 0000000000..1605ab7281 +#endif +#endif -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0002-ucm-imx8m-mini-update-CPU-model-printed-parameters.patch b/recipes-bsp/u-boot/compulab/imx8mm/0002-ucm-imx8m-mini-update-CPU-model-printed-parameters.patch index 7aaad50..18536e1 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0002-ucm-imx8m-mini-update-CPU-model-printed-parameters.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0002-ucm-imx8m-mini-update-CPU-model-printed-parameters.patch @@ -1,7 +1,7 @@ -From fd167e54036b16013eecd9504fa392734f725fb0 Mon Sep 17 00:00:00 2001 +From aa605296da62f4b44932c7d8eedbc95518352cec Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Tue, 26 May 2020 20:55:00 +0300 -Subject: [PATCH 02/91] ucm-imx8m-mini: update CPU/model printed parameters +Subject: [PATCH 002/126] ucm-imx8m-mini: update CPU/model printed parameters Update the startup messages of the CPU and model parameters @@ -24,5 +24,5 @@ index 112345b6a3..899899c1c6 100644 chosen { -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0003-ucm-imx8m-mini-Fix-KConfig-warning.patch b/recipes-bsp/u-boot/compulab/imx8mm/0003-ucm-imx8m-mini-Fix-KConfig-warning.patch index c2abe07..f029ae0 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0003-ucm-imx8m-mini-Fix-KConfig-warning.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0003-ucm-imx8m-mini-Fix-KConfig-warning.patch @@ -1,7 +1,7 @@ -From 5dabb2f3f0d1814c111ff4c6edd2a88360b88948 Mon Sep 17 00:00:00 2001 +From 665396af251f6eec00d0ece435f120a75ea3e621 Mon Sep 17 00:00:00 2001 From: Uri Mashiach Date: Wed, 13 Feb 2019 08:56:03 +0200 -Subject: [PATCH 03/91] ucm-imx8m-mini: Fix KConfig warning +Subject: [PATCH 003/126] ucm-imx8m-mini: Fix KConfig warning The following compilation warning is generated: choice value used outside its choice group @@ -84,5 +84,5 @@ index 6d9cccdbcb..34f7683d2d 100644 ddr_init(); #endif -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0004-ucm-imx8m-mini-enable-status-LED.patch b/recipes-bsp/u-boot/compulab/imx8mm/0004-ucm-imx8m-mini-enable-status-LED.patch index 64c019a..fc8c400 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0004-ucm-imx8m-mini-enable-status-LED.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0004-ucm-imx8m-mini-enable-status-LED.patch @@ -1,7 +1,7 @@ -From 4c4365f284eee7ed73c65dd3f1cb9fbfa65ef095 Mon Sep 17 00:00:00 2001 +From c826389773619e592df6ccc852cb636b61d935d0 Mon Sep 17 00:00:00 2001 From: Uri Mashiach Date: Wed, 13 Feb 2019 15:04:59 +0200 -Subject: [PATCH 04/91] ucm-imx8m-mini: enable status LED +Subject: [PATCH 004/126] ucm-imx8m-mini: enable status LED Use the status LED feature to turn on the status LED. @@ -35,5 +35,5 @@ index 2212e76acb..36cfe1b2e1 100644 CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0005-eeprom-layout-remove-buf-from-the-eeprom_field-struc.patch b/recipes-bsp/u-boot/compulab/imx8mm/0005-eeprom-layout-remove-buf-from-the-eeprom_field-struc.patch index 9c3de8f..12da21c 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0005-eeprom-layout-remove-buf-from-the-eeprom_field-struc.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0005-eeprom-layout-remove-buf-from-the-eeprom_field-struc.patch @@ -1,7 +1,7 @@ -From 20aa60bc1225baa35bcc2660351d2a1359fd49ad Mon Sep 17 00:00:00 2001 +From fcdfa92492c4104cfd01ed1fe9ac77b8fd204b1d Mon Sep 17 00:00:00 2001 From: Uri Mashiach Date: Mon, 18 Sep 2017 19:49:32 +0300 -Subject: [PATCH 05/91] eeprom: layout: remove buf from the eeprom_field +Subject: [PATCH 005/126] eeprom: layout: remove buf from the eeprom_field structure The layout structure contains a pointer to a buffer that contain the @@ -17,10 +17,10 @@ pointer parameter to the field functions. Signed-off-by: Uri Mashiach --- - board/compulab/common/eeprom.c | 150 +++++++++++++++++---------------- - common/eeprom/eeprom_field.c | 73 ++++++++++------ - common/eeprom/eeprom_layout.c | 21 ++--- - include/eeprom_field.h | 31 ++++--- + board/compulab/common/eeprom.c | 150 +++++++++++++++++++++-------------------- + common/eeprom/eeprom_field.c | 73 ++++++++++++-------- + common/eeprom/eeprom_layout.c | 21 +++--- + include/eeprom_field.h | 31 +++++---- 4 files changed, 149 insertions(+), 126 deletions(-) diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c @@ -603,5 +603,5 @@ index 05c0d14592..a13ca566af 100644 #endif -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0006-eeprom-layout-add-field-functions-read.patch b/recipes-bsp/u-boot/compulab/imx8mm/0006-eeprom-layout-add-field-functions-read.patch index b5e85f3..ba20446 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0006-eeprom-layout-add-field-functions-read.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0006-eeprom-layout-add-field-functions-read.patch @@ -1,7 +1,7 @@ -From ebfbf0ddfda20d3191ee5b0a1d7341cd68465b72 Mon Sep 17 00:00:00 2001 +From cbdfb5f0fea713cc69de29e75a05b36ce50b6931 Mon Sep 17 00:00:00 2001 From: Uri Mashiach Date: Tue, 19 Sep 2017 10:07:26 +0300 -Subject: [PATCH 06/91] eeprom: layout: add field functions read +Subject: [PATCH 006/126] eeprom: layout: add field functions read Read option is missing in the EEPROM layout feature @@ -11,9 +11,9 @@ provided buffer without manipulation. Signed-off-by: Uri Mashiach --- - board/compulab/common/eeprom.c | 91 +++++++++++++++++----------------- - common/eeprom/eeprom_field.c | 22 ++++++++ - common/eeprom/eeprom_layout.c | 37 ++++++++++++++ + board/compulab/common/eeprom.c | 91 +++++++++++++++++++++--------------------- + common/eeprom/eeprom_field.c | 22 ++++++++++ + common/eeprom/eeprom_layout.c | 37 +++++++++++++++++ include/eeprom_field.h | 4 ++ include/eeprom_layout.h | 2 + 5 files changed, 111 insertions(+), 45 deletions(-) @@ -146,11 +146,10 @@ diff --git a/common/eeprom/eeprom_field.c b/common/eeprom/eeprom_field.c index 38827f1180..e588b0943f 100644 --- a/common/eeprom/eeprom_field.c +++ b/common/eeprom/eeprom_field.c -@@ -129,6 +129,28 @@ int eeprom_field_update_bin(struct eeprom_field *field, uchar *fbuf, - return __eeprom_field_update_bin(field, fbuf, value, false); +@@ -130,6 +130,28 @@ int eeprom_field_update_bin(struct eeprom_field *field, uchar *fbuf, } -+/** + /** + * eeprom_field_read_bin() - Read field data in binary form + * + * @field: an initialized field @@ -172,18 +171,18 @@ index 38827f1180..e588b0943f 100644 + return 0; +} + - /** ++/** * eeprom_field_update_reserved() - Update reserved field with new data in * binary form + * diff --git a/common/eeprom/eeprom_layout.c b/common/eeprom/eeprom_layout.c index 1fab8e4dca..cc6dd39e01 100644 --- a/common/eeprom/eeprom_layout.c +++ b/common/eeprom/eeprom_layout.c -@@ -95,6 +95,42 @@ static int eeprom_layout_update_field(struct eeprom_layout *layout, - return -1; +@@ -96,6 +96,42 @@ static int eeprom_layout_update_field(struct eeprom_layout *layout, } -+/* + /* + * eeprom_layout_read_field() - read a single field from the layout data + * @layout: A pointer to an existing struct layout. + * @field_name: The name of the field to update. @@ -219,9 +218,10 @@ index 1fab8e4dca..cc6dd39e01 100644 + return -1; +} + - /* ++/* * eeprom_layout_setup() - setup layout struct with the layout data and * metadata as dictated by layout_version + * @layout: A pointer to an existing struct layout. @@ -116,4 +152,5 @@ void eeprom_layout_setup(struct eeprom_layout *layout, unsigned char *buf, layout->data_size = buf_size; layout->print = eeprom_layout_print; @@ -262,5 +262,5 @@ index 730d963ab9..50e8ec1085 100644 void eeprom_layout_setup(struct eeprom_layout *layout, unsigned char *buf, -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0007-compulab-eeprom-layout-add-read-serial-function.patch b/recipes-bsp/u-boot/compulab/imx8mm/0007-compulab-eeprom-layout-add-read-serial-function.patch index 6bfa6db..fea70e8 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0007-compulab-eeprom-layout-add-read-serial-function.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0007-compulab-eeprom-layout-add-read-serial-function.patch @@ -1,16 +1,16 @@ -From c4e09d71adf13ae781ed295c0667b5ce0a3a2b60 Mon Sep 17 00:00:00 2001 +From 42ee0d104b1ecc275269d401cfaad103863cc1e9 Mon Sep 17 00:00:00 2001 From: Uri Mashiach Date: Tue, 19 Sep 2017 10:47:25 +0300 -Subject: [PATCH 07/91] compulab: eeprom: layout: add read serial function +Subject: [PATCH 007/126] compulab: eeprom: layout: add read serial function The function conver the CompuLab serial number format to tag_serialnr structure. Signed-off-by: Uri Mashiach --- - board/compulab/common/eeprom.c | 67 ++++++++++++++++++++++++++-------- - common/eeprom/eeprom_field.c | 21 +++++++++++ - include/eeprom_field.h | 2 + + board/compulab/common/eeprom.c | 67 ++++++++++++++++++++++++++++++++---------- + common/eeprom/eeprom_field.c | 21 +++++++++++++ + include/eeprom_field.h | 2 ++ 3 files changed, 75 insertions(+), 15 deletions(-) diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c @@ -191,11 +191,10 @@ diff --git a/common/eeprom/eeprom_field.c b/common/eeprom/eeprom_field.c index e588b0943f..814dc4eb7a 100644 --- a/common/eeprom/eeprom_field.c +++ b/common/eeprom/eeprom_field.c -@@ -203,6 +203,27 @@ int eeprom_field_update_bin_rev(struct eeprom_field *field, uchar *fbuf, - return __eeprom_field_update_bin(field, fbuf, value, true); +@@ -204,6 +204,27 @@ int eeprom_field_update_bin_rev(struct eeprom_field *field, uchar *fbuf, } -+/** + /** + * eeprom_field_read_rev() - Read reversed binary data + * + * @field: an initialized field @@ -216,9 +215,10 @@ index e588b0943f..814dc4eb7a 100644 + return 0; +} + - /** ++/** * eeprom_field_print_mac_addr() - print a field which contains a mac address * + * Treat the field data as simple binary data, and print it formatted as a MAC diff --git a/include/eeprom_field.h b/include/eeprom_field.h index 6b6cd37229..311c49401a 100644 --- a/include/eeprom_field.h @@ -233,5 +233,5 @@ index 6b6cd37229..311c49401a 100644 void eeprom_field_print_mac(const struct eeprom_field *field, uchar *fbuf); int eeprom_field_update_mac(struct eeprom_field *field, uchar *fbuf, -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0008-compulab-integrate-DM_I2C-in-EEPROM-driver.patch b/recipes-bsp/u-boot/compulab/imx8mm/0008-compulab-integrate-DM_I2C-in-EEPROM-driver.patch index 782f045..29c7c4b 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0008-compulab-integrate-DM_I2C-in-EEPROM-driver.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0008-compulab-integrate-DM_I2C-in-EEPROM-driver.patch @@ -1,7 +1,7 @@ -From 6ae3d093dda3585c0f82f8f044ae7fe542ad8e49 Mon Sep 17 00:00:00 2001 +From e7068f16b334d6c518401e30013074a0f88b1ab9 Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Tue, 26 May 2020 21:17:29 +0300 -Subject: [PATCH 08/91] compulab: integrate DM_I2C in EEPROM driver +Subject: [PATCH 008/126] compulab: integrate DM_I2C in EEPROM driver CompuLab's EEPROM driver is enabled only for CONFIG_SYS_I2C. Update the enabling condition of the driver to CONFIG_SYS_I2C or @@ -41,5 +41,5 @@ index a9c0203b81..2628d4ab86 100644 u32 cl_eeprom_get_board_rev(uint eeprom_bus); int cl_eeprom_get_product_name(uchar *buf, uint eeprom_bus); -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0009-ucm-imx8m-mini-add-support-for-eeprom-layout-comands.patch b/recipes-bsp/u-boot/compulab/imx8mm/0009-ucm-imx8m-mini-add-support-for-eeprom-layout-comands.patch index be092d0..8155c1f 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0009-ucm-imx8m-mini-add-support-for-eeprom-layout-comands.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0009-ucm-imx8m-mini-add-support-for-eeprom-layout-comands.patch @@ -1,7 +1,7 @@ -From a97a2cf1a2667ab13ecce0bc7c362c7b49008bf7 Mon Sep 17 00:00:00 2001 +From 41e820e4b705ab5400c78eb0e3ec4f1fc1a9bbc2 Mon Sep 17 00:00:00 2001 From: Uri Mashiach Date: Tue, 19 Feb 2019 18:48:29 +0200 -Subject: [PATCH 09/91] ucm-imx8m-mini: add support for eeprom layout comands +Subject: [PATCH 009/126] ucm-imx8m-mini: add support for eeprom layout comands Add support for EEPROM and EEPROM layout commands for the UCM-iMX8M-Mini. @@ -54,5 +54,5 @@ index 1605ab7281..f464ed822b 100644 #ifndef CONFIG_SPL_BUILD #define CONFIG_CMD_USB -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0010-mx8m-mini-set-Ethernet-MAC-address-environment.patch b/recipes-bsp/u-boot/compulab/imx8mm/0010-mx8m-mini-set-Ethernet-MAC-address-environment.patch index 62d73cd..32f07c0 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0010-mx8m-mini-set-Ethernet-MAC-address-environment.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0010-mx8m-mini-set-Ethernet-MAC-address-environment.patch @@ -1,7 +1,7 @@ -From 22c1aa3dd9a65033682e1bec93dad9f20a8d9ed5 Mon Sep 17 00:00:00 2001 +From 9da7a67ead6515dbead3bb5ebba3337711508982 Mon Sep 17 00:00:00 2001 From: Uri Mashiach Date: Tue, 19 Feb 2019 21:46:54 +0200 -Subject: [PATCH 10/91] mx8m-mini: set Ethernet MAC address environment +Subject: [PATCH 010/126] mx8m-mini: set Ethernet MAC address environment If the environment variable "ethaddr" is empty: * Read the MAC address from the EEPROM. @@ -9,7 +9,7 @@ If the environment variable "ethaddr" is empty: Signed-off-by: Uri Mashiach --- - .../compulab/ucm-imx8m-mini/ucm-imx8m-mini.c | 37 +++++++++++++++++++ + board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c b/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c @@ -86,5 +86,5 @@ index ef5d1ffa55..80d9a5b8bd 100644 } -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0011-ucm-imx8m-mini-config-Remove-unused-stuff.patch b/recipes-bsp/u-boot/compulab/imx8mm/0011-ucm-imx8m-mini-config-Remove-unused-stuff.patch index 7eb4195..f9031c8 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0011-ucm-imx8m-mini-config-Remove-unused-stuff.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0011-ucm-imx8m-mini-config-Remove-unused-stuff.patch @@ -1,11 +1,11 @@ -From faf90f560f89ba9ebc0f418f15e9d170deba617d Mon Sep 17 00:00:00 2001 +From 9247cadb067e9dc9b05851dedde17942d1bf7b34 Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Wed, 20 Feb 2019 08:21:05 +0200 -Subject: [PATCH 11/91] ucm-imx8m-mini: config: Remove unused stuff +Subject: [PATCH 011/126] ucm-imx8m-mini: config: Remove unused stuff Signed-off-by: Valentin Raevsky --- - include/configs/ucm-imx8m-mini.h | 53 -------------------------------- + include/configs/ucm-imx8m-mini.h | 53 ---------------------------------------- 1 file changed, 53 deletions(-) diff --git a/include/configs/ucm-imx8m-mini.h b/include/configs/ucm-imx8m-mini.h @@ -81,5 +81,5 @@ index f464ed822b..214dad40ed 100644 #define CONFIG_MXC_OCOTP -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0012-ucm-imx8m-mini-Enable-uart4-for-bluetooth.patch b/recipes-bsp/u-boot/compulab/imx8mm/0012-ucm-imx8m-mini-Enable-uart4-for-bluetooth.patch index eb9f24b..bca704a 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0012-ucm-imx8m-mini-Enable-uart4-for-bluetooth.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0012-ucm-imx8m-mini-Enable-uart4-for-bluetooth.patch @@ -1,7 +1,7 @@ -From 039d1bfdc99917232adcc642e082af7a576b28f2 Mon Sep 17 00:00:00 2001 +From 266c4024565e18cf4b3aa0bc41fe37a01f8d8c08 Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Thu, 7 Mar 2019 14:17:42 +0200 -Subject: [PATCH 12/91] ucm-imx8m-mini: Enable uart4 for bluetooth +Subject: [PATCH 012/126] ucm-imx8m-mini: Enable uart4 for bluetooth Signed-off-by: Valentin Raevsky --- @@ -62,5 +62,5 @@ index 899899c1c6..003cc857df 100644 pinctrl-names = "default", "state_100mhz", "state_200mhz"; pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>; -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0013-ucm-imx8m-mini-ddr-Validate-new-setting.patch b/recipes-bsp/u-boot/compulab/imx8mm/0013-ucm-imx8m-mini-ddr-Validate-new-setting.patch index cb4fbfe..02444d3 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0013-ucm-imx8m-mini-ddr-Validate-new-setting.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0013-ucm-imx8m-mini-ddr-Validate-new-setting.patch @@ -1,12 +1,12 @@ -From 191feb9ba6cd656f2f8c8c56749e204ca5aab4f6 Mon Sep 17 00:00:00 2001 +From 6bcfe6007bc66837010335c9048fc593677f68a2 Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Tue, 26 Mar 2019 10:36:45 +0200 -Subject: [PATCH 13/91] ucm-imx8m-mini: ddr: Validate new setting +Subject: [PATCH 013/126] ucm-imx8m-mini: ddr: Validate new setting Signed-off-by: Valentin Raevsky --- - board/compulab/ucm-imx8m-mini/ddr/ddr_init.c | 23 +++-- - .../ucm-imx8m-mini/ddr/ddrphy_train.c | 96 +++++++++---------- + board/compulab/ucm-imx8m-mini/ddr/ddr_init.c | 23 +++--- + board/compulab/ucm-imx8m-mini/ddr/ddrphy_train.c | 96 ++++++++++++------------ 2 files changed, 62 insertions(+), 57 deletions(-) diff --git a/board/compulab/ucm-imx8m-mini/ddr/ddr_init.c b/board/compulab/ucm-imx8m-mini/ddr/ddr_init.c @@ -324,5 +324,5 @@ index 8116069dfb..e4577e0a21 100644 +} \ No newline at end of file -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0014-ucm-imx8m-mini-defconfig-Disable-CONFIG_NXP_TMU.patch b/recipes-bsp/u-boot/compulab/imx8mm/0014-ucm-imx8m-mini-defconfig-Disable-CONFIG_NXP_TMU.patch index 7864f1c..7c40592 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0014-ucm-imx8m-mini-defconfig-Disable-CONFIG_NXP_TMU.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0014-ucm-imx8m-mini-defconfig-Disable-CONFIG_NXP_TMU.patch @@ -1,7 +1,7 @@ -From 25d672480dabfc27a2bc746dd75e6a30d8e117cc Mon Sep 17 00:00:00 2001 +From 76a3fdd109d7326b5ba48fb92752a6a188e2fda4 Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Wed, 27 Mar 2019 13:28:51 +0200 -Subject: [PATCH 14/91] ucm-imx8m-mini: defconfig: Disable CONFIG_NXP_TMU +Subject: [PATCH 014/126] ucm-imx8m-mini: defconfig: Disable CONFIG_NXP_TMU Signed-off-by: Valentin Raevsky --- @@ -21,5 +21,5 @@ index b4a9975b33..75531acb20 100644 CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0015-ucm-imx8m-mini-config-Update-h-file.patch b/recipes-bsp/u-boot/compulab/imx8mm/0015-ucm-imx8m-mini-config-Update-h-file.patch index 3dadfa7..fcaded5 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0015-ucm-imx8m-mini-config-Update-h-file.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0015-ucm-imx8m-mini-config-Update-h-file.patch @@ -1,7 +1,7 @@ -From bcba8667218c69dc9ed5a8894094dc0ab38966c4 Mon Sep 17 00:00:00 2001 +From 45fae1b2de5c218f33a822aedd8b58dfa74cc0f4 Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Mon, 22 Apr 2019 12:06:29 +0300 -Subject: [PATCH 15/91] ucm-imx8m-mini: config : Update h-file +Subject: [PATCH 015/126] ucm-imx8m-mini: config : Update h-file 1) Add a missing include 2) Remove duplications @@ -46,5 +46,5 @@ index 214dad40ed..046dc243bc 100644 #define CONFIG_CMD_USB_MASS_STORAGE -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0016-ucm-imx8m-mini-spl-Refacoring-ddr_init-call.patch b/recipes-bsp/u-boot/compulab/imx8mm/0016-ucm-imx8m-mini-spl-Refacoring-ddr_init-call.patch index 766fc7c..4871af0 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0016-ucm-imx8m-mini-spl-Refacoring-ddr_init-call.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0016-ucm-imx8m-mini-spl-Refacoring-ddr_init-call.patch @@ -1,7 +1,7 @@ -From e3456703938fdcc1f25c8a845fa1f392c02b27e9 Mon Sep 17 00:00:00 2001 +From 37c1b745004b455d8ad69c5e2da65fa77e39868f Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Sun, 21 Apr 2019 22:17:20 +0300 -Subject: [PATCH 16/91] ucm-imx8m-mini: spl: Refacoring ddr_init() call +Subject: [PATCH 016/126] ucm-imx8m-mini: spl: Refacoring ddr_init() call Signed-off-by: Valentin Raevsky --- @@ -43,5 +43,5 @@ index 34f7683d2d..833183597a 100644 #define I2C_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE) -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0017-ucm-imx8m-mini-Kconfig-Refacoring-ddr-init-config-op.patch b/recipes-bsp/u-boot/compulab/imx8mm/0017-ucm-imx8m-mini-Kconfig-Refacoring-ddr-init-config-op.patch index 92a1969..5a285ea 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0017-ucm-imx8m-mini-Kconfig-Refacoring-ddr-init-config-op.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0017-ucm-imx8m-mini-Kconfig-Refacoring-ddr-init-config-op.patch @@ -1,7 +1,7 @@ -From a07c6130c9cba79e78f333e17529bee57cad61bb Mon Sep 17 00:00:00 2001 +From e0b70a34cfa94ec5399b71f680e4b4dd63b1b379 Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Sun, 21 Apr 2019 22:19:27 +0300 -Subject: [PATCH 17/91] ucm-imx8m-mini: Kconfig: Refacoring ddr init config +Subject: [PATCH 017/126] ucm-imx8m-mini: Kconfig: Refacoring ddr init config option Signed-off-by: Valentin Raevsky @@ -32,5 +32,5 @@ index 1da11b2046..e6b334134f 100644 imx8mm_val board configuration approach -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0018-ucm-imx8m-mini-Makefile-Refacoring-ddr-init-build-op.patch b/recipes-bsp/u-boot/compulab/imx8mm/0018-ucm-imx8m-mini-Makefile-Refacoring-ddr-init-build-op.patch index fc4d334..a0dcfdd 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0018-ucm-imx8m-mini-Makefile-Refacoring-ddr-init-build-op.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0018-ucm-imx8m-mini-Makefile-Refacoring-ddr-init-build-op.patch @@ -1,7 +1,7 @@ -From b11be4155cda9dac8afd1fecfab3dc00370f4e3a Mon Sep 17 00:00:00 2001 +From 0001734a9f497a9287fbd1ca9f92d5b30e3cf9e4 Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Tue, 26 May 2020 21:33:48 +0300 -Subject: [PATCH 18/91] ucm-imx8m-mini: Makefile: Refacoring ddr init build +Subject: [PATCH 018/126] ucm-imx8m-mini: Makefile: Refacoring ddr init build option Signed-off-by: Valentin Raevsky @@ -26,5 +26,5 @@ index b092c281ab..02d3393232 100644 +obj-$(CONFIG_UCM_IMX8M_LPDDR4_VAL) += ddr/ endif -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0019-ucm-imx8m-mini-lpddr4_timing-Add-ucm-imx8m-mini-supp.patch b/recipes-bsp/u-boot/compulab/imx8mm/0019-ucm-imx8m-mini-lpddr4_timing-Add-ucm-imx8m-mini-supp.patch index 2962beb..9a25f6f 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0019-ucm-imx8m-mini-lpddr4_timing-Add-ucm-imx8m-mini-supp.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0019-ucm-imx8m-mini-lpddr4_timing-Add-ucm-imx8m-mini-supp.patch @@ -1,12 +1,12 @@ -From e811ab1437eb7dae3a27027612be3a70a1495481 Mon Sep 17 00:00:00 2001 +From 2ccda2a6956bfaa460fd871a5ba95ccb17ac5b6a Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Wed, 24 Apr 2019 13:55:44 +0300 -Subject: [PATCH 19/91] ucm-imx8m-mini: lpddr4_timing: Add ucm-imx8m-mini +Subject: [PATCH 019/126] ucm-imx8m-mini: lpddr4_timing: Add ucm-imx8m-mini support Signed-off-by: Valentin Raevsky --- - board/compulab/ucm-imx8m-mini/lpddr4_timing.c | 39 +++++++++++-------- + board/compulab/ucm-imx8m-mini/lpddr4_timing.c | 39 +++++++++++++++------------ 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/board/compulab/ucm-imx8m-mini/lpddr4_timing.c b/board/compulab/ucm-imx8m-mini/lpddr4_timing.c @@ -102,5 +102,5 @@ index 9c80caea8b..dfd68ea9d8 100644 .ddrc_cfg_num = ARRAY_SIZE(lpddr4_ddrc_cfg), .ddrphy_cfg = lpddr4_ddrphy_cfg, -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0020-ucm-imx8m-mini-config-Enable-the-new-LPDDR4-config.patch b/recipes-bsp/u-boot/compulab/imx8mm/0020-ucm-imx8m-mini-config-Enable-the-new-LPDDR4-config.patch index bb5982b..4ea3ae6 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0020-ucm-imx8m-mini-config-Enable-the-new-LPDDR4-config.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0020-ucm-imx8m-mini-config-Enable-the-new-LPDDR4-config.patch @@ -1,7 +1,7 @@ -From 61856dfbba647d1dc7ace4d0e20b6c2dd70356c5 Mon Sep 17 00:00:00 2001 +From 58e467d2a44188a047116e1945a45c4fdecc0c5a Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Wed, 1 May 2019 13:48:53 +0300 -Subject: [PATCH 20/91] ucm-imx8m-mini: config: Enable the new LPDDR4 config +Subject: [PATCH 020/126] ucm-imx8m-mini: config: Enable the new LPDDR4 config Signed-off-by: Valentin Raevsky --- @@ -21,5 +21,5 @@ index 75531acb20..d45e7894e8 100644 CONFIG_DEFAULT_DEVICE_TREE="ucm-imx8m-mini" CONFIG_FIT=y -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0021-ucm-imx8m-mini-Move-FS-support-to-defconfig.patch b/recipes-bsp/u-boot/compulab/imx8mm/0021-ucm-imx8m-mini-Move-FS-support-to-defconfig.patch index 6e59f0d..b6326fc 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0021-ucm-imx8m-mini-Move-FS-support-to-defconfig.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0021-ucm-imx8m-mini-Move-FS-support-to-defconfig.patch @@ -1,7 +1,7 @@ -From 4a41b9cfee034c1cf37639a02226bc4168a20bc6 Mon Sep 17 00:00:00 2001 +From e58e45b88859f214573df2d15eb727e4369ea6bc Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Tue, 30 Apr 2019 11:32:58 +0300 -Subject: [PATCH 21/91] ucm-imx8m-mini: Move FS support to defconfig +Subject: [PATCH 021/126] ucm-imx8m-mini: Move FS support to defconfig Signed-off-by: Valentin Raevsky --- @@ -49,5 +49,5 @@ index 046dc243bc..8b55fd61e9 100644 #define CONFIG_SYS_MMC_IMG_LOAD_PART 1 -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0022-ucm-imx8m-mini-config-CONFIG_IMX_OPTEE-y.patch b/recipes-bsp/u-boot/compulab/imx8mm/0022-ucm-imx8m-mini-config-CONFIG_IMX_OPTEE-y.patch index 68710fa..b825215 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0022-ucm-imx8m-mini-config-CONFIG_IMX_OPTEE-y.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0022-ucm-imx8m-mini-config-CONFIG_IMX_OPTEE-y.patch @@ -1,7 +1,7 @@ -From c5c284852f47909de25675a70a98f41057aec3bb Mon Sep 17 00:00:00 2001 +From 5309c7bfb05e76e83d0091ba0a192961bda6f992 Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Wed, 1 May 2019 21:48:56 +0300 -Subject: [PATCH 22/91] ucm-imx8m-mini: config: CONFIG_IMX_OPTEE=y +Subject: [PATCH 022/126] ucm-imx8m-mini: config: CONFIG_IMX_OPTEE=y Signed-off-by: Valentin Raevsky --- @@ -21,5 +21,5 @@ index 3bce614aab..d457d263c4 100644 CONFIG_FIT=y CONFIG_SPL_LOAD_FIT=y -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0023-set-extended-temperature-range.patch b/recipes-bsp/u-boot/compulab/imx8mm/0023-set-extended-temperature-range.patch index 75f82b0..797f71a 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0023-set-extended-temperature-range.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0023-set-extended-temperature-range.patch @@ -1,7 +1,7 @@ -From 9c604bbf23b9951a1e312f7ebaf8891d740047c6 Mon Sep 17 00:00:00 2001 +From a807f865492b22a83840252dde454899265dfbe2 Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Fri, 3 May 2019 23:00:08 +0300 -Subject: [PATCH 23/91] set extended temperature range +Subject: [PATCH 023/126] set extended temperature range Signed-off-by: Kirill Kapranov --- @@ -24,5 +24,5 @@ index 003cc857df..2e68d13e87 100644 + temperature = <115000>; +}; -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0024-spl-Update-memory-init-code.patch b/recipes-bsp/u-boot/compulab/imx8mm/0024-spl-Update-memory-init-code.patch index 6e04c7c..f571625 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0024-spl-Update-memory-init-code.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0024-spl-Update-memory-init-code.patch @@ -1,46 +1,43 @@ -From 387201dc09e0b2d314be267faf81b16a520d5df2 Mon Sep 17 00:00:00 2001 +From 9054a7839f163d1fd158ce6b887b3e1f6e91de20 Mon Sep 17 00:00:00 2001 From: Kirill Kapranov -Date: Mon, 19 Jul 2021 00:12:30 +0300 -Subject: [PATCH 24/91] spl: Update memory init code +Date: Wed, 8 Dec 2021 12:10:21 +0200 +Subject: [PATCH 024/126] spl: Update memory init code -This patch comprise of all the changes of DDR ID interpretation code up to -migration the code to plat directory +This patch comprise of all the changes of DDR ID interpretation code up +to migration the code to plat directory Signed-off-by: Kirill Kapranov --- - arch/arm/dts/ucm-imx8m-mini.dts | 4 +- - arch/arm/include/asm/arch-imx8m/imx8m_ddr.h | 8 + - arch/arm/lib/bootm.c | 2 + - arch/arm/lib/cache-cp15.c | 5 +- - arch/arm/mach-imx/imx8m/soc.c | 6 +- - arch/arm/mach-imx/misc.c | 2 + - board/compulab/plat/imx8mm/Makefile | 2 + - board/compulab/plat/imx8mm/ddr/Makefile | 5 + - board/compulab/plat/imx8mm/ddr/ddr.c | 207 ++ - board/compulab/plat/imx8mm/ddr/ddr.h | 17 + - .../plat/imx8mm/ddr/lpddr4_timing_01050008.c | 1849 +++++++++++++++ - .../plat/imx8mm/ddr/lpddr4_timing_01061010.c | 1849 +++++++++++++++ - .../plat/imx8mm/ddr/lpddr4_timing_ff000110.c | 1848 +++++++++++++++ - .../plat/imx8mm/ddr/lpddr4_timing_ff020008.c | 1848 +++++++++++++++ - board/compulab/plat/imx8mm/eeprom/Makefile | 6 + - board/compulab/plat/imx8mm/eeprom/eeprom.c | 192 ++ - board/compulab/plat/imx8mm/eeprom/eeprom.h | 30 + - .../compulab/plat/imx8mm/eeprom/eeprom_spl.c | 147 ++ - board/compulab/ucm-imx8m-mini/Kconfig | 27 +- - board/compulab/ucm-imx8m-mini/Makefile | 5 +- - board/compulab/ucm-imx8m-mini/ddr/Makefile | 11 - - board/compulab/ucm-imx8m-mini/ddr/ddr.h | 59 - - board/compulab/ucm-imx8m-mini/ddr/ddr_init.c | 260 --- - .../ucm-imx8m-mini/ddr/ddrphy_train.c | 1044 --------- - board/compulab/ucm-imx8m-mini/ddr/helper.c | 103 - - .../ddr/wait_ddrphy_training_complete.c | 103 - - board/compulab/ucm-imx8m-mini/lpddr4_timing.c | 1985 ----------------- - board/compulab/ucm-imx8m-mini/spl.c | 16 +- - .../compulab/ucm-imx8m-mini/ucm-imx8m-mini.c | 110 +- - .../compulab/ucm-imx8m-mini/ucm-imx8m-mini.h | 12 + - configs/ucm-imx8m-mini_defconfig | 3 +- - include/configs/ucm-imx8m-mini.h | 14 +- - 32 files changed, 8168 insertions(+), 3611 deletions(-) + arch/arm/dts/ucm-imx8m-mini.dts | 4 +- + arch/arm/include/asm/arch-imx8m/imx8m_ddr.h | 8 + + arch/arm/mach-imx/misc.c | 2 + + board/compulab/plat/imx8mm/Makefile | 2 + + board/compulab/plat/imx8mm/ddr/Makefile | 5 + + board/compulab/plat/imx8mm/ddr/ddr.c | 208 ++ + board/compulab/plat/imx8mm/ddr/ddr.h | 17 + + .../plat/imx8mm/ddr/lpddr4_timing_01050008.c | 1848 ++++++++++++++++++ + .../plat/imx8mm/ddr/lpddr4_timing_01061010.c | 1848 ++++++++++++++++++ + .../plat/imx8mm/ddr/lpddr4_timing_ff000110.c | 1848 ++++++++++++++++++ + .../plat/imx8mm/ddr/lpddr4_timing_ff020008.c | 1848 ++++++++++++++++++ + board/compulab/plat/imx8mm/eeprom/Makefile | 5 + + board/compulab/plat/imx8mm/eeprom/eeprom.c | 192 ++ + board/compulab/plat/imx8mm/eeprom/eeprom.h | 30 + + board/compulab/plat/imx8mm/eeprom/eeprom_spl.c | 147 ++ + board/compulab/ucm-imx8m-mini/Kconfig | 25 +- + board/compulab/ucm-imx8m-mini/Makefile | 5 +- + board/compulab/ucm-imx8m-mini/ddr/Makefile | 11 - + board/compulab/ucm-imx8m-mini/ddr/ddr.h | 59 - + board/compulab/ucm-imx8m-mini/ddr/ddr_init.c | 260 --- + board/compulab/ucm-imx8m-mini/ddr/ddrphy_train.c | 1044 ---------- + board/compulab/ucm-imx8m-mini/ddr/helper.c | 103 - + .../ddr/wait_ddrphy_training_complete.c | 103 - + board/compulab/ucm-imx8m-mini/lpddr4_timing.c | 1985 -------------------- + board/compulab/ucm-imx8m-mini/spl.c | 15 +- + board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c | 110 +- + board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.h | 12 + + configs/ucm-imx8m-mini_defconfig | 3 +- + include/configs/ucm-imx8m-mini.h | 14 +- + 29 files changed, 8156 insertions(+), 3605 deletions(-) create mode 100644 arch/arm/include/asm/arch-imx8m/imx8m_ddr.h create mode 100644 board/compulab/plat/imx8mm/Makefile create mode 100644 board/compulab/plat/imx8mm/ddr/Makefile @@ -92,67 +89,6 @@ index 0000000000..7a59b30d87 +#include + +#endif /* __IMX8M_DDR_H___ */ -diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c -index b3988ae7e3..e1bd628507 100644 ---- a/arch/arm/lib/bootm.c -+++ b/arch/arm/lib/bootm.c -@@ -154,6 +154,8 @@ static void setup_memory_tags(struct bd_info *bd) - int i; - - for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { -+ if(!bd->bi_dram[i].size) -+ continue; - params->hdr.tag = ATAG_MEM; - params->hdr.size = tag_size (tag_mem32); - -diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c -index b6d966e319..3212ea47f3 100644 ---- a/arch/arm/lib/cache-cp15.c -+++ b/arch/arm/lib/cache-cp15.c -@@ -116,8 +116,11 @@ __weak void dram_bank_mmu_setup(int bank) - for (i = bd->bi_dram[bank].start >> MMU_SECTION_SHIFT; - i < (bd->bi_dram[bank].start >> MMU_SECTION_SHIFT) + - (bd->bi_dram[bank].size >> MMU_SECTION_SHIFT); -- i++) -+ i++) { -+ if(!bd->bi_dram[bank].size) -+ continue; - set_section_dcache(i, DCACHE_DEFAULT_OPTION); -+ } - } - - /* to activate the MMU we need to set up virtual memory: use 1M areas */ -diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c -index 95c23b0df4..d1c76eb102 100644 ---- a/arch/arm/mach-imx/imx8m/soc.c -+++ b/arch/arm/mach-imx/imx8m/soc.c -@@ -222,7 +222,7 @@ __weak int board_phys_sdram_size(phys_size_t *size) - return 0; - } - --int dram_init(void) -+__weak int dram_init(void) - { - unsigned int entry = imx8m_find_dram_entry_in_mem_map(); - phys_size_t sdram_size; -@@ -248,7 +248,7 @@ int dram_init(void) - return 0; - } - --int dram_init_banksize(void) -+__weak int dram_init_banksize(void) - { - int bank = 0; - int ret; -@@ -290,7 +290,7 @@ int dram_init_banksize(void) - return 0; - } - --phys_size_t get_effective_memsize(void) -+__weak phys_size_t get_effective_memsize(void) - { - /* return the first bank as effective memory */ - if (rom_pointer[1]) diff --git a/arch/arm/mach-imx/misc.c b/arch/arm/mach-imx/misc.c index 9f53cc2168..5f001926aa 100644 --- a/arch/arm/mach-imx/misc.c @@ -176,22 +112,23 @@ index 0000000000..04b9b2e8f8 +obj-y += eeprom/ diff --git a/board/compulab/plat/imx8mm/ddr/Makefile b/board/compulab/plat/imx8mm/ddr/Makefile new file mode 100644 -index 0000000000..bf8a968277 +index 0000000000..47c48dbae2 --- /dev/null +++ b/board/compulab/plat/imx8mm/ddr/Makefile @@ -0,0 +1,5 @@ -+obj-y += ddr.o -+obj-y += lpddr4_timing_ff020008.o -+obj-y += lpddr4_timing_ff000110.o -+obj-y += lpddr4_timing_01061010.o -+obj-y += lpddr4_timing_01050008.o +++obj-y += ddr.o +++obj-y += lpddr4_timing_ff020008.o +++obj-y += lpddr4_timing_ff000110.o +++obj-y += lpddr4_timing_01061010.o +++obj-y += lpddr4_timing_01050008.o diff --git a/board/compulab/plat/imx8mm/ddr/ddr.c b/board/compulab/plat/imx8mm/ddr/ddr.c new file mode 100644 -index 0000000000..7392fcdfaa +index 0000000000..3c6b6ff489 --- /dev/null +++ b/board/compulab/plat/imx8mm/ddr/ddr.c -@@ -0,0 +1,207 @@ +@@ -0,0 +1,208 @@ +#include ++#include +#include +#include +#include @@ -423,10 +360,10 @@ index 0000000000..a66e8ec3c4 +#endif diff --git a/board/compulab/plat/imx8mm/ddr/lpddr4_timing_01050008.c b/board/compulab/plat/imx8mm/ddr/lpddr4_timing_01050008.c new file mode 100644 -index 0000000000..54c3922de5 +index 0000000000..f8e867695d --- /dev/null +++ b/board/compulab/plat/imx8mm/ddr/lpddr4_timing_01050008.c -@@ -0,0 +1,1849 @@ +@@ -0,0 +1,1848 @@ +/* + * Copyright 2018 NXP + * @@ -752,158 +689,158 @@ index 0000000000..54c3922de5 + +/* ddr phy trained csr */ +static struct dram_cfg_param ddr_ddrphy_trained_csr[] = { -+ { 0x200b2, 0x0 }, ++ { 0x200b2, 0x0 }, + { 0x1200b2, 0x0 }, + { 0x2200b2, 0x0 }, -+ { 0x200cb, 0x0 }, -+ { 0x10043, 0x0 }, ++ { 0x200cb, 0x0 }, ++ { 0x10043, 0x0 }, + { 0x110043, 0x0 }, + { 0x210043, 0x0 }, -+ { 0x10143, 0x0 }, ++ { 0x10143, 0x0 }, + { 0x110143, 0x0 }, + { 0x210143, 0x0 }, -+ { 0x11043, 0x0 }, ++ { 0x11043, 0x0 }, + { 0x111043, 0x0 }, + { 0x211043, 0x0 }, -+ { 0x11143, 0x0 }, ++ { 0x11143, 0x0 }, + { 0x111143, 0x0 }, + { 0x211143, 0x0 }, -+ { 0x12043, 0x0 }, ++ { 0x12043, 0x0 }, + { 0x112043, 0x0 }, + { 0x212043, 0x0 }, -+ { 0x12143, 0x0 }, ++ { 0x12143, 0x0 }, + { 0x112143, 0x0 }, + { 0x212143, 0x0 }, -+ { 0x13043, 0x0 }, ++ { 0x13043, 0x0 }, + { 0x113043, 0x0 }, + { 0x213043, 0x0 }, -+ { 0x13143, 0x0 }, ++ { 0x13143, 0x0 }, + { 0x113143, 0x0 }, + { 0x213143, 0x0 }, -+ { 0x80, 0x0 }, ++ { 0x80, 0x0 }, + { 0x100080, 0x0 }, + { 0x200080, 0x0 }, -+ { 0x1080, 0x0 }, ++ { 0x1080, 0x0 }, + { 0x101080, 0x0 }, + { 0x201080, 0x0 }, -+ { 0x2080, 0x0 }, ++ { 0x2080, 0x0 }, + { 0x102080, 0x0 }, + { 0x202080, 0x0 }, -+ { 0x3080, 0x0 }, ++ { 0x3080, 0x0 }, + { 0x103080, 0x0 }, + { 0x203080, 0x0 }, -+ { 0x4080, 0x0 }, ++ { 0x4080, 0x0 }, + { 0x104080, 0x0 }, + { 0x204080, 0x0 }, -+ { 0x5080, 0x0 }, ++ { 0x5080, 0x0 }, + { 0x105080, 0x0 }, + { 0x205080, 0x0 }, -+ { 0x6080, 0x0 }, ++ { 0x6080, 0x0 }, + { 0x106080, 0x0 }, + { 0x206080, 0x0 }, -+ { 0x7080, 0x0 }, ++ { 0x7080, 0x0 }, + { 0x107080, 0x0 }, + { 0x207080, 0x0 }, -+ { 0x8080, 0x0 }, ++ { 0x8080, 0x0 }, + { 0x108080, 0x0 }, + { 0x208080, 0x0 }, -+ { 0x9080, 0x0 }, ++ { 0x9080, 0x0 }, + { 0x109080, 0x0 }, + { 0x209080, 0x0 }, -+ { 0x10080, 0x0 }, ++ { 0x10080, 0x0 }, + { 0x110080, 0x0 }, + { 0x210080, 0x0 }, -+ { 0x10180, 0x0 }, ++ { 0x10180, 0x0 }, + { 0x110180, 0x0 }, + { 0x210180, 0x0 }, -+ { 0x11080, 0x0 }, ++ { 0x11080, 0x0 }, + { 0x111080, 0x0 }, + { 0x211080, 0x0 }, -+ { 0x11180, 0x0 }, ++ { 0x11180, 0x0 }, + { 0x111180, 0x0 }, + { 0x211180, 0x0 }, -+ { 0x12080, 0x0 }, ++ { 0x12080, 0x0 }, + { 0x112080, 0x0 }, + { 0x212080, 0x0 }, -+ { 0x12180, 0x0 }, ++ { 0x12180, 0x0 }, + { 0x112180, 0x0 }, + { 0x212180, 0x0 }, -+ { 0x13080, 0x0 }, ++ { 0x13080, 0x0 }, + { 0x113080, 0x0 }, + { 0x213080, 0x0 }, -+ { 0x13180, 0x0 }, ++ { 0x13180, 0x0 }, + { 0x113180, 0x0 }, + { 0x213180, 0x0 }, -+ { 0x10081, 0x0 }, ++ { 0x10081, 0x0 }, + { 0x110081, 0x0 }, + { 0x210081, 0x0 }, -+ { 0x10181, 0x0 }, ++ { 0x10181, 0x0 }, + { 0x110181, 0x0 }, + { 0x210181, 0x0 }, -+ { 0x11081, 0x0 }, ++ { 0x11081, 0x0 }, + { 0x111081, 0x0 }, + { 0x211081, 0x0 }, -+ { 0x11181, 0x0 }, ++ { 0x11181, 0x0 }, + { 0x111181, 0x0 }, + { 0x211181, 0x0 }, -+ { 0x12081, 0x0 }, ++ { 0x12081, 0x0 }, + { 0x112081, 0x0 }, + { 0x212081, 0x0 }, -+ { 0x12181, 0x0 }, ++ { 0x12181, 0x0 }, + { 0x112181, 0x0 }, + { 0x212181, 0x0 }, -+ { 0x13081, 0x0 }, ++ { 0x13081, 0x0 }, + { 0x113081, 0x0 }, + { 0x213081, 0x0 }, -+ { 0x13181, 0x0 }, ++ { 0x13181, 0x0 }, + { 0x113181, 0x0 }, + { 0x213181, 0x0 }, -+ { 0x100d0, 0x0 }, ++ { 0x100d0, 0x0 }, + { 0x1100d0, 0x0 }, + { 0x2100d0, 0x0 }, -+ { 0x101d0, 0x0 }, ++ { 0x101d0, 0x0 }, + { 0x1101d0, 0x0 }, + { 0x2101d0, 0x0 }, -+ { 0x110d0, 0x0 }, ++ { 0x110d0, 0x0 }, + { 0x1110d0, 0x0 }, + { 0x2110d0, 0x0 }, -+ { 0x111d0, 0x0 }, ++ { 0x111d0, 0x0 }, + { 0x1111d0, 0x0 }, + { 0x2111d0, 0x0 }, -+ { 0x120d0, 0x0 }, ++ { 0x120d0, 0x0 }, + { 0x1120d0, 0x0 }, + { 0x2120d0, 0x0 }, -+ { 0x121d0, 0x0 }, ++ { 0x121d0, 0x0 }, + { 0x1121d0, 0x0 }, + { 0x2121d0, 0x0 }, -+ { 0x130d0, 0x0 }, ++ { 0x130d0, 0x0 }, + { 0x1130d0, 0x0 }, + { 0x2130d0, 0x0 }, -+ { 0x131d0, 0x0 }, ++ { 0x131d0, 0x0 }, + { 0x1131d0, 0x0 }, + { 0x2131d0, 0x0 }, -+ { 0x100d1, 0x0 }, ++ { 0x100d1, 0x0 }, + { 0x1100d1, 0x0 }, + { 0x2100d1, 0x0 }, -+ { 0x101d1, 0x0 }, ++ { 0x101d1, 0x0 }, + { 0x1101d1, 0x0 }, + { 0x2101d1, 0x0 }, -+ { 0x110d1, 0x0 }, ++ { 0x110d1, 0x0 }, + { 0x1110d1, 0x0 }, + { 0x2110d1, 0x0 }, -+ { 0x111d1, 0x0 }, ++ { 0x111d1, 0x0 }, + { 0x1111d1, 0x0 }, + { 0x2111d1, 0x0 }, -+ { 0x120d1, 0x0 }, ++ { 0x120d1, 0x0 }, + { 0x1120d1, 0x0 }, + { 0x2120d1, 0x0 }, -+ { 0x121d1, 0x0 }, ++ { 0x121d1, 0x0 }, + { 0x1121d1, 0x0 }, + { 0x2121d1, 0x0 }, -+ { 0x130d1, 0x0 }, ++ { 0x130d1, 0x0 }, + { 0x1130d1, 0x0 }, + { 0x2130d1, 0x0 }, -+ { 0x131d1, 0x0 }, ++ { 0x131d1, 0x0 }, + { 0x1131d1, 0x0 }, + { 0x2131d1, 0x0 }, + { 0x10068, 0x0 }, @@ -981,320 +918,320 @@ index 0000000000..54c3922de5 + { 0x1008c, 0x0 }, + { 0x11008c, 0x0 }, + { 0x21008c, 0x0 }, -+ { 0x1018c, 0x0 }, ++ { 0x1018c, 0x0 }, + { 0x11018c, 0x0 }, + { 0x21018c, 0x0 }, -+ { 0x1108c, 0x0 }, ++ { 0x1108c, 0x0 }, + { 0x11108c, 0x0 }, + { 0x21108c, 0x0 }, -+ { 0x1118c, 0x0 }, ++ { 0x1118c, 0x0 }, + { 0x11118c, 0x0 }, + { 0x21118c, 0x0 }, -+ { 0x1208c, 0x0 }, ++ { 0x1208c, 0x0 }, + { 0x11208c, 0x0 }, + { 0x21208c, 0x0 }, -+ { 0x1218c, 0x0 }, ++ { 0x1218c, 0x0 }, + { 0x11218c, 0x0 }, + { 0x21218c, 0x0 }, -+ { 0x1308c, 0x0 }, ++ { 0x1308c, 0x0 }, + { 0x11308c, 0x0 }, + { 0x21308c, 0x0 }, -+ { 0x1318c, 0x0 }, -+ { 0x11318c, 0x0 }, ++ { 0x1318c, 0x0 }, ++ { 0x11318c, 0x0 } + { 0x21318c, 0x0 }, -+ { 0x1008d, 0x0 }, ++ { 0x1008d, 0x0 }, + { 0x11008d, 0x0 }, + { 0x21008d, 0x0 }, -+ { 0x1018d, 0x0 }, ++ { 0x1018d, 0x0 }, + { 0x11018d, 0x0 }, + { 0x21018d, 0x0 }, -+ { 0x1108d, 0x0 }, ++ { 0x1108d, 0x0 }, + { 0x11108d, 0x0 }, + { 0x21108d, 0x0 }, -+ { 0x1118d, 0x0 }, ++ { 0x1118d, 0x0 }, + { 0x11118d, 0x0 }, + { 0x21118d, 0x0 }, -+ { 0x1208d, 0x0 }, ++ { 0x1208d, 0x0 }, + { 0x11208d, 0x0 }, + { 0x21208d, 0x0 }, -+ { 0x1218d, 0x0 }, ++ { 0x1218d, 0x0 }, + { 0x11218d, 0x0 }, + { 0x21218d, 0x0 }, -+ { 0x1308d, 0x0 }, ++ { 0x1308d, 0x0 }, + { 0x11308d, 0x0 }, + { 0x21308d, 0x0 }, -+ { 0x1318d, 0x0 }, ++ { 0x1318d, 0x0 }, + { 0x11318d, 0x0 }, + { 0x21318d, 0x0 }, -+ { 0x100c0, 0x0 }, ++ { 0x100c0, 0x0 }, + { 0x1100c0, 0x0 }, + { 0x2100c0, 0x0 }, -+ { 0x101c0, 0x0 }, ++ { 0x101c0, 0x0 }, + { 0x1101c0, 0x0 }, + { 0x2101c0, 0x0 }, -+ { 0x102c0, 0x0 }, ++ { 0x102c0, 0x0 }, + { 0x1102c0, 0x0 }, + { 0x2102c0, 0x0 }, -+ { 0x103c0, 0x0 }, ++ { 0x103c0, 0x0 }, + { 0x1103c0, 0x0 }, + { 0x2103c0, 0x0 }, -+ { 0x104c0, 0x0 }, ++ { 0x104c0, 0x0 }, + { 0x1104c0, 0x0 }, + { 0x2104c0, 0x0 }, -+ { 0x105c0, 0x0 }, ++ { 0x105c0, 0x0 }, + { 0x1105c0, 0x0 }, + { 0x2105c0, 0x0 }, -+ { 0x106c0, 0x0 }, ++ { 0x106c0, 0x0 }, + { 0x1106c0, 0x0 }, + { 0x2106c0, 0x0 }, -+ { 0x107c0, 0x0 }, ++ { 0x107c0, 0x0 }, + { 0x1107c0, 0x0 }, + { 0x2107c0, 0x0 }, -+ { 0x108c0, 0x0 }, ++ { 0x108c0, 0x0 }, + { 0x1108c0, 0x0 }, + { 0x2108c0, 0x0 }, -+ { 0x110c0, 0x0 }, ++ { 0x110c0, 0x0 }, + { 0x1110c0, 0x0 }, + { 0x2110c0, 0x0 }, -+ { 0x111c0, 0x0 }, ++ { 0x111c0, 0x0 }, + { 0x1111c0, 0x0 }, + { 0x2111c0, 0x0 }, -+ { 0x112c0, 0x0 }, ++ { 0x112c0, 0x0 }, + { 0x1112c0, 0x0 }, + { 0x2112c0, 0x0 }, -+ { 0x113c0, 0x0 }, ++ { 0x113c0, 0x0 }, + { 0x1113c0, 0x0 }, + { 0x2113c0, 0x0 }, -+ { 0x114c0, 0x0 }, ++ { 0x114c0, 0x0 }, + { 0x1114c0, 0x0 }, + { 0x2114c0, 0x0 }, -+ { 0x115c0, 0x0 }, ++ { 0x115c0, 0x0 }, + { 0x1115c0, 0x0 }, + { 0x2115c0, 0x0 }, -+ { 0x116c0, 0x0 }, ++ { 0x116c0, 0x0 }, + { 0x1116c0, 0x0 }, + { 0x2116c0, 0x0 }, -+ { 0x117c0, 0x0 }, ++ { 0x117c0, 0x0 }, + { 0x1117c0, 0x0 }, + { 0x2117c0, 0x0 }, -+ { 0x118c0, 0x0 }, ++ { 0x118c0, 0x0 }, + { 0x1118c0, 0x0 }, + { 0x2118c0, 0x0 }, -+ { 0x120c0, 0x0 }, ++ { 0x120c0, 0x0 }, + { 0x1120c0, 0x0 }, + { 0x2120c0, 0x0 }, -+ { 0x121c0, 0x0 }, ++ { 0x121c0, 0x0 }, + { 0x1121c0, 0x0 }, + { 0x2121c0, 0x0 }, -+ { 0x122c0, 0x0 }, ++ { 0x122c0, 0x0 }, + { 0x1122c0, 0x0 }, + { 0x2122c0, 0x0 }, -+ { 0x123c0, 0x0 }, ++ { 0x123c0, 0x0 }, + { 0x1123c0, 0x0 }, + { 0x2123c0, 0x0 }, -+ { 0x124c0, 0x0 }, ++ { 0x124c0, 0x0 }, + { 0x1124c0, 0x0 }, + { 0x2124c0, 0x0 }, -+ { 0x125c0, 0x0 }, ++ { 0x125c0, 0x0 }, + { 0x1125c0, 0x0 }, + { 0x2125c0, 0x0 }, -+ { 0x126c0, 0x0 }, ++ { 0x126c0, 0x0 }, + { 0x1126c0, 0x0 }, + { 0x2126c0, 0x0 }, -+ { 0x127c0, 0x0 }, ++ { 0x127c0, 0x0 }, + { 0x1127c0, 0x0 }, + { 0x2127c0, 0x0 }, -+ { 0x128c0, 0x0 }, ++ { 0x128c0, 0x0 }, + { 0x1128c0, 0x0 }, + { 0x2128c0, 0x0 }, -+ { 0x130c0, 0x0 }, ++ { 0x130c0, 0x0 }, + { 0x1130c0, 0x0 }, + { 0x2130c0, 0x0 }, -+ { 0x131c0, 0x0 }, ++ { 0x131c0, 0x0 }, + { 0x1131c0, 0x0 }, + { 0x2131c0, 0x0 }, -+ { 0x132c0, 0x0 }, ++ { 0x132c0, 0x0 }, + { 0x1132c0, 0x0 }, + { 0x2132c0, 0x0 }, -+ { 0x133c0, 0x0 }, ++ { 0x133c0, 0x0 }, + { 0x1133c0, 0x0 }, + { 0x2133c0, 0x0 }, -+ { 0x134c0, 0x0 }, ++ { 0x134c0, 0x0 }, + { 0x1134c0, 0x0 }, + { 0x2134c0, 0x0 }, -+ { 0x135c0, 0x0 }, ++ { 0x135c0, 0x0 }, + { 0x1135c0, 0x0 }, + { 0x2135c0, 0x0 }, -+ { 0x136c0, 0x0 }, ++ { 0x136c0, 0x0 }, + { 0x1136c0, 0x0 }, + { 0x2136c0, 0x0 }, -+ { 0x137c0, 0x0 }, ++ { 0x137c0, 0x0 }, + { 0x1137c0, 0x0 }, + { 0x2137c0, 0x0 }, -+ { 0x138c0, 0x0 }, ++ { 0x138c0, 0x0 }, + { 0x1138c0, 0x0 }, + { 0x2138c0, 0x0 }, -+ { 0x100c1, 0x0 }, ++ { 0x100c1, 0x0 }, + { 0x1100c1, 0x0 }, + { 0x2100c1, 0x0 }, -+ { 0x101c1, 0x0 }, ++ { 0x101c1, 0x0 }, + { 0x1101c1, 0x0 }, + { 0x2101c1, 0x0 }, -+ { 0x102c1, 0x0 }, ++ { 0x102c1, 0x0 }, + { 0x1102c1, 0x0 }, + { 0x2102c1, 0x0 }, -+ { 0x103c1, 0x0 }, ++ { 0x103c1, 0x0 }, + { 0x1103c1, 0x0 }, + { 0x2103c1, 0x0 }, -+ { 0x104c1, 0x0 }, ++ { 0x104c1, 0x0 }, + { 0x1104c1, 0x0 }, + { 0x2104c1, 0x0 }, -+ { 0x105c1, 0x0 }, ++ { 0x105c1, 0x0 }, + { 0x1105c1, 0x0 }, + { 0x2105c1, 0x0 }, -+ { 0x106c1, 0x0 }, ++ { 0x106c1, 0x0 }, + { 0x1106c1, 0x0 }, + { 0x2106c1, 0x0 }, -+ { 0x107c1, 0x0 }, ++ { 0x107c1, 0x0 }, + { 0x1107c1, 0x0 }, + { 0x2107c1, 0x0 }, -+ { 0x108c1, 0x0 }, ++ { 0x108c1, 0x0 }, + { 0x1108c1, 0x0 }, + { 0x2108c1, 0x0 }, -+ { 0x110c1, 0x0 }, ++ { 0x110c1, 0x0 }, + { 0x1110c1, 0x0 }, + { 0x2110c1, 0x0 }, -+ { 0x111c1, 0x0 }, ++ { 0x111c1, 0x0 }, + { 0x1111c1, 0x0 }, + { 0x2111c1, 0x0 }, -+ { 0x112c1, 0x0 }, ++ { 0x112c1, 0x0 }, + { 0x1112c1, 0x0 }, + { 0x2112c1, 0x0 }, -+ { 0x113c1, 0x0 }, ++ { 0x113c1, 0x0 }, + { 0x1113c1, 0x0 }, + { 0x2113c1, 0x0 }, -+ { 0x114c1, 0x0 }, ++ { 0x114c1, 0x0 }, + { 0x1114c1, 0x0 }, + { 0x2114c1, 0x0 }, -+ { 0x115c1, 0x0 }, ++ { 0x115c1, 0x0 }, + { 0x1115c1, 0x0 }, + { 0x2115c1, 0x0 }, -+ { 0x116c1, 0x0 }, ++ { 0x116c1, 0x0 }, + { 0x1116c1, 0x0 }, + { 0x2116c1, 0x0 }, -+ { 0x117c1, 0x0 }, ++ { 0x117c1, 0x0 }, + { 0x1117c1, 0x0 }, + { 0x2117c1, 0x0 }, -+ { 0x118c1, 0x0 }, ++ { 0x118c1, 0x0 }, + { 0x1118c1, 0x0 }, + { 0x2118c1, 0x0 }, -+ { 0x120c1, 0x0 }, ++ { 0x120c1, 0x0 }, + { 0x1120c1, 0x0 }, + { 0x2120c1, 0x0 }, -+ { 0x121c1, 0x0 }, ++ { 0x121c1, 0x0 }, + { 0x1121c1, 0x0 }, + { 0x2121c1, 0x0 }, -+ { 0x122c1, 0x0 }, ++ { 0x122c1, 0x0 }, + { 0x1122c1, 0x0 }, + { 0x2122c1, 0x0 }, -+ { 0x123c1, 0x0 }, ++ { 0x123c1, 0x0 }, + { 0x1123c1, 0x0 }, + { 0x2123c1, 0x0 }, -+ { 0x124c1, 0x0 }, ++ { 0x124c1, 0x0 }, + { 0x1124c1, 0x0 }, + { 0x2124c1, 0x0 }, -+ { 0x125c1, 0x0 }, ++ { 0x125c1, 0x0 }, + { 0x1125c1, 0x0 }, + { 0x2125c1, 0x0 }, -+ { 0x126c1, 0x0 }, ++ { 0x126c1, 0x0 }, + { 0x1126c1, 0x0 }, + { 0x2126c1, 0x0 }, -+ { 0x127c1, 0x0 }, ++ { 0x127c1, 0x0 }, + { 0x1127c1, 0x0 }, + { 0x2127c1, 0x0 }, -+ { 0x128c1, 0x0 }, ++ { 0x128c1, 0x0 }, + { 0x1128c1, 0x0 }, + { 0x2128c1, 0x0 }, -+ { 0x130c1, 0x0 }, ++ { 0x130c1, 0x0 }, + { 0x1130c1, 0x0 }, + { 0x2130c1, 0x0 }, -+ { 0x131c1, 0x0 }, ++ { 0x131c1, 0x0 }, + { 0x1131c1, 0x0 }, + { 0x2131c1, 0x0 }, -+ { 0x132c1, 0x0 }, ++ { 0x132c1, 0x0 }, + { 0x1132c1, 0x0 }, + { 0x2132c1, 0x0 }, -+ { 0x133c1, 0x0 }, ++ { 0x133c1, 0x0 }, + { 0x1133c1, 0x0 }, + { 0x2133c1, 0x0 }, -+ { 0x134c1, 0x0 }, ++ { 0x134c1, 0x0 }, + { 0x1134c1, 0x0 }, + { 0x2134c1, 0x0 }, -+ { 0x135c1, 0x0 }, ++ { 0x135c1, 0x0 }, + { 0x1135c1, 0x0 }, + { 0x2135c1, 0x0 }, -+ { 0x136c1, 0x0 }, ++ { 0x136c1, 0x0 }, + { 0x1136c1, 0x0 }, + { 0x2136c1, 0x0 }, -+ { 0x137c1, 0x0 }, ++ { 0x137c1, 0x0 }, + { 0x1137c1, 0x0 }, + { 0x2137c1, 0x0 }, -+ { 0x138c1, 0x0 }, ++ { 0x138c1, 0x0 }, + { 0x1138c1, 0x0 }, + { 0x2138c1, 0x0 }, -+ { 0x10020, 0x0 }, ++ { 0x10020, 0x0 }, + { 0x110020, 0x0 }, + { 0x210020, 0x0 }, -+ { 0x11020, 0x0 }, ++ { 0x11020, 0x0 }, + { 0x111020, 0x0 }, + { 0x211020, 0x0 }, -+ { 0x12020, 0x0 }, ++ { 0x12020, 0x0 }, + { 0x112020, 0x0 }, + { 0x212020, 0x0 }, -+ { 0x13020, 0x0 }, ++ { 0x13020, 0x0 }, + { 0x113020, 0x0 }, + { 0x213020, 0x0 }, -+ { 0x20072, 0x0 }, -+ { 0x20073, 0x0 }, -+ { 0x20074, 0x0 }, -+ { 0x100aa, 0x0 }, -+ { 0x110aa, 0x0 }, -+ { 0x120aa, 0x0 }, -+ { 0x130aa, 0x0 }, -+ { 0x20010, 0x0 }, ++ { 0x20072, 0x0 }, ++ { 0x20073, 0x0 }, ++ { 0x20074, 0x0 }, ++ { 0x100aa, 0x0 }, ++ { 0x110aa, 0x0 }, ++ { 0x120aa, 0x0 }, ++ { 0x130aa, 0x0 }, ++ { 0x20010, 0x0 }, + { 0x120010, 0x0 }, + { 0x220010, 0x0 }, -+ { 0x20011, 0x0 }, ++ { 0x20011, 0x0 }, + { 0x120011, 0x0 }, + { 0x220011, 0x0 }, -+ { 0x100ae, 0x0 }, ++ { 0x100ae, 0x0 }, + { 0x1100ae, 0x0 }, + { 0x2100ae, 0x0 }, -+ { 0x100af, 0x0 }, ++ { 0x100af, 0x0 }, + { 0x1100af, 0x0 }, + { 0x2100af, 0x0 }, -+ { 0x110ae, 0x0 }, ++ { 0x110ae, 0x0 }, + { 0x1110ae, 0x0 }, + { 0x2110ae, 0x0 }, -+ { 0x110af, 0x0 }, ++ { 0x110af, 0x0 }, + { 0x1110af, 0x0 }, + { 0x2110af, 0x0 }, -+ { 0x120ae, 0x0 }, ++ { 0x120ae, 0x0 }, + { 0x1120ae, 0x0 }, + { 0x2120ae, 0x0 }, -+ { 0x120af, 0x0 }, ++ { 0x120af, 0x0 }, + { 0x1120af, 0x0 }, + { 0x2120af, 0x0 }, -+ { 0x130ae, 0x0 }, ++ { 0x130ae, 0x0 }, + { 0x1130ae, 0x0 }, + { 0x2130ae, 0x0 }, -+ { 0x130af, 0x0 }, ++ { 0x130af, 0x0 }, + { 0x1130af, 0x0 }, + { 0x2130af, 0x0 }, -+ { 0x20020, 0x0 }, ++ { 0x20020, 0x0 }, + { 0x120020, 0x0 }, + { 0x220020, 0x0 }, -+ { 0x100a0, 0x0 }, ++ { 0x100a0, 0x0 }, + { 0x100a1, 0x0 }, + { 0x100a2, 0x0 }, + { 0x100a3, 0x0 }, @@ -1322,57 +1259,57 @@ index 0000000000..54c3922de5 + { 0x130a1, 0x0 }, + { 0x130a2, 0x0 }, + { 0x130a3, 0x0 }, -+ { 0x130a4, 0x0 }, -+ { 0x130a5, 0x0 }, -+ { 0x130a6, 0x0 }, -+ { 0x130a7, 0x0 }, -+ { 0x2007c, 0x0 }, ++ { 0x130a4, 0x0 }, ++ { 0x130a5, 0x0 }, ++ { 0x130a6, 0x0 }, ++ { 0x130a7, 0x0 }, ++ { 0x2007c, 0x0 }, + { 0x12007c, 0x0 }, + { 0x22007c, 0x0 }, -+ { 0x2007d, 0x0 }, ++ { 0x2007d, 0x0 }, + { 0x12007d, 0x0 }, + { 0x22007d, 0x0 }, -+ { 0x400fd, 0x0 }, -+ { 0x400c0, 0x0 }, -+ { 0x90201, 0x0 }, ++ { 0x400fd, 0x0 }, ++ { 0x400c0, 0x0 }, ++ { 0x90201, 0x0 }, + { 0x190201, 0x0 }, + { 0x290201, 0x0 }, -+ { 0x90202, 0x0 }, ++ { 0x90202, 0x0 }, + { 0x190202, 0x0 }, + { 0x290202, 0x0 }, -+ { 0x90203, 0x0 }, ++ { 0x90203, 0x0 }, + { 0x190203, 0x0 }, + { 0x290203, 0x0 }, -+ { 0x90204, 0x0 }, ++ { 0x90204, 0x0 }, + { 0x190204, 0x0 }, + { 0x290204, 0x0 }, -+ { 0x90205, 0x0 }, ++ { 0x90205, 0x0 }, + { 0x190205, 0x0 }, + { 0x290205, 0x0 }, -+ { 0x90206, 0x0 }, ++ { 0x90206, 0x0 }, + { 0x190206, 0x0 }, + { 0x290206, 0x0 }, -+ { 0x90207, 0x0 }, ++ { 0x90207, 0x0 }, + { 0x190207, 0x0 }, + { 0x290207, 0x0 }, -+ { 0x90208, 0x0 }, ++ { 0x90208, 0x0 }, + { 0x190208, 0x0 }, + { 0x290208, 0x0 }, -+ { 0x10062, 0x0 }, -+ { 0x10162, 0x0 }, -+ { 0x10262, 0x0 }, -+ { 0x10362, 0x0 }, -+ { 0x10462, 0x0 }, -+ { 0x10562, 0x0 }, -+ { 0x10662, 0x0 }, -+ { 0x10762, 0x0 }, -+ { 0x10862, 0x0 }, -+ { 0x11062, 0x0 }, -+ { 0x11162, 0x0 }, -+ { 0x11262, 0x0 }, -+ { 0x11362, 0x0 }, -+ { 0x11462, 0x0 }, -+ { 0x11562, 0x0 }, ++ { 0x10062, 0x0 }, ++ { 0x10162, 0x0 }, ++ { 0x10262, 0x0 }, ++ { 0x10362, 0x0 }, ++ { 0x10462, 0x0 }, ++ { 0x10562, 0x0 }, ++ { 0x10662, 0x0 }, ++ { 0x10762, 0x0 }, ++ { 0x10862, 0x0 }, ++ { 0x11062, 0x0 }, ++ { 0x11162, 0x0 }, ++ { 0x11262, 0x0 }, ++ { 0x11362, 0x0 }, ++ { 0x11462, 0x0 }, ++ { 0x11562, 0x0 }, + { 0x11662, 0x0 }, + { 0x11762, 0x0 }, + { 0x11862, 0x0 }, @@ -2275,13 +2212,12 @@ index 0000000000..54c3922de5 + .ddrphy_pie_num = ARRAY_SIZE(ddr_phy_pie), + .fsp_table = { 3000, 400, 100, }, +}; -+ diff --git a/board/compulab/plat/imx8mm/ddr/lpddr4_timing_01061010.c b/board/compulab/plat/imx8mm/ddr/lpddr4_timing_01061010.c new file mode 100644 -index 0000000000..ef7085d909 +index 0000000000..5609f5dcde --- /dev/null +++ b/board/compulab/plat/imx8mm/ddr/lpddr4_timing_01061010.c -@@ -0,0 +1,1849 @@ +@@ -0,0 +1,1848 @@ +/* + * Copyright 2018 NXP + * @@ -2607,158 +2543,158 @@ index 0000000000..ef7085d909 + +/* ddr phy trained csr */ +static struct dram_cfg_param ddr_ddrphy_trained_csr[] = { -+ { 0x200b2, 0x0 }, ++ { 0x200b2, 0x0 }, + { 0x1200b2, 0x0 }, + { 0x2200b2, 0x0 }, -+ { 0x200cb, 0x0 }, -+ { 0x10043, 0x0 }, ++ { 0x200cb, 0x0 }, ++ { 0x10043, 0x0 }, + { 0x110043, 0x0 }, + { 0x210043, 0x0 }, -+ { 0x10143, 0x0 }, ++ { 0x10143, 0x0 }, + { 0x110143, 0x0 }, + { 0x210143, 0x0 }, -+ { 0x11043, 0x0 }, ++ { 0x11043, 0x0 }, + { 0x111043, 0x0 }, + { 0x211043, 0x0 }, -+ { 0x11143, 0x0 }, ++ { 0x11143, 0x0 }, + { 0x111143, 0x0 }, + { 0x211143, 0x0 }, -+ { 0x12043, 0x0 }, ++ { 0x12043, 0x0 }, + { 0x112043, 0x0 }, + { 0x212043, 0x0 }, -+ { 0x12143, 0x0 }, ++ { 0x12143, 0x0 }, + { 0x112143, 0x0 }, + { 0x212143, 0x0 }, -+ { 0x13043, 0x0 }, ++ { 0x13043, 0x0 }, + { 0x113043, 0x0 }, + { 0x213043, 0x0 }, -+ { 0x13143, 0x0 }, ++ { 0x13143, 0x0 }, + { 0x113143, 0x0 }, + { 0x213143, 0x0 }, -+ { 0x80, 0x0 }, ++ { 0x80, 0x0 }, + { 0x100080, 0x0 }, + { 0x200080, 0x0 }, -+ { 0x1080, 0x0 }, ++ { 0x1080, 0x0 }, + { 0x101080, 0x0 }, + { 0x201080, 0x0 }, -+ { 0x2080, 0x0 }, ++ { 0x2080, 0x0 }, + { 0x102080, 0x0 }, + { 0x202080, 0x0 }, -+ { 0x3080, 0x0 }, ++ { 0x3080, 0x0 }, + { 0x103080, 0x0 }, + { 0x203080, 0x0 }, -+ { 0x4080, 0x0 }, ++ { 0x4080, 0x0 }, + { 0x104080, 0x0 }, + { 0x204080, 0x0 }, -+ { 0x5080, 0x0 }, ++ { 0x5080, 0x0 }, + { 0x105080, 0x0 }, + { 0x205080, 0x0 }, -+ { 0x6080, 0x0 }, ++ { 0x6080, 0x0 }, + { 0x106080, 0x0 }, + { 0x206080, 0x0 }, -+ { 0x7080, 0x0 }, ++ { 0x7080, 0x0 }, + { 0x107080, 0x0 }, + { 0x207080, 0x0 }, -+ { 0x8080, 0x0 }, ++ { 0x8080, 0x0 }, + { 0x108080, 0x0 }, + { 0x208080, 0x0 }, -+ { 0x9080, 0x0 }, ++ { 0x9080, 0x0 }, + { 0x109080, 0x0 }, + { 0x209080, 0x0 }, -+ { 0x10080, 0x0 }, ++ { 0x10080, 0x0 }, + { 0x110080, 0x0 }, + { 0x210080, 0x0 }, -+ { 0x10180, 0x0 }, ++ { 0x10180, 0x0 }, + { 0x110180, 0x0 }, + { 0x210180, 0x0 }, -+ { 0x11080, 0x0 }, ++ { 0x11080, 0x0 }, + { 0x111080, 0x0 }, + { 0x211080, 0x0 }, -+ { 0x11180, 0x0 }, ++ { 0x11180, 0x0 }, + { 0x111180, 0x0 }, + { 0x211180, 0x0 }, -+ { 0x12080, 0x0 }, ++ { 0x12080, 0x0 }, + { 0x112080, 0x0 }, + { 0x212080, 0x0 }, -+ { 0x12180, 0x0 }, ++ { 0x12180, 0x0 }, + { 0x112180, 0x0 }, + { 0x212180, 0x0 }, -+ { 0x13080, 0x0 }, ++ { 0x13080, 0x0 }, + { 0x113080, 0x0 }, + { 0x213080, 0x0 }, -+ { 0x13180, 0x0 }, ++ { 0x13180, 0x0 }, + { 0x113180, 0x0 }, + { 0x213180, 0x0 }, -+ { 0x10081, 0x0 }, ++ { 0x10081, 0x0 }, + { 0x110081, 0x0 }, + { 0x210081, 0x0 }, -+ { 0x10181, 0x0 }, ++ { 0x10181, 0x0 }, + { 0x110181, 0x0 }, + { 0x210181, 0x0 }, -+ { 0x11081, 0x0 }, ++ { 0x11081, 0x0 }, + { 0x111081, 0x0 }, + { 0x211081, 0x0 }, -+ { 0x11181, 0x0 }, ++ { 0x11181, 0x0 }, + { 0x111181, 0x0 }, + { 0x211181, 0x0 }, -+ { 0x12081, 0x0 }, ++ { 0x12081, 0x0 }, + { 0x112081, 0x0 }, + { 0x212081, 0x0 }, -+ { 0x12181, 0x0 }, ++ { 0x12181, 0x0 }, + { 0x112181, 0x0 }, + { 0x212181, 0x0 }, -+ { 0x13081, 0x0 }, ++ { 0x13081, 0x0 }, + { 0x113081, 0x0 }, + { 0x213081, 0x0 }, -+ { 0x13181, 0x0 }, ++ { 0x13181, 0x0 }, + { 0x113181, 0x0 }, + { 0x213181, 0x0 }, -+ { 0x100d0, 0x0 }, ++ { 0x100d0, 0x0 }, + { 0x1100d0, 0x0 }, + { 0x2100d0, 0x0 }, -+ { 0x101d0, 0x0 }, ++ { 0x101d0, 0x0 }, + { 0x1101d0, 0x0 }, + { 0x2101d0, 0x0 }, -+ { 0x110d0, 0x0 }, ++ { 0x110d0, 0x0 }, + { 0x1110d0, 0x0 }, + { 0x2110d0, 0x0 }, -+ { 0x111d0, 0x0 }, ++ { 0x111d0, 0x0 }, + { 0x1111d0, 0x0 }, + { 0x2111d0, 0x0 }, -+ { 0x120d0, 0x0 }, ++ { 0x120d0, 0x0 }, + { 0x1120d0, 0x0 }, + { 0x2120d0, 0x0 }, -+ { 0x121d0, 0x0 }, ++ { 0x121d0, 0x0 }, + { 0x1121d0, 0x0 }, + { 0x2121d0, 0x0 }, -+ { 0x130d0, 0x0 }, ++ { 0x130d0, 0x0 }, + { 0x1130d0, 0x0 }, + { 0x2130d0, 0x0 }, -+ { 0x131d0, 0x0 }, ++ { 0x131d0, 0x0 }, + { 0x1131d0, 0x0 }, + { 0x2131d0, 0x0 }, -+ { 0x100d1, 0x0 }, ++ { 0x100d1, 0x0 }, + { 0x1100d1, 0x0 }, + { 0x2100d1, 0x0 }, -+ { 0x101d1, 0x0 }, ++ { 0x101d1, 0x0 }, + { 0x1101d1, 0x0 }, + { 0x2101d1, 0x0 }, -+ { 0x110d1, 0x0 }, ++ { 0x110d1, 0x0 }, + { 0x1110d1, 0x0 }, + { 0x2110d1, 0x0 }, -+ { 0x111d1, 0x0 }, ++ { 0x111d1, 0x0 }, + { 0x1111d1, 0x0 }, + { 0x2111d1, 0x0 }, -+ { 0x120d1, 0x0 }, ++ { 0x120d1, 0x0 }, + { 0x1120d1, 0x0 }, + { 0x2120d1, 0x0 }, -+ { 0x121d1, 0x0 }, ++ { 0x121d1, 0x0 }, + { 0x1121d1, 0x0 }, + { 0x2121d1, 0x0 }, -+ { 0x130d1, 0x0 }, ++ { 0x130d1, 0x0 }, + { 0x1130d1, 0x0 }, + { 0x2130d1, 0x0 }, -+ { 0x131d1, 0x0 }, ++ { 0x131d1, 0x0 }, + { 0x1131d1, 0x0 }, + { 0x2131d1, 0x0 }, + { 0x10068, 0x0 }, @@ -2836,320 +2772,320 @@ index 0000000000..ef7085d909 + { 0x1008c, 0x0 }, + { 0x11008c, 0x0 }, + { 0x21008c, 0x0 }, -+ { 0x1018c, 0x0 }, ++ { 0x1018c, 0x0 }, + { 0x11018c, 0x0 }, + { 0x21018c, 0x0 }, -+ { 0x1108c, 0x0 }, ++ { 0x1108c, 0x0 }, + { 0x11108c, 0x0 }, + { 0x21108c, 0x0 }, -+ { 0x1118c, 0x0 }, ++ { 0x1118c, 0x0 }, + { 0x11118c, 0x0 }, + { 0x21118c, 0x0 }, -+ { 0x1208c, 0x0 }, ++ { 0x1208c, 0x0 }, + { 0x11208c, 0x0 }, + { 0x21208c, 0x0 }, -+ { 0x1218c, 0x0 }, ++ { 0x1218c, 0x0 }, + { 0x11218c, 0x0 }, + { 0x21218c, 0x0 }, -+ { 0x1308c, 0x0 }, ++ { 0x1308c, 0x0 }, + { 0x11308c, 0x0 }, + { 0x21308c, 0x0 }, -+ { 0x1318c, 0x0 }, ++ { 0x1318c, 0x0 }, + { 0x11318c, 0x0 }, + { 0x21318c, 0x0 }, -+ { 0x1008d, 0x0 }, ++ { 0x1008d, 0x0 }, + { 0x11008d, 0x0 }, + { 0x21008d, 0x0 }, -+ { 0x1018d, 0x0 }, ++ { 0x1018d, 0x0 }, + { 0x11018d, 0x0 }, + { 0x21018d, 0x0 }, -+ { 0x1108d, 0x0 }, ++ { 0x1108d, 0x0 }, + { 0x11108d, 0x0 }, + { 0x21108d, 0x0 }, -+ { 0x1118d, 0x0 }, ++ { 0x1118d, 0x0 }, + { 0x11118d, 0x0 }, + { 0x21118d, 0x0 }, -+ { 0x1208d, 0x0 }, ++ { 0x1208d, 0x0 }, + { 0x11208d, 0x0 }, + { 0x21208d, 0x0 }, -+ { 0x1218d, 0x0 }, ++ { 0x1218d, 0x0 }, + { 0x11218d, 0x0 }, + { 0x21218d, 0x0 }, -+ { 0x1308d, 0x0 }, ++ { 0x1308d, 0x0 }, + { 0x11308d, 0x0 }, + { 0x21308d, 0x0 }, -+ { 0x1318d, 0x0 }, ++ { 0x1318d, 0x0 }, + { 0x11318d, 0x0 }, + { 0x21318d, 0x0 }, -+ { 0x100c0, 0x0 }, ++ { 0x100c0, 0x0 }, + { 0x1100c0, 0x0 }, + { 0x2100c0, 0x0 }, -+ { 0x101c0, 0x0 }, ++ { 0x101c0, 0x0 }, + { 0x1101c0, 0x0 }, + { 0x2101c0, 0x0 }, -+ { 0x102c0, 0x0 }, ++ { 0x102c0, 0x0 }, + { 0x1102c0, 0x0 }, + { 0x2102c0, 0x0 }, -+ { 0x103c0, 0x0 }, ++ { 0x103c0, 0x0 }, + { 0x1103c0, 0x0 }, + { 0x2103c0, 0x0 }, -+ { 0x104c0, 0x0 }, ++ { 0x104c0, 0x0 }, + { 0x1104c0, 0x0 }, + { 0x2104c0, 0x0 }, -+ { 0x105c0, 0x0 }, ++ { 0x105c0, 0x0 }, + { 0x1105c0, 0x0 }, + { 0x2105c0, 0x0 }, -+ { 0x106c0, 0x0 }, ++ { 0x106c0, 0x0 }, + { 0x1106c0, 0x0 }, + { 0x2106c0, 0x0 }, -+ { 0x107c0, 0x0 }, ++ { 0x107c0, 0x0 }, + { 0x1107c0, 0x0 }, + { 0x2107c0, 0x0 }, -+ { 0x108c0, 0x0 }, ++ { 0x108c0, 0x0 }, + { 0x1108c0, 0x0 }, + { 0x2108c0, 0x0 }, -+ { 0x110c0, 0x0 }, ++ { 0x110c0, 0x0 }, + { 0x1110c0, 0x0 }, + { 0x2110c0, 0x0 }, -+ { 0x111c0, 0x0 }, ++ { 0x111c0, 0x0 }, + { 0x1111c0, 0x0 }, + { 0x2111c0, 0x0 }, -+ { 0x112c0, 0x0 }, ++ { 0x112c0, 0x0 }, + { 0x1112c0, 0x0 }, + { 0x2112c0, 0x0 }, -+ { 0x113c0, 0x0 }, ++ { 0x113c0, 0x0 }, + { 0x1113c0, 0x0 }, + { 0x2113c0, 0x0 }, -+ { 0x114c0, 0x0 }, ++ { 0x114c0, 0x0 }, + { 0x1114c0, 0x0 }, + { 0x2114c0, 0x0 }, -+ { 0x115c0, 0x0 }, ++ { 0x115c0, 0x0 }, + { 0x1115c0, 0x0 }, + { 0x2115c0, 0x0 }, -+ { 0x116c0, 0x0 }, ++ { 0x116c0, 0x0 }, + { 0x1116c0, 0x0 }, + { 0x2116c0, 0x0 }, -+ { 0x117c0, 0x0 }, ++ { 0x117c0, 0x0 }, + { 0x1117c0, 0x0 }, + { 0x2117c0, 0x0 }, -+ { 0x118c0, 0x0 }, ++ { 0x118c0, 0x0 }, + { 0x1118c0, 0x0 }, + { 0x2118c0, 0x0 }, -+ { 0x120c0, 0x0 }, ++ { 0x120c0, 0x0 }, + { 0x1120c0, 0x0 }, + { 0x2120c0, 0x0 }, -+ { 0x121c0, 0x0 }, ++ { 0x121c0, 0x0 }, + { 0x1121c0, 0x0 }, + { 0x2121c0, 0x0 }, -+ { 0x122c0, 0x0 }, ++ { 0x122c0, 0x0 }, + { 0x1122c0, 0x0 }, + { 0x2122c0, 0x0 }, -+ { 0x123c0, 0x0 }, ++ { 0x123c0, 0x0 }, + { 0x1123c0, 0x0 }, + { 0x2123c0, 0x0 }, -+ { 0x124c0, 0x0 }, ++ { 0x124c0, 0x0 }, + { 0x1124c0, 0x0 }, + { 0x2124c0, 0x0 }, -+ { 0x125c0, 0x0 }, ++ { 0x125c0, 0x0 }, + { 0x1125c0, 0x0 }, + { 0x2125c0, 0x0 }, -+ { 0x126c0, 0x0 }, ++ { 0x126c0, 0x0 }, + { 0x1126c0, 0x0 }, + { 0x2126c0, 0x0 }, -+ { 0x127c0, 0x0 }, ++ { 0x127c0, 0x0 }, + { 0x1127c0, 0x0 }, + { 0x2127c0, 0x0 }, -+ { 0x128c0, 0x0 }, ++ { 0x128c0, 0x0 }, + { 0x1128c0, 0x0 }, + { 0x2128c0, 0x0 }, -+ { 0x130c0, 0x0 }, ++ { 0x130c0, 0x0 }, + { 0x1130c0, 0x0 }, + { 0x2130c0, 0x0 }, -+ { 0x131c0, 0x0 }, ++ { 0x131c0, 0x0 }, + { 0x1131c0, 0x0 }, + { 0x2131c0, 0x0 }, -+ { 0x132c0, 0x0 }, ++ { 0x132c0, 0x0 }, + { 0x1132c0, 0x0 }, + { 0x2132c0, 0x0 }, -+ { 0x133c0, 0x0 }, ++ { 0x133c0, 0x0 }, + { 0x1133c0, 0x0 }, + { 0x2133c0, 0x0 }, -+ { 0x134c0, 0x0 }, ++ { 0x134c0, 0x0 }, + { 0x1134c0, 0x0 }, + { 0x2134c0, 0x0 }, -+ { 0x135c0, 0x0 }, ++ { 0x135c0, 0x0 }, + { 0x1135c0, 0x0 }, + { 0x2135c0, 0x0 }, -+ { 0x136c0, 0x0 }, ++ { 0x136c0, 0x0 }, + { 0x1136c0, 0x0 }, + { 0x2136c0, 0x0 }, -+ { 0x137c0, 0x0 }, ++ { 0x137c0, 0x0 }, + { 0x1137c0, 0x0 }, + { 0x2137c0, 0x0 }, -+ { 0x138c0, 0x0 }, ++ { 0x138c0, 0x0 }, + { 0x1138c0, 0x0 }, + { 0x2138c0, 0x0 }, -+ { 0x100c1, 0x0 }, ++ { 0x100c1, 0x0 }, + { 0x1100c1, 0x0 }, + { 0x2100c1, 0x0 }, -+ { 0x101c1, 0x0 }, ++ { 0x101c1, 0x0 }, + { 0x1101c1, 0x0 }, + { 0x2101c1, 0x0 }, -+ { 0x102c1, 0x0 }, ++ { 0x102c1, 0x0 }, + { 0x1102c1, 0x0 }, + { 0x2102c1, 0x0 }, -+ { 0x103c1, 0x0 }, ++ { 0x103c1, 0x0 }, + { 0x1103c1, 0x0 }, + { 0x2103c1, 0x0 }, -+ { 0x104c1, 0x0 }, ++ { 0x104c1, 0x0 }, + { 0x1104c1, 0x0 }, + { 0x2104c1, 0x0 }, -+ { 0x105c1, 0x0 }, ++ { 0x105c1, 0x0 }, + { 0x1105c1, 0x0 }, + { 0x2105c1, 0x0 }, -+ { 0x106c1, 0x0 }, ++ { 0x106c1, 0x0 }, + { 0x1106c1, 0x0 }, + { 0x2106c1, 0x0 }, -+ { 0x107c1, 0x0 }, ++ { 0x107c1, 0x0 }, + { 0x1107c1, 0x0 }, + { 0x2107c1, 0x0 }, -+ { 0x108c1, 0x0 }, ++ { 0x108c1, 0x0 }, + { 0x1108c1, 0x0 }, + { 0x2108c1, 0x0 }, -+ { 0x110c1, 0x0 }, ++ { 0x110c1, 0x0 }, + { 0x1110c1, 0x0 }, + { 0x2110c1, 0x0 }, -+ { 0x111c1, 0x0 }, ++ { 0x111c1, 0x0 }, + { 0x1111c1, 0x0 }, + { 0x2111c1, 0x0 }, -+ { 0x112c1, 0x0 }, ++ { 0x112c1, 0x0 }, + { 0x1112c1, 0x0 }, + { 0x2112c1, 0x0 }, -+ { 0x113c1, 0x0 }, ++ { 0x113c1, 0x0 }, + { 0x1113c1, 0x0 }, + { 0x2113c1, 0x0 }, -+ { 0x114c1, 0x0 }, ++ { 0x114c1, 0x0 }, + { 0x1114c1, 0x0 }, + { 0x2114c1, 0x0 }, -+ { 0x115c1, 0x0 }, ++ { 0x115c1, 0x0 }, + { 0x1115c1, 0x0 }, + { 0x2115c1, 0x0 }, -+ { 0x116c1, 0x0 }, ++ { 0x116c1, 0x0 }, + { 0x1116c1, 0x0 }, + { 0x2116c1, 0x0 }, -+ { 0x117c1, 0x0 }, ++ { 0x117c1, 0x0 }, + { 0x1117c1, 0x0 }, + { 0x2117c1, 0x0 }, -+ { 0x118c1, 0x0 }, ++ { 0x118c1, 0x0 }, + { 0x1118c1, 0x0 }, + { 0x2118c1, 0x0 }, -+ { 0x120c1, 0x0 }, ++ { 0x120c1, 0x0 }, + { 0x1120c1, 0x0 }, + { 0x2120c1, 0x0 }, -+ { 0x121c1, 0x0 }, ++ { 0x121c1, 0x0 }, + { 0x1121c1, 0x0 }, + { 0x2121c1, 0x0 }, -+ { 0x122c1, 0x0 }, ++ { 0x122c1, 0x0 }, + { 0x1122c1, 0x0 }, + { 0x2122c1, 0x0 }, -+ { 0x123c1, 0x0 }, ++ { 0x123c1, 0x0 }, + { 0x1123c1, 0x0 }, + { 0x2123c1, 0x0 }, -+ { 0x124c1, 0x0 }, ++ { 0x124c1, 0x0 }, + { 0x1124c1, 0x0 }, + { 0x2124c1, 0x0 }, -+ { 0x125c1, 0x0 }, ++ { 0x125c1, 0x0 }, + { 0x1125c1, 0x0 }, + { 0x2125c1, 0x0 }, -+ { 0x126c1, 0x0 }, ++ { 0x126c1, 0x0 }, + { 0x1126c1, 0x0 }, + { 0x2126c1, 0x0 }, -+ { 0x127c1, 0x0 }, ++ { 0x127c1, 0x0 }, + { 0x1127c1, 0x0 }, + { 0x2127c1, 0x0 }, -+ { 0x128c1, 0x0 }, ++ { 0x128c1, 0x0 }, + { 0x1128c1, 0x0 }, + { 0x2128c1, 0x0 }, -+ { 0x130c1, 0x0 }, ++ { 0x130c1, 0x0 }, + { 0x1130c1, 0x0 }, + { 0x2130c1, 0x0 }, -+ { 0x131c1, 0x0 }, ++ { 0x131c1, 0x0 }, + { 0x1131c1, 0x0 }, + { 0x2131c1, 0x0 }, -+ { 0x132c1, 0x0 }, ++ { 0x132c1, 0x0 }, + { 0x1132c1, 0x0 }, + { 0x2132c1, 0x0 }, -+ { 0x133c1, 0x0 }, ++ { 0x133c1, 0x0 }, + { 0x1133c1, 0x0 }, + { 0x2133c1, 0x0 }, -+ { 0x134c1, 0x0 }, ++ { 0x134c1, 0x0 }, + { 0x1134c1, 0x0 }, + { 0x2134c1, 0x0 }, -+ { 0x135c1, 0x0 }, ++ { 0x135c1, 0x0 }, + { 0x1135c1, 0x0 }, + { 0x2135c1, 0x0 }, -+ { 0x136c1, 0x0 }, ++ { 0x136c1, 0x0 }, + { 0x1136c1, 0x0 }, + { 0x2136c1, 0x0 }, -+ { 0x137c1, 0x0 }, ++ { 0x137c1, 0x0 }, + { 0x1137c1, 0x0 }, + { 0x2137c1, 0x0 }, -+ { 0x138c1, 0x0 }, ++ { 0x138c1, 0x0 }, + { 0x1138c1, 0x0 }, + { 0x2138c1, 0x0 }, -+ { 0x10020, 0x0 }, ++ { 0x10020, 0x0 }, + { 0x110020, 0x0 }, + { 0x210020, 0x0 }, -+ { 0x11020, 0x0 }, ++ { 0x11020, 0x0 }, + { 0x111020, 0x0 }, + { 0x211020, 0x0 }, -+ { 0x12020, 0x0 }, ++ { 0x12020, 0x0 }, + { 0x112020, 0x0 }, + { 0x212020, 0x0 }, -+ { 0x13020, 0x0 }, ++ { 0x13020, 0x0 }, + { 0x113020, 0x0 }, + { 0x213020, 0x0 }, -+ { 0x20072, 0x0 }, -+ { 0x20073, 0x0 }, -+ { 0x20074, 0x0 }, -+ { 0x100aa, 0x0 }, -+ { 0x110aa, 0x0 }, -+ { 0x120aa, 0x0 }, -+ { 0x130aa, 0x0 }, -+ { 0x20010, 0x0 }, ++ { 0x20072, 0x0 }, ++ { 0x20073, 0x0 }, ++ { 0x20074, 0x0 }, ++ { 0x100aa, 0x0 }, ++ { 0x110aa, 0x0 }, ++ { 0x120aa, 0x0 }, ++ { 0x130aa, 0x0 }, ++ { 0x20010, 0x0 }, + { 0x120010, 0x0 }, + { 0x220010, 0x0 }, -+ { 0x20011, 0x0 }, ++ { 0x20011, 0x0 }, + { 0x120011, 0x0 }, + { 0x220011, 0x0 }, -+ { 0x100ae, 0x0 }, ++ { 0x100ae, 0x0 }, + { 0x1100ae, 0x0 }, + { 0x2100ae, 0x0 }, -+ { 0x100af, 0x0 }, ++ { 0x100af, 0x0 }, + { 0x1100af, 0x0 }, + { 0x2100af, 0x0 }, -+ { 0x110ae, 0x0 }, ++ { 0x110ae, 0x0 }, + { 0x1110ae, 0x0 }, + { 0x2110ae, 0x0 }, -+ { 0x110af, 0x0 }, ++ { 0x110af, 0x0 }, + { 0x1110af, 0x0 }, + { 0x2110af, 0x0 }, -+ { 0x120ae, 0x0 }, ++ { 0x120ae, 0x0 }, + { 0x1120ae, 0x0 }, + { 0x2120ae, 0x0 }, -+ { 0x120af, 0x0 }, ++ { 0x120af, 0x0 }, + { 0x1120af, 0x0 }, + { 0x2120af, 0x0 }, -+ { 0x130ae, 0x0 }, ++ { 0x130ae, 0x0 }, + { 0x1130ae, 0x0 }, + { 0x2130ae, 0x0 }, -+ { 0x130af, 0x0 }, ++ { 0x130af, 0x0 }, + { 0x1130af, 0x0 }, + { 0x2130af, 0x0 }, -+ { 0x20020, 0x0 }, ++ { 0x20020, 0x0 }, + { 0x120020, 0x0 }, + { 0x220020, 0x0 }, -+ { 0x100a0, 0x0 }, ++ { 0x100a0, 0x0 }, + { 0x100a1, 0x0 }, + { 0x100a2, 0x0 }, + { 0x100a3, 0x0 }, @@ -3177,57 +3113,57 @@ index 0000000000..ef7085d909 + { 0x130a1, 0x0 }, + { 0x130a2, 0x0 }, + { 0x130a3, 0x0 }, -+ { 0x130a4, 0x0 }, -+ { 0x130a5, 0x0 }, -+ { 0x130a6, 0x0 }, -+ { 0x130a7, 0x0 }, -+ { 0x2007c, 0x0 }, ++ { 0x130a4, 0x0 }, ++ { 0x130a5, 0x0 }, ++ { 0x130a6, 0x0 }, ++ { 0x130a7, 0x0 }, ++ { 0x2007c, 0x0 }, + { 0x12007c, 0x0 }, + { 0x22007c, 0x0 }, -+ { 0x2007d, 0x0 }, ++ { 0x2007d, 0x0 }, + { 0x12007d, 0x0 }, + { 0x22007d, 0x0 }, -+ { 0x400fd, 0x0 }, -+ { 0x400c0, 0x0 }, -+ { 0x90201, 0x0 }, ++ { 0x400fd, 0x0 }, ++ { 0x400c0, 0x0 }, ++ { 0x90201, 0x0 }, + { 0x190201, 0x0 }, + { 0x290201, 0x0 }, -+ { 0x90202, 0x0 }, ++ { 0x90202, 0x0 }, + { 0x190202, 0x0 }, + { 0x290202, 0x0 }, -+ { 0x90203, 0x0 }, ++ { 0x90203, 0x0 }, + { 0x190203, 0x0 }, + { 0x290203, 0x0 }, -+ { 0x90204, 0x0 }, ++ { 0x90204, 0x0 }, + { 0x190204, 0x0 }, + { 0x290204, 0x0 }, -+ { 0x90205, 0x0 }, ++ { 0x90205, 0x0 }, + { 0x190205, 0x0 }, + { 0x290205, 0x0 }, -+ { 0x90206, 0x0 }, ++ { 0x90206, 0x0 }, + { 0x190206, 0x0 }, + { 0x290206, 0x0 }, -+ { 0x90207, 0x0 }, ++ { 0x90207, 0x0 }, + { 0x190207, 0x0 }, + { 0x290207, 0x0 }, -+ { 0x90208, 0x0 }, ++ { 0x90208, 0x0 }, + { 0x190208, 0x0 }, + { 0x290208, 0x0 }, -+ { 0x10062, 0x0 }, -+ { 0x10162, 0x0 }, -+ { 0x10262, 0x0 }, -+ { 0x10362, 0x0 }, -+ { 0x10462, 0x0 }, -+ { 0x10562, 0x0 }, -+ { 0x10662, 0x0 }, -+ { 0x10762, 0x0 }, -+ { 0x10862, 0x0 }, -+ { 0x11062, 0x0 }, -+ { 0x11162, 0x0 }, -+ { 0x11262, 0x0 }, -+ { 0x11362, 0x0 }, -+ { 0x11462, 0x0 }, -+ { 0x11562, 0x0 }, ++ { 0x10062, 0x0 }, ++ { 0x10162, 0x0 }, ++ { 0x10262, 0x0 }, ++ { 0x10362, 0x0 }, ++ { 0x10462, 0x0 }, ++ { 0x10562, 0x0 }, ++ { 0x10662, 0x0 }, ++ { 0x10762, 0x0 }, ++ { 0x10862, 0x0 }, ++ { 0x11062, 0x0 }, ++ { 0x11162, 0x0 }, ++ { 0x11262, 0x0 }, ++ { 0x11362, 0x0 }, ++ { 0x11462, 0x0 }, ++ { 0x11562, 0x0 }, + { 0x11662, 0x0 }, + { 0x11762, 0x0 }, + { 0x11862, 0x0 }, @@ -4130,10 +4066,9 @@ index 0000000000..ef7085d909 + .ddrphy_pie_num = ARRAY_SIZE(ddr_phy_pie), + .fsp_table = { 3000, 400, 100, }, +}; -+ diff --git a/board/compulab/plat/imx8mm/ddr/lpddr4_timing_ff000110.c b/board/compulab/plat/imx8mm/ddr/lpddr4_timing_ff000110.c new file mode 100644 -index 0000000000..4401282800 +index 0000000000..a210a3e972 --- /dev/null +++ b/board/compulab/plat/imx8mm/ddr/lpddr4_timing_ff000110.c @@ -0,0 +1,1848 @@ @@ -4462,158 +4397,158 @@ index 0000000000..4401282800 + +/* ddr phy trained csr */ +static struct dram_cfg_param ddr_ddrphy_trained_csr[] = { -+ { 0x200b2, 0x0 }, ++ { 0x200b2, 0x0 }, + { 0x1200b2, 0x0 }, + { 0x2200b2, 0x0 }, -+ { 0x200cb, 0x0 }, -+ { 0x10043, 0x0 }, ++ { 0x200cb, 0x0 }, ++ { 0x10043, 0x0 }, + { 0x110043, 0x0 }, + { 0x210043, 0x0 }, -+ { 0x10143, 0x0 }, ++ { 0x10143, 0x0 }, + { 0x110143, 0x0 }, + { 0x210143, 0x0 }, -+ { 0x11043, 0x0 }, ++ { 0x11043, 0x0 }, + { 0x111043, 0x0 }, + { 0x211043, 0x0 }, -+ { 0x11143, 0x0 }, ++ { 0x11143, 0x0 }, + { 0x111143, 0x0 }, + { 0x211143, 0x0 }, -+ { 0x12043, 0x0 }, ++ { 0x12043, 0x0 }, + { 0x112043, 0x0 }, + { 0x212043, 0x0 }, -+ { 0x12143, 0x0 }, ++ { 0x12143, 0x0 }, + { 0x112143, 0x0 }, + { 0x212143, 0x0 }, -+ { 0x13043, 0x0 }, ++ { 0x13043, 0x0 }, + { 0x113043, 0x0 }, + { 0x213043, 0x0 }, -+ { 0x13143, 0x0 }, ++ { 0x13143, 0x0 }, + { 0x113143, 0x0 }, + { 0x213143, 0x0 }, -+ { 0x80, 0x0 }, ++ { 0x80, 0x0 }, + { 0x100080, 0x0 }, + { 0x200080, 0x0 }, -+ { 0x1080, 0x0 }, ++ { 0x1080, 0x0 }, + { 0x101080, 0x0 }, + { 0x201080, 0x0 }, -+ { 0x2080, 0x0 }, ++ { 0x2080, 0x0 }, + { 0x102080, 0x0 }, + { 0x202080, 0x0 }, -+ { 0x3080, 0x0 }, ++ { 0x3080, 0x0 }, + { 0x103080, 0x0 }, + { 0x203080, 0x0 }, -+ { 0x4080, 0x0 }, ++ { 0x4080, 0x0 }, + { 0x104080, 0x0 }, + { 0x204080, 0x0 }, -+ { 0x5080, 0x0 }, ++ { 0x5080, 0x0 }, + { 0x105080, 0x0 }, + { 0x205080, 0x0 }, -+ { 0x6080, 0x0 }, ++ { 0x6080, 0x0 }, + { 0x106080, 0x0 }, + { 0x206080, 0x0 }, -+ { 0x7080, 0x0 }, ++ { 0x7080, 0x0 }, + { 0x107080, 0x0 }, + { 0x207080, 0x0 }, -+ { 0x8080, 0x0 }, ++ { 0x8080, 0x0 }, + { 0x108080, 0x0 }, + { 0x208080, 0x0 }, -+ { 0x9080, 0x0 }, ++ { 0x9080, 0x0 }, + { 0x109080, 0x0 }, + { 0x209080, 0x0 }, -+ { 0x10080, 0x0 }, ++ { 0x10080, 0x0 }, + { 0x110080, 0x0 }, + { 0x210080, 0x0 }, -+ { 0x10180, 0x0 }, ++ { 0x10180, 0x0 }, + { 0x110180, 0x0 }, + { 0x210180, 0x0 }, -+ { 0x11080, 0x0 }, ++ { 0x11080, 0x0 }, + { 0x111080, 0x0 }, + { 0x211080, 0x0 }, -+ { 0x11180, 0x0 }, ++ { 0x11180, 0x0 }, + { 0x111180, 0x0 }, + { 0x211180, 0x0 }, -+ { 0x12080, 0x0 }, ++ { 0x12080, 0x0 }, + { 0x112080, 0x0 }, + { 0x212080, 0x0 }, -+ { 0x12180, 0x0 }, ++ { 0x12180, 0x0 }, + { 0x112180, 0x0 }, + { 0x212180, 0x0 }, -+ { 0x13080, 0x0 }, ++ { 0x13080, 0x0 }, + { 0x113080, 0x0 }, + { 0x213080, 0x0 }, -+ { 0x13180, 0x0 }, ++ { 0x13180, 0x0 }, + { 0x113180, 0x0 }, + { 0x213180, 0x0 }, -+ { 0x10081, 0x0 }, ++ { 0x10081, 0x0 }, + { 0x110081, 0x0 }, + { 0x210081, 0x0 }, -+ { 0x10181, 0x0 }, ++ { 0x10181, 0x0 }, + { 0x110181, 0x0 }, + { 0x210181, 0x0 }, -+ { 0x11081, 0x0 }, ++ { 0x11081, 0x0 }, + { 0x111081, 0x0 }, + { 0x211081, 0x0 }, -+ { 0x11181, 0x0 }, ++ { 0x11181, 0x0 }, + { 0x111181, 0x0 }, + { 0x211181, 0x0 }, -+ { 0x12081, 0x0 }, ++ { 0x12081, 0x0 }, + { 0x112081, 0x0 }, + { 0x212081, 0x0 }, -+ { 0x12181, 0x0 }, ++ { 0x12181, 0x0 }, + { 0x112181, 0x0 }, + { 0x212181, 0x0 }, -+ { 0x13081, 0x0 }, ++ { 0x13081, 0x0 }, + { 0x113081, 0x0 }, + { 0x213081, 0x0 }, -+ { 0x13181, 0x0 }, ++ { 0x13181, 0x0 }, + { 0x113181, 0x0 }, + { 0x213181, 0x0 }, -+ { 0x100d0, 0x0 }, ++ { 0x100d0, 0x0 }, + { 0x1100d0, 0x0 }, + { 0x2100d0, 0x0 }, -+ { 0x101d0, 0x0 }, ++ { 0x101d0, 0x0 }, + { 0x1101d0, 0x0 }, + { 0x2101d0, 0x0 }, -+ { 0x110d0, 0x0 }, ++ { 0x110d0, 0x0 }, + { 0x1110d0, 0x0 }, + { 0x2110d0, 0x0 }, -+ { 0x111d0, 0x0 }, ++ { 0x111d0, 0x0 }, + { 0x1111d0, 0x0 }, + { 0x2111d0, 0x0 }, -+ { 0x120d0, 0x0 }, ++ { 0x120d0, 0x0 }, + { 0x1120d0, 0x0 }, + { 0x2120d0, 0x0 }, -+ { 0x121d0, 0x0 }, ++ { 0x121d0, 0x0 }, + { 0x1121d0, 0x0 }, + { 0x2121d0, 0x0 }, -+ { 0x130d0, 0x0 }, ++ { 0x130d0, 0x0 }, + { 0x1130d0, 0x0 }, + { 0x2130d0, 0x0 }, -+ { 0x131d0, 0x0 }, ++ { 0x131d0, 0x0 }, + { 0x1131d0, 0x0 }, + { 0x2131d0, 0x0 }, -+ { 0x100d1, 0x0 }, ++ { 0x100d1, 0x0 }, + { 0x1100d1, 0x0 }, + { 0x2100d1, 0x0 }, -+ { 0x101d1, 0x0 }, ++ { 0x101d1, 0x0 }, + { 0x1101d1, 0x0 }, + { 0x2101d1, 0x0 }, -+ { 0x110d1, 0x0 }, ++ { 0x110d1, 0x0 }, + { 0x1110d1, 0x0 }, + { 0x2110d1, 0x0 }, -+ { 0x111d1, 0x0 }, ++ { 0x111d1, 0x0 }, + { 0x1111d1, 0x0 }, + { 0x2111d1, 0x0 }, -+ { 0x120d1, 0x0 }, ++ { 0x120d1, 0x0 }, + { 0x1120d1, 0x0 }, + { 0x2120d1, 0x0 }, -+ { 0x121d1, 0x0 }, ++ { 0x121d1, 0x0 }, + { 0x1121d1, 0x0 }, + { 0x2121d1, 0x0 }, -+ { 0x130d1, 0x0 }, ++ { 0x130d1, 0x0 }, + { 0x1130d1, 0x0 }, + { 0x2130d1, 0x0 }, -+ { 0x131d1, 0x0 }, ++ { 0x131d1, 0x0 }, + { 0x1131d1, 0x0 }, + { 0x2131d1, 0x0 }, + { 0x10068, 0x0 }, @@ -4691,320 +4626,320 @@ index 0000000000..4401282800 + { 0x1008c, 0x0 }, + { 0x11008c, 0x0 }, + { 0x21008c, 0x0 }, -+ { 0x1018c, 0x0 }, ++ { 0x1018c, 0x0 }, + { 0x11018c, 0x0 }, + { 0x21018c, 0x0 }, -+ { 0x1108c, 0x0 }, ++ { 0x1108c, 0x0 }, + { 0x11108c, 0x0 }, + { 0x21108c, 0x0 }, -+ { 0x1118c, 0x0 }, ++ { 0x1118c, 0x0 }, + { 0x11118c, 0x0 }, + { 0x21118c, 0x0 }, -+ { 0x1208c, 0x0 }, ++ { 0x1208c, 0x0 }, + { 0x11208c, 0x0 }, + { 0x21208c, 0x0 }, -+ { 0x1218c, 0x0 }, ++ { 0x1218c, 0x0 }, + { 0x11218c, 0x0 }, + { 0x21218c, 0x0 }, -+ { 0x1308c, 0x0 }, ++ { 0x1308c, 0x0 }, + { 0x11308c, 0x0 }, + { 0x21308c, 0x0 }, -+ { 0x1318c, 0x0 }, ++ { 0x1318c, 0x0 }, + { 0x11318c, 0x0 }, + { 0x21318c, 0x0 }, -+ { 0x1008d, 0x0 }, ++ { 0x1008d, 0x0 }, + { 0x11008d, 0x0 }, + { 0x21008d, 0x0 }, -+ { 0x1018d, 0x0 }, ++ { 0x1018d, 0x0 }, + { 0x11018d, 0x0 }, + { 0x21018d, 0x0 }, -+ { 0x1108d, 0x0 }, ++ { 0x1108d, 0x0 }, + { 0x11108d, 0x0 }, + { 0x21108d, 0x0 }, -+ { 0x1118d, 0x0 }, ++ { 0x1118d, 0x0 }, + { 0x11118d, 0x0 }, + { 0x21118d, 0x0 }, -+ { 0x1208d, 0x0 }, ++ { 0x1208d, 0x0 }, + { 0x11208d, 0x0 }, + { 0x21208d, 0x0 }, -+ { 0x1218d, 0x0 }, ++ { 0x1218d, 0x0 }, + { 0x11218d, 0x0 }, + { 0x21218d, 0x0 }, -+ { 0x1308d, 0x0 }, ++ { 0x1308d, 0x0 }, + { 0x11308d, 0x0 }, + { 0x21308d, 0x0 }, -+ { 0x1318d, 0x0 }, ++ { 0x1318d, 0x0 }, + { 0x11318d, 0x0 }, + { 0x21318d, 0x0 }, -+ { 0x100c0, 0x0 }, ++ { 0x100c0, 0x0 }, + { 0x1100c0, 0x0 }, + { 0x2100c0, 0x0 }, -+ { 0x101c0, 0x0 }, ++ { 0x101c0, 0x0 }, + { 0x1101c0, 0x0 }, + { 0x2101c0, 0x0 }, -+ { 0x102c0, 0x0 }, ++ { 0x102c0, 0x0 }, + { 0x1102c0, 0x0 }, + { 0x2102c0, 0x0 }, -+ { 0x103c0, 0x0 }, ++ { 0x103c0, 0x0 }, + { 0x1103c0, 0x0 }, + { 0x2103c0, 0x0 }, -+ { 0x104c0, 0x0 }, ++ { 0x104c0, 0x0 }, + { 0x1104c0, 0x0 }, + { 0x2104c0, 0x0 }, -+ { 0x105c0, 0x0 }, ++ { 0x105c0, 0x0 }, + { 0x1105c0, 0x0 }, + { 0x2105c0, 0x0 }, -+ { 0x106c0, 0x0 }, ++ { 0x106c0, 0x0 }, + { 0x1106c0, 0x0 }, + { 0x2106c0, 0x0 }, -+ { 0x107c0, 0x0 }, ++ { 0x107c0, 0x0 }, + { 0x1107c0, 0x0 }, + { 0x2107c0, 0x0 }, -+ { 0x108c0, 0x0 }, ++ { 0x108c0, 0x0 }, + { 0x1108c0, 0x0 }, + { 0x2108c0, 0x0 }, -+ { 0x110c0, 0x0 }, ++ { 0x110c0, 0x0 }, + { 0x1110c0, 0x0 }, + { 0x2110c0, 0x0 }, -+ { 0x111c0, 0x0 }, ++ { 0x111c0, 0x0 }, + { 0x1111c0, 0x0 }, + { 0x2111c0, 0x0 }, -+ { 0x112c0, 0x0 }, ++ { 0x112c0, 0x0 }, + { 0x1112c0, 0x0 }, + { 0x2112c0, 0x0 }, -+ { 0x113c0, 0x0 }, ++ { 0x113c0, 0x0 }, + { 0x1113c0, 0x0 }, + { 0x2113c0, 0x0 }, -+ { 0x114c0, 0x0 }, ++ { 0x114c0, 0x0 }, + { 0x1114c0, 0x0 }, + { 0x2114c0, 0x0 }, -+ { 0x115c0, 0x0 }, ++ { 0x115c0, 0x0 }, + { 0x1115c0, 0x0 }, + { 0x2115c0, 0x0 }, -+ { 0x116c0, 0x0 }, ++ { 0x116c0, 0x0 }, + { 0x1116c0, 0x0 }, + { 0x2116c0, 0x0 }, -+ { 0x117c0, 0x0 }, ++ { 0x117c0, 0x0 }, + { 0x1117c0, 0x0 }, + { 0x2117c0, 0x0 }, -+ { 0x118c0, 0x0 }, ++ { 0x118c0, 0x0 }, + { 0x1118c0, 0x0 }, + { 0x2118c0, 0x0 }, -+ { 0x120c0, 0x0 }, ++ { 0x120c0, 0x0 }, + { 0x1120c0, 0x0 }, + { 0x2120c0, 0x0 }, -+ { 0x121c0, 0x0 }, ++ { 0x121c0, 0x0 }, + { 0x1121c0, 0x0 }, + { 0x2121c0, 0x0 }, -+ { 0x122c0, 0x0 }, ++ { 0x122c0, 0x0 }, + { 0x1122c0, 0x0 }, + { 0x2122c0, 0x0 }, -+ { 0x123c0, 0x0 }, ++ { 0x123c0, 0x0 }, + { 0x1123c0, 0x0 }, + { 0x2123c0, 0x0 }, -+ { 0x124c0, 0x0 }, ++ { 0x124c0, 0x0 }, + { 0x1124c0, 0x0 }, + { 0x2124c0, 0x0 }, -+ { 0x125c0, 0x0 }, ++ { 0x125c0, 0x0 }, + { 0x1125c0, 0x0 }, + { 0x2125c0, 0x0 }, -+ { 0x126c0, 0x0 }, ++ { 0x126c0, 0x0 }, + { 0x1126c0, 0x0 }, + { 0x2126c0, 0x0 }, -+ { 0x127c0, 0x0 }, ++ { 0x127c0, 0x0 }, + { 0x1127c0, 0x0 }, + { 0x2127c0, 0x0 }, -+ { 0x128c0, 0x0 }, ++ { 0x128c0, 0x0 }, + { 0x1128c0, 0x0 }, + { 0x2128c0, 0x0 }, -+ { 0x130c0, 0x0 }, ++ { 0x130c0, 0x0 }, + { 0x1130c0, 0x0 }, + { 0x2130c0, 0x0 }, -+ { 0x131c0, 0x0 }, ++ { 0x131c0, 0x0 }, + { 0x1131c0, 0x0 }, + { 0x2131c0, 0x0 }, -+ { 0x132c0, 0x0 }, ++ { 0x132c0, 0x0 }, + { 0x1132c0, 0x0 }, + { 0x2132c0, 0x0 }, -+ { 0x133c0, 0x0 }, ++ { 0x133c0, 0x0 }, + { 0x1133c0, 0x0 }, + { 0x2133c0, 0x0 }, -+ { 0x134c0, 0x0 }, ++ { 0x134c0, 0x0 }, + { 0x1134c0, 0x0 }, + { 0x2134c0, 0x0 }, -+ { 0x135c0, 0x0 }, ++ { 0x135c0, 0x0 }, + { 0x1135c0, 0x0 }, + { 0x2135c0, 0x0 }, -+ { 0x136c0, 0x0 }, ++ { 0x136c0, 0x0 }, + { 0x1136c0, 0x0 }, + { 0x2136c0, 0x0 }, -+ { 0x137c0, 0x0 }, ++ { 0x137c0, 0x0 }, + { 0x1137c0, 0x0 }, + { 0x2137c0, 0x0 }, -+ { 0x138c0, 0x0 }, ++ { 0x138c0, 0x0 }, + { 0x1138c0, 0x0 }, + { 0x2138c0, 0x0 }, -+ { 0x100c1, 0x0 }, ++ { 0x100c1, 0x0 }, + { 0x1100c1, 0x0 }, + { 0x2100c1, 0x0 }, -+ { 0x101c1, 0x0 }, ++ { 0x101c1, 0x0 }, + { 0x1101c1, 0x0 }, + { 0x2101c1, 0x0 }, -+ { 0x102c1, 0x0 }, ++ { 0x102c1, 0x0 }, + { 0x1102c1, 0x0 }, + { 0x2102c1, 0x0 }, -+ { 0x103c1, 0x0 }, ++ { 0x103c1, 0x0 }, + { 0x1103c1, 0x0 }, + { 0x2103c1, 0x0 }, -+ { 0x104c1, 0x0 }, ++ { 0x104c1, 0x0 }, + { 0x1104c1, 0x0 }, + { 0x2104c1, 0x0 }, -+ { 0x105c1, 0x0 }, ++ { 0x105c1, 0x0 }, + { 0x1105c1, 0x0 }, + { 0x2105c1, 0x0 }, -+ { 0x106c1, 0x0 }, ++ { 0x106c1, 0x0 }, + { 0x1106c1, 0x0 }, + { 0x2106c1, 0x0 }, -+ { 0x107c1, 0x0 }, ++ { 0x107c1, 0x0 }, + { 0x1107c1, 0x0 }, + { 0x2107c1, 0x0 }, -+ { 0x108c1, 0x0 }, ++ { 0x108c1, 0x0 }, + { 0x1108c1, 0x0 }, + { 0x2108c1, 0x0 }, -+ { 0x110c1, 0x0 }, ++ { 0x110c1, 0x0 }, + { 0x1110c1, 0x0 }, + { 0x2110c1, 0x0 }, -+ { 0x111c1, 0x0 }, ++ { 0x111c1, 0x0 }, + { 0x1111c1, 0x0 }, + { 0x2111c1, 0x0 }, -+ { 0x112c1, 0x0 }, ++ { 0x112c1, 0x0 }, + { 0x1112c1, 0x0 }, + { 0x2112c1, 0x0 }, -+ { 0x113c1, 0x0 }, ++ { 0x113c1, 0x0 }, + { 0x1113c1, 0x0 }, + { 0x2113c1, 0x0 }, -+ { 0x114c1, 0x0 }, ++ { 0x114c1, 0x0 }, + { 0x1114c1, 0x0 }, + { 0x2114c1, 0x0 }, -+ { 0x115c1, 0x0 }, ++ { 0x115c1, 0x0 }, + { 0x1115c1, 0x0 }, + { 0x2115c1, 0x0 }, -+ { 0x116c1, 0x0 }, ++ { 0x116c1, 0x0 }, + { 0x1116c1, 0x0 }, + { 0x2116c1, 0x0 }, -+ { 0x117c1, 0x0 }, ++ { 0x117c1, 0x0 }, + { 0x1117c1, 0x0 }, + { 0x2117c1, 0x0 }, -+ { 0x118c1, 0x0 }, ++ { 0x118c1, 0x0 }, + { 0x1118c1, 0x0 }, + { 0x2118c1, 0x0 }, -+ { 0x120c1, 0x0 }, ++ { 0x120c1, 0x0 }, + { 0x1120c1, 0x0 }, + { 0x2120c1, 0x0 }, -+ { 0x121c1, 0x0 }, ++ { 0x121c1, 0x0 }, + { 0x1121c1, 0x0 }, + { 0x2121c1, 0x0 }, -+ { 0x122c1, 0x0 }, ++ { 0x122c1, 0x0 }, + { 0x1122c1, 0x0 }, + { 0x2122c1, 0x0 }, -+ { 0x123c1, 0x0 }, ++ { 0x123c1, 0x0 }, + { 0x1123c1, 0x0 }, + { 0x2123c1, 0x0 }, -+ { 0x124c1, 0x0 }, ++ { 0x124c1, 0x0 }, + { 0x1124c1, 0x0 }, + { 0x2124c1, 0x0 }, -+ { 0x125c1, 0x0 }, ++ { 0x125c1, 0x0 }, + { 0x1125c1, 0x0 }, + { 0x2125c1, 0x0 }, -+ { 0x126c1, 0x0 }, ++ { 0x126c1, 0x0 }, + { 0x1126c1, 0x0 }, + { 0x2126c1, 0x0 }, -+ { 0x127c1, 0x0 }, ++ { 0x127c1, 0x0 }, + { 0x1127c1, 0x0 }, + { 0x2127c1, 0x0 }, -+ { 0x128c1, 0x0 }, ++ { 0x128c1, 0x0 }, + { 0x1128c1, 0x0 }, + { 0x2128c1, 0x0 }, -+ { 0x130c1, 0x0 }, ++ { 0x130c1, 0x0 }, + { 0x1130c1, 0x0 }, + { 0x2130c1, 0x0 }, -+ { 0x131c1, 0x0 }, ++ { 0x131c1, 0x0 }, + { 0x1131c1, 0x0 }, + { 0x2131c1, 0x0 }, -+ { 0x132c1, 0x0 }, ++ { 0x132c1, 0x0 }, + { 0x1132c1, 0x0 }, + { 0x2132c1, 0x0 }, -+ { 0x133c1, 0x0 }, ++ { 0x133c1, 0x0 }, + { 0x1133c1, 0x0 }, + { 0x2133c1, 0x0 }, -+ { 0x134c1, 0x0 }, ++ { 0x134c1, 0x0 }, + { 0x1134c1, 0x0 }, + { 0x2134c1, 0x0 }, -+ { 0x135c1, 0x0 }, ++ { 0x135c1, 0x0 }, + { 0x1135c1, 0x0 }, + { 0x2135c1, 0x0 }, -+ { 0x136c1, 0x0 }, ++ { 0x136c1, 0x0 }, + { 0x1136c1, 0x0 }, + { 0x2136c1, 0x0 }, -+ { 0x137c1, 0x0 }, ++ { 0x137c1, 0x0 }, + { 0x1137c1, 0x0 }, + { 0x2137c1, 0x0 }, -+ { 0x138c1, 0x0 }, ++ { 0x138c1, 0x0 }, + { 0x1138c1, 0x0 }, + { 0x2138c1, 0x0 }, -+ { 0x10020, 0x0 }, ++ { 0x10020, 0x0 }, + { 0x110020, 0x0 }, + { 0x210020, 0x0 }, -+ { 0x11020, 0x0 }, ++ { 0x11020, 0x0 }, + { 0x111020, 0x0 }, + { 0x211020, 0x0 }, -+ { 0x12020, 0x0 }, ++ { 0x12020, 0x0 }, + { 0x112020, 0x0 }, + { 0x212020, 0x0 }, -+ { 0x13020, 0x0 }, ++ { 0x13020, 0x0 }, + { 0x113020, 0x0 }, + { 0x213020, 0x0 }, -+ { 0x20072, 0x0 }, -+ { 0x20073, 0x0 }, -+ { 0x20074, 0x0 }, -+ { 0x100aa, 0x0 }, -+ { 0x110aa, 0x0 }, -+ { 0x120aa, 0x0 }, -+ { 0x130aa, 0x0 }, -+ { 0x20010, 0x0 }, ++ { 0x20072, 0x0 }, ++ { 0x20073, 0x0 }, ++ { 0x20074, 0x0 }, ++ { 0x100aa, 0x0 }, ++ { 0x110aa, 0x0 }, ++ { 0x120aa, 0x0 }, ++ { 0x130aa, 0x0 }, ++ { 0x20010, 0x0 }, + { 0x120010, 0x0 }, + { 0x220010, 0x0 }, -+ { 0x20011, 0x0 }, ++ { 0x20011, 0x0 }, + { 0x120011, 0x0 }, + { 0x220011, 0x0 }, -+ { 0x100ae, 0x0 }, ++ { 0x100ae, 0x0 }, + { 0x1100ae, 0x0 }, + { 0x2100ae, 0x0 }, -+ { 0x100af, 0x0 }, ++ { 0x100af, 0x0 }, + { 0x1100af, 0x0 }, + { 0x2100af, 0x0 }, -+ { 0x110ae, 0x0 }, ++ { 0x110ae, 0x0 }, + { 0x1110ae, 0x0 }, + { 0x2110ae, 0x0 }, -+ { 0x110af, 0x0 }, ++ { 0x110af, 0x0 }, + { 0x1110af, 0x0 }, + { 0x2110af, 0x0 }, -+ { 0x120ae, 0x0 }, ++ { 0x120ae, 0x0 }, + { 0x1120ae, 0x0 }, + { 0x2120ae, 0x0 }, -+ { 0x120af, 0x0 }, ++ { 0x120af, 0x0 }, + { 0x1120af, 0x0 }, + { 0x2120af, 0x0 }, -+ { 0x130ae, 0x0 }, ++ { 0x130ae, 0x0 }, + { 0x1130ae, 0x0 }, + { 0x2130ae, 0x0 }, -+ { 0x130af, 0x0 }, ++ { 0x130af, 0x0 }, + { 0x1130af, 0x0 }, + { 0x2130af, 0x0 }, -+ { 0x20020, 0x0 }, ++ { 0x20020, 0x0 }, + { 0x120020, 0x0 }, + { 0x220020, 0x0 }, -+ { 0x100a0, 0x0 }, ++ { 0x100a0, 0x0 }, + { 0x100a1, 0x0 }, + { 0x100a2, 0x0 }, + { 0x100a3, 0x0 }, @@ -5032,57 +4967,57 @@ index 0000000000..4401282800 + { 0x130a1, 0x0 }, + { 0x130a2, 0x0 }, + { 0x130a3, 0x0 }, -+ { 0x130a4, 0x0 }, -+ { 0x130a5, 0x0 }, -+ { 0x130a6, 0x0 }, -+ { 0x130a7, 0x0 }, -+ { 0x2007c, 0x0 }, ++ { 0x130a4, 0x0 }, ++ { 0x130a5, 0x0 }, ++ { 0x130a6, 0x0 }, ++ { 0x130a7, 0x0 }, ++ { 0x2007c, 0x0 }, + { 0x12007c, 0x0 }, + { 0x22007c, 0x0 }, -+ { 0x2007d, 0x0 }, ++ { 0x2007d, 0x0 }, + { 0x12007d, 0x0 }, + { 0x22007d, 0x0 }, -+ { 0x400fd, 0x0 }, -+ { 0x400c0, 0x0 }, -+ { 0x90201, 0x0 }, ++ { 0x400fd, 0x0 }, ++ { 0x400c0, 0x0 }, ++ { 0x90201, 0x0 }, + { 0x190201, 0x0 }, + { 0x290201, 0x0 }, -+ { 0x90202, 0x0 }, ++ { 0x90202, 0x0 }, + { 0x190202, 0x0 }, + { 0x290202, 0x0 }, -+ { 0x90203, 0x0 }, ++ { 0x90203, 0x0 }, + { 0x190203, 0x0 }, + { 0x290203, 0x0 }, -+ { 0x90204, 0x0 }, ++ { 0x90204, 0x0 }, + { 0x190204, 0x0 }, + { 0x290204, 0x0 }, -+ { 0x90205, 0x0 }, ++ { 0x90205, 0x0 }, + { 0x190205, 0x0 }, + { 0x290205, 0x0 }, -+ { 0x90206, 0x0 }, ++ { 0x90206, 0x0 }, + { 0x190206, 0x0 }, + { 0x290206, 0x0 }, -+ { 0x90207, 0x0 }, ++ { 0x90207, 0x0 }, + { 0x190207, 0x0 }, + { 0x290207, 0x0 }, -+ { 0x90208, 0x0 }, ++ { 0x90208, 0x0 }, + { 0x190208, 0x0 }, + { 0x290208, 0x0 }, -+ { 0x10062, 0x0 }, -+ { 0x10162, 0x0 }, -+ { 0x10262, 0x0 }, -+ { 0x10362, 0x0 }, -+ { 0x10462, 0x0 }, -+ { 0x10562, 0x0 }, -+ { 0x10662, 0x0 }, -+ { 0x10762, 0x0 }, -+ { 0x10862, 0x0 }, -+ { 0x11062, 0x0 }, -+ { 0x11162, 0x0 }, -+ { 0x11262, 0x0 }, -+ { 0x11362, 0x0 }, -+ { 0x11462, 0x0 }, -+ { 0x11562, 0x0 }, ++ { 0x10062, 0x0 }, ++ { 0x10162, 0x0 }, ++ { 0x10262, 0x0 }, ++ { 0x10362, 0x0 }, ++ { 0x10462, 0x0 }, ++ { 0x10562, 0x0 }, ++ { 0x10662, 0x0 }, ++ { 0x10762, 0x0 }, ++ { 0x10862, 0x0 }, ++ { 0x11062, 0x0 }, ++ { 0x11162, 0x0 }, ++ { 0x11262, 0x0 }, ++ { 0x11362, 0x0 }, ++ { 0x11462, 0x0 }, ++ { 0x11562, 0x0 }, + { 0x11662, 0x0 }, + { 0x11762, 0x0 }, + { 0x11862, 0x0 }, @@ -5987,7 +5922,7 @@ index 0000000000..4401282800 +}; diff --git a/board/compulab/plat/imx8mm/ddr/lpddr4_timing_ff020008.c b/board/compulab/plat/imx8mm/ddr/lpddr4_timing_ff020008.c new file mode 100644 -index 0000000000..7473c96e8d +index 0000000000..d57d19d155 --- /dev/null +++ b/board/compulab/plat/imx8mm/ddr/lpddr4_timing_ff020008.c @@ -0,0 +1,1848 @@ @@ -6316,158 +6251,158 @@ index 0000000000..7473c96e8d + +/* ddr phy trained csr */ +static struct dram_cfg_param ddr_ddrphy_trained_csr[] = { -+ { 0x200b2, 0x0 }, ++ { 0x200b2, 0x0 }, + { 0x1200b2, 0x0 }, + { 0x2200b2, 0x0 }, -+ { 0x200cb, 0x0 }, -+ { 0x10043, 0x0 }, ++ { 0x200cb, 0x0 }, ++ { 0x10043, 0x0 }, + { 0x110043, 0x0 }, + { 0x210043, 0x0 }, -+ { 0x10143, 0x0 }, ++ { 0x10143, 0x0 }, + { 0x110143, 0x0 }, + { 0x210143, 0x0 }, -+ { 0x11043, 0x0 }, ++ { 0x11043, 0x0 }, + { 0x111043, 0x0 }, + { 0x211043, 0x0 }, -+ { 0x11143, 0x0 }, ++ { 0x11143, 0x0 }, + { 0x111143, 0x0 }, + { 0x211143, 0x0 }, -+ { 0x12043, 0x0 }, ++ { 0x12043, 0x0 }, + { 0x112043, 0x0 }, + { 0x212043, 0x0 }, -+ { 0x12143, 0x0 }, ++ { 0x12143, 0x0 }, + { 0x112143, 0x0 }, + { 0x212143, 0x0 }, -+ { 0x13043, 0x0 }, ++ { 0x13043, 0x0 }, + { 0x113043, 0x0 }, + { 0x213043, 0x0 }, -+ { 0x13143, 0x0 }, ++ { 0x13143, 0x0 }, + { 0x113143, 0x0 }, + { 0x213143, 0x0 }, -+ { 0x80, 0x0 }, ++ { 0x80, 0x0 }, + { 0x100080, 0x0 }, + { 0x200080, 0x0 }, -+ { 0x1080, 0x0 }, ++ { 0x1080, 0x0 }, + { 0x101080, 0x0 }, + { 0x201080, 0x0 }, -+ { 0x2080, 0x0 }, ++ { 0x2080, 0x0 }, + { 0x102080, 0x0 }, + { 0x202080, 0x0 }, -+ { 0x3080, 0x0 }, ++ { 0x3080, 0x0 }, + { 0x103080, 0x0 }, + { 0x203080, 0x0 }, -+ { 0x4080, 0x0 }, ++ { 0x4080, 0x0 }, + { 0x104080, 0x0 }, + { 0x204080, 0x0 }, -+ { 0x5080, 0x0 }, ++ { 0x5080, 0x0 }, + { 0x105080, 0x0 }, + { 0x205080, 0x0 }, -+ { 0x6080, 0x0 }, ++ { 0x6080, 0x0 }, + { 0x106080, 0x0 }, + { 0x206080, 0x0 }, -+ { 0x7080, 0x0 }, ++ { 0x7080, 0x0 }, + { 0x107080, 0x0 }, + { 0x207080, 0x0 }, -+ { 0x8080, 0x0 }, ++ { 0x8080, 0x0 }, + { 0x108080, 0x0 }, + { 0x208080, 0x0 }, -+ { 0x9080, 0x0 }, ++ { 0x9080, 0x0 }, + { 0x109080, 0x0 }, + { 0x209080, 0x0 }, -+ { 0x10080, 0x0 }, ++ { 0x10080, 0x0 }, + { 0x110080, 0x0 }, + { 0x210080, 0x0 }, -+ { 0x10180, 0x0 }, ++ { 0x10180, 0x0 }, + { 0x110180, 0x0 }, + { 0x210180, 0x0 }, -+ { 0x11080, 0x0 }, ++ { 0x11080, 0x0 }, + { 0x111080, 0x0 }, + { 0x211080, 0x0 }, -+ { 0x11180, 0x0 }, ++ { 0x11180, 0x0 }, + { 0x111180, 0x0 }, + { 0x211180, 0x0 }, -+ { 0x12080, 0x0 }, ++ { 0x12080, 0x0 }, + { 0x112080, 0x0 }, + { 0x212080, 0x0 }, -+ { 0x12180, 0x0 }, ++ { 0x12180, 0x0 }, + { 0x112180, 0x0 }, + { 0x212180, 0x0 }, -+ { 0x13080, 0x0 }, ++ { 0x13080, 0x0 }, + { 0x113080, 0x0 }, + { 0x213080, 0x0 }, -+ { 0x13180, 0x0 }, ++ { 0x13180, 0x0 }, + { 0x113180, 0x0 }, + { 0x213180, 0x0 }, -+ { 0x10081, 0x0 }, ++ { 0x10081, 0x0 }, + { 0x110081, 0x0 }, + { 0x210081, 0x0 }, -+ { 0x10181, 0x0 }, ++ { 0x10181, 0x0 }, + { 0x110181, 0x0 }, + { 0x210181, 0x0 }, -+ { 0x11081, 0x0 }, ++ { 0x11081, 0x0 }, + { 0x111081, 0x0 }, + { 0x211081, 0x0 }, -+ { 0x11181, 0x0 }, ++ { 0x11181, 0x0 }, + { 0x111181, 0x0 }, + { 0x211181, 0x0 }, -+ { 0x12081, 0x0 }, ++ { 0x12081, 0x0 }, + { 0x112081, 0x0 }, + { 0x212081, 0x0 }, -+ { 0x12181, 0x0 }, ++ { 0x12181, 0x0 }, + { 0x112181, 0x0 }, + { 0x212181, 0x0 }, -+ { 0x13081, 0x0 }, ++ { 0x13081, 0x0 }, + { 0x113081, 0x0 }, + { 0x213081, 0x0 }, -+ { 0x13181, 0x0 }, ++ { 0x13181, 0x0 }, + { 0x113181, 0x0 }, + { 0x213181, 0x0 }, -+ { 0x100d0, 0x0 }, ++ { 0x100d0, 0x0 }, + { 0x1100d0, 0x0 }, + { 0x2100d0, 0x0 }, -+ { 0x101d0, 0x0 }, ++ { 0x101d0, 0x0 }, + { 0x1101d0, 0x0 }, + { 0x2101d0, 0x0 }, -+ { 0x110d0, 0x0 }, ++ { 0x110d0, 0x0 }, + { 0x1110d0, 0x0 }, + { 0x2110d0, 0x0 }, -+ { 0x111d0, 0x0 }, ++ { 0x111d0, 0x0 }, + { 0x1111d0, 0x0 }, + { 0x2111d0, 0x0 }, -+ { 0x120d0, 0x0 }, ++ { 0x120d0, 0x0 }, + { 0x1120d0, 0x0 }, + { 0x2120d0, 0x0 }, -+ { 0x121d0, 0x0 }, ++ { 0x121d0, 0x0 }, + { 0x1121d0, 0x0 }, + { 0x2121d0, 0x0 }, -+ { 0x130d0, 0x0 }, ++ { 0x130d0, 0x0 }, + { 0x1130d0, 0x0 }, + { 0x2130d0, 0x0 }, -+ { 0x131d0, 0x0 }, ++ { 0x131d0, 0x0 }, + { 0x1131d0, 0x0 }, + { 0x2131d0, 0x0 }, -+ { 0x100d1, 0x0 }, ++ { 0x100d1, 0x0 }, + { 0x1100d1, 0x0 }, + { 0x2100d1, 0x0 }, -+ { 0x101d1, 0x0 }, ++ { 0x101d1, 0x0 }, + { 0x1101d1, 0x0 }, + { 0x2101d1, 0x0 }, -+ { 0x110d1, 0x0 }, ++ { 0x110d1, 0x0 }, + { 0x1110d1, 0x0 }, + { 0x2110d1, 0x0 }, -+ { 0x111d1, 0x0 }, ++ { 0x111d1, 0x0 }, + { 0x1111d1, 0x0 }, + { 0x2111d1, 0x0 }, -+ { 0x120d1, 0x0 }, ++ { 0x120d1, 0x0 }, + { 0x1120d1, 0x0 }, + { 0x2120d1, 0x0 }, -+ { 0x121d1, 0x0 }, ++ { 0x121d1, 0x0 }, + { 0x1121d1, 0x0 }, + { 0x2121d1, 0x0 }, -+ { 0x130d1, 0x0 }, ++ { 0x130d1, 0x0 }, + { 0x1130d1, 0x0 }, + { 0x2130d1, 0x0 }, -+ { 0x131d1, 0x0 }, ++ { 0x131d1, 0x0 }, + { 0x1131d1, 0x0 }, + { 0x2131d1, 0x0 }, + { 0x10068, 0x0 }, @@ -6545,320 +6480,320 @@ index 0000000000..7473c96e8d + { 0x1008c, 0x0 }, + { 0x11008c, 0x0 }, + { 0x21008c, 0x0 }, -+ { 0x1018c, 0x0 }, ++ { 0x1018c, 0x0 }, + { 0x11018c, 0x0 }, + { 0x21018c, 0x0 }, -+ { 0x1108c, 0x0 }, ++ { 0x1108c, 0x0 }, + { 0x11108c, 0x0 }, + { 0x21108c, 0x0 }, -+ { 0x1118c, 0x0 }, ++ { 0x1118c, 0x0 }, + { 0x11118c, 0x0 }, + { 0x21118c, 0x0 }, -+ { 0x1208c, 0x0 }, ++ { 0x1208c, 0x0 }, + { 0x11208c, 0x0 }, + { 0x21208c, 0x0 }, -+ { 0x1218c, 0x0 }, ++ { 0x1218c, 0x0 }, + { 0x11218c, 0x0 }, + { 0x21218c, 0x0 }, -+ { 0x1308c, 0x0 }, ++ { 0x1308c, 0x0 }, + { 0x11308c, 0x0 }, + { 0x21308c, 0x0 }, -+ { 0x1318c, 0x0 }, ++ { 0x1318c, 0x0 }, + { 0x11318c, 0x0 }, + { 0x21318c, 0x0 }, -+ { 0x1008d, 0x0 }, ++ { 0x1008d, 0x0 }, + { 0x11008d, 0x0 }, + { 0x21008d, 0x0 }, -+ { 0x1018d, 0x0 }, ++ { 0x1018d, 0x0 }, + { 0x11018d, 0x0 }, + { 0x21018d, 0x0 }, -+ { 0x1108d, 0x0 }, ++ { 0x1108d, 0x0 }, + { 0x11108d, 0x0 }, + { 0x21108d, 0x0 }, -+ { 0x1118d, 0x0 }, ++ { 0x1118d, 0x0 }, + { 0x11118d, 0x0 }, + { 0x21118d, 0x0 }, -+ { 0x1208d, 0x0 }, ++ { 0x1208d, 0x0 }, + { 0x11208d, 0x0 }, + { 0x21208d, 0x0 }, -+ { 0x1218d, 0x0 }, ++ { 0x1218d, 0x0 }, + { 0x11218d, 0x0 }, + { 0x21218d, 0x0 }, -+ { 0x1308d, 0x0 }, ++ { 0x1308d, 0x0 }, + { 0x11308d, 0x0 }, + { 0x21308d, 0x0 }, -+ { 0x1318d, 0x0 }, ++ { 0x1318d, 0x0 }, + { 0x11318d, 0x0 }, + { 0x21318d, 0x0 }, -+ { 0x100c0, 0x0 }, ++ { 0x100c0, 0x0 }, + { 0x1100c0, 0x0 }, + { 0x2100c0, 0x0 }, -+ { 0x101c0, 0x0 }, ++ { 0x101c0, 0x0 }, + { 0x1101c0, 0x0 }, + { 0x2101c0, 0x0 }, -+ { 0x102c0, 0x0 }, ++ { 0x102c0, 0x0 }, + { 0x1102c0, 0x0 }, + { 0x2102c0, 0x0 }, -+ { 0x103c0, 0x0 }, ++ { 0x103c0, 0x0 }, + { 0x1103c0, 0x0 }, + { 0x2103c0, 0x0 }, -+ { 0x104c0, 0x0 }, ++ { 0x104c0, 0x0 }, + { 0x1104c0, 0x0 }, + { 0x2104c0, 0x0 }, -+ { 0x105c0, 0x0 }, ++ { 0x105c0, 0x0 }, + { 0x1105c0, 0x0 }, + { 0x2105c0, 0x0 }, -+ { 0x106c0, 0x0 }, ++ { 0x106c0, 0x0 }, + { 0x1106c0, 0x0 }, + { 0x2106c0, 0x0 }, -+ { 0x107c0, 0x0 }, ++ { 0x107c0, 0x0 }, + { 0x1107c0, 0x0 }, + { 0x2107c0, 0x0 }, -+ { 0x108c0, 0x0 }, ++ { 0x108c0, 0x0 }, + { 0x1108c0, 0x0 }, + { 0x2108c0, 0x0 }, -+ { 0x110c0, 0x0 }, ++ { 0x110c0, 0x0 }, + { 0x1110c0, 0x0 }, + { 0x2110c0, 0x0 }, -+ { 0x111c0, 0x0 }, ++ { 0x111c0, 0x0 }, + { 0x1111c0, 0x0 }, + { 0x2111c0, 0x0 }, -+ { 0x112c0, 0x0 }, ++ { 0x112c0, 0x0 }, + { 0x1112c0, 0x0 }, + { 0x2112c0, 0x0 }, -+ { 0x113c0, 0x0 }, ++ { 0x113c0, 0x0 }, + { 0x1113c0, 0x0 }, + { 0x2113c0, 0x0 }, -+ { 0x114c0, 0x0 }, ++ { 0x114c0, 0x0 }, + { 0x1114c0, 0x0 }, + { 0x2114c0, 0x0 }, -+ { 0x115c0, 0x0 }, ++ { 0x115c0, 0x0 }, + { 0x1115c0, 0x0 }, + { 0x2115c0, 0x0 }, -+ { 0x116c0, 0x0 }, ++ { 0x116c0, 0x0 }, + { 0x1116c0, 0x0 }, + { 0x2116c0, 0x0 }, -+ { 0x117c0, 0x0 }, ++ { 0x117c0, 0x0 }, + { 0x1117c0, 0x0 }, + { 0x2117c0, 0x0 }, -+ { 0x118c0, 0x0 }, ++ { 0x118c0, 0x0 }, + { 0x1118c0, 0x0 }, + { 0x2118c0, 0x0 }, -+ { 0x120c0, 0x0 }, ++ { 0x120c0, 0x0 }, + { 0x1120c0, 0x0 }, + { 0x2120c0, 0x0 }, -+ { 0x121c0, 0x0 }, ++ { 0x121c0, 0x0 }, + { 0x1121c0, 0x0 }, + { 0x2121c0, 0x0 }, -+ { 0x122c0, 0x0 }, ++ { 0x122c0, 0x0 }, + { 0x1122c0, 0x0 }, + { 0x2122c0, 0x0 }, -+ { 0x123c0, 0x0 }, ++ { 0x123c0, 0x0 }, + { 0x1123c0, 0x0 }, + { 0x2123c0, 0x0 }, -+ { 0x124c0, 0x0 }, ++ { 0x124c0, 0x0 }, + { 0x1124c0, 0x0 }, + { 0x2124c0, 0x0 }, -+ { 0x125c0, 0x0 }, ++ { 0x125c0, 0x0 }, + { 0x1125c0, 0x0 }, + { 0x2125c0, 0x0 }, -+ { 0x126c0, 0x0 }, ++ { 0x126c0, 0x0 }, + { 0x1126c0, 0x0 }, + { 0x2126c0, 0x0 }, -+ { 0x127c0, 0x0 }, ++ { 0x127c0, 0x0 }, + { 0x1127c0, 0x0 }, + { 0x2127c0, 0x0 }, -+ { 0x128c0, 0x0 }, ++ { 0x128c0, 0x0 }, + { 0x1128c0, 0x0 }, + { 0x2128c0, 0x0 }, -+ { 0x130c0, 0x0 }, ++ { 0x130c0, 0x0 }, + { 0x1130c0, 0x0 }, + { 0x2130c0, 0x0 }, -+ { 0x131c0, 0x0 }, ++ { 0x131c0, 0x0 }, + { 0x1131c0, 0x0 }, + { 0x2131c0, 0x0 }, -+ { 0x132c0, 0x0 }, ++ { 0x132c0, 0x0 }, + { 0x1132c0, 0x0 }, + { 0x2132c0, 0x0 }, -+ { 0x133c0, 0x0 }, ++ { 0x133c0, 0x0 }, + { 0x1133c0, 0x0 }, + { 0x2133c0, 0x0 }, -+ { 0x134c0, 0x0 }, ++ { 0x134c0, 0x0 }, + { 0x1134c0, 0x0 }, + { 0x2134c0, 0x0 }, -+ { 0x135c0, 0x0 }, ++ { 0x135c0, 0x0 }, + { 0x1135c0, 0x0 }, + { 0x2135c0, 0x0 }, -+ { 0x136c0, 0x0 }, ++ { 0x136c0, 0x0 }, + { 0x1136c0, 0x0 }, + { 0x2136c0, 0x0 }, -+ { 0x137c0, 0x0 }, ++ { 0x137c0, 0x0 }, + { 0x1137c0, 0x0 }, + { 0x2137c0, 0x0 }, -+ { 0x138c0, 0x0 }, ++ { 0x138c0, 0x0 }, + { 0x1138c0, 0x0 }, + { 0x2138c0, 0x0 }, -+ { 0x100c1, 0x0 }, ++ { 0x100c1, 0x0 }, + { 0x1100c1, 0x0 }, + { 0x2100c1, 0x0 }, -+ { 0x101c1, 0x0 }, ++ { 0x101c1, 0x0 }, + { 0x1101c1, 0x0 }, + { 0x2101c1, 0x0 }, -+ { 0x102c1, 0x0 }, ++ { 0x102c1, 0x0 }, + { 0x1102c1, 0x0 }, + { 0x2102c1, 0x0 }, -+ { 0x103c1, 0x0 }, ++ { 0x103c1, 0x0 }, + { 0x1103c1, 0x0 }, + { 0x2103c1, 0x0 }, -+ { 0x104c1, 0x0 }, ++ { 0x104c1, 0x0 }, + { 0x1104c1, 0x0 }, + { 0x2104c1, 0x0 }, -+ { 0x105c1, 0x0 }, ++ { 0x105c1, 0x0 }, + { 0x1105c1, 0x0 }, + { 0x2105c1, 0x0 }, -+ { 0x106c1, 0x0 }, ++ { 0x106c1, 0x0 }, + { 0x1106c1, 0x0 }, + { 0x2106c1, 0x0 }, -+ { 0x107c1, 0x0 }, ++ { 0x107c1, 0x0 }, + { 0x1107c1, 0x0 }, + { 0x2107c1, 0x0 }, -+ { 0x108c1, 0x0 }, ++ { 0x108c1, 0x0 }, + { 0x1108c1, 0x0 }, + { 0x2108c1, 0x0 }, -+ { 0x110c1, 0x0 }, ++ { 0x110c1, 0x0 }, + { 0x1110c1, 0x0 }, + { 0x2110c1, 0x0 }, -+ { 0x111c1, 0x0 }, ++ { 0x111c1, 0x0 }, + { 0x1111c1, 0x0 }, + { 0x2111c1, 0x0 }, -+ { 0x112c1, 0x0 }, ++ { 0x112c1, 0x0 }, + { 0x1112c1, 0x0 }, + { 0x2112c1, 0x0 }, -+ { 0x113c1, 0x0 }, ++ { 0x113c1, 0x0 }, + { 0x1113c1, 0x0 }, + { 0x2113c1, 0x0 }, -+ { 0x114c1, 0x0 }, ++ { 0x114c1, 0x0 }, + { 0x1114c1, 0x0 }, + { 0x2114c1, 0x0 }, -+ { 0x115c1, 0x0 }, ++ { 0x115c1, 0x0 }, + { 0x1115c1, 0x0 }, + { 0x2115c1, 0x0 }, -+ { 0x116c1, 0x0 }, ++ { 0x116c1, 0x0 }, + { 0x1116c1, 0x0 }, + { 0x2116c1, 0x0 }, -+ { 0x117c1, 0x0 }, ++ { 0x117c1, 0x0 }, + { 0x1117c1, 0x0 }, + { 0x2117c1, 0x0 }, -+ { 0x118c1, 0x0 }, ++ { 0x118c1, 0x0 }, + { 0x1118c1, 0x0 }, + { 0x2118c1, 0x0 }, -+ { 0x120c1, 0x0 }, ++ { 0x120c1, 0x0 }, + { 0x1120c1, 0x0 }, + { 0x2120c1, 0x0 }, -+ { 0x121c1, 0x0 }, ++ { 0x121c1, 0x0 }, + { 0x1121c1, 0x0 }, + { 0x2121c1, 0x0 }, -+ { 0x122c1, 0x0 }, ++ { 0x122c1, 0x0 }, + { 0x1122c1, 0x0 }, + { 0x2122c1, 0x0 }, -+ { 0x123c1, 0x0 }, ++ { 0x123c1, 0x0 }, + { 0x1123c1, 0x0 }, + { 0x2123c1, 0x0 }, -+ { 0x124c1, 0x0 }, ++ { 0x124c1, 0x0 }, + { 0x1124c1, 0x0 }, + { 0x2124c1, 0x0 }, -+ { 0x125c1, 0x0 }, ++ { 0x125c1, 0x0 }, + { 0x1125c1, 0x0 }, + { 0x2125c1, 0x0 }, -+ { 0x126c1, 0x0 }, ++ { 0x126c1, 0x0 }, + { 0x1126c1, 0x0 }, + { 0x2126c1, 0x0 }, -+ { 0x127c1, 0x0 }, ++ { 0x127c1, 0x0 }, + { 0x1127c1, 0x0 }, + { 0x2127c1, 0x0 }, -+ { 0x128c1, 0x0 }, ++ { 0x128c1, 0x0 }, + { 0x1128c1, 0x0 }, + { 0x2128c1, 0x0 }, -+ { 0x130c1, 0x0 }, ++ { 0x130c1, 0x0 }, + { 0x1130c1, 0x0 }, + { 0x2130c1, 0x0 }, -+ { 0x131c1, 0x0 }, ++ { 0x131c1, 0x0 }, + { 0x1131c1, 0x0 }, + { 0x2131c1, 0x0 }, -+ { 0x132c1, 0x0 }, ++ { 0x132c1, 0x0 }, + { 0x1132c1, 0x0 }, + { 0x2132c1, 0x0 }, -+ { 0x133c1, 0x0 }, ++ { 0x133c1, 0x0 }, + { 0x1133c1, 0x0 }, + { 0x2133c1, 0x0 }, -+ { 0x134c1, 0x0 }, ++ { 0x134c1, 0x0 }, + { 0x1134c1, 0x0 }, + { 0x2134c1, 0x0 }, -+ { 0x135c1, 0x0 }, ++ { 0x135c1, 0x0 }, + { 0x1135c1, 0x0 }, + { 0x2135c1, 0x0 }, -+ { 0x136c1, 0x0 }, ++ { 0x136c1, 0x0 }, + { 0x1136c1, 0x0 }, + { 0x2136c1, 0x0 }, -+ { 0x137c1, 0x0 }, ++ { 0x137c1, 0x0 }, + { 0x1137c1, 0x0 }, + { 0x2137c1, 0x0 }, -+ { 0x138c1, 0x0 }, ++ { 0x138c1, 0x0 }, + { 0x1138c1, 0x0 }, + { 0x2138c1, 0x0 }, -+ { 0x10020, 0x0 }, ++ { 0x10020, 0x0 }, + { 0x110020, 0x0 }, + { 0x210020, 0x0 }, -+ { 0x11020, 0x0 }, ++ { 0x11020, 0x0 }, + { 0x111020, 0x0 }, + { 0x211020, 0x0 }, -+ { 0x12020, 0x0 }, ++ { 0x12020, 0x0 }, + { 0x112020, 0x0 }, + { 0x212020, 0x0 }, -+ { 0x13020, 0x0 }, ++ { 0x13020, 0x0 }, + { 0x113020, 0x0 }, + { 0x213020, 0x0 }, -+ { 0x20072, 0x0 }, -+ { 0x20073, 0x0 }, -+ { 0x20074, 0x0 }, -+ { 0x100aa, 0x0 }, -+ { 0x110aa, 0x0 }, -+ { 0x120aa, 0x0 }, -+ { 0x130aa, 0x0 }, -+ { 0x20010, 0x0 }, ++ { 0x20072, 0x0 }, ++ { 0x20073, 0x0 }, ++ { 0x20074, 0x0 }, ++ { 0x100aa, 0x0 }, ++ { 0x110aa, 0x0 }, ++ { 0x120aa, 0x0 }, ++ { 0x130aa, 0x0 }, ++ { 0x20010, 0x0 }, + { 0x120010, 0x0 }, + { 0x220010, 0x0 }, -+ { 0x20011, 0x0 }, ++ { 0x20011, 0x0 }, + { 0x120011, 0x0 }, + { 0x220011, 0x0 }, -+ { 0x100ae, 0x0 }, ++ { 0x100ae, 0x0 }, + { 0x1100ae, 0x0 }, + { 0x2100ae, 0x0 }, -+ { 0x100af, 0x0 }, ++ { 0x100af, 0x0 }, + { 0x1100af, 0x0 }, + { 0x2100af, 0x0 }, -+ { 0x110ae, 0x0 }, ++ { 0x110ae, 0x0 }, + { 0x1110ae, 0x0 }, + { 0x2110ae, 0x0 }, -+ { 0x110af, 0x0 }, ++ { 0x110af, 0x0 }, + { 0x1110af, 0x0 }, + { 0x2110af, 0x0 }, -+ { 0x120ae, 0x0 }, ++ { 0x120ae, 0x0 }, + { 0x1120ae, 0x0 }, + { 0x2120ae, 0x0 }, -+ { 0x120af, 0x0 }, ++ { 0x120af, 0x0 }, + { 0x1120af, 0x0 }, + { 0x2120af, 0x0 }, -+ { 0x130ae, 0x0 }, ++ { 0x130ae, 0x0 }, + { 0x1130ae, 0x0 }, + { 0x2130ae, 0x0 }, -+ { 0x130af, 0x0 }, ++ { 0x130af, 0x0 }, + { 0x1130af, 0x0 }, + { 0x2130af, 0x0 }, -+ { 0x20020, 0x0 }, ++ { 0x20020, 0x0 }, + { 0x120020, 0x0 }, + { 0x220020, 0x0 }, -+ { 0x100a0, 0x0 }, ++ { 0x100a0, 0x0 }, + { 0x100a1, 0x0 }, + { 0x100a2, 0x0 }, + { 0x100a3, 0x0 }, @@ -6886,57 +6821,57 @@ index 0000000000..7473c96e8d + { 0x130a1, 0x0 }, + { 0x130a2, 0x0 }, + { 0x130a3, 0x0 }, -+ { 0x130a4, 0x0 }, -+ { 0x130a5, 0x0 }, -+ { 0x130a6, 0x0 }, -+ { 0x130a7, 0x0 }, -+ { 0x2007c, 0x0 }, ++ { 0x130a4, 0x0 }, ++ { 0x130a5, 0x0 }, ++ { 0x130a6, 0x0 }, ++ { 0x130a7, 0x0 }, ++ { 0x2007c, 0x0 }, + { 0x12007c, 0x0 }, + { 0x22007c, 0x0 }, -+ { 0x2007d, 0x0 }, ++ { 0x2007d, 0x0 }, + { 0x12007d, 0x0 }, + { 0x22007d, 0x0 }, -+ { 0x400fd, 0x0 }, -+ { 0x400c0, 0x0 }, -+ { 0x90201, 0x0 }, ++ { 0x400fd, 0x0 }, ++ { 0x400c0, 0x0 }, ++ { 0x90201, 0x0 }, + { 0x190201, 0x0 }, + { 0x290201, 0x0 }, -+ { 0x90202, 0x0 }, ++ { 0x90202, 0x0 }, + { 0x190202, 0x0 }, + { 0x290202, 0x0 }, -+ { 0x90203, 0x0 }, ++ { 0x90203, 0x0 }, + { 0x190203, 0x0 }, + { 0x290203, 0x0 }, -+ { 0x90204, 0x0 }, ++ { 0x90204, 0x0 }, + { 0x190204, 0x0 }, + { 0x290204, 0x0 }, -+ { 0x90205, 0x0 }, ++ { 0x90205, 0x0 }, + { 0x190205, 0x0 }, + { 0x290205, 0x0 }, -+ { 0x90206, 0x0 }, ++ { 0x90206, 0x0 }, + { 0x190206, 0x0 }, + { 0x290206, 0x0 }, -+ { 0x90207, 0x0 }, ++ { 0x90207, 0x0 }, + { 0x190207, 0x0 }, + { 0x290207, 0x0 }, -+ { 0x90208, 0x0 }, ++ { 0x90208, 0x0 }, + { 0x190208, 0x0 }, + { 0x290208, 0x0 }, -+ { 0x10062, 0x0 }, -+ { 0x10162, 0x0 }, -+ { 0x10262, 0x0 }, -+ { 0x10362, 0x0 }, -+ { 0x10462, 0x0 }, -+ { 0x10562, 0x0 }, -+ { 0x10662, 0x0 }, -+ { 0x10762, 0x0 }, -+ { 0x10862, 0x0 }, -+ { 0x11062, 0x0 }, -+ { 0x11162, 0x0 }, -+ { 0x11262, 0x0 }, -+ { 0x11362, 0x0 }, -+ { 0x11462, 0x0 }, -+ { 0x11562, 0x0 }, ++ { 0x10062, 0x0 }, ++ { 0x10162, 0x0 }, ++ { 0x10262, 0x0 }, ++ { 0x10362, 0x0 }, ++ { 0x10462, 0x0 }, ++ { 0x10562, 0x0 }, ++ { 0x10662, 0x0 }, ++ { 0x10762, 0x0 }, ++ { 0x10862, 0x0 }, ++ { 0x11062, 0x0 }, ++ { 0x11162, 0x0 }, ++ { 0x11262, 0x0 }, ++ { 0x11362, 0x0 }, ++ { 0x11462, 0x0 }, ++ { 0x11562, 0x0 }, + { 0x11662, 0x0 }, + { 0x11762, 0x0 }, + { 0x11862, 0x0 }, @@ -7841,16 +7776,15 @@ index 0000000000..7473c96e8d +}; diff --git a/board/compulab/plat/imx8mm/eeprom/Makefile b/board/compulab/plat/imx8mm/eeprom/Makefile new file mode 100644 -index 0000000000..6e61b4a414 +index 0000000000..9ec4d29dc1 --- /dev/null +++ b/board/compulab/plat/imx8mm/eeprom/Makefile -@@ -0,0 +1,6 @@ +@@ -0,0 +1,5 @@ +ifdef CONFIG_SPL_BUILD +obj-y += eeprom_spl.o +else +obj-y += eeprom.o +endif -+ diff --git a/board/compulab/plat/imx8mm/eeprom/eeprom.c b/board/compulab/plat/imx8mm/eeprom/eeprom.c new file mode 100644 index 0000000000..fd1fa49e21 @@ -8239,7 +8173,7 @@ index 0000000000..09a04fda92 + return board_osize; +}; diff --git a/board/compulab/ucm-imx8m-mini/Kconfig b/board/compulab/ucm-imx8m-mini/Kconfig -index e6b334134f..d687db7686 100644 +index e6b334134f..d93df9063c 100644 --- a/board/compulab/ucm-imx8m-mini/Kconfig +++ b/board/compulab/ucm-imx8m-mini/Kconfig @@ -10,24 +10,25 @@ config SYS_CONFIG_NAME @@ -8270,8 +8204,7 @@ index e6b334134f..d687db7686 100644 +config RAM_2G + bool "RAM_2G" help -- imx8mm_val board configuration approach -+ This option configures 2G RAM only + imx8mm_val board configuration approach -endchoice +config RAM_4G @@ -11906,14 +11839,13 @@ index dfd68ea9d8..0000000000 - .ddrphy_pie_num = ARRAY_SIZE(lpddr4_phy_pie), -}; diff --git a/board/compulab/ucm-imx8m-mini/spl.c b/board/compulab/ucm-imx8m-mini/spl.c -index 833183597a..aed967cce0 100644 +index 833183597a..61ac039ff3 100644 --- a/board/compulab/ucm-imx8m-mini/spl.c +++ b/board/compulab/ucm-imx8m-mini/spl.c -@@ -19,26 +19,12 @@ - #include +@@ -20,25 +20,12 @@ #include #include -- + -#ifdef CONFIG_UCM_IMX8M_LPDDR4 #include -static void __dram_init(void) { @@ -12150,5 +12082,5 @@ index 8b55fd61e9..7bbd0e73f9 100644 #define CONFIG_BAUDRATE 115200 -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0025-dts-Enable-USB-OTG-support.patch b/recipes-bsp/u-boot/compulab/imx8mm/0025-dts-Enable-USB-OTG-support.patch index aeec469..c19640b 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0025-dts-Enable-USB-OTG-support.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0025-dts-Enable-USB-OTG-support.patch @@ -1,7 +1,7 @@ -From d4ff862d15542ac90847b63ac784dd2bc19c5e09 Mon Sep 17 00:00:00 2001 +From f6f8bfbfaa80842b1ecd7d1b3ce44b6404034468 Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Sat, 31 Aug 2019 20:18:05 +0300 -Subject: [PATCH 25/91] dts: Enable USB OTG support +Subject: [PATCH 025/126] dts: Enable USB OTG support Enable USB OTG support, necessary for USB load and UMS. @@ -25,5 +25,5 @@ index 6e59d1101c..c93cf1ac7a 100644 &usbotg2 { -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0026-env-Change-boot-sequence.patch b/recipes-bsp/u-boot/compulab/imx8mm/0026-env-Change-boot-sequence.patch index badebf9..f676d12 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0026-env-Change-boot-sequence.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0026-env-Change-boot-sequence.patch @@ -1,7 +1,7 @@ -From 17c8e369aaf449e624c40eda88e184856c5e3875 Mon Sep 17 00:00:00 2001 +From 56cc0e465092c676b1f5d1401454bad06e316277 Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Sat, 31 Aug 2019 20:20:34 +0300 -Subject: [PATCH 26/91] env: Change boot sequence +Subject: [PATCH 026/126] env: Change boot sequence Boot commands have been refactored to make them uniform and simplify a boot sequence edition. @@ -12,7 +12,7 @@ if not, a pair of files Image + default DTB. Signed-off-by: Kirill Kapranov --- - include/configs/ucm-imx8m-mini.h | 55 ++++++++++++++++---------------- + include/configs/ucm-imx8m-mini.h | 55 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/include/configs/ucm-imx8m-mini.h b/include/configs/ucm-imx8m-mini.h @@ -99,5 +99,5 @@ index 7bbd0e73f9..e9e3b2cb1c 100644 /* Link Definitions */ #define CONFIG_LOADADDR 0x40480000 -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0027-Enable-usb-ethernet-dongle-asix-88179.patch b/recipes-bsp/u-boot/compulab/imx8mm/0027-Enable-usb-ethernet-dongle-asix-88179.patch index 215f26f..db50085 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0027-Enable-usb-ethernet-dongle-asix-88179.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0027-Enable-usb-ethernet-dongle-asix-88179.patch @@ -1,7 +1,7 @@ -From bdcd65e611083d56423826a4e4e0e99722cbffee Mon Sep 17 00:00:00 2001 +From b366281614785327ce65a2d0b000c2d187198b66 Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Tue, 10 Sep 2019 20:49:44 +0300 -Subject: [PATCH 27/91] Enable usb ethernet dongle asix-88179 +Subject: [PATCH 027/126] Enable usb ethernet dongle asix-88179 Enable the dongle. In order to use it issue: usb start @@ -26,5 +26,5 @@ index 8dbf544e86..3d750f7fe1 100644 CONFIG_PINCTRL_IMX8M=y CONFIG_DM_REGULATOR=y -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0028-ucm-ims8m-mini-dts-wp-enable.patch b/recipes-bsp/u-boot/compulab/imx8mm/0028-ucm-ims8m-mini-dts-wp-enable.patch index 751b3f3..333e599 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0028-ucm-ims8m-mini-dts-wp-enable.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0028-ucm-ims8m-mini-dts-wp-enable.patch @@ -1,7 +1,7 @@ -From 4b0fb07d9a1a69d4e47426aef870880128ba0ad4 Mon Sep 17 00:00:00 2001 +From 59f78def6097a2a24793ae3f92aae9bdc88af39b Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Wed, 1 Apr 2020 14:52:21 +0300 -Subject: [PATCH 28/91] ucm-ims8m-mini: dts: wp enable +Subject: [PATCH 028/126] ucm-ims8m-mini: dts: wp enable Write protection enables for uSD card (the device usdhc2). @@ -31,5 +31,5 @@ index c93cf1ac7a..3d8be3a09a 100644 vmmc-supply = <®_usdhc2_vmmc>; status = "okay"; -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0029-SPL-Enable-bus-I2C2.patch b/recipes-bsp/u-boot/compulab/imx8mm/0029-SPL-Enable-bus-I2C2.patch index af37d1d..1dc4dbd 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0029-SPL-Enable-bus-I2C2.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0029-SPL-Enable-bus-I2C2.patch @@ -1,7 +1,7 @@ -From 57d7bed9f9a28495b776238d200040708b8b6f21 Mon Sep 17 00:00:00 2001 +From 84e74f109aab8f75430d60e67acbc10a3f95988b Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Sun, 5 Apr 2020 17:19:21 +0300 -Subject: [PATCH 29/91] SPL: Enable bus I2C2 +Subject: [PATCH 029/126] SPL: Enable bus I2C2 Enable the bus i2c1 (I2C2 in a schematic drawing) on SPL stage. @@ -66,5 +66,5 @@ index e9e3b2cb1c..2400afe7ab 100644 #define CONFIG_CMD_READ #define CONFIG_SERIAL_TAG -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0030-SPL-Adjust-voltage-for-correct-DDR-initialisation.patch b/recipes-bsp/u-boot/compulab/imx8mm/0030-SPL-Adjust-voltage-for-correct-DDR-initialisation.patch index 7787db7..f73c09b 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0030-SPL-Adjust-voltage-for-correct-DDR-initialisation.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0030-SPL-Adjust-voltage-for-correct-DDR-initialisation.patch @@ -1,7 +1,7 @@ -From f64251dfd83b627c24e1de2d74ecfcf2a4db206c Mon Sep 17 00:00:00 2001 +From 584687f751c256836235d5b4321dbf2f427af6b3 Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Sun, 5 Apr 2020 17:36:34 +0300 -Subject: [PATCH 30/91] SPL: Adjust voltage for correct DDR initialisation +Subject: [PATCH 030/126] SPL: Adjust voltage for correct DDR initialisation The voltage values, that PMIC BD71847 produces, differ from required and need to be adjusted before a memory training procedure. @@ -15,10 +15,10 @@ Signed-off-by: Kirill Kapranov 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/board/compulab/ucm-imx8m-mini/spl.c b/board/compulab/ucm-imx8m-mini/spl.c -index aed967cce0..febd27c93e 100644 +index 61ac039ff3..2231cc1f6f 100644 --- a/board/compulab/ucm-imx8m-mini/spl.c +++ b/board/compulab/ucm-imx8m-mini/spl.c -@@ -174,8 +174,14 @@ int power_init_board(void) +@@ -175,8 +175,14 @@ int power_init_board(void) /* unlock the PMIC regs */ pmic_reg_write(p, BD71837_REGLOCK, 0x1); @@ -36,5 +36,5 @@ index aed967cce0..febd27c93e 100644 /* lock the PMIC regs */ pmic_reg_write(p, BD71837_REGLOCK, 0x11); -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0031-Enable-env-import-export-commands.patch b/recipes-bsp/u-boot/compulab/imx8mm/0031-Enable-env-import-export-commands.patch index 5f4f252..3f4b93e 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0031-Enable-env-import-export-commands.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0031-Enable-env-import-export-commands.patch @@ -1,7 +1,7 @@ -From a31a3902562fcc8b38183bd6ccd25cd9d333e0fb Mon Sep 17 00:00:00 2001 +From bf2f4b36ada27bf72a642f2e55ac39d5cfd9edaa Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Fri, 17 Apr 2020 20:38:46 +0300 -Subject: [PATCH 31/91] Enable env import/export commands +Subject: [PATCH 031/126] Enable env import/export commands Signed-off-by: Kirill Kapranov --- @@ -22,5 +22,5 @@ index 2400afe7ab..dfd7d9980f 100644 #undef CONFIG_CMD_CRC32 -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0032-env-Add-env_mmcdev-variable-handling.patch b/recipes-bsp/u-boot/compulab/imx8mm/0032-env-Add-env_mmcdev-variable-handling.patch index e1f3926..48f8152 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0032-env-Add-env_mmcdev-variable-handling.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0032-env-Add-env_mmcdev-variable-handling.patch @@ -1,7 +1,7 @@ -From d5e945141af4b6656d741caa0c3a7840b3c7204f Mon Sep 17 00:00:00 2001 +From 486ddc5f04efb9755d8b8ea07b9067ff35b21ed3 Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Sat, 18 Apr 2020 19:17:47 +0300 -Subject: [PATCH 32/91] env: Add env_mmcdev variable handling +Subject: [PATCH 032/126] env: Add env_mmcdev variable handling Handle the variable env_mmcdev the following way: If the variable is set to an unsigned value, an actual environment is to be @@ -34,5 +34,5 @@ index 97331e55d9..fca256439b 100644 int mmc_map_to_kernel_blk(int devno) -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0033-Trivial-cleaning.patch b/recipes-bsp/u-boot/compulab/imx8mm/0033-Trivial-cleaning.patch index b72aabe..6ca53cb 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0033-Trivial-cleaning.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0033-Trivial-cleaning.patch @@ -1,40 +1,31 @@ -From 1787abeea8fbcb9e284f5b2d4a4ba06bef8c2251 Mon Sep 17 00:00:00 2001 +From e2f68b309bbba5efba12713b4732bbdcc23d809c Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Mon, 19 Jul 2021 00:22:59 +0300 -Subject: [PATCH 33/91] Trivial cleaning +Subject: [PATCH 033/126] Trivial cleaning Signed-off-by: Kirill Kapranov --- - arch/arm/dts/Makefile | 4 ++-- + arch/arm/dts/Makefile | 2 ++ board/compulab/common/Makefile | 4 +++- board/compulab/common/common.c | 3 ++- board/compulab/common/common.h | 3 ++- board/compulab/common/eeprom.h | 3 ++- board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c | 2 +- - 6 files changed, 12 insertions(+), 7 deletions(-) + 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index 2b81a2bc62..6238d142af 100644 +index c31d483784..9781d3451c 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -880,6 +880,8 @@ dtb-$(CONFIG_ARCH_IMX8M) += \ - dtb-$(CONFIG_ARCH_IMXRT) += imxrt1050-evk.dtb \ +@@ -888,6 +888,8 @@ dtb-$(CONFIG_ARCH_IMXRT) += imxrt1050-evk.dtb \ imxrt1020-evk.dtb + dtb-$(CONFIG_ARCH_IMX8ULP) += imx8ulp-evk.dtb imx8ulp-evk-i3c.dtb +dtb-$(CONFIG_TARGET_UCM_IMX8M_MINI) += ucm-imx8m-mini.dtb + dtb-$(CONFIG_RCAR_GEN2) += \ r8a7790-lager-u-boot.dtb \ r8a7790-stout-u-boot.dtb \ -@@ -890,8 +892,6 @@ dtb-$(CONFIG_RCAR_GEN2) += \ - r8a7794-alt-u-boot.dtb \ - r8a7794-silk-u-boot.dtb - --dtb-$(CONFIG_TARGET_UCM_IMX8M_MINI) += ucm-imx8m-mini.dtb -- - dtb-$(CONFIG_RCAR_GEN3) += \ - r8a774a1-beacon-rzg2m-kit.dtb \ - r8a774b1-beacon-rzg2n-kit.dtb \ diff --git a/board/compulab/common/Makefile b/board/compulab/common/Makefile index 500858035f..0a26fdb426 100644 --- a/board/compulab/common/Makefile @@ -111,5 +102,5 @@ index fca256439b..cf3cefb30d 100644 switch (value) { case 4096: -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0034-Migration-to-rel_imx_5.4.3.patch b/recipes-bsp/u-boot/compulab/imx8mm/0034-Migration-to-rel_imx_5.4.3.patch index fc29153..949db8e 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0034-Migration-to-rel_imx_5.4.3.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0034-Migration-to-rel_imx_5.4.3.patch @@ -1,45 +1,17 @@ -From 7d4680efc8133c631955c64518c6966505317644 Mon Sep 17 00:00:00 2001 +From 42104f3ba72deafdec230b2f0d82ba3741ab25fa Mon Sep 17 00:00:00 2001 From: Kirill Kapranov -Date: Mon, 19 Jul 2021 00:26:38 +0300 -Subject: [PATCH 34/91] Migration to rel_imx_5.4.3 +Date: Wed, 8 Dec 2021 14:56:15 +0200 +Subject: [PATCH 034/126] Migration to rel_imx_5.4.3 Signed-off-by: Kirill Kapranov --- - arch/arm/lib/bootm.c | 2 +- - arch/arm/lib/cache-cp15.c | 2 +- arch/arm/mach-imx/misc.c | 2 -- board/compulab/ucm-imx8m-mini/spl.c | 13 +++++++------ - board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c | 11 ++++++----- + board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c | 10 ++++++---- configs/ucm-imx8m-mini_defconfig | 7 ++++++- include/configs/ucm-imx8m-mini.h | 5 +++-- - 7 files changed, 24 insertions(+), 18 deletions(-) + 5 files changed, 22 insertions(+), 15 deletions(-) -diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c -index e1bd628507..e4021e1025 100644 ---- a/arch/arm/lib/bootm.c -+++ b/arch/arm/lib/bootm.c -@@ -154,7 +154,7 @@ static void setup_memory_tags(struct bd_info *bd) - int i; - - for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { -- if(!bd->bi_dram[i].size) -+ if (!gd->bd->bi_dram[i].size) - continue; - params->hdr.tag = ATAG_MEM; - params->hdr.size = tag_size (tag_mem32); -diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c -index 3212ea47f3..f6a9108fb9 100644 ---- a/arch/arm/lib/cache-cp15.c -+++ b/arch/arm/lib/cache-cp15.c -@@ -117,7 +117,7 @@ __weak void dram_bank_mmu_setup(int bank) - i < (bd->bi_dram[bank].start >> MMU_SECTION_SHIFT) + - (bd->bi_dram[bank].size >> MMU_SECTION_SHIFT); - i++) { -- if(!bd->bi_dram[bank].size) -+ if(!bd->bi_dram[bank].size) - continue; - set_section_dcache(i, DCACHE_DEFAULT_OPTION); - } diff --git a/arch/arm/mach-imx/misc.c b/arch/arm/mach-imx/misc.c index 5f001926aa..9f53cc2168 100644 --- a/arch/arm/mach-imx/misc.c @@ -54,19 +26,19 @@ index 5f001926aa..9f53cc2168 100644 gd->bd->bi_dram[bank].size; if (sp >= bank_end) diff --git a/board/compulab/ucm-imx8m-mini/spl.c b/board/compulab/ucm-imx8m-mini/spl.c -index febd27c93e..316e8100fc 100644 +index 2231cc1f6f..fa1943477e 100644 --- a/board/compulab/ucm-imx8m-mini/spl.c +++ b/board/compulab/ucm-imx8m-mini/spl.c -@@ -19,7 +19,7 @@ - #include +@@ -20,7 +20,7 @@ #include #include + -#include +#include #include "ddr/ddr.h" #include "ucm-imx8m-mini.h" -@@ -99,6 +99,7 @@ int board_mmc_init(bd_t *bis) +@@ -100,6 +100,7 @@ int board_mmc_init(bd_t *bis) for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) { switch (i) { case 0: @@ -74,7 +46,7 @@ index febd27c93e..316e8100fc 100644 usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK); imx_iomux_v3_setup_multiple_pads( usdhc2_pads, ARRAY_SIZE(usdhc2_pads)); -@@ -108,6 +109,7 @@ int board_mmc_init(bd_t *bis) +@@ -109,6 +110,7 @@ int board_mmc_init(bd_t *bis) gpio_direction_output(USDHC2_PWR_GPIO, 1); break; case 1: @@ -82,7 +54,7 @@ index febd27c93e..316e8100fc 100644 usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); imx_iomux_v3_setup_multiple_pads( usdhc3_pads, ARRAY_SIZE(usdhc3_pads)); -@@ -217,10 +219,12 @@ int board_fit_config_name_match(const char *name) +@@ -218,10 +220,12 @@ int board_fit_config_name_match(const char *name) void board_init_f(ulong dummy) { int ret; @@ -97,7 +69,7 @@ index febd27c93e..316e8100fc 100644 arch_cpu_init(); board_early_init_f(); -@@ -229,9 +233,6 @@ void board_init_f(ulong dummy) +@@ -230,9 +234,6 @@ void board_init_f(ulong dummy) preloader_console_init(); @@ -108,7 +80,7 @@ index febd27c93e..316e8100fc 100644 if (ret) { debug("spl_init() failed: %d\n", ret); diff --git a/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c b/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c -index cf3cefb30d..fa06db9ec6 100644 +index cf3cefb30d..f262acf414 100644 --- a/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c +++ b/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c @@ -139,6 +139,8 @@ int board_early_init_f(void) @@ -120,11 +92,10 @@ index cf3cefb30d..fa06db9ec6 100644 return 0; } -@@ -149,11 +151,10 @@ int board_postclk_init(void) - return 0; +@@ -150,10 +152,10 @@ int board_postclk_init(void) } #endif -- + -static phys_size_t imx8_ddr_size(void) +int board_phys_sdram_size(phys_size_t *size) { @@ -134,7 +105,7 @@ index cf3cefb30d..fa06db9ec6 100644 switch (value) { case 4096: -@@ -165,12 +166,12 @@ static phys_size_t imx8_ddr_size(void) +@@ -165,12 +167,12 @@ static phys_size_t imx8_ddr_size(void) case 768: case 512: case 256: @@ -150,7 +121,7 @@ index cf3cefb30d..fa06db9ec6 100644 /* Get the top of usable RAM */ ulong board_get_usable_ram_top(ulong total_size) diff --git a/configs/ucm-imx8m-mini_defconfig b/configs/ucm-imx8m-mini_defconfig -index 2955b2f907..c57d88fa59 100644 +index 2955b2f907..a90b813a3d 100644 --- a/configs/ucm-imx8m-mini_defconfig +++ b/configs/ucm-imx8m-mini_defconfig @@ -1,3 +1,4 @@ @@ -158,13 +129,14 @@ index 2955b2f907..c57d88fa59 100644 CONFIG_ARM=y CONFIG_ARCH_IMX8M=y CONFIG_SYS_TEXT_BASE=0x40200000 -@@ -8,10 +9,12 @@ CONFIG_IMX_OPTEE=y +@@ -7,11 +8,13 @@ CONFIG_SPL_MMC_SUPPORT=y + CONFIG_IMX_OPTEE=y CONFIG_DEFAULT_DEVICE_TREE="ucm-imx8m-mini" CONFIG_FIT=y - CONFIG_SPL_LOAD_FIT=y --CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg,SPL_TEXT_BASE=0x7E1000" +CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh" +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage.cfg,SPL_TEXT_BASE=0x7E1000" + CONFIG_SPL_LOAD_FIT=y +-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg,SPL_TEXT_BASE=0x7E1000" CONFIG_DEFAULT_FDT_FILE="ucm-imx8m-mini.dtb" CONFIG_ARCH_MISC_INIT=y CONFIG_SPL=y @@ -207,5 +179,5 @@ index dfd7d9980f..30caaca5a1 100644 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM #define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */ -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0035-Fix-storages-numeration-order.patch b/recipes-bsp/u-boot/compulab/imx8mm/0035-Fix-storages-numeration-order.patch index c6f62ff..f3ac190 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0035-Fix-storages-numeration-order.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0035-Fix-storages-numeration-order.patch @@ -1,7 +1,7 @@ -From fa158dafefdcb52d8e10e8d6711fe90b759df091 Mon Sep 17 00:00:00 2001 +From 3d914d55d3fa43b8ca1f1d16473cf33e5917061c Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Tue, 16 Jun 2020 15:45:22 +0300 -Subject: [PATCH 35/91] Fix storages numeration order +Subject: [PATCH 035/126] Fix storages numeration order Make u-boot enumerate storages in the same order as previous versions (2018.03) @@ -36,5 +36,5 @@ index 3d8be3a09a..b191e87755 100644 compatible = "regulator-fixed"; regulator-name = "VSD_3V3"; -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0036-Fix-memory-size-initialisation.patch b/recipes-bsp/u-boot/compulab/imx8mm/0036-Fix-memory-size-initialisation.patch index 6d83a62..ffe9eed 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0036-Fix-memory-size-initialisation.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0036-Fix-memory-size-initialisation.patch @@ -1,21 +1,21 @@ -From a5bb9ce368427a85ca72db9c512b9d9705126e7a Mon Sep 17 00:00:00 2001 +From dc542fe009df582db1a167902f72164de920fbcf Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Mon, 19 Jul 2021 00:58:48 +0300 -Subject: [PATCH 36/91] Fix memory size initialisation +Subject: [PATCH 036/126] Fix memory size initialisation Signed-off-by: Kirill Kapranov --- - board/compulab/plat/imx8mm/ddr/ddr.c | 15 +----- - .../compulab/ucm-imx8m-mini/ucm-imx8m-mini.c | 48 +++++++++++-------- - .../compulab/ucm-imx8m-mini/ucm-imx8m-mini.h | 6 +++ - configs/ucm-imx8m-mini_defconfig | 2 +- - 4 files changed, 35 insertions(+), 36 deletions(-) + board/compulab/plat/imx8mm/ddr/ddr.c | 15 +------- + board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c | 47 ++++++++++++++------------ + board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.h | 6 ++++ + configs/ucm-imx8m-mini_defconfig | 2 +- + 4 files changed, 34 insertions(+), 36 deletions(-) diff --git a/board/compulab/plat/imx8mm/ddr/ddr.c b/board/compulab/plat/imx8mm/ddr/ddr.c -index 7392fcdfaa..137a0b9f32 100644 +index 3c6b6ff489..1340475bef 100644 --- a/board/compulab/plat/imx8mm/ddr/ddr.c +++ b/board/compulab/plat/imx8mm/ddr/ddr.c -@@ -13,6 +13,7 @@ +@@ -14,6 +14,7 @@ #include #include #include "ddr.h" @@ -23,7 +23,7 @@ index 7392fcdfaa..137a0b9f32 100644 /* Forward declarations */ u32 cl_eeprom_get_ddrinfo(void); -@@ -59,20 +60,6 @@ struct lpddr4_desc { +@@ -60,20 +61,6 @@ struct lpddr4_desc { char *desc[4]; }; @@ -45,11 +45,11 @@ index 7392fcdfaa..137a0b9f32 100644 static const struct lpddr4_desc lpddr4_array[] = { { .name = "Micron", .id = 0xff020008, .size = 2048, .count = 1, .timing = &ucm_dram_timing_ff020008}, //Only the first timing entry is in use diff --git a/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c b/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c -index fa06db9ec6..0ffbbf3615 100644 +index f262acf414..8694201633 100644 --- a/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c +++ b/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c -@@ -153,25 +153,21 @@ int board_postclk_init(void) - #endif +@@ -154,25 +154,21 @@ int board_postclk_init(void) + int board_phys_sdram_size(phys_size_t *size) { - unsigned long value = readl(TCM_DATA_CFG); @@ -89,15 +89,7 @@ index fa06db9ec6..0ffbbf3615 100644 } /* Get the top of usable RAM */ ulong board_get_usable_ram_top(ulong total_size) -@@ -188,6 +184,7 @@ int dram_init(void) - phys_size_t sdram_size; - int ret; - ret = board_phys_sdram_size(&sdram_size); -+ printf("%s: size %llu\n", __func__, sdram_size); - if (ret) - return ret; - -@@ -219,21 +216,30 @@ int dram_init_banksize(void) +@@ -220,21 +216,30 @@ int dram_init_banksize(void) } gd->bd->bi_dram[bank].start = PHYS_SDRAM; @@ -147,7 +139,7 @@ index be698941da..c3380cb5ef 100644 #endif diff --git a/configs/ucm-imx8m-mini_defconfig b/configs/ucm-imx8m-mini_defconfig -index c57d88fa59..f42597b5c7 100644 +index a90b813a3d..3eb63bf1e6 100644 --- a/configs/ucm-imx8m-mini_defconfig +++ b/configs/ucm-imx8m-mini_defconfig @@ -5,7 +5,7 @@ CONFIG_SYS_TEXT_BASE=0x40200000 @@ -158,7 +150,7 @@ index c57d88fa59..f42597b5c7 100644 +# CONFIG_IMX_OPTEE is not set CONFIG_DEFAULT_DEVICE_TREE="ucm-imx8m-mini" CONFIG_FIT=y - CONFIG_SPL_LOAD_FIT=y + CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh" -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0037-env-Add-to-kernel-command-line-rw-rootwait.patch b/recipes-bsp/u-boot/compulab/imx8mm/0037-env-Add-to-kernel-command-line-rw-rootwait.patch index 8b4506c..6ba164c 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0037-env-Add-to-kernel-command-line-rw-rootwait.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0037-env-Add-to-kernel-command-line-rw-rootwait.patch @@ -1,7 +1,7 @@ -From 912eada83c4e27cd5dca3fea9f1787b22c55ae25 Mon Sep 17 00:00:00 2001 +From 85923035d03ac133385f8d296d9722ed3375157d Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Sun, 21 Jun 2020 22:08:06 +0300 -Subject: [PATCH 37/91] env: Add to kernel command line rw rootwait +Subject: [PATCH 037/126] env: Add to kernel command line rw rootwait Signed-off-by: Kirill Kapranov --- @@ -28,5 +28,5 @@ index 30caaca5a1..e3e91c7f72 100644 "ulimage=load ${iface} ${dev}:${part} ${loadaddr} ${image}\0" \ "ulfdt=if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0038-Move-environment-from-4M-to-17k-address.patch b/recipes-bsp/u-boot/compulab/imx8mm/0038-Move-environment-from-4M-to-17k-address.patch index 2fa68af..b6ca433 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0038-Move-environment-from-4M-to-17k-address.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0038-Move-environment-from-4M-to-17k-address.patch @@ -1,7 +1,7 @@ -From 6801a7a1c65cb87d00c72f1ee7f4074bd651eadf Mon Sep 17 00:00:00 2001 +From a93fbb4d91247528a8033cdaa6f99e8d3ca3efd7 Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Mon, 29 Jun 2020 18:15:26 +0300 -Subject: [PATCH 38/91] Move environment from 4M to 17k address +Subject: [PATCH 038/126] Move environment from 4M to 17k address Change starting address of environment data on eMMC form (64 * 64k) to (34 * 512) in order to avoid possible conflicts with the first partition. @@ -25,5 +25,5 @@ index e3e91c7f72..ad4e7997b1 100644 #define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC2 */ #define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */ -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0039-compulab-eeprom-Add-DM-support.patch b/recipes-bsp/u-boot/compulab/imx8mm/0039-compulab-eeprom-Add-DM-support.patch index db75e2a..1d7ac3c 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0039-compulab-eeprom-Add-DM-support.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0039-compulab-eeprom-Add-DM-support.patch @@ -1,11 +1,11 @@ -From eeec1e62d5133600bb5006f6dcc4feba2475cfce Mon Sep 17 00:00:00 2001 +From 745b74f41e51ff2c7590c6df9a3f2a94f884c2b4 Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Wed, 8 Jul 2020 08:03:28 +0300 -Subject: [PATCH 39/91] compulab: eeprom: Add DM support +Subject: [PATCH 039/126] compulab: eeprom: Add DM support Signed-off-by: Valentin Raevsky --- - board/compulab/common/eeprom.c | 42 +++++++++++++++++++++++++++++----- + board/compulab/common/eeprom.c | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c @@ -77,5 +77,5 @@ index cc91f8a195..defd9b6446 100644 return res; } -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0040-mcm-imx8m-mini-Add-basic-support.patch b/recipes-bsp/u-boot/compulab/imx8mm/0040-mcm-imx8m-mini-Add-basic-support.patch index 2bf0250..baece72 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0040-mcm-imx8m-mini-Add-basic-support.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0040-mcm-imx8m-mini-Add-basic-support.patch @@ -1,20 +1,20 @@ -From 8e4f334ab1c365dc0ba1d0ef8d0b31ac6caed9ad Mon Sep 17 00:00:00 2001 +From ab1153a5f4319338446cbdbea8398dd5ff387706 Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Mon, 19 Jul 2021 01:01:11 +0300 -Subject: [PATCH 40/91] mcm-imx8m-mini: Add basic support +Subject: [PATCH 040/126] mcm-imx8m-mini: Add basic support Signed-off-by: Kirill Kapranov --- - arch/arm/dts/Makefile | 1 + - arch/arm/dts/mcm-imx8m-mini.dts | 476 ++++++++++++++++++ - arch/arm/mach-imx/imx8m/Kconfig | 7 + - board/compulab/mcm-imx8m-mini/Kconfig | 17 + - board/compulab/mcm-imx8m-mini/Makefile | 14 + - .../compulab/mcm-imx8m-mini/mcm-imx8m-mini.c | 352 +++++++++++++ - .../compulab/mcm-imx8m-mini/mcm-imx8m-mini.h | 19 + - board/compulab/mcm-imx8m-mini/spl.c | 265 ++++++++++ - configs/mcm-imx8m-mini_defconfig | 67 +++ - include/configs/mcm-imx8m-mini.h | 308 ++++++++++++ + arch/arm/dts/Makefile | 1 + + arch/arm/dts/mcm-imx8m-mini.dts | 476 +++++++++++++++++++++++++ + arch/arm/mach-imx/imx8m/Kconfig | 7 + + board/compulab/mcm-imx8m-mini/Kconfig | 17 + + board/compulab/mcm-imx8m-mini/Makefile | 14 + + board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.c | 352 ++++++++++++++++++ + board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.h | 19 + + board/compulab/mcm-imx8m-mini/spl.c | 265 ++++++++++++++ + configs/mcm-imx8m-mini_defconfig | 67 ++++ + include/configs/mcm-imx8m-mini.h | 308 ++++++++++++++++ 10 files changed, 1526 insertions(+) create mode 100644 arch/arm/dts/mcm-imx8m-mini.dts create mode 100644 board/compulab/mcm-imx8m-mini/Kconfig @@ -26,11 +26,11 @@ Signed-off-by: Kirill Kapranov create mode 100644 include/configs/mcm-imx8m-mini.h diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index 6238d142af..5dacac3b5a 100644 +index 9781d3451c..c6b54163d0 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile -@@ -881,6 +881,7 @@ dtb-$(CONFIG_ARCH_IMXRT) += imxrt1050-evk.dtb \ - imxrt1020-evk.dtb +@@ -889,6 +889,7 @@ dtb-$(CONFIG_ARCH_IMXRT) += imxrt1050-evk.dtb \ + dtb-$(CONFIG_ARCH_IMX8ULP) += imx8ulp-evk.dtb imx8ulp-evk-i3c.dtb dtb-$(CONFIG_TARGET_UCM_IMX8M_MINI) += ucm-imx8m-mini.dtb +dtb-$(CONFIG_TARGET_MCM_IMX8M_MINI) += mcm-imx8m-mini.dtb @@ -520,10 +520,10 @@ index 0000000000..2c3723a42c + temperature = <115000>; +}; diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig -index d4c41ba1aa..13e93cf0f1 100644 +index 4930b9bee6..a38ec31d25 100644 --- a/arch/arm/mach-imx/imx8m/Kconfig +++ b/arch/arm/mach-imx/imx8m/Kconfig -@@ -208,6 +208,12 @@ config TARGET_UCM_IMX8M_MINI +@@ -266,6 +266,12 @@ config TARGET_UCM_IMX8M_MINI select SUPPORT_SPL select IMX8M_LPDDR4 @@ -536,7 +536,7 @@ index d4c41ba1aa..13e93cf0f1 100644 endchoice source "board/freescale/imx8mq_evk/Kconfig" -@@ -225,5 +231,6 @@ source "board/beacon/imx8mn/Kconfig" +@@ -284,5 +290,6 @@ source "board/beacon/imx8mn/Kconfig" source "board/phytec/phycore_imx8mm/Kconfig" source "board/phytec/phycore_imx8mp/Kconfig" source "board/compulab/ucm-imx8m-mini/Kconfig" @@ -1628,5 +1628,5 @@ index 0000000000..f5ab2f101b +#endif +#endif -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0041-mcm-imx8m-mini-env-config-Set-the-machine-values.patch b/recipes-bsp/u-boot/compulab/imx8mm/0041-mcm-imx8m-mini-env-config-Set-the-machine-values.patch index cb02f02..4f38917 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0041-mcm-imx8m-mini-env-config-Set-the-machine-values.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0041-mcm-imx8m-mini-env-config-Set-the-machine-values.patch @@ -1,7 +1,7 @@ -From 84e001d6c6fe84c54f2029641860300f7941fb5a Mon Sep 17 00:00:00 2001 +From 7696c21869712bd70a49f6d43142437d3f5199e5 Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Wed, 8 Jul 2020 08:07:55 +0300 -Subject: [PATCH 41/91] mcm-imx8m-mini: env: config: Set the machine values +Subject: [PATCH 041/126] mcm-imx8m-mini: env: config: Set the machine values Signed-off-by: Valentin Raevsky --- @@ -50,5 +50,5 @@ index 053895a2c0..3222fd715c 100644 +/dev/mmcblk2boot0 0x1000 0x4000 +#/dev/mmcblk1 0x1000 0x4000 -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0042-mcm-imx8m-mini-env-Add-an-option-to-print-the-machin.patch b/recipes-bsp/u-boot/compulab/imx8mm/0042-mcm-imx8m-mini-env-Add-an-option-to-print-the-machin.patch index a1e625d..4599d3a 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0042-mcm-imx8m-mini-env-Add-an-option-to-print-the-machin.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0042-mcm-imx8m-mini-env-Add-an-option-to-print-the-machin.patch @@ -1,8 +1,8 @@ -From daa08d163bc71d8ac1e1347574729be7563f009f Mon Sep 17 00:00:00 2001 +From 754cce3320e6c237684530a6611cd8ad78cda536 Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Wed, 8 Jul 2020 08:10:42 +0300 -Subject: [PATCH 42/91] mcm-imx8m-mini: env: Add an option to print the machine - env devices +Subject: [PATCH 042/126] mcm-imx8m-mini: env: Add an option to print the + machine env devices Signed-off-by: Valentin Raevsky --- @@ -51,5 +51,5 @@ index 1d193bd437..ebd18b40ba 100644 /* ignore unknown options */ break; -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0043-mcm-imx8m-mini-Set-EXTRAVERSION.patch b/recipes-bsp/u-boot/compulab/imx8mm/0043-mcm-imx8m-mini-Set-EXTRAVERSION.patch index a56f939..16be5f7 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0043-mcm-imx8m-mini-Set-EXTRAVERSION.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0043-mcm-imx8m-mini-Set-EXTRAVERSION.patch @@ -1,7 +1,7 @@ -From 7328ca230f8f8af35734a42a30554860e2f36240 Mon Sep 17 00:00:00 2001 +From e321143aaa0fd2913f731b5cf45d6ae08f11c31e Mon Sep 17 00:00:00 2001 From: Kirill Kapranov Date: Mon, 19 Jul 2021 01:02:48 +0300 -Subject: [PATCH 43/91] mcm-imx8m-mini: Set EXTRAVERSION +Subject: [PATCH 043/126] mcm-imx8m-mini: Set EXTRAVERSION Signed-off-by: Kirill Kapranov --- @@ -22,5 +22,5 @@ index 0451f445f6..22d2230a6f 100644 # *DOCUMENTATION* -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0044-mcm-imx8m-mini-config-Update-defconfig.patch b/recipes-bsp/u-boot/compulab/imx8mm/0044-mcm-imx8m-mini-config-Update-defconfig.patch index a04705b..dd6e0be 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0044-mcm-imx8m-mini-config-Update-defconfig.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0044-mcm-imx8m-mini-config-Update-defconfig.patch @@ -1,11 +1,11 @@ -From 19bf71a555e5ab75f5157d39b2420cce43060133 Mon Sep 17 00:00:00 2001 +From 4e8e749b50ff87ce206d6446c02ff035b11e64f4 Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Wed, 8 Jul 2020 17:13:00 +0300 -Subject: [PATCH 44/91] mcm-imx8m-mini: config: Update defconfig +Subject: [PATCH 044/126] mcm-imx8m-mini: config: Update defconfig Signed-off-by: Valentin Raevsky --- - configs/mcm-imx8m-mini_defconfig | 46 +++++++++++++++++++++++++++++--- + configs/mcm-imx8m-mini_defconfig | 46 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/configs/mcm-imx8m-mini_defconfig b/configs/mcm-imx8m-mini_defconfig @@ -119,5 +119,5 @@ index 80350afa7c..ce1cfb834a 100644 +CONFIG_OF_LIBFDT_OVERLAY=y # CONFIG_EFI_LOADER is not set -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0045-mcm-imx8m-mini-config-Update-.h-config.patch b/recipes-bsp/u-boot/compulab/imx8mm/0045-mcm-imx8m-mini-config-Update-.h-config.patch index 2690289..1640db5 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0045-mcm-imx8m-mini-config-Update-.h-config.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0045-mcm-imx8m-mini-config-Update-.h-config.patch @@ -1,11 +1,11 @@ -From 020bfa6700660bd1c77c0282f88b288b5b058a3d Mon Sep 17 00:00:00 2001 +From cf8a47603118237f8b77790c71d4c78a926aac3c Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Wed, 8 Jul 2020 17:13:29 +0300 -Subject: [PATCH 45/91] mcm-imx8m-mini: config: Update .h config +Subject: [PATCH 045/126] mcm-imx8m-mini: config: Update .h config Signed-off-by: Valentin Raevsky --- - include/configs/mcm-imx8m-mini.h | 48 ++++++-------------------------- + include/configs/mcm-imx8m-mini.h | 48 ++++++++-------------------------------- 1 file changed, 9 insertions(+), 39 deletions(-) diff --git a/include/configs/mcm-imx8m-mini.h b/include/configs/mcm-imx8m-mini.h @@ -145,5 +145,5 @@ index f5ab2f101b..dd0448efca 100644 #define CONFIG_OF_BOARD_SETUP -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0046-mcm-imx8m-mini-spl-Update-the-board-spl.patch b/recipes-bsp/u-boot/compulab/imx8mm/0046-mcm-imx8m-mini-spl-Update-the-board-spl.patch index beb4257..ed5d0e1 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0046-mcm-imx8m-mini-spl-Update-the-board-spl.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0046-mcm-imx8m-mini-spl-Update-the-board-spl.patch @@ -1,7 +1,7 @@ -From 161d9b8fcae9a58c5096574b7b815b9ad0f74d79 Mon Sep 17 00:00:00 2001 +From a2b63373c7d1f8e01405a0bb08a75ccd53607c71 Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Wed, 8 Jul 2020 17:28:54 +0300 -Subject: [PATCH 46/91] mcm-imx8m-mini: spl: Update the board spl +Subject: [PATCH 046/126] mcm-imx8m-mini: spl: Update the board spl Signed-off-by: Valentin Raevsky --- @@ -54,5 +54,5 @@ index 7038a8e073..f59bac4cb9 100644 + return 0; +} -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0047-mcm-imx8m-mini-Fix-dram_init_banksize-logics.patch b/recipes-bsp/u-boot/compulab/imx8mm/0047-mcm-imx8m-mini-Fix-dram_init_banksize-logics.patch index 18e9cc7..f51c268 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0047-mcm-imx8m-mini-Fix-dram_init_banksize-logics.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0047-mcm-imx8m-mini-Fix-dram_init_banksize-logics.patch @@ -1,7 +1,7 @@ -From 6ccb6f0a01d67e13ece4ddc6ec61f2ff69c0adff Mon Sep 17 00:00:00 2001 +From 3e43aa79f734982246d68cc6837601144d64ec72 Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Thu, 9 Jul 2020 12:35:27 +0300 -Subject: [PATCH 47/91] mcm-imx8m-mini: Fix dram_init_banksize() logics +Subject: [PATCH 047/126] mcm-imx8m-mini: Fix dram_init_banksize() logics Signed-off-by: Valentin Raevsky --- @@ -32,5 +32,5 @@ index 1ec3ecbde7..9ece28b318 100644 bank_1_size - gd->bd->bi_dram[bank].start; } -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0048-mcm-imx8m-mini-Add-board_usb_init-and-board_usb_clea.patch b/recipes-bsp/u-boot/compulab/imx8mm/0048-mcm-imx8m-mini-Add-board_usb_init-and-board_usb_clea.patch index 63b4684..048d047 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0048-mcm-imx8m-mini-Add-board_usb_init-and-board_usb_clea.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0048-mcm-imx8m-mini-Add-board_usb_init-and-board_usb_clea.patch @@ -1,7 +1,7 @@ -From cbd85748102a4e9fb1251ff4313fd210de70a202 Mon Sep 17 00:00:00 2001 +From 9b7dbbb4c200496a6cca3ee42bfa85d8f6649f7c Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Thu, 9 Jul 2020 22:58:39 +0300 -Subject: [PATCH 48/91] mcm-imx8m-mini: Add board_usb_init() and +Subject: [PATCH 048/126] mcm-imx8m-mini: Add board_usb_init() and board_usb_cleanup() Enable power on/off usb power in U-Boot. @@ -40,5 +40,5 @@ index 9ece28b318..6cea3b38cd 100644 { -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0049-mcm-imx8m-mini-dts-Enable-usbotg2-in-host-mode.patch b/recipes-bsp/u-boot/compulab/imx8mm/0049-mcm-imx8m-mini-dts-Enable-usbotg2-in-host-mode.patch index 4cd9abf..5d5d606 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0049-mcm-imx8m-mini-dts-Enable-usbotg2-in-host-mode.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0049-mcm-imx8m-mini-dts-Enable-usbotg2-in-host-mode.patch @@ -1,7 +1,7 @@ -From 80f1aafd56528a0405f8409d5c3337fbc1212e43 Mon Sep 17 00:00:00 2001 +From 4d8f74402acb4986f1db484b55d15c80de2f4acd Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Thu, 9 Jul 2020 23:00:55 +0300 -Subject: [PATCH 49/91] mcm-imx8m-mini: dts: Enable usbotg2 in host mode +Subject: [PATCH 049/126] mcm-imx8m-mini: dts: Enable usbotg2 in host mode Make the ubsotg2 work in U-Boot in host mode. @@ -25,5 +25,5 @@ index 2c3723a42c..85f4c46dd7 100644 &cpu_alert0 { -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0050-mcm-imx8m-mini-config-Remove-unused-stuff.patch b/recipes-bsp/u-boot/compulab/imx8mm/0050-mcm-imx8m-mini-config-Remove-unused-stuff.patch index 362ec72..15f5199 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0050-mcm-imx8m-mini-config-Remove-unused-stuff.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0050-mcm-imx8m-mini-config-Remove-unused-stuff.patch @@ -1,7 +1,7 @@ -From 6a6a9bb555195a8f40ee1426c7c6bdc3878b8cf2 Mon Sep 17 00:00:00 2001 +From ae8974e8a232e587112442a63be38b64b1675533 Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Thu, 9 Jul 2020 23:02:57 +0300 -Subject: [PATCH 50/91] mcm-imx8m-mini: config: Remove unused stuff +Subject: [PATCH 050/126] mcm-imx8m-mini: config: Remove unused stuff Signed-off-by: Valentin Raevsky --- @@ -41,5 +41,5 @@ index ce1cfb834a..92cdad293d 100644 CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_MMC_IO_VOLTAGE=y -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0051-mcm-imx8m-mini-Remove-dram_init_banksize-and-get_eff.patch b/recipes-bsp/u-boot/compulab/imx8mm/0051-mcm-imx8m-mini-Remove-dram_init_banksize-and-get_eff.patch index 3d7c946..1f68cd8 100644 --- a/recipes-bsp/u-boot/compulab/imx8mm/0051-mcm-imx8m-mini-Remove-dram_init_banksize-and-get_eff.patch +++ b/recipes-bsp/u-boot/compulab/imx8mm/0051-mcm-imx8m-mini-Remove-dram_init_banksize-and-get_eff.patch @@ -1,12 +1,12 @@ -From 579a5ba04f8d70af5262e3d1abb6f2b615d289c8 Mon Sep 17 00:00:00 2001 +From bddd7484de0069acb92d6421dfcd1fc16bd346f4 Mon Sep 17 00:00:00 2001 From: Valentin Raevsky Date: Mon, 13 Jul 2020 10:55:06 +0300 -Subject: [PATCH 51/91] mcm-imx8m-mini: Remove dram_init_banksize() and +Subject: [PATCH 051/126] mcm-imx8m-mini: Remove dram_init_banksize() and get_effective_memsize() Signed-off-by: Valentin Raevsky --- - .../compulab/mcm-imx8m-mini/mcm-imx8m-mini.c | 76 ------------------- + board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.c | 76 -------------------------- 1 file changed, 76 deletions(-) diff --git a/board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.c b/board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.c @@ -97,5 +97,5 @@ index 6cea3b38cd..7cfed94479 100644 int ft_board_setup(void *blob, bd_t *bd) { -- -2.17.1 +2.11.0 diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0052-mcm-imx8m-mini-Move-tcm-to-plat-imx8mm.patch b/recipes-bsp/u-boot/compulab/imx8mm/0052-mcm-imx8m-mini-Move-tcm-to-plat-imx8mm.patch new file mode 100644 index 0000000..b5735c7 --- /dev/null +++ b/recipes-bsp/u-boot/compulab/imx8mm/0052-mcm-imx8m-mini-Move-tcm-to-plat-imx8mm.patch @@ -0,0 +1,101 @@ +From 4fc2bc6314ba1ee0e2c3073bd3bc5c3e33887213 Mon Sep 17 00:00:00 2001 +From: Kirill Kapranov +Date: Mon, 19 Jul 2021 01:06:57 +0300 +Subject: [PATCH 052/126] mcm-imx8m-mini: Move tcm to plat/imx8mm + +Signed-off-by: Kirill Kapranov +--- + board/compulab/mcm-imx8m-mini/Makefile | 3 ++- + board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.c | 2 +- + board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.h | 19 ------------------- + board/compulab/mcm-imx8m-mini/spl.c | 1 - + board/compulab/plat/imx8mm/ddr/ddr.h | 9 +++++++++ + 5 files changed, 12 insertions(+), 22 deletions(-) + delete mode 100644 board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.h + +diff --git a/board/compulab/mcm-imx8m-mini/Makefile b/board/compulab/mcm-imx8m-mini/Makefile +index b926ed9cf9..8ade3b58c5 100644 +--- a/board/compulab/mcm-imx8m-mini/Makefile ++++ b/board/compulab/mcm-imx8m-mini/Makefile +@@ -6,8 +6,9 @@ + + obj-y += mcm-imx8m-mini.o + +-ifdef CONFIG_SPL_BUILD + ccflags-y += -I$(srctree)/board/compulab/plat/imx8mm/ ++ ++ifdef CONFIG_SPL_BUILD + obj-y += spl.o + endif + +diff --git a/board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.c b/board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.c +index 7cfed94479..20f322223c 100644 +--- a/board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.c ++++ b/board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.c +@@ -27,7 +27,7 @@ + #include + #include + #include +-#include "mcm-imx8m-mini.h" ++#include "ddr/ddr.h" + + DECLARE_GLOBAL_DATA_PTR; + +diff --git a/board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.h b/board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.h +deleted file mode 100644 +index fc59756161..0000000000 +--- a/board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.h ++++ /dev/null +@@ -1,19 +0,0 @@ +-/* +- * Copyright 2017 NXP +- * +- * SPDX-License-Identifier: GPL-2.0+ +- */ +- +-#ifndef __MCM_IMX8M_MINI__ +-#define __MCM_IMX8M_MINI__ +- +-#define TCM_DATA_CFG 0x7e0000 +- +-struct lpddr4_tcm_desc { +- unsigned int size; +- unsigned int sign; +- unsigned int index; +- unsigned int count; +-}; +- +-#endif +diff --git a/board/compulab/mcm-imx8m-mini/spl.c b/board/compulab/mcm-imx8m-mini/spl.c +index f59bac4cb9..3f6cb65102 100644 +--- a/board/compulab/mcm-imx8m-mini/spl.c ++++ b/board/compulab/mcm-imx8m-mini/spl.c +@@ -21,7 +21,6 @@ + #include + #include + #include "ddr/ddr.h" +-#include "mcm-imx8m-mini.h" + + DECLARE_GLOBAL_DATA_PTR; + +diff --git a/board/compulab/plat/imx8mm/ddr/ddr.h b/board/compulab/plat/imx8mm/ddr/ddr.h +index a66e8ec3c4..4d2a238439 100644 +--- a/board/compulab/plat/imx8mm/ddr/ddr.h ++++ b/board/compulab/plat/imx8mm/ddr/ddr.h +@@ -14,4 +14,13 @@ extern struct dram_timing_info ucm_dram_timing_01050008; + + void spl_dram_init(void); + ++#define TCM_DATA_CFG 0x7e0000 ++ ++struct lpddr4_tcm_desc { ++ unsigned int size; ++ unsigned int sign; ++ unsigned int index; ++ unsigned int count; ++}; ++ + #endif +-- +2.11.0 + diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0053-mcm-imx8m-mini-Refactor-spl-code.patch b/recipes-bsp/u-boot/compulab/imx8mm/0053-mcm-imx8m-mini-Refactor-spl-code.patch new file mode 100644 index 0000000..3fc5f5a --- /dev/null +++ b/recipes-bsp/u-boot/compulab/imx8mm/0053-mcm-imx8m-mini-Refactor-spl-code.patch @@ -0,0 +1,702 @@ +From fbeb9ec1d92ce8968914308df8ab54d6288ce86e Mon Sep 17 00:00:00 2001 +From: Valentin Raevsky +Date: Wed, 15 Jul 2020 07:58:17 +0300 +Subject: [PATCH 053/126] mcm-imx8m-mini: Refactor spl code + +Signed-off-by: Valentin Raevsky +--- + board/compulab/mcm-imx8m-mini/Makefile | 4 +- + board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.c | 27 --- + board/compulab/mcm-imx8m-mini/spl.c | 265 +---------------------- + board/compulab/plat/imx8mm/Makefile | 1 + + board/compulab/plat/imx8mm/spl/Makefile | 7 + + board/compulab/plat/imx8mm/spl/common.c | 33 +++ + board/compulab/plat/imx8mm/spl/spl.c | 280 +++++++++++++++++++++++++ + 7 files changed, 325 insertions(+), 292 deletions(-) + create mode 100644 board/compulab/plat/imx8mm/spl/Makefile + create mode 100644 board/compulab/plat/imx8mm/spl/common.c + create mode 100644 board/compulab/plat/imx8mm/spl/spl.c + +diff --git a/board/compulab/mcm-imx8m-mini/Makefile b/board/compulab/mcm-imx8m-mini/Makefile +index 8ade3b58c5..9ce2875d6e 100644 +--- a/board/compulab/mcm-imx8m-mini/Makefile ++++ b/board/compulab/mcm-imx8m-mini/Makefile +@@ -4,12 +4,12 @@ + # SPDX-License-Identifier: GPL-2.0+ + # + +-obj-y += mcm-imx8m-mini.o +- + ccflags-y += -I$(srctree)/board/compulab/plat/imx8mm/ + + ifdef CONFIG_SPL_BUILD + obj-y += spl.o ++else ++obj-y += mcm-imx8m-mini.o + endif + + obj-y += ../plat/imx8mm/ +diff --git a/board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.c b/board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.c +index 20f322223c..d01b8f8767 100644 +--- a/board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.c ++++ b/board/compulab/mcm-imx8m-mini/mcm-imx8m-mini.c +@@ -31,33 +31,6 @@ + + DECLARE_GLOBAL_DATA_PTR; + +-#define UART_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_FSEL1) +-#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE) +- +-static iomux_v3_cfg_t const uart_pads[] = { +- IMX8MM_PAD_UART3_RXD_UART3_RX | MUX_PAD_CTRL(UART_PAD_CTRL), +- IMX8MM_PAD_UART3_TXD_UART3_TX | MUX_PAD_CTRL(UART_PAD_CTRL), +-}; +- +-static iomux_v3_cfg_t const wdog_pads[] = { +- IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B | MUX_PAD_CTRL(WDOG_PAD_CTRL), +-}; +- +-int board_early_init_f(void) +-{ +- struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR; +- +- imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads)); +- +- set_wdog_reset(wdog); +- +- imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads)); +- +- init_uart_clk(2); +- +- return 0; +-} +- + #ifdef CONFIG_BOARD_POSTCLK_INIT + int board_postclk_init(void) + { +diff --git a/board/compulab/mcm-imx8m-mini/spl.c b/board/compulab/mcm-imx8m-mini/spl.c +index 3f6cb65102..d6ece8ef3e 100644 +--- a/board/compulab/mcm-imx8m-mini/spl.c ++++ b/board/compulab/mcm-imx8m-mini/spl.c +@@ -1,270 +1,9 @@ +-/* +- * Copyright 2020 CompuLab Ltd. +- */ +- +-#include +-#include +-#include +-#include + #include + #include +-#include + #include ++#include + #include +-#include +-#include +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include "ddr/ddr.h" +- +-DECLARE_GLOBAL_DATA_PTR; +- +-int spl_board_boot_device(enum boot_device boot_dev_spl) +-{ +- switch (boot_dev_spl) { +- case SD2_BOOT: +- case MMC2_BOOT: +- return BOOT_DEVICE_MMC1; +- case SD3_BOOT: +- case MMC3_BOOT: +- return BOOT_DEVICE_MMC2; +- default: +- return BOOT_DEVICE_NONE; +- } +-} +- +-#define I2C_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PE) +-#define PC MUX_PAD_CTRL(I2C_PAD_CTRL) +-struct i2c_pads_info i2c_pad_info1 = { +- .scl = { +- .i2c_mode = IMX8MM_PAD_I2C2_SCL_I2C2_SCL | PC, +- .gpio_mode = IMX8MM_PAD_I2C2_SCL_GPIO5_IO16 | PC, +- .gp = IMX_GPIO_NR(5, 16), +- }, +- .sda = { +- .i2c_mode = IMX8MM_PAD_I2C2_SDA_I2C2_SDA | PC, +- .gpio_mode = IMX8MM_PAD_I2C2_SDA_GPIO5_IO17 | PC, +- .gp = IMX_GPIO_NR(5, 17), +- }, +-}; +- +-#define USDHC2_CD_GPIO IMX_GPIO_NR(2, 18) +-#define USDHC2_PWR_GPIO IMX_GPIO_NR(2, 19) +- +-#define USDHC_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE |PAD_CTL_PE | \ +- PAD_CTL_FSEL2) +-#define USDHC_GPIO_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_DSE1) +- +-static iomux_v3_cfg_t const usdhc3_pads[] = { +- IMX8MM_PAD_NAND_WE_B_USDHC3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_WP_B_USDHC3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA04_USDHC3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA05_USDHC3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA06_USDHC3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA07_USDHC3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_RE_B_USDHC3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_CE2_B_USDHC3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_CE3_B_USDHC3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_CLE_USDHC3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +-}; +- +-static iomux_v3_cfg_t const usdhc2_pads[] = { +- IMX8MM_PAD_SD2_CLK_USDHC2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_SD2_CMD_USDHC2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_SD2_DATA0_USDHC2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_SD2_DATA1_USDHC2_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_SD2_DATA2_USDHC2_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_SD2_DATA3_USDHC2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_SD2_RESET_B_GPIO2_IO19 | MUX_PAD_CTRL(USDHC_GPIO_PAD_CTRL), +-}; +- +-/* +- * The evk board uses DAT3 to detect CD card plugin, +- * in u-boot we mux the pin to GPIO when doing board_mmc_getcd. +- */ +-static iomux_v3_cfg_t const usdhc2_cd_pad = +- IMX8MM_PAD_SD2_DATA3_GPIO2_IO18 | MUX_PAD_CTRL(USDHC_GPIO_PAD_CTRL); +- +-static iomux_v3_cfg_t const usdhc2_dat3_pad = +- IMX8MM_PAD_SD2_DATA3_USDHC2_DATA3 | +- MUX_PAD_CTRL(USDHC_PAD_CTRL); +- +- +-static struct fsl_esdhc_cfg usdhc_cfg[2] = { +- {USDHC2_BASE_ADDR, 0, 4}, +- {USDHC3_BASE_ADDR, 0, 8}, +-}; +- +-int board_mmc_init(bd_t *bis) +-{ +- int i, ret; +- /* +- * According to the board_mmc_init() the following map is done: +- * (U-Boot device node) (Physical Port) +- * mmc0 USDHC1 +- * mmc1 USDHC2 +- */ +- for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) { +- switch (i) { +- case 0: +- init_clk_usdhc(1); +- usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK); +- imx_iomux_v3_setup_multiple_pads( +- usdhc2_pads, ARRAY_SIZE(usdhc2_pads)); +- gpio_request(USDHC2_PWR_GPIO, "usdhc2_reset"); +- gpio_direction_output(USDHC2_PWR_GPIO, 0); +- udelay(500); +- gpio_direction_output(USDHC2_PWR_GPIO, 1); +- break; +- case 1: +- init_clk_usdhc(2); +- usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); +- imx_iomux_v3_setup_multiple_pads( +- usdhc3_pads, ARRAY_SIZE(usdhc3_pads)); +- break; +- default: +- printf("Warning: you configured more USDHC controllers" +- "(%d) than supported by the board\n", i + 1); +- return -EINVAL; +- } +- +- ret = fsl_esdhc_initialize(bis, &usdhc_cfg[i]); +- if (ret) +- return ret; +- } +- +- return 0; +-} +- +-int board_mmc_getcd(struct mmc *mmc) +-{ +- struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; +- int ret = 0; +- +- switch (cfg->esdhc_base) { +- case USDHC3_BASE_ADDR: +- ret = 1; +- break; +- case USDHC2_BASE_ADDR: +- imx_iomux_v3_setup_pad(usdhc2_cd_pad); +- gpio_request(USDHC2_CD_GPIO, "usdhc2 cd"); +- gpio_direction_input(USDHC2_CD_GPIO); +- +- /* +- * Since it is the DAT3 pin, this pin is pulled to +- * low voltage if no card +- */ +- ret = gpio_get_value(USDHC2_CD_GPIO); +- +- imx_iomux_v3_setup_pad(usdhc2_dat3_pad); +- return ret; +- } +- +- return 1; +-} +- +-#ifdef CONFIG_POWER +-#define I2C_PMIC 1 +-int power_init_board(void) +-{ +- struct pmic *p; +- int ret; +- +- ret = power_bd71837_init(I2C_PMIC); +- if (ret) +- printf("power init failed"); +- +- p = pmic_get("BD71837"); +- pmic_probe(p); +- +- +- /* decrease RESET key long push time from the default 10s to 10ms */ +- pmic_reg_write(p, BD71837_PWRONCONFIG1, 0x0); +- +- /* unlock the PMIC regs */ +- pmic_reg_write(p, BD71837_REGLOCK, 0x1); +- +- /* decrease VDD_ARM to 0.85V for 1.2GHz operation */ +- pmic_reg_write(p, BD71837_BUCK1_VOLT_RUN, 0x0f); +- +- /* increase VDD_DRAM to 0.975V (9v5 required but not supported)*/ +- pmic_reg_write(p, BD71837_BUCK5_VOLT, 0x83); +- +- /* increase NVCC_DRAM_1V2 to 1.2v for DDR4 */ +- pmic_reg_write(p, BD71837_BUCK8_VOLT, 0x28); +- +- /* lock the PMIC regs */ +- pmic_reg_write(p, BD71837_REGLOCK, 0x11); +- +- return 0; +-} +-#else +-int power_init_board(void) { return 0; } +-#endif +- +-void spl_board_init(void) +-{ +-#ifndef CONFIG_SPL_USB_SDP_SUPPORT +- /* Serial download mode */ +- if (is_usb_boot()) { +- puts("Back to ROM, SDP\n"); +- restore_boot_params(); +- } +-#endif +- puts("Normal Boot\n"); +-} +- +-#ifdef CONFIG_SPL_LOAD_FIT +-int board_fit_config_name_match(const char *name) +-{ +- /* Just empty function now - can't decide what to choose */ +- debug("%s: %s\n", __func__, name); +- +- return 0; +-} +-#endif +- +-void board_init_f(ulong dummy) +-{ +- int ret; +- /* Clear the BSS. */ +- memset(__bss_start, 0, __bss_end - __bss_start); +- +- arch_cpu_init(); +- +- board_early_init_f(); +- +- timer_init(); +- +- preloader_console_init(); +- +- ret = spl_init(); +- if (ret) { +- debug("spl_init() failed: %d\n", ret); +- hang(); +- } +- +- enable_tzc380(); +- +- setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); +- +- power_init_board(); +- /* DDR initialization */ +- spl_dram_init(); +- +- board_init_r(NULL, 0); +-} +- +-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +-{ +- puts ("resetting ...\n"); +- +- reset_cpu(WDOG1_BASE_ADDR); + ++int spl_board_private_init(void) { + return 0; + } +diff --git a/board/compulab/plat/imx8mm/Makefile b/board/compulab/plat/imx8mm/Makefile +index 04b9b2e8f8..2f68e0523e 100644 +--- a/board/compulab/plat/imx8mm/Makefile ++++ b/board/compulab/plat/imx8mm/Makefile +@@ -1,2 +1,3 @@ + obj-y += ddr/ + obj-y += eeprom/ ++obj-y += spl/ +diff --git a/board/compulab/plat/imx8mm/spl/Makefile b/board/compulab/plat/imx8mm/spl/Makefile +new file mode 100644 +index 0000000000..a3a9acaa6e +--- /dev/null ++++ b/board/compulab/plat/imx8mm/spl/Makefile +@@ -0,0 +1,7 @@ ++ccflags-y += -I$(srctree)/board/compulab/plat/imx8mm/ ++ ++obj-y += common.o ++ ++ifdef CONFIG_SPL_BUILD ++obj-y += spl.o ++endif +diff --git a/board/compulab/plat/imx8mm/spl/common.c b/board/compulab/plat/imx8mm/spl/common.c +new file mode 100644 +index 0000000000..5f1d1e5b97 +--- /dev/null ++++ b/board/compulab/plat/imx8mm/spl/common.c +@@ -0,0 +1,33 @@ ++#include ++#include ++#include ++#include ++#include ++ ++#define UART_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_FSEL1) ++#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE) ++ ++static iomux_v3_cfg_t const uart_pads[] = { ++ IMX8MM_PAD_UART3_RXD_UART3_RX | MUX_PAD_CTRL(UART_PAD_CTRL), ++ IMX8MM_PAD_UART3_TXD_UART3_TX | MUX_PAD_CTRL(UART_PAD_CTRL), ++}; ++ ++static iomux_v3_cfg_t const wdog_pads[] = { ++ IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B | MUX_PAD_CTRL(WDOG_PAD_CTRL), ++}; ++ ++int board_early_init_f(void) ++{ ++ struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR; ++ ++ imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads)); ++ ++ set_wdog_reset(wdog); ++ ++ imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads)); ++ ++ init_uart_clk(2); ++ ++ return 0; ++} ++ +diff --git a/board/compulab/plat/imx8mm/spl/spl.c b/board/compulab/plat/imx8mm/spl/spl.c +new file mode 100644 +index 0000000000..50aa6bea3f +--- /dev/null ++++ b/board/compulab/plat/imx8mm/spl/spl.c +@@ -0,0 +1,280 @@ ++/* ++ * Copyright 2020 CompuLab Ltd. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include "ddr/ddr.h" ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++int spl_board_boot_device(enum boot_device boot_dev_spl) ++{ ++ switch (boot_dev_spl) { ++ case SD2_BOOT: ++ case MMC2_BOOT: ++ return BOOT_DEVICE_MMC1; ++ case SD3_BOOT: ++ case MMC3_BOOT: ++ return BOOT_DEVICE_MMC2; ++ default: ++ return BOOT_DEVICE_NONE; ++ } ++} ++ ++#define I2C_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PE) ++#define PC MUX_PAD_CTRL(I2C_PAD_CTRL) ++struct i2c_pads_info i2c_pad_info1 = { ++ .scl = { ++ .i2c_mode = IMX8MM_PAD_I2C2_SCL_I2C2_SCL | PC, ++ .gpio_mode = IMX8MM_PAD_I2C2_SCL_GPIO5_IO16 | PC, ++ .gp = IMX_GPIO_NR(5, 16), ++ }, ++ .sda = { ++ .i2c_mode = IMX8MM_PAD_I2C2_SDA_I2C2_SDA | PC, ++ .gpio_mode = IMX8MM_PAD_I2C2_SDA_GPIO5_IO17 | PC, ++ .gp = IMX_GPIO_NR(5, 17), ++ }, ++}; ++ ++#define USDHC2_CD_GPIO IMX_GPIO_NR(2, 18) ++#define USDHC2_PWR_GPIO IMX_GPIO_NR(2, 19) ++ ++#define USDHC_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE |PAD_CTL_PE | \ ++ PAD_CTL_FSEL2) ++#define USDHC_GPIO_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_DSE1) ++ ++static iomux_v3_cfg_t const usdhc3_pads[] = { ++ IMX8MM_PAD_NAND_WE_B_USDHC3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++ IMX8MM_PAD_NAND_WP_B_USDHC3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++ IMX8MM_PAD_NAND_DATA04_USDHC3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++ IMX8MM_PAD_NAND_DATA05_USDHC3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++ IMX8MM_PAD_NAND_DATA06_USDHC3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++ IMX8MM_PAD_NAND_DATA07_USDHC3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++ IMX8MM_PAD_NAND_RE_B_USDHC3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++ IMX8MM_PAD_NAND_CE2_B_USDHC3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++ IMX8MM_PAD_NAND_CE3_B_USDHC3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++ IMX8MM_PAD_NAND_CLE_USDHC3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++}; ++ ++static iomux_v3_cfg_t const usdhc2_pads[] = { ++ IMX8MM_PAD_SD2_CLK_USDHC2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++ IMX8MM_PAD_SD2_CMD_USDHC2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++ IMX8MM_PAD_SD2_DATA0_USDHC2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++ IMX8MM_PAD_SD2_DATA1_USDHC2_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++ IMX8MM_PAD_SD2_DATA2_USDHC2_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++ IMX8MM_PAD_SD2_DATA3_USDHC2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), ++ IMX8MM_PAD_SD2_RESET_B_GPIO2_IO19 | MUX_PAD_CTRL(USDHC_GPIO_PAD_CTRL), ++}; ++ ++/* ++ * The evk board uses DAT3 to detect CD card plugin, ++ * in u-boot we mux the pin to GPIO when doing board_mmc_getcd. ++ */ ++static iomux_v3_cfg_t const usdhc2_cd_pad = ++ IMX8MM_PAD_SD2_DATA3_GPIO2_IO18 | MUX_PAD_CTRL(USDHC_GPIO_PAD_CTRL); ++ ++static iomux_v3_cfg_t const usdhc2_dat3_pad = ++ IMX8MM_PAD_SD2_DATA3_USDHC2_DATA3 | ++ MUX_PAD_CTRL(USDHC_PAD_CTRL); ++ ++ ++static struct fsl_esdhc_cfg usdhc_cfg[2] = { ++ {USDHC2_BASE_ADDR, 0, 4}, ++ {USDHC3_BASE_ADDR, 0, 8}, ++}; ++ ++int board_mmc_init(bd_t *bis) ++{ ++ int i, ret; ++ /* ++ * According to the board_mmc_init() the following map is done: ++ * (U-Boot device node) (Physical Port) ++ * mmc0 USDHC1 ++ * mmc1 USDHC2 ++ */ ++ for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) { ++ switch (i) { ++ case 0: ++ init_clk_usdhc(1); ++ usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK); ++ imx_iomux_v3_setup_multiple_pads( ++ usdhc2_pads, ARRAY_SIZE(usdhc2_pads)); ++ gpio_request(USDHC2_PWR_GPIO, "usdhc2_reset"); ++ gpio_direction_output(USDHC2_PWR_GPIO, 0); ++ udelay(500); ++ gpio_direction_output(USDHC2_PWR_GPIO, 1); ++ break; ++ case 1: ++ init_clk_usdhc(2); ++ usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); ++ imx_iomux_v3_setup_multiple_pads( ++ usdhc3_pads, ARRAY_SIZE(usdhc3_pads)); ++ break; ++ default: ++ printf("Warning: you configured more USDHC controllers" ++ "(%d) than supported by the board\n", i + 1); ++ return -EINVAL; ++ } ++ ++ ret = fsl_esdhc_initialize(bis, &usdhc_cfg[i]); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int board_mmc_getcd(struct mmc *mmc) ++{ ++ struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; ++ int ret = 0; ++ ++ switch (cfg->esdhc_base) { ++ case USDHC3_BASE_ADDR: ++ ret = 1; ++ break; ++ case USDHC2_BASE_ADDR: ++ imx_iomux_v3_setup_pad(usdhc2_cd_pad); ++ gpio_request(USDHC2_CD_GPIO, "usdhc2 cd"); ++ gpio_direction_input(USDHC2_CD_GPIO); ++ ++ /* ++ * Since it is the DAT3 pin, this pin is pulled to ++ * low voltage if no card ++ */ ++ ret = gpio_get_value(USDHC2_CD_GPIO); ++ ++ imx_iomux_v3_setup_pad(usdhc2_dat3_pad); ++ return ret; ++ } ++ ++ return 1; ++} ++ ++#ifdef CONFIG_POWER ++#define I2C_PMIC 1 ++int power_init_board(void) ++{ ++ struct pmic *p; ++ int ret; ++ ++ ret = power_bd71837_init(I2C_PMIC); ++ if (ret) ++ printf("power init failed"); ++ ++ p = pmic_get("BD71837"); ++ pmic_probe(p); ++ ++ ++ /* decrease RESET key long push time from the default 10s to 10ms */ ++ pmic_reg_write(p, BD71837_PWRONCONFIG1, 0x0); ++ ++ /* unlock the PMIC regs */ ++ pmic_reg_write(p, BD71837_REGLOCK, 0x1); ++ ++ /* decrease VDD_ARM to 0.85V for 1.2GHz operation */ ++ pmic_reg_write(p, BD71837_BUCK1_VOLT_RUN, 0x0f); ++ ++ /* increase VDD_DRAM to 0.975V (9v5 required but not supported)*/ ++ pmic_reg_write(p, BD71837_BUCK5_VOLT, 0x83); ++ ++ /* increase NVCC_DRAM_1V2 to 1.2v for DDR4 */ ++ pmic_reg_write(p, BD71837_BUCK8_VOLT, 0x28); ++ ++ /* lock the PMIC regs */ ++ pmic_reg_write(p, BD71837_REGLOCK, 0x11); ++ ++ return 0; ++} ++#else ++int power_init_board(void) { return 0; } ++#endif ++ ++__weak int spl_board_private_init(void) { ++ return 0; ++} ++ ++void spl_board_init(void) ++{ ++#ifndef CONFIG_SPL_USB_SDP_SUPPORT ++ /* Serial download mode */ ++ if (is_usb_boot()) { ++ puts("Back to ROM, SDP\n"); ++ restore_boot_params(); ++ } ++#endif ++ if (spl_board_private_init()) { ++ debug("spl_board_private_init() failed\n"); ++ hang(); ++ } ++ puts("Normal Boot\n"); ++} ++ ++#ifdef CONFIG_SPL_LOAD_FIT ++int board_fit_config_name_match(const char *name) ++{ ++ /* Just empty function now - can't decide what to choose */ ++ debug("%s: %s\n", __func__, name); ++ ++ return 0; ++} ++#endif ++ ++void board_init_f(ulong dummy) ++{ ++ int ret; ++ /* Clear the BSS. */ ++ memset(__bss_start, 0, __bss_end - __bss_start); ++ ++ arch_cpu_init(); ++ ++ board_early_init_f(); ++ ++ timer_init(); ++ ++ preloader_console_init(); ++ ++ ret = spl_init(); ++ if (ret) { ++ debug("spl_init() failed: %d\n", ret); ++ hang(); ++ } ++ ++ enable_tzc380(); ++ ++ setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); ++ ++ power_init_board(); ++ /* DDR initialization */ ++ spl_dram_init(); ++ ++ board_init_r(NULL, 0); ++} ++ ++int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ++{ ++ puts ("resetting ...\n"); ++ ++ reset_cpu(WDOG1_BASE_ADDR); ++ ++ return 0; ++} +-- +2.11.0 + diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0054-ucm-imx8m-mini-Refactor-the-code-for-2020.04.patch b/recipes-bsp/u-boot/compulab/imx8mm/0054-ucm-imx8m-mini-Refactor-the-code-for-2020.04.patch new file mode 100644 index 0000000..7b5b2eb --- /dev/null +++ b/recipes-bsp/u-boot/compulab/imx8mm/0054-ucm-imx8m-mini-Refactor-the-code-for-2020.04.patch @@ -0,0 +1,1541 @@ +From eeda73834ac6847a69ebffaac493a10e88a8ee4b Mon Sep 17 00:00:00 2001 +From: Kirill Kapranov +Date: Mon, 19 Jul 2021 01:13:04 +0300 +Subject: [PATCH 054/126] ucm-imx8m-mini: Refactor the code for 2020.04 + +Signed-off-by: Kirill Kapranov +--- + arch/arm/dts/ucm-imx8m-mini.dts | 30 +- + board/compulab/ucm-imx8m-mini/Kconfig | 25 +- + board/compulab/ucm-imx8m-mini/Makefile | 5 +- + board/compulab/ucm-imx8m-mini/spl.c | 249 +-------- + board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c | 692 ++----------------------- + board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.h | 18 - + configs/ucm-imx8m-mini_defconfig | 88 ++-- + include/configs/ucm-imx8m-mini.h | 76 +-- + 8 files changed, 127 insertions(+), 1056 deletions(-) + delete mode 100644 board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.h + +diff --git a/arch/arm/dts/ucm-imx8m-mini.dts b/arch/arm/dts/ucm-imx8m-mini.dts +index b191e87755..f2794e74e9 100644 +--- a/arch/arm/dts/ucm-imx8m-mini.dts ++++ b/arch/arm/dts/ucm-imx8m-mini.dts +@@ -14,8 +14,8 @@ + + /dts-v1/; + +-#include "fsl-imx8mm.dtsi" +- ++#include ++#include "imx8mm.dtsi" + + / { + model = "CompuLab UCM-iMX8M-Mini board"; +@@ -26,12 +26,6 @@ + stdout-patch = &uart3; + }; + +- aliases { +- mmc0 = &usdhc2; +- mmc1 = &usdhc3; +- /delete-property/ mmc2; +- }; +- + reg_usdhc2_vmmc: regulator-usdhc2 { + compatible = "regulator-fixed"; + regulator-name = "VSD_3V3"; +@@ -43,17 +37,6 @@ + off-on-delay-us = <12000>; + }; + +- uart4: serial@30a60000 { +- compatible = "fsl,imx8mq-uart", +- "fsl,imx6q-uart", "fsl,imx21-uart"; +- reg = <0x0 0x30a60000 0x0 0x10000>; +- interrupts = ; +- interrupt-parent = <&gpc>; +- clocks = <&clk IMX8MM_CLK_UART4_ROOT>, +- <&clk IMX8MM_CLK_UART4_ROOT>; +- clock-names = "ipg", "per"; +- status = "disabled"; +- }; + }; + + &iomuxc { +@@ -443,12 +426,6 @@ + status = "okay"; + }; + +-&uart4 { /* console */ +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_uart4>; +- status = "okay"; +-}; +- + &usdhc2 { + pinctrl-names = "default", "state_100mhz", "state_200mhz"; + pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>; +@@ -488,7 +465,8 @@ + }; + + &usbotg2 { +- status = "disabled"; ++ dr_mode = "host"; ++ status = "okay"; + }; + + &cpu_alert0 { +diff --git a/board/compulab/ucm-imx8m-mini/Kconfig b/board/compulab/ucm-imx8m-mini/Kconfig +index d93df9063c..ed4f21608a 100644 +--- a/board/compulab/ucm-imx8m-mini/Kconfig ++++ b/board/compulab/ucm-imx8m-mini/Kconfig +@@ -9,26 +9,9 @@ config SYS_VENDOR + config SYS_CONFIG_NAME + default "ucm-imx8m-mini" + +-choice +- prompt "RAM Volume select" +- default RAM_2G +- help +- This option configures 2G RAM only ++config DEFAULT_DTB ++ string "U-Boot Default Device Tree File" ++ depends on TARGET_UCM_IMX8M_MINI ++ default "sbc-ucm-imx8m-mini.dtb" + +-config RAM_1G +- bool "RAM_1G" +- help +- This option configures 1G RAM only +- +-config RAM_2G +- bool "RAM_2G" +- help +- imx8mm_val board configuration approach +- +-config RAM_4G +- bool "RAM_4G" +- help +- This option configures 4G RAM only +- +-endchoice + endif +diff --git a/board/compulab/ucm-imx8m-mini/Makefile b/board/compulab/ucm-imx8m-mini/Makefile +index f30d5e645a..dbde2116cd 100644 +--- a/board/compulab/ucm-imx8m-mini/Makefile ++++ b/board/compulab/ucm-imx8m-mini/Makefile +@@ -4,11 +4,12 @@ + # SPDX-License-Identifier: GPL-2.0+ + # + +-obj-y += ucm-imx8m-mini.o ++ccflags-y += -I$(srctree)/board/compulab/plat/imx8mm/ + + ifdef CONFIG_SPL_BUILD +-ccflags-y += -I$(srctree)/board/compulab/plat/imx8mm/ + obj-y += spl.o ++else ++obj-y += ucm-imx8m-mini.o + endif + + obj-y += ../plat/imx8mm/ +diff --git a/board/compulab/ucm-imx8m-mini/spl.c b/board/compulab/ucm-imx8m-mini/spl.c +index fa1943477e..b73f8ade6d 100644 +--- a/board/compulab/ucm-imx8m-mini/spl.c ++++ b/board/compulab/ucm-imx8m-mini/spl.c +@@ -1,252 +1,9 @@ +-/* +- * Copyright 2018 NXP +- * +- * SPDX-License-Identifier: GPL-2.0+ +- */ +- +-#include +-#include +-#include +-#include + #include + #include + #include +-#include +-#include +-#include + #include +-#include +-#include +-#include +-#include +- +-#include +-#include "ddr/ddr.h" +-#include "ucm-imx8m-mini.h" +- +-DECLARE_GLOBAL_DATA_PTR; +- +-#define I2C_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE) +-#define PC MUX_PAD_CTRL(I2C_PAD_CTRL) +-struct i2c_pads_info i2c_pad_info1 = { +- .scl = { +- .i2c_mode = IMX8MM_PAD_I2C2_SCL_I2C2_SCL | PC, +- .gpio_mode = IMX8MM_PAD_I2C2_SCL_GPIO5_IO16 | PC, +- .gp = IMX_GPIO_NR(5, 16), +- }, +- .sda = { +- .i2c_mode = IMX8MM_PAD_I2C2_SDA_I2C2_SDA | PC, +- .gpio_mode = IMX8MM_PAD_I2C2_SDA_GPIO5_IO17 | PC, +- .gp = IMX_GPIO_NR(5, 17), +- }, +-}; +- +-#define USDHC2_CD_GPIO IMX_GPIO_NR(2, 18) +-#define USDHC2_PWR_GPIO IMX_GPIO_NR(2, 19) +- +-#define USDHC_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE |PAD_CTL_PE | \ +- PAD_CTL_FSEL2) +-#define USDHC_GPIO_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_DSE1) +- +-static iomux_v3_cfg_t const usdhc3_pads[] = { +- IMX8MM_PAD_NAND_WE_B_USDHC3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_WP_B_USDHC3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA04_USDHC3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA05_USDHC3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA06_USDHC3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA07_USDHC3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_RE_B_USDHC3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_CE2_B_USDHC3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_CE3_B_USDHC3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_NAND_CLE_USDHC3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +-}; +- +-static iomux_v3_cfg_t const usdhc2_pads[] = { +- IMX8MM_PAD_SD2_CLK_USDHC2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_SD2_CMD_USDHC2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_SD2_DATA0_USDHC2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_SD2_DATA1_USDHC2_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_SD2_DATA2_USDHC2_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_SD2_DATA3_USDHC2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), +- IMX8MM_PAD_SD2_RESET_B_GPIO2_IO19 | MUX_PAD_CTRL(USDHC_GPIO_PAD_CTRL), +-}; +- +-/* +- * The evk board uses DAT3 to detect CD card plugin, +- * in u-boot we mux the pin to GPIO when doing board_mmc_getcd. +- */ +-static iomux_v3_cfg_t const usdhc2_cd_pad = +- IMX8MM_PAD_SD2_DATA3_GPIO2_IO18 | MUX_PAD_CTRL(USDHC_GPIO_PAD_CTRL); +- +-static iomux_v3_cfg_t const usdhc2_dat3_pad = +- IMX8MM_PAD_SD2_DATA3_USDHC2_DATA3 | +- MUX_PAD_CTRL(USDHC_PAD_CTRL); +- +- +-static struct fsl_esdhc_cfg usdhc_cfg[2] = { +- {USDHC2_BASE_ADDR, 0, 4}, +- {USDHC3_BASE_ADDR, 0, 8}, +-}; +- +-int board_mmc_init(bd_t *bis) +-{ +- int i, ret; +- /* +- * According to the board_mmc_init() the following map is done: +- * (U-Boot device node) (Physical Port) +- * mmc0 USDHC1 +- * mmc1 USDHC2 +- */ +- for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) { +- switch (i) { +- case 0: +- init_clk_usdhc(1); +- usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK); +- imx_iomux_v3_setup_multiple_pads( +- usdhc2_pads, ARRAY_SIZE(usdhc2_pads)); +- gpio_request(USDHC2_PWR_GPIO, "usdhc2_reset"); +- gpio_direction_output(USDHC2_PWR_GPIO, 0); +- udelay(500); +- gpio_direction_output(USDHC2_PWR_GPIO, 1); +- break; +- case 1: +- init_clk_usdhc(2); +- usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); +- imx_iomux_v3_setup_multiple_pads( +- usdhc3_pads, ARRAY_SIZE(usdhc3_pads)); +- break; +- default: +- printf("Warning: you configured more USDHC controllers" +- "(%d) than supported by the board\n", i + 1); +- return -EINVAL; +- } +- +- ret = fsl_esdhc_initialize(bis, &usdhc_cfg[i]); +- if (ret) +- return ret; +- } +- +- return 0; +-} +- +-int board_mmc_getcd(struct mmc *mmc) +-{ +- struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; +- int ret = 0; +- +- switch (cfg->esdhc_base) { +- case USDHC3_BASE_ADDR: +- ret = 1; +- break; +- case USDHC2_BASE_ADDR: +- imx_iomux_v3_setup_pad(usdhc2_cd_pad); +- gpio_request(USDHC2_CD_GPIO, "usdhc2 cd"); +- gpio_direction_input(USDHC2_CD_GPIO); +- +- /* +- * Since it is the DAT3 pin, this pin is pulled to +- * low voltage if no card +- */ +- ret = gpio_get_value(USDHC2_CD_GPIO); +- +- imx_iomux_v3_setup_pad(usdhc2_dat3_pad); +- return ret; +- } +- +- return 1; +-} +- +-#ifdef CONFIG_POWER +-#define I2C_PMIC 1 +-int power_init_board(void) +-{ +- struct pmic *p; +- int ret; +- +- ret = power_bd71837_init(I2C_PMIC); +- if (ret) +- printf("power init failed"); +- +- p = pmic_get("BD71837"); +- pmic_probe(p); +- +- +- /* decrease RESET key long push time from the default 10s to 10ms */ +- pmic_reg_write(p, BD71837_PWRONCONFIG1, 0x0); +- +- /* unlock the PMIC regs */ +- pmic_reg_write(p, BD71837_REGLOCK, 0x1); +- +- /* decrease VDD_ARM to 0.85V for 1.2GHz operation */ +- /*pmic_reg_write(p, BD71837_BUCK2_VOLT_RUN, 0x0f);*/ +- +- /* increase VDD_SOC to 0.85V for 3Ghz DDR */ +- pmic_reg_write(p, BD71837_BUCK1_VOLT_RUN, 0x0f); +- +- /* increase VDD_DRAM to 0.975V (9v5 required but not supported)*/ +- pmic_reg_write(p, BD71837_BUCK5_VOLT, 0x83); +- +- /* lock the PMIC regs */ +- pmic_reg_write(p, BD71837_REGLOCK, 0x11); +- +- return 0; +-} +-#else +-int power_init_board(void) { return 0; } +-#endif +- +-void spl_board_init(void) +-{ +-#ifndef CONFIG_SPL_USB_SDP_SUPPORT +- /* Serial download mode */ +- if (is_usb_boot()) { +- puts("Back to ROM, SDP\n"); +- restore_boot_params(); +- } +-#endif +- puts("Normal Boot\n"); +-} +- +-#ifdef CONFIG_SPL_LOAD_FIT +-int board_fit_config_name_match(const char *name) +-{ +- /* Just empty function now - can't decide what to choose */ +- debug("%s: %s\n", __func__, name); +- ++#include ++ ++int spl_board_private_init(void) { + return 0; + } +-#endif +- +-void board_init_f(ulong dummy) +-{ +- int ret; +- /* Clear the BSS. */ +- memset(__bss_start, 0, __bss_end - __bss_start); +- +- /* Clear global data +- memset((void *)gd, 0, sizeof(gd_t)); +- */ +- arch_cpu_init(); +- +- board_early_init_f(); +- +- timer_init(); +- +- preloader_console_init(); +- +- ret = spl_init(); +- if (ret) { +- debug("spl_init() failed: %d\n", ret); +- hang(); +- } +- +- enable_tzc380(); +- +- setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); +- +- power_init_board(); +- /* DDR initialization */ +- spl_dram_init(); +- +- board_init_r(NULL, 0); +-} +diff --git a/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c b/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c +index 8694201633..cfb4831a80 100644 +--- a/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c ++++ b/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.c +@@ -1,5 +1,5 @@ + /* +- * Copyright 2018 NXP ++ * Copyright 2020 CompuLab + * + * SPDX-License-Identifier: GPL-2.0+ + */ +@@ -23,127 +23,14 @@ + #include + #include + #include +-#include "../common/tcpc.h" + #include "../common/eeprom.h" + #include +-#include +-#include +-#include ++#include + #include +-#include "ucm-imx8m-mini.h" ++#include "ddr/ddr.h" + + DECLARE_GLOBAL_DATA_PTR; + +-#define UART_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_FSEL1) +-#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE) +- +-static iomux_v3_cfg_t const uart_pads[] = { +- IMX8MM_PAD_UART3_RXD_UART3_RX | MUX_PAD_CTRL(UART_PAD_CTRL), +- IMX8MM_PAD_UART3_TXD_UART3_TX | MUX_PAD_CTRL(UART_PAD_CTRL), +-}; +- +-static iomux_v3_cfg_t const wdog_pads[] = { +- IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B | MUX_PAD_CTRL(WDOG_PAD_CTRL), +-}; +- +-#ifdef CONFIG_FSL_FSPI +-#define QSPI_PAD_CTRL (PAD_CTL_DSE2 | PAD_CTL_HYS) +-static iomux_v3_cfg_t const qspi_pads[] = { +- IMX8MM_PAD_NAND_ALE_QSPI_A_SCLK | MUX_PAD_CTRL(QSPI_PAD_CTRL | PAD_CTL_PE | PAD_CTL_PUE), +- IMX8MM_PAD_NAND_CE0_B_QSPI_A_SS0_B | MUX_PAD_CTRL(QSPI_PAD_CTRL), +- +- IMX8MM_PAD_NAND_DATA00_QSPI_A_DATA0 | MUX_PAD_CTRL(QSPI_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA01_QSPI_A_DATA1 | MUX_PAD_CTRL(QSPI_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA02_QSPI_A_DATA2 | MUX_PAD_CTRL(QSPI_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA03_QSPI_A_DATA3 | MUX_PAD_CTRL(QSPI_PAD_CTRL), +-}; +- +-int board_qspi_init(void) +-{ +- imx_iomux_v3_setup_multiple_pads(qspi_pads, ARRAY_SIZE(qspi_pads)); +- +- set_clk_qspi(); +- +- return 0; +-} +-#endif +- +-#ifdef CONFIG_MXC_SPI +-#define SPI_PAD_CTRL (PAD_CTL_DSE2 | PAD_CTL_HYS) +-static iomux_v3_cfg_t const ecspi1_pads[] = { +- IMX8MM_PAD_ECSPI1_SCLK_ECSPI1_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL), +- IMX8MM_PAD_ECSPI1_MOSI_ECSPI1_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL), +- IMX8MM_PAD_ECSPI1_MISO_ECSPI1_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL), +- IMX8MM_PAD_ECSPI1_SS0_GPIO5_IO9 | MUX_PAD_CTRL(NO_PAD_CTRL), +-}; +- +-static iomux_v3_cfg_t const ecspi2_pads[] = { +- IMX8MM_PAD_ECSPI2_SCLK_ECSPI2_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL), +- IMX8MM_PAD_ECSPI2_MOSI_ECSPI2_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL), +- IMX8MM_PAD_ECSPI2_MISO_ECSPI2_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL), +- IMX8MM_PAD_ECSPI2_SS0_GPIO5_IO13 | MUX_PAD_CTRL(NO_PAD_CTRL), +-}; +- +-static void setup_spi(void) +-{ +- imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads)); +- imx_iomux_v3_setup_multiple_pads(ecspi2_pads, ARRAY_SIZE(ecspi2_pads)); +- gpio_request(IMX_GPIO_NR(5, 9), "ECSPI1 CS"); +- gpio_request(IMX_GPIO_NR(5, 13), "ECSPI2 CS"); +-} +- +-int board_spi_cs_gpio(unsigned bus, unsigned cs) +-{ +- if (bus == 0) +- return IMX_GPIO_NR(5, 9); +- else +- return IMX_GPIO_NR(5, 13); +-} +-#endif +- +-#ifdef CONFIG_NAND_MXS +-#define NAND_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_FSEL2 | PAD_CTL_HYS) +-#define NAND_PAD_READY0_CTRL (PAD_CTL_DSE6 | PAD_CTL_FSEL2 | PAD_CTL_PUE) +-static iomux_v3_cfg_t const gpmi_pads[] = { +- IMX8MM_PAD_NAND_ALE_RAWNAND_ALE | MUX_PAD_CTRL(NAND_PAD_CTRL), +- IMX8MM_PAD_NAND_CE0_B_RAWNAND_CE0_B | MUX_PAD_CTRL(NAND_PAD_CTRL), +- IMX8MM_PAD_NAND_CLE_RAWNAND_CLE | MUX_PAD_CTRL(NAND_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA00_RAWNAND_DATA00 | MUX_PAD_CTRL(NAND_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA01_RAWNAND_DATA01 | MUX_PAD_CTRL(NAND_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA02_RAWNAND_DATA02 | MUX_PAD_CTRL(NAND_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA03_RAWNAND_DATA03 | MUX_PAD_CTRL(NAND_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA04_RAWNAND_DATA04 | MUX_PAD_CTRL(NAND_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA05_RAWNAND_DATA05 | MUX_PAD_CTRL(NAND_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA06_RAWNAND_DATA06 | MUX_PAD_CTRL(NAND_PAD_CTRL), +- IMX8MM_PAD_NAND_DATA07_RAWNAND_DATA07 | MUX_PAD_CTRL(NAND_PAD_CTRL), +- IMX8MM_PAD_NAND_RE_B_RAWNAND_RE_B | MUX_PAD_CTRL(NAND_PAD_CTRL), +- IMX8MM_PAD_NAND_READY_B_RAWNAND_READY_B | MUX_PAD_CTRL(NAND_PAD_READY0_CTRL), +- IMX8MM_PAD_NAND_WE_B_RAWNAND_WE_B | MUX_PAD_CTRL(NAND_PAD_CTRL), +- IMX8MM_PAD_NAND_WP_B_RAWNAND_WP_B | MUX_PAD_CTRL(NAND_PAD_CTRL), +-}; +- +-static void setup_gpmi_nand(void) +-{ +- imx_iomux_v3_setup_multiple_pads(gpmi_pads, ARRAY_SIZE(gpmi_pads)); +- mxs_dma_init(); +-} +-#endif +- +-int board_early_init_f(void) +-{ +- struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR; +- +- imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads)); +- +- set_wdog_reset(wdog); +- +- imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads)); +- +- init_uart_clk(2); +- +- return 0; +-} +- + #ifdef CONFIG_BOARD_POSTCLK_INIT + int board_postclk_init(void) + { +@@ -194,81 +81,6 @@ int dram_init(void) + return 0; + } + +-int dram_init_banksize(void) +-{ +- int bank = 0; +- int ret; +- phys_size_t total_size, bank_1_size, bank_2_size; +- +- ret = board_phys_sdram_size(&total_size); +- if (ret) +- return ret; +- +- switch (total_size) { +- case 4 * (1L << 30): +- bank_1_size = 3 * (1L << 30); +- bank_2_size = 1 * (1L << 30); +- break; +- default: +- bank_1_size = total_size; +- bank_2_size = 0; +- break; +- } +- +- gd->bd->bi_dram[bank].start = PHYS_SDRAM; +- gd->bd->bi_dram[bank].size = bank_1_size; +- +- if (rom_pointer[1]) { +- phys_addr_t optee_start = (phys_addr_t)rom_pointer[0]; +- phys_size_t optee_size = (size_t)rom_pointer[1]; +- +- if ((optee_start + optee_size) < (PHYS_SDRAM + bank_1_size)) { +- +- gd->bd->bi_dram[bank].size = optee_start - +- gd->bd->bi_dram[bank].start; +- +- if ( ++bank >= CONFIG_NR_DRAM_BANKS) { +- puts("CONFIG_NR_DRAM_BANKS is not enough\n"); +- return -1; +- } +- +- gd->bd->bi_dram[bank].start = optee_start; +- gd->bd->bi_dram[bank].size = PHYS_SDRAM + +- bank_1_size - gd->bd->bi_dram[bank].start; +- } +- else { +- printf("%s: There is no room to allocate TEE 0x%16.16llx @ 0x%16.16llx\n", +- __func__, optee_size, optee_start); +- } +- } else { +- gd->bd->bi_dram[bank].size = bank_1_size; +- } +- +- if(bank_2_size) { +- if ( ++bank >= CONFIG_NR_DRAM_BANKS) { +- puts("CONFIG_NR_DRAM_BANKS is not enough for SDRAM_2\n"); +- return -1; +- } +- gd->bd->bi_dram[bank].start = PHYS_SDRAM_2; +- gd->bd->bi_dram[bank].size = bank_2_size; +- } +- return 0; +-} +- +-phys_size_t get_effective_memsize(void) +-{ +- /* return the first bank as effective memory */ +- if (rom_pointer[1]) +- return ((phys_addr_t)rom_pointer[0] - PHYS_SDRAM); +- +- switch(gd->ram_size) { +- case 4 * (1L<<30): +- return 3 * (1L<<30); +- default: +- return gd->ram_size; +- } +-} +- + #ifdef CONFIG_OF_BOARD_SETUP + int ft_board_setup(void *blob, bd_t *bd) + { +@@ -316,7 +128,7 @@ static int setup_mac_address(void) + return -1; + + ret = eth_env_set_enetaddr("ethaddr", enetaddr); +- if (!ret) ++ if (ret) + return -1; + + return 0; +@@ -352,522 +164,88 @@ int board_phy_config(struct phy_device *phydev) + } + #endif + +-#ifdef CONFIG_USB_TCPC +-struct tcpc_port port1; +-struct tcpc_port port2; +- +-static int setup_pd_switch(uint8_t i2c_bus, uint8_t addr) +-{ +- struct udevice *bus; +- struct udevice *i2c_dev = NULL; +- int ret; +- uint8_t valb; +- +- ret = uclass_get_device_by_seq(UCLASS_I2C, i2c_bus, &bus); +- if (ret) { +- printf("%s: Can't find bus\n", __func__); +- return -EINVAL; +- } +- +- ret = dm_i2c_probe(bus, addr, 0, &i2c_dev); +- if (ret) { +- printf("%s: Can't find device id=0x%x\n", +- __func__, addr); +- return -ENODEV; +- } +- +- ret = dm_i2c_read(i2c_dev, 0xB, &valb, 1); +- if (ret) { +- printf("%s dm_i2c_read failed, err %d\n", __func__, ret); +- return -EIO; +- } +- valb |= 0x4; /* Set DB_EXIT to exit dead battery mode */ +- ret = dm_i2c_write(i2c_dev, 0xB, (const uint8_t *)&valb, 1); +- if (ret) { +- printf("%s dm_i2c_write failed, err %d\n", __func__, ret); +- return -EIO; +- } +- +- /* Set OVP threshold to 23V */ +- valb = 0x6; +- ret = dm_i2c_write(i2c_dev, 0x8, (const uint8_t *)&valb, 1); +- if (ret) { +- printf("%s dm_i2c_write failed, err %d\n", __func__, ret); +- return -EIO; +- } +- +- return 0; +-} +- +-int pd_switch_snk_enable(struct tcpc_port *port) +-{ +- if (port == &port1) { +- debug("Setup pd switch on port 1\n"); +- return setup_pd_switch(1, 0x72); +- } else if (port == &port2) { +- debug("Setup pd switch on port 2\n"); +- return setup_pd_switch(1, 0x73); +- } else +- return -EINVAL; +-} +- +-struct tcpc_port_config port1_config = { +- .i2c_bus = 1, /*i2c2*/ +- .addr = 0x50, +- .port_type = TYPEC_PORT_UFP, +- .max_snk_mv = 5000, +- .max_snk_ma = 3000, +- .max_snk_mw = 40000, +- .op_snk_mv = 9000, +- .switch_setup_func = &pd_switch_snk_enable, +-}; +- +-struct tcpc_port_config port2_config = { +- .i2c_bus = 1, /*i2c2*/ +- .addr = 0x52, +- .port_type = TYPEC_PORT_UFP, +- .max_snk_mv = 5000, +- .max_snk_ma = 3000, +- .max_snk_mw = 40000, +- .op_snk_mv = 9000, +- .switch_setup_func = &pd_switch_snk_enable, +-}; +- +-static int setup_typec(void) +-{ +- int ret; +- +- debug("tcpc_init port 2\n"); +- ret = tcpc_init(&port2, port2_config, NULL); +- if (ret) { +- printf("%s: tcpc port2 init failed, err=%d\n", +- __func__, ret); +- } else if (tcpc_pd_sink_check_charging(&port2)) { +- /* Disable PD for USB1, since USB2 has priority */ +- port1_config.disable_pd = true; +- printf("Power supply on USB2\n"); +- } +- +- debug("tcpc_init port 1\n"); +- ret = tcpc_init(&port1, port1_config, NULL); +- if (ret) { +- printf("%s: tcpc port1 init failed, err=%d\n", +- __func__, ret); +- } else { +- if (!port1_config.disable_pd) +- printf("Power supply on USB1\n"); +- return ret; +- } +- +- return ret; +-} +- + int board_usb_init(int index, enum usb_init_type init) + { +- int ret = 0; +- struct tcpc_port *port_ptr; +- + debug("board_usb_init %d, type %d\n", index, init); + +- if (index == 0) +- port_ptr = &port1; +- else +- port_ptr = &port2; +- + imx8m_usb_power(index, true); + +- if (init == USB_INIT_HOST) +- tcpc_setup_dfp_mode(port_ptr); +- else +- tcpc_setup_ufp_mode(port_ptr); +- +- return ret; ++ return 0; + } + + int board_usb_cleanup(int index, enum usb_init_type init) + { +- int ret = 0; +- + debug("board_usb_cleanup %d, type %d\n", index, init); + +- if (init == USB_INIT_HOST) { +- if (index == 0) +- ret = tcpc_disable_src_vbus(&port1); +- else +- ret = tcpc_disable_src_vbus(&port2); +- } +- + imx8m_usb_power(index, false); +- return ret; +-} + +-int board_ehci_usb_phy_mode(struct udevice *dev) +-{ +- int ret = 0; +- enum typec_cc_polarity pol; +- enum typec_cc_state state; +- struct tcpc_port *port_ptr; +- +- if (dev->seq == 0) +- port_ptr = &port1; +- else +- port_ptr = &port2; +- +- tcpc_setup_ufp_mode(port_ptr); +- +- ret = tcpc_get_cc_status(port_ptr, &pol, &state); +- if (!ret) { +- if (state == TYPEC_STATE_SRC_RD_RA || state == TYPEC_STATE_SRC_RD) +- return USB_INIT_HOST; +- } +- +- return USB_INIT_DEVICE; ++ return 0; + } +- +-#endif +- + int board_init(void) + { + +-#ifdef CONFIG_USB_TCPC +- setup_typec(); +-#endif +- +-#ifdef CONFIG_MXC_SPI +- setup_spi(); +-#endif +- + #ifdef CONFIG_FEC_MXC + setup_fec(); + #endif +- +-#ifdef CONFIG_FSL_FSPI +- board_qspi_init(); +-#endif +- +-#ifdef CONFIG_NAND_MXS +- setup_gpmi_nand(); /* SPL will call the board_early_init_f */ +-#endif + return 0; + } + + int board_mmc_get_env_dev(int devno) + { +- const ulong user_env_devno = env_get_hex("env_mmcdev", ULONG_MAX); ++ const ulong user_env_devno = env_get_hex("env_dev", ULONG_MAX); + if (user_env_devno != ULONG_MAX) { +- printf("User Environment DevNo is set: Save environmet on MMC(%lu)\n", user_env_devno); ++ printf("User Environment dev# is (%lu)\n", user_env_devno); + return (int)user_env_devno; + } +- else { +- return devno - 1; +- } ++ return devno; + } + +-int mmc_map_to_kernel_blk(int devno) ++static int _mmc_get_env_part(void) + { +- return devno + 1; +-} +- +-#ifdef CONFIG_VIDEO_MXS +- +-#define ADV7535_MAIN 0x3d +-#define ADV7535_DSI_CEC 0x3c +- +-static const struct sec_mipi_dsim_plat_data imx8mm_mipi_dsim_plat_data = { +- .version = 0x1060200, +- .max_data_lanes = 4, +- .max_data_rate = 1500000000ULL, +- .reg_base = MIPI_DSI_BASE_ADDR, +- .gpr_base = CSI_BASE_ADDR + 0x8000, +-}; +- +-static int adv7535_i2c_reg_write(struct udevice *dev, uint addr, uint mask, uint data) +-{ +- uint8_t valb; +- int err; +- +- if (mask != 0xff) { +- err = dm_i2c_read(dev, addr, &valb, 1); +- if (err) +- return err; +- +- valb &= ~mask; +- valb |= data; +- } else { +- valb = data; ++ const ulong user_env_part = env_get_hex("env_part", ULONG_MAX); ++ if (user_env_part != ULONG_MAX) { ++ printf("User Environment part# is (%lu)\n", user_env_part); ++ return (int)user_env_part; + } +- +- err = dm_i2c_write(dev, addr, &valb, 1); +- return err; ++ return CONFIG_SYS_MMC_ENV_PART; + } + +-static int adv7535_i2c_reg_read(struct udevice *dev, uint8_t addr, uint8_t *data) ++uint mmc_get_env_part(struct mmc *mmc) + { +- uint8_t valb; +- int err; ++ if (mmc->part_support) ++ return _mmc_get_env_part(); + +- err = dm_i2c_read(dev, addr, &valb, 1); +- if (err) +- return err; +- +- *data = (int)valb; + return 0; + } + +-static void adv7535_init(void) +-{ +- struct udevice *bus, *main_dev, *cec_dev; +- int i2c_bus = 1; +- int ret; +- uint8_t val; +- +- ret = uclass_get_device_by_seq(UCLASS_I2C, i2c_bus, &bus); +- if (ret) { +- printf("%s: No bus %d\n", __func__, i2c_bus); +- return; +- } +- +- ret = dm_i2c_probe(bus, ADV7535_MAIN, 0, &main_dev); +- if (ret) { +- printf("%s: Can't find device id=0x%x, on bus %d\n", +- __func__, ADV7535_MAIN, i2c_bus); +- return; +- } +- +- ret = dm_i2c_probe(bus, ADV7535_DSI_CEC, 0, &cec_dev); +- if (ret) { +- printf("%s: Can't find device id=0x%x, on bus %d\n", +- __func__, ADV7535_MAIN, i2c_bus); +- return; +- } +- +- adv7535_i2c_reg_read(main_dev, 0x00, &val); +- debug("Chip revision: 0x%x (expected: 0x14)\n", val); +- adv7535_i2c_reg_read(cec_dev, 0x00, &val); +- debug("Chip ID MSB: 0x%x (expected: 0x75)\n", val); +- adv7535_i2c_reg_read(cec_dev, 0x01, &val); +- debug("Chip ID LSB: 0x%x (expected: 0x33)\n", val); +- +- /* Power */ +- adv7535_i2c_reg_write(main_dev, 0x41, 0xff, 0x10); +- /* Initialisation (Fixed) Registers */ +- adv7535_i2c_reg_write(main_dev, 0x16, 0xff, 0x20); +- adv7535_i2c_reg_write(main_dev, 0x9A, 0xff, 0xE0); +- adv7535_i2c_reg_write(main_dev, 0xBA, 0xff, 0x70); +- adv7535_i2c_reg_write(main_dev, 0xDE, 0xff, 0x82); +- adv7535_i2c_reg_write(main_dev, 0xE4, 0xff, 0x40); +- adv7535_i2c_reg_write(main_dev, 0xE5, 0xff, 0x80); +- adv7535_i2c_reg_write(cec_dev, 0x15, 0xff, 0xD0); +- adv7535_i2c_reg_write(cec_dev, 0x17, 0xff, 0xD0); +- adv7535_i2c_reg_write(cec_dev, 0x24, 0xff, 0x20); +- adv7535_i2c_reg_write(cec_dev, 0x57, 0xff, 0x11); +- /* 4 x DSI Lanes */ +- adv7535_i2c_reg_write(cec_dev, 0x1C, 0xff, 0x40); +- +- /* DSI Pixel Clock Divider */ +- adv7535_i2c_reg_write(cec_dev, 0x16, 0xff, 0x18); +- +- /* Enable Internal Timing Generator */ +- adv7535_i2c_reg_write(cec_dev, 0x27, 0xff, 0xCB); +- /* 1920 x 1080p 60Hz */ +- adv7535_i2c_reg_write(cec_dev, 0x28, 0xff, 0x89); /* total width */ +- adv7535_i2c_reg_write(cec_dev, 0x29, 0xff, 0x80); /* total width */ +- adv7535_i2c_reg_write(cec_dev, 0x2A, 0xff, 0x02); /* hsync */ +- adv7535_i2c_reg_write(cec_dev, 0x2B, 0xff, 0xC0); /* hsync */ +- adv7535_i2c_reg_write(cec_dev, 0x2C, 0xff, 0x05); /* hfp */ +- adv7535_i2c_reg_write(cec_dev, 0x2D, 0xff, 0x80); /* hfp */ +- adv7535_i2c_reg_write(cec_dev, 0x2E, 0xff, 0x09); /* hbp */ +- adv7535_i2c_reg_write(cec_dev, 0x2F, 0xff, 0x40); /* hbp */ +- +- adv7535_i2c_reg_write(cec_dev, 0x30, 0xff, 0x46); /* total height */ +- adv7535_i2c_reg_write(cec_dev, 0x31, 0xff, 0x50); /* total height */ +- adv7535_i2c_reg_write(cec_dev, 0x32, 0xff, 0x00); /* vsync */ +- adv7535_i2c_reg_write(cec_dev, 0x33, 0xff, 0x50); /* vsync */ +- adv7535_i2c_reg_write(cec_dev, 0x34, 0xff, 0x00); /* vfp */ +- adv7535_i2c_reg_write(cec_dev, 0x35, 0xff, 0x40); /* vfp */ +- adv7535_i2c_reg_write(cec_dev, 0x36, 0xff, 0x02); /* vbp */ +- adv7535_i2c_reg_write(cec_dev, 0x37, 0xff, 0x40); /* vbp */ +- +- /* Reset Internal Timing Generator */ +- adv7535_i2c_reg_write(cec_dev, 0x27, 0xff, 0xCB); +- adv7535_i2c_reg_write(cec_dev, 0x27, 0xff, 0x8B); +- adv7535_i2c_reg_write(cec_dev, 0x27, 0xff, 0xCB); +- +- /* HDMI Output */ +- adv7535_i2c_reg_write(main_dev, 0xAF, 0xff, 0x16); +- /* AVI Infoframe - RGB - 16-9 Aspect Ratio */ +- adv7535_i2c_reg_write(main_dev, 0x55, 0xff, 0x02); +- adv7535_i2c_reg_write(main_dev, 0x56, 0xff, 0x0); +- +- /* GC Packet Enable */ +- adv7535_i2c_reg_write(main_dev, 0x40, 0xff, 0x0); +- /* GC Colour Depth - 24 Bit */ +- adv7535_i2c_reg_write(main_dev, 0x4C, 0xff, 0x0); +- /* Down Dither Output Colour Depth - 8 Bit (default) */ +- adv7535_i2c_reg_write(main_dev, 0x49, 0xff, 0x00); +- +- /* set low refresh 1080p30 */ +- adv7535_i2c_reg_write(main_dev, 0x4A, 0xff, 0x80); /*should be 0x80 for 1080p60 and 0x8c for 1080p30*/ +- +- /* HDMI Output Enable */ +- adv7535_i2c_reg_write(cec_dev, 0xbe, 0xff, 0x3c); +- adv7535_i2c_reg_write(cec_dev, 0x03, 0xff, 0x89); ++int mmc_map_to_kernel_blk(int devno){ ++ return devno; + } + +-#define DISPLAY_MIX_SFT_RSTN_CSR 0x00 +-#define DISPLAY_MIX_CLK_EN_CSR 0x04 +- +- /* 'DISP_MIX_SFT_RSTN_CSR' bit fields */ +-#define BUS_RSTN_BLK_SYNC_SFT_EN BIT(6) +- +- /* 'DISP_MIX_CLK_EN_CSR' bit fields */ +-#define LCDIF_PIXEL_CLK_SFT_EN BIT(7) +-#define LCDIF_APB_CLK_SFT_EN BIT(6) +- +-void disp_mix_bus_rstn_reset(ulong gpr_base, bool reset) +-{ +- if (!reset) +- /* release reset */ +- setbits_le32(gpr_base + DISPLAY_MIX_SFT_RSTN_CSR, BUS_RSTN_BLK_SYNC_SFT_EN); +- else +- /* hold reset */ +- clrbits_le32(gpr_base + DISPLAY_MIX_SFT_RSTN_CSR, BUS_RSTN_BLK_SYNC_SFT_EN); +-} +- +-void disp_mix_lcdif_clks_enable(ulong gpr_base, bool enable) ++static void board_bootdev_init(void) + { +- if (enable) +- /* enable lcdif clks */ +- setbits_le32(gpr_base + DISPLAY_MIX_CLK_EN_CSR, LCDIF_PIXEL_CLK_SFT_EN | LCDIF_APB_CLK_SFT_EN); +- else +- /* disable lcdif clks */ +- clrbits_le32(gpr_base + DISPLAY_MIX_CLK_EN_CSR, LCDIF_PIXEL_CLK_SFT_EN | LCDIF_APB_CLK_SFT_EN); +-} +- +-struct mipi_dsi_client_dev adv7535_dev = { +- .channel = 0, +- .lanes = 4, +- .format = MIPI_DSI_FMT_RGB888, +- .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | +- MIPI_DSI_MODE_EOT_PACKET | MIPI_DSI_MODE_VIDEO_HSE, +- .name = "ADV7535", +-}; +- +-struct mipi_dsi_client_dev rm67191_dev = { +- .channel = 0, +- .lanes = 4, +- .format = MIPI_DSI_FMT_RGB888, +- .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | +- MIPI_DSI_MODE_EOT_PACKET | MIPI_DSI_MODE_VIDEO_HSE, +-}; +- +-#define FSL_SIP_GPC 0xC2000000 +-#define FSL_SIP_CONFIG_GPC_PM_DOMAIN 0x3 +-#define DISPMIX 9 +-#define MIPI 10 +- +-void do_enable_mipi2hdmi(struct display_info_t const *dev) +-{ +- gpio_request(IMX_GPIO_NR(1, 8), "DSI EN"); +- gpio_direction_output(IMX_GPIO_NR(1, 8), 1); +- +- /* ADV7353 initialization */ +- adv7535_init(); +- +- /* enable the dispmix & mipi phy power domain */ +- call_imx_sip(FSL_SIP_GPC, FSL_SIP_CONFIG_GPC_PM_DOMAIN, DISPMIX, true, 0); +- call_imx_sip(FSL_SIP_GPC, FSL_SIP_CONFIG_GPC_PM_DOMAIN, MIPI, true, 0); +- +- /* Put lcdif out of reset */ +- disp_mix_bus_rstn_reset(imx8mm_mipi_dsim_plat_data.gpr_base, false); +- disp_mix_lcdif_clks_enable(imx8mm_mipi_dsim_plat_data.gpr_base, true); +- +- /* Setup mipi dsim */ +- sec_mipi_dsim_setup(&imx8mm_mipi_dsim_plat_data); +- imx_mipi_dsi_bridge_attach(&adv7535_dev); /* attach adv7535 device */ +-} +- +-void do_enable_mipi_led(struct display_info_t const *dev) +-{ +- gpio_request(IMX_GPIO_NR(1, 8), "DSI EN"); +- gpio_direction_output(IMX_GPIO_NR(1, 8), 0); +- mdelay(100); +- gpio_direction_output(IMX_GPIO_NR(1, 8), 1); +- +- /* enable the dispmix & mipi phy power domain */ +- call_imx_sip(FSL_SIP_GPC, FSL_SIP_CONFIG_GPC_PM_DOMAIN, DISPMIX, true, 0); +- call_imx_sip(FSL_SIP_GPC, FSL_SIP_CONFIG_GPC_PM_DOMAIN, MIPI, true, 0); +- +- /* Put lcdif out of reset */ +- disp_mix_bus_rstn_reset(imx8mm_mipi_dsim_plat_data.gpr_base, false); +- disp_mix_lcdif_clks_enable(imx8mm_mipi_dsim_plat_data.gpr_base, true); +- +- /* Setup mipi dsim */ +- sec_mipi_dsim_setup(&imx8mm_mipi_dsim_plat_data); +- +- rm67191_init(); +- rm67191_dev.name = displays[1].mode.name; +- imx_mipi_dsi_bridge_attach(&rm67191_dev); /* attach rm67191 device */ +-} +- +-void board_quiesce_devices(void) +-{ +- gpio_request(IMX_GPIO_NR(1, 8), "DSI EN"); +- gpio_direction_output(IMX_GPIO_NR(1, 8), 0); ++ u32 bootdev = get_boot_device(); ++ switch (bootdev) { ++ case MMC3_BOOT: ++ bootdev = 2; ++ break; ++ case SD2_BOOT: ++ bootdev = 1; ++ break; ++ default: ++ env_set("bootdev", NULL); ++ return; ++ } ++ env_set_ulong("bootdev", bootdev); + } + +-struct display_info_t const displays[] = {{ +- .bus = LCDIF_BASE_ADDR, +- .addr = 0, +- .pixfmt = 24, +- .detect = NULL, +- .enable = do_enable_mipi2hdmi, +- .mode = { +- .name = "MIPI2HDMI", +- .refresh = 60, +- .xres = 1920, +- .yres = 1080, +- .pixclock = 6734, /* 148500000 */ +- .left_margin = 148, +- .right_margin = 88, +- .upper_margin = 36, +- .lower_margin = 4, +- .hsync_len = 44, +- .vsync_len = 5, +- .sync = FB_SYNC_EXT, +- .vmode = FB_VMODE_NONINTERLACED +- +-} }, { +- .bus = LCDIF_BASE_ADDR, +- .addr = 0, +- .pixfmt = 24, +- .detect = NULL, +- .enable = do_enable_mipi_led, +- .mode = { +- .name = "RM67191_OLED", +- .refresh = 60, +- .xres = 1080, +- .yres = 1920, +- .pixclock = 7575, /* 132000000 */ +- .left_margin = 34, +- .right_margin = 20, +- .upper_margin = 4, +- .lower_margin = 10, +- .hsync_len = 2, +- .vsync_len = 2, +- .sync = FB_SYNC_EXT, +- .vmode = FB_VMODE_NONINTERLACED +- +-} } }; +-size_t display_count = ARRAY_SIZE(displays); +-#endif +- + int board_late_init(void) + { + int ret; + + #ifdef CONFIG_ENV_IS_IN_MMC + board_late_mmc_env_init(); ++ board_bootdev_init(); + #endif + + ret = setup_mac_address(); +diff --git a/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.h b/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.h +deleted file mode 100644 +index c3380cb5ef..0000000000 +--- a/board/compulab/ucm-imx8m-mini/ucm-imx8m-mini.h ++++ /dev/null +@@ -1,18 +0,0 @@ +-/* +- * Copyright 2017 NXP +- * +- * SPDX-License-Identifier: GPL-2.0+ +- */ +- +-#ifndef __UCM_IMX8M_MINI__ +-#define __UCM_IMX8M_MINI__ +- +-#define TCM_DATA_CFG 0x7e0000 +-struct lpddr4_tcm_desc { +- unsigned int size; +- unsigned int sign; +- unsigned int index; +- unsigned int count; +-}; +- +-#endif +diff --git a/configs/ucm-imx8m-mini_defconfig b/configs/ucm-imx8m-mini_defconfig +index 3eb63bf1e6..77b68b8e49 100644 +--- a/configs/ucm-imx8m-mini_defconfig ++++ b/configs/ucm-imx8m-mini_defconfig +@@ -1,75 +1,101 @@ +-CONFIG_LOCALVERSION="-rel.1.3.2-rc0" + CONFIG_ARM=y ++CONFIG_SPL_SYS_ICACHE_OFF=y ++CONFIG_SPL_SYS_DCACHE_OFF=y + CONFIG_ARCH_IMX8M=y + CONFIG_SYS_TEXT_BASE=0x40200000 +-CONFIG_SYS_MALLOC_F_LEN=0x2000 ++CONFIG_SPL_GPIO_SUPPORT=y ++CONFIG_ENV_SIZE=0x1000 ++CONFIG_ENV_OFFSET=0x4400 ++CONFIG_DM_GPIO=y + CONFIG_TARGET_UCM_IMX8M_MINI=y ++CONFIG_DEFAULT_DTB="ucm-imx8m-mini.dtb" + CONFIG_SPL_MMC_SUPPORT=y +-# CONFIG_IMX_OPTEE is not set +-CONFIG_DEFAULT_DEVICE_TREE="ucm-imx8m-mini" ++CONFIG_SPL_SERIAL_SUPPORT=y ++CONFIG_SPL=y ++CONFIG_CSF_SIZE=0x2000 ++CONFIG_SPL_TEXT_BASE=0x7E1000 + CONFIG_FIT=y ++CONFIG_FIT_EXTERNAL_OFFSET=0x3000 + CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh" +-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage.cfg,SPL_TEXT_BASE=0x7E1000" ++CONFIG_OF_SYSTEM_SETUP=y ++CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg" ++CONFIG_CONSOLE_MUX=y + CONFIG_SPL_LOAD_FIT=y + CONFIG_DEFAULT_FDT_FILE="ucm-imx8m-mini.dtb" ++CONFIG_BOARD_LATE_INIT=y + CONFIG_ARCH_MISC_INIT=y +-CONFIG_SPL=y +-CONFIG_SPL_SERIAL_SUPPORT=y ++CONFIG_BOARD_EARLY_INIT_F=y + CONFIG_SPL_BOARD_INIT=y ++CONFIG_SPL_SEPARATE_BSS=y ++CONFIG_SPL_POWER_SUPPORT=y + CONFIG_HUSH_PARSER=y +-CONFIG_FASTBOOT=y +-CONFIG_FSL_FASTBOOT=y +-CONFIG_FASTBOOT_BUF_ADDR=0x42800000 +-CONFIG_FASTBOOT_BUF_SIZE=0x40000000 +-CONFIG_FASTBOOT_FLASH=y +-CONFIG_FASTBOOT_FLASH_MMC_DEV=0 ++CONFIG_SYS_PROMPT="u-boot=> " ++# CONFIG_BOOTM_NETBSD is not set + CONFIG_CMD_EEPROM=y + CONFIG_CMD_EEPROM_LAYOUT=y + CONFIG_CMD_MEMINFO=y + CONFIG_CMD_MEMTEST=y ++config_cmd_clk=y ++config_cmd_fuse=y + CONFIG_CMD_GPIO=y + CONFIG_CMD_I2C=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_DHCP=y ++CONFIG_CMD_MII=y ++CONFIG_CMD_PING=y + CONFIG_CMD_CACHE=y +-# CONFIG_CMD_LED is not set + CONFIG_CMD_REGULATOR=y + CONFIG_CMD_EXT2=y + CONFIG_CMD_EXT4=y + CONFIG_CMD_FAT=y + CONFIG_CMD_FS_GENERIC=y + CONFIG_EFI_PARTITION=y +-CONFIG_PARTITION_TYPE_GUID=y + CONFIG_OF_CONTROL=y ++CONFIG_DEFAULT_DEVICE_TREE="ucm-imx8m-mini" + CONFIG_ENV_IS_IN_MMC=y +-CONFIG_IMX8M_LPDDR4=y +-CONFIG_DM_GPIO=y ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y ++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y ++CONFIG_REGMAP=y ++CONFIG_SYSCON=y ++CONFIG_CLK_COMPOSITE_CCF=y ++CONFIG_CLK_IMX8MM=y ++CONFIG_MXC_GPIO=y ++CONFIG_DM_I2C=y + CONFIG_SYS_I2C_MXC=y +-CONFIG_LED=y +-CONFIG_LED_STATUS=y +-CONFIG_LED_STATUS_GPIO=y +-CONFIG_LED_STATUS0=y +-CONFIG_LED_STATUS_BIT=12 + CONFIG_DM_MMC=y +-CONFIG_DM_SPI_FLASH=y +-CONFIG_SPI_FLASH=y +-CONFIG_SPI_FLASH_STMICRO=y ++CONFIG_SUPPORT_EMMC_BOOT=y ++CONFIG_MMC_IO_VOLTAGE=y ++CONFIG_MMC_UHS_SUPPORT=y ++CONFIG_MMC_HS400_ES_SUPPORT=y ++CONFIG_MMC_HS400_SUPPORT=y ++CONFIG_FSL_ESDHC_IMX=y + CONFIG_DM_ETH=y +-CONFIG_USB_HOST_ETHER=y +-CONFIG_USB_ETHER_ASIX88179=y ++CONFIG_FEC_MXC=y ++CONFIG_MII=y + CONFIG_PINCTRL=y + CONFIG_PINCTRL_IMX8M=y + CONFIG_DM_REGULATOR=y + CONFIG_DM_REGULATOR_FIXED=y + CONFIG_DM_REGULATOR_GPIO=y +-CONFIG_DM_SPI=y ++CONFIG_DM_RESET=y ++CONFIG_MXC_UART=y ++CONFIG_SYSRESET=y ++CONFIG_SYSRESET_PSCI=y + CONFIG_DM_THERMAL=y ++CONFIG_NXP_TMU=y + CONFIG_USB=y + CONFIG_DM_USB=y + CONFIG_USB_EHCI_HCD=y + CONFIG_USB_GADGET=y +-CONFIG_USB_GADGET_DOWNLOAD=y + CONFIG_USB_GADGET_MANUFACTURER="FSL" + CONFIG_USB_GADGET_VENDOR_NUM=0x0525 + CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 ++CONFIG_CI_UDC=y + CONFIG_SDP_LOADADDR=0x40400000 +-CONFIG_NR_DRAM_BANKS=4 +-CONFIG_SPL_GPIO_SUPPORT=y ++CONFIG_USB_GADGET_DOWNLOAD=y ++CONFIG_USB_HOST_ETHER=y ++CONFIG_USB_ETHER_ASIX88179=y ++CONFIG_EXT4_WRITE=y ++CONFIG_FAT_WRITE=y ++CONFIG_OF_LIBFDT_OVERLAY=y ++# CONFIG_EFI_LOADER is not set +diff --git a/include/configs/ucm-imx8m-mini.h b/include/configs/ucm-imx8m-mini.h +index ad4e7997b1..75c6102f10 100644 +--- a/include/configs/ucm-imx8m-mini.h ++++ b/include/configs/ucm-imx8m-mini.h +@@ -1,5 +1,5 @@ + /* +- * Copyright 2018 CompuLab ++ * Copyright 2020 CompuLab + * + * SPDX-License-Identifier: GPL-2.0+ + */ +@@ -9,13 +9,8 @@ + + #include + #include +- + #include "imx_env.h" + +-#ifdef CONFIG_SECURE_BOOT +-#define CONFIG_CSF_SIZE 0x2000 /* 8K region */ +-#endif +- + #define CONFIG_SPL_MAX_SIZE (148 * 1024) + #define CONFIG_SYS_MONITOR_LEN (512 * 1024) + #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR +@@ -26,20 +21,19 @@ + #ifdef CONFIG_SPL_BUILD + /*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/ + #define CONFIG_SPL_WATCHDOG_SUPPORT +-#define CONFIG_SPL_POWER_SUPPORT + #define CONFIG_SPL_DRIVERS_MISC_SUPPORT + #define CONFIG_SPL_I2C_SUPPORT +-#define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/armv8/u-boot-spl.lds" +-#define CONFIG_SPL_STACK 0x91fff0 + #define CONFIG_SPL_LIBCOMMON_SUPPORT + #define CONFIG_SPL_LIBGENERIC_SUPPORT +-#define CONFIG_SPL_BSS_START_ADDR 0x00910000 +-#define CONFIG_SPL_BSS_MAX_SIZE 0x2000 /* 8 KB */ +-#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 +-#define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000 /* 512 KB */ +-#define CONFIG_SYS_ICACHE_OFF +-#define CONFIG_SYS_DCACHE_OFF +-#define CONFIG_MALLOC_F_ADDR 0x912000 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ ++ ++#define CONFIG_SPL_STACK 0x920000 ++#define CONFIG_SPL_BSS_START_ADDR 0x910000 ++#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K ++#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 ++#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K ++ ++/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ ++#define CONFIG_MALLOC_F_ADDR 0x912000 + + #define CONFIG_SPL_ABORT_ON_RAW_IMAGE /* For RAW image gives a error info not panic */ + +@@ -56,10 +50,6 @@ + #define CONFIG_POWER_I2C + #define CONFIG_POWER_BD71837 + +-#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +-#else /*ifdef CONFIG_SPL_BUILD*/ +-#define CONFIG_DM_I2C_COMPAT +-#define CONFIG_DM_I2C + #endif /*ifdef CONFIG_SPL_BUILD*/ + + #define CONFIG_CMD_READ +@@ -68,9 +58,7 @@ + + #define CONFIG_REMAKE_ELF + +-#define CONFIG_BOARD_EARLY_INIT_F + #define CONFIG_BOARD_POSTCLK_INIT +-#define CONFIG_BOARD_LATE_INIT + + /* Flat Device Tree Definitions */ + #define CONFIG_OF_BOARD_SETUP +@@ -83,13 +71,8 @@ + /* ENET Config */ + /* ENET1 */ + #if defined(CONFIG_CMD_NET) +-#define CONFIG_CMD_PING +-#define CONFIG_CMD_DHCP +-#define CONFIG_CMD_MII +-#define CONFIG_MII + #define CONFIG_ETHPRIME "FEC" + +-#define CONFIG_FEC_MXC + #define CONFIG_FEC_XCV_TYPE RGMII + #define CONFIG_FEC_MXC_PHYADDR 0 + #define FEC_QUIRK_ENET_MAC +@@ -126,19 +109,20 @@ + "fdt_addr=0x43000000\0" \ + "fdt_high=0xffffffffffffffff\0" \ + "boot_fdt=yes\0" \ +- "fdt_file="CONFIG_DEFAULT_DEVICE_TREE".dtb\0" \ ++ "fdt_file="CONFIG_DEFAULT_DTB"\0" \ + "initrd_addr=0x43800000\0" \ + "initrd_high=0xffffffffffffffff\0" \ + "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ + "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ + "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ + "mmcautodetect=yes\0" \ +- "emmc_ul=setenv iface mmc; setenv dev 1; setenv part 1;" \ +- "setenv bootargs console=${console} root=/dev/mmcblk2p2 rw rootwait;\0" \ +- "sd_ul=setenv iface mmc; setenv dev 0; setenv part 1;" \ +- "setenv bootargs console=${console} root=/dev/mmcblk1p2 rw rootwait;\0" \ ++ "root_opt=rootwait rw\0" \ ++ "emmc_ul=setenv iface mmc; setenv dev 2; setenv part 1;" \ ++ "setenv bootargs console=${console} root=/dev/mmcblk2p2 ${root_opt};\0" \ ++ "sd_ul=setenv iface mmc; setenv dev 1; setenv part 1;" \ ++ "setenv bootargs console=${console} root=/dev/mmcblk1p2 ${root_opt};\0" \ + "usb_ul=usb start; setenv iface usb; setenv dev 0; setenv part 1;" \ +- "setenv bootargs console=${console} root=/dev/sda2 rw rootwait;\0" \ ++ "setenv bootargs console=${console} root=/dev/sda2 ${root_opt};\0" \ + "ulbootscript=load ${iface} ${dev}:${part} ${loadaddr} ${script};\0" \ + "ulimage=load ${iface} ${dev}:${part} ${loadaddr} ${image}\0" \ + "ulfdt=if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ +@@ -197,9 +181,8 @@ + (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) + + #define CONFIG_ENV_OVERWRITE +-#define CONFIG_ENV_OFFSET (34 * 512) /* Max possible GPT size */ +-#define CONFIG_ENV_SIZE 0x1000 +-#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC2 */ ++#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */ ++#define CONFIG_SYS_MMC_ENV_PART 1 + #define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */ + + /* Size of malloc() pool */ +@@ -220,7 +203,6 @@ + + #define CONFIG_BAUDRATE 115200 + +-#define CONFIG_MXC_UART + #define CONFIG_MXC_UART_BASE UART3_BASE_ADDR + + /* Monitor Command Prompt */ +@@ -233,30 +215,16 @@ + #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ + sizeof(CONFIG_SYS_PROMPT) + 16) + +-#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */ + #define CONFIG_SYS_MMC_IMG_LOAD_PART 1 + +-#define CONFIG_MXC_OCOTP +-#define CONFIG_CMD_FUSE +- + #define CONFIG_IMX_BOOTAUX + + /* USDHC */ +-#define CONFIG_CMD_MMC +-#define CONFIG_FSL_ESDHC + #define CONFIG_FSL_USDHC + + #define CONFIG_SYS_FSL_USDHC_NUM 2 + #define CONFIG_SYS_FSL_ESDHC_ADDR 0 + +-#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */ +-#define CONFIG_SYS_MMC_IMG_LOAD_PART 1 +- +-#define CONFIG_MXC_GPIO +- +-#define CONFIG_MXC_OCOTP +-#define CONFIG_CMD_FUSE +- + #ifndef CONFIG_DM_I2C + #define CONFIG_SYS_I2C + #endif +@@ -286,11 +254,8 @@ + + #endif + +-#define CONFIG_USB_GADGET_DUALSPEED + #define CONFIG_USB_GADGET_VBUS_DRAW 2 + +-#define CONFIG_CI_UDC +- + #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) + #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 + +@@ -307,7 +272,8 @@ + #define CONFIG_RM67191 + #endif + +-#define CONFIG_OF_SYSTEM_SETUP ++#define CONFIG_BOARD_POSTCLK_INIT ++#define CONFIG_OF_BOARD_SETUP + + #if defined(CONFIG_ANDROID_SUPPORT) + #include "ucm-imx8m-mini_android.h" +-- +2.11.0 + diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0055-cpl-imx8m-mini-Set-LOCALVERSION-intead-of-EXTRAVERSI.patch b/recipes-bsp/u-boot/compulab/imx8mm/0055-cpl-imx8m-mini-Set-LOCALVERSION-intead-of-EXTRAVERSI.patch new file mode 100644 index 0000000..77e3ed6 --- /dev/null +++ b/recipes-bsp/u-boot/compulab/imx8mm/0055-cpl-imx8m-mini-Set-LOCALVERSION-intead-of-EXTRAVERSI.patch @@ -0,0 +1,53 @@ +From 6bce15eb561907ce960577ca4dc2eb2a00394107 Mon Sep 17 00:00:00 2001 +From: Kirill Kapranov +Date: Mon, 19 Jul 2021 15:06:14 +0300 +Subject: [PATCH 055/126] cpl-imx8m-mini: Set LOCALVERSION intead of + EXTRAVERSION + +Signed-off-by: Kirill Kapranov +--- + Makefile | 2 +- + configs/mcm-imx8m-mini_defconfig | 1 + + configs/ucm-imx8m-mini_defconfig | 1 + + 3 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 22d2230a6f..0451f445f6 100644 +--- a/Makefile ++++ b/Makefile +@@ -3,7 +3,7 @@ + VERSION = 2021 + PATCHLEVEL = 04 + SUBLEVEL = +-EXTRAVERSION = -mcm-imx8m-mini-1.0 ++EXTRAVERSION = + NAME = + + # *DOCUMENTATION* +diff --git a/configs/mcm-imx8m-mini_defconfig b/configs/mcm-imx8m-mini_defconfig +index 92cdad293d..a4c3c90f83 100644 +--- a/configs/mcm-imx8m-mini_defconfig ++++ b/configs/mcm-imx8m-mini_defconfig +@@ -13,6 +13,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y + CONFIG_SPL=y + CONFIG_CSF_SIZE=0x2000 + CONFIG_SPL_TEXT_BASE=0x7E1000 ++CONFIG_LOCALVERSION="-mcm-imx8m-mini-1.0" + CONFIG_FIT=y + CONFIG_FIT_EXTERNAL_OFFSET=0x3000 + CONFIG_SPL_LOAD_FIT=y +diff --git a/configs/ucm-imx8m-mini_defconfig b/configs/ucm-imx8m-mini_defconfig +index 77b68b8e49..2c98eaa256 100644 +--- a/configs/ucm-imx8m-mini_defconfig ++++ b/configs/ucm-imx8m-mini_defconfig +@@ -14,6 +14,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y + CONFIG_SPL=y + CONFIG_CSF_SIZE=0x2000 + CONFIG_SPL_TEXT_BASE=0x7E1000 ++CONFIG_LOCALVERSION="-ucm-imx8m-mini-2.0" + CONFIG_FIT=y + CONFIG_FIT_EXTERNAL_OFFSET=0x3000 + CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh" +-- +2.11.0 + diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0056-cpl-imx8m-mini-Refactor-.h-configs.patch b/recipes-bsp/u-boot/compulab/imx8mm/0056-cpl-imx8m-mini-Refactor-.h-configs.patch new file mode 100644 index 0000000..990f97b --- /dev/null +++ b/recipes-bsp/u-boot/compulab/imx8mm/0056-cpl-imx8m-mini-Refactor-.h-configs.patch @@ -0,0 +1,852 @@ +From 8ce4046b2b4a29a5158e904f11c128b9c42ea5a9 Mon Sep 17 00:00:00 2001 +From: Kirill Kapranov +Date: Mon, 19 Jul 2021 15:46:11 +0300 +Subject: [PATCH 056/126] cpl-imx8m-mini: Refactor .h configs + +Signed-off-by: Kirill Kapranov +--- + include/configs/cpl-imx8m-mini.h | 275 +++++++++++++++++++++++++++++++++++++++ + include/configs/mcm-imx8m-mini.h | 265 +------------------------------------ + include/configs/ucm-imx8m-mini.h | 268 +------------------------------------- + 3 files changed, 277 insertions(+), 531 deletions(-) + create mode 100644 include/configs/cpl-imx8m-mini.h + +diff --git a/include/configs/cpl-imx8m-mini.h b/include/configs/cpl-imx8m-mini.h +new file mode 100644 +index 0000000000..dd8120f4dc +--- /dev/null ++++ b/include/configs/cpl-imx8m-mini.h +@@ -0,0 +1,275 @@ ++/* ++ * Copyright 2020 CompuLab ++ * ++ * SPDX-License-Identifier: GPL-2.0+ ++ */ ++ ++#ifndef __CPL_IMX8M_MINI_H ++#define __CPL_IMX8M_MINI_H ++ ++#include ++#include ++#include "imx_env.h" ++ ++#define CONFIG_SPL_MAX_SIZE (148 * 1024) ++#define CONFIG_SYS_MONITOR_LEN (512 * 1024) ++#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR ++#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 ++#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 ++#define CONFIG_SYS_UBOOT_BASE (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512) ++ ++#ifdef CONFIG_SPL_BUILD ++/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/ ++#define CONFIG_SPL_WATCHDOG_SUPPORT ++#define CONFIG_SPL_DRIVERS_MISC_SUPPORT ++#define CONFIG_SPL_I2C_SUPPORT ++#define CONFIG_SPL_LIBCOMMON_SUPPORT ++#define CONFIG_SPL_LIBGENERIC_SUPPORT ++ ++#define CONFIG_SPL_STACK 0x920000 ++#define CONFIG_SPL_BSS_START_ADDR 0x910000 ++#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K ++#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 ++#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K ++ ++/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ ++#define CONFIG_MALLOC_F_ADDR 0x912000 ++ ++#define CONFIG_SPL_ABORT_ON_RAW_IMAGE /* For RAW image gives a error info not panic */ ++ ++#undef CONFIG_DM_MMC ++#undef CONFIG_DM_PMIC ++#undef CONFIG_DM_PMIC_PFUZE100 ++ ++#define CONFIG_SYS_I2C ++#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ ++#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ ++#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ ++ ++#define CONFIG_POWER ++#define CONFIG_POWER_I2C ++#define CONFIG_POWER_BD71837 ++ ++#endif /*ifdef CONFIG_SPL_BUILD*/ ++ ++#define CONFIG_CMD_READ ++#define CONFIG_SERIAL_TAG ++#define CONFIG_FASTBOOT_USB_DEV 0 ++ ++#define CONFIG_REMAKE_ELF ++ ++#define CONFIG_BOARD_POSTCLK_INIT ++ ++/* Flat Device Tree Definitions */ ++#define CONFIG_OF_BOARD_SETUP ++ ++#undef CONFIG_CMD_IMLS ++ ++#undef CONFIG_CMD_CRC32 ++#undef CONFIG_BOOTM_NETBSD ++ ++/* ENET Config */ ++/* ENET1 */ ++#if defined(CONFIG_CMD_NET) ++#define CONFIG_ETHPRIME "FEC" ++ ++#define CONFIG_FEC_XCV_TYPE RGMII ++#define CONFIG_FEC_MXC_PHYADDR 0 ++#define FEC_QUIRK_ENET_MAC ++ ++#define CONFIG_PHY_GIGE ++#define IMX_FEC_BASE 0x30BE0000 ++ ++#define CONFIG_PHYLIB ++#define CONFIG_PHY_ATHEROS ++#endif ++ ++#define CONFIG_MFG_ENV_SETTINGS \ ++ "mfgtool_args=setenv bootargs console=${console},${baudrate} " \ ++ "rdinit=/linuxrc " \ ++ "g_mass_storage.stall=0 g_mass_storage.removable=1 " \ ++ "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\ ++ "g_mass_storage.iSerialNumber=\"\" "\ ++ "clk_ignore_unused "\ ++ "\0" \ ++ "initrd_addr=0x43800000\0" \ ++ "initrd_high=0xffffffff\0" \ ++ "emmc_dev=1\0" \ ++ "sd_dev=0\0" \ ++ "bootcmd_mfg=run mfgtool_args; if iminfo ${initrd_addr}; then "\ ++ "booti ${loadaddr} ${initrd_addr} ${fdt_addr};"\ ++ "else echo \"Run fastboot ...\"; fastboot 0; fi\0" \ ++/* Initial environment variables */ ++#define CONFIG_EXTRA_ENV_SETTINGS \ ++ CONFIG_MFG_ENV_SETTINGS \ ++ "autoload=off\0" \ ++ "script=boot.scr\0" \ ++ "image=Image\0" \ ++ "console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200\0" \ ++ "fdt_addr=0x43000000\0" \ ++ "fdt_high=0xffffffffffffffff\0" \ ++ "boot_fdt=yes\0" \ ++ "fdt_file="CONFIG_DEFAULT_DTB"\0" \ ++ "initrd_addr=0x43800000\0" \ ++ "initrd_high=0xffffffffffffffff\0" \ ++ "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ ++ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ ++ "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ ++ "mmcautodetect=yes\0" \ ++ "root_opt=rootwait rw\0" \ ++ "emmc_ul=setenv iface mmc; setenv dev 2; setenv part 1;" \ ++ "setenv bootargs console=${console} root=/dev/mmcblk2p2 ${root_opt};\0" \ ++ "sd_ul=setenv iface mmc; setenv dev 1; setenv part 1;" \ ++ "setenv bootargs console=${console} root=/dev/mmcblk1p2 ${root_opt};\0" \ ++ "usb_ul=usb start; setenv iface usb; setenv dev 0; setenv part 1;" \ ++ "setenv bootargs console=${console} root=/dev/sda2 ${root_opt};\0" \ ++ "ulbootscript=load ${iface} ${dev}:${part} ${loadaddr} ${script};\0" \ ++ "ulimage=load ${iface} ${dev}:${part} ${loadaddr} ${image}\0" \ ++ "ulfdt=if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ ++ "load ${iface} ${dev}:${part} ${fdt_addr} ${fdt_file}; fi;\0" \ ++ "bootscript=echo Running bootscript from mmc ...; " \ ++ "source\0" \ ++ "netargs=setenv bootargs console=${console} " \ ++ "root=/dev/nfs " \ ++ "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ ++ "netboot=echo Booting from net ...; " \ ++ "run netargs; " \ ++ "if test ${ip_dyn} = yes; then " \ ++ "setenv get_cmd dhcp; " \ ++ "else " \ ++ "setenv get_cmd tftp; " \ ++ "fi; " \ ++ "${get_cmd} ${loadaddr} ${image}; " \ ++ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ ++ "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ ++ "booti ${loadaddr} - ${fdt_addr}; " \ ++ "else " \ ++ "echo WARN: Cannot load the DT; " \ ++ "fi; " \ ++ "else " \ ++ "booti; " \ ++ "fi;\0" ++#define CONFIG_BOOTCOMMAND \ ++ "for src in sd_ul usb_ul emmc_ul; do " \ ++ "run ${src}; " \ ++ "if run ulbootscript; then " \ ++ "run bootscript; " \ ++ "else " \ ++ "if run ulimage; then " \ ++ "if run ulfdt; then " \ ++ "booti ${loadaddr} - ${fdt_addr}; " \ ++ "else " \ ++ "if test ${boot_fdt} != yes; then " \ ++ "booti ${loadaddr}; " \ ++ "fi; " \ ++ "fi; " \ ++ "fi; " \ ++ "fi; " \ ++ "done; " \ ++ "usb start; ums 0 mmc ${mmcdev};" ++ ++/* Link Definitions */ ++#define CONFIG_LOADADDR 0x40480000 ++ ++#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR ++ ++#define CONFIG_SYS_INIT_RAM_ADDR 0x40000000 ++#define CONFIG_SYS_INIT_RAM_SIZE 0x80000 ++#define CONFIG_SYS_INIT_SP_OFFSET \ ++ (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) ++#define CONFIG_SYS_INIT_SP_ADDR \ ++ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) ++ ++#define CONFIG_ENV_OVERWRITE ++#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */ ++#define CONFIG_SYS_MMC_ENV_PART 1 ++#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */ ++ ++/* Size of malloc() pool */ ++#define CONFIG_SYS_MALLOC_LEN ((CONFIG_ENV_SIZE + (2*1024) + (16*1024)) * 1024) ++ ++#define PHYS_SDRAM 0x40000000 ++#define PHYS_SDRAM_2 0x100000000 ++#define PHYS_SDRAM_SIZE 0 /* Memory chip autodetection */ ++#define PHYS_SDRAM_2_SIZE 0 /* Memory chip autodetection */ ++#define CONFIG_NR_DRAM_BANKS 4 ++#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM ++ ++#define MEMTEST_DIVIDER 2 ++#define MEMTEST_NUMERATOR 1 ++ ++#define CONFIG_BAUDRATE 115200 ++ ++#define CONFIG_MXC_UART_BASE UART3_BASE_ADDR ++ ++/* Monitor Command Prompt */ ++#undef CONFIG_SYS_PROMPT ++#define CONFIG_SYS_PROMPT "u-boot=> " ++#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " ++#define CONFIG_SYS_CBSIZE 2048 ++#define CONFIG_SYS_MAXARGS 64 ++#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE ++#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ ++ sizeof(CONFIG_SYS_PROMPT) + 16) ++ ++#define CONFIG_SYS_MMC_IMG_LOAD_PART 1 ++ ++#define CONFIG_IMX_BOOTAUX ++ ++/* USDHC */ ++#define CONFIG_FSL_USDHC ++ ++#define CONFIG_SYS_FSL_USDHC_NUM 2 ++#define CONFIG_SYS_FSL_ESDHC_ADDR 0 ++ ++#ifndef CONFIG_DM_I2C ++#define CONFIG_SYS_I2C ++#endif ++#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ ++#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ ++#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ ++#define CONFIG_SYS_I2C_SPEED 100000 ++ ++/* EEPROM */ ++#define CONFIG_ENV_EEPROM_IS_ON_I2C ++#define CONFIG_SYS_I2C_EEPROM_BUS 1 ++#define CONFIG_SYS_I2C_SLAVE 0x00 ++#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 ++#define CONFIG_SYS_EEPROM_SIZE 256 ++#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 ++#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 ++ ++/* USB configs */ ++#ifndef CONFIG_SPL_BUILD ++#define CONFIG_CMD_USB ++#define CONFIG_USB_STORAGE ++#define CONFIG_USBD_HS ++ ++#define CONFIG_CMD_USB_MASS_STORAGE ++#define CONFIG_USB_GADGET_MASS_STORAGE ++#define CONFIG_USB_FUNCTION_MASS_STORAGE ++ ++#endif ++ ++#define CONFIG_USB_GADGET_VBUS_DRAW 2 ++ ++#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) ++#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 ++ ++#ifdef CONFIG_VIDEO ++#define CONFIG_VIDEO_MXS ++#define CONFIG_VIDEO_LOGO ++#define CONFIG_SPLASH_SCREEN ++#define CONFIG_SPLASH_SCREEN_ALIGN ++#define CONFIG_CMD_BMP ++#define CONFIG_BMP_16BPP ++#define CONFIG_VIDEO_BMP_RLE8 ++#define CONFIG_VIDEO_BMP_LOGO ++#define CONFIG_IMX_VIDEO_SKIP ++#define CONFIG_RM67191 ++#endif ++ ++#define CONFIG_BOARD_POSTCLK_INIT ++#define CONFIG_OF_BOARD_SETUP ++ ++#endif +diff --git a/include/configs/mcm-imx8m-mini.h b/include/configs/mcm-imx8m-mini.h +index dd0448efca..602091a782 100644 +--- a/include/configs/mcm-imx8m-mini.h ++++ b/include/configs/mcm-imx8m-mini.h +@@ -7,270 +7,7 @@ + #ifndef __MCM_IMX8M_MINI_H + #define __MCM_IMX8M_MINI_H + +-#include +-#include +-#include "imx_env.h" +- +-#define CONFIG_SPL_MAX_SIZE (148 * 1024) +-#define CONFIG_SYS_MONITOR_LEN (512 * 1024) +-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR +-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 +-#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 +-#define CONFIG_SYS_UBOOT_BASE (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512) +- +-#ifdef CONFIG_SPL_BUILD +-/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/ +-#define CONFIG_SPL_WATCHDOG_SUPPORT +-#define CONFIG_SPL_DRIVERS_MISC_SUPPORT +-#define CONFIG_SPL_I2C_SUPPORT +-#define CONFIG_SPL_LIBCOMMON_SUPPORT +-#define CONFIG_SPL_LIBGENERIC_SUPPORT +- +-#define CONFIG_SPL_STACK 0x920000 +-#define CONFIG_SPL_BSS_START_ADDR 0x910000 +-#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K +-#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 +-#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K +- +-/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ +-#define CONFIG_MALLOC_F_ADDR 0x912000 +- +-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE /* For RAW image gives a error info not panic */ +- +-#undef CONFIG_DM_MMC +-#undef CONFIG_DM_PMIC +-#undef CONFIG_DM_PMIC_PFUZE100 +- +-#define CONFIG_SYS_I2C +-#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ +-#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ +-#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ +- +-#define CONFIG_POWER +-#define CONFIG_POWER_I2C +-#define CONFIG_POWER_BD71837 +- +-#endif /*ifdef CONFIG_SPL_BUILD*/ +- +-#define CONFIG_CMD_READ +-#define CONFIG_SERIAL_TAG +-#define CONFIG_FASTBOOT_USB_DEV 0 +- +-#define CONFIG_REMAKE_ELF +- +-#define CONFIG_BOARD_POSTCLK_INIT +- +-/* Flat Device Tree Definitions */ +-#define CONFIG_OF_BOARD_SETUP +- +-#undef CONFIG_CMD_IMLS +- +-#undef CONFIG_CMD_CRC32 +-#undef CONFIG_BOOTM_NETBSD +- +-/* ENET Config */ +-/* ENET1 */ +-#if defined(CONFIG_CMD_NET) +-#define CONFIG_ETHPRIME "FEC" +- +-#define CONFIG_FEC_XCV_TYPE RGMII +-#define CONFIG_FEC_MXC_PHYADDR 0 +-#define FEC_QUIRK_ENET_MAC +- +-#define CONFIG_PHY_GIGE +-#define IMX_FEC_BASE 0x30BE0000 +- +-#define CONFIG_PHYLIB +-#define CONFIG_PHY_ATHEROS +-#endif +- +-#define CONFIG_MFG_ENV_SETTINGS \ +- "mfgtool_args=setenv bootargs console=${console},${baudrate} " \ +- "rdinit=/linuxrc " \ +- "g_mass_storage.stall=0 g_mass_storage.removable=1 " \ +- "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\ +- "g_mass_storage.iSerialNumber=\"\" "\ +- "clk_ignore_unused "\ +- "\0" \ +- "initrd_addr=0x43800000\0" \ +- "initrd_high=0xffffffff\0" \ +- "emmc_dev=1\0" \ +- "sd_dev=0\0" \ +- "bootcmd_mfg=run mfgtool_args; if iminfo ${initrd_addr}; then "\ +- "booti ${loadaddr} ${initrd_addr} ${fdt_addr};"\ +- "else echo \"Run fastboot ...\"; fastboot 0; fi\0" \ +-/* Initial environment variables */ +-#define CONFIG_EXTRA_ENV_SETTINGS \ +- CONFIG_MFG_ENV_SETTINGS \ +- "autoload=off\0" \ +- "script=boot.scr\0" \ +- "image=Image\0" \ +- "console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200\0" \ +- "fdt_addr=0x43000000\0" \ +- "fdt_high=0xffffffffffffffff\0" \ +- "boot_fdt=yes\0" \ +- "fdt_file="CONFIG_DEFAULT_DTB"\0" \ +- "initrd_addr=0x43800000\0" \ +- "initrd_high=0xffffffffffffffff\0" \ +- "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ +- "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ +- "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ +- "mmcautodetect=yes\0" \ +- "root_opt=rootwait rw\0" \ +- "emmc_ul=setenv iface mmc; setenv dev 2; setenv part 1;" \ +- "setenv bootargs console=${console} root=/dev/mmcblk2p2 ${root_opt};\0" \ +- "sd_ul=setenv iface mmc; setenv dev 1; setenv part 1;" \ +- "setenv bootargs console=${console} root=/dev/mmcblk1p2 ${root_opt};\0" \ +- "usb_ul=usb start; setenv iface usb; setenv dev 0; setenv part 1;" \ +- "setenv bootargs console=${console} root=/dev/sda2 ${root_opt};\0" \ +- "ulbootscript=load ${iface} ${dev}:${part} ${loadaddr} ${script};\0" \ +- "ulimage=load ${iface} ${dev}:${part} ${loadaddr} ${image}\0" \ +- "ulfdt=if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ +- "load ${iface} ${dev}:${part} ${fdt_addr} ${fdt_file}; fi;\0" \ +- "bootscript=echo Running bootscript from mmc ...; " \ +- "source\0" \ +- "netargs=setenv bootargs console=${console} " \ +- "root=/dev/nfs " \ +- "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ +- "netboot=echo Booting from net ...; " \ +- "run netargs; " \ +- "if test ${ip_dyn} = yes; then " \ +- "setenv get_cmd dhcp; " \ +- "else " \ +- "setenv get_cmd tftp; " \ +- "fi; " \ +- "${get_cmd} ${loadaddr} ${image}; " \ +- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ +- "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ +- "booti ${loadaddr} - ${fdt_addr}; " \ +- "else " \ +- "echo WARN: Cannot load the DT; " \ +- "fi; " \ +- "else " \ +- "booti; " \ +- "fi;\0" +-#define CONFIG_BOOTCOMMAND \ +- "for src in sd_ul usb_ul emmc_ul; do " \ +- "run ${src}; " \ +- "if run ulbootscript; then " \ +- "run bootscript; " \ +- "else " \ +- "if run ulimage; then " \ +- "if run ulfdt; then " \ +- "booti ${loadaddr} - ${fdt_addr}; " \ +- "else " \ +- "if test ${boot_fdt} != yes; then " \ +- "booti ${loadaddr}; " \ +- "fi; " \ +- "fi; " \ +- "fi; " \ +- "fi; " \ +- "done; " \ +- "usb start; ums 0 mmc ${mmcdev};" +- +-/* Link Definitions */ +-#define CONFIG_LOADADDR 0x40480000 +- +-#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR +- +-#define CONFIG_SYS_INIT_RAM_ADDR 0x40000000 +-#define CONFIG_SYS_INIT_RAM_SIZE 0x80000 +-#define CONFIG_SYS_INIT_SP_OFFSET \ +- (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) +-#define CONFIG_SYS_INIT_SP_ADDR \ +- (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) +- +-#define CONFIG_ENV_OVERWRITE +-#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */ +-#define CONFIG_SYS_MMC_ENV_PART 1 +-#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */ +- +-/* Size of malloc() pool */ +-#define CONFIG_SYS_MALLOC_LEN ((CONFIG_ENV_SIZE + (2*1024) + (16*1024)) * 1024) +- +-#define PHYS_SDRAM 0x40000000 +-#define PHYS_SDRAM_2 0x100000000 +-#define PHYS_SDRAM_SIZE 0 /* Memory chip autodetection */ +-#define PHYS_SDRAM_2_SIZE 0 /* Memory chip autodetection */ +-#define CONFIG_NR_DRAM_BANKS 4 +-#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM +- +-#define MEMTEST_DIVIDER 2 +-#define MEMTEST_NUMERATOR 1 +- +-#define CONFIG_BAUDRATE 115200 +- +-#define CONFIG_MXC_UART_BASE UART3_BASE_ADDR +- +-/* Monitor Command Prompt */ +-#undef CONFIG_SYS_PROMPT +-#define CONFIG_SYS_PROMPT "u-boot=> " +-#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " +-#define CONFIG_SYS_CBSIZE 2048 +-#define CONFIG_SYS_MAXARGS 64 +-#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE +-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ +- sizeof(CONFIG_SYS_PROMPT) + 16) +- +-#define CONFIG_SYS_MMC_IMG_LOAD_PART 1 +- +-#define CONFIG_IMX_BOOTAUX +- +-/* USDHC */ +-#define CONFIG_FSL_USDHC +- +-#define CONFIG_SYS_FSL_USDHC_NUM 2 +-#define CONFIG_SYS_FSL_ESDHC_ADDR 0 +- +-#ifndef CONFIG_DM_I2C +-#define CONFIG_SYS_I2C +-#endif +-#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ +-#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ +-#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ +-#define CONFIG_SYS_I2C_SPEED 100000 +- +-/* EEPROM */ +-#define CONFIG_ENV_EEPROM_IS_ON_I2C +-#define CONFIG_SYS_I2C_EEPROM_BUS 1 +-#define CONFIG_SYS_I2C_SLAVE 0x00 +-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 +-#define CONFIG_SYS_EEPROM_SIZE 256 +-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 +-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 +- +-/* USB configs */ +-#ifndef CONFIG_SPL_BUILD +-#define CONFIG_CMD_USB +-#define CONFIG_USB_STORAGE +-#define CONFIG_USBD_HS +- +-#define CONFIG_CMD_USB_MASS_STORAGE +-#define CONFIG_USB_GADGET_MASS_STORAGE +-#define CONFIG_USB_FUNCTION_MASS_STORAGE +- +-#endif +- +-#define CONFIG_USB_GADGET_VBUS_DRAW 2 +- +-#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) +-#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 +- +-#ifdef CONFIG_VIDEO +-#define CONFIG_VIDEO_MXS +-#define CONFIG_VIDEO_LOGO +-#define CONFIG_SPLASH_SCREEN +-#define CONFIG_SPLASH_SCREEN_ALIGN +-#define CONFIG_CMD_BMP +-#define CONFIG_BMP_16BPP +-#define CONFIG_VIDEO_BMP_RLE8 +-#define CONFIG_VIDEO_BMP_LOGO +-#define CONFIG_IMX_VIDEO_SKIP +-#define CONFIG_RM67191 +-#endif +- +-#define CONFIG_BOARD_POSTCLK_INIT +-#define CONFIG_OF_BOARD_SETUP ++#include "cpl-imx8m-mini.h" + + #if defined(CONFIG_ANDROID_SUPPORT) + #include "mcm-imx8m-mini_android.h" +diff --git a/include/configs/ucm-imx8m-mini.h b/include/configs/ucm-imx8m-mini.h +index 75c6102f10..b3d6082a66 100644 +--- a/include/configs/ucm-imx8m-mini.h ++++ b/include/configs/ucm-imx8m-mini.h +@@ -7,273 +7,7 @@ + #ifndef __UCM_IMX8M_MINI_H + #define __UCM_IMX8M_MINI_H + +-#include +-#include +-#include "imx_env.h" +- +-#define CONFIG_SPL_MAX_SIZE (148 * 1024) +-#define CONFIG_SYS_MONITOR_LEN (512 * 1024) +-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR +-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 +-#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 +-#define CONFIG_SYS_UBOOT_BASE (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512) +- +-#ifdef CONFIG_SPL_BUILD +-/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/ +-#define CONFIG_SPL_WATCHDOG_SUPPORT +-#define CONFIG_SPL_DRIVERS_MISC_SUPPORT +-#define CONFIG_SPL_I2C_SUPPORT +-#define CONFIG_SPL_LIBCOMMON_SUPPORT +-#define CONFIG_SPL_LIBGENERIC_SUPPORT +- +-#define CONFIG_SPL_STACK 0x920000 +-#define CONFIG_SPL_BSS_START_ADDR 0x910000 +-#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K +-#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 +-#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K +- +-/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ +-#define CONFIG_MALLOC_F_ADDR 0x912000 +- +-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE /* For RAW image gives a error info not panic */ +- +-#undef CONFIG_DM_MMC +-#undef CONFIG_DM_PMIC +-#undef CONFIG_DM_PMIC_PFUZE100 +- +-#define CONFIG_SYS_I2C +-#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ +-#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ +-#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ +- +-#define CONFIG_POWER +-#define CONFIG_POWER_I2C +-#define CONFIG_POWER_BD71837 +- +-#endif /*ifdef CONFIG_SPL_BUILD*/ +- +-#define CONFIG_CMD_READ +-#define CONFIG_SERIAL_TAG +-#define CONFIG_FASTBOOT_USB_DEV 0 +- +-#define CONFIG_REMAKE_ELF +- +-#define CONFIG_BOARD_POSTCLK_INIT +- +-/* Flat Device Tree Definitions */ +-#define CONFIG_OF_BOARD_SETUP +- +-#undef CONFIG_CMD_IMLS +- +-#undef CONFIG_CMD_CRC32 +-#undef CONFIG_BOOTM_NETBSD +- +-/* ENET Config */ +-/* ENET1 */ +-#if defined(CONFIG_CMD_NET) +-#define CONFIG_ETHPRIME "FEC" +- +-#define CONFIG_FEC_XCV_TYPE RGMII +-#define CONFIG_FEC_MXC_PHYADDR 0 +-#define FEC_QUIRK_ENET_MAC +- +-#define CONFIG_PHY_GIGE +-#define IMX_FEC_BASE 0x30BE0000 +- +-#define CONFIG_PHYLIB +-#define CONFIG_PHY_ATHEROS +-#endif +- +-#define CONFIG_MFG_ENV_SETTINGS \ +- "mfgtool_args=setenv bootargs console=${console},${baudrate} " \ +- "rdinit=/linuxrc " \ +- "g_mass_storage.stall=0 g_mass_storage.removable=1 " \ +- "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\ +- "g_mass_storage.iSerialNumber=\"\" "\ +- "clk_ignore_unused "\ +- "\0" \ +- "initrd_addr=0x43800000\0" \ +- "initrd_high=0xffffffff\0" \ +- "emmc_dev=1\0" \ +- "sd_dev=0\0" \ +- "bootcmd_mfg=run mfgtool_args; if iminfo ${initrd_addr}; then "\ +- "booti ${loadaddr} ${initrd_addr} ${fdt_addr};"\ +- "else echo \"Run fastboot ...\"; fastboot 0; fi\0" \ +-/* Initial environment variables */ +-#define CONFIG_EXTRA_ENV_SETTINGS \ +- CONFIG_MFG_ENV_SETTINGS \ +- "autoload=off\0" \ +- "script=boot.scr\0" \ +- "image=Image\0" \ +- "console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200\0" \ +- "fdt_addr=0x43000000\0" \ +- "fdt_high=0xffffffffffffffff\0" \ +- "boot_fdt=yes\0" \ +- "fdt_file="CONFIG_DEFAULT_DTB"\0" \ +- "initrd_addr=0x43800000\0" \ +- "initrd_high=0xffffffffffffffff\0" \ +- "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ +- "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ +- "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ +- "mmcautodetect=yes\0" \ +- "root_opt=rootwait rw\0" \ +- "emmc_ul=setenv iface mmc; setenv dev 2; setenv part 1;" \ +- "setenv bootargs console=${console} root=/dev/mmcblk2p2 ${root_opt};\0" \ +- "sd_ul=setenv iface mmc; setenv dev 1; setenv part 1;" \ +- "setenv bootargs console=${console} root=/dev/mmcblk1p2 ${root_opt};\0" \ +- "usb_ul=usb start; setenv iface usb; setenv dev 0; setenv part 1;" \ +- "setenv bootargs console=${console} root=/dev/sda2 ${root_opt};\0" \ +- "ulbootscript=load ${iface} ${dev}:${part} ${loadaddr} ${script};\0" \ +- "ulimage=load ${iface} ${dev}:${part} ${loadaddr} ${image}\0" \ +- "ulfdt=if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ +- "load ${iface} ${dev}:${part} ${fdt_addr} ${fdt_file}; fi;\0" \ +- "bootscript=echo Running bootscript from mmc ...; " \ +- "source\0" \ +- "netargs=setenv bootargs console=${console} " \ +- "root=/dev/nfs " \ +- "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ +- "netboot=echo Booting from net ...; " \ +- "run netargs; " \ +- "if test ${ip_dyn} = yes; then " \ +- "setenv get_cmd dhcp; " \ +- "else " \ +- "setenv get_cmd tftp; " \ +- "fi; " \ +- "${get_cmd} ${loadaddr} ${image}; " \ +- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ +- "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ +- "booti ${loadaddr} - ${fdt_addr}; " \ +- "else " \ +- "echo WARN: Cannot load the DT; " \ +- "fi; " \ +- "else " \ +- "booti; " \ +- "fi;\0" +-#define CONFIG_BOOTCOMMAND \ +- "for src in sd_ul usb_ul emmc_ul; do " \ +- "run ${src}; " \ +- "if run ulbootscript; then " \ +- "run bootscript; " \ +- "else " \ +- "if run ulimage; then " \ +- "if run ulfdt; then " \ +- "booti ${loadaddr} - ${fdt_addr}; " \ +- "else " \ +- "if test ${boot_fdt} != yes; then " \ +- "booti ${loadaddr}; " \ +- "fi; " \ +- "fi; " \ +- "fi; " \ +- "fi; " \ +- "done; " \ +- "usb start; ums 0 mmc ${mmcdev};" +- +-/* Link Definitions */ +-#define CONFIG_LOADADDR 0x40480000 +- +-#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR +- +-#define CONFIG_SYS_INIT_RAM_ADDR 0x40000000 +-#define CONFIG_SYS_INIT_RAM_SIZE 0x80000 +-#define CONFIG_SYS_INIT_SP_OFFSET \ +- (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) +-#define CONFIG_SYS_INIT_SP_ADDR \ +- (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) +- +-#define CONFIG_ENV_OVERWRITE +-#define CONFIG_SYS_MMC_ENV_DEV 1 /* USDHC2 */ +-#define CONFIG_SYS_MMC_ENV_PART 1 +-#define CONFIG_MMCROOT "/dev/mmcblk1p2" /* USDHC2 */ +- +-/* Size of malloc() pool */ +-#define CONFIG_SYS_MALLOC_LEN ((CONFIG_ENV_SIZE + (2*1024) + (16*1024)) * 1024) +- +-#define PHYS_SDRAM 0x40000000 +-#define PHYS_SDRAM_2 0x100000000 +-#define PHYS_SDRAM_SIZE 0x80000000 /* 2GB default size*/ +-#undef PHYS_SDRAM_2_SIZE /* Memory chip autodetection */ +-#define CONFIG_NR_DRAM_BANKS 4 +- +-#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM +-#define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */ +-#define PHYS_SDRAM_2_SIZE 0x40000000 +- +-#define MEMTEST_DIVIDER 2 +-#define MEMTEST_NUMERATOR 1 +- +-#define CONFIG_BAUDRATE 115200 +- +-#define CONFIG_MXC_UART_BASE UART3_BASE_ADDR +- +-/* Monitor Command Prompt */ +-#undef CONFIG_SYS_PROMPT +-#define CONFIG_SYS_PROMPT "u-boot=> " +-#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " +-#define CONFIG_SYS_CBSIZE 2048 +-#define CONFIG_SYS_MAXARGS 64 +-#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE +-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ +- sizeof(CONFIG_SYS_PROMPT) + 16) +- +-#define CONFIG_SYS_MMC_IMG_LOAD_PART 1 +- +-#define CONFIG_IMX_BOOTAUX +- +-/* USDHC */ +-#define CONFIG_FSL_USDHC +- +-#define CONFIG_SYS_FSL_USDHC_NUM 2 +-#define CONFIG_SYS_FSL_ESDHC_ADDR 0 +- +-#ifndef CONFIG_DM_I2C +-#define CONFIG_SYS_I2C +-#endif +-#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ +-#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ +-#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ +-#define CONFIG_SYS_I2C_SPEED 100000 +- +-/* EEPROM */ +-#define CONFIG_ENV_EEPROM_IS_ON_I2C +-#define CONFIG_SYS_I2C_EEPROM_BUS 1 +-#define CONFIG_SYS_I2C_SLAVE 0x00 +-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 +-#define CONFIG_SYS_EEPROM_SIZE 256 +-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 +-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 +- +-/* USB configs */ +-#ifndef CONFIG_SPL_BUILD +-#define CONFIG_CMD_USB +-#define CONFIG_USB_STORAGE +-#define CONFIG_USBD_HS +- +-#define CONFIG_CMD_USB_MASS_STORAGE +-#define CONFIG_USB_GADGET_MASS_STORAGE +-#define CONFIG_USB_FUNCTION_MASS_STORAGE +- +-#endif +- +-#define CONFIG_USB_GADGET_VBUS_DRAW 2 +- +-#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) +-#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 +- +-#ifdef CONFIG_VIDEO +-#define CONFIG_VIDEO_MXS +-#define CONFIG_VIDEO_LOGO +-#define CONFIG_SPLASH_SCREEN +-#define CONFIG_SPLASH_SCREEN_ALIGN +-#define CONFIG_CMD_BMP +-#define CONFIG_BMP_16BPP +-#define CONFIG_VIDEO_BMP_RLE8 +-#define CONFIG_VIDEO_BMP_LOGO +-#define CONFIG_IMX_VIDEO_SKIP +-#define CONFIG_RM67191 +-#endif +- +-#define CONFIG_BOARD_POSTCLK_INIT +-#define CONFIG_OF_BOARD_SETUP ++#include "cpl-imx8m-mini.h" + + #if defined(CONFIG_ANDROID_SUPPORT) + #include "ucm-imx8m-mini_android.h" +-- +2.11.0 + diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0057-cpl-imx8m-mini-Refactor-.dts.patch b/recipes-bsp/u-boot/compulab/imx8mm/0057-cpl-imx8m-mini-Refactor-.dts.patch new file mode 100644 index 0000000..c95391a --- /dev/null +++ b/recipes-bsp/u-boot/compulab/imx8mm/0057-cpl-imx8m-mini-Refactor-.dts.patch @@ -0,0 +1,1434 @@ +From f208c15a68d06cb6f3d5ea34331a57882a6679ac Mon Sep 17 00:00:00 2001 +From: Kirill Kapranov +Date: Mon, 19 Jul 2021 15:48:15 +0300 +Subject: [PATCH 057/126] cpl-imx8m-mini: Refactor .dts + +Signed-off-by: Kirill Kapranov +--- + arch/arm/dts/cpl-imx8m-mini.dtsi | 472 +++++++++++++++++++++++++++++++++++++++ + arch/arm/dts/mcm-imx8m-mini.dts | 457 +------------------------------------ + arch/arm/dts/ucm-imx8m-mini.dts | 457 +------------------------------------ + 3 files changed, 474 insertions(+), 912 deletions(-) + create mode 100644 arch/arm/dts/cpl-imx8m-mini.dtsi + +diff --git a/arch/arm/dts/cpl-imx8m-mini.dtsi b/arch/arm/dts/cpl-imx8m-mini.dtsi +new file mode 100644 +index 0000000000..3fe1e7ac5f +--- /dev/null ++++ b/arch/arm/dts/cpl-imx8m-mini.dtsi +@@ -0,0 +1,472 @@ ++/* ++ * Copyright 2018 CompuLab ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ */ ++ ++#include ++#include "imx8mm.dtsi" ++ ++/ { ++ chosen { ++ bootargs = "console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200"; ++ stdout-patch = &uart3; ++ }; ++ ++ reg_usdhc2_vmmc: regulator-usdhc2 { ++ compatible = "regulator-fixed"; ++ regulator-name = "VSD_3V3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>; ++ enable-active-high; ++ startup-delay-us = <100>; ++ off-on-delay-us = <12000>; ++ }; ++ ++}; ++ ++&iomuxc { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_hog_1>; ++ ++ cpl-imx8m-mini { ++ pinctrl_hog_1: hoggrp-1 { ++ fsl,pins = < ++ MX8MM_IOMUXC_GPIO1_IO08_GPIO1_IO8 0x19 ++ MX8MM_IOMUXC_GPIO1_IO00_GPIO1_IO0 0x140 ++ MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x140 ++ >; ++ }; ++ ++ pinctrl_fec1: fec1grp { ++ fsl,pins = < ++ MX8MM_IOMUXC_ENET_MDC_ENET1_MDC 0x3 ++ MX8MM_IOMUXC_ENET_MDIO_ENET1_MDIO 0x3 ++ MX8MM_IOMUXC_ENET_TD3_ENET1_RGMII_TD3 0x1f ++ MX8MM_IOMUXC_ENET_TD2_ENET1_RGMII_TD2 0x1f ++ MX8MM_IOMUXC_ENET_TD1_ENET1_RGMII_TD1 0x1f ++ MX8MM_IOMUXC_ENET_TD0_ENET1_RGMII_TD0 0x1f ++ MX8MM_IOMUXC_ENET_RD3_ENET1_RGMII_RD3 0x91 ++ MX8MM_IOMUXC_ENET_RD2_ENET1_RGMII_RD2 0x91 ++ MX8MM_IOMUXC_ENET_RD1_ENET1_RGMII_RD1 0x91 ++ MX8MM_IOMUXC_ENET_RD0_ENET1_RGMII_RD0 0x91 ++ MX8MM_IOMUXC_ENET_TXC_ENET1_RGMII_TXC 0x1f ++ MX8MM_IOMUXC_ENET_RXC_ENET1_RGMII_RXC 0x91 ++ MX8MM_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL 0x91 ++ MX8MM_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x1f ++ MX8MM_IOMUXC_SAI2_RXC_GPIO4_IO22 0x19 ++ >; ++ }; ++ ++ pinctrl_flexspi0: flexspi0grp { ++ fsl,pins = < ++ MX8MM_IOMUXC_NAND_ALE_QSPI_A_SCLK 0x1c4 ++ MX8MM_IOMUXC_NAND_CE0_B_QSPI_A_SS0_B 0x84 ++ ++ MX8MM_IOMUXC_NAND_DATA00_QSPI_A_DATA0 0x84 ++ MX8MM_IOMUXC_NAND_DATA01_QSPI_A_DATA1 0x84 ++ MX8MM_IOMUXC_NAND_DATA02_QSPI_A_DATA2 0x84 ++ MX8MM_IOMUXC_NAND_DATA03_QSPI_A_DATA3 0x84 ++ >; ++ }; ++ ++ pinctrl_i2c1: i2c1grp { ++ fsl,pins = < ++ MX8MM_IOMUXC_I2C1_SCL_I2C1_SCL 0x400001c3 ++ MX8MM_IOMUXC_I2C1_SDA_I2C1_SDA 0x400001c3 ++ >; ++ }; ++ ++ pinctrl_i2c2: i2c2grp { ++ fsl,pins = < ++ MX8MM_IOMUXC_I2C2_SCL_I2C2_SCL 0x400001c3 ++ MX8MM_IOMUXC_I2C2_SDA_I2C2_SDA 0x400001c3 ++ >; ++ }; ++ ++ pinctrl_i2c3: i2c3grp { ++ fsl,pins = < ++ MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL 0x400001c3 ++ MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c3 ++ >; ++ }; ++ ++ pinctrl_pmic: pmicirq { ++ fsl,pins = < ++ MX8MM_IOMUXC_GPIO1_IO03_GPIO1_IO3 0x41 ++ >; ++ }; ++ ++ pinctrl_uart3: uart1grp { ++ fsl,pins = < ++ MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX 0x49 ++ MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX 0x49 ++ >; ++ }; ++ ++ ++ pinctrl_uart4: uart4grp { ++ fsl,pins = < ++ MX8MM_IOMUXC_ECSPI2_MISO_UART4_DCE_CTS_B 0x49 ++ MX8MM_IOMUXC_ECSPI2_MOSI_UART4_DCE_TX 0x49 ++ MX8MM_IOMUXC_ECSPI2_SS0_UART4_DCE_RTS_B 0x49 ++ MX8MM_IOMUXC_ECSPI2_SCLK_UART4_DCE_RX 0x49 ++ >; ++ }; ++ ++ pinctrl_usdhc2_gpio: usdhc2grpgpio { ++ fsl,pins = < ++ MX8MM_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x41 ++ MX8MM_IOMUXC_SD2_WP_USDHC2_WP 0 ++ >; ++ }; ++ ++ pinctrl_usdhc2: usdhc2grp { ++ fsl,pins = < ++ MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x190 ++ MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d0 ++ MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d0 ++ MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d0 ++ MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d0 ++ MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d0 ++ MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0 ++ >; ++ }; ++ ++ pinctrl_usdhc2_100mhz: usdhc2grp100mhz { ++ fsl,pins = < ++ MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194 ++ MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4 ++ MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4 ++ MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4 ++ MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4 ++ MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4 ++ MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0 ++ >; ++ }; ++ ++ pinctrl_usdhc2_200mhz: usdhc2grp200mhz { ++ fsl,pins = < ++ MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196 ++ MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6 ++ MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6 ++ MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6 ++ MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6 ++ MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6 ++ MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0 ++ >; ++ }; ++ ++ pinctrl_usdhc3: usdhc3grp { ++ fsl,pins = < ++ MX8MM_IOMUXC_NAND_WE_B_USDHC3_CLK 0x40000190 ++ MX8MM_IOMUXC_NAND_WP_B_USDHC3_CMD 0x1d0 ++ MX8MM_IOMUXC_NAND_DATA04_USDHC3_DATA0 0x1d0 ++ MX8MM_IOMUXC_NAND_DATA05_USDHC3_DATA1 0x1d0 ++ MX8MM_IOMUXC_NAND_DATA06_USDHC3_DATA2 0x1d0 ++ MX8MM_IOMUXC_NAND_DATA07_USDHC3_DATA3 0x1d0 ++ MX8MM_IOMUXC_NAND_RE_B_USDHC3_DATA4 0x1d0 ++ MX8MM_IOMUXC_NAND_CE2_B_USDHC3_DATA5 0x1d0 ++ MX8MM_IOMUXC_NAND_CE3_B_USDHC3_DATA6 0x1d0 ++ MX8MM_IOMUXC_NAND_CLE_USDHC3_DATA7 0x1d0 ++ MX8MM_IOMUXC_NAND_CE1_B_USDHC3_STROBE 0x190 ++ >; ++ }; ++ ++ pinctrl_usdhc3_100mhz: usdhc3grp100mhz { ++ fsl,pins = < ++ MX8MM_IOMUXC_NAND_WE_B_USDHC3_CLK 0x40000194 ++ MX8MM_IOMUXC_NAND_WP_B_USDHC3_CMD 0x1d4 ++ MX8MM_IOMUXC_NAND_DATA04_USDHC3_DATA0 0x1d4 ++ MX8MM_IOMUXC_NAND_DATA05_USDHC3_DATA1 0x1d4 ++ MX8MM_IOMUXC_NAND_DATA06_USDHC3_DATA2 0x1d4 ++ MX8MM_IOMUXC_NAND_DATA07_USDHC3_DATA3 0x1d4 ++ MX8MM_IOMUXC_NAND_RE_B_USDHC3_DATA4 0x1d4 ++ MX8MM_IOMUXC_NAND_CE2_B_USDHC3_DATA5 0x1d4 ++ MX8MM_IOMUXC_NAND_CE3_B_USDHC3_DATA6 0x1d4 ++ MX8MM_IOMUXC_NAND_CLE_USDHC3_DATA7 0x1d4 ++ MX8MM_IOMUXC_NAND_CE1_B_USDHC3_STROBE 0x194 ++ >; ++ }; ++ ++ pinctrl_usdhc3_200mhz: usdhc3grp200mhz { ++ fsl,pins = < ++ MX8MM_IOMUXC_NAND_WE_B_USDHC3_CLK 0x40000196 ++ MX8MM_IOMUXC_NAND_WP_B_USDHC3_CMD 0x1d6 ++ MX8MM_IOMUXC_NAND_DATA04_USDHC3_DATA0 0x1d6 ++ MX8MM_IOMUXC_NAND_DATA05_USDHC3_DATA1 0x1d6 ++ MX8MM_IOMUXC_NAND_DATA06_USDHC3_DATA2 0x1d6 ++ MX8MM_IOMUXC_NAND_DATA07_USDHC3_DATA3 0x1d6 ++ MX8MM_IOMUXC_NAND_RE_B_USDHC3_DATA4 0x1d6 ++ MX8MM_IOMUXC_NAND_CE2_B_USDHC3_DATA5 0x1d6 ++ MX8MM_IOMUXC_NAND_CE3_B_USDHC3_DATA6 0x1d6 ++ MX8MM_IOMUXC_NAND_CLE_USDHC3_DATA7 0x1d6 ++ MX8MM_IOMUXC_NAND_CE1_B_USDHC3_STROBE 0x196 ++ >; ++ }; ++ ++ pinctrl_wdog: wdoggrp { ++ fsl,pins = < ++ MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0xc6 ++ >; ++ }; ++ }; ++}; ++ ++&i2c1 { ++ clock-frequency = <400000>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_i2c1>; ++ status = "disabled"; ++ ++}; ++ ++&i2c2 { ++ clock-frequency = <400000>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_i2c2>; ++ status = "okay"; ++ ++ pmic: bd71837@4b { ++ reg = <0x4b>; ++ compatible = "rohm,bd71837"; ++ /* PMIC BD71837 PMIC_nINT GPIO1_IO3 */ ++ pinctrl-0 = <&pinctrl_pmic>; ++ gpio_intr = <&gpio1 3 GPIO_ACTIVE_LOW>; ++ ++ gpo { ++ rohm,drv = <0x0C>; /* 0b0000_1100 all gpos with cmos output mode */ ++ }; ++ ++ regulators { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ bd71837,pmic-buck2-uses-i2c-dvs; ++ bd71837,pmic-buck2-dvs-voltage = <1000000>, <900000>, <0>; /* VDD_ARM: Run-Idle */ ++ ++ buck1_reg: regulator@0 { ++ reg = <0>; ++ regulator-compatible = "buck1"; ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-ramp-delay = <1250>; ++ }; ++ ++ buck2_reg: regulator@1 { ++ reg = <1>; ++ regulator-compatible = "buck2"; ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-ramp-delay = <1250>; ++ }; ++ ++ buck3_reg: regulator@2 { ++ reg = <2>; ++ regulator-compatible = "buck3"; ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1300000>; ++ }; ++ ++ buck4_reg: regulator@3 { ++ reg = <3>; ++ regulator-compatible = "buck4"; ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1300000>; ++ }; ++ ++ buck5_reg: regulator@4 { ++ reg = <4>; ++ regulator-compatible = "buck5"; ++ regulator-min-microvolt = <700000>; ++ regulator-max-microvolt = <1350000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ buck6_reg: regulator@5 { ++ reg = <5>; ++ regulator-compatible = "buck6"; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ buck7_reg: regulator@6 { ++ reg = <6>; ++ regulator-compatible = "buck7"; ++ regulator-min-microvolt = <1605000>; ++ regulator-max-microvolt = <1995000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ buck8_reg: regulator@7 { ++ reg = <7>; ++ regulator-compatible = "buck8"; ++ regulator-min-microvolt = <800000>; ++ regulator-max-microvolt = <1400000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ ldo1_reg: regulator@8 { ++ reg = <8>; ++ regulator-compatible = "ldo1"; ++ regulator-min-microvolt = <3000000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ ldo2_reg: regulator@9 { ++ reg = <9>; ++ regulator-compatible = "ldo2"; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <900000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ ldo3_reg: regulator@10 { ++ reg = <10>; ++ regulator-compatible = "ldo3"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ ldo4_reg: regulator@11 { ++ reg = <11>; ++ regulator-compatible = "ldo4"; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ ldo5_reg: regulator@12 { ++ reg = <12>; ++ regulator-compatible = "ldo5"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ }; ++ ++ ldo6_reg: regulator@13 { ++ reg = <13>; ++ regulator-compatible = "ldo6"; ++ regulator-min-microvolt = <900000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ ldo7_reg: regulator@14 { ++ reg = <14>; ++ regulator-compatible = "ldo7"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ }; ++ }; ++ }; ++}; ++ ++&i2c3 { ++ clock-frequency = <100000>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_i2c3>; ++ status = "disabled"; ++}; ++ ++&fec1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_fec1>; ++ phy-mode = "rgmii-id"; ++ phy-handle = <ðphy0>; ++ fsl,magic-packet; ++ status = "okay"; ++ ++ mdio { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ ethphy0: ethernet-phy@0 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ reg = <0>; ++ at803x,led-act-blind-workaround; ++ at803x,eee-okay; ++ at803x,vddio-1p8v; ++ }; ++ }; ++}; ++ ++&uart3 { /* console */ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart3>; ++ status = "okay"; ++}; ++ ++&usdhc2 { ++ pinctrl-names = "default", "state_100mhz", "state_200mhz"; ++ pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>; ++ pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>; ++ pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>; ++ bus-width = <4>; ++ fsl,wp-controller; ++ non-removable; ++ vmmc-supply = <®_usdhc2_vmmc>; ++ status = "okay"; ++}; ++ ++&usdhc3 { ++ pinctrl-names = "default", "state_100mhz", "state_200mhz"; ++ pinctrl-0 = <&pinctrl_usdhc3>; ++ pinctrl-1 = <&pinctrl_usdhc3_100mhz>; ++ pinctrl-2 = <&pinctrl_usdhc3_200mhz>; ++ bus-width = <8>; ++ non-removable; ++ status = "okay"; ++}; ++ ++&wdog1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_wdog>; ++ fsl,ext-reset-output; ++ status = "okay"; ++}; ++ ++&A53_0 { ++ arm-supply = <&buck2_reg>; ++}; ++ ++&usbotg1 { ++ dr_mode = "otg"; ++ status = "okay"; ++}; ++ ++&usbotg2 { ++ dr_mode = "host"; ++ status = "okay"; ++}; ++ ++&cpu_alert0 { ++ temperature = <105000>; ++}; ++&cpu_crit0 { ++ temperature = <115000>; ++}; +diff --git a/arch/arm/dts/mcm-imx8m-mini.dts b/arch/arm/dts/mcm-imx8m-mini.dts +index 85f4c46dd7..060e51793c 100644 +--- a/arch/arm/dts/mcm-imx8m-mini.dts ++++ b/arch/arm/dts/mcm-imx8m-mini.dts +@@ -14,464 +14,9 @@ + + /dts-v1/; + +-#include +-#include "imx8mm.dtsi" ++#include "cpl-imx8m-mini.dtsi" + + / { + model = "CompuLab MCM-iMX8M-Mini board"; + compatible = "cpl,mcm-imx8m-mini", "fsl,imx8mm-evk", "fsl,imx8mm"; +- +- chosen { +- bootargs = "console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200"; +- stdout-patch = &uart3; +- }; +- +- reg_usdhc2_vmmc: regulator-usdhc2 { +- compatible = "regulator-fixed"; +- regulator-name = "VSD_3V3"; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>; +- enable-active-high; +- startup-delay-us = <100>; +- off-on-delay-us = <12000>; +- }; +- +-}; +- +-&iomuxc { +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_hog_1>; +- +- mcm-imx8m-mini { +- pinctrl_hog_1: hoggrp-1 { +- fsl,pins = < +- MX8MM_IOMUXC_GPIO1_IO08_GPIO1_IO8 0x19 +- MX8MM_IOMUXC_GPIO1_IO00_GPIO1_IO0 0x140 +- MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x140 +- >; +- }; +- +- pinctrl_fec1: fec1grp { +- fsl,pins = < +- MX8MM_IOMUXC_ENET_MDC_ENET1_MDC 0x3 +- MX8MM_IOMUXC_ENET_MDIO_ENET1_MDIO 0x3 +- MX8MM_IOMUXC_ENET_TD3_ENET1_RGMII_TD3 0x1f +- MX8MM_IOMUXC_ENET_TD2_ENET1_RGMII_TD2 0x1f +- MX8MM_IOMUXC_ENET_TD1_ENET1_RGMII_TD1 0x1f +- MX8MM_IOMUXC_ENET_TD0_ENET1_RGMII_TD0 0x1f +- MX8MM_IOMUXC_ENET_RD3_ENET1_RGMII_RD3 0x91 +- MX8MM_IOMUXC_ENET_RD2_ENET1_RGMII_RD2 0x91 +- MX8MM_IOMUXC_ENET_RD1_ENET1_RGMII_RD1 0x91 +- MX8MM_IOMUXC_ENET_RD0_ENET1_RGMII_RD0 0x91 +- MX8MM_IOMUXC_ENET_TXC_ENET1_RGMII_TXC 0x1f +- MX8MM_IOMUXC_ENET_RXC_ENET1_RGMII_RXC 0x91 +- MX8MM_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL 0x91 +- MX8MM_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x1f +- MX8MM_IOMUXC_SAI2_RXC_GPIO4_IO22 0x19 +- >; +- }; +- +- pinctrl_flexspi0: flexspi0grp { +- fsl,pins = < +- MX8MM_IOMUXC_NAND_ALE_QSPI_A_SCLK 0x1c4 +- MX8MM_IOMUXC_NAND_CE0_B_QSPI_A_SS0_B 0x84 +- +- MX8MM_IOMUXC_NAND_DATA00_QSPI_A_DATA0 0x84 +- MX8MM_IOMUXC_NAND_DATA01_QSPI_A_DATA1 0x84 +- MX8MM_IOMUXC_NAND_DATA02_QSPI_A_DATA2 0x84 +- MX8MM_IOMUXC_NAND_DATA03_QSPI_A_DATA3 0x84 +- >; +- }; +- +- pinctrl_i2c1: i2c1grp { +- fsl,pins = < +- MX8MM_IOMUXC_I2C1_SCL_I2C1_SCL 0x400001c3 +- MX8MM_IOMUXC_I2C1_SDA_I2C1_SDA 0x400001c3 +- >; +- }; +- +- pinctrl_i2c2: i2c2grp { +- fsl,pins = < +- MX8MM_IOMUXC_I2C2_SCL_I2C2_SCL 0x400001c3 +- MX8MM_IOMUXC_I2C2_SDA_I2C2_SDA 0x400001c3 +- >; +- }; +- +- pinctrl_i2c3: i2c3grp { +- fsl,pins = < +- MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL 0x400001c3 +- MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c3 +- >; +- }; +- +- pinctrl_pmic: pmicirq { +- fsl,pins = < +- MX8MM_IOMUXC_GPIO1_IO03_GPIO1_IO3 0x41 +- >; +- }; +- +- pinctrl_uart3: uart1grp { +- fsl,pins = < +- MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX 0x49 +- MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX 0x49 +- >; +- }; +- +- +- pinctrl_uart4: uart4grp { +- fsl,pins = < +- MX8MM_IOMUXC_ECSPI2_MISO_UART4_DCE_CTS_B 0x49 +- MX8MM_IOMUXC_ECSPI2_MOSI_UART4_DCE_TX 0x49 +- MX8MM_IOMUXC_ECSPI2_SS0_UART4_DCE_RTS_B 0x49 +- MX8MM_IOMUXC_ECSPI2_SCLK_UART4_DCE_RX 0x49 +- >; +- }; +- +- pinctrl_usdhc2_gpio: usdhc2grpgpio { +- fsl,pins = < +- MX8MM_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x41 +- MX8MM_IOMUXC_SD2_WP_USDHC2_WP 0 +- >; +- }; +- +- pinctrl_usdhc2: usdhc2grp { +- fsl,pins = < +- MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x190 +- MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d0 +- MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d0 +- MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d0 +- MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d0 +- MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d0 +- MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0 +- >; +- }; +- +- pinctrl_usdhc2_100mhz: usdhc2grp100mhz { +- fsl,pins = < +- MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194 +- MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4 +- MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4 +- MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4 +- MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4 +- MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4 +- MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0 +- >; +- }; +- +- pinctrl_usdhc2_200mhz: usdhc2grp200mhz { +- fsl,pins = < +- MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196 +- MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6 +- MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6 +- MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6 +- MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6 +- MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6 +- MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0 +- >; +- }; +- +- pinctrl_usdhc3: usdhc3grp { +- fsl,pins = < +- MX8MM_IOMUXC_NAND_WE_B_USDHC3_CLK 0x40000190 +- MX8MM_IOMUXC_NAND_WP_B_USDHC3_CMD 0x1d0 +- MX8MM_IOMUXC_NAND_DATA04_USDHC3_DATA0 0x1d0 +- MX8MM_IOMUXC_NAND_DATA05_USDHC3_DATA1 0x1d0 +- MX8MM_IOMUXC_NAND_DATA06_USDHC3_DATA2 0x1d0 +- MX8MM_IOMUXC_NAND_DATA07_USDHC3_DATA3 0x1d0 +- MX8MM_IOMUXC_NAND_RE_B_USDHC3_DATA4 0x1d0 +- MX8MM_IOMUXC_NAND_CE2_B_USDHC3_DATA5 0x1d0 +- MX8MM_IOMUXC_NAND_CE3_B_USDHC3_DATA6 0x1d0 +- MX8MM_IOMUXC_NAND_CLE_USDHC3_DATA7 0x1d0 +- MX8MM_IOMUXC_NAND_CE1_B_USDHC3_STROBE 0x190 +- >; +- }; +- +- pinctrl_usdhc3_100mhz: usdhc3grp100mhz { +- fsl,pins = < +- MX8MM_IOMUXC_NAND_WE_B_USDHC3_CLK 0x40000194 +- MX8MM_IOMUXC_NAND_WP_B_USDHC3_CMD 0x1d4 +- MX8MM_IOMUXC_NAND_DATA04_USDHC3_DATA0 0x1d4 +- MX8MM_IOMUXC_NAND_DATA05_USDHC3_DATA1 0x1d4 +- MX8MM_IOMUXC_NAND_DATA06_USDHC3_DATA2 0x1d4 +- MX8MM_IOMUXC_NAND_DATA07_USDHC3_DATA3 0x1d4 +- MX8MM_IOMUXC_NAND_RE_B_USDHC3_DATA4 0x1d4 +- MX8MM_IOMUXC_NAND_CE2_B_USDHC3_DATA5 0x1d4 +- MX8MM_IOMUXC_NAND_CE3_B_USDHC3_DATA6 0x1d4 +- MX8MM_IOMUXC_NAND_CLE_USDHC3_DATA7 0x1d4 +- MX8MM_IOMUXC_NAND_CE1_B_USDHC3_STROBE 0x194 +- >; +- }; +- +- pinctrl_usdhc3_200mhz: usdhc3grp200mhz { +- fsl,pins = < +- MX8MM_IOMUXC_NAND_WE_B_USDHC3_CLK 0x40000196 +- MX8MM_IOMUXC_NAND_WP_B_USDHC3_CMD 0x1d6 +- MX8MM_IOMUXC_NAND_DATA04_USDHC3_DATA0 0x1d6 +- MX8MM_IOMUXC_NAND_DATA05_USDHC3_DATA1 0x1d6 +- MX8MM_IOMUXC_NAND_DATA06_USDHC3_DATA2 0x1d6 +- MX8MM_IOMUXC_NAND_DATA07_USDHC3_DATA3 0x1d6 +- MX8MM_IOMUXC_NAND_RE_B_USDHC3_DATA4 0x1d6 +- MX8MM_IOMUXC_NAND_CE2_B_USDHC3_DATA5 0x1d6 +- MX8MM_IOMUXC_NAND_CE3_B_USDHC3_DATA6 0x1d6 +- MX8MM_IOMUXC_NAND_CLE_USDHC3_DATA7 0x1d6 +- MX8MM_IOMUXC_NAND_CE1_B_USDHC3_STROBE 0x196 +- >; +- }; +- +- pinctrl_wdog: wdoggrp { +- fsl,pins = < +- MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0xc6 +- >; +- }; +- }; +-}; +- +-&i2c1 { +- clock-frequency = <400000>; +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_i2c1>; +- status = "disabled"; +- +-}; +- +-&i2c2 { +- clock-frequency = <400000>; +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_i2c2>; +- status = "okay"; +- +- pmic: bd71837@4b { +- reg = <0x4b>; +- compatible = "rohm,bd71837"; +- /* PMIC BD71837 PMIC_nINT GPIO1_IO3 */ +- pinctrl-0 = <&pinctrl_pmic>; +- gpio_intr = <&gpio1 3 GPIO_ACTIVE_LOW>; +- +- gpo { +- rohm,drv = <0x0C>; /* 0b0000_1100 all gpos with cmos output mode */ +- }; +- +- regulators { +- #address-cells = <1>; +- #size-cells = <0>; +- +- bd71837,pmic-buck2-uses-i2c-dvs; +- bd71837,pmic-buck2-dvs-voltage = <1000000>, <900000>, <0>; /* VDD_ARM: Run-Idle */ +- +- buck1_reg: regulator@0 { +- reg = <0>; +- regulator-compatible = "buck1"; +- regulator-min-microvolt = <700000>; +- regulator-max-microvolt = <1300000>; +- regulator-boot-on; +- regulator-always-on; +- regulator-ramp-delay = <1250>; +- }; +- +- buck2_reg: regulator@1 { +- reg = <1>; +- regulator-compatible = "buck2"; +- regulator-min-microvolt = <700000>; +- regulator-max-microvolt = <1300000>; +- regulator-boot-on; +- regulator-always-on; +- regulator-ramp-delay = <1250>; +- }; +- +- buck3_reg: regulator@2 { +- reg = <2>; +- regulator-compatible = "buck3"; +- regulator-min-microvolt = <700000>; +- regulator-max-microvolt = <1300000>; +- }; +- +- buck4_reg: regulator@3 { +- reg = <3>; +- regulator-compatible = "buck4"; +- regulator-min-microvolt = <700000>; +- regulator-max-microvolt = <1300000>; +- }; +- +- buck5_reg: regulator@4 { +- reg = <4>; +- regulator-compatible = "buck5"; +- regulator-min-microvolt = <700000>; +- regulator-max-microvolt = <1350000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- buck6_reg: regulator@5 { +- reg = <5>; +- regulator-compatible = "buck6"; +- regulator-min-microvolt = <3000000>; +- regulator-max-microvolt = <3300000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- buck7_reg: regulator@6 { +- reg = <6>; +- regulator-compatible = "buck7"; +- regulator-min-microvolt = <1605000>; +- regulator-max-microvolt = <1995000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- buck8_reg: regulator@7 { +- reg = <7>; +- regulator-compatible = "buck8"; +- regulator-min-microvolt = <800000>; +- regulator-max-microvolt = <1400000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- ldo1_reg: regulator@8 { +- reg = <8>; +- regulator-compatible = "ldo1"; +- regulator-min-microvolt = <3000000>; +- regulator-max-microvolt = <3300000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- ldo2_reg: regulator@9 { +- reg = <9>; +- regulator-compatible = "ldo2"; +- regulator-min-microvolt = <900000>; +- regulator-max-microvolt = <900000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- ldo3_reg: regulator@10 { +- reg = <10>; +- regulator-compatible = "ldo3"; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <3300000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- ldo4_reg: regulator@11 { +- reg = <11>; +- regulator-compatible = "ldo4"; +- regulator-min-microvolt = <900000>; +- regulator-max-microvolt = <1800000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- ldo5_reg: regulator@12 { +- reg = <12>; +- regulator-compatible = "ldo5"; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <3300000>; +- }; +- +- ldo6_reg: regulator@13 { +- reg = <13>; +- regulator-compatible = "ldo6"; +- regulator-min-microvolt = <900000>; +- regulator-max-microvolt = <1800000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- ldo7_reg: regulator@14 { +- reg = <14>; +- regulator-compatible = "ldo7"; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <3300000>; +- }; +- }; +- }; +-}; +- +-&i2c3 { +- clock-frequency = <100000>; +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_i2c3>; +- status = "disabled"; +-}; +- +-&fec1 { +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_fec1>; +- phy-mode = "rgmii-id"; +- phy-handle = <ðphy0>; +- fsl,magic-packet; +- status = "okay"; +- +- mdio { +- #address-cells = <1>; +- #size-cells = <0>; +- +- ethphy0: ethernet-phy@0 { +- compatible = "ethernet-phy-ieee802.3-c22"; +- reg = <0>; +- at803x,led-act-blind-workaround; +- at803x,eee-okay; +- at803x,vddio-1p8v; +- }; +- }; +-}; +- +-&uart3 { /* console */ +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_uart3>; +- status = "okay"; +-}; +- +-&usdhc2 { +- pinctrl-names = "default", "state_100mhz", "state_200mhz"; +- pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>; +- pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>; +- pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>; +- bus-width = <4>; +- fsl,wp-controller; +- non-removable; +- vmmc-supply = <®_usdhc2_vmmc>; +- status = "okay"; +-}; +- +-&usdhc3 { +- pinctrl-names = "default", "state_100mhz", "state_200mhz"; +- pinctrl-0 = <&pinctrl_usdhc3>; +- pinctrl-1 = <&pinctrl_usdhc3_100mhz>; +- pinctrl-2 = <&pinctrl_usdhc3_200mhz>; +- bus-width = <8>; +- non-removable; +- status = "okay"; +-}; +- +-&wdog1 { +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_wdog>; +- fsl,ext-reset-output; +- status = "okay"; +-}; +- +-&A53_0 { +- arm-supply = <&buck2_reg>; +-}; +- +-&usbotg1 { +- dr_mode = "otg"; +- status = "okay"; +-}; +- +-&usbotg2 { +- dr_mode = "host"; +- status = "okay"; +-}; +- +-&cpu_alert0 { +- temperature = <105000>; +-}; +-&cpu_crit0 { +- temperature = <115000>; + }; +diff --git a/arch/arm/dts/ucm-imx8m-mini.dts b/arch/arm/dts/ucm-imx8m-mini.dts +index f2794e74e9..7b81e8a75b 100644 +--- a/arch/arm/dts/ucm-imx8m-mini.dts ++++ b/arch/arm/dts/ucm-imx8m-mini.dts +@@ -14,464 +14,9 @@ + + /dts-v1/; + +-#include +-#include "imx8mm.dtsi" ++#include "cpl-imx8m-mini.dtsi" + + / { + model = "CompuLab UCM-iMX8M-Mini board"; + compatible = "cpl,ucm-imx8m-mini", "fsl,imx8mm-evk", "fsl,imx8mm"; +- +- chosen { +- bootargs = "console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200"; +- stdout-patch = &uart3; +- }; +- +- reg_usdhc2_vmmc: regulator-usdhc2 { +- compatible = "regulator-fixed"; +- regulator-name = "VSD_3V3"; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>; +- enable-active-high; +- startup-delay-us = <100>; +- off-on-delay-us = <12000>; +- }; +- +-}; +- +-&iomuxc { +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_hog_1>; +- +- ucm-imx8m-mini { +- pinctrl_hog_1: hoggrp-1 { +- fsl,pins = < +- MX8MM_IOMUXC_GPIO1_IO08_GPIO1_IO8 0x19 +- MX8MM_IOMUXC_GPIO1_IO00_GPIO1_IO0 0x140 +- MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x140 +- >; +- }; +- +- pinctrl_fec1: fec1grp { +- fsl,pins = < +- MX8MM_IOMUXC_ENET_MDC_ENET1_MDC 0x3 +- MX8MM_IOMUXC_ENET_MDIO_ENET1_MDIO 0x3 +- MX8MM_IOMUXC_ENET_TD3_ENET1_RGMII_TD3 0x1f +- MX8MM_IOMUXC_ENET_TD2_ENET1_RGMII_TD2 0x1f +- MX8MM_IOMUXC_ENET_TD1_ENET1_RGMII_TD1 0x1f +- MX8MM_IOMUXC_ENET_TD0_ENET1_RGMII_TD0 0x1f +- MX8MM_IOMUXC_ENET_RD3_ENET1_RGMII_RD3 0x91 +- MX8MM_IOMUXC_ENET_RD2_ENET1_RGMII_RD2 0x91 +- MX8MM_IOMUXC_ENET_RD1_ENET1_RGMII_RD1 0x91 +- MX8MM_IOMUXC_ENET_RD0_ENET1_RGMII_RD0 0x91 +- MX8MM_IOMUXC_ENET_TXC_ENET1_RGMII_TXC 0x1f +- MX8MM_IOMUXC_ENET_RXC_ENET1_RGMII_RXC 0x91 +- MX8MM_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL 0x91 +- MX8MM_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x1f +- MX8MM_IOMUXC_SAI2_RXC_GPIO4_IO22 0x19 +- >; +- }; +- +- pinctrl_flexspi0: flexspi0grp { +- fsl,pins = < +- MX8MM_IOMUXC_NAND_ALE_QSPI_A_SCLK 0x1c4 +- MX8MM_IOMUXC_NAND_CE0_B_QSPI_A_SS0_B 0x84 +- +- MX8MM_IOMUXC_NAND_DATA00_QSPI_A_DATA0 0x84 +- MX8MM_IOMUXC_NAND_DATA01_QSPI_A_DATA1 0x84 +- MX8MM_IOMUXC_NAND_DATA02_QSPI_A_DATA2 0x84 +- MX8MM_IOMUXC_NAND_DATA03_QSPI_A_DATA3 0x84 +- >; +- }; +- +- pinctrl_i2c1: i2c1grp { +- fsl,pins = < +- MX8MM_IOMUXC_I2C1_SCL_I2C1_SCL 0x400001c3 +- MX8MM_IOMUXC_I2C1_SDA_I2C1_SDA 0x400001c3 +- >; +- }; +- +- pinctrl_i2c2: i2c2grp { +- fsl,pins = < +- MX8MM_IOMUXC_I2C2_SCL_I2C2_SCL 0x400001c3 +- MX8MM_IOMUXC_I2C2_SDA_I2C2_SDA 0x400001c3 +- >; +- }; +- +- pinctrl_i2c3: i2c3grp { +- fsl,pins = < +- MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL 0x400001c3 +- MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c3 +- >; +- }; +- +- pinctrl_pmic: pmicirq { +- fsl,pins = < +- MX8MM_IOMUXC_GPIO1_IO03_GPIO1_IO3 0x41 +- >; +- }; +- +- pinctrl_uart3: uart1grp { +- fsl,pins = < +- MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX 0x49 +- MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX 0x49 +- >; +- }; +- +- +- pinctrl_uart4: uart4grp { +- fsl,pins = < +- MX8MM_IOMUXC_ECSPI2_MISO_UART4_DCE_CTS_B 0x49 +- MX8MM_IOMUXC_ECSPI2_MOSI_UART4_DCE_TX 0x49 +- MX8MM_IOMUXC_ECSPI2_SS0_UART4_DCE_RTS_B 0x49 +- MX8MM_IOMUXC_ECSPI2_SCLK_UART4_DCE_RX 0x49 +- >; +- }; +- +- pinctrl_usdhc2_gpio: usdhc2grpgpio { +- fsl,pins = < +- MX8MM_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x41 +- MX8MM_IOMUXC_SD2_WP_USDHC2_WP 0 +- >; +- }; +- +- pinctrl_usdhc2: usdhc2grp { +- fsl,pins = < +- MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x190 +- MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d0 +- MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d0 +- MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d0 +- MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d0 +- MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d0 +- MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0 +- >; +- }; +- +- pinctrl_usdhc2_100mhz: usdhc2grp100mhz { +- fsl,pins = < +- MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194 +- MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4 +- MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4 +- MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4 +- MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4 +- MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4 +- MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0 +- >; +- }; +- +- pinctrl_usdhc2_200mhz: usdhc2grp200mhz { +- fsl,pins = < +- MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196 +- MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6 +- MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6 +- MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6 +- MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6 +- MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6 +- MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0 +- >; +- }; +- +- pinctrl_usdhc3: usdhc3grp { +- fsl,pins = < +- MX8MM_IOMUXC_NAND_WE_B_USDHC3_CLK 0x40000190 +- MX8MM_IOMUXC_NAND_WP_B_USDHC3_CMD 0x1d0 +- MX8MM_IOMUXC_NAND_DATA04_USDHC3_DATA0 0x1d0 +- MX8MM_IOMUXC_NAND_DATA05_USDHC3_DATA1 0x1d0 +- MX8MM_IOMUXC_NAND_DATA06_USDHC3_DATA2 0x1d0 +- MX8MM_IOMUXC_NAND_DATA07_USDHC3_DATA3 0x1d0 +- MX8MM_IOMUXC_NAND_RE_B_USDHC3_DATA4 0x1d0 +- MX8MM_IOMUXC_NAND_CE2_B_USDHC3_DATA5 0x1d0 +- MX8MM_IOMUXC_NAND_CE3_B_USDHC3_DATA6 0x1d0 +- MX8MM_IOMUXC_NAND_CLE_USDHC3_DATA7 0x1d0 +- MX8MM_IOMUXC_NAND_CE1_B_USDHC3_STROBE 0x190 +- >; +- }; +- +- pinctrl_usdhc3_100mhz: usdhc3grp100mhz { +- fsl,pins = < +- MX8MM_IOMUXC_NAND_WE_B_USDHC3_CLK 0x40000194 +- MX8MM_IOMUXC_NAND_WP_B_USDHC3_CMD 0x1d4 +- MX8MM_IOMUXC_NAND_DATA04_USDHC3_DATA0 0x1d4 +- MX8MM_IOMUXC_NAND_DATA05_USDHC3_DATA1 0x1d4 +- MX8MM_IOMUXC_NAND_DATA06_USDHC3_DATA2 0x1d4 +- MX8MM_IOMUXC_NAND_DATA07_USDHC3_DATA3 0x1d4 +- MX8MM_IOMUXC_NAND_RE_B_USDHC3_DATA4 0x1d4 +- MX8MM_IOMUXC_NAND_CE2_B_USDHC3_DATA5 0x1d4 +- MX8MM_IOMUXC_NAND_CE3_B_USDHC3_DATA6 0x1d4 +- MX8MM_IOMUXC_NAND_CLE_USDHC3_DATA7 0x1d4 +- MX8MM_IOMUXC_NAND_CE1_B_USDHC3_STROBE 0x194 +- >; +- }; +- +- pinctrl_usdhc3_200mhz: usdhc3grp200mhz { +- fsl,pins = < +- MX8MM_IOMUXC_NAND_WE_B_USDHC3_CLK 0x40000196 +- MX8MM_IOMUXC_NAND_WP_B_USDHC3_CMD 0x1d6 +- MX8MM_IOMUXC_NAND_DATA04_USDHC3_DATA0 0x1d6 +- MX8MM_IOMUXC_NAND_DATA05_USDHC3_DATA1 0x1d6 +- MX8MM_IOMUXC_NAND_DATA06_USDHC3_DATA2 0x1d6 +- MX8MM_IOMUXC_NAND_DATA07_USDHC3_DATA3 0x1d6 +- MX8MM_IOMUXC_NAND_RE_B_USDHC3_DATA4 0x1d6 +- MX8MM_IOMUXC_NAND_CE2_B_USDHC3_DATA5 0x1d6 +- MX8MM_IOMUXC_NAND_CE3_B_USDHC3_DATA6 0x1d6 +- MX8MM_IOMUXC_NAND_CLE_USDHC3_DATA7 0x1d6 +- MX8MM_IOMUXC_NAND_CE1_B_USDHC3_STROBE 0x196 +- >; +- }; +- +- pinctrl_wdog: wdoggrp { +- fsl,pins = < +- MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0xc6 +- >; +- }; +- }; +-}; +- +-&i2c1 { +- clock-frequency = <400000>; +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_i2c1>; +- status = "disabled"; +- +-}; +- +-&i2c2 { +- clock-frequency = <400000>; +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_i2c2>; +- status = "okay"; +- +- pmic: bd71837@4b { +- reg = <0x4b>; +- compatible = "rohm,bd71837"; +- /* PMIC BD71837 PMIC_nINT GPIO1_IO3 */ +- pinctrl-0 = <&pinctrl_pmic>; +- gpio_intr = <&gpio1 3 GPIO_ACTIVE_LOW>; +- +- gpo { +- rohm,drv = <0x0C>; /* 0b0000_1100 all gpos with cmos output mode */ +- }; +- +- regulators { +- #address-cells = <1>; +- #size-cells = <0>; +- +- bd71837,pmic-buck2-uses-i2c-dvs; +- bd71837,pmic-buck2-dvs-voltage = <1000000>, <900000>, <0>; /* VDD_ARM: Run-Idle */ +- +- buck1_reg: regulator@0 { +- reg = <0>; +- regulator-compatible = "buck1"; +- regulator-min-microvolt = <700000>; +- regulator-max-microvolt = <1300000>; +- regulator-boot-on; +- regulator-always-on; +- regulator-ramp-delay = <1250>; +- }; +- +- buck2_reg: regulator@1 { +- reg = <1>; +- regulator-compatible = "buck2"; +- regulator-min-microvolt = <700000>; +- regulator-max-microvolt = <1300000>; +- regulator-boot-on; +- regulator-always-on; +- regulator-ramp-delay = <1250>; +- }; +- +- buck3_reg: regulator@2 { +- reg = <2>; +- regulator-compatible = "buck3"; +- regulator-min-microvolt = <700000>; +- regulator-max-microvolt = <1300000>; +- }; +- +- buck4_reg: regulator@3 { +- reg = <3>; +- regulator-compatible = "buck4"; +- regulator-min-microvolt = <700000>; +- regulator-max-microvolt = <1300000>; +- }; +- +- buck5_reg: regulator@4 { +- reg = <4>; +- regulator-compatible = "buck5"; +- regulator-min-microvolt = <700000>; +- regulator-max-microvolt = <1350000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- buck6_reg: regulator@5 { +- reg = <5>; +- regulator-compatible = "buck6"; +- regulator-min-microvolt = <3000000>; +- regulator-max-microvolt = <3300000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- buck7_reg: regulator@6 { +- reg = <6>; +- regulator-compatible = "buck7"; +- regulator-min-microvolt = <1605000>; +- regulator-max-microvolt = <1995000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- buck8_reg: regulator@7 { +- reg = <7>; +- regulator-compatible = "buck8"; +- regulator-min-microvolt = <800000>; +- regulator-max-microvolt = <1400000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- ldo1_reg: regulator@8 { +- reg = <8>; +- regulator-compatible = "ldo1"; +- regulator-min-microvolt = <3000000>; +- regulator-max-microvolt = <3300000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- ldo2_reg: regulator@9 { +- reg = <9>; +- regulator-compatible = "ldo2"; +- regulator-min-microvolt = <900000>; +- regulator-max-microvolt = <900000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- ldo3_reg: regulator@10 { +- reg = <10>; +- regulator-compatible = "ldo3"; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <3300000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- ldo4_reg: regulator@11 { +- reg = <11>; +- regulator-compatible = "ldo4"; +- regulator-min-microvolt = <900000>; +- regulator-max-microvolt = <1800000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- ldo5_reg: regulator@12 { +- reg = <12>; +- regulator-compatible = "ldo5"; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <3300000>; +- }; +- +- ldo6_reg: regulator@13 { +- reg = <13>; +- regulator-compatible = "ldo6"; +- regulator-min-microvolt = <900000>; +- regulator-max-microvolt = <1800000>; +- regulator-boot-on; +- regulator-always-on; +- }; +- +- ldo7_reg: regulator@14 { +- reg = <14>; +- regulator-compatible = "ldo7"; +- regulator-min-microvolt = <1800000>; +- regulator-max-microvolt = <3300000>; +- }; +- }; +- }; +-}; +- +-&i2c3 { +- clock-frequency = <100000>; +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_i2c3>; +- status = "disabled"; +-}; +- +-&fec1 { +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_fec1>; +- phy-mode = "rgmii-id"; +- phy-handle = <ðphy0>; +- fsl,magic-packet; +- status = "okay"; +- +- mdio { +- #address-cells = <1>; +- #size-cells = <0>; +- +- ethphy0: ethernet-phy@0 { +- compatible = "ethernet-phy-ieee802.3-c22"; +- reg = <0>; +- at803x,led-act-blind-workaround; +- at803x,eee-okay; +- at803x,vddio-1p8v; +- }; +- }; +-}; +- +-&uart3 { /* console */ +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_uart3>; +- status = "okay"; +-}; +- +-&usdhc2 { +- pinctrl-names = "default", "state_100mhz", "state_200mhz"; +- pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>; +- pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>; +- pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>; +- bus-width = <4>; +- fsl,wp-controller; +- non-removable; +- vmmc-supply = <®_usdhc2_vmmc>; +- status = "okay"; +-}; +- +-&usdhc3 { +- pinctrl-names = "default", "state_100mhz", "state_200mhz"; +- pinctrl-0 = <&pinctrl_usdhc3>; +- pinctrl-1 = <&pinctrl_usdhc3_100mhz>; +- pinctrl-2 = <&pinctrl_usdhc3_200mhz>; +- bus-width = <8>; +- non-removable; +- status = "okay"; +-}; +- +-&wdog1 { +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_wdog>; +- fsl,ext-reset-output; +- status = "okay"; +-}; +- +-&A53_0 { +- arm-supply = <&buck2_reg>; +-}; +- +-&usbotg1 { +- dr_mode = "otg"; +- status = "okay"; +-}; +- +-&usbotg2 { +- dr_mode = "host"; +- status = "okay"; +-}; +- +-&cpu_alert0 { +- temperature = <105000>; +-}; +-&cpu_crit0 { +- temperature = <115000>; + }; +-- +2.11.0 + diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0058-iot-gate-imx8-Add-basic-support.patch b/recipes-bsp/u-boot/compulab/imx8mm/0058-iot-gate-imx8-Add-basic-support.patch new file mode 100644 index 0000000..2114e99 --- /dev/null +++ b/recipes-bsp/u-boot/compulab/imx8mm/0058-iot-gate-imx8-Add-basic-support.patch @@ -0,0 +1,577 @@ +From 684d387f307b2d6259e528eb6785d8cdead52ba5 Mon Sep 17 00:00:00 2001 +From: Kirill Kapranov +Date: Mon, 19 Jul 2021 15:52:47 +0300 +Subject: [PATCH 058/126] iot-gate-imx8: Add basic support + +Signed-off-by: Kirill Kapranov +--- + arch/arm/dts/Makefile | 1 + + arch/arm/dts/iot-gate-imx8.dts | 49 +++++ + arch/arm/mach-imx/imx8m/Kconfig | 7 + + board/compulab/iot-gate-imx8/Kconfig | 17 ++ + board/compulab/iot-gate-imx8/Makefile | 15 ++ + board/compulab/iot-gate-imx8/iot-gate-imx8.c | 265 +++++++++++++++++++++++++++ + board/compulab/iot-gate-imx8/spl.c | 8 + + configs/iot-gate-imx8_defconfig | 102 +++++++++++ + include/configs/iot-gate-imx8.h | 15 ++ + 9 files changed, 479 insertions(+) + create mode 100644 arch/arm/dts/iot-gate-imx8.dts + create mode 100644 board/compulab/iot-gate-imx8/Kconfig + create mode 100644 board/compulab/iot-gate-imx8/Makefile + create mode 100644 board/compulab/iot-gate-imx8/iot-gate-imx8.c + create mode 100644 board/compulab/iot-gate-imx8/spl.c + create mode 100644 configs/iot-gate-imx8_defconfig + create mode 100644 include/configs/iot-gate-imx8.h + +diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile +index c6b54163d0..1fc99ed1c9 100644 +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -890,6 +890,7 @@ dtb-$(CONFIG_ARCH_IMX8ULP) += imx8ulp-evk.dtb imx8ulp-evk-i3c.dtb + + dtb-$(CONFIG_TARGET_UCM_IMX8M_MINI) += ucm-imx8m-mini.dtb + dtb-$(CONFIG_TARGET_MCM_IMX8M_MINI) += mcm-imx8m-mini.dtb ++dtb-$(CONFIG_TARGET_IOT_GATE_IMX8) += iot-gate-imx8.dtb + + dtb-$(CONFIG_RCAR_GEN2) += \ + r8a7790-lager-u-boot.dtb \ +diff --git a/arch/arm/dts/iot-gate-imx8.dts b/arch/arm/dts/iot-gate-imx8.dts +new file mode 100644 +index 0000000000..6b6b2d69c7 +--- /dev/null ++++ b/arch/arm/dts/iot-gate-imx8.dts +@@ -0,0 +1,49 @@ ++/* ++ * Copyright 2020 CompuLab ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ */ ++ ++/dts-v1/; ++ ++#include "cpl-imx8m-mini.dtsi" ++ ++/ { ++ model = "CompuLab IOT-GATE-iMX8"; ++ compatible = "sb-iotgimx8", "cpl,ucm-imx8m-mini", "fsl,imx8mm-evk", "fsl,imx8mm"; ++ ++ reg_vusb_5v: regulator-usdhc2 { ++ compatible = "regulator-fixed"; ++ regulator-name = "VUSB_5V"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>; ++ regulator-boot-on; ++ enable-active-high; ++ }; ++}; ++ ++&usbotg1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctl_usb_gpio>; ++ dr_mode = "host"; ++ status = "okay"; ++}; ++ ++&iomuxc { ++ sb-iotgimx8 { ++ pinctl_usb_gpio: usb_gpio_grp { ++ fsl,pins = < ++ MX8MM_IOMUXC_SAI3_RXFS_GPIO4_IO28 0x00 ++ >; ++ }; ++ }; ++}; +diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig +index a38ec31d25..3102155bc1 100644 +--- a/arch/arm/mach-imx/imx8m/Kconfig ++++ b/arch/arm/mach-imx/imx8m/Kconfig +@@ -272,6 +272,12 @@ config TARGET_MCM_IMX8M_MINI + select SUPPORT_SPL + select IMX8M_LPDDR4 + ++config TARGET_IOT_GATE_IMX8 ++ bool "CompuLab iot-gate-imx8" ++ select IMX8MM ++ select SUPPORT_SPL ++ select IMX8M_LPDDR4 ++ + endchoice + + source "board/freescale/imx8mq_evk/Kconfig" +@@ -291,5 +297,6 @@ source "board/phytec/phycore_imx8mm/Kconfig" + source "board/phytec/phycore_imx8mp/Kconfig" + source "board/compulab/ucm-imx8m-mini/Kconfig" + source "board/compulab/mcm-imx8m-mini/Kconfig" ++source "board/compulab/iot-gate-imx8/Kconfig" + + endif +diff --git a/board/compulab/iot-gate-imx8/Kconfig b/board/compulab/iot-gate-imx8/Kconfig +new file mode 100644 +index 0000000000..84f53ca6b9 +--- /dev/null ++++ b/board/compulab/iot-gate-imx8/Kconfig +@@ -0,0 +1,17 @@ ++if TARGET_IOT_GATE_IMX8 ++ ++config SYS_BOARD ++ default "iot-gate-imx8" ++ ++config SYS_VENDOR ++ default "compulab" ++ ++config SYS_CONFIG_NAME ++ default "iot-gate-imx8" ++ ++config DEFAULT_DTB ++ string "U-Boot Default Device Tree File" ++ depends on TARGET_IOT_GATE_IMX8 ++ default "sb-iotgimx8-can.dtb" ++ ++endif +diff --git a/board/compulab/iot-gate-imx8/Makefile b/board/compulab/iot-gate-imx8/Makefile +new file mode 100644 +index 0000000000..af743b977b +--- /dev/null ++++ b/board/compulab/iot-gate-imx8/Makefile +@@ -0,0 +1,15 @@ ++# ++# Copyright 2018 CompuLab ++# ++# SPDX-License-Identifier: GPL-2.0+ ++# ++ ++ccflags-y += -I$(srctree)/board/compulab/plat/imx8mm/ ++ ++ifdef CONFIG_SPL_BUILD ++obj-y += spl.o ++else ++obj-y += iot-gate-imx8.o ++endif ++ ++obj-y += ../plat/imx8mm/ +diff --git a/board/compulab/iot-gate-imx8/iot-gate-imx8.c b/board/compulab/iot-gate-imx8/iot-gate-imx8.c +new file mode 100644 +index 0000000000..d01b8f8767 +--- /dev/null ++++ b/board/compulab/iot-gate-imx8/iot-gate-imx8.c +@@ -0,0 +1,265 @@ ++/* ++ * Copyright 2020 CompuLab ++ * ++ * SPDX-License-Identifier: GPL-2.0+ ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "../common/eeprom.h" ++#include ++#include ++#include ++#include "ddr/ddr.h" ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++#ifdef CONFIG_BOARD_POSTCLK_INIT ++int board_postclk_init(void) ++{ ++ /* TODO */ ++ return 0; ++} ++#endif ++int board_phys_sdram_size(phys_size_t *size) ++{ ++ struct lpddr4_tcm_desc *lpddr4_tcm_desc = (struct lpddr4_tcm_desc *) TCM_DATA_CFG; ++ ++ switch (lpddr4_tcm_desc->size) { ++ case 4096: ++ case 2048: ++ case 1024: ++ *size = (1L << 20) * lpddr4_tcm_desc->size; ++ break; ++ default: ++ printf("%s: DRAM size %uM is not supported \n", __func__, ++ lpddr4_tcm_desc->size); ++ while ( 1 ) {}; ++ break; ++ }; ++ return 0; ++} ++ /* Get the top of usable RAM */ ++ulong board_get_usable_ram_top(ulong total_size) ++{ ++ ++ if(gd->ram_top > 0x100000000) ++ gd->ram_top = 0x100000000; ++ ++ return gd->ram_top; ++} ++ ++int dram_init(void) ++{ ++ phys_size_t sdram_size; ++ int ret; ++ ret = board_phys_sdram_size(&sdram_size); ++ printf("%s: size %llu\n", __func__, sdram_size); ++ if (ret) ++ return ret; ++ ++ /* rom_pointer[1] contains the size of TEE occupies */ ++ gd->ram_size = sdram_size - rom_pointer[1]; ++ ++ return 0; ++} ++ ++#ifdef CONFIG_OF_BOARD_SETUP ++int ft_board_setup(void *blob, bd_t *bd) ++{ ++ return 0; ++} ++#endif ++ ++#ifdef CONFIG_FEC_MXC ++#define FEC_RST_PAD IMX_GPIO_NR(1, 10) ++static iomux_v3_cfg_t const fec1_rst_pads[] = { ++ IMX8MM_PAD_GPIO1_IO10_GPIO1_IO10 | MUX_PAD_CTRL(NO_PAD_CTRL), ++}; ++ ++static void setup_iomux_fec(void) ++{ ++ imx_iomux_v3_setup_multiple_pads(fec1_rst_pads, ++ ARRAY_SIZE(fec1_rst_pads)); ++ ++ gpio_request(FEC_RST_PAD, "fec1_rst"); ++ gpio_direction_output(FEC_RST_PAD, 0); ++ udelay(500); ++ gpio_direction_output(FEC_RST_PAD, 1); ++} ++ ++/* ++ * setup_mac_address() - set Ethernet MAC address environment. ++ * ++ * @return: 0 on success, -1 on failure ++ */ ++static int setup_mac_address(void) ++{ ++ int ret; ++ unsigned char enetaddr[6]; ++ ++ ret = eth_env_get_enetaddr("ethaddr", enetaddr); ++ if (ret) ++ return 0; ++ ++ ret = cl_eeprom_read_mac_addr(enetaddr, CONFIG_SYS_I2C_EEPROM_BUS); ++ if (ret) ++ return ret; ++ ++ ret = is_valid_ethaddr(enetaddr); ++ if (!ret) ++ return -1; ++ ++ ret = eth_env_set_enetaddr("ethaddr", enetaddr); ++ if (ret) ++ return -1; ++ ++ return 0; ++} ++ ++static int setup_fec(void) ++{ ++ struct iomuxc_gpr_base_regs *const iomuxc_gpr_regs ++ = (struct iomuxc_gpr_base_regs *) IOMUXC_GPR_BASE_ADDR; ++ ++ setup_iomux_fec(); ++ ++ /* Use 125M anatop REF_CLK1 for ENET1, not from external */ ++ clrsetbits_le32(&iomuxc_gpr_regs->gpr[1], ++ IOMUXC_GPR_GPR1_GPR_ENET1_TX_CLK_SEL_SHIFT, 0); ++ return set_clk_enet(ENET_125MHZ); ++} ++ ++int board_phy_config(struct phy_device *phydev) ++{ ++ /* enable rgmii rxc skew and phy mode select to RGMII copper */ ++ phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x1f); ++ phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x8); ++ ++ phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x00); ++ phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x82ee); ++ phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x05); ++ phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x100); ++ ++ if (phydev->drv->config) ++ phydev->drv->config(phydev); ++ return 0; ++} ++#endif ++ ++int board_usb_init(int index, enum usb_init_type init) ++{ ++ debug("board_usb_init %d, type %d\n", index, init); ++ ++ imx8m_usb_power(index, true); ++ ++ return 0; ++} ++ ++int board_usb_cleanup(int index, enum usb_init_type init) ++{ ++ debug("board_usb_cleanup %d, type %d\n", index, init); ++ ++ imx8m_usb_power(index, false); ++ ++ return 0; ++} ++int board_init(void) ++{ ++ ++#ifdef CONFIG_FEC_MXC ++ setup_fec(); ++#endif ++ return 0; ++} ++ ++int board_mmc_get_env_dev(int devno) ++{ ++ const ulong user_env_devno = env_get_hex("env_dev", ULONG_MAX); ++ if (user_env_devno != ULONG_MAX) { ++ printf("User Environment dev# is (%lu)\n", user_env_devno); ++ return (int)user_env_devno; ++ } ++ return devno; ++} ++ ++static int _mmc_get_env_part(void) ++{ ++ const ulong user_env_part = env_get_hex("env_part", ULONG_MAX); ++ if (user_env_part != ULONG_MAX) { ++ printf("User Environment part# is (%lu)\n", user_env_part); ++ return (int)user_env_part; ++ } ++ return CONFIG_SYS_MMC_ENV_PART; ++} ++ ++uint mmc_get_env_part(struct mmc *mmc) ++{ ++ if (mmc->part_support) ++ return _mmc_get_env_part(); ++ ++ return 0; ++} ++ ++int mmc_map_to_kernel_blk(int devno){ ++ return devno; ++} ++ ++static void board_bootdev_init(void) ++{ ++ u32 bootdev = get_boot_device(); ++ switch (bootdev) { ++ case MMC3_BOOT: ++ bootdev = 2; ++ break; ++ case SD2_BOOT: ++ bootdev = 1; ++ break; ++ default: ++ env_set("bootdev", NULL); ++ return; ++ } ++ env_set_ulong("bootdev", bootdev); ++} ++ ++int board_late_init(void) ++{ ++ int ret; ++ ++#ifdef CONFIG_ENV_IS_IN_MMC ++ board_late_mmc_env_init(); ++ board_bootdev_init(); ++#endif ++ ++ ret = setup_mac_address(); ++ if (ret < 0) ++ printf("%s: Can't set MAC address\n", __func__); ++ ++ return 0; ++} ++ ++#ifdef CONFIG_FSL_FASTBOOT ++#ifdef CONFIG_ANDROID_RECOVERY ++int is_recovery_key_pressing(void) ++{ ++ return 0; /*TODO*/ ++} ++#endif /*CONFIG_ANDROID_RECOVERY*/ ++#endif /*CONFIG_FSL_FASTBOOT*/ +diff --git a/board/compulab/iot-gate-imx8/spl.c b/board/compulab/iot-gate-imx8/spl.c +new file mode 100644 +index 0000000000..6488770333 +--- /dev/null ++++ b/board/compulab/iot-gate-imx8/spl.c +@@ -0,0 +1,8 @@ ++#include ++#include ++#include ++#include ++ ++int spl_board_private_init(void) { ++ return 0; ++} +diff --git a/configs/iot-gate-imx8_defconfig b/configs/iot-gate-imx8_defconfig +new file mode 100644 +index 0000000000..39c448eca0 +--- /dev/null ++++ b/configs/iot-gate-imx8_defconfig +@@ -0,0 +1,102 @@ ++CONFIG_ARM=y ++CONFIG_SPL_SYS_ICACHE_OFF=y ++CONFIG_SPL_SYS_DCACHE_OFF=y ++CONFIG_ARCH_IMX8M=y ++CONFIG_SYS_TEXT_BASE=0x40200000 ++CONFIG_SPL_GPIO_SUPPORT=y ++CONFIG_ENV_SIZE=0x1000 ++CONFIG_ENV_OFFSET=0x4400 ++CONFIG_DM_GPIO=y ++CONFIG_TARGET_IOT_GATE_IMX8=y ++CONFIG_DEFAULT_DTB="sb-iotgimx8-can.dtb" ++CONFIG_SPL_MMC_SUPPORT=y ++CONFIG_SPL_SERIAL_SUPPORT=y ++CONFIG_SPL=y ++CONFIG_CSF_SIZE=0x2000 ++CONFIG_SPL_TEXT_BASE=0x7E1000 ++CONFIG_LOCALVERSION="-iot-gate-imx8-1.0" ++CONFIG_FIT=y ++CONFIG_FIT_EXTERNAL_OFFSET=0x3000 ++CONFIG_SPL_LOAD_FIT=y ++CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh" ++CONFIG_OF_SYSTEM_SETUP=y ++CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg" ++CONFIG_CONSOLE_MUX=y ++CONFIG_DEFAULT_FDT_FILE="sb-iotgimx8-can.dtb" ++CONFIG_BOARD_LATE_INIT=y ++CONFIG_ARCH_MISC_INIT=y ++CONFIG_BOARD_EARLY_INIT_F=y ++CONFIG_SPL_BOARD_INIT=y ++CONFIG_SPL_SEPARATE_BSS=y ++CONFIG_SPL_POWER_SUPPORT=y ++CONFIG_HUSH_PARSER=y ++CONFIG_SYS_PROMPT="u-boot=> " ++# CONFIG_BOOTM_NETBSD is not set ++CONFIG_CMD_EEPROM=y ++CONFIG_CMD_EEPROM_LAYOUT=y ++CONFIG_CMD_MEMINFO=y ++CONFIG_CMD_MEMTEST=y ++CONFIG_CMD_CLK=y ++CONFIG_CMD_FUSE=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_I2C=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_DHCP=y ++CONFIG_CMD_MII=y ++CONFIG_CMD_PING=y ++CONFIG_CMD_CACHE=y ++CONFIG_CMD_REGULATOR=y ++CONFIG_CMD_EXT2=y ++CONFIG_CMD_EXT4=y ++CONFIG_CMD_FAT=y ++CONFIG_CMD_FS_GENERIC=y ++CONFIG_EFI_PARTITION=y ++CONFIG_OF_CONTROL=y ++CONFIG_DEFAULT_DEVICE_TREE="iot-gate-imx8" ++CONFIG_ENV_IS_IN_MMC=y ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y ++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y ++CONFIG_REGMAP=y ++CONFIG_SYSCON=y ++CONFIG_CLK_COMPOSITE_CCF=y ++CONFIG_CLK_IMX8MM=y ++CONFIG_MXC_GPIO=y ++CONFIG_DM_I2C=y ++CONFIG_SYS_I2C_MXC=y ++CONFIG_DM_MMC=y ++CONFIG_SUPPORT_EMMC_BOOT=y ++CONFIG_MMC_IO_VOLTAGE=y ++CONFIG_MMC_UHS_SUPPORT=y ++CONFIG_MMC_HS400_ES_SUPPORT=y ++CONFIG_MMC_HS400_SUPPORT=y ++CONFIG_FSL_ESDHC_IMX=y ++CONFIG_DM_ETH=y ++CONFIG_FEC_MXC=y ++CONFIG_MII=y ++CONFIG_PINCTRL=y ++CONFIG_PINCTRL_IMX8M=y ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_REGULATOR_GPIO=y ++CONFIG_DM_RESET=y ++CONFIG_MXC_UART=y ++CONFIG_SYSRESET=y ++CONFIG_SYSRESET_PSCI=y ++CONFIG_DM_THERMAL=y ++CONFIG_NXP_TMU=y ++CONFIG_USB=y ++CONFIG_DM_USB=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_USB_GADGET=y ++CONFIG_USB_GADGET_MANUFACTURER="FSL" ++CONFIG_USB_GADGET_VENDOR_NUM=0x0525 ++CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 ++CONFIG_CI_UDC=y ++CONFIG_SDP_LOADADDR=0x40400000 ++CONFIG_USB_GADGET_DOWNLOAD=y ++CONFIG_USB_HOST_ETHER=y ++CONFIG_USB_ETHER_ASIX88179=y ++CONFIG_EXT4_WRITE=y ++CONFIG_FAT_WRITE=y ++CONFIG_OF_LIBFDT_OVERLAY=y ++# CONFIG_EFI_LOADER is not set +diff --git a/include/configs/iot-gate-imx8.h b/include/configs/iot-gate-imx8.h +new file mode 100644 +index 0000000000..b3d6082a66 +--- /dev/null ++++ b/include/configs/iot-gate-imx8.h +@@ -0,0 +1,15 @@ ++/* ++ * Copyright 2020 CompuLab ++ * ++ * SPDX-License-Identifier: GPL-2.0+ ++ */ ++ ++#ifndef __UCM_IMX8M_MINI_H ++#define __UCM_IMX8M_MINI_H ++ ++#include "cpl-imx8m-mini.h" ++ ++#if defined(CONFIG_ANDROID_SUPPORT) ++#include "ucm-imx8m-mini_android.h" ++#endif ++#endif +-- +2.11.0 + diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0059-mcm-imx8m-mini-config-Update-env-size-offest.patch b/recipes-bsp/u-boot/compulab/imx8mm/0059-mcm-imx8m-mini-config-Update-env-size-offest.patch new file mode 100644 index 0000000..8b1b489 --- /dev/null +++ b/recipes-bsp/u-boot/compulab/imx8mm/0059-mcm-imx8m-mini-config-Update-env-size-offest.patch @@ -0,0 +1,28 @@ +From 94829c14ef32f7d41ac3b5b5efee763c549ff196 Mon Sep 17 00:00:00 2001 +From: Valentin Raevsky +Date: Wed, 15 Jul 2020 15:25:04 +0300 +Subject: [PATCH 059/126] mcm-imx8m-mini: config: Update env size/offest + +Signed-off-by: Valentin Raevsky +--- + configs/mcm-imx8m-mini_defconfig | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configs/mcm-imx8m-mini_defconfig b/configs/mcm-imx8m-mini_defconfig +index a4c3c90f83..971e1ec982 100644 +--- a/configs/mcm-imx8m-mini_defconfig ++++ b/configs/mcm-imx8m-mini_defconfig +@@ -4,8 +4,8 @@ CONFIG_SPL_SYS_DCACHE_OFF=y + CONFIG_ARCH_IMX8M=y + CONFIG_SYS_TEXT_BASE=0x40200000 + CONFIG_SPL_GPIO_SUPPORT=y +-CONFIG_ENV_SIZE=0x4000 +-CONFIG_ENV_OFFSET=0x1000 ++CONFIG_ENV_SIZE=0x1000 ++CONFIG_ENV_OFFSET=0x4400 + CONFIG_DM_GPIO=y + CONFIG_TARGET_MCM_IMX8M_MINI=y + CONFIG_SPL_MMC_SUPPORT=y +-- +2.11.0 + diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0060-imx8m-mini-env-config-Update-size-offset-value.patch b/recipes-bsp/u-boot/compulab/imx8mm/0060-imx8m-mini-env-config-Update-size-offset-value.patch new file mode 100644 index 0000000..ab69e00 --- /dev/null +++ b/recipes-bsp/u-boot/compulab/imx8mm/0060-imx8m-mini-env-config-Update-size-offset-value.patch @@ -0,0 +1,29 @@ +From e94a6f8fef7c25d00a41f791ab16813fc760c392 Mon Sep 17 00:00:00 2001 +From: Valentin Raevsky +Date: Wed, 15 Jul 2020 15:27:37 +0300 +Subject: [PATCH 060/126] imx8m-mini: env: config: Update size/offset value + +Update size/offset value for CompuLab imx8m-mini boards + +Signed-off-by: Valentin Raevsky +--- + tools/env/fw_env.config | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tools/env/fw_env.config b/tools/env/fw_env.config +index 3222fd715c..988ef9f728 100644 +--- a/tools/env/fw_env.config ++++ b/tools/env/fw_env.config +@@ -6,6 +6,6 @@ + # be the same as the Environment size, which is valid for NOR and SPI-dataflash + # Device offset must be prefixed with 0x to be parsed as a hexadecimal value. + +-# Block device for mcm-imx8m-mini +-/dev/mmcblk2boot0 0x1000 0x4000 +-#/dev/mmcblk1 0x1000 0x4000 ++# Block devices for CompuLab imx8m-mini ++/dev/mmcblk2boot0 0x4400 0x1000 ++#/dev/mmcblk1 0x4400 0x1000 +-- +2.11.0 + diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0061-imx8-eeprom-Move-to-the-imx8-platform-independent-fo.patch b/recipes-bsp/u-boot/compulab/imx8mm/0061-imx8-eeprom-Move-to-the-imx8-platform-independent-fo.patch new file mode 100644 index 0000000..4e55ef2 --- /dev/null +++ b/recipes-bsp/u-boot/compulab/imx8mm/0061-imx8-eeprom-Move-to-the-imx8-platform-independent-fo.patch @@ -0,0 +1,123 @@ +From 663f170f28034023bbd13d6c4359be43719862e7 Mon Sep 17 00:00:00 2001 +From: Valentin Raevsky +Date: Fri, 17 Jul 2020 18:59:22 +0300 +Subject: [PATCH 061/126] imx8: eeprom: Move to the imx8 platform independent + folder + +Move the eeprom code the imx8 platform independent folder. +The same code gets used by all CompuLab imx8 boards. + +Signed-off-by: Valentin Raevsky +--- + board/compulab/iot-gate-imx8/Makefile | 2 ++ + board/compulab/mcm-imx8m-mini/Makefile | 2 ++ + board/compulab/plat/imx8/Makefile | 1 + + board/compulab/plat/{imx8mm => imx8}/eeprom/Makefile | 0 + board/compulab/plat/{imx8mm => imx8}/eeprom/eeprom.c | 0 + board/compulab/plat/{imx8mm => imx8}/eeprom/eeprom.h | 0 + board/compulab/plat/{imx8mm => imx8}/eeprom/eeprom_spl.c | 1 + + board/compulab/plat/imx8mm/Makefile | 1 - + board/compulab/ucm-imx8m-mini/Makefile | 2 ++ + 9 files changed, 8 insertions(+), 1 deletion(-) + create mode 100644 board/compulab/plat/imx8/Makefile + rename board/compulab/plat/{imx8mm => imx8}/eeprom/Makefile (100%) + rename board/compulab/plat/{imx8mm => imx8}/eeprom/eeprom.c (100%) + rename board/compulab/plat/{imx8mm => imx8}/eeprom/eeprom.h (100%) + rename board/compulab/plat/{imx8mm => imx8}/eeprom/eeprom_spl.c (99%) + +diff --git a/board/compulab/iot-gate-imx8/Makefile b/board/compulab/iot-gate-imx8/Makefile +index af743b977b..e5239d1dbb 100644 +--- a/board/compulab/iot-gate-imx8/Makefile ++++ b/board/compulab/iot-gate-imx8/Makefile +@@ -5,6 +5,7 @@ + # + + ccflags-y += -I$(srctree)/board/compulab/plat/imx8mm/ ++ccflags-y += -I$(srctree)/board/compulab/plat/imx8/ + + ifdef CONFIG_SPL_BUILD + obj-y += spl.o +@@ -13,3 +14,4 @@ obj-y += iot-gate-imx8.o + endif + + obj-y += ../plat/imx8mm/ ++obj-y += ../plat/imx8/ +diff --git a/board/compulab/mcm-imx8m-mini/Makefile b/board/compulab/mcm-imx8m-mini/Makefile +index 9ce2875d6e..2cadd46fb8 100644 +--- a/board/compulab/mcm-imx8m-mini/Makefile ++++ b/board/compulab/mcm-imx8m-mini/Makefile +@@ -5,6 +5,7 @@ + # + + ccflags-y += -I$(srctree)/board/compulab/plat/imx8mm/ ++ccflags-y += -I$(srctree)/board/compulab/plat/imx8/ + + ifdef CONFIG_SPL_BUILD + obj-y += spl.o +@@ -13,3 +14,4 @@ obj-y += mcm-imx8m-mini.o + endif + + obj-y += ../plat/imx8mm/ ++obj-y += ../plat/imx8/ +diff --git a/board/compulab/plat/imx8/Makefile b/board/compulab/plat/imx8/Makefile +new file mode 100644 +index 0000000000..9d3044cb9e +--- /dev/null ++++ b/board/compulab/plat/imx8/Makefile +@@ -0,0 +1 @@ ++obj-y += eeprom/ +diff --git a/board/compulab/plat/imx8mm/eeprom/Makefile b/board/compulab/plat/imx8/eeprom/Makefile +similarity index 100% +rename from board/compulab/plat/imx8mm/eeprom/Makefile +rename to board/compulab/plat/imx8/eeprom/Makefile +diff --git a/board/compulab/plat/imx8mm/eeprom/eeprom.c b/board/compulab/plat/imx8/eeprom/eeprom.c +similarity index 100% +rename from board/compulab/plat/imx8mm/eeprom/eeprom.c +rename to board/compulab/plat/imx8/eeprom/eeprom.c +diff --git a/board/compulab/plat/imx8mm/eeprom/eeprom.h b/board/compulab/plat/imx8/eeprom/eeprom.h +similarity index 100% +rename from board/compulab/plat/imx8mm/eeprom/eeprom.h +rename to board/compulab/plat/imx8/eeprom/eeprom.h +diff --git a/board/compulab/plat/imx8mm/eeprom/eeprom_spl.c b/board/compulab/plat/imx8/eeprom/eeprom_spl.c +similarity index 99% +rename from board/compulab/plat/imx8mm/eeprom/eeprom_spl.c +rename to board/compulab/plat/imx8/eeprom/eeprom_spl.c +index 09a04fda92..f25493b1ee 100644 +--- a/board/compulab/plat/imx8mm/eeprom/eeprom_spl.c ++++ b/board/compulab/plat/imx8/eeprom/eeprom_spl.c +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/board/compulab/plat/imx8mm/Makefile b/board/compulab/plat/imx8mm/Makefile +index 2f68e0523e..33b3fedef9 100644 +--- a/board/compulab/plat/imx8mm/Makefile ++++ b/board/compulab/plat/imx8mm/Makefile +@@ -1,3 +1,2 @@ + obj-y += ddr/ +-obj-y += eeprom/ + obj-y += spl/ +diff --git a/board/compulab/ucm-imx8m-mini/Makefile b/board/compulab/ucm-imx8m-mini/Makefile +index dbde2116cd..870792441c 100644 +--- a/board/compulab/ucm-imx8m-mini/Makefile ++++ b/board/compulab/ucm-imx8m-mini/Makefile +@@ -5,6 +5,7 @@ + # + + ccflags-y += -I$(srctree)/board/compulab/plat/imx8mm/ ++ccflags-y += -I$(srctree)/board/compulab/plat/imx8/ + + ifdef CONFIG_SPL_BUILD + obj-y += spl.o +@@ -13,3 +14,4 @@ obj-y += ucm-imx8m-mini.o + endif + + obj-y += ../plat/imx8mm/ ++obj-y += ../plat/imx8/ +-- +2.11.0 + diff --git a/recipes-bsp/u-boot/compulab/imx8mm/0062-imx8-eeprom-Remove-duplicated-code.patch b/recipes-bsp/u-boot/compulab/imx8mm/0062-imx8-eeprom-Remove-duplicated-code.patch new file mode 100644 index 0000000..1b1a4f9 --- /dev/null +++ b/recipes-bsp/u-boot/compulab/imx8mm/0062-imx8-eeprom-Remove-duplicated-code.patch @@ -0,0 +1,285 @@ +From bac8699e303c75526c30e3e850601c39944dad8a Mon Sep 17 00:00:00 2001 +From: Valentin Raevsky