2416597_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2416597_en-US

2416597_en-US

LX2160ARDB: SD Card Booting

Hi,


"For the standard LX2160ARDB with DIMM slots, DDR registers are configured automatically by reading SPD from the installed DIMMs — handled by the TF-A BL2 stage (ddr_init.c), not U-Boot. You only need to modify the ATF source if using custom DIMMs on the LX2160ARDB."


We are using the DIMMs provided with the RDB.


And for SD card booting, I have generated the files - bl2_sd.pbl and fip.bin using the following commands

bl2_sd.pbl

$ export ARCH=arm64
$ export CROSS_COMPILE=aarch64-linux-gnu-

$ make PLAT=lx2160ardb bl2 BOOT_MODE=sd pbl RCW=../rcw/lx2160ardb_rev2/XGGFF_PP_HHHH_RR_19_5_2/rcw_2200_750_3200_19_5_2.bin



fip.bin

$ export ARCH=arm64
$ export CROSS_COMPILE=aarch64-linux-gnu-

$ make PLAT=lx2160ardb fip BOOT_MODE=sd BL33=u-boot/u-boot.bin


Generated the above images with default ddr_init.c in atf folder and loaded bl2_sd.pbl file at blk 8 and fip.bin at blk 800 of SD card for booting..


The log is as follows

=> qixis_reset sd
=> NOTICE: BL2: v2.4(release):LSDK-21.08-0-g340b20bcb
NOTICE: BL2: Built : 11:29:23, Aug 5 2026
NOTICE: UDIMM 18ADF2G72AZ-3G2E1
NOTICE: DDR PMU Hardware version-0x1210
ERROR: Failed to load 33 firmware.
ERROR: Loading firmware failed (error code -2)
ERROR: Calculating DDR PHY registers failed.
PHY handshake timeout, ddr_dsr2 = 0
ERROR: Found training error(s): 0x100
ERROR: Error: Waiting for D_INIT timeout.
ERROR: Writing DDR register(s) failed
ERROR: Programing DDRC error
ERROR: DDR init failed.
NOTICE: Incorrect DRAM0 size is defined in platform_def.h
ERROR: BL2: Failed to load image id 3 (-2)
Authentication failure

should we load any ddr related firmware files for DDR initialization or any modifications to be done in bl2 source??


Kindly guide through this.

Thank you


Evaluation BoardRe: LX2160ARDB: SD Card Booting

fip_ddr_all.bin: Contains all 8 DDR4 PHY training binaries: UDIMM 1D/2D IMEM+DMEM and RDIMM 1D/2D IMEM+DMEM

fip_ddr.bin: A DDR FIP with a more limited/selected set of DDR PHY firmware rather than the full UDIMM+RDIMM collection. The exact selection depends on the LSDK/TF-A build configuration.
 
For a custom board, you may reuse the DDR PHY firmware,  but you must configure DDR for that board’s memory and layout.
Re: LX2160ARDB: SD Card Booting

Hi Yiping,

Thanks for guiding...I have deployed the DDR fip image into SD card at 0x4000 and DDR initialization done successfully

In LSDK, there are default images fip_ddr.bin and fip_ddr_all.bin under distro/build_lx2160ardb-rev2/tmp/deploy/images/ lx2160ardb-rev2/ddr-phy/, i have loaded these and verified that DDR initialization happens

Could you please explain the difference between both the images and why it is needed?

If a custom board is used can we use the same image for DDR initialization or not?

Re: LX2160ARDB: SD Card Booting

Please deploy DDR PHY firmware image on SD card.

First please refer to the following procedure to generate PHY firmware image.

$ cd atf/tools/fiptool

$ git clone https://github.com/NXP/ddr-phy-binary.git

$ cd ddr-phy-binary/
$ git checkout LSDK-21.08 -b LSDK-21.08
$ cd ..

$ ./fiptool create --ddr-immem-udimm-1d ddr-phy-binary/lx2160a/ddr4_pmu_train_imem.bin --ddr-immem-udimm-2d ddr-phy-binary/lx2160a/ddr4_2d_pmu_train_imem.bin --ddr-dmmem-udimm-1d ddr-phy-binary/lx2160a/ddr4_pmu_train_dmem.bin --ddr-dmmem-udimm-2d ddr-phy-binary/lx2160a/ddr4_2d_pmu_train_dmem.bin --ddr-immem-rdimm-1d ddr-phy-binary/lx2160a/ddr4_rdimm_pmu_train_imem.bin --ddr-immem-rdimm-2d ddr-phy-binary/lx2160a/ddr4_rdimm2d_pmu_train_imem.bin --ddr-dmmem-rdimm-1d ddr-phy-binary/lx2160a/ddr4_rdimm_pmu_train_dmem.bin --ddr-dmmem-rdimm-2d ddr-phy-binary/lx2160a/ddr4_rdimm2d_pmu_train_dmem.bin fip_ddr_all.bin

The DDR fip image, fip_ddr_all.bin is generated at atf/tools/fiptool

Please deploy fip_ddr_all.bin in SD card under u-boot.

=> tftp 82000000 fip_ddr_all.bin
=> mmc write 82000000 0x04000

Here, blk_cnt refers to number of blocks in SD card that need to be written as per the file size. For example, when
you load file from the TFTP server, if the bytes transferred is 1077157 (106fa5 hex) , then blk_cnt is calculated
as 1077157/512 = 2103 (837 hex)

For this example, mmc write command will be: => mmc write 82000000 0x04000 837

Re: LX2160ARDB: SD Card Booting

Would you please address your new questions in a new thread?

My colleague will continue to support you because of my holiday.

Re: LX2160ARDB: SD Card Booting

Hi Yiping,


Thanks for the explanation..

I have installed the LSDK 21.08 and the atf, rcw, u-boot, ddr-phy folders are already available but the source is not available. So cloned all the sources through git.

For complete SD card booting, i have deployed the files as below

1. bl2_sd.pbl                               - 0x8

2. fip.bin                                      - 0x800

3. fip_ddr_all.bin                       - 0x4000

4. mc_lx2160a_10.40.0.itb         - 0x5000

5. dpc-usxgmii.dtb                    - 0x7000

6. fitImage--5.15.71+git0+95448dd0dc-r0-lx2160ardb-rev2-20260310070404.bin    -  0x8000

And I have made partitions in SD card(64GB) as below

1. /dev/mmcblk0p1                    - sector 409600 to sector 42352640

2. /dev/mmcblk0p2                  - sector 42352640 to sector 121534463

and mounting the rootfs "fsl-image-networking-full-lx2160ardb-rev2-20260310091147.rootfs.tar.gz" on /dev/mmcblk0p1 partition using the bootargs command at u-boot as 

=> setenv bootcmd 'setenv bootargs root=/dev/mmcblk0p1 rw rootwait console=ttyAMA0,115200; mmc dev 0; mmc read 0x90000000 0x8000 0x14000; bootm 0x90000000'

is this the right approach do it?? Please suggest any better approach that can be done.


And in LSDK how to generate the fitImage binary file for kernel and dtb, like the fitImages present in the LSDK under distro/build_lx2160ardb-rev2/tmp/deploy/images/lx2160ardb-rev2/ directory like fitImage--5.15.71+git0+95448dd0dc-r0-lx2160ardb-rev2-20260310070404.bin.



Re: LX2160ARDB: SD Card Booting

Ok Yiping

Thanks for the support

タグ(1)
評価なし
バージョン履歴
最終更新日:
昨日
更新者: