Skip to contentSkip to conversation

arm64: dts: rockchip: Add NanoPi M6 board

PATCH Superseded Joachim Eastwood 3 participants 23 messages Jul 10 – Jul 13

Subsystems (2)

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v2 cover arm64: dts: rockchip: Add NanoPi M6 board

This patch series add support for the NanoPi M6. This board is very similar to the NanoPi R6C and R6S boards which are already supported.

Main differences:
* M.2 M-key slot with PCIe (Also present on R6C)
* M.2 E-key slot with PCIe and USB (from hub)
* 1 additional USB 2.0 port from an on-board USB hub
* RT5616 audio CODEC

Patch 2 and 3 moves a bit code around. Please let me know if those two should be squashed together.
Next few patches adds some missing bits the common nanopi dtsi file. While the final patch adds support for NanoPi M6. Support for M6 has been split into two files one dtsi and one dts file. This is to make it easier to add support to the new M6V2 board at a later stage.

All changes have been verified using the schematics for M6, R6C and R6S. Only M6 have been boot and runtime tested. Tester for R6x are welcome.

---
Changes in v2:
- Organize DT such that adding support to NanoPi M6V2 later is easier
- Use correct clk id for I2C mclk out as suggested by Diederik.
- Add a couple of acks from Krzysztof Kozlowski.
- Link to v1: https://patch.msgid.link/[email protected]

---
Joachim Eastwood (12):
dt-bindings: arm: rockchip: add FriendlyElec NanoPi M6
arm64: dts: rockchip: refactor rk3588s-nanopi* to support M6
arm64: dts: rockchip: move NanoPi R6 code into common dtsi
arm64: dts: rockchip: rk3588s-nanopi: add missing sdmmc cd pinctrl
arm64: dts: rockchip: rk3588s-nanopi: remove pull up on rtc int pin
arm64: dts: rockchip: rk3588s-nanopi: add missing pcie rst pinctrl
arm64: dts: rockchip: rk3588s-nanopi: pcie2x1l2: add clkreq
arm64: dts: rockchip: rk3588s-nanopi: remove always-on from vdd_npu_s0 reg
arm64: dts: rockchip: rk3588s-nanopi: remove useless vcc_3v3_pcie20
arm64: dts: rockchip: rk3588s-nanopi: add gmac1 add phy-supply
arm64: dts: rockchip: rk3588s-nanopi: remove bogus vcc5v0_usb regulator
arm64: dts: rockchip: add support for NanoPi M6 board

 .../devicetree/bindings/arm/rockchip.yaml          |   3 +-
 arch/arm64/boot/dts/rockchip/Makefile              |   1 +
 .../arm64/boot/dts/rockchip/rk3588s-nanopi-m6.dtsi | 142 ++++
 .../boot/dts/rockchip/rk3588s-nanopi-m6v1.dts      |  67 ++
 .../arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi | 792 --------------------
 .../arm64/boot/dts/rockchip/rk3588s-nanopi-r6c.dts |   1 +
 .../arm64/boot/dts/rockchip/rk3588s-nanopi-r6s.dts |   1 +
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi   | 800 +++++++++++++++++++++
 8 files changed, 1014 insertions(+), 793 deletions(-)

---
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
change-id: 20260701-nanopi-m6-ffeef7252fd7

Best regards,

Signature · 1 line
Joachim Eastwood <[email protected]>
#1 lore raw

PATCH v2 1/12 dt-bindings: arm: rockchip: add FriendlyElec NanoPi M6

Add device tree binding documentation for FriendlyElec NanoPi M6, a single-board computer based on the Rockchip RK3588S SoC. Very similar to NanoPi R6C and R6S.

---
 Documentation/devicetree/bindings/arm/rockchip.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/rockchip.yaml +2 -1
index 1a9dde18626d..6ba512964c25 100644
@@ -344,9 +344,10 @@ properties:
               - friendlyarm,nanopi-r5s
           - const: rockchip,rk3568
 
-      - description: FriendlyElec NanoPi R6 series boards
+      - description: FriendlyElec NanoPi6 series boards
         items:
           - enum:
+              - friendlyarm,nanopi-m6
               - friendlyarm,nanopi-r6c
               - friendlyarm,nanopi-r6s
           - const: rockchip,rk3588s
Signature · 1 line
2.55.0
#2 lore raw

PATCH v2 2/12 arm64: dts: rockchip: refactor rk3588s-nanopi* to support M6

In reply to Joachim Eastwood

Refactor FriendlyElec NanoPi R6 boards based on RK3588S SoC in preparation to add support the NanoPi M6 board.

