* [PATCH] arm64: dts: allwinner: rg35xx: keep RTL8821CS powered during suspend
@ 2026-11-17 9:20 Yang Siyuan
2026-11-17 9:27 ` sashiko-bot
2026-11-17 9:45 ` [PATCH v2] " Yang Siyuan
0 siblings, 2 replies; 3+ messages in thread
From: Yang Siyuan @ 2026-11-17 9:20 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: Jernej Skrabec, Samuel Holland, linux-arm-kernel, linux-sunxi,
devicetree, linux-kernel
The RTL8821CS SDIO WiFi on the RG35XX Plus/SP is soldered and powered by
CLDO4. rtw88's SDIO suspend callback asks the MMC host to keep power
during system suspend:
rtw88_8821cs mmc1:0001:1: Failed to host PM flag MMC_PM_KEEP_POWER
sdio_set_host_pm_flags() only accepts MMC_PM_KEEP_POWER when the host's
pm_caps contains it, and mmc_of_parse() sets that flag from the
"keep-power-in-suspend" DT property. Without it, the first s2idle
suspend aborts with -EINVAL before the system can enter suspend.
Add keep-power-in-suspend to &mmc1 so the WiFi stays powered and s2idle
works. Tested on an Anbernic RG35XX-SP: the board suspends and resumes
from the lid switch, and the WiFi reconnects after resume.
Signed-off-by: Yang Siyuan <hsyysy@163.com>
---
.../boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-plus.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-plus.dts
index 60a8e49..ceb25a3 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-plus.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-plus.dts
@@ -27,6 +27,8 @@
mmc-pwrseq = <&wifi_pwrseq>;
bus-width = <4>;
non-removable;
+ /* rtw88's SDIO suspend requires MMC_PM_KEEP_POWER. */
+ keep-power-in-suspend;
status = "okay";
sdio_wifi: wifi@1 {
base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
--
2.56.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: allwinner: rg35xx: keep RTL8821CS powered during suspend
2026-11-17 9:20 [PATCH] arm64: dts: allwinner: rg35xx: keep RTL8821CS powered during suspend Yang Siyuan
@ 2026-11-17 9:27 ` sashiko-bot
2026-11-17 9:45 ` [PATCH v2] " Yang Siyuan
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-11-17 9:27 UTC (permalink / raw)
To: Yang Siyuan; +Cc: linux-sunxi, devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] arm64: dts: allwinner: missing Fixes trailer on RG35XX-Plus
suspend fix
--
commit 6bc1ccf6bdee4d4322a5c25361fc4b5c6087cce2
Author: Yang Siyuan <hsyysy@163.com>
> arm64: dts: allwinner: rg35xx: keep RTL8821CS powered during suspend
>
> The RTL8821CS SDIO WiFi on the RG35XX Plus/SP is soldered and powered by
> CLDO4. rtw88's SDIO suspend callback asks the MMC host to keep power
> during system suspend:
>
> rtw88_8821cs mmc1:0001:1: Failed to host PM flag MMC_PM_KEEP_POWER
>
> sdio_set_host_pm_flags() only accepts MMC_PM_KEEP_POWER when the host's
> pm_caps contains it, and mmc_of_parse() sets that flag from the
> "keep-power-in-suspend" DT property. Without it, the first s2idle
> suspend aborts with -EINVAL before the system can enter suspend.
>
> Add keep-power-in-suspend to &mmc1 so the WiFi stays powered and s2idle
> works. Tested on an Anbernic RG35XX-SP: the board suspends and resumes
> from the lid switch, and the WiFi reconnects after resume.
>
> Signed-off-by: Yang Siyuan <hsyysy@163.com>
[Severity: Low]
Since this fixes broken s2idle suspend on the RG35XX Plus/H/SP boards
where &mmc1 was introduced without keep-power-in-suspend, should this
include:
Fixes: 398e5fdf60ed ("arm64: dts: allwinner: h700: Add RG35XX-Plus DTS")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261117092024.12163-1-hsyysy@163.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] arm64: dts: allwinner: rg35xx: keep RTL8821CS powered during suspend
2026-11-17 9:20 [PATCH] arm64: dts: allwinner: rg35xx: keep RTL8821CS powered during suspend Yang Siyuan
2026-11-17 9:27 ` sashiko-bot
@ 2026-11-17 9:45 ` Yang Siyuan
1 sibling, 0 replies; 3+ messages in thread
From: Yang Siyuan @ 2026-11-17 9:45 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: Jernej Skrabec, Samuel Holland, linux-arm-kernel, linux-sunxi,
devicetree, linux-kernel
The RTL8821CS SDIO WiFi on the RG35XX Plus/SP is soldered and powered by
CLDO4. rtw88's SDIO suspend callback asks the MMC host to keep power
during system suspend:
rtw88_8821cs mmc1:0001:1: Failed to host PM flag MMC_PM_KEEP_POWER
sdio_set_host_pm_flags() only accepts MMC_PM_KEEP_POWER when the host's
pm_caps contains it, and mmc_of_parse() sets that flag from the
"keep-power-in-suspend" DT property. Without it, the first s2idle
suspend aborts with -EINVAL before the system can enter suspend.
Add keep-power-in-suspend to &mmc1 so the WiFi stays powered and s2idle
works. Tested on an Anbernic RG35XX-SP: the board suspends and resumes
from the lid switch, and the WiFi reconnects after resume.
Fixes: 398e5fdf60ed ("arm64: dts: allwinner: h700: Add RG35XX-Plus DTS")
Signed-off-by: Yang Siyuan <hsyysy@163.com>
---
Changes in v2:
- Add the Fixes tag suggested by Sashiko.
.../boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-plus.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-plus.dts
index 60a8e49..ceb25a3 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-plus.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-plus.dts
@@ -27,6 +27,8 @@
mmc-pwrseq = <&wifi_pwrseq>;
bus-width = <4>;
non-removable;
+ /* rtw88's SDIO suspend requires MMC_PM_KEEP_POWER. */
+ keep-power-in-suspend;
status = "okay";
sdio_wifi: wifi@1 {
base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
--
2.56.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-17 9:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 9:20 [PATCH] arm64: dts: allwinner: rg35xx: keep RTL8821CS powered during suspend Yang Siyuan
2026-11-17 9:27 ` sashiko-bot
2026-11-17 9:45 ` [PATCH v2] " Yang Siyuan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox