[Letux-kernel] Charging on GTA04
H. Nikolaus Schaller
hns at goldelico.com
Sun Jun 26 18:07:20 CEST 2016
> Am 26.06.2016 um 17:12 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>
>
>> Am 26.06.2016 um 15:01 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>>
>>
>>> Am 24.06.2016 um 10:03 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>>>
>>> Hi,
>>> it appears as if USB detection is now completely broken on -rc4...
>>>
>>> I have two boards where I neither get some "USB plugged in" nor
>>> does /sys/class/power/usb start charging.
>>>
>>> Something has gone wild.
>>>
>>> Does it work for anyone of you?
>>
>> Here some observations to this problem (using letux-4.7-rc4):
>>
>> root at letux:/sys/class/power_supply/twl4030_usb# cat uevent
>> POWER_SUPPLY_NAME=twl4030_usb
>> POWER_SUPPLY_STATUS=Not charging
>> POWER_SUPPLY_ONLINE=0
>> POWER_SUPPLY_INPUT_CURRENT_LIMIT=841
>> root at letux:/sys/class/power_supply/twl4030_usb# echo continuous >mode
>> root at letux:/sys/class/power_supply/twl4030_usb# cat mode
>> off auto [continuous]
>> root at letux:/sys/class/power_supply/twl4030_usb# cat uevent
>> POWER_SUPPLY_NAME=twl4030_usb
>> POWER_SUPPLY_STATUS=Charging
>> POWER_SUPPLY_ONLINE=1
>> POWER_SUPPLY_VOLTAGE_NOW=0
>> POWER_SUPPLY_CURRENT_NOW=12474
>> POWER_SUPPLY_INPUT_CURRENT_LIMIT=841
>> root at letux:/sys/class/power_supply/twl4030_usb# echo auto >mode
>> [ 189.735412] twl4030_bci 48070000.i2c:twl at 48:bci: battery temperature out of range
>> [ 189.766967] twl4030_bci 48070000.i2c:twl at 48:bci: battery temperature out of range
>> root at letux:/sys/class/power_supply/twl4030_usb# cat uevent
>> POWER_SUPPLY_NAME=twl4030_usb
>> POWER_SUPPLY_STATUS=Not charging
>> POWER_SUPPLY_ONLINE=0
>> POWER_SUPPLY_INPUT_CURRENT_LIMIT=841
>> root at letux:/sys/class/power_supply/twl4030_usb#
>>
>> This means:
>> 1. "auto" mode is broken
>> 2. continuous mode seems to charge
>> 3. switching back to auto mode gives strange "battery temperature out of range" warning
>>
>> And I have no ethernet-gadget.
>>
>> I think I should compare with letux-4.6.0 or other -rc. And I should enable debugging
>> of the driver.
>
> Well, 4.6.0 isn't charging as well (and no ethernet gadget). And older versions are not properly booting.
>
> One strange observation:
>
> root at letux:~# cat /sys/class/power_supply/twl4030_usb/voltage_now
> 0
> root at letux:~# cat /sys/class/power_supply/twl4030_usb/uevent
> POWER_SUPPLY_NAME=twl4030_usb
> POWER_SUPPLY_STATUS=Charging
> POWER_SUPPLY_ONLINE=1
> POWER_SUPPLY_VOLTAGE_NOW=0
> POWER_SUPPLY_CURRENT_NOW=808476
> POWER_SUPPLY_INPUT_CURRENT_LIMIT=798505
> root at letux:~#
>
> This means that voltage_now and POWER_SUPPLY_VOLTAGE_NOW is 0 although charging!
>
> This is definitively different to 4.6.0 where USB voltage is displayed.
>
> Is perhaps the madc broken?
Yes and no...
This is what I get with #define DEBUG
root at letux:~# dmesg|fgrep bci
[ 8.864227] driver_register 'twl4030_bci'
[ 8.864868] twl4030_bci_probe
[ 8.864959] twl4030_bci_probe: of_find_compatible_node
[ 8.865020] devm_usb_get_phy_by_node(ddcd2410 48070000.i2c:twl at 48:bci, df9b1af4 twl4030-usb, ddfad020)
[ 8.865051] bci->transceiver = fffffdfb
[ 8.943939] twl4030_bci_probe
[ 8.944000] twl4030_bci_probe: of_find_compatible_node
[ 8.944061] devm_usb_get_phy_by_node(ddcd2410 48070000.i2c:twl at 48:bci, df9b1af4 twl4030-usb, ddfad020)
[ 8.944091] bci->transceiver = fffffdfb
[ 8.953796] twl4030_bci_probe
[ 8.953857] twl4030_bci_probe: of_find_compatible_node
[ 8.953918] devm_usb_get_phy_by_node(ddcd2410 48070000.i2c:twl at 48:bci, df9b1af4 twl4030-usb, ddfad220)
[ 8.953948] bci->transceiver = fffffdfb
[ 8.973114] twl4030_bci_probe
[ 8.973175] twl4030_bci_probe: of_find_compatible_node
[ 8.973236] devm_usb_get_phy_by_node(ddcd2410 48070000.i2c:twl at 48:bci, df9b1af4 twl4030-usb, ddfad220)
[ 8.973266] bci->transceiver = fffffdfb
[ 8.988189] twl4030_bci_probe
[ 8.988250] twl4030_bci_probe: of_find_compatible_node
[ 8.988311] devm_usb_get_phy_by_node(ddcd2410 48070000.i2c:twl at 48:bci, df9b1af4 twl4030-usb, ddd99320)
[ 8.988342] bci->transceiver = fffffdfb
[ 9.232696] twl4030_bci_probe
[ 9.232788] twl4030_bci_probe: of_find_compatible_node
[ 9.232849] devm_usb_get_phy_by_node(ddcd2410 48070000.i2c:twl at 48:bci, df9b1af4 twl4030-usb, ddd99320)
[ 9.232849] bci->transceiver = fffffdfb
[ 9.238159] twl4030_bci_probe
[ 9.238250] twl4030_bci_probe: of_find_compatible_node
[ 9.238281] devm_usb_get_phy_by_node(ddcd2410 48070000.i2c:twl at 48:bci, df9b1af4 twl4030-usb, ddfad020)
[ 9.238311] bci->transceiver = fffffdfb
[ 9.396270] twl4030_bci_probe
[ 9.396362] twl4030_bci_probe: of_find_compatible_node
[ 9.396392] devm_usb_get_phy_by_node(ddcd2410 48070000.i2c:twl at 48:bci, df9b1af4 twl4030-usb, dcac2f20)
[ 9.396423] bci->transceiver = fffffdfb
[ 9.424865] twl4030_bci_probe
[ 9.424957] twl4030_bci_probe: of_find_compatible_node
[ 9.424987] devm_usb_get_phy_by_node(ddcd2410 48070000.i2c:twl at 48:bci, df9b1af4 twl4030-usb, ddfad020)
[ 9.425018] bci->transceiver = fffffdfb
[ 9.477874] twl4030_bci_probe
[ 9.477966] twl4030_bci_probe: of_find_compatible_node
[ 9.477996] devm_usb_get_phy_by_node(ddcd2410 48070000.i2c:twl at 48:bci, df9b1af4 twl4030-usb, ddfad120)
[ 9.478027] bci->transceiver = fffffdfb
[ 9.530670] twl4030_bci_probe
[ 9.530761] twl4030_bci_probe: of_find_compatible_node
[ 9.530822] devm_usb_get_phy_by_node(ddcd2410 48070000.i2c:twl at 48:bci, df9b1af4 twl4030-usb, ddfad720)
[ 9.530853] bci->transceiver = dca39410
[ 9.530883] twl4030_bci 48070000.i2c:twl at 48:bci: could not request vac iio channel -19
[ 9.546997] twl4030_bci 48070000.i2c:twl at 48:bci: transceiver = dca39410
[ 9.546997] twl4030_bci 48070000.i2c:twl at 48:bci: OTG notify 0
[ 9.548370] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 9.549224] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 9.549804] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 9.550292] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 9.550781] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 9.551300] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 9.552612] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 9.553131] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 9.553558] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 9.554046] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 9.554534] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 9.554992] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 9.626617] twl4030_bci 48070000.i2c:twl at 48:bci: v=0 cur=-850000 limit=0 target=500000
[ 10.615722] twl4030_bci 48070000.i2c:twl at 48:bci: OTG notify 2
[ 12.135711] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.136260] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.136840] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.137390] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.137817] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.139190] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.139678] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.140136] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.140563] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.141021] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.143005] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.143524] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.143951] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.144409] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.144866] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.146545] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.146972] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.147460] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.147918] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.165832] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.168548] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.169006] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.169433] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.169860] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.170288] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.198486] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.201812] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.202239] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.202697] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.203155] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.211883] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.212341] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.212799] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.213226] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.213684] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.216888] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.217437] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.217895] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.219116] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.219635] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.419799] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.423065] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.423522] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.423980] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.424438] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.426727] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.427215] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.427642] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.428100] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.428558] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.430541] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.431182] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.431610] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.432067] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.432525] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.447662] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.448211] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.448669] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.449127] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 12.449554] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
root at letux:~#
root at letux:~# echo auto >/sys/class/power_supply/twl4030_usb/mode
[ 280.254119] twl4030_bci 48070000.i2c:twl at 48:bci: BCI irq 00 08
[ 280.266662] twl4030_bci 48070000.i2c:twl at 48:bci: BCI irq 00 08
[ 280.279632] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
root at letux:~# [ 280.288757] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.294769] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.303192] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.311340] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.319427] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.327392] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.334716] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.342620] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.356506] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.370605] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.387207] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.393249] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.403289] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.409912] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.418304] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.427124] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.439941] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.447601] twl4030_bci 48070000.i2c:twl at 48:bci: v=0 cur=9150 limit=0 target=500000
[ 280.452423] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.461273] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.465728] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.466339] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.466888] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.467437] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.467926] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.476196] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.488464] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.490081] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.502502] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.514495] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.557800] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.576171] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.586883] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.607116] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.622772] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.629150] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.638549] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.646270] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.652954] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.659973] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.667388] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.674468] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.681243] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.689605] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.700714] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.708557] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.716094] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.722961] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.731384] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.739349] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.747070] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.754119] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 280.761901] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
root at letux:~# echo continuous >/sys/class/power_supply/twl4030_usb/mode
root at letux:~# [ 324.358245] twl4030_bci 48070000.i2c:twl at 48:bci: BCI irq 00 10
[ 324.371276] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.378295] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.385040] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.394165] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.401306] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.402191] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.414855] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.426727] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.441223] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.447875] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.455444] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.463897] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.471313] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.479522] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.488952] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.497528] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.511199] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.522888] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.534454] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.544067] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.551605] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.558898] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.566894] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.573669] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.581848] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.589080] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.597717] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.652496] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.659973] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.667877] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.677307] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
[ 324.686981] twl4030_bci 48070000.i2c:twl at 48:bci: state: 00
Really interesting is
[ 9.530883] twl4030_bci 48070000.i2c:twl at 48:bci: could not request vac iio channel -19
Which means there is some error in the madc iio subsystem at that stage.
The second observation is that there is nothing happening on USB plug/unplug.
IMHO USB-Plug detection is also broken (don't know if hw or software).
So we have at least two issues.
BR,
Nikolaus
More information about the Letux-kernel
mailing list