Hello all.
I'm using WL1837 with WL18XXCOM82SDMMC adapter connected to an iMX6 module.
I already read most of the tutorials showing how to add wl18xx support to the iMX6 board.
First of all I started with this tutorial but selecting the kernel 3.14.
https://community.freescale.com/thread/358671
My kernel comes from this Link:
http://git.toradex.com/cgit/linux-toradex.git/log/?h=toradex_imx_3.14.28_1.0.0_ga
Addiing the patchs at build script "build_wl18XX.sh".
Some other tutorial that I used to compare what I did is:
processors.wiki.ti.com/.../WL18xx_First_Time_Getting_Started_Guide_(IMX6)
processors.wiki.ti.com/.../WL18xx_First_Time_Getting_Started_Guide_(IMX6SL)
My problem is: The wifi works some time but I got a kernel back trace 30 seconds after scan.
Take a look at the error bellow and check also the times:
root@colibri-imx6:~# [ 31.597126] PU: Power-on latency exceeded, new value 4294666 ns [ 37.076952] sdhci-esdhc-imx 2190000.usdhc: card claims to support voltages below defined range [ 37.103829] mmc1: queuing unknown CIS tuple 0x91 (3 bytes) [ 37.110755] mmc1: new high speed SDIO card at address 0001 [ 37.119045] wl1271_sdio mmc1:0001:2: legacy platform data not found, trying device tree [ 37.403110] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11) [ 37.455433] wlcore: loaded [ 37.868532] wlcore: PHY firmware version: Rev 8.2.0.0.163 [ 37.907857] wlcore: firmware booted (Rev 8.5.0.0.55) [ 37.927760] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready root@colibri-imx6:~# root@colibri-imx6:~# root@colibri-imx6:~# root@colibri-imx6:~# [ 68.017500] wlcore: Scan completed due to error. [ 68.022148] ------------[ cut here ]------------ [ 68.026869] WARNING: CPU: 0 PID: 95 at drivers/net/wireless/ti/wlcore/main.c:789 wl12xx_queue_recovery_work+0x6c/0x70() [ 68.037718] Modules linked in: [ 68.040820] CPU: 0 PID: 95 Comm: kworker/u4:2 Not tainted 3.14.28-00017-geba1b9c #48 [ 68.048652] Workqueue: phy0 wl1271_scan_complete_work [ 68.053739] Backtrace: [ 68.056297] [<80012680>] (dump_backtrace) from [<80012898>] (show_stack+0x18/0x1c) [ 68.063882] r6:00000315 r5:00000000 r4:809aa548 r3:809884a4 [ 68.069695] [<80012880>] (show_stack) from [<806effac>] (dump_stack+0x88/0x98) [ 68.076986] [<806eff24>] (dump_stack) from [<8002e724>] (warn_slowpath_common+0x74/0x90) [ 68.085119] r5:00000009 r4:00000000 [ 68.088762] [<8002e6b0>] (warn_slowpath_common) from [<8002e7e4>] (warn_slowpath_null+0x24/0x2c) [ 68.097589] r8:8e5e8b58 r7:00000000 r6:8e54ed00 r5:8e54ed38 r4:8e54ed00 [ 68.104448] [<8002e7c0>] (warn_slowpath_null) from [<803cd34c>] (wl12xx_queue_recovery_work+0x6c/0x70) [ 68.114049] [<803cd2e0>] (wl12xx_queue_recovery_work) from [<803df58c>] (wl1271_scan_complete_work+0x118/0x11c) [ 68.124195] r4:8e54f024 r3:809884a4 [ 68.127851] [<803df474>] (wl1271_scan_complete_work) from [<80044464>] (process_one_work+0x114/0x384) [ 68.137121] r8:00000000 r7:8f020900 r6:82004400 r5:8e54f024 r4:8e43f280 r3:803df474 [ 68.145022] [<80044350>] (process_one_work) from [<80045200>] (worker_thread+0x140/0x420) [ 68.153214] r10:82004400 r9:8e44a000 r8:8e44a020 r7:8e44a000 r6:8e43f298 r5:82004414 [ 68.161192] r4:8e43f280 [ 68.163777] [<800450c0>] (worker_thread) from [<8004b060>] (kthread+0xdc/0xf4) [ 68.171045] r10:00000000 r9:00000000 r8:00000000 r7:800450c0 r6:8e43f280 r5:00000000 [ 68.179015] r4:8e43e440 [ 68.181600] [<8004af84>] (kthread) from [<8000f118>] (ret_from_fork+0x14/0x3c) [ 68.188866] r7:00000000 r6:00000000 r5:8004af84 r4:8e43e440 [ 68.194650] ---[ end trace 697a562e7dad11d3 ]--- [ 68.206841] wlcore: Reading FW panic log [ 68.213099] wlcore: Hardware recovery in progress. FW ver: Rev 8.5.0.0.55 [ 68.220570] wlcore: pc: 0x0, hint_sts: 0x00000000 count: 1 [ 68.226592] wlcore: down [ 68.230243] ieee80211 phy0: Hardware restart was requested [ 70.491321] wlcore: ERROR timeout waiting for the hardware to complete initialization [ 72.734704] wlcore: ERROR timeout waiting for the hardware to complete initialization [ 74.977911] wlcore: ERROR timeout waiting for the hardware to complete initialization [ 74.987158] wlcore: ERROR firmware boot failed despite 3 retries
Funny that looks every thing OK, I also try some other configuration in the IRQ Mux but always this back trace crash what is working.
This is what I'm doing at my device tree:
pinctrl_usdhc1: usdhc1grp {
fsl,pins = <
MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17069
MX6QDL_PAD_SD1_CLK__SD1_CLK 0x17069
MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17069
MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17069
MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17069
MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17069
MX6QDL_PAD_NANDF_D6__GPIO2_IO06 0x13059 // WL_EN
MX6QDL_PAD_NANDF_D3__GPIO2_IO03 0x13059 // wl_irq
>;
};
/* MMC */
&usdhc1 {
label = "MMC1";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc1>;
bus-width = <4>;
no-1-8-v;
keep-power-in-suspend;
enable-sdio-wakeup;
#if 0
vmmc-supply = <&wlan_en_reg>;
non-removable; // non-removable is not a variable, the fact it is listed is all that is used by driver
#endif
cap-power-off-card;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
wlcore: wlcore@0 {
compatible = "ti,wl1835";
reg = <2>;
interrupt-parent = <&gpio2>;
interrupts = <3 IRQ_TYPE_EDGE_BOTH>;
};
};
I'm not using the WLAN_ENABLE I just left it ON for know.
Thanks for all suggestion.

