]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
rockchip: add support for FriendlyARM NanoPi R2S Plus 23854/head
authorGrische <github@grische.xyz>
Wed, 17 Jun 2026 12:09:18 +0000 (14:09 +0200)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Mon, 29 Jun 2026 07:13:34 +0000 (09:13 +0200)
The NanoPi R2S Plus is a NanoPi R2S with on-board eMMC added. The device
tree (rk3328-nanopi-r2s-plus.dts) is already present in kernel 6.12, and
U-Boot support has been present since v2025.01, so neither a kernel DTS
backport nor a U-Boot patch is required.

Hardware
--------
Rockchip RK3328 (4x Cortex-A53, up to 1.4 GHz)
1GB DDR4 RAM
32GB eMMC 5.1
microSD slot (up to 128GB)
1x 1000 Base-T (native, RTL8211F via GMAC) - WAN
1x 1000 Base-T (USB 3.0, RTL8153B) - LAN
Optional M.2 SDIO Wi-Fi
2x USB 2.0 Type-A host
1x USB-C (5V power input, USB device for Maskrom update)
1x USB-C (onboard USB-to-UART debug console, 1500000 bps)
1x serial debug header / UART0 (3.3V TTL, 3-pin 2.54mm)
2 Buttons (GPIO key, Maskrom)
3 LEDs (SYS red, WAN green, LAN green)
DC 5V/2A power
Operating temperature 0 to 70 C

The MAC addresses are derived from the eMMC CID, so they are stable
regardless of whether the device boots from microSD or eMMC.

Installation
------------

On RK3328 the BootROM boots the eMMC before the microSD slot, so the
Maskrom button must be held to boot from microSD while stock firmware is
still on the eMMC.

How to boot from eMMC:

1. Write the uncompressed sysupgrade image to sdcard
2. Hold the "Mask" button while powering on the device
3. Wait until OpenWrt is fully booted
4. Copy the compressed .gz sysupgrade image to the machine's /tmp folder using scp
5. Run: gunzip -c /tmp/openwrt-...-friendlyarm_nanopi-r2s-plus-squashfs-sysupgrade.img.gz | dd of=/dev/mmcblk1 bs=4M conv=fsync
6. Power the device off, remove the sdcard and power it back on

Tested:
- microSD boot (via Maskrom button) and native eMMC boot
- Both Ethernet ports (RTL8211F WAN, RTL8153B LAN)
- eMMC-derived MAC addresses

Signed-off-by: Grische <github@grische.xyz>
Assisted-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Link: https://github.com/openwrt/openwrt/pull/23854
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
package/boot/uboot-rockchip/Makefile
target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
target/linux/rockchip/armv8/base-files/etc/board.d/02_network
target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity
target/linux/rockchip/image/armv8.mk

index d174e8c98aa171a14202c8db8f8e1370846d493a..a054b7c3cfef1b7c43b7f049f127d9eec72d92ff 100644 (file)
@@ -71,6 +71,13 @@ define U-Boot/nanopi-r2s-rk3328
     friendlyarm_nanopi-r2s
 endef
 
+define U-Boot/nanopi-r2s-plus-rk3328
+  $(U-Boot/rk3328/Default)
+  NAME:=NanoPi R2S Plus
+  BUILD_DEVICES:= \
+    friendlyarm_nanopi-r2s-plus
+endef
+
 define U-Boot/orangepi-r1-plus-rk3328
   $(U-Boot/rk3328/Default)
   NAME:=Orange Pi R1 Plus
@@ -442,6 +449,7 @@ UBOOT_TARGETS := \
   nanopi-r2c-rk3328 \
   nanopi-r2c-plus-rk3328 \
   nanopi-r2s-rk3328 \
+  nanopi-r2s-plus-rk3328 \
   orangepi-r1-plus-rk3328 \
   orangepi-r1-plus-lts-rk3328 \
   roc-cc-rk3328 \
index 4a166ad46e9c75383a84b949156842b5a3f85998..6cb8dfebb435813f4945235bdefea040e209b2bf 100644 (file)
@@ -12,6 +12,7 @@ friendlyarm,nanopi-m5|\
 friendlyarm,nanopi-r2c|\
 friendlyarm,nanopi-r2c-plus|\
 friendlyarm,nanopi-r2s|\
+friendlyarm,nanopi-r2s-plus|\
 friendlyarm,nanopi-r3s|\
 friendlyarm,nanopi-r4s|\
 friendlyarm,nanopi-r4s-enterprise|\
index 8ce236b8e2748152c90361a55de0d79e2fea2dc0..df457b2e08cd503c4fdb34c3c72e9eac098c2d8e 100644 (file)
@@ -12,6 +12,7 @@ rockchip_setup_interfaces()
        friendlyarm,nanopi-r2c|\
        friendlyarm,nanopi-r2c-plus|\
        friendlyarm,nanopi-r2s|\
+       friendlyarm,nanopi-r2s-plus|\
        friendlyarm,nanopi-r3s|\
        friendlyarm,nanopi-r4s|\
        friendlyarm,nanopi-r4s-enterprise|\
@@ -93,6 +94,7 @@ rockchip_setup_macs()
                lan_mac=$(macaddr_add "$wan_mac" 1)
                ;;
        friendlyarm,nanopi-r2c-plus|\
+       friendlyarm,nanopi-r2s-plus|\
        friendlyarm,nanopi-r4s|\
        friendlyarm,nanopi-r5s|\
        sinovoip,rk3568-bpi-r2pro)
index 1bd35b1e3ba24dcd57671d1cc267f604ea437b91..4d734e514db4b3aace24e7e41643fcf22d9ab2da 100644 (file)
@@ -45,6 +45,7 @@ sinovoip,rk3568-bpi-r2pro)
 friendlyarm,nanopi-r2c|\
 friendlyarm,nanopi-r2c-plus|\
 friendlyarm,nanopi-r2s|\
+friendlyarm,nanopi-r2s-plus|\
 radxa,cm3-io|\
 xunlong,orangepi-r1-plus|\
 xunlong,orangepi-r1-plus-lts)
index 5e99eec8359dd8506cfe1b2c722d128eb6a5c7b4..3c81e47d96c30fba786a5ddb24779dfc232d290a 100644 (file)
@@ -120,6 +120,14 @@ define Device/friendlyarm_nanopi-r2s
 endef
 TARGET_DEVICES += friendlyarm_nanopi-r2s
 
+define Device/friendlyarm_nanopi-r2s-plus
+  $(Device/rk3328)
+  DEVICE_VENDOR := FriendlyARM
+  DEVICE_MODEL := NanoPi R2S Plus
+  DEVICE_PACKAGES := kmod-usb-net-rtl8152
+endef
+TARGET_DEVICES += friendlyarm_nanopi-r2s-plus
+
 define Device/friendlyarm_nanopi-r3s
   $(Device/rk3566)
   DEVICE_VENDOR := FriendlyARM