force usb charge current

Balaji Rao balajirrao at
Wed Jan 28 20:54:53 CET 2009

On Tue, Jan 27, 2009 at 08:00:17PM +0000, Andy Green wrote:
> Hash: SHA1
> Somebody in the thread at some point said:
> | On Tue, Jan 27, 2009 at 18:47, Andy Green <andy at> wrote:
> |> There is a global "at the USB connector" current limit, but it only has
> |> those steps, 100, 500, or 1000mA.
> |>
> |> You could add ability to force max charging current separately, and
> |> estimate a maximum current for "everything else" but it doesn't seem
> |> like a good idea to me when WLAN can add >100mA, GSM unit might decide
> |> to do something, etc and you only had a budget of 350mA to start with.
> |>
> |
> | Ok.
> |
> | Is this charging current limit setting already available with current
> kernel ?
> We just force it to 1A limit in the bootloader, since we rely on the
> master USB current limit to limit total current coming in, and the
> constant current phase of the charging to determine how much current to
> actually use... the PMU automatically splits what we have between
> charging and powering the regulators (VB_SYS) that provide power for the
> device.
> | Anyway it looks better than nothing. For example setting max battery
> | charge current to 100mA should allow to not continuously draw too much
> | through usb, and allow to keep battery charge.
> Hum I don't really love the idea of exposing it, since it feels like the
> point we are being too tricksy for our own good: but it doesn't increase
> danger on USB side due to the USB total current limit thing you can
> already force, and since we max it out by default it doesn't increase
> danger on battery side.  The only bad thing you can do with it is
> basically defeat the charging action by reducing the max charging
> current down to nothing, but even that action is reset in the bootloader
> next boot.
> Balaji, what do you think?  It basically means allowing setting of MBCC5
> with a sys name like force_charging_limit_dangerous.

Yea, AFAICS including this attribute is going to be harmless. Andy,
should I add it right away ?

	- Balaji

More information about the openmoko-kernel mailing list