* [PATCH] arm64: dts: rockchip: Enable Wi-Fi on the NanoPi M5
@ 2026-10-25 20:52 Leonard Lausen
2026-10-26 0:33 ` Shawn Lin
0 siblings, 1 reply; 3+ messages in thread
From: Leonard Lausen @ 2026-10-25 20:52 UTC (permalink / raw)
To: heiko
Cc: robh, krzk+dt, conor+dt, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Leonard Lausen
The NanoPi M5 has an M.2 E-key slot for SDIO Wi-Fi modules such as the
RTL8822CS-based AC200. The SDIO controller is disabled and the module's
power sequence is not described, preventing the card from enumerating.
Enable the controller in four-bit SDR104 mode and connect its 3.3 V card
and 1.8 V I/O supplies. Describe the active-low reset on GPIO1_C2, the
200 ms power-on delay used by the vendor device tree, and the external
32.768 kHz clock from the HYM8563 RTC. Keep the card powered during
suspend as required by the rtw88 SDIO driver.
Signed-off-by: Leonard Lausen <leonard@lausen.nl>
---
.../boot/dts/rockchip/rk3576-nanopi-m5.dts | 34 +++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
index 3a305408fa16c..bfa18de1ae1af 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
@@ -23,6 +23,7 @@ aliases {
ethernet0 = &gmac0;
ethernet1 = &gmac1;
mmc0 = &sdmmc;
+ mmc1 = &sdio;
};
chosen {
@@ -212,6 +213,16 @@ vcc_3v3_s0: regulator-vcc-3v3-s0 {
vin-supply = <&vcc_3v3_s3>;
};
+ sdio_pwrseq: sdio-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ clocks = <&hym8563>;
+ clock-names = "ext_clock";
+ pinctrl-0 = <&wifi_reg_on_h>;
+ pinctrl-names = "default";
+ post-power-on-delay-ms = <200>;
+ reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
+ };
+
sound {
compatible = "simple-audio-card";
pinctrl-names = "default";
@@ -855,6 +866,12 @@ pcie0_perstn: pcie0-perstn {
};
};
+ sdio-pwrseq {
+ wifi_reg_on_h: wifi-reg-on-h {
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
sdmmc {
sdmmc0_pwren_h: sdmmc0-pwren-h {
rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>;
@@ -890,6 +907,23 @@ &saradc {
status = "okay";
};
+&sdio {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cap-sdio-irq;
+ disable-wp;
+ keep-power-in-suspend;
+ mmc-pwrseq = <&sdio_pwrseq>;
+ no-mmc;
+ no-sd;
+ non-removable;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_3v3_s3>;
+ vqmmc-supply = <&vcc_1v8_s3>;
+
+ status = "okay";
+};
+
&sdmmc {
bus-width = <4>;
cap-sd-highspeed;
--
2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: Enable Wi-Fi on the NanoPi M5
2026-10-25 20:52 [PATCH] arm64: dts: rockchip: Enable Wi-Fi on the NanoPi M5 Leonard Lausen
@ 2026-10-26 0:33 ` Shawn Lin
2026-10-26 7:06 ` [PATCH v2] " Leonard Lausen
0 siblings, 1 reply; 3+ messages in thread
From: Shawn Lin @ 2026-10-26 0:33 UTC (permalink / raw)
To: Leonard Lausen
Cc: shawn.lin, robh, krzk+dt, conor+dt, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, heiko
在 2026/10/26 星期一 4:52, Leonard Lausen 写道:
> The NanoPi M5 has an M.2 E-key slot for SDIO Wi-Fi modules such as the
> RTL8822CS-based AC200. The SDIO controller is disabled and the module's
> power sequence is not described, preventing the card from enumerating.
>
> Enable the controller in four-bit SDR104 mode and connect its 3.3 V card
> and 1.8 V I/O supplies. Describe the active-low reset on GPIO1_C2, the
> 200 ms power-on delay used by the vendor device tree, and the external
> 32.768 kHz clock from the HYM8563 RTC. Keep the card powered during
> suspend as required by the rtw88 SDIO driver.
>
> Signed-off-by: Leonard Lausen <leonard@lausen.nl>
> ---
> .../boot/dts/rockchip/rk3576-nanopi-m5.dts | 34 +++++++++++++++++++
> 1 file changed, 34 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
> index 3a305408fa16c..bfa18de1ae1af 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
> @@ -23,6 +23,7 @@ aliases {
> ethernet0 = &gmac0;
> ethernet1 = &gmac1;
> mmc0 = &sdmmc;
> + mmc1 = &sdio;
> };
>
> chosen {
> @@ -212,6 +213,16 @@ vcc_3v3_s0: regulator-vcc-3v3-s0 {
> vin-supply = <&vcc_3v3_s3>;
> };
>
> + sdio_pwrseq: sdio-pwrseq {
> + compatible = "mmc-pwrseq-simple";
> + clocks = <&hym8563>;
> + clock-names = "ext_clock";
> + pinctrl-0 = <&wifi_reg_on_h>;
> + pinctrl-names = "default";
> + post-power-on-delay-ms = <200>;
> + reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
> + };
> +
> sound {
> compatible = "simple-audio-card";
> pinctrl-names = "default";
> @@ -855,6 +866,12 @@ pcie0_perstn: pcie0-perstn {
> };
> };
>
> + sdio-pwrseq {
> + wifi_reg_on_h: wifi-reg-on-h {
> + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> + };
> +
> sdmmc {
> sdmmc0_pwren_h: sdmmc0-pwren-h {
> rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>;
> @@ -890,6 +907,23 @@ &saradc {
> status = "okay";
> };
>
> +&sdio {
> + bus-width = <4>;
> + cap-sd-highspeed;
> + cap-sdio-irq;
> + disable-wp;
disable-wp is for sd cards, please drop it.
> + keep-power-in-suspend;
> + mmc-pwrseq = <&sdio_pwrseq>;
> + no-mmc;
> + no-sd;
> + non-removable;
> + sd-uhs-sdr104;
> + vmmc-supply = <&vcc_3v3_s3>;
> + vqmmc-supply = <&vcc_1v8_s3>;
> +
> + status = "okay";
> +};
> +
> &sdmmc {
> bus-width = <4>;
> cap-sd-highspeed;
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] arm64: dts: rockchip: Enable Wi-Fi on the NanoPi M5
2026-10-26 0:33 ` Shawn Lin
@ 2026-10-26 7:06 ` Leonard Lausen
0 siblings, 0 replies; 3+ messages in thread
From: Leonard Lausen @ 2026-10-26 7:06 UTC (permalink / raw)
To: Shawn Lin, Heiko Stuebner
Cc: leonard, robh, krzk+dt, conor+dt, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
The NanoPi M5 has an M.2 E-key slot for SDIO Wi-Fi modules such as the
RTL8822CS-based AC200. The SDIO controller is disabled and the module's
power sequence is not described, preventing the card from enumerating.
Enable the controller in four-bit SDR104 mode and connect its 3.3 V card
and 1.8 V I/O supplies. Describe the active-low reset on GPIO1_C2, the
200 ms power-on delay used by the vendor device tree, and the external
32.768 kHz clock from the HYM8563 RTC. Keep the card powered during
suspend as required by the rtw88 SDIO driver.
The SDIO wiring and reset timing are based on FriendlyElec's NanoPi M5
vendor device tree by jensen <jensenhuang@friendlyarm.com>.
Link: https://github.com/friendlyarm/kernel-rockchip/commit/6f07f3e0b7ec54be90ae30f097d2a9d5aea80974
Assisted-by: LLM
Signed-off-by: Leonard Lausen <leonard@lausen.nl>
---
Hi Shawn,
> disable-wp is for sd cards, please drop it.
Thank you. Dropped it from the SDIO controller in v2.
This was mistakenly copied from vendor source.
Changes in v2:
- Drop disable-wp from the SDIO controller (Shawn Lin).
- Credit the original vendor source and document AI assistance.
AI assistance was used to inspect the vendor DTS and schematics, draft
the DTS changes and commit message, and run build/style checks.
.../boot/dts/rockchip/rk3576-nanopi-m5.dts | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
index 3a305408fa16c..baf1dea2cfa98 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-nanopi-m5.dts
@@ -23,6 +23,7 @@ aliases {
ethernet0 = &gmac0;
ethernet1 = &gmac1;
mmc0 = &sdmmc;
+ mmc1 = &sdio;
};
chosen {
@@ -212,6 +213,16 @@ vcc_3v3_s0: regulator-vcc-3v3-s0 {
vin-supply = <&vcc_3v3_s3>;
};
+ sdio_pwrseq: sdio-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ clocks = <&hym8563>;
+ clock-names = "ext_clock";
+ pinctrl-0 = <&wifi_reg_on_h>;
+ pinctrl-names = "default";
+ post-power-on-delay-ms = <200>;
+ reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
+ };
+
sound {
compatible = "simple-audio-card";
pinctrl-names = "default";
@@ -855,6 +866,12 @@ pcie0_perstn: pcie0-perstn {
};
};
+ sdio-pwrseq {
+ wifi_reg_on_h: wifi-reg-on-h {
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
sdmmc {
sdmmc0_pwren_h: sdmmc0-pwren-h {
rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>;
@@ -890,6 +907,22 @@ &saradc {
status = "okay";
};
+&sdio {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cap-sdio-irq;
+ keep-power-in-suspend;
+ mmc-pwrseq = <&sdio_pwrseq>;
+ no-mmc;
+ no-sd;
+ non-removable;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_3v3_s3>;
+ vqmmc-supply = <&vcc_1v8_s3>;
+
+ status = "okay";
+};
+
&sdmmc {
bus-width = <4>;
cap-sd-highspeed;
base-commit: ae965b9856f033145e292b0c29082a26bcc45efd
--
2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-26 7:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-25 20:52 [PATCH] arm64: dts: rockchip: Enable Wi-Fi on the NanoPi M5 Leonard Lausen
2026-10-26 0:33 ` Shawn Lin
2026-10-26 7:06 ` [PATCH v2] " Leonard Lausen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®