Tool/software: Linux
Hello,
The board is custom and powered by an iMX6. The driver is compiled with Linux Kernel 4.1.5. All the required software loads successfully, the wlan0 interface can be bought up, however any communication with the device will cause a crash.
The interrupt for wl18xx in /proc/interrupts starts at 0 and doesn't increase when wlan0 is brought up. This issue seems to be caused by the WLAN_IRQ line, when looked at with a scope, the line can be seen going high but never falling until the driver crashes. I have changed the interrupt mode in the device tree from IRQ_TYPE_EDGE_RISING to IRQ_TYPE_LEVEL_HIGH and saw no improvement. I have included a log below.
Loading modules backported from Linux version R8.7_SP2-0-g5c94cc5 Backport generated by backports.git R8.7_SP2-0-gd4777ef wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11) wlcore: loaded wlcore: driver version: R8.7_SP2 # lsmod Module Size Used by Tainted: G wl18xx 88141 0 wlcore 183998 1 wl18xx wlcore_sdio 6674 0 mac80211 479437 2 wl18xx,wlcore cfg80211 220989 3 wl18xx,wlcore,mac80211 compat 6959 4 wl18xx,wlcore_sdio,mac80211,cfg80211 # cat /proc/interrupts | grep wl18xx 67: 0 gpio-mxc 4 Edge wl18xx # ifconfig wlan0 up wlcore: PHY firmware version: Rev 8.2.0.0.236 wlcore: firmware booted (Rev 8.9.0.0.69) IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready # cat /proc/interrupts | grep wl18xx 67: 0 gpio-mxc 4 Edge wl18xx # iw wlan0 scan wlcore: ERROR ELP wakeup timeout! ------------[ cut here ]------------ WARNING: CPU: 0 PID: 196 at /home/andrew/WL18xx/build-utilites/src/compat_wireless/drivers/net/wireless/ti/wlcore/main.c:806 wl12xx_queue_recovery_work.part.9+0x58/0x5c [wlcore]() Modules linked in: wl18xx(O) wlcore(O) wlcore_sdio(O) mac80211(O) cfg80211(O) compat(O) CPU: 0 PID: 196 Comm: iw Tainted: G O 4.1.15 #10 Hardware name: Freescale i.MX6 Ultralite (Device Tree) [<80015d14>] (unwind_backtrace) from [<80012648>] (show_stack+0x10/0x14) [<80012648>] (show_stack) from [<80752700>] (dump_stack+0x74/0xb4) [<80752700>] (dump_stack) from [<80035458>] (warn_slowpath_common+0x80/0xb0) [<80035458>] (warn_slowpath_common) from [<80035524>] (warn_slowpath_null+0x1c/0x24) [<80035524>] (warn_slowpath_null) from [<7f0e8878>] (wl12xx_queue_recovery_work.part.9+0x58/0x5c [wlcore]) [<7f0e8878>] (wl12xx_queue_recovery_work.part.9 [wlcore]) from [<7f0f5328>] (wl1271_ps_elp_wakeup+0x1e4/0x1ec [wlcore]) [<7f0f5328>] (wl1271_ps_elp_wakeup [wlcore]) from [<7f0e6b38>] (wl1271_op_hw_scan+0x60/0xd8 [wlcore]) [<7f0e6b38>] (wl1271_op_hw_scan [wlcore]) from [<7f056830>] (__ieee80211_start_scan+0x1c4/0x434 [mac80211]) [<7f056830>] (__ieee80211_start_scan [mac80211]) from [<7f0574ec>] (ieee80211_request_scan+0x28/0x40 [mac80211]) [<7f0574ec>] (ieee80211_request_scan [mac80211]) from [<7f024374>] (nl80211_trigger_scan+0x5e0/0x638 [cfg80211]) [<7f024374>] (nl80211_trigger_scan [cfg80211]) from [<806430e4>] (genl_rcv_msg+0x22c/0x3a0) [<806430e4>] (genl_rcv_msg) from [<806424e8>] (netlink_rcv_skb+0xb4/0xd8) [<806424e8>] (netlink_rcv_skb) from [<80642ea8>] (genl_rcv+0x24/0x34) [<80642ea8>] (genl_rcv) from [<80641e6c>] (netlink_unicast+0x158/0x20c) [<80641e6c>] (netlink_unicast) from [<806422c8>] (netlink_sendmsg+0x2e0/0x348) [<806422c8>] (netlink_sendmsg) from [<806040f0>] (sock_sendmsg+0x14/0x24) [<806040f0>] (sock_sendmsg) from [<806048b0>] (___sys_sendmsg+0x1cc/0x1d4) [<806048b0>] (___sys_sendmsg) from [<80605550>] (__sys_sendmsg+0x3c/0x68) [<80605550>] (__sys_sendmsg) from [<8000f380>] (ret_fast_syscall+0x0/0x3c) ---[ end trace 1ec6bfee3af9a98f ]--- wlcore: Hardware recovery in progress. FW ver: Rev 8.9.0.0.69 command failed: Connection timed out (-110) # ------------[ cut here ]------------ WARNING: CPU: 0 PID: 64 at /home/andrew/WL18xx/build-utilites/src/compat_wireless/drivers/net/wireless/ti/wlcore/io.h:66 wlcore_set_partition+0xa0/0x4c0 [wlcore]() Modules linked in: wl18xx(O) wlcore(O) wlcore_sdio(O) mac80211(O) cfg80211(O) compat(O) CPU: 0 PID: 64 Comm: kworker/u2:1 Tainted: G W O 4.1.15 #10 Hardware name: Freescale i.MX6 Ultralite (Device Tree) Workqueue: phy0 wl1271_recovery_work [wlcore] [<80015d14>] (unwind_backtrace) from [<80012648>] (show_stack+0x10/0x14) [<80012648>] (show_stack) from [<80752700>] (dump_stack+0x74/0xb4) [<80752700>] (dump_stack) from [<80035458>] (warn_slowpath_common+0x80/0xb0) [<80035458>] (warn_slowpath_common) from [<80035524>] (warn_slowpath_null+0x1c/0x24) [<80035524>] (warn_slowpath_null) from [<7f0f153c>] (wlcore_set_partition+0xa0/0x4c0 [wlcore]) [<7f0f153c>] (wlcore_set_partition [wlcore]) from [<7f0eaef4>] (wl1271_recovery_work+0x6c/0x324 [wlcore]) [<7f0eaef4>] (wl1271_recovery_work [wlcore]) from [<80048714>] (process_one_work+0x1d8/0x3ec) [<80048714>] (process_one_work) from [<800492c8>] (worker_thread+0x4c/0x520) [<800492c8>] (worker_thread) from [<8004db74>] (kthread+0xdc/0xf4) [<8004db74>] (kthread) from [<8000f428>] (ret_from_fork+0x14/0x2c) ---[ end trace 1ec6bfee3af9a990 ]--- wlcore: down ieee80211 phy0: Hardware restart was requested wlcore: PHY firmware version: Rev 8.2.0.0.236 wlcore: firmware booted (Rev 8.9.0.0.69)
The WLAN_IRQ line is GPIO2_IO04 muxed on ENET1_TX_DATA1
Here are the relevant sections of the device tree:
&usdhc1 { status = "okay"; vmmc-supply = <&wlan_en_reg>; bus-width = <4>; pinctrl-names = "default", "sleep"; pinctrl-0 = <&usdhc1_pins_default &wlan_pins_default>; pinctrl-1 = <&usdhc1_pins_sleep &wlan_pins_sleep>; ti,non-removable; ti,needs-special-hs-handling; cap-power-off-card; keep-power-in-suspend; #address-cells = <1>; #size-cells = <0>; wlcore: wlcore@0 { compatible = "ti,wl1837"; reg = <2>; interrupt-parent = <&gpio2>; interrupts = <4 IRQ_TYPE_EDGE_RISING>; }; }; wlan_pins_default: pinmux_wlan_pins_default { pinctrl-single,pins = < MX6UL_PAD_NAND_ALE__GPIO4_IO10 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* bt_en */ MX6UL_PAD_ENET1_TX_DATA1__GPIO2_IO04 (PIN_INPUT | MUX_MODE7) /* wlan_iqr */ MX6UL_PAD_NAND_DATA07__GPIO4_IO09 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* wlan_en*/ >; };
Any help will be appreciated. Thanks,
~Andrew