* [PATCH 0/2] arm64: dts: imx8mn-bsh-smm-s2/pro: improve SDIO Wi-Fi power management
@ 2026-11-25 9:48 Waldemar Rymarkiewicz
2026-11-25 9:48 ` [PATCH 1/2] arm64: dts: imx8mn-bsh-smm-s2/pro: allow powering off SDIO Wi-Fi card Waldemar Rymarkiewicz
2026-11-25 9:48 ` [PATCH 2/2] arm64: dts: imx8mn-bsh-smm-s2/pro: keep SDIO Wi-Fi powered during suspend Waldemar Rymarkiewicz
0 siblings, 2 replies; 4+ messages in thread
From: Waldemar Rymarkiewicz @ 2026-11-25 9:48 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Frank Li,
Sascha Hauer
Cc: Shawn Guo, Waldemar Rymarkiewicz, devicetree, imx,
linux-arm-kernel, Waldemar Rymarkiewicz
Configure the usdhc2 SDIO controller on imx8mn-bsh-smm-s2/pro boards so the
MMC core can properly power-cycle the onboard Broadcom Wi-Fi module at
runtime while preserving card power across system suspend when requested
by the driver.
Patch 1 adds cap-power-off-card to allow the MMC core to power down the
SDIO card via mmc-pwrseq when power retention is not kept (such as when
the driver does not request MMC_PM_KEEP_POWER, on unbind, or during card
reset/power-off).
Patch 2 keeps the SDIO card powered during system suspend so the Wi-Fi
firmware state is preserved across suspend/resume cycles.
Kaiwen Zhang (1):
arm64: dts: imx8mn-bsh-smm-s2/pro: allow powering off SDIO Wi-Fi card
Michael Trimarchi (1):
arm64: dts: imx8mn-bsh-smm-s2/pro: keep SDIO Wi-Fi powered during
suspend
arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi | 2 ++
1 file changed, 2 insertions(+)
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] arm64: dts: imx8mn-bsh-smm-s2/pro: allow powering off SDIO Wi-Fi card
2026-11-25 9:48 [PATCH 0/2] arm64: dts: imx8mn-bsh-smm-s2/pro: improve SDIO Wi-Fi power management Waldemar Rymarkiewicz
@ 2026-11-25 9:48 ` Waldemar Rymarkiewicz
2026-11-25 9:48 ` [PATCH 2/2] arm64: dts: imx8mn-bsh-smm-s2/pro: keep SDIO Wi-Fi powered during suspend Waldemar Rymarkiewicz
1 sibling, 0 replies; 4+ messages in thread
From: Waldemar Rymarkiewicz @ 2026-11-25 9:48 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Frank Li,
Sascha Hauer
Cc: Shawn Guo, Waldemar Rymarkiewicz, devicetree, imx,
linux-arm-kernel, Kaiwen Zhang
From: Kaiwen Zhang <kaiwen.zhang@cn.bosch.com>
Add the cap-power-off-card property to the usdhc2 node so the MMC core
can power down the onboard SDIO Wi-Fi module via mmc-pwrseq during
runtime suspend, driver unbind, or card reset instead of leaving
it continuously powered.
Signed-off-by: Kaiwen Zhang <kaiwen.zhang@cn.bosch.com>
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@gmail.com>
---
arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi
index d20393c2d901..67c4f3e364eb 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi
@@ -263,6 +263,7 @@ &usdhc2 {
mmc-pwrseq = <&usdhc2_pwrseq>;
bus-width = <4>;
non-removable;
+ cap-power-off-card;
status = "okay";
brcmf: wifi@1 {
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] arm64: dts: imx8mn-bsh-smm-s2/pro: keep SDIO Wi-Fi powered during suspend
2026-11-25 9:48 [PATCH 0/2] arm64: dts: imx8mn-bsh-smm-s2/pro: improve SDIO Wi-Fi power management Waldemar Rymarkiewicz
2026-11-25 9:48 ` [PATCH 1/2] arm64: dts: imx8mn-bsh-smm-s2/pro: allow powering off SDIO Wi-Fi card Waldemar Rymarkiewicz
@ 2026-11-25 9:48 ` Waldemar Rymarkiewicz
2026-11-25 9:59 ` sashiko-bot
1 sibling, 1 reply; 4+ messages in thread
From: Waldemar Rymarkiewicz @ 2026-11-25 9:48 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Frank Li,
Sascha Hauer
Cc: Shawn Guo, Waldemar Rymarkiewicz, devicetree, imx,
linux-arm-kernel, Michael Trimarchi
From: Michael Trimarchi <michael@amarulasolutions.com>
Add the keep-power-in-suspend property to the usdhc2 node so the onboard
SDIO Wi-Fi module retains power across system suspend instead of
being powered down and re-initialized on resume.
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@gmail.com>
---
arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi
index 67c4f3e364eb..dee126fbf4e2 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi
@@ -264,6 +264,7 @@ &usdhc2 {
bus-width = <4>;
non-removable;
cap-power-off-card;
+ keep-power-in-suspend;
status = "okay";
brcmf: wifi@1 {
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] arm64: dts: imx8mn-bsh-smm-s2/pro: keep SDIO Wi-Fi powered during suspend
2026-11-25 9:48 ` [PATCH 2/2] arm64: dts: imx8mn-bsh-smm-s2/pro: keep SDIO Wi-Fi powered during suspend Waldemar Rymarkiewicz
@ 2026-11-25 9:59 ` sashiko-bot
0 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-11-25 9:59 UTC (permalink / raw)
To: Waldemar Rymarkiewicz; +Cc: devicetree, imx, robh, conor+dt, Frank.Li
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] arm64: dts: imx8mn-bsh-smm-s2: cap-power-off-card defeats
keep-power-in-suspend
--
commit 088cbe9bdf022869f185b3a15de5fbebcc1d6394
Author: Michael Trimarchi <michael@amarulasolutions.com>
arm64: dts: imx8mn-bsh-smm-s2/pro: keep SDIO Wi-Fi powered during suspend
This commit adds the keep-power-in-suspend property to the usdhc2 node on
the i.MX8MN BSH SMM S2 and S2 PRO boards.
> diff --git a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi
> index 8dee56299cff4..917ef96774988 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi
> @@ -264,6 +264,7 @@ &usdhc2 {
> bus-width = <4>;
> non-removable;
> cap-power-off-card;
> + keep-power-in-suspend;
[Severity: Medium]
Does leaving cap-power-off-card set on usdhc2 prevent
keep-power-in-suspend from keeping the brcmfmac SDIO Wi-Fi card powered
across suspend?
keep-power-in-suspend only sets MMC_PM_KEEP_POWER in host->pm_caps, while
mmc_sdio_suspend() checks host->pm_flags, which must be requested by the
SDIO function driver on each suspend. In brcmfmac:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:brcmf_ops_sdio_suspend() {
...
cap_power_off = !!(func->card->host->caps & MMC_CAP_POWER_OFF_CARD);
...
if (sdiodev->wowl_enabled || !cap_power_off) {
...
sdio_flags = MMC_PM_KEEP_POWER;
...
return sdio_set_host_pm_flags(sdiodev->func1, sdio_flags);
} else {
/* power will be cut so remove device, probe again in resume */
brcmf_sdiod_intr_unregister(sdiodev);
err = brcmf_sdiod_remove(sdiodev);
...
}
}
Because cap-power-off-card sets MMC_CAP_POWER_OFF_CARD, any suspend where
WoWLAN is not enabled takes the else branch, removes the device without
setting MMC_PM_KEEP_POWER in host->pm_flags, and causes
mmc_sdio_suspend() to cut card power and re-initialize the module on
resume. Should cap-power-off-card be removed here?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261125094825.3873696-1-external.Waldemar.Rymarkiewicz@bshg.com?part=2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-25 9:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 9:48 [PATCH 0/2] arm64: dts: imx8mn-bsh-smm-s2/pro: improve SDIO Wi-Fi power management Waldemar Rymarkiewicz
2026-11-25 9:48 ` [PATCH 1/2] arm64: dts: imx8mn-bsh-smm-s2/pro: allow powering off SDIO Wi-Fi card Waldemar Rymarkiewicz
2026-11-25 9:48 ` [PATCH 2/2] arm64: dts: imx8mn-bsh-smm-s2/pro: keep SDIO Wi-Fi powered during suspend Waldemar Rymarkiewicz
2026-11-25 9:59 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox