[Gta04-owner] Whose GTA04 think that battery is removed? Please report.

H. Nikolaus Schaller hns at goldelico.com
Wed May 3 13:05:59 CEST 2017


> Am 29.04.2017 um 21:03 schrieb Andreas Kemnade <andreas at kemnade.info>:
> 
> Hi,
> 
> my GTA04A5 thinks its battery is disconnected when it is suspended
> while it is charging.
> The Letux 3704 does not do that. Same kernels!
> 
> This phenomenom does only happen on the gta04a5 when the bit
> WATCHDOGEN in BCIMFEN4 is enabled.
> 
> The bit is enabled by default. I am wondering whether this is a problem
> related to the GTA04A5 hardware or my device.
> 
> Battery "disconnection" leads to immediate wakeup and charging stop.
> 
> Or the battery of the Letux3704 has stronger ties to the device so that
> it cannot be disconnected by the kernel ;-)
> 
> Hmm, newer chip revision of the tps65950?

I am not aware of. We used the same A3 variant. And the only significant change
in the charging circuits is to use a different transistor. But that should not
end in a battery-disconnect detection (maybe we should try to find out what
situation does trigger that).

Ah, another difference: we have a different supercap. But it is difficult to
construct a connection to battery-disconnect during suspend.


Here some test results (but I don't know if they do the same test):

root at letux:~# echo mem > /sys/power/state
[  172.594757] PM: Syncing filesystems ... done.
[  172.683074] PM: Preparing system for sleep (mem)
[  172.742736] Freezing user space processes ... (elapsed 0.013 seconds) done.
[  172.764984] Freezing remaining freezable tasks ... (elapsed 0.010 seconds) done.
[  172.783355] PM: Suspending system (mem)
[  172.787536] Suspending console(s) (use no_console_suspend to debug)
[  172.834960] wlcore: down
[  172.869598] queueing ieee80211 work while going to suspend
[  172.876190] queueing ieee80211 work while going to suspend
[  173.000610] WWAN suspend
[  173.011322] PM: suspend of devices complete after 202.697 msecs
[  173.039093] PM: late suspend of devices complete after 27.709 msecs
[  173.069732] musb-omap2430 480ab000.usb_otg_hs: runtime PM trying to suspend device but active child
[  173.070281] usbhs_omap 48064000.usbhshost: runtime PM trying to suspend device but active child
[  173.079071] PM: noirq suspend of devices complete after 39.916 msecs
[  173.079254] Disabling non-boot CPUs ...
[  173.079315] Successfully put all powerdomains to target state
[  173.079315] Suspended for 0.046 seconds
[  173.112304] PM: noirq resume of devices complete after 28.808 msecs
[  173.134948] twl4030_bci 48070000.i2c:twl at 48:bci: battery disconnected
[  173.154083] PM: early resume of devices complete after 17.517 msecs
[  173.174499] WWAN resume
[  173.186492] GPS resuming 0 0 1
[  173.214996] iio_charge:-749
[  174.006591] wlcore: PHY firmware version: Rev 8.2.0.0.237
[  174.172027] wlcore: firmware booted (Rev 8.9.0.0.70)
[  174.277160] PM: resume of devices complete after 1122.833 msecs
[  174.412750] PM: Finishing wakeup.
[  174.416259] Restarting tasks ... done.
[  174.506713] thermal thermal_zone1: failed to read out thermal zone (1)
root at letux:~# echo mem > /sys/power/state
[  192.525970] PM: Syncing filesystems ... done.
[  193.023162] PM: Preparing system for sleep (mem)
[  193.039855] Freezing user space processes ... (elapsed 0.005 seconds) done.
[  193.052642] Freezing remaining freezable tasks ... (elapsed 0.003 seconds) done.
[  193.063812] PM: Suspending system (mem)
[  193.068054] Suspending console(s) (use no_console_suspend to debug)
[  193.084136] wlcore: down
[  193.091766] queueing ieee80211 work while going to suspend
[  193.092254] queueing ieee80211 work while going to suspend
[  193.140533] WWAN suspend
[  193.144042] PM: suspend of devices complete after 63.049 msecs
[  193.158294] PM: late suspend of devices complete after 14.190 msecs
[  193.170440] musb-omap2430 480ab000.usb_otg_hs: runtime PM trying to suspend device but active child
[  193.170562] usbhs_omap 48064000.usbhshost: runtime PM trying to suspend device but active child
[  193.173400] PM: noirq suspend of devices complete after 15.045 msecs
[  193.173400] Disabling non-boot CPUs ...
[  193.173431] Successfully put all powerdomains to target state
[  193.173431] Suspended for 4.760 seconds
[  193.184448] PM: noirq resume of devices complete after 10.803 msecs
[  193.207550] PM: early resume of devices complete after 10.070 msecs
[  193.213439] WWAN resume
[  193.218780] GPS resuming 0 0 1
[  193.236236] iio_charge:-747
[  193.837676] wlcore: PHY firmware version: Rev 8.2.0.0.237
[  193.955932] wlcore: firmware booted (Rev 8.9.0.0.70)
[  194.004150] PM: resume of devices complete after 796.447 msecs
[  194.127014] PM: Finishing wakeup.
[  194.130493] Restarting tasks ... done.
[  194.158630] thermal thermal_zone1: failed to read out thermal zone (1)
root at letux:~# root at letux:~# cat /sys/class/power_supply/twl4030_usb/uevent
POWER_SUPPLY_NAME=twl4030_usb
POWER_SUPPLY_STATUS=Not charging
POWER_SUPPLY_ONLINE=0
POWER_SUPPLY_INPUT_CURRENT_LIMIT=798505
root at letux:~#

The GTA04A5 was charging before. On the first suspend command it did wake up immediately and there is some "battery disconnected".
The second one did work and there was no "battery disconnected" (maybe because it was considered already disconnected).

After un/replugging the USB cable charging started again.
And the next suspend immediately woke up with "battery disconnected".

Now here for comparison some GTA04A4:

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=4536909
POWER_SUPPLY_CURRENT_NOW=758622
POWER_SUPPLY_INPUT_CURRENT_LIMIT=778564
root at letux:~# echo mem > /sys/power/state
[  162.888275] PM: Syncing filesystems ... done.
[  163.480804] PM: Preparing system for sleep (mem)
[  163.883483] mmc1: card 0001 removed
[  163.907043] Freezing user space processes ... (elapsed 0.009 seconds) done.
[  163.924499] Freezing remaining freezable tasks ... (elapsed 0.005 seconds) done.
[  163.937927] PM: Suspending system (mem)
[  163.941955] Suspending console(s) (use no_console_suspend to debug)
[  164.029510] WWAN suspend
[  164.034027] PM: suspend of devices complete after 79.223 msecs
[  164.044403] PM: late suspend of devices complete after 10.345 msecs
[  164.056457] musb-omap2430 480ab000.usb_otg_hs: runtime PM trying to suspend device but active child
[  164.056854] usbhs_omap 48064000.usbhshost: runtime PM trying to suspend device but active child
[  164.060577] PM: noirq suspend of devices complete after 16.113 msecs
[  164.060638] Disabling non-boot CPUs ...
[  164.060668] Successfully put all powerdomains to target state
[  164.060668] Suspended for 8.232 seconds
[  164.074249] PM: noirq resume of devices complete after 11.566 msecs
[  164.092712] PM: early resume of devices complete after 6.774 msecs
[  164.101593] WWAN resume
[  164.105895] GPS resuming 0 0 1
[  164.130462] iio_charge:863
[  164.130554] ------------[ cut here ]------------
[  164.130584] WARNING: CPU: 0 PID: 892 at drivers/gpio/gpiolib.c:106 gpio_to_desc+0x98/0xac
[  164.130584] invalid GPIO -2
[  164.130584] Modules linked in: bnep bluetooth usb_f_ecm g_ether usb_f_rndis u_ether libcomposite configfs ipv6 libertas_sdio libertas cfg80211 bq27xxx_battery omapdrm drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea panel_tpo_td028ttec1 snd_soc_simple_card drm w2sg0004 w2cbw003_bluetooth snd_soc_simple_card_utils snd_soc_omap_twl4030 encoder_opa362 twl4030_madc_hwmon wwan_on_off snd_soc_gtm601 pwm_omap_dmtimer connector_analog_tv generic_adc_battery pwm_bl extcon_gpio omap3_isp videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_core w1_bq27000 ov9650 omap2430 v4l2_common omap_hdq bmp280_i2c at24 bmp280 videodev itg3200 nvmem_core phy_twl4030_usb hmc5843_i2c bma180 hmc5843_core snd_soc_omap_mcbsp industrialio_triggered_buffer tsc2007 media
[  164.130859]  leds_tca6507 snd_soc_omap kfifo_buf musb_hdrc snd_pcm_dmaengine gpio_twl4030 twl4030_pwrbutton snd_soc_twl4030 twl4030_vibra twl4030_charger twl4030_madc industrialio ehci_omap omapdss
[  164.130920] CPU: 0 PID: 892 Comm: kworker/0:2 Tainted: G        W       4.10.10-letux+ #967
[  164.130920] Hardware name: Generic OMAP36xx (Flattened Device Tree)
[  164.130950] Workqueue: events gab_work [generic_adc_battery]
[  164.130981] [<c010f368>] (unwind_backtrace) from [<c010b914>] (show_stack+0x10/0x14)
[  164.131011] [<c010b914>] (show_stack) from [<c042fb80>] (dump_stack+0x98/0xd0)
[  164.131042] [<c042fb80>] (dump_stack) from [<c012f844>] (__warn+0xd0/0x100)
[  164.131042] [<c012f844>] (__warn) from [<c012f8a8>] (warn_slowpath_fmt+0x34/0x44)
[  164.131072] [<c012f8a8>] (warn_slowpath_fmt) from [<c046853c>] (gpio_to_desc+0x98/0xac)
[  164.131072] [<c046853c>] (gpio_to_desc) from [<bf1d7234>] (gab_work+0x84/0xd8 [generic_adc_battery])
[  164.131134] [<bf1d7234>] (gab_work [generic_adc_battery]) from [<c014c714>] (process_one_work+0x384/0x764)
[  164.131164] [<c014c714>] (process_one_work) from [<c014db04>] (worker_thread+0x2ac/0x3d4)
[  164.131164] [<c014db04>] (worker_thread) from [<c0152af8>] (kthread+0x118/0x134)
[  164.131195] [<c0152af8>] (kthread) from [<c01070d0>] (ret_from_fork+0x14/0x24)
[  164.131195] ---[ end trace e90140a37278646a ]---
[  164.200561] PM: resume of devices complete after 107.727 msecs
[  164.518920] PM: Finishing wakeup.
[  164.522399] Restarting tasks ... done.
[  164.618621] thermal thermal_zone1: failed to read out thermal zone (1)
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=4577967
POWER_SUPPLY_CURRENT_NOW=760284
POWER_SUPPLY_INPUT_CURRENT_LIMIT=778564
root at letux:~#

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20170503/0e2a427f/attachment.asc>


More information about the Gta04-owner mailing list