[Gta04-owner] Whose GTA04 think that battery is removed? Please report.
andreas at kemnade.info
Wed May 3 22:37:59 CEST 2017
On Wed, 3 May 2017 19:08:48 +0200
Andreas Kemnade <andreas at kemnade.info> wrote:
> > > 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...
> rmmod done
> 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?
hmm, looking at the schematics I found one interesting difference.
EN pin of X502 is controlled by vpll1. And madc operation might need
root at letux:/sys/class/regulator# cat regulator.18/uevent
OF_FULLNAME=/ocp at 68000000/i2c at 48070000/twl at 48/regulator-vpll1
root at letux:/sys/class/regulator# cat regulator.18/suspend_mem_state
hmm, how can I change the latter to "enabled"?
regulator-always-on seems not to be sufficient:
root at letux:/sys/firmware/devicetree# find | grep vpll1./base/ocp at 68000000/i2c at 48070000/twl at 48/regulator-vpll1
./base/ocp at 68000000/i2c at 48070000/twl at 48/regulator-vpll1/compatible
./base/ocp at 68000000/i2c at 48070000/twl at 48/regulator-vpll1/regulator-always-on
./base/ocp at 68000000/i2c at 48070000/twl at 48/regulator-vpll1/name
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the Gta04-owner