Hi ,
We have designed a custom board by referring to imx8M nano evk board. We have cloned the yocto source for honister branch and have made modifications in u-boot for taking our custom board files, custom dts and config files. Our custom evk is named as imx8mn-evk2 . During the porting of u-boot following changes have been made.
1. Copied board/freescale/imx8mn_evk/ as board/freescale/imx8mn_evk2/
2. Copied include/configs/imx8mn_evk.h as include/configs/imx8mn_evk2.h
3. Added the following code in arch/arm/mach-imx/imx8m/Kconfig file to source the custom board files.
diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
index 245b085499..38a58df451 100644
--- a/arch/arm/mach-imx/imx8m/Kconfig
+++ b/arch/arm/mach-imx/imx8m/Kconfig
@@ -135,6 +135,16 @@ config TARGET_IMX8MN_EVK
select MISC
select SPL_CRYPTO_SUPPORT if SPL
+config TARGET_IMX8MN_EVK2
+ bool "imx8mn LPDDR4 EVK2 board"
+ select IMX8MN
+ select SUPPORT_SPL
+ select IMX8M_LPDDR4
+ select FSL_CAAM
+ select FSL_BLOB
+ select MISC
+ select SPL_CRYPTO_SUPPORT if SPL
+
config TARGET_IMX8MN_DDR4_EVK
bool "imx8mn DDR4 EVK board"
select IMX8MN
@@ -267,6 +277,7 @@ source "board/freescale/imx8mm_ab2/Kconfig"
source "board/freescale/imx8mm_evk/Kconfig"
source "board/freescale/imx8mm_val/Kconfig"
source "board/freescale/imx8mn_evk/Kconfig"
+source "board/freescale/imx8mn_evk2/Kconfig"
source "board/freescale/imx8mp_evk/Kconfig"
4. Modified the board/freescale/imx8mm_evk2/Kconfig file to source the include files
if TARGET_IMX8MN_EVK2 || TARGET_IMX8MN_DDR4_EVK || TARGET_IMX8MN_DDR3_EVK
config SYS_BOARD
default "imx8mn_evk2"
config SYS_VENDOR
default "freescale"
config SYS_CONFIG_NAME
default "imx8mn_evk2"
config IMX8MN_LOW_DRIVE_MODE
bool "Enable the low drive mode of iMX8MN on EVK board"
default n
source "board/freescale/common/Kconfig"
endif
5. Copied arch/arm/dts/imx8mn-evk.dts as arch/arm/dts/imx8mn-evk2.dts,
configs/imx8mn_evk_defconfig as configs/imx8mn_evk2_defconfig
6. Modified the Makefile in arch/arm/dts/Makefile to compile the imx8mn-evk2.dts file.
7. The imx8mn_evk2_defconfig is modified to take custom board files and dts files.
CONFIG_DEFAULT_FDT_FILE="imx8mn-evk2.dtb"
CONFIG_DEFAULT_DEVICE_TREE="imx8mn-evk2"
CONFIG_TARGET_IMX8MN_EVK2=y
When the u-boot source is built using the imx8mn_evk2_defconfig config file, the imx8mn-evk2.dtb is getting compiled and the source is generated. But when programmed to the board the board hanges. Please find the following logs .
U-Boot SPL 2021.04-lf_v2021.04+gf7b43f8b4c (Jun 21 2022 - 12:35:48 +0530)
Failed to find clock node. Check device tree
### ERROR ### Please RESET the board ###
Little digging into the issue, when we use the imx8mn-evk.dts file instead of custom imx8mn-evk2.dts file, the baord is booting fine. The custom imx8mn-evk2.dts is the exact copy of imx8mn-evk.dts file. Not sure why the following problem is confronted. Please require your help in solving the following issue
Thanks and Regards,
Bhavani S
Solved! Go to Solution.
Hi @BHAVANI_S ,
Looks like your forgot to create arch/arm/dts/imx8mn-evk2-u-boot.dtsi which is a copy of arch/arm/dts/imx8mn-evk-u-boot.dtsi.
Regards,
Khang
thanks @khang_letruong
this issue made me crazy for several hours. Not really clear why u-boot compiles without that dtsi.
Did you solve this problem?
I met the same problem as you mentioned.
I've add one more imx8mn-evk-u-boot.dtsi during my device tree. But it still have the Error message "HID(W):LIBUSB_ERROR_TIMEOUT" during uuu flash to the board.
and the uart log shows "
U-Boot SPL 2021.04-lf_v2021.04+g604de4b4aa (Apr 05 2011 - 23:00:00 +0000)
Failed to find clock node. Check device tree
### ERROR ### Please RESET the board ### "
Could you provide the suggestion if you get more information or ideas? thanks a lot.
Hi @BHAVANI_S ,
Looks like your forgot to create arch/arm/dts/imx8mn-evk2-u-boot.dtsi which is a copy of arch/arm/dts/imx8mn-evk-u-boot.dtsi.
Regards,
Khang