[Gta04-owner] Whose GTA04 think that battery is removed? Please report.
andreas at kemnade.info
Wed May 3 19:08:48 CEST 2017
On Wed, 3 May 2017 18:20:00 +0200
"H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> > Am 03.05.2017 um 17:15 schrieb Andreas Kemnade <andreas at kemnade.info>:
> > Hi,
> > On Wed, 3 May 2017 13:05:59 +0200
> > "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> >>> 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).
> > Well, as far as I understand even the bci does not detect a battery
> > disconnect directly. I disabled the corresponding bit in BCIMFEN4.
> > (BTW: There are some restrictions writing to that register, so read
> > back to check!) Still a battery "disconnection"
> > clearing WATCHDOGEN in that register inhibits that disconnection.
> > For some unknown reason that watchdog triggers (somehow trouble with
> > MADC). It resets the state machine of the charger. And as a side effect
> > there seems to be that disconnect.
> > So the key point is understanding
> > a) that watchdog.
> > b) access arbitation to madc.
> > - maybe some measurement is started and not finished
> > when it is suspended, but why this happens only on a5
> > not a4?
> > c) madc power management
> > - madc is enabled once but seems not to be disabled on suspend?
> > - some other resource is disabled but needed by madc,
> We have the generic-adc-battery driver as well and it uses madc.
ok, that can be simply disabled...
unbound twl4030_madc driver
the battery still gets "disconnected"
Conclusion: madc operations from kernel not guilty.
At least the generic adc battery driver is not suspicious.
So perhaps resources needed by madc are erronously powered down?
BTW: disabling the watchdog:
one way I found: turn on linear charging (doesn't matter if it is
twl-i2c.sh MAIN_CHARGE w 0x11 0x3E ; twl-i2c.sh MAIN_CHARGE w 0x15 0x62
turn back to your desired charge mode.
Now you can suspend.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the Gta04-owner