Skip to contentSkip to conversation

arm64: dts: hikey: Define wl1835 power capabilities

PATCH Applied Ryan Grachek 6 participants 9 messages Jun 13, 2018 – Jun 28, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: hikey: Define wl1835 power capabilities

These properties are required for compatibility with runtime PM. Without these properties, MMC host controller will not be aware of power capabilities. When the wlcore driver attempts to power on the device, it will erroneously fail with -EACCES.

---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +2 -0
index 38f881955217..c5feca8cd10b 100644
@@ -323,6 +323,8 @@
 			bus-width = <0x4>;
 			cap-sd-highspeed;
 			non-removable;
+			cap-power-off-card;
+			keep-power-in-suspend;
 			vmmc-supply = <&reg_vdd_3v3>;
 			mmc-pwrseq = <&wl1835_pwrseq>;
 
Signature · 1 line
2.11.0
#1 lore raw

Hi,

Quoted 5 lines · Ryan Grachek

These properties are required for compatibility with runtime PM. Without these properties, MMC host controller will not be aware of power capabilities. When the wlcore driver attempts to power on the device, it will erroneously fail with -EACCES.

I don't have a hikey620 to test this, but the hikey960 is suffering from the same issue (see [1]). I added these properties to the dwmmc2 node of the hikey960 (see snippet) and wlan0 does show up. Would you mind sending a similar patch for that board ?

Thanks !

Valentin

[1]: https://lkml.org/lkml/2018/6/12/930

--->8

arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts +2 -0
index 85aadf1b..c706f70 100644
@@ -613,6 +613,8 @@
        vmmc-supply = <&wlan_en>;
        ti,non-removable;
        non-removable;
+       cap-power-off-card;
+       keep-power-in-suspend;
        #address-cells = <0x1>;
        #size-cells = <0x0>;
        status = "ok";
#2 lore raw

Hi Valentin,

Quoted 27 lines · Valentin Schneider

Hi,

Quoted 5 lines · Ryan Grachek

These properties are required for compatibility with runtime PM. Without these properties, MMC host controller will not be aware of power capabilities. When the wlcore driver attempts to power on the device, it will erroneously fail with -EACCES.

I don't have a hikey620 to test this, but the hikey960 is suffering from the same issue (see [1]). I added these properties to the dwmmc2 node of the hikey960 (see snippet) and wlan0 does show up. Would you mind sending a similar patch for that board ?

Thanks !

Valentin

[1]: https://lkml.org/lkml/2018/6/12/930

--->8

arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts +0 -0
index 85aadf1b..c706f70 100644

arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts line 620

Quoted 8 lines
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts +2 -0
@@ -613,6 +613,8 @@
        vmmc-supply = <&wlan_en>;
        ti,non-removable;
        non-removable;
+       cap-power-off-card;
+       keep-power-in-suspend;
        #address-cells = <0x1>;
        #size-cells = <0x0>;
        status = "ok";

Not a problem. The patch can be found here:
https://patchwork.kernel.org/patch/10462767/

Ryan

Tested-by Acked-by on v1 1/1
#3 lore raw
In reply to Ryan Grachek
Quoted 6 lines · Ryan Grachek

These properties are required for compatibility with runtime PM. Without these properties, MMC host controller will not be aware of power capabilities. When the wlcore driver attempts to power on the device, it will erroneously fail with -EACCES.

Fixes 60f36637bbbd ("wlcore: sdio: allow pm to handle sdio power")

Wei Xu: This fixes a functional regression with wifi on the HiKey board that was introduced in 4.18-rc with commit 60f36637bbbd ("wlcore: sdio: allow pm to handle sdio power").

Could you please be sure to queue this for the 4.18-rc ?

thanks
-john

#4 lore raw
Quoted 12 lines · John Stultz
Quoted 6 lines · Ryan Grachek

These properties are required for compatibility with runtime PM. Without these properties, MMC host controller will not be aware of power capabilities. When the wlcore driver attempts to power on the device, it will erroneously fail with -EACCES.

Fixes 60f36637bbbd ("wlcore: sdio: allow pm to handle sdio power")
Quoted 5 lines

