[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141119144348.169c4166@notabene.brown>
Date: Wed, 19 Nov 2014 14:43:48 +1100
From: NeilBrown <neilb@...e.de>
To: Felipe Balbi <balbi@...com>
Cc: Tony Lindgren <tony@...mide.com>,
"Dr. H. Nikolaus Schaller" <hns@...delico.com>,
Grazvydas Ignotas <notasas@...il.com>,
Igor Grinberg <grinberg@...pulab.co.il>,
Lee Jones <lee.jones@...aro.org>,
Samuel Ortiz <sameo@...ux.intel.com>,
"Russell King - ARM Linux" <linux@....linux.org.uk>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
List for communicating with real GTA04 owners
<gta04-owner@...delico.com>
Subject: Re: [PATCH] mfd: twl4030-power: Fix poweroff with PM configuration
enabled
On Wed, 12 Nov 2014 16:31:54 -0600 Felipe Balbi <balbi@...com> wrote:
> On Wed, Nov 12, 2014 at 01:20:27PM -0800, Tony Lindgren wrote:
> > * Dr. H. Nikolaus Schaller <hns@...delico.com> [141112 12:28]:
> > > Am 12.11.2014 um 16:45 schrieb Grazvydas Ignotas <notasas@...il.com>:
> > > > On Tue, Nov 4, 2014 at 5:42 PM, Tony Lindgren <tony@...mide.com> wrote:
> > > >
> > > > Pandora does, as well as GTA04 AFAIK,
> > >
> > > Yes. The trick is that the power level that turns on the device is a little higher
> > > and the battery provides enough energy for approx. 30 seconds until it drained
> > > to a level where it turns off. Depending on general setup (WIFI must remain
> > > powered off after boot) this is enough to boot into Linux and start full charging.
> > > Another trick is to modify MLO and U-Boot to raise the charging current.
> >
> > Depending on the device and the boot-up speed this seems to work only when
> > connected to a Linux PC though. AFAIK Windows PCs enforce the 100mA USB power
> > limit until the device is enumerated which can keep the device in an eternal
> > reboot loop not being able to ever get the charging going :)
>
> this is actually what the USB Battery Charging spec requires us to
> implement. If Linux is doing differently, it's a bug on Linux which
> should be fixed :-)
>
> No host is allowed to source more then one unit load (100mA in LS/FS/HS,
> 150mA in SS) until the device is fully enumerated. Host are also
> required to drop max current budget to 8mA (IIRC) if the device doesn't
> enumerate for however many minutes (I guess it was a pretty long
> threshold, something like half an hour or so. My memory fails me right
> now).
>
I think the twl4030 driver does do the "right" thing unless the "allow_usb"
module parameter is set, in which case it enables charging at a higher rate
which is 600mA (default value of BCIIREF1).
It would be nice if the driver could check if a charger was plugged in and
act accordingly.
The charger I have for my openmoko is identified by a 47K resistor between ID
and ground. The twl4030 can detect that easily enough, but it isn't very
standard.
The standard is of course to have D+ and D- shorted, but I don't know if the
twl4030 can detect that? If it can, then getting some very early code to
check for the short (or the 47k resistor) and quickly enabling charging might
be a sufficient solution.
NeilBrown
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists