Re: [PATCH] arm64: dts: hikey: Give wifi some time after power-on

From: Jan Kiszka
Date: Sun Jan 06 2019 - 04:53:54 EST

On 03.01.19 22:32, Ulf Hansson wrote:
On Wed, 2 Jan 2019 at 23:21, John Stultz <john.stultz@xxxxxxxxxx> wrote:

Adding a few folks to cc from the thread here:

As this sounds like a very similar issue.

John, thanks for looping me in.

On Sun, Dec 30, 2018 at 3:38 AM Jan Kiszka <jan.kiszka@xxxxxx> wrote:

From: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>

Somewhere along recent changes to power control of the wl1835, power-on
became very unreliable on the hikey, failing like this:

wl1271_sdio: probe of mmc2:0001:1 failed with error -16
wl1271_sdio: probe of mmc2:0001:2 failed with error -16

After playing with some dt parameters and comparing to other users of
this chip, it turned out we need some power-on delay to make things
stable again. In contrast to those other users which define 200 ms, the
hikey is already very happy with 1 ms.

According to the discussions we had so far, this doesn't sound like
the correct solution.

I am intending to post patch soon, however, I am not sure exactly what
solution to pick yet. I will keep you on cc - and of course I
appreciate if you could help to test.

FWIW, the Ultra96 is also affected. Here I worked around it by using a 10 ms power-on delay. The original workaround from the other thread did not help. Looking forward to the proper fix now!


Kind regards

Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>

Tested with 4.19 and linus/master.

arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
index f4964bee6a1a..1e771bf201b9 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
@@ -118,6 +118,7 @@
reset-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
clocks = <&pmic>;
clock-names = "ext_clock";
+ post-power-on-delay-ms = <1>;
power-off-delay-us = <10>;