From e46fd79060adfd2b309697306adbea86830fb000 Mon Sep 17 00:00:00 2001 From: Peter Woxblom Date: Sun, 16 Aug 2026 09:40:52 +0200 Subject: [PATCH 1/3] kernel: nanopi-r2s: add rk3328-nanopi-r2s-plus device tree (eMMC support) The R2S Plus adds an on-board 32 GB eMMC to the R2S. Add a dedicated device tree wrapping the kernel's rk3328-nanopi-r2s-plus (which builds on the shared rk3328-nanopi-r2s.dtsi) and list both .dtbs in dts/Makefile, following the bpi-r3 pattern. The wrapper overrides the top-level compatible to "friendlyarm,nanopi-r2s" so the Plus shares the R2S product configuration (the eMMC controller is simply absent/empty on the plain R2S). Co-authored-by: Jarvis (Hermes Agent) --- .../friendlyarm-nanopi-r2s/dts/Makefile | 2 +- .../dts/rockchip/rk3328-nanopi-r2s-plus.dts | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 board/aarch64/friendlyarm-nanopi-r2s/dts/rockchip/rk3328-nanopi-r2s-plus.dts diff --git a/board/aarch64/friendlyarm-nanopi-r2s/dts/Makefile b/board/aarch64/friendlyarm-nanopi-r2s/dts/Makefile index 22365b25c..9d32361cc 100644 --- a/board/aarch64/friendlyarm-nanopi-r2s/dts/Makefile +++ b/board/aarch64/friendlyarm-nanopi-r2s/dts/Makefile @@ -1 +1 @@ -dtb-y += rockchip/rk3328-nanopi-r2s.dtb +dtb-y += rockchip/rk3328-nanopi-r2s.dtb rockchip/rk3328-nanopi-r2s-plus.dtb diff --git a/board/aarch64/friendlyarm-nanopi-r2s/dts/rockchip/rk3328-nanopi-r2s-plus.dts b/board/aarch64/friendlyarm-nanopi-r2s/dts/rockchip/rk3328-nanopi-r2s-plus.dts new file mode 100644 index 000000000..ece5c7d92 --- /dev/null +++ b/board/aarch64/friendlyarm-nanopi-r2s/dts/rockchip/rk3328-nanopi-r2s-plus.dts @@ -0,0 +1,20 @@ +#include + +#include "infix.dtsi" + +/ { + compatible = "friendlyarm,nanopi-r2s", "rockchip,rk3328"; +}; + +&rtl8153 { + /* + * Fix port number: device is on port 1, not port 2. + */ + reg = <1>; +}; + +&{/chosen/infix} { + /* Expose only the external USB 2.0 port for user management */ + usb-ports = <&usb_host0_ehci>; + usb-port-names = "USB"; +}; From 46c6b66704227867859d355544f1280cded1f6c7 Mon Sep 17 00:00:00 2001 From: Peter Woxblom Date: Sun, 16 Aug 2026 09:40:52 +0200 Subject: [PATCH 2/3] uboot: nanopi-r2s: select kernel DT via ixvariant (eMMC-aware) The R2S Plus has an on-board eMMC (mmc0) while the plain R2S does not. U-Boot previously had no ixvariant/fdtfile mechanism, so it always loaded rk3328-nanopi-r2s.dtb -- which lacks the eMMC node -- causing the kernel to hang waiting for root=PARTLABEL=secondary. Set ixvariant to pick the plus DT when mmc0 is present, following the bpi-r4 pattern. (cherry picked from commit d3bde23143827ba02998be958c20cb32a54c2761) Co-authored-by: Jarvis (Hermes Agent) --- board/aarch64/friendlyarm-nanopi-r2s/uboot/r2s-env.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/board/aarch64/friendlyarm-nanopi-r2s/uboot/r2s-env.dtsi b/board/aarch64/friendlyarm-nanopi-r2s/uboot/r2s-env.dtsi index 7fd318f66..adb0c492a 100644 --- a/board/aarch64/friendlyarm-nanopi-r2s/uboot/r2s-env.dtsi +++ b/board/aarch64/friendlyarm-nanopi-r2s/uboot/r2s-env.dtsi @@ -4,6 +4,11 @@ boot_targets = "mmc1"; ethprime = "eth0"; + /* The R2S Plus has an on-board eMMC (mmc0); the plain R2S does + * not. Pick the matching kernel DT so the eMMC controller is + * enabled only when the hardware is present. */ + ixvariant = "if mmc dev 0; then setenv fdtfile rockchip/rk3328-nanopi-r2s-plus.dtb; else setenv fdtfile rockchip/rk3328-nanopi-r2s.dtb; fi"; + /* This is a development platform, hard code developer mode */ ixbtn-devmode = "setenv dev_mode yes; echo Enabled"; From c11e23007a1e8bdac7d620790091bc2f1355d883 Mon Sep 17 00:00:00 2001 From: Peter Woxblom Date: Sun, 16 Aug 2026 09:40:52 +0200 Subject: [PATCH 3/3] doc: ChangeLog: add NanoPi R2S Plus support entry Co-authored-by: Jarvis (Hermes Agent) --- doc/ChangeLog.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/ChangeLog.md b/doc/ChangeLog.md index 855be6afb..a800e87c5 100644 --- a/doc/ChangeLog.md +++ b/doc/ChangeLog.md @@ -15,6 +15,11 @@ All notable changes to the project are documented in this file. - Build RPi64 SD card images in release builds - Include .pkg files in release builds +### Added + +- Add NanoPi R2S Plus support (on-board 32 GB eMMC), including U-Boot + device tree selection so the eMMC is enabled when present + ### Fixes - Fix annoying "cannot deselect all services" or reset to YANG default in the