iMX8M Mini change RAM size

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

iMX8M Mini change RAM size

Jump to solution
2,079 Views
dpog
Contributor V

I'm struggling with the DRAM-size in U-Boot. Our custom board solution uses a 1Gb LPDDR4 RAM, so I changed the PHYS_SDRAM_SIZE in imx8mm_evk.h to 0x4000 0000, the DDR is configured with the stress tool. But in the bootlog it still says DRAM: 2GiB.

With debug messages I traced the new set RAM size to dram_init_banksize in arch/arm/mach-imx/imx8m/soc.c.

The problem seems to be with optee, the rom_pointer[1] is set, although I removed it with

MACHINE_FEATURES_remove += "optee"
DISTRO_FEATURES_remove += "optee"
IMAGE_INSTALL_remove += "optee-test optee-os optee-client"

optee_start is at 0xbe00 000, which lies outside of my RAM-space (0x4000 000 0 - 0x8000 0000)

The banksize is defined by optee_start - PHYS_SDRAM, so because optee_start is outside of my space, the size is way to big.

Is there a way to remove optee, so the rom_pointer[1] won't be set, or otherwise to set optee_start to 0x3e00 0000? I tried to do so manually, but then the boot gets stuck at "Added memory mapping (5) : 40000000 3e000000"

Labels (1)
0 Kudos
Reply
1 Solution
2,032 Views
xyz_
Contributor I

Hi @dpog,

You can change BL32_BASE in ATF at plat/imx/imx8m/imx8mm/platform.mk  

and TEE_LOAD_ADDR at /iMX8M/ soc.mak in imx-boot to 0x7e000000 for 1GB RAM

in,OP-TEE change CFG_DDR_SIZE according to your dram size at plat-imx/conf.mk

Best Regards,

View solution in original post

4 Replies
2,047 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

When you using the 1Gb LPDDR4, have you used the proper script configuration for it and pass the stress test for it?

0 Kudos
Reply
2,040 Views
dpog
Contributor V
@Rita_Wang
The stresstest was done by our hardware department, but to be sure, I redid it just now. I checked the RPA-File, took the stresstestfile and downloaded it to the imx8mm, settings Target=MX8M-mini, Clock=Default, DDR=LPDDR4, Density=1GB. After the download, I did the calibration, generated the Array-Format code and run the stresstest, which then passed. The generated lpddr4_timing.c was then used to replace the one in use in the SPL, compiled the U-Boot, made the Image and flashed it to the board. It still shows DRAM: 2GiB.
0 Kudos
Reply
2,033 Views
xyz_
Contributor I

Hi @dpog,

You can change BL32_BASE in ATF at plat/imx/imx8m/imx8mm/platform.mk  

and TEE_LOAD_ADDR at /iMX8M/ soc.mak in imx-boot to 0x7e000000 for 1GB RAM

in,OP-TEE change CFG_DDR_SIZE according to your dram size at plat-imx/conf.mk

Best Regards,

2,019 Views
dpog
Contributor V
Thank you! You're a real lifesaver, it worked!
0 Kudos
Reply