U-boot porting for custom board based on imx8M nano processor

cancel
Showing results for 
Search instead for 
Did you mean: 

U-boot porting for custom board based on imx8M nano processor

Jump to solution
20 Views
BHAVANI_S
Contributor I

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

0 Kudos
1 Solution
15 Views
khang_letruong
Senior Contributor II

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

View solution in original post

1 Reply
16 Views
khang_letruong
Senior Contributor II

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