I have 2 boards that share the same PCB. The only difference is that one board is populated w/ DDR3L memory, and the other is populated w/ LPDDR4 memory. Both have 4G.
The DDR3L is based on the imx8mmddr3lval machine and it boots/runs as expected.
The LPDDR4 board is based on the imx8mmevk machine and it boots/runs as expected.
When I try to use a combined image, such that there is a single imx-boot/uboot bootloader, only the DDR4 machine will serial boot. I've modified the power_init_board function to set the pmic properly based on the memory type (there's a gpio that indicates memory type).
I've updated the ddr_init call to init the correct dram type.
I've updated the Makefile to include both the lpddr4_timing.c as well as the ddr3l_timing.c file.
DDR4 boot sequence works fine as shown below.
U-Boot SPL 2020.04-imx_v2020.04_5.4.24_2.1.0+gc260666f69 (Feb 23 2024 - 19:00:54 +0000)
DDR 4 Power init
Checking RAM type...
DDR4 detected
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
DDR init done
Normal Boot...
Tryuing boot: cTrying to boot from USB SDP
SDP: initialize...
SDP: handle requests...
Downloading file of size 1034864 to 0x40400000... done
DDR3 boot sequence, attemps, then resets.
U-Boot SPL 2020.04-imx_v2020.04_5.4.24_2.1.0+gc260666f69 (Feb 23 2024 - 19:00:54 +0000)
DDR 3 Power init
Checking RAM type...
DDR3 detected
DDRINFO: start DRAM init
DDRINFO: DRAM rate 1600MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
DDR init done
Normal Boot...
Tryuing boot: cTrying to boot from USB SDP
"Synchronous Abort" handler, esr 0x96000000
elr: 00000000007e5c4c lr : 00000000007e5ba4
x 0: 00000a01221b3fdc x 1: 0000000042200010
x 2: 00000a00dffb2fed x 3: 00000000007f80c0
x 4: 00000000009105a0 x 5: 0000000000000002
x 6: 0000000000000001 x 7: 0000000000000003
x 8: 0000000000000000 x 9: 0000000000000002
x10: 000000000a200023 x11: 0000000000000002
x12: 0000000000000002 x13: 0000000000000018
x14: 000000000090e558 x15: 0000000000013da4
x16: 00000000007ea5e8 x17: 0000000000000005
x18: 000000000091de80 x19: 0000000000000ff0
x20: 0000000042200ff0 x21: 0000000000000310
x22: 0000000000000300 x23: 0000000000001000
x24: 00000000007f0fbb x25: 00000000deadbeef
x26: 0000000000000005 x27: 0000000000000000
x28: 0000000000000000 x29: 000000000091dca0
Code: cb130000 b2400002 8b000280 f9000682 (f9400402)
Resetting CPU ...
I'm getting out of my comfort zone, but from ./u-boot-imx-2020.04/imx8mm_evk_defconfig/spl/u-boot-spl.map, 00000000007e5c4c maps to
.text.alloc_simple
0x00000000007e5cb4 0x58 common/built-in.o
.text.malloc_simple
0x00000000007e5d0c 0x8 common/built-in.o
0x00000000007e5d0c malloc_simple
I think I read that esr is pointing to a memory address -- of which 0x96000000 is out of bounds. I don't know where this value comes from.
I know I _could_ use 2 different bootloaders but that introduces some downstream logistical issues that I'd like to avoid.
I've attacked this 2 ways - starting w/ the imx8mmevk and trying to port in DDR3L functionality, and the inverse of starting w/ DDR3L and porting in LPDDR4. In both instances, I can only get the starting board type to work. Is there some other memory init function I'm missing? I can't seem to find where the SDP: initialize... is coming from.
If it matters, I'm using a mod'd version of Dunfell - using u-boot-imx 2020.04 and imx-boot 1.0/bl31 binary.
Thanks for making it this far.