Skip to contentSkip to conversation

Add FriendlyElec NanoPi M5 support for Rockchip RK3576

PATCH Superseded John Clark 3 participants 5 messages Jun 16, 2025 – Jun 20, 2025

Subsystems (2)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

John Clark

author
#0 lore raw

cover Add FriendlyElec NanoPi M5 support for Rockchip RK3576

This series adds device tree support for the FriendlyElec NanoPi M5 board, powered by the Rockchip RK3576 SoC (4x Cortex-A72, 4x Cortex-A53, Mali-G52 MC3 GPU, 6 TOPS NPU). The patches enable basic booting and connectivity, including dual 1Gbps Ethernet, USB 3.2, microSD, M.2 PCIe NVMe, and HDMI.

Patch 1 updates the DT bindings in rockchip.yaml. Patch 2 adds the NanoPi M5 device tree and Makefile entry.

No MAINTAINERS update is needed, as the new file is covered by the existing ARM/Rockchip SoC entry.

Tested on NanoPi M5 with successful boot and feature validation.

---
John Clark (2):
dt-bindings: arm: rockchip: add FriendlyElec NanoPi M5 board
arm64: dts: rockchip: Add FriendlyElec NanoPi M5 support

 .../devicetree/bindings/arm/rockchip.yaml     |   6 +
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../boot/dts/rockchip/rk3576-nanopi-m5.dts    | 969 ++++++++++++++++++
 3 files changed, 976 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
Signature · 1 line
2.39.5
author
#1 lore raw

PATCH 1/2 dt-bindings: arm: rockchip: add FriendlyElec NanoPi M5 board

Add device tree documentation for rk3576-nanopi-m5

---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +6 -0
index 59b69c4741c5..10de9b7bdfcc 100644
@@ -295,6 +295,12 @@ properties:
               - friendlyarm,nanopi-r4s-enterprise
           - const: rockchip,rk3399
 
+      - description: FriendlyElec NanoPi M5 series boards
+        items:
+          - enum:
+              - friendlyarm,nanopi-m5
+          - const: rockchip,rk3576
+
       - description: FriendlyElec NanoPi R5 series boards
         items:
           - enum:
Signature · 1 line
2.39.5
author
#2 lore raw

PATCH 2/2 arm64: dts: rockchip: Add FriendlyElec NanoPi M5 support

In reply to John Clark

Add device tree for FriendlyElec NanoPi M5 with Rockchip RK3576 SoC (4x Cortex-A72, 4x Cortex-A53, Mali-G52 MC3 GPU, 6 TOPS NPU). Enables basic booting and connectivity.

Supported features:
- RK3576 SoC
- 4GB/8GB/16GB LPDDR4X/LPDDR5 RAM
- 16MB SPI Nor Flash
- 2x 1Gbps Ethernet
- 2x USB 3.2 Gen 1 Type-A ports
- microSD UHS-I
- M.2 M-Key PCIe 2.1 x1 NVMe support
- HDMI 1.4/2.0 (up to 4096x2304@60Hz)
- 30-pin GPIO (2x SPI, 4x UART, 3x I2C, 5x PWM, 20x GPIO)
- Debug UART
- RTC with HYM8563TS
- Power via USB-C (PD, 6V~20V)

---
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../boot/dts/rockchip/rk3576-nanopi-m5.dts    | 969 ++++++++++++++++++
 2 files changed, 970 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
index b813866ba283..2c731890d18b 100644
@@ -147,6 +147,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5-io-expander.dtbo
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-armsom-sige5.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-evb1-v10.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-luckfox-omni3576.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-nanopi-m5.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-roc-pc.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-rock-4d.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3582-radxa-e52c.dtb
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts new file +969 -0

969 lines not on this page · raw message

Signature · 1 line
2.39.5
#4 lore raw
In reply to John Clark
Quoted 19 lines · John Clark

This series adds device tree support for the FriendlyElec NanoPi M5 board, powered by the Rockchip RK3576 SoC (4x Cortex-A72, 4x Cortex-A53, Mali-G52 MC3 GPU, 6 TOPS NPU). The patches enable basic booting and connectivity, including dual 1Gbps Ethernet, USB 3.2, microSD, M.2 PCIe NVMe, and HDMI.

Patch 1 updates the DT bindings in rockchip.yaml. Patch 2 adds the NanoPi M5 device tree and Makefile entry.

No MAINTAINERS update is needed, as the new file is covered by the existing ARM/Rockchip SoC entry.

Tested on NanoPi M5 with successful boot and feature validation.

---
John Clark (2):
dt-bindings: arm: rockchip: add FriendlyElec NanoPi M5 board
arm64: dts: rockchip: Add FriendlyElec NanoPi M5 support

Quoted 11 lines
 .../devicetree/bindings/arm/rockchip.yaml     |   6 +
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../boot/dts/rockchip/rk3576-nanopi-m5.dts    | 969 ++++++++++++++++++
 3 files changed, 976 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts

--
2.39.5

