sdio_reset_comm issues with BCM4343W (6sl/4.1.15)

cancel
Showing results for 
Search instead for 
Did you mean: 

sdio_reset_comm issues with BCM4343W (6sl/4.1.15)

2,595 Views
jayakumar2
Contributor V

Hi,

I'm using a BCM4343W wifi chip with 6sl running Linux 4.1.15. I'm able to have bootup communication with the BCM4343W but when I try to turn on the interface (ifconfig wlan0 up), I get a -110 (ETIMEDOUT) failure associated with SD_IO_SEND_OP_COND.

I have tried varying my dts settings in case they were related. I originally had:

&usdhc3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc3>;
no-1-8-v;
non-removable;
pm-ignore-notify;
bus-width = <4>;
vmmc-supply = <&wlreg_on>;
keep-power-in-suspend;
enable-sdio-wakeup;
status = "okay";
needs-special-hs-handling;
wifi-host;
};

and have tried taking out parameters one at a time to see if any have an effect. The bare minimum to detect the chip and have the driver load was:

&usdhc3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc3>;
wifi-host;
status = "okay";

bus-width = <4>;
vmmc-supply = <&wlreg_on>;
};

The failure remains the same for that.

root@imx6slevk:~# ifconfig wlan0 up

Dongle Host Driver, version 1.141.92 (r)
Compiled in drivers/net/wireless/bcmdhd
wl_android_wifi_on in
mmc_send_io_op_cond: err=-110
sdio_reset_comm:801: err=-110
mmc2: Error resetting SDIO communications (-110)
sdioh_start Failed, error = -110

failed to power up wifi chip, retry again (4 left) **, ret=-110

mmc_send_io_op_cond: err=-110
sdio_reset_comm:801: err=-110
mmc2: Error resetting SDIO communications (-110)
sdioh_start Failed, error = -110

failed to power up wifi chip, retry again (3 left) **, ret=-110

...

failed to power up wifi chip, max retry reached **

dhd_open : wl_android_wifi_on failed (-110)
wl_android_wifi_off in
ifconfig: SIOCSIFFLAGS: Operation not permitted

I tried to narrow down the cause further.

The start of the problem comes from drivers/net/wireless/bcmdhd/wl_android.c:int wl_android_wifi_on(struct net_device *dev)

...
do {
dhd_net_wifi_platform_set_power(dev, TRUE, WIFI_TURNON_DELAY);
#ifdef BCMSDIO
ret = dhd_net_bus_resume(dev, 0);
#endif

The dhd_net_bus_resume is failing with -110 (etimedout) because it calls sdioh_start() which fails when calling sdio_reset_comm. The debug shows the callstack is:

mmc_send_io_op_cond: err=-110
sdio_reset_comm:801: err=-110
mmc2: Error resetting SDIO communications (-110)
sdioh_start Failed, error = -110

The call to sdio_reset_comm has this comment:

/* Since the power to the chip is killed, we will have
re enumerate the device again. Set the block size
and enable the fucntion 1 for in preparation for
downloading the code
*/
/* sdio_reset_comm() - has been fixed in latest kernel/msm.git for Linux
2.6.27. The implementation prior to that is buggy, and needs broadcom's
patch for it
*/
if ((ret = sdio_reset_comm(sd->func[0]->card))) {
sd_err(("%s Failed, error = %d\n", __FUNCTION__, ret));
return ret;
}

I tried to debug sdio_reset_comm further and it fails due to:

err = mmc_send_io_op_cond(host, 0, &ocr);

That gives -etimedout.

Based on that, I think what's happening is that the host is sending SD_IO_SEND_OP_COND which is SDIO command CMD5 and that command is timing out. But I have not yet worked out why this is happening.

I would welcome any ideas or suggestions.

Thanks!

Labels (2)
Tags (1)
0 Kudos
6 Replies

549 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Jaya

cmd5 is specific vendor command, so one can check if necessary for that chip
firmware is used, please look at Broadcom firmware packages mentioned on
https://community.nxp.com/thread/456225

additional help may be requested fromMurata support link
wireless.murata.com/eng/products/rf-modules-1/wi-fi-bluetooth-for-freescale-i-mx.html

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

549 Views
jayakumar2
Contributor V

Hi Igor,

Thanks for your reply. You wrote "cmd5 is specific vendor command". I don't really follow this part. According to what I've found it is not a vendor specific command:

"
The function of CMD5 for SDIO cards is similar to the operation of
ACMD41 for SD memory cards. It is used to inquire about the voltage
range needed by the I/O card.
"

Since the error we're getting is in response to
SD_IO_SEND_OP_COND/CMD5, it makes me suspicious if the root cause
might be due to VBAT voltage. I noticed the 7d warp dts used a 5V
voltage setting (even though the 1dx datasheet says max 4.8V).

Previously, our dts had:
                wlreg_on: fixedregulator@100 {
                        compatible = "regulator-fixed";
                        regulator-min-microvolt = <3300000>;
                        regulator-max-microvolt = <3300000>;

After I changed our dts to also say 5V:

                wlreg_on: fixedregulator@100 {
                        compatible = "regulator-fixed";
                        regulator-min-microvolt = <5000000>;
                        regulator-max-microvolt = <5000000>;

then I get different behavior where it gets past the CMD5 command but
fails further down in dhd.

root@imx6slevk:~# modprobe bcmdhd
dhd_module_init in
Power-up adapter 'DHD generic adapter'
wifi_platform_bus_enumerate device present 1
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
mmc2: queuing unknown CIS tuple 0x80 (6 bytes)
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
mmc2: new high speed SDIO card at address 0001
bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter
bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter
bus num (host idx)=2, slot num (rca)=1
found adapter info 'DHD generic adapter'
F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x1 pkg:0x3
DHD: dongle ram size is set to 524288(orig 524288) at 0x0
wifi_platform_get_mac_addr
CFG80211-ERROR) wl_setup_wiphy : Registering Vendor80211)
wl_create_event_handler(): thread:wl_event_handler:17d started
CFG80211-ERROR) wl_event_handler : tsk Enter, tsk = 0xa8da143c
dhd_attach(): thread:dhd_watchdog_thread:17f started
dhd_attach(): thread:dhd_dpc:180 started
dhd_deferred_work_init: work queue initialized
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
Dongle Host Driver, version 1.141.92 (r)
Compiled in drivers/net/wireless/bcmdhd
Register interface [wlan0] MAC: 00:90:4c:11:22:33

