linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* WL1271 on CM-T3730
@ 2020-06-15 21:04 Oskar Enoksson
  2020-06-16 15:39 ` Tony Lindgren
  2020-06-19  7:55 ` H. Nikolaus Schaller
  0 siblings, 2 replies; 12+ messages in thread
From: Oskar Enoksson @ 2020-06-15 21:04 UTC (permalink / raw)
  To: linux-omap

[-- Attachment #1: Type: text/plain, Size: 3736 bytes --]

Hello all, sorry to bother, I'm urgently in need of some help/hints.

I'm trying to make wifi work on an Compulab CM-T3730, an old OMAP3 board 
with WL1271 Wifi chip connected to an mmc via SDIO.

Everything works with the kernel supported by Texas Instruments 3.0.87 
but I need a newer kernel. There is a device tree file 
omap3-cm-t3730.dts in the Linux mainline sourcees, but it doesn't work 
for me, the Wifi chip is not detected on the SDIO bus. I'm using 
mainline linux 5.6.18, but I also tried 4.14, 4.9 and 3.16 with similar 
results.

What could be the problem?

When I boot I can see (by enabling various verbose printouts) that the 
appropriate mmc is bound to the right driver omap_hsmmc, but no device 
is detected on the SDIO bus. Some power pin messages look worrying but 
maybe it's ok?:

[    4.584228] platform 480b4000.mmc: Retrying from deferred list
[    4.584808] bus: 'platform': driver_probe_device: matched device 
480b4000.mmc with driver omap_hsmmc
[    4.584838] bus: 'platform': really_probe: probing driver omap_hsmmc 
with device 480b4000.mmc
[    4.585083] omap_hsmmc 480b4000.mmc: no init pinctrl state
[    4.585144] omap_hsmmc 480b4000.mmc: no sleep pinctrl state
[    4.585174] omap_hsmmc 480b4000.mmc: no idle pinctrl state
[    4.585571] omap_hsmmc 480b4000.mmc: GPIO lookup for consumer wp
[    4.585571] omap_hsmmc 480b4000.mmc: using device tree for GPIO lookup
[    4.585662] of_get_named_gpiod_flags: can't parse 'wp-gpios' property 
of node '/ocp@68000000/mmc@480b4000[0]'
[    4.585723] of_get_named_gpiod_flags: can't parse 'wp-gpio' property 
of node '/ocp@68000000/mmc@480b4000[0]'
[    4.585754] omap_hsmmc 480b4000.mmc: using lookup tables for GPIO lookup
[    4.585784] omap_hsmmc 480b4000.mmc: No GPIO consumer wp found
[    4.586669] omap_hsmmc 480b4000.mmc: Looking up vmmc-supply from 
device tree
[    4.587097] devices_kset: Moving 480b4000.mmc to end of list
[    4.587127] omap_hsmmc 480b4000.mmc: Linked as a consumer to regulator.9
[    4.587158] omap_hsmmc 480b4000.mmc: Looking up vqmmc-supply from 
device tree
[    4.587615] devices_kset: Moving 480b4000.mmc to end of list
[    4.587646] omap_hsmmc 480b4000.mmc: Linked as a consumer to regulator.6
[    4.587677] omap_hsmmc 480b4000.mmc: Looking up pbias-supply from 
device tree
[    4.587738] omap_hsmmc 480b4000.mmc: Looking up pbias-supply property 
in node /ocp@68000000/mmc@480b4000 failed
[    4.587860] device: 'mmc1': device_add
[    4.613861] driver: 'omap_hsmmc': driver_bound: bound to device 
'480b4000.mmc'
[    4.614105] bus: 'platform': really_probe: bound device 480b4000.mmc 
to driver omap_hsmmc



When I manually modprobe wlcore, then wlcore_sdio, then wl12xx, dmesg shows:

[   49.467132] device class 'rfkill': registering
[   49.467376] device: 'rfkill': device_add
[   50.070983] device class 'ieee80211': registering
[   50.072143] Registering platform device 'regulatory.0'. Parent at 
platform
[   50.072174] device: 'regulatory.0': device_add
[   50.072235] bus: 'platform': add device regulatory.0
[   50.072906] cfg80211: Loading compiled-in X.509 certificates for 
regulatory database
[   50.173675] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   54.470794] bus: 'sdio': add driver wl1271_sdio
[   59.017272] bus: 'platform': add driver wl12xx_driver



Still, no wlan0 interface visible with "ifconfig -a"

Is something wrong/missing in the devicetree? cap-sdio-irq? mmc-pwrseq? 
Or is the pin configuration in the device tree wrong? Did anyone ever 
try the device tree on a board with wl1271 wifi (it is optional)? I 
don't even have a schematic so I can't double check the pins.

Hints much appreciated!! Device tree file is attached (from mainline 
kernel 5.6.18)

