[Gta04-owner] various powermanagement issues
H. Nikolaus Schaller
hns at goldelico.com
Mon Oct 19 06:50:55 CEST 2015
HI,
Am 19.10.2015 um 01:08 schrieb Neil Brown <neilb at suse.de>:
> xdrudis at tinet.cat writes:
>
>> On Sun, Oct 18, 2015 at 08:20:13AM +0200, H. Nikolaus Schaller wrote:
>>>
>>>
>>> Yes, that is indeed a known problem for a long time. It could be solved by
>>> modifying the MLO so that it turns on 500mA charging within the first 1-2 seconds.
>>>
>>> Currently, Linux must boot up to a point to enable 500 mA charging. This takes
>>> 30-60 seconds.
>>>
>>> Now a discharged battery is charged by ~50mA (trickle charge) until the device
>>> turns on as soon as the battery voltage reaches 3.3V. At that point it may be
>>> charged for just 1%.
>>>
>>> If this is not enough for booting to Linux (30-60 seconds @ 400 mA) full
>>> charging will fail.
>>>
>>
>> I haven't refreshed my memory, but I assume the reason is linux has a
>> complete enough USB stack to negotiate 500mA but MLO has a very more
>> basic USB stack (or none).
>
> The reality is much more prosaic (i.e. boring) than that.
> People have hacked Linux to make it work reasonably without going too
> far out of spec. Nobody has hacked the MLO in the same say. That's
> really all there is to it.
>
> One of my many frustrations is that the "correct" way to check if a
> charger is attached is to send a signal down the D+ line and see if it
> comes back along the D- line. i.e. check if D+ and D- are shorted.
> (I think that is a gross oversimplication, but it gives the idea).
>
> I believe that the TWL4030 USB phy is able to perform this test, but I
> cannot actually get it to work.
> So the only sort of charger we can reliable detect is the Openmoko
> charger that puts a resistor between the ID pin an Ground.
>
> It would be quite easy to get MLO to test for that resistor and enable
> high-current changing. I'd really like to more general "USB standard
> charger" test. But I cannot make it work.
Is it really necessary to detect a /charger/ from /non-charger/ compliant to
some standard? Or is itn't it sufficient to enable a little more mA going into
the battery to make Linux boot?
Yes, it is more a hack than implementing a spec, but I would be more
happy to have a hack that works than a spec that doesn't.
>
> (I guess I should hack the MLO, because I mostly charge with the
> openmoko charger...)
Yes, I'd be happy if someone could simply make
http://git.goldelico.com/?p=gta04-xloader.git;a=blob;f=board/omap3530gta04/omap3530gta04.c;h=1d490c94ad11f5fdba1b3660cce340bde7fb6fa2;hb=HEAD#l112
work as intended, i.e. help debugging since I do not have the time (we are all
volunteers!) to solve all such known problems myself.
BR,
NIkolaus
More information about the Gta04-owner
mailing list