SPI Loader for Rock 5C (Lite)

Silly question maybe? Does the CM5 has SPi?

Hi,
CM5 does not have SPI.

2 Likes

As I tought. Thanks.

The boot image you provided does not seem to load properly on the 5c lite, or does the 5c lite not have SPI either? Output from the RKDevTool_v2.96 log file below:

11:27:54 167	Layer<1-6>:下载Boot开始
11:27:57 910	Layer<1-6>:下载Boot成功
11:27:57 910	Layer<1-6>:等待Maskrom开始
11:27:58 509	Layer<1-6>:等待Maskrom成功
11:27:58 509	Layer<1-6>:测试设备开始
11:27:58 530	Layer<1-6>:测试设备成功
11:27:58 549	Layer<1-6>:校验芯片开始
11:27:58 564	Layer<1-6>:校验芯片成功
11:27:58 579	Layer<1-6>:获取FlashInfo开始
11:27:58 579	<LAYER 1-6> INFO:FlashInfo: 00 00 00 00 00 04 04 00 28 00 00
11:27:58 594	<LAYER 1-6> INFO:GetFlashInfo-->Emmc storage.
11:27:58 604	Layer<1-6>:获取FlashInfo成功
11:27:58 614	Layer<1-6>:准备IDB开始
11:27:58 624	<LAYER 1-6> ERROR:PrepareIDB-->No Found 1st Flash CS
11:27:58 639	Error:Layer<1-6>:准备IDB失败
11:27:58 663	Layer<1-6>: RunProc is ending, ret=0

It was all actively discussed in the days of 5A, but there was a little less confusion back in the day, because 5A was shipped with a Radxa SPI Flash Module.
RK3588S (unlike RK3588) doesn’t have enough I/O, so it can’t have both eMMC and SPI at the same time. So, if you don’t need eMMC, and want to boot from NVMe, you’ll need the above module. Similarly, the question about CM5 is kinda trivial: CM5 comes with eMMC soldered on, so no SPI.

1 Like

It has no onboard SPI NOR flash so all you could do is to ‘waste’ the eMMC socket with an adapter for SPI NOR flash or figure out a way to use a small spare SD card to put the bootloader there that allows to boot from NVMe.

If you check sheet 22 of 5C schematics then how did Radxa manage to put SPI twice on the 40-pin header?

I’m talking about SPI flash, not SPI bus.

Huh?

SPI and SPL are two entirely different things: Serial Peripheral Interface (SPI) (somewhat irrelevant here since zero amount of SPI NOR flash is soldered by default on Rock 5C) and secondary program loader (SPL).

On some devices the latter can be accessed via the former (protocol).

Thats what I meant to say =/= (maybe this doesnt means different) Cant remember the right =/= code to different anyways yes spi/spl are different things.

Well, my naive thought was “SPI flash” is flash attached via an SPI bus, isn’t it?

Anyway, I think by checking schematics and RK3588S datasheet I got it now and the limitation is the following:

RK3588S while containing plenty of SPI controllers can only boot from:

  • SD/MMC Interface
  • eMMC Interface
  • Flexible Serial Flash Interface (FSPI)

And on RK3588S (and castrated variants like RK3582/RK3583) the eMMC and FSPI data lines are pinmuxed (EMMC_D0 and FSPI_D0 share the pins, EMMC_D1 and FSPI_D1 as well and so on) as such it’s as you said and you either get eMMC or (bootable) SPI flash. And what I called an eMMC to SPI adapter isn’t one but it’s a simple module that works since internal RK3588S 1st stage bootloader is capable to probe the data lines and can work directly with SPI flash inside the eMMC socket.

As for the questions why Radxa guys recommend to flash something to something non-existent or why they want to annoy their 5C customers by not bundling these boards with the SPI module too… ah, nevermind…

Radxa team - would you be able to share a u-boot image that can be put on a small SD card to facilitate boot from nvme?

And I guess members of this team (who don’t answer these questions but post questionable instructions) are the same who sometimes wonder why the Raspberry Pi is such a success…

You can just flash our system image to the microSD card. If the image is too big and write fails, it is OK since the bootloader is on on the first 16 MB. Afterwards you can recreate the partition table on your microSD card, so the bootloader won’t find anything to boot on the microSD card, and will try NVMe instead.

yes, there are still many things to do to improve the use experience for radxa, we are just doing this. thanks for your feedback.

I’ve managed to boot a 1Tb SSD on my ROCK-5c using SPI. It’s an Armbian build which I built myself. I’m using Linux 6.10 and the kernel is built using LLVM Clang 18.1.8 not GCC.

1 Like

Is it such a success? Last I checked it couldnt beat the rk3588… But then again… I guess sucess has different meanings.

RPi Ltd. manages to sell inferior hardware in the millions because they do other things right (this software and support thing). Maybe it helps to reflect on this fact to get what Radxa is doing wrong?

1 Like

Ah right… lets sing prayers to already mainline hardware and then criticize radxa who goes an extra mile to give us an more risky hardware.

Thomas Gi… I still like you… but… Saying those things hurt and yes theres def some corners where radxa has to improve. But vouching for rpi is cheap… or do u work for them?

That raspberry pi is a successful company is not ‘vouching’ for them, it’s just stating a fact. You don’t need to work for them to know facts about them.

1 Like