Trying to get wireless (WL1271) driver working on Beaglebone

Hello, thanks for the help so far. I’ve read plenty of info on this forum, the TI forum, and the TI wiki. I think I have the code in my arch/arm/mach-omap2/board-am335xevm.c file correctly updated. I think I’m setting the SDIO pin mux correctly, as well as WLAN_EN, WLAN_IRQ, BT_EN, etc.

However, I just can’t get my beaglebone working with the TiWi-R2 chip. I’ve posted here some of the syslog output (which includes the kernel messages) hoping that someone can help me debug this.

I edited this syslog output to remove unrelated stuff.

Aug 10 06:22:20 bone2 udevd[73]: timeout: killing ‘/sbin/modprobe sdio:c00v0097d4076’ [218]
Aug 10 06:22:20 bone2 udevd[73]: ‘/sbin/modprobe sdio:c00v0097d4076’ [218] terminated by signal 9 (Killed)
Aug 10 06:22:23 bone2 udevd[59]: worker [74] timeout, kill it
Aug 10 06:22:23 bone2 udevd[59]: seq 777 ‘/devices/platform/omap/omap_hsmmc.1/mmc_host/mmc1/mmc1:0001/mmc1:0001:2’ killed
Aug 10 06:22:23 bone2 connmand[227]: connmand[227]: wlan0 {create} index 3 type 1
Aug 10 06:22:23 bone2 kernel: ieee80211 phy0: Failed to initialize wep: -2
Aug 10 06:22:23 bone2 kernel: wl1271: loaded
Aug 10 06:22:23 bone2 udevd[59]: worker [74] terminated by signal 9 (Killed)
Aug 10 06:22:23 bone2 connmand[227]: wlan0 {create} index 3 type 1
Aug 10 06:22:23 bone2 connmand[227]: wlan0 {update} flags 4098
Aug 10 06:22:23 bone2 connmand[227]: wlan0 {newlink} index 3 address DE:AD:BE:EF:00:00 mtu 1500
Aug 10 06:22:23 bone2 connmand[227]: wlan0 {newlink} index 3 operstate 2
Aug 10 06:22:23 bone2 connmand[227]: Adding interface wlan0 [ wifi ]
Aug 10 06:22:23 bone2 connmand[227]: connmand[227]: wlan0 {update} flags 4098
Aug 10 06:22:23 bone2 connmand[227]: connmand[227]: wlan0 {newlink} index 3 address DE:AD:BE:EF:00:00 mtu 1500
Aug 10 06:22:23 bone2 connmand[227]: connmand[227]: wlan0 {newlink} index 3 operstate 2
Aug 10 06:22:23 bone2 connmand[227]: connmand[227]: Adding interface wlan0 [ wifi ]
Aug 10 06:22:23 bone2 kernel: wl1271: ERROR sdio read failed (-84)
Aug 10 06:22:23 bone2 kernel: wl1271: WARNING unsupported chip id: 0xcccccccc
Aug 10 06:22:24 bone2 kernel: wl1271: ERROR sdio read failed (-84)
Aug 10 06:22:24 bone2 kernel: wl1271: WARNING unsupported chip id: 0xcccccccc
Aug 10 06:22:24 bone2 kernel: wl1271: ERROR sdio read failed (-84)
Aug 10 06:22:24 bone2 kernel: wl1271: WARNING unsupported chip id: 0xcccccccc
Aug 10 06:22:24 bone2 kernel: wl1271: ERROR firmware boot failed despite 3 retries
Aug 10 06:22:25 bone2 kernel: wl1271: ERROR sdio read failed (-84)
Aug 10 06:22:25 bone2 kernel: wl1271: WARNING unsupported chip id: 0xcccccccc
Aug 10 06:22:25 bone2 kernel: wl1271: ERROR sdio read failed (-84)
Aug 10 06:22:25 bone2 kernel: wl1271: WARNING unsupported chip id: 0xcccccccc
Aug 10 06:22:26 bone2 kernel: wl1271: ERROR sdio read failed (-84)
Aug 10 06:22:26 bone2 kernel: wl1271: WARNING unsupported chip id: 0xcccccccc
Aug 10 06:22:26 bone2 kernel: wl1271: ERROR firmware boot failed despite 3 retries
Aug 10 06:22:26 bone2 connmand[227]: ** (connmand:227): CRITICAL **: error fi.w1.wpa_supplicant1.UnknownError

