diff mbox series

[rockchip,2/2] rock-4d: add initial support

Message ID 20260621211915.72650-3-sputnik@on-the-web.ch
State New
Headers show
Series rk3576: rock-4d: initial support | expand

Commit Message

sputnik@on-the-web.ch June 21, 2026, 9:19 p.m. UTC
From: Martin Herren <sputnik@on-the-web.ch>

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.

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 <sputnik@on-the-web.ch>
---
 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

 COMPATIBLE_MACHINE:rock-pi-4 = "rock-pi-4"
diff mbox series

Patch

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.
+	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
+
+	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:
+		https://docs.radxa.com/en/rock4/rock4d/low-level-dev/spi_flash
+
   A/B updates with RAUC
 	This layer now contains one example of building an A/B update using RAUC.
 	Users are free to use/test this example, to optionally enable it, to build
diff --git a/co
nf/machine/rock-4d.conf b/conf/machine/rock-4d.conf
new file mode 100644
index 0000000..c32e4f9
--- /dev/null
+++ b/conf/machine/rock-4d.conf
@@ -0,0 +1,11 @@ 
+#@TYPE: Machine
+#@NAME: Radxa Rock 4D
+#@DESCRIPTION: ROCK4D is the latest SBC of serie 4 based on the RK3576 SoC
+#https://radxa.com/products/rock4/4d
+
+require conf/machine/include/rk3576.inc
+
+KERNEL_DEVICETREE = "rockchip/rk3576-rock-4d.dtb"
+MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
+
+UBOOT_MACHINE = "rock-4d-rk3576_defconfig"
diff --git a/recipes-kernel/linux/linux-rockchip.inc b/recipes-kernel/linux/linux-rockchip.inc
index 6c62e84..f666283 100644
--- a/recipes-kernel/linux/linux-rockchip.inc
+++ b/recipes-kernel/linux/linux-rockchip.inc
@@ -23,6 +23,7 @@  COMPATIBLE_MACHINE:roc-rk3308-cc = "roc-rk3308-cc"
 COMPATIBLE_MACHINE:roc-rk3328-cc = "roc-rk3328-cc"
 COMPATIBLE_MACHINE:rock-3a = "rock-3a"
 COMPATIBLE_MACHINE:rock-4c-plus = "rock-4c-plus"
+COMPATIBLE_MACHINE:rock-4d = "rock-4d"
 COM
PATIBLE_MACHINE:rock-5a = "rock-5a"
 COMPATIBLE_MACHINE:rock-5b = "rock-5b"