Add FriendlyElec NanoPi M5 support for Rockchip RK3576
Subsystems (2)
v3 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.
Changes in v3:
- Improved (even more) fspi1m1_pins comment for clarity, specifying gpio1_d5, gpio1_c4-c7 (clk, d0-d4) for SPI NOR flash.
- Removed redundant #address-cells and #size-cells from sfc1 node, as they are inherited from rk3576.dtsi.
Changes in v2:
- Fixed DT schema warnings (Rob Herring):
- Renamed spi-nor@0 to flash@0
- Renamed pmic@23 pinctrl nodes to end with -pins
- Renamed hym8563@51 to rtc@51 and removed clock-frequency
- Renamed button@1 to button-user
- Addressed Heiko Stuebner's feedback:
- Sorted non-addressed nodes alphabetically
- Added blank lines in regulator nodes
- Improved fspi1m1_pins comment to clarify SPI NOR flash pinmux
- Moved status property in saradc to last
Patch 1: Updates DT bindings in rockchip.yaml Patch 2: Adds NanoPi M5 device tree and Makefile entry
No MAINTAINERS update 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 | 999 ++++++++++++++++++ 3 files changed, 1006 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
Signature · 1 line
2.39.5
PATCH v3 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
@@ -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
PATCH v3 2/2 arm64: dts: rockchip: Add FriendlyElec NanoPi M5 support
In reply to John ClarkAdd 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 | 999 ++++++++++++++++++ 2 files changed, 1000 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
@@ -148,6 +148,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-armsom-sige5.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-armsom-sige5-v1.2-wifibt.dtbo 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 +999 -0
999 lines not on this page · raw message
Signature · 1 line
2.39.5
Re: [PATCH v3 2/2] arm64: dts: rockchip: Add FriendlyElec NanoPi M5 support
Hi,
Quoted 92 lines · 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.
...arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts new file +81
-0@@ -0,0 +1,999 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2025 FriendlyElec Computer Tech. Co., Ltd. + * Copyright (c) 2025 John Clark <[email protected]> + */ + +/dts-v1/; +&pcie0 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie_m2_reset>; + reset-gpios = <&gpio2 RK_PB4 GPIO_ACTIVE_HIGH>; + vpcie3v3-supply = <&vcc_3v3_m2_keym>; + status = "okay"; +}; + +&pinctrl { + gpio-key { + key1_pin: key1-pin { + rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + gpio-leds { + sys_led_pin: sys-led-pin { + rockchip,pins = <2 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + lan_led_pin: lan-led-pin { + rockchip,pins = <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + wan_led_pin: wan-led-pin { + rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + gmac { + gmac0_int: gmac0-int { + rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>; + }; + gmac0_rst: gmac0-rst { + rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + gmac1_int: gmac1-int { + rockchip,pins = <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + gmac1_rst: gmac1-rst { + rockchip,pins = <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + hdmi { + hdmi_con_en: hdmi-con-en { + rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + headphone { + hp_det: hp-det { + rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + hym8563 { + hym8563_int: hym8563-int { + rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + pcie { + pcie_m2_pwren: pcie-m2-pwren { + rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + pcie_m2_reset: pcie-m2-reset { + rockchip,pins = <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + sdmmc { + sd_s0_pwren: sd-s0-pwren { + rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + };
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts new file +10
-0+ + usb { + usb_host_pwren: usb-host-pwren { + rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + usb_otg0_pwren: usb-otg0-pwren { + rockchip,pins = <0 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +};
Consider using names/label which are (consistently) close to the labels as used in the schematics.
ref: https://lore.kernel.org/linux-rockchip/5461462.0VBMTVartN@phil/
Cheers,
Diederik