Hi,
We are also facing similar issue with ls1021a custom board. We are trying to initialize DDR4 memory device. But u-boot hangs at following function
gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
Let me know if you were able to initialize ddr4 memory successfully.
We do not have LS1021A developement boards with DDR4, as a result we do not have initialization examples for such cases.
You can use initialization files for the LS1043A (e.g.LS1043ARDB board), these devices have the same DDR controller, so all parameters are the same.
The difference is in CSn_BNDS setting, for the LS1021A you need to use absolute addresses (like in DDR3L case). DDR address space starts at 0x80000000.
Values of DDR_WRLVL_CNTL_n and DDR_SDRAM_CLK_CNTL are board dependent, we typically recommend to use DDRv tool to define optimal values.
Another important point is settings of DQ_MAP registers in case of DDR4, these should reflect actual bit mapping between DDR controller and DDR4 SDRAMs. Otherwise the DDR controller can not start up.
Regards,
Bulat
hello
When I use DDR4 for ls1021atwr , should the DDR_SDRAM_CFG register(default vlues is 0x07000000h) value be set to 0x05000000h? and and if there are any other necessary Settings?
thanks!