---
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6c.dts                     | 2 +-
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6s.dts                     | 2 +-
 .../boot/dts/rockchip/{rk3588s-nanopi-r6.dtsi => rk3588s-nanopi.dtsi}   | 0
 3 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6c.dts +1 -1
index ccc5e4627517..77fef2662ca5 100644
@@ -2,7 +2,7 @@
 
 /dts-v1/;
 
-#include "rk3588s-nanopi-r6.dtsi"
+#include "rk3588s-nanopi.dtsi"
 
 / {
 	model = "FriendlyElec NanoPi R6C";
arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6s.dts +1 -1
index 9c3e0b0daaac..f8993418a122 100644
@@ -2,7 +2,7 @@
 
 /dts-v1/;
 
-#include "rk3588s-nanopi-r6.dtsi"
+#include "rk3588s-nanopi.dtsi"
 
 / {
 	model = "FriendlyElec NanoPi R6S";
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi renamed from arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi +0 -0
similarity index 100%
rename from arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi
rename to arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi
Signature · 1 line
2.55.0
#3 lore raw

PATCH v2 3/12 arm64: dts: rockchip: move NanoPi R6 code into common dtsi

In reply to Joachim Eastwood

Move NanoPi R6C and R6S specific DT into its own file.

---
 .../arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi | 96 ++++++++++++++++++++++
 .../arm64/boot/dts/rockchip/rk3588s-nanopi-r6c.dts |  1 +
 .../arm64/boot/dts/rockchip/rk3588s-nanopi-r6s.dts |  1 +
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi   | 89 --------------------
 4 files changed, 98 insertions(+), 89 deletions(-)
arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi new file +96 -0
new file mode 100644
index 000000000000..2f8c580afc2b
@@ -0,0 +1,96 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/ {
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&key1_pin>;
+
+		button-user {
+			label = "User";
+			linux,code = <BTN_1>;
+			gpios = <&gpio1 RK_PC0 GPIO_ACTIVE_LOW>;
+			debounce-interval = <50>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		sys_led: led-0 {
+			label = "sys_led";
+			gpios = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "heartbeat";
+			pinctrl-names = "default";
+			pinctrl-0 = <&sys_led_pin>;
+		};
+
+		wan_led: led-1 {
+			label = "wan_led";
+			gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&wan_led_pin>;
+		};
+
+		lan1_led: led-2 {
+			label = "lan1_led";
+			gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&lan1_led_pin>;
+		};
+
+		lan2_led: led-3 {
+			gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&lan2_led_pin>;
+		};
+	};
+
+	vcc5v0_usb_otg0: regulator-vcc5v0-usb-otg0 {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&typec5v_pwren>;
+		regulator-name = "vcc5v0_usb_otg0";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vcc5v0_usb>;
+	};
+};
+
+&pinctrl {
+	gpio-key {
+		key1_pin: key1-pin {
+			rockchip,pins = <1 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
+	gpio-leds {
+		sys_led_pin: sys-led-pin {
+			rockchip,pins =
+				<1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		wan_led_pin: wan-led-pin {
+			rockchip,pins =
+				<1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		lan1_led_pin: lan1-led-pin {
+			rockchip,pins =
+				<1 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		lan2_led_pin: lan2-led-pin {
+			rockchip,pins =
+				<1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	usb {
+		typec5v_pwren: typec5v-pwren {
+			rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+};
arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6c.dts +1 -0
index 77fef2662ca5..90922c55da37 100644
@@ -3,6 +3,7 @@
 /dts-v1/;
 
 #include "rk3588s-nanopi.dtsi"
+#include "rk3588s-nanopi-r6.dtsi"
 
 / {
 	model = "FriendlyElec NanoPi R6C";
arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6s.dts +1 -0
index f8993418a122..8b318561342c 100644
@@ -3,6 +3,7 @@
 /dts-v1/;
 
 #include "rk3588s-nanopi.dtsi"
+#include "rk3588s-nanopi-r6.dtsi"
 
 / {
 	model = "FriendlyElec NanoPi R6S";
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +0 -89

119 lines not on this page · raw message

Signature · 1 line
2.55.0
#4 lore raw

PATCH v2 4/12 arm64: dts: rockchip: rk3588s-nanopi: add missing sdmmc cd pinctrl

In reply to Joachim Eastwood

The cd (card detect) pin is used, but not reserved through pinctrl.

---
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +6 -0
index d41c49716fa2..a8f32b994b10 100644
@@ -336,6 +336,10 @@ rtc_int: rtc-int {
 	};
 
 	sdmmc {
+		sdmmc_det_pin: sdmmc-det-pin {
+			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
 		sd_s0_pwr: sd-s0-pwr {
 			rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
 		};
@@ -407,6 +411,8 @@ &sdmmc {
 	no-mmc;
 	no-sdio;
 	sd-uhs-sdr104;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_det_pin>;
 	vmmc-supply = <&vcc_3v3_sd_s0>;
 	vqmmc-supply = <&vccio_sd_s0>;
 	status = "okay";
Signature · 1 line
2.55.0
#5 lore raw

Re: [PATCH v2 04/12] arm64: dts: rockchip: rk3588s-nanopi: add missing sdmmc cd pinctrl

Hi Joachim,

Quoted 3 lines · On 7/11/2026 12:11 AM, Joachim Eastwood via B4 Relay wrote:

From: Joachim Eastwood <[email protected]>

The cd (card detect) pin is used, but not reserved through pinctrl.

Maybe this and some/most of the other DT changes that fixes some missing bits should put first in this series and with Fixes tags?

Regards,
Jonas

Quoted 31 lines
---
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +6 -0
index d41c49716fa2..a8f32b994b10 100644
@@ -336,6 +336,10 @@ rtc_int: rtc-int {
 	};
 
 	sdmmc {
+		sdmmc_det_pin: sdmmc-det-pin {
+			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
 		sd_s0_pwr: sd-s0-pwr {
 			rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
 		};
@@ -407,6 +411,8 @@ &sdmmc {
 	no-mmc;
 	no-sdio;
 	sd-uhs-sdr104;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_det_pin>;
 	vmmc-supply = <&vcc_3v3_sd_s0>;
 	vqmmc-supply = <&vccio_sd_s0>;
 	status = "okay";
#6 lore raw

Re: [PATCH v2 04/12] arm64: dts: rockchip: rk3588s-nanopi: add missing sdmmc cd pinctrl

Hi Jonas,

Quoted 10 lines · Jonas Karlman

Hi Joachim,

Quoted 3 lines · On 7/11/2026 12:11 AM, Joachim Eastwood via B4 Relay wrote:

From: Joachim Eastwood <[email protected]>

The cd (card detect) pin is used, but not reserved through pinctrl.

Maybe this and some/most of the other DT changes that fixes some missing bits should put first in this series and with Fixes tags?

I can of course put them first in the series. So we have the option to do so.

But what is the policy regarding "fixes"?
I don't think they fix any critical issues, but they do make the DT more correct.
So do we want to backport these to stable?

Maybe the following changes qualify:
arm64: dts: rockchip: rk3588s-nanopi: add missing pcie rst pinctrl
arm64: dts: rockchip: rk3588s-nanopi: remove pull up on rtc int pin
arm64: dts: rockchip: rk3588s-nanopi: add missing sdmmc cd pinctrl

But I don't any others should be considered fixes.

best regards,
Joachim Eastwood

#7 lore raw

Re: [PATCH v2 04/12] arm64: dts: rockchip: rk3588s-nanopi: add missing sdmmc cd pinctrl

Hi Joachim,

Quoted 21 lines · Joachim Eastwood

Hi Jonas,

Quoted 10 lines · Jonas Karlman

Hi Joachim,

Quoted 3 lines · On 7/11/2026 12:11 AM, Joachim Eastwood via B4 Relay wrote:

From: Joachim Eastwood <[email protected]>

The cd (card detect) pin is used, but not reserved through pinctrl.

Maybe this and some/most of the other DT changes that fixes some missing bits should put first in this series and with Fixes tags?

I can of course put them first in the series. So we have the option to do so.

But what is the policy regarding "fixes"?
I don't think they fix any critical issues, but they do make the DT more correct.
So do we want to backport these to stable?

Quoted 6 lines

Maybe the following changes qualify:
arm64: dts: rockchip: rk3588s-nanopi: add missing pcie rst pinctrl
arm64: dts: rockchip: rk3588s-nanopi: remove pull up on rtc int pin
arm64: dts: rockchip: rk3588s-nanopi: add missing sdmmc cd pinctrl

But I don't any others should be considered fixes.

At least the pcie and sdmmc "fixes" is likely something we may want to pick to U-Boot dts/upstream as soon as they are available in the devicetree-rebasing tree.

Regards,
Jonas

Quoted 4 lines

best regards,
Joachim Eastwood

#8 lore raw

PATCH v2 5/12 arm64: dts: rockchip: rk3588s-nanopi: remove pull up on rtc int pin

In reply to Joachim Eastwood

All boards in the RK3588S NanoPi familiy has a pull on the PCB for the RTC interrupt pin. So there is no need to enable the pull-up in the SoC.

---
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +1 -1
index a8f32b994b10..f3a240b48a2a 100644
@@ -331,7 +331,7 @@ hdmi0_tx_on_h: hdmi0-tx-on-h {
 
 	hym8563 {
 		rtc_int: rtc-int {
-			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
+			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 	};
 
Signature · 1 line
2.55.0
#9 lore raw

PATCH v2 6/12 arm64: dts: rockchip: rk3588s-nanopi: add missing pcie rst pinctrl

In reply to Joachim Eastwood

The pins are used as reset-gpios but not reserved through pinctrl.

---
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +14 -0
index f3a240b48a2a..361682c18e69 100644
@@ -303,12 +303,16 @@ rgmii_phy1: ethernet-phy@1 {
 };
 
 &pcie2x1l1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie2_1_rst>;
 	reset-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>;
 	vpcie3v3-supply = <&vcc_3v3_pcie20>;
 	status = "okay";
 };
 
 &pcie2x1l2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie2_2_rst>;
 	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
 	vpcie3v3-supply = <&vcc_3v3_pcie20>;
 	status = "okay";
@@ -335,6 +339,16 @@ rtc_int: rtc-int {
 		};
 	};
 
+	pcie {
+		pcie2_1_rst: pcie2-1-rst {
+			rockchip,pins = <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		pcie2_2_rst: pcie2-2-rst {
+			rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	sdmmc {
 		sdmmc_det_pin: sdmmc-det-pin {
 			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
Signature · 1 line
2.55.0
#10 lore raw

PATCH v2 7/12 arm64: dts: rockchip: rk3588s-nanopi: pcie2x1l2: add clkreq

In reply to Joachim Eastwood

The clkreq is present on the board, so hook it up in DT.

---
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +2 -1
index 361682c18e69..bcb2f5d63a61 100644
@@ -312,7 +312,8 @@ &pcie2x1l1 {
 
 &pcie2x1l2 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pcie2_2_rst>;
+	pinctrl-0 = <&pcie2_2_rst>, <&pcie20x1m0_clkreqn>;
+	supports-clkreq;
 	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
 	vpcie3v3-supply = <&vcc_3v3_pcie20>;
 	status = "okay";
Signature · 1 line
2.55.0
#11 lore raw

PATCH v2 8/12 arm64: dts: rockchip: rk3588s-nanopi: remove always-on from vdd_npu_s0 reg

In reply to Joachim Eastwood

Since the NPU is hooked up on these the always-on isn't needed anymore.

---
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +0 -1
index bcb2f5d63a61..463cfeddf270 100644
@@ -258,7 +258,6 @@ vdd_npu_s0: regulator@42 {
 		regulator-max-microvolt = <950000>;
 		regulator-ramp-delay = <2300>;
 		regulator-boot-on;
-		regulator-always-on;
 		vin-supply = <&vcc5v0_sys>;
 
 		regulator-state-mem {
Signature · 1 line
2.55.0
#12 lore raw

Re: [PATCH v2 08/12] arm64: dts: rockchip: rk3588s-nanopi: remove always-on from vdd_npu_s0 reg

Hi Joachim,

Quoted 14 lines · On 7/11/2026 12:11 AM, Joachim Eastwood via B4 Relay wrote:

From: Joachim Eastwood <[email protected]>

Since the NPU is hooked up on these the always-on isn't needed anymore.

---
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +0 -0
index bcb2f5d63a61..463cfeddf270 100644

arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi vdd_npu_s0: regulator@42 { · line 260

Quoted 3 lines
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +0 -0
@@ -258,7 +258,6 @@ vdd_npu_s0: regulator@42 {
 		regulator-max-microvolt = <950000>;
 		regulator-ramp-delay = <2300>;
 		regulator-boot-on;

Why is boot-on kept?, NPU is likely not needed until OS has started.

With PD domain-supply the regulator should be enabled automatically, or is there some other issue that requires boot firmware to enable this regulator before OS is started?

Regards,
Jonas

Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +0 -1
-		regulator-always-on;
 		vin-supply = <&vcc5v0_sys>;
 
 		regulator-state-mem {
#13 lore raw

Re: [PATCH v2 08/12] arm64: dts: rockchip: rk3588s-nanopi: remove always-on from vdd_npu_s0 reg

Hi Jonas,

Quoted 13 lines · Jonas Karlman

Hi Joachim,

Quoted 9 lines · On 7/11/2026 12:11 AM, Joachim Eastwood via B4 Relay wrote:

From: Joachim Eastwood <[email protected]>

Since the NPU is hooked up on these the always-on isn't needed anymore.

---
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi | 1 -
 1 file changed, 1 deletion(-)
Quoted 10 lines

arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi vdd_npu_s0: regulator@42 { · line 260

Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +0 -0
index bcb2f5d63a61..463cfeddf270 100644
@@ -258,7 +258,6 @@ vdd_npu_s0: regulator@42 {
              regulator-max-microvolt = <950000>;
              regulator-ramp-delay = <2300>;
              regulator-boot-on;

Why is boot-on kept?, NPU is likely not needed until OS has started.

I am not really sure.
Looking at the other rk3588(s) boards, they also kept the boot-on parameter when the always-on was removed.

Quoted 3 lines

With PD domain-supply the regulator should be enabled automatically, or is there some other issue that requires boot firmware to enable this regulator before OS is started?

Maybe some Rockchip people can enlighten us?

I haven't had the time to actually test the NPU. I'll try to test it next week. So this patch is based on similar changes done to other RK3588 boards.

best regards,
Joachim Eastwood

#14 lore raw

Re: [PATCH v2 08/12] arm64: dts: rockchip: rk3588s-nanopi: remove always-on from vdd_npu_s0 reg

Hi Joachim,

Quoted 27 lines · Joachim Eastwood

Hi Jonas,

Quoted 13 lines · Jonas Karlman

Hi Joachim,

Quoted 9 lines · On 7/11/2026 12:11 AM, Joachim Eastwood via B4 Relay wrote:

From: Joachim Eastwood <[email protected]>

Since the NPU is hooked up on these the always-on isn't needed anymore.

---
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi | 1 -
 1 file changed, 1 deletion(-)
Quoted 10 lines

arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi vdd_npu_s0: regulator@42 { · line 260

Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +0 -0
index bcb2f5d63a61..463cfeddf270 100644
@@ -258,7 +258,6 @@ vdd_npu_s0: regulator@42 {
              regulator-max-microvolt = <950000>;
              regulator-ramp-delay = <2300>;
              regulator-boot-on;

Why is boot-on kept?, NPU is likely not needed until OS has started.

Quoted 3 lines

I am not really sure.
Looking at the other rk3588(s) boards, they also kept the boot-on parameter when the always-on was removed.

Ahh, those board should likely also drop the boot-on prop. There should really not be any need to force the PMIC to enable this regulator from firmware. If it was left intentionally for other boards, maybe there is a bug in software that need to be fixed.

Quoted 9 lines
Quoted 4 lines

With PD domain-supply the regulator should be enabled automatically, or is there some other issue that requires boot firmware to enable this regulator before OS is started?

Maybe some Rockchip people can enlighten us?

I haven't had the time to actually test the NPU. I'll try to test it next week. So this patch is based on similar changes done to other RK3588 boards.

Yes, please drop the boot-on prop and test :-)

Regards,
Jonas

Quoted 4 lines

best regards,
Joachim Eastwood

#15 lore raw

Re: [PATCH v2 08/12] arm64: dts: rockchip: rk3588s-nanopi: remove always-on from vdd_npu_s0 reg

Quoted 45 lines · Jonas Karlman

Hi Joachim,

Quoted 27 lines · Joachim Eastwood

Hi Jonas,

Quoted 13 lines · Jonas Karlman

Hi Joachim,

Quoted 9 lines · On 7/11/2026 12:11 AM, Joachim Eastwood via B4 Relay wrote:

From: Joachim Eastwood <[email protected]>

Since the NPU is hooked up on these the always-on isn't needed anymore.

---
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi | 1 -
 1 file changed, 1 deletion(-)
Quoted 10 lines

arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi vdd_npu_s0: regulator@42 { · line 260

Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +0 -0
index bcb2f5d63a61..463cfeddf270 100644
@@ -258,7 +258,6 @@ vdd_npu_s0: regulator@42 {
              regulator-max-microvolt = <950000>;
              regulator-ramp-delay = <2300>;
              regulator-boot-on;

Why is boot-on kept?, NPU is likely not needed until OS has started.

Quoted 3 lines

I am not really sure.
Looking at the other rk3588(s) boards, they also kept the boot-on parameter when the always-on was removed.

Ahh, those board should likely also drop the boot-on prop. There should really not be any need to force the PMIC to enable this regulator from firmware. If it was left intentionally for other boards, maybe there is a bug in software that need to be fixed.

Quoted 5 lines
Quoted 4 lines

With PD domain-supply the regulator should be enabled automatically, or is there some other issue that requires boot firmware to enable this regulator before OS is started?

Quoted 6 lines
Quoted 4 lines

Maybe some Rockchip people can enlighten us?

I haven't had the time to actually test the NPU. I'll try to test it next week. So this patch is based on similar changes done to other RK3588 boards.

Yes, please drop the boot-on prop and test :-)

boot-on doesn't seems to matter on my NanoPi M6. My short test code for the NPU runs either way. Note that I am running edk2-rk3588 bootloader.

Setting up the enviroment for running stuff on the NPU was less painful than I feared. Using Mesa teflon and python-tflite-runtime.

I will repost the entire patch set later today.
Thanks for all the feedback so far.

best regards,
Joachim Eastwood

#16 lore raw

PATCH v2 9/12 arm64: dts: rockchip: rk3588s-nanopi: remove useless vcc_3v3_pcie20

In reply to Joachim Eastwood

There is no separate regulator for boards with RTL8125BG MACs. The power is only separated from VCC_3V3_S3 with a ferrite bead.

---
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +2 -12
index 463cfeddf270..e4900af9822a 100644
@@ -86,16 +86,6 @@ vcc_3v3_sd_s0: regulator-vcc-3v3-sd-s0 {
 		vin-supply = <&vcc_3v3_s3>;
 	};
 
-	vcc_3v3_pcie20: regulator-vcc3v3-pcie20 {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc_3v3_pcie20";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
-		vin-supply = <&vcc_3v3_s3>;
-	};
-
 	vcc5v0_usb: regulator-vcc5v0-usb {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc5v0_usb";
@@ -305,7 +295,7 @@ &pcie2x1l1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pcie2_1_rst>;
 	reset-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>;
-	vpcie3v3-supply = <&vcc_3v3_pcie20>;
+	vpcie3v3-supply = <&vcc_3v3_s3>;
 	status = "okay";
 };
 
@@ -314,7 +304,7 @@ &pcie2x1l2 {
 	pinctrl-0 = <&pcie2_2_rst>, <&pcie20x1m0_clkreqn>;
 	supports-clkreq;
 	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
-	vpcie3v3-supply = <&vcc_3v3_pcie20>;
+	vpcie3v3-supply = <&vcc_3v3_s3>;
 	status = "okay";
 };
 
Signature · 1 line
2.55.0
#17 lore raw

PATCH v2 10/12 arm64: dts: rockchip: rk3588s-nanopi: add gmac1 add phy-supply

In reply to Joachim Eastwood

The RTL8211F Ethernet phy is power from the VCC_3V3_S3 rail.

---
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +1 -0
index e4900af9822a..596b5a64c191 100644
@@ -153,6 +153,7 @@ &gmac1 {
 	clock_in_out = "output";
 	phy-handle = <&rgmii_phy1>;
 	phy-mode = "rgmii-rxid";
+	phy-supply = <&vcc_3v3_s3>;
 	pinctrl-0 = <&gmac1_miim
 		     &gmac1_tx_bus2
 		     &gmac1_rx_bus2
Signature · 1 line
2.55.0
#18 lore raw

PATCH v2 11/12 arm64: dts: rockchip: rk3588s-nanopi: remove bogus vcc5v0_usb regulator

In reply to Joachim Eastwood

All USB regulators (power switches) are feed from the main vcc5v0 supply. There is no regulator or switch in between.

---
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi |  2 +-
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi    | 12 +-----------
 2 files changed, 2 insertions(+), 12 deletions(-)
arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi +1 -1
index 2f8c580afc2b..ff579f75d8d3 100644
@@ -55,7 +55,7 @@ vcc5v0_usb_otg0: regulator-vcc5v0-usb-otg0 {
 		regulator-name = "vcc5v0_usb_otg0";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
-		vin-supply = <&vcc5v0_usb>;
+		vin-supply = <&vcc5v0_sys>;
 	};
 };
 
arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi +1 -11
index 596b5a64c191..43b9342bbf14 100644
@@ -86,16 +86,6 @@ vcc_3v3_sd_s0: regulator-vcc-3v3-sd-s0 {
 		vin-supply = <&vcc_3v3_s3>;
 	};
 
-	vcc5v0_usb: regulator-vcc5v0-usb {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc5v0_usb";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		vin-supply = <&vcc5v0_sys>;
-	};
-
 	vcc5v0_host_20: regulator-vcc5v0-host-20 {
 		compatible = "regulator-fixed";
 		enable-active-high;
@@ -105,7 +95,7 @@ vcc5v0_host_20: regulator-vcc5v0-host-20 {
 		regulator-name = "vcc5v0_host_20";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
-		vin-supply = <&vcc5v0_usb>;
+		vin-supply = <&vcc5v0_sys>;
 	};
 };
 
Signature · 1 line
2.55.0
#19 lore raw

PATCH v2 12/12 arm64: dts: rockchip: add support for NanoPi M6 board

In reply to Joachim Eastwood

The NanoPi M6 board shares most of the features of the R6 boards.

Main differences:
* M.2 M-key slot with PCIe (Also present on R6C)
* M.2 E-key slot with PCIe and USB (from hub)
* 1 additional USB 2.0 port from an on-board USB hub
* RT5616 audio CODEC

---
 arch/arm64/boot/dts/rockchip/Makefile              |   1 +
 .../arm64/boot/dts/rockchip/rk3588s-nanopi-m6.dtsi | 142 +++++++++++++++++++++
 .../boot/dts/rockchip/rk3588s-nanopi-m6v1.dts      |  67 ++++++++++
 3 files changed, 210 insertions(+)
arch/arm64/boot/dts/rockchip/Makefile +1 -0
index 761d82b4f4f2..55a1ec8309df 100644
@@ -218,6 +218,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-evb1-v10.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-gameforce-ace.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-indiedroid-nova.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-khadas-edge2.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-m6v1.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6s.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6c.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-odroid-m2.dtb
arch/arm64/boot/dts/rockchip/rk3588s-nanopi-m6.dtsi new file +142 -0

142 lines not on this page · raw message

arch/arm64/boot/dts/rockchip/rk3588s-nanopi-m6v1.dts new file +67 -0

67 lines not on this page · raw message

Signature · 1 line
2.55.0
#20 lore raw
In reply to Joachim Eastwood

Hi Joachim,

Quoted 9 lines · On 7/11/2026 12:11 AM, Joachim Eastwood via B4 Relay wrote:

This patch series add support for the NanoPi M6. This board is very similar to the NanoPi R6C and R6S boards which are already supported.

Main differences:
* M.2 M-key slot with PCIe (Also present on R6C)
* M.2 E-key slot with PCIe and USB (from hub)
* 1 additional USB 2.0 port from an on-board USB hub
* RT5616 audio CODEC

Quoted 6 lines

Patch 2 and 3 moves a bit code around. Please let me know if those two should be squashed together.
Next few patches adds some missing bits the common nanopi dtsi file. While the final patch adds support for NanoPi M6. Support for M6 has been split into two files one dtsi and one dts file. This is to make it easier to add support to the new M6V2 board at a later stage.

In my personal opinion I think it would make more sense to sort patches in following order:
- adding/fixing missing bits to the common nanopi-r6 dtsi
- extract M6/R6 common parts from nanopi-r6 dtsi to nanopi dtsi, nanopi-r6 dtsi includes the nanopi dtsi and no changes to dts files
- final parts that adds the M6 board

Should probably make it a little bit easier to cherry-pick and bisect.

Regards,
Jonas

Quoted 50 lines

All changes have been verified using the schematics for M6, R6C and R6S. Only M6 have been boot and runtime tested. Tester for R6x are welcome.

---
Changes in v2:
- Organize DT such that adding support to NanoPi M6V2 later is easier
- Use correct clk id for I2C mclk out as suggested by Diederik.
- Add a couple of acks from Krzysztof Kozlowski.
- Link to v1: https://patch.msgid.link/[email protected]

---
Joachim Eastwood (12):
dt-bindings: arm: rockchip: add FriendlyElec NanoPi M6
arm64: dts: rockchip: refactor rk3588s-nanopi* to support M6
arm64: dts: rockchip: move NanoPi R6 code into common dtsi
arm64: dts: rockchip: rk3588s-nanopi: add missing sdmmc cd pinctrl
arm64: dts: rockchip: rk3588s-nanopi: remove pull up on rtc int pin
arm64: dts: rockchip: rk3588s-nanopi: add missing pcie rst pinctrl
arm64: dts: rockchip: rk3588s-nanopi: pcie2x1l2: add clkreq
arm64: dts: rockchip: rk3588s-nanopi: remove always-on from vdd_npu_s0 reg
arm64: dts: rockchip: rk3588s-nanopi: remove useless vcc_3v3_pcie20
arm64: dts: rockchip: rk3588s-nanopi: add gmac1 add phy-supply
arm64: dts: rockchip: rk3588s-nanopi: remove bogus vcc5v0_usb regulator
arm64: dts: rockchip: add support for NanoPi M6 board

 .../devicetree/bindings/arm/rockchip.yaml          |   3 +-
 arch/arm64/boot/dts/rockchip/Makefile              |   1 +
 .../arm64/boot/dts/rockchip/rk3588s-nanopi-m6.dtsi | 142 ++++
 .../boot/dts/rockchip/rk3588s-nanopi-m6v1.dts      |  67 ++
 .../arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi | 792 --------------------
 .../arm64/boot/dts/rockchip/rk3588s-nanopi-r6c.dts |   1 +
 .../arm64/boot/dts/rockchip/rk3588s-nanopi-r6s.dts |   1 +
 arch/arm64/boot/dts/rockchip/rk3588s-nanopi.dtsi   | 800 +++++++++++++++++++++
 8 files changed, 1014 insertions(+), 793 deletions(-)

---
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
change-id: 20260701-nanopi-m6-ffeef7252fd7

Best regards,

Signature · 8 lines
Joachim Eastwood <[email protected]>



_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
#21 lore raw

Hi Jonas,

Quoted 20 lines · Jonas Karlman

Hi Joachim,

Quoted 9 lines · On 7/11/2026 12:11 AM, Joachim Eastwood via B4 Relay wrote:

This patch series add support for the NanoPi M6. This board is very similar to the NanoPi R6C and R6S boards which are already supported.

Main differences:
* M.2 M-key slot with PCIe (Also present on R6C)
* M.2 E-key slot with PCIe and USB (from hub)
* 1 additional USB 2.0 port from an on-board USB hub
* RT5616 audio CODEC

Quoted 6 lines

Patch 2 and 3 moves a bit code around. Please let me know if those two should be squashed together.
Next few patches adds some missing bits the common nanopi dtsi file. While the final patch adds support for NanoPi M6. Support for M6 has been split into two files one dtsi and one dts file. This is to make it easier to add support to the new M6V2 board at a later stage.

Quoted 8 lines

In my personal opinion I think it would make more sense to sort patches in following order:
- adding/fixing missing bits to the common nanopi-r6 dtsi
- extract M6/R6 common parts from nanopi-r6 dtsi to nanopi dtsi, nanopi-r6 dtsi includes the nanopi dtsi and no changes to dts files
- final parts that adds the M6 board

Should probably make it a little bit easier to cherry-pick and bisect.

If the additions/missing bits needs to backported I agree.
I'll cook up a patch set with the order you suggest. Thanks for the feedback.

best regards,
Joachim Eastwood

#22 lore raw

Hi Joachim,

Quoted 30 lines · Joachim Eastwood

Hi Jonas,

Quoted 27 lines · Jonas Karlman

Hi Joachim,

Quoted 9 lines · On 7/11/2026 12:11 AM, Joachim Eastwood via B4 Relay wrote:

This patch series add support for the NanoPi M6. This board is very similar to the NanoPi R6C and R6S boards which are already supported.

Main differences:
* M.2 M-key slot with PCIe (Also present on R6C)
* M.2 E-key slot with PCIe and USB (from hub)
* 1 additional USB 2.0 port from an on-board USB hub
* RT5616 audio CODEC

Quoted 6 lines

Patch 2 and 3 moves a bit code around. Please let me know if those two should be squashed together.
Next few patches adds some missing bits the common nanopi dtsi file. While the final patch adds support for NanoPi M6. Support for M6 has been split into two files one dtsi and one dts file. This is to make it easier to add support to the new M6V2 board at a later stage.

In my personal opinion I think it would make more sense to sort patches in following order:
- adding/fixing missing bits to the common nanopi-r6 dtsi
- extract M6/R6 common parts from nanopi-r6 dtsi to nanopi dtsi, nanopi-r6 dtsi includes the nanopi dtsi and no changes to dts files
- final parts that adds the M6 board

Quoted 3 lines
Quoted 1 line

Should probably make it a little bit easier to cherry-pick and bisect.

If the additions/missing bits needs to backported I agree.

There are consumers of DTs outside of Linux, e.g. U-Boot, that may need/want to cherry-pick patches/fixes, so such ordering should likely help for such use-cases.

Quoted 1 line

I'll cook up a patch set with the order you suggest. Thanks for the feedback.

Sounds good, thanks!

Regards,
Jonas

Quoted 4 lines

best regards,
Joachim Eastwood