From: Shawn Lin <shawn.lin@rock-chips.com>
To: Deomid rojer Ryabkov <rojer@rojer.me>, Heiko Stuebner <heiko@sntech.de>
Cc: shawn.lin@rock-chips.com, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
Sergey Bostandzhyan <jin@mediatomb.cc>,
Jensen Huang <jensenhuang@friendlyarm.com>
Subject: Re: [PATCH 2/2] arm64: dts: rockchip: Enable SDIO Wi-Fi on NanoPi R2S Plus
Date: Tue, 27 Oct 2026 21:58:07 +0800 [thread overview]
Message-ID: <38baaf87-4d5c-48bc-a11f-a5b6c04c20a8@rock-chips.com> (raw)
In-Reply-To: <20261023235959.2988087-3-rojer@rojer.me>
Hi Deomid
在 2026/10/24 星期六 7:59, Deomid rojer Ryabkov 写道:
> The NanoPi R2S Plus has an M.2 E-key slot wired to the sdmmc_ext
> controller in 4-bit SDIO mode, where FriendlyElec fit an optional
> Fn-Link 6222B-SRC (Realtek RTL8822CS) module:
>
> - SDIO signalling at a fixed 1.8V (VCC_18)
> - WIFI_REG_ON on GPIO3_B0, 32kHz sleep clock from the RK805 CLKOUT2
>
> Enable the controller and add the power sequence. The SDIO pins need
> 8mA drive strength for SDR104 tuning to succeed, as in the vendor
> device tree [1]; with the SoC default of 4mA no sample phase works.
>
> On boards without the module the controller gives up after about 0.2s
> ("mmc2: Failed to initialize a non-removable card"); nothing else is
> affected.
>
> With the mmc core change for the module's CMD11 handling at a fixed
> 1.8V [2], the module is tuned to SDR104 at 150 MHz and works with the
> rtw88_8822cs driver; without it, it runs in high-speed mode at 50 MHz.
>
> [1] https://github.com/friendlyarm/kernel-rockchip/blob/9238df9d21e835bba35c8ba5248784387936cb2e/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2-rev24.dts#L144-L172
> [2] https://lore.kernel.org/linux-mmc/20261023232813.2983368-1-rojer@rojer.me/
> Signed-off-by: Deomid rojer Ryabkov <rojer@rojer.me>
> ---
> .../dts/rockchip/rk3328-nanopi-r2s-plus.dts | 56 +++++++++++++++++++
> 1 file changed, 56 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts
> index 6ba4a74cb1f..db19a18ae45 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts
> @@ -17,6 +17,15 @@ / {
> aliases {
> mmc1 = &emmc;
> };
> +
> + sdio_pwrseq: sdio-pwrseq {
> + compatible = "mmc-pwrseq-simple";
> + clocks = <&rk805 1>;
> + clock-names = "ext_clock";
> + pinctrl-names = "default";
> + pinctrl-0 = <&wifi_reg_on_h>;
> + reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
> + };
> };
>
> &emmc {
> @@ -34,3 +43,50 @@ &io_domains {
> vccio4-supply = <&vcc_io_33>;
> vccio6-supply = <&vcc_18>;
> };
> +
> +&pinctrl {
> + wifi {
> + wifi_reg_on_h: wifi-reg-on-h {
> + rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> + };
> +};
> +
> +/*
> + * SDR104 tuning fails with the default 4mA drive strength, use 8mA like the
> + * vendor device tree.
> + */
> +&sdmmc0ext_bus4 {
> + rockchip,pins =
> + <3 RK_PA4 3 &pcfg_pull_up_8ma>,
> + <3 RK_PA5 3 &pcfg_pull_up_8ma>,
> + <3 RK_PA6 3 &pcfg_pull_up_8ma>,
> + <3 RK_PA7 3 &pcfg_pull_up_8ma>;
> +};
> +
> +&sdmmc0ext_clk {
> + rockchip,pins = <3 RK_PA2 3 &pcfg_pull_none_8ma>;
> +};
> +
> +&sdmmc0ext_cmd {
> + rockchip,pins = <3 RK_PA0 3 &pcfg_pull_up_8ma>;
> +};
> +
> +/* Optional M.2 E-key SDIO Wi-Fi module (Fn-Link 6222B-SRC, RTL8822CS) */
> +&sdmmc_ext {
> + bus-width = <4>;
> + cap-sd-highspeed;
> + cap-sdio-irq;
> + disable-wp;
Drop disable-wp.
Otherwise,
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
> + keep-power-in-suspend;
> + mmc-pwrseq = <&sdio_pwrseq>;
> + no-mmc;
> + no-sd;
> + non-removable;
> + pinctrl-names = "default";
> + pinctrl-0 = <&sdmmc0ext_clk &sdmmc0ext_cmd &sdmmc0ext_bus4>;
> + sd-uhs-sdr104;
> + vmmc-supply = <&vcc_io_33>;
> + vqmmc-supply = <&vcc_18>;
> + status = "okay";
> +};
next prev parent reply other threads:[~2026-10-27 13:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 23:59 [PATCH 0/2] arm64: dts: rockchip: NanoPi R2S Plus: fix io-domains, enable SDIO Wi-Fi Deomid rojer Ryabkov
2026-10-23 23:59 ` [PATCH 1/2] arm64: dts: rockchip: Fix VCCIO4/VCCIO6 supplies on NanoPi R2S Plus Deomid rojer Ryabkov
2026-10-23 23:59 ` [PATCH 2/2] arm64: dts: rockchip: Enable SDIO Wi-Fi " Deomid rojer Ryabkov
2026-10-27 13:58 ` Shawn Lin [this message]
2026-10-27 22:10 ` Deomid "rojer" Ryabkov
2026-10-30 23:23 ` Heiko Stuebner
2026-10-31 10:42 ` Deomid "rojer" Ryabkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38baaf87-4d5c-48bc-a11f-a5b6c04c20a8@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=jensenhuang@friendlyarm.com \
--cc=jin@mediatomb.cc \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh@kernel.org \
--cc=rojer@rojer.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®