My bot found new DTB warnings on the .dts files added or changed in this series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:

  pip3 install dtschema --upgrade

This patch series was applied (using b4) to base:
Base: attempting to guess base-commit...
Base: tags/v6.16-rc1-19-gd7ad90d22abe (exact match)

If this is not the correct base, please add 'base-commit' tag (or use b4 which does this automatically)

New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/rockchip/' for [email protected]:

arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dtb: spi-nor@0 (jedec,spi-nor): $nodename:0: 'spi-nor@0' does not match '^(flash|.*sram|nand)(@.*)?$'
from schema $id: http://devicetree.org/schemas/mtd/jedec,spi-nor.yaml#
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dtb: pmic@23 (rockchip,rk806): Unevaluated properties are not allowed ('rk806_dvs1_null', 'rk806_dvs1_pwrdn', 'rk806_dvs1_rst', 'rk806_dvs1_slp', 'rk806_dvs2_dvs', 'rk806_dvs2_gpio', 'rk806_dvs2_null', 'rk806_dvs2_pwrdn', 'rk806_dvs2_rst', 'rk806_dvs2_slp', 'rk806_dvs3_dvs', 'rk806_dvs3_gpio', 'rk806_dvs3_null', 'rk806_dvs3_pwrdn', 'rk806_dvs3_rst', 'rk806_dvs3_slp' were unexpected)
from schema $id: http://devicetree.org/schemas/mfd/rockchip,rk806.yaml#
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dtb: hym8563@51 (haoyu,hym8563): $nodename:0: 'hym8563@51' does not match '^rtc(@.*|-([0-9]|[1-9][0-9]+))?$'
from schema $id: http://devicetree.org/schemas/rtc/haoyu,hym8563.yaml#
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dtb: hym8563@51 (haoyu,hym8563): Unevaluated properties are not allowed ('clock-frequency' was unexpected)
from schema $id: http://devicetree.org/schemas/rtc/haoyu,hym8563.yaml#
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dtb: gpio-keys (gpio-keys): 'button@1' does not match any of the regexes: '^(button|event|key|switch|(button|event|key|switch)-[a-z0-9-]+|[a-z0-9-]+-(button|event|key|switch))$', '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/input/gpio-keys.yaml#

maintainer
#3 lore raw

Re: [PATCH v1 2/2] arm64: dts: rockchip: Add FriendlyElec NanoPi M5 support

In reply to John Clark

Hi,

Am Montag, 16. Juni 2025, 23:22:14 Mitteleuropäische Sommerzeit schrieb John Clark:

Quoted 18 lines

Add device tree for FriendlyElec NanoPi M5 with Rockchip RK3576 SoC (4x Cortex-A72, 4x Cortex-A53, Mali-G52 MC3 GPU, 6 TOPS NPU). Enables basic booting and connectivity.

Supported features:
- RK3576 SoC
- 4GB/8GB/16GB LPDDR4X/LPDDR5 RAM
- 16MB SPI Nor Flash
- 2x 1Gbps Ethernet
- 2x USB 3.2 Gen 1 Type-A ports
- microSD UHS-I
- M.2 M-Key PCIe 2.1 x1 NVMe support
- HDMI 1.4/2.0 (up to 4096x2304@60Hz)
- 30-pin GPIO (2x SPI, 4x UART, 3x I2C, 5x PWM, 20x GPIO)
- Debug UART
- RTC with HYM8563TS
- Power via USB-C (PD, 6V~20V)

Quoted 2 lines

---

apart from the schema problems, Rob's bot found, I saw some additional nitpicks below.

[...]

Quoted 1 line
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts new file +1 -0
+	sound {

[...]

arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts line 110

Quoted 3 lines
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts new file +3 -0
+	};
+
+	vcc_12v_dcin: regulator-vcc-12v-dcin {

nodes without addresses should get sorted by nodename aka regulator-* before sound.

Phandles count into the sorting only below in the
&phandle {}; parts

arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts line 116

Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts new file +6 -0
+		compatible = "regulator-fixed";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+		regulator-name = "vcc_12v_dcin";

blank lines between properties and subnodes please. same for other regulators below and also the pmic.

arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts line 306

Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts new file +8 -0
+		regulator-state-mem {
+			regulator-on-in-suspend;
+		};
+	};
+
 
+&fspi1m1_pins {
+	rockchip,pins =
+		/* clk, d0~4 */

comment could state a tiny bit more what is changed compared to the "original" pin settings

arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts

Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts new file +9 -0
+		<1 RK_PD5 3 &pcfg_pull_none>,
+		<1 RK_PC4 3 &pcfg_pull_none>,
+		<1 RK_PC5 3 &pcfg_pull_none>,
+		<1 RK_PC6 3 &pcfg_pull_none>,
+		<1 RK_PC7 3 &pcfg_pull_none>;
+};
 
 
 
 
+&saradc {
+	status = "okay";
+	vref-supply = <&vcca_1v8_s0>;

status is the last property

Quoted 1 line

+};