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