iMX8M custom board u-boot boot issues

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX8M custom board u-boot boot issues

2,456 Views
girishprasadgm
Contributor II

Hi 

We have custom imx8m based board, with 4GB LPDDR. U-Boot with 4GB LPDDR configuration boots successfullly if i build the u-boot manually by following steps mentioned in Manually build Boot binary for i.MX8M Mini   but if i build the same with yocto u-boot fails to boot . 

During bootup invalid RAM size and RAM top are shown

Failure Log:

==================================================

U-Boot 2018.03-4.14.98-2.3.0+g5b0b974fc2 (Jul 22 2020 - 07:09:44 +0000)

U-Boot code: 40200000 -> 402A0260 BSS: -> 402E2880
CPU: Freescale i.MX8MMQL rev1.0 1600 MHz (running at 1200 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 40C
Reset cause: POR
Model: FSL i.MX8MM Zebra XS10 board
DRAM: Monitor len: 000E2880
Ram size: FE000000
Ram top: FE000000
TLB table from fdff0000 to fe000000
Reserving 906k for U-Boot at: fdf0d000
Reserving 542720k for malloc() at: dcd0d000

Logs where boot is success with out yocto build

======================================================

U-Boot 2018.03-gcb5d2882d2-dirty (Jul 22 2020 - 13:00:10 +0530)

U-Boot code: 40200000 -> 4029E338 BSS: -> 402E0080
CPU: Freescale i.MX8MMQL rev1.0 1600 MHz (running at 1200 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 37C
Reset cause: POR
Model: FSL i.MX8MM Zebra XS10 board
DRAM: Monitor len: 000E0080
Ram size: 100000000
Ram top: 100000000
TLB table from ffff0000 to 100000000
Reserving 896k for U-Boot at: fff0f000
Reserving 542720k for malloc() at: ded0f000
Reserving 168 Bytes for Board Info at: ded0ef58
Reserving 456 Bytes for Global Data at: ded0ed90
Reserving 30656 Bytes for FDT at: ded075d0

RAM Configuration:
Bank #0: 40000000 3 GiB
Bank #1: 100000000 1 GiB

DRAM: 4 GiB
New Stack Pointer is: ded075c0
Relocation Offset is: bfd0f000
Relocating to fff0f000, new gd at ded0ed90, sp at ded075c0
Pre-reloc malloc() used 0x2e8 bytes (0 KB)
Now running in RAM - U-Boot at: fff0f000
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
No panel detected: default to MIPI2HDMI
adv7535_init: Can't find device id=0x3d, on bus 1
Display: MIPI2HDMI (1920x1080)
Video: 1920x1080x24
In: serial
Out: serial
Err: serial

============================================

Changes to enable 4GB RAM 

imx8mm_alpha.h

@@ -14,7 +14,7 @@

#define UBOOT_ACTIVE_NUM 1
#define UBOOT_LAST_NUM 2
-
+
#define PLATFORM_PARTITION 7
#define PLATFORM_PARTITION_LAST 8
#define BOOTABLECONFIG_DEFAULT_VALUE 1
@@ -308,8 +308,10 @@

#define CONFIG_SYS_SDRAM_BASE 0x40000000
#define PHYS_SDRAM 0x40000000
-#define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */
-#define CONFIG_NR_DRAM_BANKS 1
+#define PHYS_SDRAM_SIZE 0xC0000000 /* 3GB */
+#define PHYS_SDRAM_2 0x100000000
+#define PHYS_SDRAM_2_SIZE 0x40000000 /* 1GB */
+#define CONFIG_NR_DRAM_BANKS 2

#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + (PHYS_SDRAM_SIZE >> 1))

=================================

--- a/arch/arm/dts/fsl-imx8mm.dtsi
+++ b/arch/arm/dts/fsl-imx8mm.dtsi
@@ -63,7 +63,7 @@

memory@40000000 {
device_type = "memory";
- reg = <0x0 0x40000000 0 0x80000000>;
+ reg = <0x00000000 0x40000000 0 0xc0000000>;
};

====================================

Please let me know is above changes are correct ? and why u-boot does not boot if built with yocto 

Labels (1)
0 Kudos
3 Replies

2,337 Views
igorpadykov
NXP Employee
NXP Employee

Hi Girish

one can try to build using nxp document  i.MX Yocto Project User’s Guide

and  linux from nxp  source.codeaurora.org/external/imx/linux-imx repository
https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_5.4.24_2.1.0

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

2,337 Views
girishprasadgm
Contributor II

Hi igor

Thanks a lot fot your answer.. I have already followed the yocto project user guide and still have same issue.. while browsing through got a thread 

https://community.nxp.com/thread/528623  says that op-tee can't  detect ram size more than 3GB in u-boot.  

Since yocto build includes optee i  am having issue in booting board. Can you please guide how to enable 4GB ram in imx8m mini based board along with op-tee enabled. 

If i disable op-tee in yocto build, i able to boot the device with 4GB ram configuration with above mentioned changes

Thanks

Girish

0 Kudos

2,337 Views
igorpadykov
NXP Employee
NXP Employee

Hi Girish

for op-tee one can try attached patches.

Best regards
igor

0 Kudos