From patchwork Sun Jun 21 21:19:34 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sputnik@on-the-web.ch X-Patchwork-Id: 90605 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 694F9CD98F2 for ; Sun, 21 Jun 2026 21:19:42 +0000 (UTC) Received: from mail-4317.protonmail.ch (mail-4317.protonmail.ch [185.70.43.17]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.30866.1782076781377605554 for ; Sun, 21 Jun 2026 14:19:41 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@on-the-web.ch header.s=protonmail2 header.b=uJjmXsNy; spf=pass (domain: on-the-web.ch, ip: 185.70.43.17, mailfrom: sputnik@on-the-web.ch) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=on-the-web.ch; s=protonmail2; t=1782076779; x=1782335979; bh=4oYA6ES1MmgyBHN8d/1ethR+6QIc1f6db82ct+B4Wkk=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=uJjmXsNyhK10+B4ZvZAw4VS0CMr3QoYwd0Vq1lL6Ng9D49l2bD1Dr04DK1Efk35Ki 5R6AYdH/GzXM5PtkZpwyuR1a4pqrF388GTuM06/gic2WPEfNnubD1hlwLgOBxqmUoP GjZiukiAaf67LCzbeNTd92lhI4F+bem0uW3Xml/JMrBltCaZi6Ao0B3n7xTXN/nohY YKWBXJbl8uUUP2A3/nr6h08TT5V7R5RQLCnceLaw5zMMIbf++H1oz3ug8g3ePYQ/Xn DlVYA7ZVdTyypR71eWK2mLdr0zpNNG36luBm9OwapmhYfxO6eoQOma3keQi9ZWM5ic yR5ql/zJZ8gig== Date: Sun, 21 Jun 2026 21:19:34 +0000 To: yocto-patches@lists.yoctoproject.org From: sputnik@on-the-web.ch Cc: Trevor Woerner , Martin Herren Subject: [rockchip][PATCH 1/2] rk3576: add initial support Message-ID: <20260621211915.72650-2-sputnik@on-the-web.ch> In-Reply-To: <20260621211915.72650-1-sputnik@on-the-web.ch> References: <20260621211915.72650-1-sputnik@on-the-web.ch> Feedback-ID: 61562450:user:proton X-Pm-Message-ID: bd52c4372afcb7aa1d6c69af89a51834ecd43e9f MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 21 Jun 2026 21:19:42 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/4253 From: Martin Herren Add basic SoC support for the Rockchip RK3576 using the mainline Linux kernel and Rockchip's binary TPL (DDR init), BL31 (TF-A) and BL32 (OP-TEE) blobs from rkbin. The RK3576 is an octa-core SoC (4x Cortex-A72 + 4x Cortex-A53) with a Mali-G52 MC3 GPU and a 6 TOPS NPU. It is the only currently supported rk3xxx SoC with a different RAM base address, and therefore uses a different UBOOT_ENTRYPOINT of 0x4a000000. NOTE: a bootable rk3576 currently requires a U-Boot fork. Upstream U-Boot has the rk3576 SoC support and board defconfigs, but is missing a critical fix for a BootROM issue that prevents loading boot images from SD card; see the WIP commit "rockchip: mkimage: Add rk3576 align and sd-card workaround" on Kwiboo's rk3576 branch. Signed-off-by: Martin Herren --- conf/machine/include/rk3576.inc | 24 +++++++++++++++++++ recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb | 4 ++++ ... /rkbin/rockchip-rkbin-optee-os_git.bb | 4 ++++ recipes-bsp/rkbin/rockchip-rkbin-tf-a_git.bb | 3 +++ recipes-bsp/rkbin/rockchip-rkbin.inc | 2 ++ .../trusted-firmware-a_%.bbappend | 5 ++++ recipes-bsp/u-boot/u-boot_%.bbappend | 5 ++++ 7 files changed, 47 insertions(+) create mode 100644 conf/machine/include/rk3576.inc diff --git a/conf/machine/include/rk3576.inc b/conf/machine/include/rk3576.inc new file mode 100644 index 0000000..acb4249 --- /dev/null +++ b/conf/machine/include/rk3576.inc @@ -0,0 +1,24 @@ +SOC_FAMILY ?= "rk3576" +MACHINEOVERRIDES =. "rk3576:" +DEFAULTTUNE ?= "cortexa72-cortexa53-crypto" + +ROCKCHIP_CLOSED_TPL ?= "1" + +require conf/machine/include/rockchip-defaults.inc +require conf/machine/include/arm/armv8a/tune-cortexa72-cortexa53.inc +require conf/machine/include/rockchip-wic.inc + +SERIAL_CONSOLES = "1500000;ttyS0" + +KBUILD_DEFCONFIG ?= "defconfig" + +PREFERRED_PROVIDER_trusted-firmware-a = "rockchip-rkbin-tf-a" +PREFERRED_PROVIDER_optee-os = "rockchip-rkbin-optee-os" + +UBOOT_SUFFIX ?= "itb" +UBOOT_ENTRYPOINT ?= "0x4a000000" + +TFA_PLATFORM = "rk3576" +TFA_BUILD_TARGET = "bl31" + +ENABLE_STATELESS_VPU_GST ?= "1" diff --git a/recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb b/recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb index 7f1e820..7427f57 100644 --- a/recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb +++ b/recipes-bsp/rkbin/rockchip-rkbin-ddr_git.bb @@ -14,6 +14,10 @@ RKBIN_BINVERS:rk3568 ?= "v1.23" RKBIN_BINFILE:rk3568 ?= "rk3568_ddr_1560MHz_${RKBIN_BINVERS}.bin" RKBIN_DEPLOY_FILENAME:rk3568 ?= "ddr-rk3568.bin" +RKBIN_BINVERS:rk3576 ?= "v1.09" +RKBIN_BINFILE:rk3576 ?= "rk3576_ddr_lp4_2112MHz_lp5_2736MHz_${RKBIN_BINVERS}.bin" +RKBIN_DEPLOY_FILENAME:rk3576 ?= "ddr-rk3576.bin" + RKBIN_BINVERS:rk3588s ?= "v1.18" RKBIN_BINFILE:rk3588s ?= "rk3588_ddr_lp4_2112MHz_lp5_2400MHz_${RKBIN_BINVERS}.bin" RKBIN_DEPLOY_FILENAME:rk3588s ?= "ddr-rk3588.bin" diff - -git a/recipes-bsp/rkbin/rockchip-rkbin-optee-os_git.bb b/recipes-bsp/rkbin/rockchip-rkbin-optee-os_git.bb index 0f3c927..35a102e 100644 --- a/recipes-bsp/rkbin/rockchip-rkbin-optee-os_git.bb +++ b/recipes-bsp/rkbin/rockchip-rkbin-optee-os_git.bb @@ -19,6 +19,10 @@ RKBIN_BINVERS:rk3568 ?= "${RKBIN_BINVERS_RK356x}" RKBIN_BINFILE:rk3568 ?= "rk3568_bl32_${RKBIN_BINVERS}.bin" RKBIN_DEPLOY_FILENAME:rk3568 ?= "tee-rk3568.bin" +RKBIN_BINVERS:rk3576 ?= "v1.05" +RKBIN_BINFILE:rk3576 ?= "rk3576_bl32_${RKBIN_BINVERS}.bin" +RKBIN_DEPLOY_FILENAME:rk3576 ?= "tee-rk3576.bin" + RKBIN_BINVERS:rk3588s ?= "v1.19" RKBIN_BINFILE:rk3588s ?= "rk3588_bl32_${RKBIN_BINVERS}.bin" RKBIN_DEPLOY_FILENAME:rk3588s ?= "tee-rk3588.bin" diff --git a/recipes-bsp/rkbin/rockchip-rkbin-tf-a_git.bb b/recipes-bsp/rkbin/rockchip-rkbin-tf-a_git.bb index ece5faa..39cc7ee 100644 --- a/recipes-bsp/rkbin/rockchip-rkbin-tf-a_git.bb +++ b/recipes-bsp/rkbin/rockchip-rkbin-tf-a_git.bb @@ -21,5 +21,8 @@ RKBIN_B INFILE:rk3566 ?= "rk3568_bl31_${RKBIN_BINVERS}.elf" RKBIN_BINVERS:rk3568 ?= "${RKBIN_BINVERS_RK356x}" RKBIN_BINFILE:rk3568 ?= "rk3568_bl31_${RKBIN_BINVERS}.elf" +RKBIN_BINVERS:rk3576 ?= "v1.15" +RKBIN_BINFILE:rk3576 ?= "rk3576_bl31_${RKBIN_BINVERS}.elf" + RKBIN_BINVERS:rk3588s ?= "v1.48" RKBIN_BINFILE:rk3588s ?= "rk3588_bl31_${RKBIN_BINVERS}.elf" diff --git a/recipes-bsp/rkbin/rockchip-rkbin.inc b/recipes-bsp/rkbin/rockchip-rkbin.inc index 9ddd54f..a276aa6 100644 --- a/recipes-bsp/rkbin/rockchip-rkbin.inc +++ b/recipes-bsp/rkbin/rockchip-rkbin.inc @@ -11,6 +11,7 @@ COMPATIBLE_MACHINE = "^$" COMPATIBLE_MACHINE:rk3308 = "rk3308" COMPATIBLE_MACHINE:rk3566 = "rk3566" COMPATIBLE_MACHINE:rk3568 = "rk3568" +COMPATIBLE_MACHINE:rk3576 = "rk3576" COMPATIBLE_MACHINE:rk3588s = "rk3588s" PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -26,6 +27,7 @@ ALLOW_EMPTY:${PN} = "1" RKBIN_BINDIR:rk3308 ?= "bin/rk33/" RKBIN_BINDIR:rk3566 ?= "bin/rk35/" RKBIN_BINDIR:rk3568 ?= "bin/r k35/" +RKBIN_BINDIR:rk3576 ?= "bin/rk35/" RKBIN_BINDIR:rk3588s ?= "bin/rk35/" do_deploy() { diff --git a/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend b/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend index 4c7fc3c..4e7265b 100644 --- a/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend +++ b/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend @@ -7,6 +7,7 @@ COMPATIBLE_MACHINE:append:rk3328 = "|rk3328" COMPATIBLE_MACHINE:append:px30 = "|px30" COMPATIBLE_MACHINE:append:rk3566 = "|rk3566" COMPATIBLE_MACHINE:append:rk3568 = "|rk3568" +COMPATIBLE_MACHINE:append:rk3576 = "|rk3576" COMPATIBLE_MACHINE:append:rk3588s = "|rk3588s" # code bloats with clang and results in error below now @@ -35,6 +36,10 @@ fixup_baudrate:rk3568() { sed -i "s/#define FPGA_BAUDRATE\s\+.*/#define FPGA_BAUDRATE ${RK_CONSOLE_BAUD}/" ${S}/plat/rockchip/rk3568/rk3568_def.h } +fixup_baudrate:rk3576() { + sed -i "s/#define RK_DBG_UART_BA UDRATE\s\+.*/#define RK_DBG_UART_BAUDRATE ${RK_CONSOLE_BAUD}/" ${S}/plat/rockchip/rk3576/rk3576_def.h +} + fixup_baudrate:rk3588s() { sed -i "s/#define RK_DBG_UART_BAUDRATE\s\+.*/#define RK_DBG_UART_BAUDRATE ${RK_CONSOLE_BAUD}/" ${S}/plat/rockchip/rk3588/rk3588_def.h } diff --git a/recipes-bsp/u-boot/u-boot_%.bbappend b/recipes-bsp/u-boot/u-boot_%.bbappend index 08e1730..ddb6fd2 100644 --- a/recipes-bsp/u-boot/u-boot_%.bbappend +++ b/recipes-bsp/u-boot/u-boot_%.bbappend @@ -4,6 +4,11 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI:append:rk-u-boot-env = " file://rockchip-enable-environment-mmc.cfg" +SRC_URI:rk3576 = " \ + git://source.denx.de/u-boot/contributors/kwiboo/u-boot.git;protocol=https;branch=rk3576 \ +" +SRCREV:rk3576 = "04e6417226f50e4e3cb04272280922eb425c18ab" + DEPENDS:append:rk3308 = " u-boot-tools-native" DEPENDS:append:rock-pi-4 = " gnutls-native" DEPENDS:append:rk-u-boot-env = " u-boot-mkenvimage-native" From patchwork Sun Jun 21 21:19:41 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sputnik@on-the-web.ch X-Patchwork-Id: 90606 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69CFCCD98F0 for ; Sun, 21 Jun 2026 21:19:52 +0000 (UTC) Received: from mail-4317.protonmail.ch (mail-4317.protonmail.ch [185.70.43.17]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.30867.1782076787966939053 for ; Sun, 21 Jun 2026 14:19:48 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@on-the-web.ch header.s=protonmail2 header.b=KhFbXN8g; spf=pass (domain: on-the-web.ch, ip: 185.70.43.17, mailfrom: sputnik@on-the-web.ch) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=on-the-web.ch; s=protonmail2; t=1782076786; x=1782335986; bh=LG9AZkxvXTFnTjXZ96Dh/dpZtzYuqlxLTjvJpQwnbl8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=KhFbXN8gzehHWgF1AByDj9u2Kc74yWFPEkx1fSVO5coOps9uxQfuml6hywNP59guW JDDvuCLyMafB0pEkt1MewPk2aIueMSrd8PJqsL+aOrw/RbVinX0h3VEsyA7b2JQeDe bAGjfiCtjiIBMzYdxlJiEPbjq8u3hSmv3YgI7YvtJ+BBryZWPJqfVIYuu3EBGUfPld sokkfCnCB5/v9a2b3gWM1eT3BA8WK6aife5tAlMBsrTO6hDF+V10NF2+lc77pSuN4l W7hfANYVsx5rrE5gKgIil1WY9jqM2HrDogo6CevSDMCAvvBn05hdPDllVZzvUN1z+B Plqh8X+JM7B9Q== Date: Sun, 21 Jun 2026 21:19:41 +0000 To: yocto-patches@lists.yoctoproject.org From: sputnik@on-the-web.ch Cc: Trevor Woerner , Martin Herren Subject: [rockchip][PATCH 2/2] rock-4d: add initial support Message-ID: <20260621211915.72650-3-sputnik@on-the-web.ch> In-Reply-To: <20260621211915.72650-1-sputnik@on-the-web.ch> References: <20260621211915.72650-1-sputnik@on-the-web.ch> Feedback-ID: 61562450:user:proton X-Pm-Message-ID: db9c367fddcfdcc51c79b735d3556a24f2d67f0f MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 21 Jun 2026 21:19:52 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/4254 From: Martin Herren 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 --- 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 --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=.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"