Here I turned on debugging, and issued ifdown wlan0 followed by ifup wlan0. I got the following from syslog.
Some of the following are my debug statements in the kernel code.

Aug 10 07:04:34 bone2 wpa_supplicant[311]: Libgcrypt warning: missing initialization - please fix the application
Aug 10 07:04:35 bone2 kernel: In wl12xx_set_power, slot (0), on (1), vdd (21)…
Aug 10 07:04:35 bone2 kernel: RIT: A: Error is -110, IRQ Status is 0x18000
Aug 10 07:04:36 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:36 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:36 bone2 kernel: wl1271: data: 00000000: 00 00 30 00 …0.
Aug 10 07:04:36 bone2 kernel: wl1271: data: 00000000: 00 88 00 00 …
Aug 10 07:04:36 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:36 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:36 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:36 bone2 kernel: RIT: B: Error is -84, IRQ Status is 0x208003
Aug 10 07:04:36 bone2 kernel: wl1271: data: 00000000: cc cc cc cc …
Aug 10 07:04:36 bone2 kernel: wl1271: ERROR sdio read failed (-84)
Aug 10 07:04:36 bone2 kernel: wl1271: WARNING unsupported chip id: 0xcccccccc
Aug 10 07:04:36 bone2 kernel: In wl12xx_set_power, slot (0), on (0), vdd (0)…
Aug 10 07:04:36 bone2 kernel: In wl12xx_set_power, slot (0), on (1), vdd (21)…
Aug 10 07:04:36 bone2 kernel: RIT: A: Error is -110, IRQ Status is 0x18000
Aug 10 07:04:36 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:36 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:36 bone2 kernel: wl1271: data: 00000000: 00 00 30 00 …0.
Aug 10 07:04:36 bone2 kernel: wl1271: data: 00000000: 00 88 00 00 …
Aug 10 07:04:36 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:36 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:36 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:38 bone2 kernel: RIT: B: Error is -84, IRQ Status is 0x208003
Aug 10 07:04:38 bone2 kernel: wl1271: data: 00000000: cc cc cc cc …
Aug 10 07:04:38 bone2 kernel: wl1271: ERROR sdio read failed (-84)
Aug 10 07:04:38 bone2 kernel: wl1271: WARNING unsupported chip id: 0xcccccccc
Aug 10 07:04:38 bone2 kernel: In wl12xx_set_power, slot (0), on (0), vdd (0)…
Aug 10 07:04:38 bone2 kernel: In wl12xx_set_power, slot (0), on (1), vdd (21)…
Aug 10 07:04:38 bone2 kernel: RIT: A: Error is -110, IRQ Status is 0x18000
Aug 10 07:04:38 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:38 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:38 bone2 kernel: wl1271: data: 00000000: 00 00 30 00 …0.
Aug 10 07:04:38 bone2 kernel: wl1271: data: 00000000: 00 88 00 00 …
Aug 10 07:04:38 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:38 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:38 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:39 bone2 kernel: RIT: B: Error is -84, IRQ Status is 0x208003
Aug 10 07:04:40 bone2 kernel: wl1271: data: 00000000: cc cc cc cc …
Aug 10 07:04:40 bone2 kernel: wl1271: ERROR sdio read failed (-84)
Aug 10 07:04:40 bone2 kernel: wl1271: WARNING unsupported chip id: 0xcccccccc
Aug 10 07:04:40 bone2 kernel: In wl12xx_set_power, slot (0), on (0), vdd (0)…
Aug 10 07:04:40 bone2 kernel: wl1271: ERROR firmware boot failed despite 3 retries
Aug 10 07:04:41 bone2 kernel: In wl12xx_set_power, slot (0), on (1), vdd (21)…
Aug 10 07:04:41 bone2 kernel: RIT: A: Error is -110, IRQ Status is 0x18000
Aug 10 07:04:41 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:41 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:41 bone2 kernel: wl1271: data: 00000000: 00 00 30 00 …0.
Aug 10 07:04:41 bone2 kernel: wl1271: data: 00000000: 00 88 00 00 …
Aug 10 07:04:41 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:41 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:41 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:43 bone2 kernel: RIT: B: Error is -84, IRQ Status is 0x208003
Aug 10 07:04:43 bone2 kernel: wl1271: data: 00000000: cc cc cc cc …
Aug 10 07:04:43 bone2 kernel: wl1271: ERROR sdio read failed (-84)
Aug 10 07:04:43 bone2 kernel: wl1271: WARNING unsupported chip id: 0xcccccccc
Aug 10 07:04:43 bone2 kernel: In wl12xx_set_power, slot (0), on (0), vdd (0)…
Aug 10 07:04:43 bone2 kernel: In wl12xx_set_power, slot (0), on (1), vdd (21)…
Aug 10 07:04:43 bone2 kernel: RIT: A: Error is -110, IRQ Status is 0x18000
Aug 10 07:04:43 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:43 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:43 bone2 kernel: wl1271: data: 00000000: 00 00 30 00 …0.
Aug 10 07:04:43 bone2 kernel: wl1271: data: 00000000: 00 88 00 00 …
Aug 10 07:04:43 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:43 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:43 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:43 bone2 kernel: RIT: B: Error is -84, IRQ Status is 0x208003
Aug 10 07:04:43 bone2 kernel: wl1271: data: 00000000: cc cc cc cc …
Aug 10 07:04:43 bone2 kernel: wl1271: ERROR sdio read failed (-84)
Aug 10 07:04:43 bone2 kernel: wl1271: WARNING unsupported chip id: 0xcccccccc
Aug 10 07:04:43 bone2 kernel: In wl12xx_set_power, slot (0), on (0), vdd (0)…
Aug 10 07:04:43 bone2 kernel: In wl12xx_set_power, slot (0), on (1), vdd (21)…
Aug 10 07:04:43 bone2 kernel: RIT: A: Error is -110, IRQ Status is 0x18000
Aug 10 07:04:44 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:44 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:44 bone2 kernel: wl1271: data: 00000000: 00 00 30 00 …0.
Aug 10 07:04:44 bone2 kernel: wl1271: data: 00000000: 00 88 00 00 …
Aug 10 07:04:44 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:44 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:44 bone2 kernel: wl1271: data: 00000000: 00 00 00 00 …
Aug 10 07:04:45 bone2 kernel: RIT: B: Error is -84, IRQ Status is 0x208003
Aug 10 07:04:45 bone2 kernel: wl1271: data: 00000000: cc cc cc cc …
Aug 10 07:04:45 bone2 kernel: wl1271: ERROR sdio read failed (-84)
Aug 10 07:04:45 bone2 kernel: wl1271: WARNING unsupported chip id: 0xcccccccc
Aug 10 07:04:45 bone2 kernel: In wl12xx_set_power, slot (0), on (0), vdd (0)…
Aug 10 07:04:45 bone2 kernel: wl1271: ERROR firmware boot failed despite 3 retries

root@bone2:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr D4:94:A1:2B:89:10
inet addr:129.21.92.155 Bcast:129.21.92.255 Mask:255.255.255.0
inet6 addr: fe80::d694:a1ff:fe2b:8910/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1459 errors:0 dropped:277 overruns:0 frame:0
TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:165843 (161.9 KiB) TX bytes:8403 (8.2 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr DE:AD:BE:EF:00:00
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Notes:

udevd is killing something related to SDIO

The wl1271 driver is trying several times to communicate with the TiWi chip but fails with error -84

ifconfig -a shows wlan0 has address DE:AD:BE:EF:00:00

Any help would be appreciated. I’ve been trying to get my beaglebone working with the TiWi-R2 chip for weeks.

Thanks for your help,

Tim M

I use TXS0108 for level shifting between AM35 and Tiwi-R2, although the IRQ line is shifted separately by SN74LVC1T45

2012/10/19 AndrewTaneGlen <andrewtaneglen@gmail.com>