[-- Attachment #2: omap3-cm-t3730.dts --]
[-- Type: audio/vnd.dts, Size: 2989 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: WL1271 on CM-T3730
  2020-06-15 21:04 WL1271 on CM-T3730 Oskar Enoksson
@ 2020-06-16 15:39 ` Tony Lindgren
  2020-06-17 10:44   ` Oskar Enoksson
  2020-06-19  7:55 ` H. Nikolaus Schaller
  1 sibling, 1 reply; 12+ messages in thread
From: Tony Lindgren @ 2020-06-16 15:39 UTC (permalink / raw)
  To: Oskar Enoksson; +Cc: linux-omap

* Oskar Enoksson <enok@lysator.liu.se> [200615 21:15]:
> Hello all, sorry to bother, I'm urgently in need of some help/hints.
> 
> I'm trying to make wifi work on an Compulab CM-T3730, an old OMAP3 board
> with WL1271 Wifi chip connected to an mmc via SDIO.
> 
> Everything works with the kernel supported by Texas Instruments 3.0.87 but I
> need a newer kernel. There is a device tree file omap3-cm-t3730.dts in the
> Linux mainline sourcees, but it doesn't work for me, the Wifi chip is not
> detected on the SDIO bus. I'm using mainline linux 5.6.18, but I also tried
> 4.14, 4.9 and 3.16 with similar results.
> 
> What could be the problem?

Well it should work in general, maybe there's a regression somewhere.
I can confirm that cm-t3730 works with v5.3 at least, have not bothered
to update it for a while. Maybe you just need to update your firmware for
/lib/firmware/ti-connectivity for it?

Regards,

Tony

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: WL1271 on CM-T3730
  2020-06-16 15:39 ` Tony Lindgren
@ 2020-06-17 10:44   ` Oskar Enoksson
  2020-06-17 16:51     ` Tony Lindgren
  0 siblings, 1 reply; 12+ messages in thread
From: Oskar Enoksson @ 2020-06-17 10:44 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap



On 6/16/20 5:39 PM, Tony Lindgren wrote:
> * Oskar Enoksson <enok@lysator.liu.se> [200615 21:15]:
>> Hello all, sorry to bother, I'm urgently in need of some help/hints.
>>
>> I'm trying to make wifi work on an Compulab CM-T3730, an old OMAP3 board
>> with WL1271 Wifi chip connected to an mmc via SDIO.
>>
>> Everything works with the kernel supported by Texas Instruments 3.0.87 but I
>> need a newer kernel. There is a device tree file omap3-cm-t3730.dts in the
>> Linux mainline sourcees, but it doesn't work for me, the Wifi chip is not
>> detected on the SDIO bus. I'm using mainline linux 5.6.18, but I also tried
>> 4.14, 4.9 and 3.16 with similar results.
>>
>> What could be the problem?
> 
> Well it should work in general, maybe there's a regression somewhere.
> I can confirm that cm-t3730 works with v5.3 at least, have not bothered
> to update it for a while. Maybe you just need to update your firmware for
> /lib/firmware/ti-connectivity for it?
> 
> Regards,
> 
> Tony
> 

I tried replacing my own u-boot 2020.1 with Compulab's pre-compiled 
u-boot 2014.1, no noticeable difference, still no wlan0. I just had to 
set bootm_low, bootm_size and bootm_mapsize for the kernel bootm command 
not to hang. (I'm not sure I understand which address settings are safe 
and why, the ones below seems to work for me):

bootm_low=0x80004000
bootm_mapsize=0xf000000
bootm_size=0xf000000
...
loadaddr=0x8f000000
loadfdtaddr=0x8ff00000


I then tried re-compiling the kernel using omap2plus_defconfig without 
any modifications (CONFIG_NETFILTER=y was already set). I used Yocto 
with kernel 5.4.28. Still exactly the same results (no wlan0)

I then tried latest 5.3 kernel, to get as close as possible to Tony's 
build, this time using a crosstool-ng toolchain. Exactly the same 
results (no wlan0)


Firmware files are all there under /lib/firmware/ti-connectivity as far 
as I can tell. cfg80211 finds regulatory.db. Files wl127x-fw-5*.bin and 
wl128x-fw-5*.bin match the ones reported by "modinfo wl12xx", but there 
is nothing indicating they are loaded when I do "modprobe wl12xx".


Could someone please share a /proc/config.gz from some working board 
(with a recent kernel), just to eliminate the possibility of something 
wrong there after all?

And - are you using the omap3-cm-t3730.dtb or the omap3-sbc-t3730.dtb?


This is extract from my console output at boot:

Starting HOSTAP Daemon: Configuration file: /etc/hostapd.conf
[   15.884643] cfg80211: Loading compiled-in X.509 certificates for 
regulatory database
[   16.051849] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
Could not read interface wlan0 flags: No such device
nl80211: Driver does not support authentication/association or connect 
commands
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Could not read interface wlan0 flags: No such device
nl80211 driver initialization failed.
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED
wlan0: CTRL-EVENT-TERMINATING
hostapd_free_hapd_data: Interface wlan0 wasn't started




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: WL1271 on CM-T3730
  2020-06-17 10:44   ` Oskar Enoksson
@ 2020-06-17 16:51     ` Tony Lindgren
  2020-06-19  7:55       ` H. Nikolaus Schaller
  0 siblings, 1 reply; 12+ messages in thread
From: Tony Lindgren @ 2020-06-17 16:51 UTC (permalink / raw)
  To: Oskar Enoksson; +Cc: linux-omap

* Oskar Enoksson <enok@lysator.liu.se> [200617 10:45]:
> Could someone please share a /proc/config.gz from some working board (with a
> recent kernel), just to eliminate the possibility of something wrong there
> after all?

Looks like I don't have it, but it was just omap2plus_defconfig really.

> And - are you using the omap3-cm-t3730.dtb or the omap3-sbc-t3730.dtb?

I'm using omap3-sbc-t3730.dtb as I have the "single board computer".

Regards,

Tony

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: WL1271 on CM-T3730
  2020-06-17 16:51     ` Tony Lindgren
@ 2020-06-19  7:55       ` H. Nikolaus Schaller
  0 siblings, 0 replies; 12+ messages in thread
From: H. Nikolaus Schaller @ 2020-06-19  7:55 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Oskar Enoksson, linux-omap

Hi,


> Am 17.06.2020 um 18:51 schrieb Tony Lindgren <tony@atomide.com>:
> 
> * Oskar Enoksson <enok@lysator.liu.se> [200617 10:45]:
>> Could someone please share a /proc/config.gz from some working board (with a
>> recent kernel), just to eliminate the possibility of something wrong there
>> after all?
> 
> Looks like I don't have it, but it was just omap2plus_defconfig really.
> 
>> And - are you using the omap3-cm-t3730.dtb or the omap3-sbc-t3730.dtb?
> 
> I'm using omap3-sbc-t3730.dtb as I have the "single board computer".
> 
> Regards,
> 
> Tony


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: WL1271 on CM-T3730
  2020-06-15 21:04 WL1271 on CM-T3730 Oskar Enoksson
  2020-06-16 15:39 ` Tony Lindgren
@ 2020-06-19  7:55 ` H. Nikolaus Schaller
  2020-06-21  9:23   ` Oskar Enoksson
  1 sibling, 1 reply; 12+ messages in thread
From: H. Nikolaus Schaller @ 2020-06-19  7:55 UTC (permalink / raw)
  To: Oskar Enoksson; +Cc: linux-omap

Hi,

> Am 15.06.2020 um 23:04 schrieb Oskar Enoksson <enok@lysator.liu.se>:
> 
> Hello all, sorry to bother, I'm urgently in need of some help/hints.
> 
> I'm trying to make wifi work on an Compulab CM-T3730, an old OMAP3 board with WL1271 Wifi chip connected to an mmc via SDIO.

I managed to boot the PandaBoard ES with v5.8-rc1 and there, the wl1271 works.

So it may be an omap3 or board specific issue.

BR,
Nikolaus

> 
> Everything works with the kernel supported by Texas Instruments 3.0.87 but I need a newer kernel. There is a device tree file omap3-cm-t3730.dts in the Linux mainline sourcees, but it doesn't work for me, the Wifi chip is not detected on the SDIO bus. I'm using mainline linux 5.6.18, but I also tried 4.14, 4.9 and 3.16 with similar results.
> 
> What could be the problem?
> 
> When I boot I can see (by enabling various verbose printouts) that the appropriate mmc is bound to the right driver omap_hsmmc, but no device is detected on the SDIO bus. Some power pin messages look worrying but maybe it's ok?:
> 
> [    4.584228] platform 480b4000.mmc: Retrying from deferred list
> [    4.584808] bus: 'platform': driver_probe_device: matched device 480b4000.mmc with driver omap_hsmmc
> [    4.584838] bus: 'platform': really_probe: probing driver omap_hsmmc with device 480b4000.mmc
> [    4.585083] omap_hsmmc 480b4000.mmc: no init pinctrl state
> [    4.585144] omap_hsmmc 480b4000.mmc: no sleep pinctrl state
> [    4.585174] omap_hsmmc 480b4000.mmc: no idle pinctrl state
> [    4.585571] omap_hsmmc 480b4000.mmc: GPIO lookup for consumer wp
> [    4.585571] omap_hsmmc 480b4000.mmc: using device tree for GPIO lookup
> [    4.585662] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp@68000000/mmc@480b4000[0]'
> [    4.585723] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp@68000000/mmc@480b4000[0]'
> [    4.585754] omap_hsmmc 480b4000.mmc: using lookup tables for GPIO lookup
> [    4.585784] omap_hsmmc 480b4000.mmc: No GPIO consumer wp found
> [    4.586669] omap_hsmmc 480b4000.mmc: Looking up vmmc-supply from device tree
> [    4.587097] devices_kset: Moving 480b4000.mmc to end of list
> [    4.587127] omap_hsmmc 480b4000.mmc: Linked as a consumer to regulator.9
> [    4.587158] omap_hsmmc 480b4000.mmc: Looking up vqmmc-supply from device tree
> [    4.587615] devices_kset: Moving 480b4000.mmc to end of list
> [    4.587646] omap_hsmmc 480b4000.mmc: Linked as a consumer to regulator.6
> [    4.587677] omap_hsmmc 480b4000.mmc: Looking up pbias-supply from device tree
> [    4.587738] omap_hsmmc 480b4000.mmc: Looking up pbias-supply property in node /ocp@68000000/mmc@480b4000 failed
> [    4.587860] device: 'mmc1': device_add
> [    4.613861] driver: 'omap_hsmmc': driver_bound: bound to device '480b4000.mmc'
> [    4.614105] bus: 'platform': really_probe: bound device 480b4000.mmc to driver omap_hsmmc
> 
> 
> 
> When I manually modprobe wlcore, then wlcore_sdio, then wl12xx, dmesg shows:
> 
> [   49.467132] device class 'rfkill': registering
> [   49.467376] device: 'rfkill': device_add
> [   50.070983] device class 'ieee80211': registering
> [   50.072143] Registering platform device 'regulatory.0'. Parent at platform
> [   50.072174] device: 'regulatory.0': device_add
> [   50.072235] bus: 'platform': add device regulatory.0
> [   50.072906] cfg80211: Loading compiled-in X.509 certificates for regulatory database
> [   50.173675] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
> [   54.470794] bus: 'sdio': add driver wl1271_sdio
> [   59.017272] bus: 'platform': add driver wl12xx_driver
> 
> 
> 
> Still, no wlan0 interface visible with "ifconfig -a"
> 
> Is something wrong/missing in the devicetree? cap-sdio-irq? mmc-pwrseq? Or is the pin configuration in the device tree wrong? Did anyone ever try the device tree on a board with wl1271 wifi (it is optional)? I don't even have a schematic so I can't double check the pins.
> 
> Hints much appreciated!! Device tree file is attached (from mainline kernel 5.6.18)
> <omap3-cm-t3730.dts>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: WL1271 on CM-T3730
  2020-06-19  7:55 ` H. Nikolaus Schaller
@ 2020-06-21  9:23   ` Oskar Enoksson
  2020-06-21 22:00     ` Oskar Enoksson
  2020-06-22 15:24     ` Tony Lindgren
  0 siblings, 2 replies; 12+ messages in thread
From: Oskar Enoksson @ 2020-06-21  9:23 UTC (permalink / raw)
  To: H. Nikolaus Schaller; +Cc: linux-omap, Tony Lindgren

Yes, it turned out that when I use the omap3-sbc-3730 devicetree then 
wifi starts up ok.

I used omap3-cm-t3730 devicetree since I just use the CM T3730 on a 
custom carrier board which does not have any of the stuff on the T35 board

(Actually I wrote a custom device tree inheriting from 
omap3-cm-t3730.dts adding a few things needed for my carrier board).

After some experiments I deduce that the only thing missing in 
omap3-cm-t3730.dts is the compatible line needs to start with 
"compulab,omap3-sbc-t3730".

There is a function "omap3_sbc_t3730_legacy_init" in 
arch/arm/mach-omap2/pdata-quirks.c which seems to be triggered by the 
string "compulab,omap3-sbc-t3730". My guess is that this is needed for 
wifi to be initialized.

Maybe this should better be triggered by "compulab,omap3-cm-t3730" 
instead, since the wifi functionality has nothing to do with the t35 board?

On 6/19/20 9:55 AM, H. Nikolaus Schaller wrote:
> Hi,
> 
>> Am 15.06.2020 um 23:04 schrieb Oskar Enoksson <enok@lysator.liu.se>:
>>
>> Hello all, sorry to bother, I'm urgently in need of some help/hints.
>>
>> I'm trying to make wifi work on an Compulab CM-T3730, an old OMAP3 board with WL1271 Wifi chip connected to an mmc via SDIO.
> 
> I managed to boot the PandaBoard ES with v5.8-rc1 and there, the wl1271 works.
> 
> So it may be an omap3 or board specific issue.
> 
> BR,
> Nikolaus
> 
>>
>> Everything works with the kernel supported by Texas Instruments 3.0.87 but I need a newer kernel. There is a device tree file omap3-cm-t3730.dts in the Linux mainline sourcees, but it doesn't work for me, the Wifi chip is not detected on the SDIO bus. I'm using mainline linux 5.6.18, but I also tried 4.14, 4.9 and 3.16 with similar results.
>>
>> What could be the problem?
>>
>> When I boot I can see (by enabling various verbose printouts) that the appropriate mmc is bound to the right driver omap_hsmmc, but no device is detected on the SDIO bus. Some power pin messages look worrying but maybe it's ok?:
>>
>> [    4.584228] platform 480b4000.mmc: Retrying from deferred list
>> [    4.584808] bus: 'platform': driver_probe_device: matched device 480b4000.mmc with driver omap_hsmmc
>> [    4.584838] bus: 'platform': really_probe: probing driver omap_hsmmc with device 480b4000.mmc
>> [    4.585083] omap_hsmmc 480b4000.mmc: no init pinctrl state
>> [    4.585144] omap_hsmmc 480b4000.mmc: no sleep pinctrl state
>> [    4.585174] omap_hsmmc 480b4000.mmc: no idle pinctrl state
>> [    4.585571] omap_hsmmc 480b4000.mmc: GPIO lookup for consumer wp
>> [    4.585571] omap_hsmmc 480b4000.mmc: using device tree for GPIO lookup
>> [    4.585662] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp@68000000/mmc@480b4000[0]'
>> [    4.585723] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp@68000000/mmc@480b4000[0]'
>> [    4.585754] omap_hsmmc 480b4000.mmc: using lookup tables for GPIO lookup
>> [    4.585784] omap_hsmmc 480b4000.mmc: No GPIO consumer wp found
>> [    4.586669] omap_hsmmc 480b4000.mmc: Looking up vmmc-supply from device tree
>> [    4.587097] devices_kset: Moving 480b4000.mmc to end of list
>> [    4.587127] omap_hsmmc 480b4000.mmc: Linked as a consumer to regulator.9
>> [    4.587158] omap_hsmmc 480b4000.mmc: Looking up vqmmc-supply from device tree
>> [    4.587615] devices_kset: Moving 480b4000.mmc to end of list
>> [    4.587646] omap_hsmmc 480b4000.mmc: Linked as a consumer to regulator.6
>> [    4.587677] omap_hsmmc 480b4000.mmc: Looking up pbias-supply from device tree
>> [    4.587738] omap_hsmmc 480b4000.mmc: Looking up pbias-supply property in node /ocp@68000000/mmc@480b4000 failed
>> [    4.587860] device: 'mmc1': device_add
>> [    4.613861] driver: 'omap_hsmmc': driver_bound: bound to device '480b4000.mmc'
>> [    4.614105] bus: 'platform': really_probe: bound device 480b4000.mmc to driver omap_hsmmc
>>
>>
>>
>> When I manually modprobe wlcore, then wlcore_sdio, then wl12xx, dmesg shows:
>>
>> [   49.467132] device class 'rfkill': registering
>> [   49.467376] device: 'rfkill': device_add
>> [   50.070983] device class 'ieee80211': registering
>> [   50.072143] Registering platform device 'regulatory.0'. Parent at platform
>> [   50.072174] device: 'regulatory.0': device_add
>> [   50.072235] bus: 'platform': add device regulatory.0
>> [   50.072906] cfg80211: Loading compiled-in X.509 certificates for regulatory database
>> [   50.173675] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
>> [   54.470794] bus: 'sdio': add driver wl1271_sdio
>> [   59.017272] bus: 'platform': add driver wl12xx_driver
>>
>>
>>
>> Still, no wlan0 interface visible with "ifconfig -a"
>>
>> Is something wrong/missing in the devicetree? cap-sdio-irq? mmc-pwrseq? Or is the pin configuration in the device tree wrong? Did anyone ever try the device tree on a board with wl1271 wifi (it is optional)? I don't even have a schematic so I can't double check the pins.
>>
>> Hints much appreciated!! Device tree file is attached (from mainline kernel 5.6.18)
>> <omap3-cm-t3730.dts>
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: WL1271 on CM-T3730
  2020-06-21  9:23   ` Oskar Enoksson
@ 2020-06-21 22:00     ` Oskar Enoksson
  2020-06-22 15:28       ` Tony Lindgren
  2020-06-22 15:24     ` Tony Lindgren
  1 sibling, 1 reply; 12+ messages in thread
From: Oskar Enoksson @ 2020-06-21 22:00 UTC (permalink / raw)
  To: H. Nikolaus Schaller; +Cc: linux-omap, Tony Lindgren

Correction: occasionally wl1271_sdio initialization still fails with 
error messages such as

[   46.961364] wl1271_sdio: probe of mmc1:0001:1 failed with error -16
[   46.967834] wl1271_sdio: probe of mmc1:0001:2 failed with error -16

other times

[   27.302215][  T903] wl1271_sdio mmc1:0001:2: wl12xx_sdio_power_on: 
failed to get_sync(-22)

or
root@pte2000:~# ifup wlan0
[   53.799468][ T2420] wl1271_sdio mmc1:0001:2: wl12xx_sdio_power_on: 
failed to get_sync(-110)
[   53.840118][ T2420] wl1271_sdio mmc1:0001:2: wl12xx_sdio_power_on: 
failed to get_sync(-22)
[   53.879882][ T2420] wl1271_sdio mmc1:0001:2: wl12xx_sdio_power_on: 
failed to get_sync(-22)
[   53.888610][ T2420] wlcore: ERROR firmware boot failed despite 3 retries
RTNETLINK answers: Invalid argument
ifup: failed to bring up wlan0





On 6/21/20 11:23 AM, Oskar Enoksson wrote:
> Yes, it turned out that when I use the omap3-sbc-3730 devicetree then 
> wifi starts up ok.
> 
> I used omap3-cm-t3730 devicetree since I just use the CM T3730 on a 
> custom carrier board which does not have any of the stuff on the T35 board
> 
> (Actually I wrote a custom device tree inheriting from 
> omap3-cm-t3730.dts adding a few things needed for my carrier board).
> 
> After some experiments I deduce that the only thing missing in 
> omap3-cm-t3730.dts is the compatible line needs to start with 
> "compulab,omap3-sbc-t3730".
> 
> There is a function "omap3_sbc_t3730_legacy_init" in 
> arch/arm/mach-omap2/pdata-quirks.c which seems to be triggered by the 
> string "compulab,omap3-sbc-t3730". My guess is that this is needed for 
> wifi to be initialized.
> 
> Maybe this should better be triggered by "compulab,omap3-cm-t3730" 
> instead, since the wifi functionality has nothing to do with the t35 board?
> 
> On 6/19/20 9:55 AM, H. Nikolaus Schaller wrote:
>> Hi,
>>
>>> Am 15.06.2020 um 23:04 schrieb Oskar Enoksson <enok@lysator.liu.se>:
>>>
>>> Hello all, sorry to bother, I'm urgently in need of some help/hints.
>>>
>>> I'm trying to make wifi work on an Compulab CM-T3730, an old OMAP3 
>>> board with WL1271 Wifi chip connected to an mmc via SDIO.
>>
>> I managed to boot the PandaBoard ES with v5.8-rc1 and there, the 
>> wl1271 works.
>>
>> So it may be an omap3 or board specific issue.
>>
>> BR,
>> Nikolaus
>>
>>>
>>> Everything works with the kernel supported by Texas Instruments 
>>> 3.0.87 but I need a newer kernel. There is a device tree file 
>>> omap3-cm-t3730.dts in the Linux mainline sourcees, but it doesn't 
>>> work for me, the Wifi chip is not detected on the SDIO bus. I'm using 
>>> mainline linux 5.6.18, but I also tried 4.14, 4.9 and 3.16 with 
>>> similar results.
>>>
>>> What could be the problem?
>>>
>>> When I boot I can see (by enabling various verbose printouts) that 
>>> the appropriate mmc is bound to the right driver omap_hsmmc, but no 
>>> device is detected on the SDIO bus. Some power pin messages look 
>>> worrying but maybe it's ok?:
>>>
>>> [    4.584228] platform 480b4000.mmc: Retrying from deferred list
>>> [    4.584808] bus: 'platform': driver_probe_device: matched device 
>>> 480b4000.mmc with driver omap_hsmmc
>>> [    4.584838] bus: 'platform': really_probe: probing driver 
>>> omap_hsmmc with device 480b4000.mmc
>>> [    4.585083] omap_hsmmc 480b4000.mmc: no init pinctrl state
>>> [    4.585144] omap_hsmmc 480b4000.mmc: no sleep pinctrl state
>>> [    4.585174] omap_hsmmc 480b4000.mmc: no idle pinctrl state
>>> [    4.585571] omap_hsmmc 480b4000.mmc: GPIO lookup for consumer wp
>>> [    4.585571] omap_hsmmc 480b4000.mmc: using device tree for GPIO 
>>> lookup
>>> [    4.585662] of_get_named_gpiod_flags: can't parse 'wp-gpios' 
>>> property of node '/ocp@68000000/mmc@480b4000[0]'
>>> [    4.585723] of_get_named_gpiod_flags: can't parse 'wp-gpio' 
>>> property of node '/ocp@68000000/mmc@480b4000[0]'
>>> [    4.585754] omap_hsmmc 480b4000.mmc: using lookup tables for GPIO 
>>> lookup
>>> [    4.585784] omap_hsmmc 480b4000.mmc: No GPIO consumer wp found
>>> [    4.586669] omap_hsmmc 480b4000.mmc: Looking up vmmc-supply from 
>>> device tree
>>> [    4.587097] devices_kset: Moving 480b4000.mmc to end of list
>>> [    4.587127] omap_hsmmc 480b4000.mmc: Linked as a consumer to 
>>> regulator.9
>>> [    4.587158] omap_hsmmc 480b4000.mmc: Looking up vqmmc-supply from 
>>> device tree
>>> [    4.587615] devices_kset: Moving 480b4000.mmc to end of list
>>> [    4.587646] omap_hsmmc 480b4000.mmc: Linked as a consumer to 
>>> regulator.6
>>> [    4.587677] omap_hsmmc 480b4000.mmc: Looking up pbias-supply from 
>>> device tree
>>> [    4.587738] omap_hsmmc 480b4000.mmc: Looking up pbias-supply 
>>> property in node /ocp@68000000/mmc@480b4000 failed
>>> [    4.587860] device: 'mmc1': device_add
>>> [    4.613861] driver: 'omap_hsmmc': driver_bound: bound to device 
>>> '480b4000.mmc'
>>> [    4.614105] bus: 'platform': really_probe: bound device 
>>> 480b4000.mmc to driver omap_hsmmc
>>>
>>>
>>>
>>> When I manually modprobe wlcore, then wlcore_sdio, then wl12xx, dmesg 
>>> shows:
>>>
>>> [   49.467132] device class 'rfkill': registering
>>> [   49.467376] device: 'rfkill': device_add
>>> [   50.070983] device class 'ieee80211': registering
>>> [   50.072143] Registering platform device 'regulatory.0'. Parent at 
>>> platform
>>> [   50.072174] device: 'regulatory.0': device_add
>>> [   50.072235] bus: 'platform': add device regulatory.0
>>> [   50.072906] cfg80211: Loading compiled-in X.509 certificates for 
>>> regulatory database
>>> [   50.173675] cfg80211: Loaded X.509 cert 'sforshee: 
>>> 00b28ddf47aef9cea7'
>>> [   54.470794] bus: 'sdio': add driver wl1271_sdio
>>> [   59.017272] bus: 'platform': add driver wl12xx_driver
>>>
>>>
>>>
>>> Still, no wlan0 interface visible with "ifconfig -a"
>>>
>>> Is something wrong/missing in the devicetree? cap-sdio-irq? 
>>> mmc-pwrseq? Or is the pin configuration in the device tree wrong? Did 
>>> anyone ever try the device tree on a board with wl1271 wifi (it is 
>>> optional)? I don't even have a schematic so I can't double check the 
>>> pins.
>>>
>>> Hints much appreciated!! Device tree file is attached (from mainline 
>>> kernel 5.6.18)
>>> <omap3-cm-t3730.dts>
>>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: WL1271 on CM-T3730
  2020-06-21  9:23   ` Oskar Enoksson
  2020-06-21 22:00     ` Oskar Enoksson
@ 2020-06-22 15:24     ` Tony Lindgren
  1 sibling, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2020-06-22 15:24 UTC (permalink / raw)
  To: Oskar Enoksson; +Cc: H. Nikolaus Schaller, linux-omap

* Oskar Enoksson <enok@lysator.liu.se> [200621 09:24]:
> Yes, it turned out that when I use the omap3-sbc-3730 devicetree then wifi
> starts up ok.

OK

> Maybe this should better be triggered by "compulab,omap3-cm-t3730" instead,
> since the wifi functionality has nothing to do with the t35 board?

Yes if it depends on just the SoC module board and not the sbc board.

Regards,

Tony

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: WL1271 on CM-T3730
  2020-06-21 22:00     ` Oskar Enoksson
@ 2020-06-22 15:28       ` Tony Lindgren
  2020-07-01  6:07         ` Oskar Enoksson
  0 siblings, 1 reply; 12+ messages in thread
From: Tony Lindgren @ 2020-06-22 15:28 UTC (permalink / raw)
  To: Oskar Enoksson; +Cc: H. Nikolaus Schaller, linux-omap

* Oskar Enoksson <enok@lysator.liu.se> [200621 22:01]:
> Correction: occasionally wl1271_sdio initialization still fails with error
> messages such as
> 
> [   46.961364] wl1271_sdio: probe of mmc1:0001:1 failed with error -16
> [   46.967834] wl1271_sdio: probe of mmc1:0001:2 failed with error -16
> 
> other times
> 
> [   27.302215][  T903] wl1271_sdio mmc1:0001:2: wl12xx_sdio_power_on: failed
> to get_sync(-22)
> 
> or
> root@pte2000:~# ifup wlan0
> [   53.799468][ T2420] wl1271_sdio mmc1:0001:2: wl12xx_sdio_power_on: failed
> to get_sync(-110)
> [   53.840118][ T2420] wl1271_sdio mmc1:0001:2: wl12xx_sdio_power_on: failed
> to get_sync(-22)
> [   53.879882][ T2420] wl1271_sdio mmc1:0001:2: wl12xx_sdio_power_on: failed
> to get_sync(-22)
> [   53.888610][ T2420] wlcore: ERROR firmware boot failed despite 3 retries
> RTNETLINK answers: Invalid argument
> ifup: failed to bring up wlan0

Maybe try changing the wl12xx_vmmc2 startup-delay-us to something
higher like 70000 we usually have?

Regards,

Tony

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: WL1271 on CM-T3730
  2020-06-22 15:28       ` Tony Lindgren
@ 2020-07-01  6:07         ` Oskar Enoksson
  2020-07-02 16:40           ` Tony Lindgren
  0 siblings, 1 reply; 12+ messages in thread
From: Oskar Enoksson @ 2020-07-01  6:07 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: H. Nikolaus Schaller, linux-omap

Thanks for the hints. I did some experiments with increasing the 
startup-delay-us of wl12xx_vmmc2 but couldn't notice any effect.

I also tried other changes in the device tree, kernel command line 
arguments and kernel configuration, but I can't see any pattern in the 
result. Whatever I try the initialization very often still fails with 
errors as before. Occasionally I even get crashes such as:

> [    7.188934] mmc1: tried to HW reset card, got error -110
> sysctl: cannot stat /proc/sys/net/ipv4/tcp_syncookies: No such file or directory
> [    7.410125] ------------[ cut here ]------------
> [    7.414825] WARNING: CPU: 0 PID: 10 at drivers/net/wireless/ti/wlcore/sdio.c:131 wl12xx_sdio_raw_write+0xa3/0x104 [wlcore_sdio]
> [    7.426422] Modules linked in: wl12xx wlcore mac80211 libarc4 omapdrm sha256_generic libsha256 drm_kms_helper sha256_arm cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea cfg80211 joydev mousedev evdc
> [    7.506774] CPU: 0 PID: 10 Comm: kworker/0:1 Not tainted 5.4.28-pte-g6f3bf13d53 #1
> [    7.514465] Hardware name: Generic OMAP36xx (Flattened Device Tree)
> [    7.520812] Workqueue: events request_firmware_work_func
> [    7.526214] [<c010c0c5>] (unwind_backtrace) from [<c0109863>] (show_stack+0xb/0xc)
> [    7.533905] [<c0109863>] (show_stack) from [<c0122541>] (__warn+0xb5/0xb8)
> [    7.540893] [<c0122541>] (__warn) from [<c01227a9>] (warn_slowpath_fmt+0x41/0x7c)
> [    7.548461] [<c01227a9>] (warn_slowpath_fmt) from [<bfa0a217>] (wl12xx_sdio_raw_write+0xa3/0x104 [wlcore_sdio])
> [    7.558807] [<bfa0a217>] (wl12xx_sdio_raw_write [wlcore_sdio]) from [<bfaf9e9b>] (wlcore_set_partition+0x83/0x340 [wlcore])
> [    7.570220] [<bfaf9e9b>] (wlcore_set_partition [wlcore]) from [<bfaf402d>] (wl12xx_set_power_on+0x4d/0xd4 [wlcore])
> [    7.580841] [<bfaf402d>] (wl12xx_set_power_on [wlcore]) from [<bfaf5ea9>] (wlcore_nvs_cb+0xdd/0x804 [wlcore])
> [    7.590942] [<bfaf5ea9>] (wlcore_nvs_cb [wlcore]) from [<c04328ad>] (request_firmware_work_func+0x35/0x64)
> [    7.600708] [<c04328ad>] (request_firmware_work_func) from [<c0132efb>] (process_one_work+0x117/0x30c)
> [    7.610168] [<c0132efb>] (process_one_work) from [<c01331d7>] (worker_thread+0xe7/0x388)
> [    7.618316] [<c01331d7>] (worker_thread) from [<c0136f89>] (kthread+0xed/0xf4)
> [    7.625640] [<c0136f89>] (kthread) from [<c01010f9>] (ret_from_fork+0x11/0x38)
> [    7.632965] Exception stack(0xcd199fb0 to 0xcd199ff8)
> [    7.638061] 9fa0:                                     00000000 00000000 00000000 00000000
> [    7.646331] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> [    7.654602] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
> [    7.661285] ---[ end trace 09a18993a63ecdda ]---
> [    7.665954] wl1271_sdio mmc1:0001:2: sdio write failed (-110)



On 6/22/20 5:28 PM, Tony Lindgren wrote:
> * Oskar Enoksson <enok@lysator.liu.se> [200621 22:01]:
>> Correction: occasionally wl1271_sdio initialization still fails with error
>> messages such as
>>
>> [   46.961364] wl1271_sdio: probe of mmc1:0001:1 failed with error -16
>> [   46.967834] wl1271_sdio: probe of mmc1:0001:2 failed with error -16
>>
>> other times
>>
>> [   27.302215][  T903] wl1271_sdio mmc1:0001:2: wl12xx_sdio_power_on: failed
>> to get_sync(-22)
>>
>> or
>> root@pte2000:~# ifup wlan0
>> [   53.799468][ T2420] wl1271_sdio mmc1:0001:2: wl12xx_sdio_power_on: failed
>> to get_sync(-110)
>> [   53.840118][ T2420] wl1271_sdio mmc1:0001:2: wl12xx_sdio_power_on: failed
>> to get_sync(-22)
>> [   53.879882][ T2420] wl1271_sdio mmc1:0001:2: wl12xx_sdio_power_on: failed
>> to get_sync(-22)
>> [   53.888610][ T2420] wlcore: ERROR firmware boot failed despite 3 retries
>> RTNETLINK answers: Invalid argument
>> ifup: failed to bring up wlan0
> 
> Maybe try changing the wl12xx_vmmc2 startup-delay-us to something
> higher like 70000 we usually have?
> 
> Regards,
> 
> Tony
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: WL1271 on CM-T3730
  2020-07-01  6:07         ` Oskar Enoksson
@ 2020-07-02 16:40           ` Tony Lindgren
  0 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2020-07-02 16:40 UTC (permalink / raw)
  To: Oskar Enoksson; +Cc: H. Nikolaus Schaller, linux-omap

* Oskar Enoksson <enok@lysator.liu.se> [200701 06:08]:
> Thanks for the hints. I did some experiments with increasing the
> startup-delay-us of wl12xx_vmmc2 but couldn't notice any effect.

Hmm OK.

Care to try setting the wlcore interrupt in the dts to
IRQ_TYPE_LEVEL_HIGH and see if that helps?

Also please check the interrupt line related pinctrl pull
settings, if there's an external pull resistor the internal
pull should be disabled for the interrupt line.

> I also tried other changes in the device tree, kernel command line arguments
> and kernel configuration, but I can't see any pattern in the result.
> Whatever I try the initialization very often still fails with errors as
> before. Occasionally I even get crashes such as:
> 
> > [    7.188934] mmc1: tried to HW reset card, got error -110
> > sysctl: cannot stat /proc/sys/net/ipv4/tcp_syncookies: No such file or directory
> > [    7.410125] ------------[ cut here ]------------
> > [    7.414825] WARNING: CPU: 0 PID: 10 at drivers/net/wireless/ti/wlcore/sdio.c:131 wl12xx_sdio_raw_write+0xa3/0x104 [wlcore_sdio]

Hmm maybe give a try for the wlcore ELP wakeup patches I just posted as:

PATCHv2 0/4] Improvments for wlcore irq and resume for v5.9

To me it seems that I'm not seeing any more wlcore firmware reboots
that I was occasionally seeing earlier. Not sure about that though,
I guess we have to wait and see.

Regards,

Tony

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-07-02 16:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 21:04 WL1271 on CM-T3730 Oskar Enoksson
2020-06-16 15:39 ` Tony Lindgren
2020-06-17 10:44   ` Oskar Enoksson
2020-06-17 16:51     ` Tony Lindgren
2020-06-19  7:55       ` H. Nikolaus Schaller
2020-06-19  7:55 ` H. Nikolaus Schaller
2020-06-21  9:23   ` Oskar Enoksson
2020-06-21 22:00     ` Oskar Enoksson
2020-06-22 15:28       ` Tony Lindgren
2020-07-01  6:07         ` Oskar Enoksson
2020-07-02 16:40           ` Tony Lindgren
2020-06-22 15:24     ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).