Hi there,
I am triying to bringup a custom board based on the LS1028ARDB eval board.
In the custom board I own, we have replaced the DDR4 for a DDR3.
I already see that the DDR3 is working using a custom RCW + PBI. So now the next step I want to is to create a custom BL2 for booting up a yocto compilation based on kirkstone version.
For such purpose, I have patched the ddr_init.c file of the atf repo, this "ddr_cfg_regs " construct: https://github.com/nxp-qoriq/atf/blob/lf_v2.6/plat/nxp/soc-ls1028a/ls1028ardb/ddr_init.c#L15
Now I am trying to boot that BL2 and I see the next error
NOTICE: Fixed DDR on board
ERROR: Found training error(s): 0x2000
ERROR: Error: Waiting for D_INIT timeout.
ERROR: Writing DDR register(s) failed
ERROR: Programing DDRC error
ERROR: DDR init failed.
NOTICE: BL2: v2.6(release):custom
NOTICE: BL2: Built : 06:37:22, Jun 7 2022
ERROR: Asserting as the DDR is not initialized yet.ERROR: SD read error - DMA error = 10000000
ERROR: Read error = fffffffb
ERROR: BL2: Failed to load image id 3 (-5)
Error reading from serial device
I have added the option BUILD_STRING = "custom" to check that the BL2 I am running is mine.
In order to make the DDR work do I need to edit any other function/value in the ddr_init.c or any other file in the ATF source?
@yipingwangmay be you can provide some valuable info...
thanks,
imuguruza
#ls1028 #layerscape #yocto #atf #tf-a
Did you define CONFIG_STATIC_DDR in the configuration file?
Have you used CodeWarrior to verify your DDR configuration parameters?
You could create a bareboard project, then modify CW initialization file with your custom DDR configuration parameters, then check whether the bareboard can run successfully in DDR memory.
Hi @yipingwang ,
Yes, I have successfuly passed the DDR tests, and I am using the imported values to initialize the DDR using the CONFIG_STATIC_DDR parameter in atf compilation (added in plaform.mk file.)
imuguruza
Please download LSDK 21.08 pre-built image and run it on your custom board.
wget https://www.nxp.com/lgfiles/sdk/lsdk2108/lsdk2108_yocto_tiny_LS_arm64.itb
Under u-boot
=>tftp 0x82000000 lsdk2108_yocto_tiny_LS_arm64.itb
=>bootm 0x82000000#ls1028ardb
Hi @yipingwang
I have tried doing so, but as eth interface is not working properly, I have stored the file in the part 2 of the SD Card (ext4). Then, I have loaded using extload command but does not boot, the file is being read properly as the size of the binary is the same, comparing to the size printed after doing "wget & ls -la .itb":
Apart from that, I have been reviewing many things:
Now, I want to comment some things.
3. I have run my DT and Kernel in the eval board (even though kernel crashes at some point at init) using the evalboard bl2_sd and fip. So this means that in my custom board, at least, I should get the same result.
Also, I have tried to use:
After checking all this my conclusions are that some of this could be wrong:
Thanks,
imuguruza
Please execute the following command and let me know the result.
=>ext2load mmc 0:2 0xa0000000 lsdk2108_yocto_tiny_LS_arm64.itb
=>bootm 0x82000000#ls1028ardb
Hi,
After playing a bit with the config, I have achieved to boot Uboot.
Now I am facing a problem when I try to boot the Kernel. My card has 1GB of RAM so I have changed the addresses where the Kernel and the device tree are being loaded.
Checking the Reference Manual, the RAM address starts at 0x8000_0000, so it should end at 0xBFFF_FFFF.
Could be this the source of the error?
Thanks,
imuguruza
Hi again @yipingwang ,
I havre tried from address 0x8f000000 at the kernel does not boot... But at least now I don't get a crash... I Don't now if this helps at all....
imuguruza
Do you have LS1028ARDB demo board, if yes, please test whether Kernel and dtb images can run on LS1028ARDB.
If you don't have LS1028ARDB, please attach your Kernel and dtb images to me, I will do the verification.
Please download Kernel image to 0x82000000, then boot from 0x82000000.