Re: [yocto-patches] [rockchip][PATCH 2/2] rock-4d: add initial support

Quentin Schulz <[email protected]> Mon, 22 Jun 2026 19:18:50 +0200
Newsgroups org.yoctoproject.lists.yocto-patches
Message-ID <[email protected]>
Hi Martin,

On 6/21/26 11:19 PM, Martin Herren via lists.yoctoproject.org wrote:
> From: Martin Herren <[email protected]>
> 
> The Radxa ROCK 4D is a compact single-board computer (SBC) featuring
> numerous top-tier functions, features, and expansion options.
> 
> Equipped with the Rockchip RK3576 SoC, the ROCK 4D boasts an octa-core
> CPU (4x Cortex-A72 + 4x Cortex-A53), Mali-G52 MC3 GPU, and a 6 TOPS NPU,
> making it ideal for AI and multimedia tasks.
> 
> 	http://radxa.com/products/rock4/4d
> 
> tech specs:
> - Rockchip RK3576 (4x Arm Cortex-A72 + 4x Cortex-A53)
> - Arm Mali-G52 MC3 GPU
> - DDR5 RAM (2/4/8/16 GB)
> - uSD, eMMC/UFS module connector
> - GbE
> - 1x USB-C (power delivery only)
> - USB 3.0: 1x Type-A HOST, 1x Type-A OTG/HOST
> - USB 2.0: 2x Type-A HOST
> - 1x HDMI 2.1
> - 1x MIPI CSI camera port
> - 40-pin GPIO (uart, spi, i2c, pcm/i2s, pwm, gpio)
> 
> The ROCK 4D is the only board of the Rock 4 series using the new RK3576
> SoC instead of the RK3399 used in the rest of the Rock 4x serie.
> 
> NOTES:
> Due to the RK3576 boot ROM limitations, the bootloader cannot be
> loaded
> from the SD card; it must be extracted from the wic image and
> flashed to the SPI flash. The kernel and rootfs then boot from the SD
> card. See the "rk3576 booting" note in the README for details.
> 

I'm confused, if it doesn't work, what is the purpose of using Jonas's 
U-Boot fork?

> Ethernet is only partially working, mostly in degraded 100 or even 10
> Mbps mode or sometimes not at all. Investigations are still ongoing and
> if found a fix will be submitted in a future patch.
> 
> Wifi is not yet working, requires an out-of-tree kernel driver. Work on
> this will be done on a separate future patch.
> 
> Signed-off-by: Martin Herren <[email protected]>
> ---
>   README                                  | 17 +++++++++++++++++
>   conf/machine/rock-4d.conf               | 11 +++++++++++
>   recipes-kernel/linux/linux-rockchip.inc |  1 +
>   3 files changed, 29 insertions(+)
>   create mode 100644 conf/machine/rock-4d.conf
> 
> diff --git a/README b/README
> index c2697d1..8192284 100644
> --- a/README
> +++ b/README
> @@ -39,6 +39,7 @@ Status of supported boards:
>   			roc-rk3328-cc
>   			roc
> k-3a
>   			rock-4c-plus
> +			rock-4d
>   			rock-5a
>   			rock-5b
>   			rock-pi-4a
> @@ -122,6 +123,22 @@ Notes:
>   
>   	in the configuration (e.g. conf/local.conf).
>   
> +  rk3576 booting:
> +	The RK3576 boot ROM cannot load the bootloader from the SD card.

The datasheet claims otherwise.

It could simply be that the board doesn't allow you to select booting 
from SD card first. On RK35xx family, the SARADC channel 0 is used by 
the BootROM to select which devices to try loading the bootloader from. 
I'm thinking either you already have something valid on SPI and/or 
eMMC/UFS and the board starts from there, or the board is configured in 
such a way that the ADC selects a configuration for which the BootROM 
will not attempt to load from SD card. I don't have a reference design 
for the RK3576 and Radxa's schematics for the Rock4D don't provide this 
table so your guess is as good as mine as to which values select which 
devices. There's some weird circuitry on Rock4D schematics though on 
that channel, c.f. page 11.

> +	For rk3576-based boards (e.g. the rock-4d) the bootloader must be
> +	extracted from the wic image and flashed to the SPI flash; the
> +	kernel and rootfs then boot from the SD card.
> +
> +	To extract the SPI bootloader region (first 16 MiB) from a wic
> +	image:
> +
> +		dd if=<image>.wic of=spi.bin bs=1M count=16
> +

Please just make sure idbloader.img and u-boot.itb are in the deploy 
directory (or even better, u-boot-rockchip-spi.bin which contains both 
with u-boot.itb at the right offset already) and tell the user to flash 
those binaries on SPI at a specific offset. I believe you're also 
copying the partition table, which doesn't make sense on the SPI flash 
(at least not that partition table since there's for sure not enough 
room for the full system on it).

> +	Then flash spi.bin to the SPI flash, e.g. with rkdeveloptool
> +	from a host PC with the board in Maskrom mode; see the board
> +	vendor's documentation for details:

Missing newline.

> +		https://docs.radxa.com/en/rock4/rock4d/low-level-dev/spi_flash
> +

The "code" changes are fine.

Cheers,
Quentin