AnsweredAssumed Answered

bcmdhd wifi driver not working on imx6quad

Question asked by baofeng zhang on Mar 22, 2017
Latest reply on Feb 5, 2018 by 李 梦

Dear all:

    

I trying to bring WiFi module BCM88335 (similar to bcm 4335) on imx6quad platform(linux-3.14.28).

The wifi module is connected to sd2/mmc2 controller.

The bcm reset(wlreg_on) line is connected to gpio2_20 and bcm driver uses the in-band interrupts.

 

The below changes are in dts file and added mmc rescan patch in mmc host driver.

wlreg_on: fixedregulator@2 {
    compatible = "regulator-fixed";
    regulator-name = "wlreg_on";
    gpio = <&gpio2 20 0>; //wifi_regon
    startup-delay-us = <600000>;
    enable-active-high;
};

bcmdhd_wlan_0: bcmdhd_wlan@0 {
    compatible = "android,bcmdhd_wlan";
    gpios = <&gpio2 17 0>; //wifi_wake_host
    wlreg_on-supply = <&wlreg_on>;
};

 

&usdhc2 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_usdhc2>;
    keep-power-in-suspend;
    non-removable;
    cap-power-off-card;
    status = "okay";

};

pinctrl_usdhc2: usdhc2grp {
 fsl,pins = <
    MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059
    MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059
    MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
    MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
    MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
    MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17059
 >;
};

pinctrl_hog: hoggrp {
fsl,pins = <
    ...........
    MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x80000000
    MX6QDL_PAD_EIM_D17__GPIO3_IO17 0x80000000
    ..............
>;
};

 

When I try to insert the bcmdhd driver, it fails to load.

the logs:

dhd_module_init in
Power-up adapter 'DHD generic adapter'
F1 signature OK, socitype:0x1 chip:0x4339 rev:0x1 pkg:0x2
DHD: dongle ram size is set to 786432(orig 786432) at 0x180000
cfg80211: Updating information on frequency 2412 MHz with regulatory rule:
cfg80211: 2402000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
cfg80211: Updating information on frequency 2417 MHz with regulatory rule:
cfg80211: 2402000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
cfg80211: Updating information on frequency 2422 MHz with regulatory rule:
cfg80211: 2402000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
cfg80211: Updating information on frequency 2427 MHz with regulatory rule:
cfg80211: 2402000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
cfg80211: Updating information on frequency 2432 MHz with regulatory rule:
cfg80211: 2402000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
cfg80211: Updating information on frequency 2437 MHz with regulatory rule:
cfg80211: 2402000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
cfg80211: Updating information on frequency 2442 MHz with regulatory rule:
cfg80211: 2402000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
cfg80211: Updating information on frequency 2447 MHz with regulatory rule:
cfg80211: 2402000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
cfg80211: Updating information on frequency 2452 MHz with regulatory rule:
cfg80211: 2402000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
cfg80211: Updating information on frequency 2457 MHz with regulatory rule:
cfg80211: 2402000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
cfg80211: Updating information on frequency 2462 MHz with regulatory rule:
cfg80211: 2402000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
cfg80211: Updating information on frequency 2467 MHz with regulatory rule:
cfg80211: 2402000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
cfg80211: Updating information on frequency 2472 MHz with regulatory rule:
cfg80211: 2402000 KHz - 2482000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
cfg80211: Updating information on frequency 2484 MHz with regulatory rule:
cfg80211: 2474000 KHz - 2494000 KHz @ 20000 KHz), (600 mBi, 2000 mBm)
CFG80211-ERROR) wl_setup_wiphy : Registering Vendor80211)
cfg80211: Ignoring regulatory request set by core since the driver uses its own custom regulatory domain
wl_create_event_handler(): thread:wl_event_handler:402 started
CFG80211-ERROR) wl_event_handler : tsk Enter, tsk = 0xa916141c
dhd_attach(): thread:dhd_watchdog_thread:403 started
dhd_attach(): thread:dhd_dpc:404 started
dhd_deferred_work_init: work queue initialized
dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
dhd_bus_rxctl: resumed on timeout, INT status=0x208000C0
dhd_bus_rxctl: rxcnt_timeout=1, rxlen=0
dhd_wl_ioctl: 'resumed on timeout' error is occurred before the interface does not bring up
dhdsdio_probe: dhd_bus_start failed
dhd_wlfc_deinit():3256, Already disabled!
dhd_detach(): thread:dhd_watchdog_thread:403 terminated OK
dhd_dpc_thread: Unexpected up_cnt 0
dhd_detach(): thread:dhd_dpc:404 terminated OK
CFG80211-ERROR) wl_event_handler : was terminated
wl_destroy_event_handler(): thread:wl_event_handler:402 terminated OK
bcmsdh_sdmmc: probe of mmc1:0001:2 failed with error -12
dhd_wifi_platform_load_sdio: sdio_register_driver timeout or error
bcmdhd_wlan: probe of bcmdhd_wlan.30 failed with error -62

 

 

 

Please suggest if you have any additional pointers or any reasons for this failure.

Original Attachment has been moved to: dmesg.txt.zip

Outcomes