Continuing 4.19.5 kernel based Debian snapshot image release for HiKey960 here.
So far I’ve found that 4-bit mode typically hung on while uploading firmware to the wlan chip.
I have docker ethernet interface, wlan interface, bonding driver. NetworkManager is trying to initialize some interfaces on boot. Wlan interface is attempted first (based on its MAC), it is successfully inited (including downloading firmware). Then, wlan interface going down and wl18xx is de-inited. Soon after that another interface is inited. I have no idea what is that interface, its MAC is random. In this case, wlcore driver is trying to download firmware again and stuck. Here is the kernel stack (boot ran till login):
[<0>] wl12xx_sdio_raw_write+0x108/0x1d0 [wlcore_sdio]
[<0>] wlcore_boot_upload_firmware+0x1cc/0x4b8 [wlcore]
[<0>] wl18xx_boot+0x7d4/0xc00 [wl18xx]
[<0>] wl1271_op_add_interface+0x844/0x9c8 [wlcore]
[<0>] drv_add_interface+0x34/0x88 [mac80211]
[<0>] ieee80211_do_open+0x220/0x800 [mac80211]
[<0>] ieee80211_open+0x48/0x60 [mac80211]
I’ve tried to enable logging in wlcore_boot_upload_firmware (changed debug logs to info) and this seems fixed the issue. So, I assume it is some timing or race condition issue.
BTW, I’ve measured wifi bandwidth with iperf. It is ~3x of original speed (~50Mbps instead of ~17). Perhaps there should be tweaks needed in wl18xx configuration to reach 4x. Or maybe, the sdio clock maybe need to be increased to 50MHz.
I’m not actually sure that the issue is with wlcore/wx18xx drivers, pehaps SDIO driver have some issue. Refer the Console access without USB-TTY or network - boot hangs on if SD card is inserted into a slot. This issue is persist on my board.
If anyone have an idea what can I debug further to get the actual root cause - you’re welcome to comment.