[Letux-kernel] wwan logic inversion

H. Nikolaus Schaller hns at goldelico.com
Fri Nov 23 17:41:26 CET 2018


Hi,

> Am 23.11.2018 um 17:16 schrieb Andreas Kemnade <andreas at kemnade.info>:
> 
> Hi,
> 
> console log says this.
> 
> [24004.991638] wwan_on_off_rfkill_set_block: blocked: 0
> [24005.008514] wwan_on_off_set_power:on = 1
> [24005.013885] wwan_on_off_is_powered_on: USB phy event 0
> [24005.026580] wwan_on_off_is_powered_on: we assume 1
> [24005.031585] wwan_on_off_is_powered_on: return 'true'
^^^

> [24005.037811] wwan_on_off_set_power: state 1
> [24005.042388] wwan_on_off_set_power: done
> [24092.102325] wwan_on_off_rfkill_set_block: blocked: 0
> [24092.107940] wwan_on_off_set_power:on = 1
> [24092.112030] wwan_on_off_is_powered_on: USB phy event 0
> [24092.118408] wwan_on_off_is_powered_on: we assume 1
> [24092.123962] wwan_on_off_is_powered_on: return 'true'

^^^ this looks like it is not properly knowing the current state of the modem

> [24092.129302] wwan_on_off_set_power: state 1
> [24092.134033] wwan_on_off_set_power: done
> 
> using devmem2 for gpio toggle fixes the logic.
> root at gta04:/sys/firmware/devicetree/base/modem# xxd on-indicator-gpio 
> 0000000: 0000 0000                                ....
> 
> That does not look good.

I have booted my GTA04A5 and letux-4.18.19 I get this:

root at letux:~# root at letux:~# uname -a
Linux letux 4.18.19-letux+ #2908 SMP PREEMPT Sun Nov 18 21:45:59 CET 2018 armv7l GNU/Linux
root at letux:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root at letux:~# rfkill block wwan
[   67.235443] wwan_on_off_rfkill_set_block: blocked: 1
[   67.240814] wwan_on_off_set_power:on = 0
[   67.246246] wwan_on_off_is_powered_on: gpio value = 0
[   67.253387] wwan_on_off_is_powered_on: return 'false'
[   67.258911] wwan_on_off_set_power: state 0
[   67.267303] wwan_on_off_set_power: done
root at letux:~# rfkill unblock wwan
[   74.234497] wwan_on_off_rfkill_set_block: blocked: 0
[   74.239746] wwan_on_off_set_power:on = 1
[   74.245025] wwan_on_off_is_powered_on: gpio value = 0
[   74.250488] wwan_on_off_is_powered_on: return 'false'
[   74.257537] wwan_on_off_set_power: state 0
[   74.262237] wwan_on_off_set_power: send impulse
[   75.001800] wwan_on_off_is_powered_on: gpio value = 1
[   75.007232] wwan_on_off_is_powered_on: return 'true'
[   75.015136] wwan_on_off_set_power: done
[   77.291778] usb 1-2: new high-speed USB device number 2 using ehci-omap
[   77.494445] usb 1-2: New USB device found, idVendor=0af0, idProduct=8800, bcdDevice= 0.00
[   77.503234] usb 1-2: New USB device strings: Mfr=3, Product=2, SerialNumber=0
[   77.510833] usb 1-2: Product: Globetrotter HSUPA Modem
[   77.517517] usb 1-2: Manufacturer: Option N.V.
[   77.598114] hso: drivers/net/usb/hso.c: Option Wireless
[   77.686920] hso 1-2:1.5: Not our interface
[   77.700286] usbcore: registered new interface driver hso
root at letux:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0af0:8800 Option 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root at letux:~# rfkill block wwan
[   97.988525] wwan_on_off_rfkill_set_block: blocked: 1
[   97.994171] wwan_on_off_set_power:on = 0
[   97.998718] wwan_on_off_is_powered_on: gpio value = 1
[   98.007232] wwan_on_off_is_powered_on: return 'true'
[   98.013122] wwan_on_off_set_power: state 1
[   98.017395] wwan_on_off_set_power: send impulse
[   98.260742] usb 1-2: USB disconnect, device number 2
[   98.761810] wwan_on_off_is_powered_on: gpio value = 0
[   98.767242] wwan_on_off_is_powered_on: return 'false'
[   98.773590] wwan_on_off_set_power: done
root at letux:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root at letux:~# 

I have to cross-check with 4.18.20 and 4.19.3.

If it differs, we have to check DT and the wwan driver if we forgot
to forward-port some patch in 4.19.

BR,
NIkolaus

> 
> Regards,
> Andreas
> 
> On Fri, 23 Nov 2018 13:50:18 +0100
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> 
>> HI,
>> I also remember such a thing but there was a patch a while ago.
>> But I do not remember if it was for gta04a5 or if I did merge it into 4.19...
>> 
>> What does the console log say for rkill unblock/block? It should
>> report he feedback status and the on-off impulse.
>> 
>> BR,
>> Nikolaus
>> 
>>> Am 23.11.2018 um 13:06 schrieb Andreas Kemnade <andreas at kemnade.info>:
>>> 
>>> Hi,
>>> 
>>> I was just wondering about strange suspend current behavior and
>>> found out that wwan logic misbehaves on my gta04a5:
>>> 
>>> root at gta04:~# twl-i2c.sh GPIO r 0
>>> 0x02
>>> root at gta04:~# lsusb 
>>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> root at gta04:~# rfkill block wwan
>>> root at gta04:~# twl-i2c.sh GPIO r 0
>>> 0x42
>>> root at gta04:~# lsusb 
>>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> Bus 002 Device 003: ID 0af0:8800 Option 
>>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> root at gta04:~# rfkill unblock wwan
>>> root at gta04:~# twl-i2c.sh GPIO r 0
>>> 0x02
>>> root at gta04:~# lsusb 
>>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> root at gta04:~# rfkill block wwan
>>> root at gta04:~# twl-i2c.sh GPIO r 0
>>> 0x42
>>> root at gta04:~# lsusb 
>>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> Bus 002 Device 004: ID 0af0:8800 Option 
>>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> root at gta04:~# rfkill unblock wwan
>>> root at gta04:~# twl-i2c.sh GPIO r 0
>>> 0x02
>>> root at gta04:~# lsusb 
>>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> root at gta04:~# uname -a
>>> Linux gta04 4.19.3-letux+ #72 SMP PREEMPT Thu Nov 22 21:14:08 CET 2018 armv7l GNU/Linux
>>> root at gta04:~# 
>>> 
>>> 
>>> Regards,
>>> Andreas
>>> _______________________________________________
>>> http://projects.goldelico.com/p/gta04-kernel/
>>> Letux-kernel mailing list
>>> Letux-kernel at openphoenux.org
>>> http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel  
>> 
>> _______________________________________________
>> http://projects.goldelico.com/p/gta04-kernel/
>> Letux-kernel mailing list
>> Letux-kernel at openphoenux.org
>> http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel
>> 



More information about the Letux-kernel mailing list