[SHR-Unstable] Forcing fast-charge

Rask Ingemann Lambertsen rask at sygehus.dk
Sun May 3 23:15:38 CEST 2009

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> wrote:
> > 
> > > 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 by
> > > 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.

> > 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.

> > Note than doing this (I used a little GUI with 1 set button for each value),
> > I must set usb current limit, then only I set charge current limit. And in
> > the meanwhile, since charge limit=usb limit=1A, it starts pulling about 1A
> > 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.

Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year

More information about the community mailing list