Regardless of u-boot (tired release, debug and build a fresh one), Rock5b fails to boot from SPI+NVMe SSD most of the time. The problem is with a power circuit.
DDR Version V1.08 20220617
LPDDR4X, 2112MHz
...
INFO: BL31: Initialising Exception Handling Framework
INFO: BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR: Error initializing runtime service opteed_fast
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9
DDR Version V1.08 20220617
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
channel[1] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
channel[2] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
channel[3] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
Manufacturer ID:0x6
SSD works if:
If I power it directly to GPIO 2 and 4, with voltage boosted to 5.2V. (anything less wasn’t working)
If kernel boots from SDCard, (probably due to some delayed initialization)
… and occasionally boots as expected.
After boot using USB power, sensors shows 20V input. After boot the kernel can handle PD chargers properly.
My assumption is: u-boot tries to initialize pcie and power on SSD, before configuring PD voltage.
Something happens when Kernel changes voltage level. It looses power.
I have observed a similar thing, booting from an intel optane. u-boot loads the kernel from NVMe, but during linux kernel init the board reboots. had the situation were this was going on for quite some time, but after a few power down and power up cycles, i usually only get one reboot and then the kernel loads fine. Looks almost like some consumption peeks during the initial boot which are not there / not so bad during the second boot attempt ¯\_(ツ)_/¯. Haven’t found a specific point in the kernel boot logs were the system resets. By now it ‘kinda works’ as in: i’m powering the board on and its boots quite consistent, with maybe one quick reboot on the way.
Using a patched u-boot (for 2x2 pcie3) from here How to build u-boot spi images
If you want to enable pd negotiation, you have to also add command charge_pd to u-boot script. If pd negotiation starts more than 5 seconds after the power plugged in, there will be a hard reset at the pd power, which will cause boot loop.
It seems like work regarding Power Delivery wasn’t finished for u-boot. Even if uclass_get_device would return device handle, there is no code, just printf