[Letux-kernel] automatic charging working with 4.7
H. Nikolaus Schaller
hns at goldelico.com
Wed Jul 27 17:19:46 CEST 2016
> Am 27.07.2016 um 07:59 schrieb Andreas Kemnade <andreas at kemnade.info>:
> On Tue, 26 Jul 2016 22:12:19 +0200
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
>>> Am 26.07.2016 um 22:09 schrieb Andreas Kemnade
>>> <andreas at kemnade.info>:
>>> On Tue, 26 Jul 2016 21:07:30 +0200
>>> Andreas Kemnade <andreas at kemnade.info> wrote:
>>>> I finally took the advice given to us about in the UART slave
>>>> Fix powermanagement issues in userspace ;-)
>>>> So I did:
>>>> rmmod twl4030_charger
>>>> sleep 2
>>>> #USB PHY_CLK_CTRL
>>>> #seems to be already done
>>>> twl-i2c.sh USB w 0xFE 0x01
>>>> sleep 1
>>>> twl-i2c.sh USB r 0xFF
>>>> #should be 01
>>>> #USB POWER_CTL_SET OTG_EN
>>>> twl-i2c.sh USB w 0xAD 0x20
>>> modprobe twl4030_charger here seems to be enough here.
>> seems to prove that the problem is really in twl4030-phy.
> seems not to change on b_host.sh calls. I always got
> So twl-phy/musb does not properly react on pullup/down
> related interrupts.
Yes, there is a strange bug in the PHY subsystem. Maybe it is a folllow-up
of the RCU issue because it is triggered by some pm function?
I don't know.
What I know is that the USB-PHY is also not turned off during suspend...
Anyways, I have developed a workaround patch:
And now the charging symptoms are 100% explainable.
* the problem is that the OTG bit is not set when needed for charging.
* this leaves the ADC8 prescaler disabled and VBUS is measured to be 0mV.
* this makes the automatic charging stop shortly after enabling.
* and this also disables the ITHEN bit, which makes battery temperature measurements unavailable.
But all this are follow-up symptoms to the problem that the phy-twl4030 driver has a bug. Or reacts
that way to another bug.
Well, at least we have a simple workaround which makes it easier to
operate the GTA04 for debugging of other problems. This big roadblock
has now been removed (or tunneled).
Thanks and BR,
More information about the Letux-kernel