[SHR-Unstable] Forcing fast-charge

Joerg Reisenweber joerg at openmoko.org
Thu May 7 00:42:42 CEST 2009

Am So  3. Mai 2009 schrieb Rask Ingemann Lambertsen:
> On Sat, May 02, 2009 at 03:30:10AM +0200, Joerg Reisenweber wrote:
> > Am Mi  29. April 2009 schrieb Cédric Berger:
> > > On Tue, Apr 28, 2009 at 15:36, Joerg Reisenweber <joerg at openmoko.org> 
> > > 
> > > > That's nonsense as there is no dumb charger out there not being 
capable of
> > > > supplying 500mA. OTOH any management of maximum ingress current to USB 
> > > > whatever means will inevitably fail when unplugging the charger device
> > > > connected to FR during powerdown and replace it with a (nonexistent) 
> > > > weaker one.
>    No. For better or for worse, the PCF50633 variant we use will power up
> the Frerunner and thus run the boot loader when you swap chargers. If the
> boot loader doesn't set the current limit correctly for the newly inserted
> charger, then that's where the bug is. TODO: Check U-Boot and Qi.
> (Long term TODO: Instead of fixing each and every bug three times (kernel,
> U-Boot and Qi), try to fit a bare-bones kernel and rootfs with boot menu
> into the 512 kB we currently use for boot loader.)
> > > Or a solar panel ?
> > How could setting BAT_CURLIM to USB_CURLIM help?
>    Because USB_CURLIM is reset to 500 mA when the Freerunner is turned off,
> while BAT_CURLIM remains at what it was last set to.

So taking in account your comments above this means the problem case 
is "intentionally shutting down the device during charging from solarpanel". 
1) I don't see why anybody should do this
2) this should be handled during shutdown, rather than all the time by syncing 
BAT_CURLIM with USB_CURLIM. Probably it would be wise to disable shutdown 
during charge all together.

> > > Or you have 2 phone charging from the same usb port ?
> > or I'm using the usb extension in my usb-coffemug-warmer? Or create a 
> > shortcircuit? It's not a valid usecase and I don't see how to accomplish 
> > that.
>    Don't tell me you haven't seen one of those 4-port unpowered USB hubs
> which can only supply 100 mA per port.

In this case USB-enum shall negotiate correct USB_CURLIM as the host knows 
about the hub and the (standard btw) restrictions wrt current. Again powering 
down the device during charge isn't recommended as host might think the 
device is shutdown because it doesn't respond to USB data anymore.

> > > Note than doing this (I used a little GUI with 1 set button for each 
> > > I must set usb current limit, then only I set charge current limit. And 
> > > the meanwhile, since charge limit=usb limit=1A, it starts pulling about 
> > > and I cannot avoid that.
> > Sorry I don't understand this statement.
>    The problem is when you use e.g. a 750 mAh Nokia battery and set
> chg_curlim to 750 mA like you're supposed to. If you then plug in the
> charger, usb_curlim will be set to 1000 mA and so will chg_curlim.
> Automatically setting chg_curlim to 1000 mA is a bug since the user said max
> 750 mA for the battery. The kernel needs to remember the user specified
> chg_curlim. TODO: Kernel patch.

ToDo: leave crg_curlim alone during normal operation and handle those silly 
cases of shutdown during charge correctly (e.g by simply disabling them 
(disallow shutdown), or - as I mentioned before - setting chg_curlim to 100mA 
unconditionally at shutdown time. Probably both)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.openmoko.org/pipermail/community/attachments/20090507/c50946b4/attachment.pgp 

More information about the community mailing list