Wei Xu: This fixes a functional regression with wifi on the HiKey board that was introduced in 4.18-rc with commit 60f36637bbbd ("wlcore: sdio: allow pm to handle sdio power").

Could you please be sure to queue this for the 4.18-rc ?

Adding linux-wireless so that wireless folks are aware of this wlcore regression fix as well.

Signature · 1 line
Kalle Valo
#5 lore raw
Quoted 11 lines
Quoted 11 lines
Quoted 6 lines

These properties are required for compatibility with runtime PM. Without these properties, MMC host controller will not be aware of power capabilities. When the wlcore driver attempts to power on the device, it will erroneously fail with -EACCES.

Fixes 60f36637bbbd ("wlcore: sdio: allow pm to handle sdio power")
Quoted 9 lines
Quoted 5 lines

Wei Xu: This fixes a functional regression with wifi on the HiKey board that was introduced in 4.18-rc with commit 60f36637bbbd ("wlcore: sdio: allow pm to handle sdio power").

Could you please be sure to queue this for the 4.18-rc ?

Adding linux-wireless so that wireless folks are aware of this wlcore regression fix as well.

Actually "cap-power-off-card" is normally included with all .dts files supporting wilink So it should have been there from the start for this board as well.
It probably worked without it due to the explicit call to mmc_power_restore_host() that was there as an old workaround for trying to control the power explicitly from the driver which was actually causing other failures on suspend/resume as the mmc layer already power the module on resume.
"keep-power-in-suspend" is needed in case of planning to use "WoWLAN":
Iw phy0 wowlan enable....

Best Regards,
Eyal

#6 lore raw
In reply to John Stultz
Quoted 8 lines · John Stultz
Quoted 6 lines · Ryan Grachek

These properties are required for compatibility with runtime PM. Without these properties, MMC host controller will not be aware of power capabilities. When the wlcore driver attempts to power on the device, it will erroneously fail with -EACCES.

Quoted 7 lines
Fixes 60f36637bbbd ("wlcore: sdio: allow pm to handle sdio power")

Wei Xu: This fixes a functional regression with wifi on the HiKey board that was introduced in 4.18-rc with commit 60f36637bbbd ("wlcore: sdio: allow pm to handle sdio power").

Wei Xu: Just wanted to follow up to make sure this wasn't missed for 4.18-rc, as I haven't seen it upstream or in -next, and it fixes a recently introduced regression.

thanks
-john

maintainer
#7 lore raw

Hi John,

Quoted 13 lines · John Stultz
Quoted 12 lines · John Stultz
Quoted 6 lines · Ryan Grachek

These properties are required for compatibility with runtime PM. Without these properties, MMC host controller will not be aware of power capabilities. When the wlcore driver attempts to power on the device, it will erroneously fail with -EACCES.

Fixes 60f36637bbbd ("wlcore: sdio: allow pm to handle sdio power")
Quoted 7 lines
Quoted 3 lines

Wei Xu: This fixes a functional regression with wifi on the HiKey board that was introduced in 4.18-rc with commit 60f36637bbbd ("wlcore: sdio: allow pm to handle sdio power").

Wei Xu: Just wanted to follow up to make sure this wasn't missed for 4.18-rc, as I haven't seen it upstream or in -next, and it fixes a recently introduced regression.

Thanks!
I will send out the fix pull request in these two days if no problem.

Best Regards,
Wei

Quoted 6 lines

thanks
-john

.

maintainer Applied
#8 lore raw
In reply to Ryan Grachek

Hi Ryan,

Quoted 7 lines · Ryan Grachek

These properties are required for compatibility with runtime PM. Without these properties, MMC host controller will not be aware of power capabilities. When the wlcore driver attempts to power on the device, it will erroneously fail with -EACCES.

---

Applied to hisilicon fix tree.
Thanks!

Best Regards,
Wei

Quoted 17 lines
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +2 -0
index 38f881955217..c5feca8cd10b 100644
@@ -323,6 +323,8 @@
 			bus-width = <0x4>;
 			cap-sd-highspeed;
 			non-removable;
+			cap-power-off-card;
+			keep-power-in-suspend;
 			vmmc-supply = <&reg_vdd_3v3>;
 			mmc-pwrseq = <&wl1835_pwrseq>;