Hello everyone,
I have a custom board based on iMX6ull14x14evk, but with 256MB of RAM.
I'm using yocto for iMX6, i'm able to compile and flash the sd card, but I can't change the DRAM size from 512 to 256 MB.
I have tried to modify "mx6ullevk.h" file changing phys dram size define as follows
#define PHYS_SDRAM_SIZE SZ_256M
But when I boot the board the size doesn't change:
CPU: Freescale i.MX6ULL rev1.0 528 MHz (running at 396 MHz)
CPU: Commercial temperature grade (0C to 95C) at 38C
Reset cause: POR
Model: Freescale i.MX6 ULL 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM: 512 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment
Is there a guide I can follow that shows how to correctly patch the files?
Thank you
Andrea
This has to do with the values in imximage.cfg; specifically, the value in register 0x021B0000 (MMDC_MDCTL) which specifies the Row and Column size of the memory and which are used to then calculate the memory size.
See the DDR Register Programming Aid: https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-6-7-Series-DDR-Tool-Release/ta-p/12...
Hello gusarambula,
thank you for your help.
I followed your suggestion and I've downloaded the u-boot source code and compiled it in stand alone mode.
I changed the DCD table as written in the guide, I ran the DDR test and then replaced the register values in /board/freescale/mx6ullevk/imximage.cfg
What is the correct way to edit the device tree? I have only modified /include/configs/mx6ullevk.h , more speficifically the "PHYS_SDRAM_SIZE" define from "SZ_512M" to "SZ_256M".
Is there something else i'm supposed to do? It still doesn't work properly (the DRAM size in boot phase does not change).
Thank you
Regards.
Hello Andrea Compagni,
Are you still experiencing this issue with the DRAM size not being changed?
Regards,
Hello Andrea Compagni,
The closest thing to a guide on the documentation would be the i.MX BSP Porting Guide which is part of the BSP Releases documentation.
You would need to change the DCD table for the i.MX initialization, which depends on the timing and characteristics of the new RAM rather than just the size. You can see more details on this on the section “Changing the DCD table for i.MX DDR initialization”.
You would also need to edit the device tree with the new size information. In your case it could be that even tough you are changing the source code for uboot it is being overridden by the configuration data from the bootloader recipe. I would recommend extracting the toolchain and compiling the bootloader independently to test it. Once it’s working correctly you could then create a patch and append it to the Yocto bootloader recipe.
I hope this helps!
Regards,