[Gta04-owner] Sporadic USB charging issue identified

Andreas Kemnade andreas at kemnade.info
Fri Feb 22 09:45:09 CET 2013

On Wed, 20 Feb 2013 08:47:12 +0100
"Dr. H. Nikolaus Schaller" <hns at goldelico.com> wrote:

> Am 20.02.2013 um 07:55 schrieb Andreas Kemnade:
> > On Wed, 20 Feb 2013 08:22:07 +1100
> > NeilBrown <neilb at suse.de> wrote:
> > 
> >> On Tue, 19 Feb 2013 09:25:07 +0100 Dr.H.Nikolaus Schaller <hns at goldelico.com>
> >> wrote:
> >> 
> >>> So how do we get a good solution into the drivers?
> >>> 
> >> 
> >> I find it easier to think about solutions when I know exactly what is
> >> currently happening.
> >> So I would add some printk in the various interrupt handlers so that we know
> >> exactly what interrupts happen when, and what values are in the relevant
> >> registers at that time.
> > 
> > There are even enough debug printk which just wait do be enabled...
> > 
> > Just keep in mind another scenario: I found that there are many usb
> > cables with underdimenioned power lines. So you'll have a voltage drop
> > below the VBUSUNPLGEN/VBUSVT threshold when charging with full 600mA.
> Yes, that is the key scenario I am looking for a solution.
> The charger autonomously decided to resign by VBUSUNPLGEN=1 (which is not monitored by software).
> And since the OTG system thinks that VBUS is still available it does not see a necessity to restart charging.

So what is the goal here? Check something and then reenable charging?
You can reenable charging the same way as you would do when you do it
after an interrupt. But then voltage drops again and charging is
stopped again. So you are switching the
charge current on and off periodically. That sounds problematic. So you
do not get so much charge into the battery. Probably you'll have a
problem with low battery boots (high current consumption during boot
and low charging current). And you'll lever some safety goodies with
that method (the long term timeout stuff), These safety goodies are
also the same as the ones you loose with software-controlled charging. 

With VBUSUNPLUGEN=0 and automatic charging you have battery full events
on Vbus disconnects (current goes below a certain limit). The charging
stuff will then check whether the battery goes below 3.9V (in
hardware) and restarts charging. At least that solves the problem with
bad cables to a certain degree. Low battery boots work then. I am not
totally happy with that change since it is a bit against the spec.

The only thing which feels clean to me is the software controlled
charging. And then the question is whether it should be used as the
standard way or just as an option if unconventional power sources are

I guess i find time at the weekend to dig out some old stuff about the
charging issue.

Andreas Kemnade
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20130222/6a8f27f4/attachment-0001.bin>

More information about the Gta04-owner mailing list