Boot fails from SPI flash

Hi!
Last month I bought 3 pcs Rock Pi4A+ v1.73 with 4GB RAM/32GB eMMC. SPI is soldered as explained on https://forum.radxa.com/uploads/default/original/1X/5380bb1eb2b4e72fb1a11c2da6a0ebf955145212.jpeg (the 8-pin chip is there). I boot in maskrom mode, load Fedora 36 image rockpi-4b-fedora-minimal-36-1.5-aarch64-gpt.img (downloaded from the forum) to eMMC using rk3399_loader_v1.27.126.bin through USB from Windows PC using RKDevTool.exe - everything works fine.
/dev/mtd0 is not present.
NVMe disk is attached and mounted, data can be stored&read to it.
Now I try to boot from NVMe and follow the wiki instruction on https://wiki.radxa.com/Rockpi4/install/NVME (and https://wiki.radxa.com/Rockpi4/dev/spi-install) Checked the related topics in this forum including SPI + NVMe booting(beta)

I follow Step 1 – Method 1 using RKDevTool.exe from Windows PC, loader rk3399_loader_spinor_v1.15.114.bin (loader rk3399_loader_spinor_v1.20.126.bin gives errors) and image rockpi4a-uboot-trust-spi_2017.09-2697-ge41695afe3_20201219.img
On boot with pin 23-25 disconnected both green & blue LED shine, as expected nothing else happens as there is no image on NVMe.
I follow Step 3 - load the Fedora OS image in NVMe:
dd if=/root/Downloads/rockpi-4b-fedora-minimal-36-1.5-aarch64-gpt.img of=/dev/nvme0n1 bs=1M conv=sync status=progress
After dd completes nvme0n1p1~6 are created as expected.
Power down SBC, remove pin 23-25 bridge and power on: both green & blue LED shine, but nothing else happens as if there is no image on NVMe.

I repeated Step 3 by uploading to NVMe the recommended Debian image:
dd if=/root/Downloads/rockpi4-debian-stretch-desktop-arm64-20190730_2022-gpt.img of=/dev/nvme0n1 bs=1M conv=sync status=progress
After dd completes nvme0n1p1~5 are created.
Power down SBC, remove pin 23-25 bridge and power on: both green & blue LED shine, but nothing else happens as if there is no image on NVMe

NVMe model is LEXAR SSD NM620 512GB 2280 Gen3x4
No file /boot/hw_intfc.conf is present in my installation on eMMC.

My question is: can you guess what is reason for the setback and can you advice how to solve it?
My misgiving is that the choice of NVMe was not a lucky one, that Fedora36 image may need some extra tuning to boot from NVMe on Rock (but the recommended Debian image also fails).
Can you bring about some comfort?

Can you add a serial cable and post the boot loader log? That might help to find the reason.

I am not competent enough to do it. I am rather on the user side . . .|
Can you tip me how to do it? I find UART signals on pins 6-8-10:
6 GND
8 GPIO4_C4 UART2_TXD
10 GPIO4_C3 UART2_RXD
Is it OK to connect to serial port on CPU? Which signals should be bridged on CPU side?
What are the values of the parameters baud rate, parity control?
How to read the log in Rock?

A good description can be found here: https://wiki.radxa.com/Rockpi4/dev/serial-console

You can either buy the “original” Radxa cable (from Allnet.China for instance), or any from Amazon (search for “FTDI FT232RL USB cable”, you need 1500000 baud for Rockchips). Note that if you buy one from Amazon, you “typically” need to cross RX/TX, i.e. if you cable has a RX pin, connect it with the TX pin of the board and vice versa. Connect GND. No other pins!

If you do it right, you will see log messages from the boot loader, just print it here, that someone might be able to help.

Thanks for the quick reply.
Found the recommended cable in a local store with 2 options: 3.3V and 5V.
https://store.comet.bg/Catalogue/Product/48646/
The Raspberry version with 3 separate pin connectors with 3.3V is not available, guess I can take the 6-pin single connector and use just three of the signals and it should be 3.3V. Correct?

Doesn’t fit well. You need the 3.3V version, but the connector pinout doesn’t fit. Look if you can find a version were the pins are unconnected like that:

You must only connect

GND <=> PIN6  (GND)
RX  <=> PIN8  (GPIO4_C4 | UART2_TXD)
TX  <=> PIN10 (GPIO4_C3 | UART2_RXD)

Especially, do NOT connect VCC! The cable that you select has a non-matching layout here (see page 10 of the linked PDF), so you would need to solder something, i.e. the 0.1" pitch should be the right (if I’m not completely wrong), but you must reorder the wires …

Last but not least, it is expensive. The “original Radxa” cable should be ~5€, Amazon sells working for ~20€, this is 26?

Probably you should wait the 3-4 days delivery for this:

https://store.comet.bg/CatalogueFarnell/Product/1332466/

If if works with RPi, then it will work with with the Rock-4 too. (Well, except the price :frowning: )

I negotiate about the delivery of the Raspberry compatible cable, but no problem to solder 3 short wires with 3 single pin male/female connectors. To me 3.3V is the important thing.
The price, which you have noticed, has additional 20% VAT . . .
I should have bought such a cable-adaptor from TaoBao while in China, import formalities would match this unfriendly price.
I can afford it. I will write the result when I am ready, it will take a couple of days.

I finally checked the boot process via UART cable, attached are the records of 3 boot attempts:

  1. File eMMC is the report from the successful boot of Fedora from eMMC (pins 23 & 25 shortened), just for the record.
  2. File nonet_first is the report from a NVMe boot attempt (pins 23 & 25 not shortened) after dd of the image rockpi4-debian-stretch-desktop-arm64-20190730_2022-gpt.img to NVMe disk. No net cable attached. It looks 2 kernels 4.4.154-88 and 4.4.154-90 are detected, but vmlinuz file of both of them cannot be read. Net adapter cannot be configured as net cable is disconnected, attempts to retrieve /extlinux/pxelinux.cfg/… file fail in a loop.
  3. File net_nonet_next is the report from a NVMe boot attempt after step 2. with net cable attached. Boot process stalls with “Here trying to boot from nvme dcache off”
    Next boot with & without net cable attached gives the same result as if the dd image installation has been damaged.

I do not know what commands to issue and what else to check from this serial terminal in Putty (Windows). Any advice is welcome!

bootROCK_eMMC.zip (2.5 KB) bootROCK_SPI_net_nonet_next.zip (1.6 KB) bootROCK_SPI_nonet_first.zip (2.6 KB)