We have a custom LS1046 board with DDR4 (8GBytes). I have mapped DQ lines (as we have non-default) and got a successful CodeWarrior DDR validation and passed Operational DDR tests with ECC disabled, and speed 1300 MT/s.
I'm using LSDK 21.10 and I've put Code Warrior DDR parameters in my static ddr setup in ddr_init (based on LS1046AFRWY).
Operational DDR tests pass when booting from my sdcard image with no further changes required to DDR setup, so I think that DDR is ok.
When I attempt to boot from SD Card I see the following:
INFO: SoC workaround for Errata A008850 Early-Phase was applied
INFO: SoC workaround for Errata A010539 was applied
INFO: RCW BOOT SRC is SD/EMMC
INFO: SoC workaround for DDR Errata A008511 was applied
INFO: SoC workaround for DDR Errata A009803 was applied
INFO: SoC workaround for DDR Errata A009942 was applied
INFO: SoC workaround for DDR Errata A010165 was applied
INFO: Using dynamic DDR setup
INFO: platform clock 600000000
INFO: DDR PLL1 1300000000
INFO: DDR PLL2 300000000
INFO: Using static DDR setup
INFO: Time before programming controller 3 ms
INFO: Program controller registers
WARNING: Warning: Optimal CPO value not set.
INFO: total size 8 GB
INFO: Need to wait up to 3280 ms
INFO: Reading debug[9] as 0x18001700
INFO: Reading debug[10] as 0x18001800
INFO: Reading debug[11] as 0x1a001a00
INFO: Reading debug[12] as 0x1d001d00
INFO: cpo_min 0x17
INFO: cpo_max 0x1d
INFO: debug[28] 0x80006a
WARNING: Warning: A009942 requires setting cpo_sample to 0x41
INFO: *0x1080000 = 0x1ff
INFO: *0x1080080 = 0x80010512
INFO: *0x1080100 = 0x1111000
INFO: *0x1080104 = 0xff440018
INFO: *0x1080108 = 0xa5a2df44
INFO: *0x108010c = 0x48f11c
INFO: *0x1080110 = 0xc5200000
INFO: *0x1080114 = 0x401060
INFO: *0x1080118 = 0x1010405
INFO: *0x1080120 = 0x600001f
INFO: *0x1080124 = 0x13ce04f3
INFO: *0x1080128 = 0xdeadbeef
INFO: *0x1080130 = 0x2400000
INFO: *0x1080160 = 0x22d501
INFO: *0x1080164 = 0x2401400
INFO: *0x108016c = 0x22200000
INFO: *0x1080170 = 0x8a090705
INFO: *0x1080174 = 0xc6750605
INFO: *0x1080190 = 0x5060607
INFO: *0x1080194 = 0x7070704
INFO: *0x1080220 = 0x700
INFO: *0x1080224 = 0xa40000
INFO: *0x1080250 = 0x1335700
INFO: *0x1080270 = 0xffff
INFO: *0x1080280 = 0xedd7eedd
INFO: *0x1080284 = 0xddddd711
INFO: *0x1080288 = 0x12281122
INFO: *0x108028c = 0x222228ee
INFO: *0x1080290 = 0x1
INFO: *0x1080400 = 0x5b556358
INFO: *0x1080404 = 0xb15d55d4
INFO: *0x1080408 = 0x5752e258
INFO: *0x108040c = 0xd95d8000
INFO: *0x1080b20 = 0x8080
INFO: *0x1080b24 = 0x80000000
INFO: *0x1080b28 = 0x80080000
INFO: *0x1080b2c = 0x80
INFO: *0x1080bf8 = 0x20502
INFO: *0x1080bfc = 0x100
INFO: *0x1080f04 = 0x2
INFO: *0x1080f08 = 0x10
INFO: *0x1080f0c = 0x14000c20
INFO: *0x1080f24 = 0x18001700
INFO: *0x1080f28 = 0x18001800
INFO: *0x1080f2c = 0x1a001a00
INFO: *0x1080f30 = 0x1d001d00
INFO: *0x1080f34 = 0x4000
INFO: *0x1080f48 = 0x1
INFO: *0x1080f4c = 0x94000000
INFO: *0x1080f50 = 0xb000b00
INFO: *0x1080f54 = 0xc000d00
INFO: *0x1080f58 = 0x10000f00
INFO: *0x1080f5c = 0x10001000
INFO: *0x1080f60 = 0x8000000
INFO: *0x1080f64 = 0x9000
INFO: *0x1080f68 = 0x20
INFO: *0x1080f70 = 0x80006a
INFO: *0x1080f94 = 0x80000000
INFO: *0x1080f9c = 0x38003800
INFO: *0x1080fa0 = 0x36003700
INFO: *0x1080fa4 = 0x37003700
INFO: *0x1080fa8 = 0x38003800
INFO: *0x1080fb0 = 0x3
INFO: *0x1080fb4 = 0x1f1e1b1f
INFO: *0x1080fb8 = 0x1d1e1e1b
INFO: *0x1080fbc = 0x1f1d1e20
INFO: *0x1080fc0 = 0x1e1e1e1d
INFO: *0x1080fc4 = 0x1f1d1b20
INFO: *0x1080fc8 = 0x1c1c1d1e
INFO: *0x1080fcc = 0x1f1e1d20
INFO: *0x1080fd0 = 0x1d1d1f1c
INFO: *0x1080fd4 = 0x1f1e1b1e
INFO: *0x1080fd8 = 0x1d1f1e1c
INFO: *0x1080fdc = 0x1f1e1b1d
INFO: *0x1080fe0 = 0x1d1f1c1a
INFO: *0x1080fe4 = 0x1f1e1c1e
INFO: *0x1080fe8 = 0x1d1f1d1a
INFO: *0x1080fec = 0x1f1f1b1e
INFO: *0x1080ff0 = 0x1c1f1e1c
INFO: *0x1080ff4 = 0x1f1f1f1f
INFO: *0x1080ff8 = 0x1f1f1f1f
INFO: *0x1080ffc = 0x1f000000
NOTICE: 8 GB DDR4, 64-bit, CL=10, ECC off
INFO: Time used by DDR driver 1394 ms
INFO: SoC workaround for Errata A008850 Post-Phase was applied
INFO: RCW BOOT SRC is SD/EMMC
INFO: esdhc_emmc_init
INFO: Card detected successfully
INFO: init done:
NOTICE: BL2: v2.4(release):lf-5.10.52-2.1.0-rc2-0-gbb4957067-dirty
NOTICE: BL2: Built : 14:20:36, Jan 20 2025
INFO: Configuring TrustZone Controller
INFO: BL2: Doing platform setup
INFO: BL2: Loading image id 3
INFO: sd-mmc read done.
INFO: sd-mmc read done.
INFO: sd-mmc read done.
INFO: Loading image id=3 at address 0xfbe00000
INFO: sd-mmc read done.
INFO: sd-mmc read done.
INFO: Image id=3 loaded: 0xfbe00000 - 0xfbe0c62d
INFO: BL2: Loading image id 4
INFO: sd-mmc read done.
INFO: sd-mmc read done.
INFO: Loading image id=4 at address 0xfc000000
INFO: sd-mmc read done.
INFO: sd-mmc read done.
INFO: Image id=4 loaded: 0xfc000000 - 0xfc07bdc0
INFO: BL2: Loading image id 5
INFO: sd-mmc read done.
INFO: sd-mmc read done.
INFO: Loading image id=5 at address 0x82000000
INFO: sd-mmc read done.
INFO: sd-mmc read done.
INFO: sd-mmc read done.
INFO: Image id=5 loaded: 0x82000000 - 0x820c6bea
NOTICE: BL2: Booting BL31
INFO: Entry point address = 0xfbe00000
INFO: SPSR = 0x3cd
INFO: SEC is disabled.
NOTICE: BL31: v2.4(release):lf-5.10.52-2.1.0-rc2-0-gbb4957067-dirty
NOTICE: BL31: Built : 14:20:36, Jan 20 2025
NOTICE: Welcome to ls1046afrwy BL31 Phase
INFO: ARM GICv2 driver initialized
INFO: BL31: Initializing runtime services
INFO: opteed_setup called
INFO: BL31: bl31_register_bl32_init called
INFO: opteed_setup 6
INFO: BL31: Initializing BL32
INFO: Calling opteed_enter_sp 4
INFO: optee_context state 0
INFO: mpidr is 80000000
INFO: stack address for c is 0
The system gets stuck at the call to opteed_enter_sp when invoking bl32_init. Does this still suggest a memory problem? Or maybe memory mapping/size config. Thanks.