Flashing u-boot to SPI seems to not work

Hi,

I’m trying to follow https://wiki.radxa.com/Rockpi4/dev/spi-install to flash u-boot into the SPI flash.

All the commands are successful, but when rebooting the device, it doesn’t go into u-boot and stays in maskrom mode.

I tried with u-boot from https://dl.radxa.com/rockpi/images/loader/spi/ and also building my own from the git, same result.

Did anyone succeed doing this? (the goal is then to boot Linux from a USB device)

I forgot to mention, my device is a rock pi 4 A and the u-boot images seem to exist only for B… not sure it makes any difference (in the git itself there’s no rockpi4a target anymore)

Also tried this https://wiki.radxa.com/Rockpi4/Linux_system_runs_on_M.2_NVME_SSD but can’t get the mtd0 device to appear (board revision 1.4 with SPI on board)

Additional info:
Michels-Retina:spi ml$ rkdeveloptool rid
Flash ID: 45 4D 4D 43 20
Michels-Retina:spi ml$ rkdeveloptool rfi
Flash Info:
Manufacturer: SAMSUNG, value=00
Flash Size: 0 MB
Block Size: 512 KB
Page Size: 2 KB
ECC Bits: 0
Access Time: 40
Flash CS:
Michels-Retina:spi ml$ rkdeveloptool rci
Chip Info: 43 30 33 33 47 28 44 0 87 40 A5 0 46 20 40 21
Michels-Retina:spi ml$ rkdeveloptool rcb
Capability:07 00 00 00 00 00 00 00
Direct LBA: enabled
Vendor Storage: enabled
First 4m Access: enabled

my device is a rock pi 4 A

Which version is your Pi 4A? V1.3 or V1.4?
Do you have spi flash on board?

See second post …

4A v1.4 with 4GB Ram

I’m having the same issue. Rock Pi4B 1.4 board. Flashed SPI, but is staying in Maskmode. Working on seeing if anything is displayed via UART serial.

# rkdeveloptool ld
DevNo=1	Vid=0x2207,Pid=0x330c,LocationID=1401	Maskrom
# rkdeveloptool rid
Flash ID: 0B 40 16 53 50
# rkdeveloptool rfi
Flash Info:
	Manufacturer: SAMSUNG, value=00
	Flash Size: 4096 MB
	Block Size: 256 KB
	Page Size: 2 KB
	ECC Bits: 0
	Access Time: 40
	Flash CS: Flash<0>
# rkdeveloptool rci
Chip Info:  43 30 33 33 0 40 0 0 0 0 0 0 0 20 4 0
rkdeveloptool rcb
Capability:07 00 00 00 00 00 00 00
Direct LBA:	enabled
Vendor Storage:	enabled
First 4m Access:	enabled

Make sure use the spi loader:

https://dl.radxa.com/rockpi4/images/loader/spi/rk3399_loader_spinor_v1.15.114.bin

and write the spi loader image:

https://dl.radxa.com/rockpi4/images/loader/spi/uboot-trust-spi.img

with

rkdevleoptool wl 0 uboot-trust-spi.img

Attach a serial console will help a lot.

The rkdeveloptool will not report error if there is no spi flash.

I followed this procedure about 10 times :slight_smile: the loader shows output on serial console, do you want me to copy the full output here?

OK… my board doesn’t have an SPI Flash… I thought all 1.4 have. How to be sure to get one with SPI Flash next time I order? We are building a commercial device around this board but we need to be sure to get the SPI Flash.

You can check the label on the plastic box. If the label is earlier than the summer update(19th, Jun), it should be the stage version(very few, actually should not be on the market). After the summer update, all v1.4 are pasted with spi flash.

Thank you Jack, that’s good to know. I will have to order 100-200 boards so I will ask the supplier to make sure they include the SPI Flash…

After soldering the flash it works much better :smiley:

Although I still can’t get it to boot on USB, it doesn’t even power the attached USB drive while in U-Boot

hi @jack, I’ve received a bunch of v1.4s with SPI Flash :slight_smile: Any chance to get a u-boot build that enables the USB ports and allows booting on a USB3 drive? It seems the current one doesn’t even power up the ports.

u-boot should already enabled the USB2, for USB3 it’s not supported yet.