1. First for new DDR bringing up on the a custom board, we suggest the customer use QCVS DDRv tool to do validation and optimization to get the optimized parameters to use them in atf source code.
For QCVS DDRv tool usage, you could refer to the following document.
https://www.nxp.com.cn/docs/en/user-guide/QCVS_DDR_User_Guide.pdf
https://community.nxp.com/t5/Qonverge-Knowledge-Base/DDR-Controller-Configuration-on-LS2085-LS2080-B...
You could use "read from SPD" method to create a QCVS DDR project, then connect to your custom board to do validation to get the optimized parameters and build to generate code ddr_init.c and use it in ATF source code.
2. Modify atf source code according to your custom board.
Go back to folder flexbuild_lsdk2108_github, and run the following command to get atf source code.
$ flex-builder -c atf -m ls1046ardb -b qspi
Go to atf source code folder components/firmware/atf/, please modify ddr controller initialization file plat/nxp/soc-ls1046a/ls1046ardb/ddr_init.c according to your custom board.
Rebuild atf with the following command.
$ flex-builder -c atf -m ls1046ardb -b qspi
You will get atf images bl2_qspi.pbl and fip_uboot.bin in folder flexbuild_lsdk2108_github/build/firmware/atf/ls1046ardb/.
Please deploy bl2_qspi.pbl at 0 and fip_uboot.bin at 0x100000 at QSPI flash.