CFG80211-ERROR) wl_event_handler : was terminated
wl_destroy_event_handler(): thread:wl_event_handler:17d terminated OK
dhd_prot_ioctl : bus is down. we have nothing to do


root@imx6slevk:~# ifconfig wlan0 up

Dongle Host Driver, version 1.141.92 (r)
Compiled in drivers/net/wireless/bcmdhd
wl_android_wifi_on in
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
mmc2: queuing unknown CIS tuple 0x80 (6 bytes)
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)

passed wifi power up

wl_android_wifi_on:971
F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x1 pkg:0x3
DHD: dongle ram size is set to 524288(orig 524288) at 0x0
dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
wl_android_wifi_on:973
wl_android_wifi_on:975
wl_android_wifi_on:977
wl_android_wifi_on:979
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
sdhci-esdhc-imx 2198000.usdhc: could not set regulator OCR (-22)
dhd_bus_rxctl: resumed on timeout, INT status=0x208000C0
dhd_bus_rxctl: rxcnt_timeout=1, rxlen=0
dhd_check_hang: Event HANG send up due to re=1 te=0 e=-110 s=2
wl_android_wifi_on:983
wl_android_wifi_on:987
wl_android_wifi_on:991
dhd_open : wl_android_wifi_on failed (-14)

I tried the firmware link in your post, https://www.nxp.com/webapp/Download?colCode=BCMDHD-L4.1.15&amp;appType=license&amp;location=null&fsr...  , but I get:

We are unable to complete your software download request at this time due to a system outage. Please try your download at a later time. We apologize for the inconvenience.

The 4343W firmware files I am using work fine on another 4.1.15 system (7D sabre) so based on that I don't think it is firmware problem. I have also contacted Murata to confirm:

root@imx6slevk:~# md5sum /lib/firmware/bcm/1DX_BCM4343W/*
0b4f1d725dc07a060a49f50c6c755ef3 /lib/firmware/bcm/1DX_BCM4343W/bcmdhd.1DX.OOB.cal
ec9004a2832a9a417c5b730ca64a6603 /lib/firmware/bcm/1DX_BCM4343W/bcmdhd.1DX.SDIO.cal
0b222bc301f5df4365bfd90233e3421e /lib/firmware/bcm/1DX_BCM4343W/fw_bcmdhd.bin
0c6026f1c6912a2004236107c618f080 /lib/firmware/bcm/1DX_BCM4343W/fw_bcmdhd_mfgtest.bin

Thanks.

0 Kudos

549 Views
nickbourdon
Contributor II

Hi Jaya,

I'm using a BCM4339 with a 6q on Linux 4.1.15 and just start having the exact same issue today. It looks like you've done a great job tracing the issue down so far. 

I've probed my WL_EN output and determined that it is never going high, which explains why it's timing out. Have you tried probing yours? I'm trying to trace why the GPIO isn't responding.

Please post back if you make any progress and I'll follow up if I have any luck as well.

Thanks

0 Kudos

549 Views
jayakumar2
Contributor V

Hi Nick,

Thanks for your message. In my case, WIFI_REG_ON / WL_REG_ON is being asserted (driven high). Is your error message exactly the same? That seems surprising. Could you paste it, just for comparison. Thanks.

I made a bit of progress but it is still not working. I'll cover that in my reply below.

Thanks.

0 Kudos

549 Views
nickbourdon
Contributor II

Hi Jaya,

I fixed the problem with my WL_EN pin and am no longer getting that error. However, I can say I was getting that specific error because the device wasn't resetting when required. If I manually reset the wifi chip before attempting to bring up wlan0 (by bringing WL_EN low then high again), it would get passed that error on the first attempt but not on subsequent attempts.

Hopefully that helps.

549 Views
nickbourdon
Contributor II

Hi Jaya,

this is what I am seeing from my console when I turn on wifi:

brcmfmac: module loaded

Dongle Host Driver, version 1.141.88 (r)
Compiled from
wl_android_wifi_on in
sdio_reset_comm():
mmc2: Error resetting SDIO communications (-110)

failed to power up wifi chip, retry again (2 left) **

sdio_reset_comm():
mmc2: Error resetting SDIO communications (-110)

failed to power up wifi chip, retry again (1 left) **

sdio_reset_comm():
mmc2: Error resetting SDIO communications (-110)

failed to power up wifi chip, retry again (0 left) **

failed to power up wifi chip, max retry reached **

dhd_open : wl_android_wifi_on failed (-110)
wl_android_wifi_off in
init: Starting service 'p2p_supplicant'...
init: Service 'p2p_supplicant' (pid 1245) exited with status 255

0 Kudos