Re: GTA02 is now an expensive brick / pcf50633 defaults

2009-01-07 Thread Mike Montour
Andy Green wrote:

 There's two interesting ideas from Mike though, one is that disable USB
 insert as ON will help by giving longer for VB_SYS to charge and the
 other is leave charger enabled.  For both of these, they are defeated
 (USB insert is ON action, charger disabled) by NOPOWER and we have no
 control then. 

I'm not considering the NOPOWER case, because as you point out there is 
nothing that can be done in software to help with that problem.

Another software workaround for this issue is to never let the main 
battery drain into the cutoff state. The PMU can generate a low-battery 
interrupt. If the FR gets this interrupt, it can re-program the PMU with 
safe settings and then immediately power off the main device and the 
Calypso. The battery will still drain a bit from leakage current and 
self-discharge, but at a much slower rate.

That's the simple version - more work is needed to handle cases like 
hot-swapping batteries while the device is plugged into external power 
(which could also generate a low-battery signal). There should also be 
an opportunity for userspace to do a clean shutdown of the device when 
the battery gets low, but before it reaches the critically-low level to 
trigger an immediate shutdown.

I have not looked at any recent kernels or u-boots (for several months) 
to see if this has already been implemented. It's somewhere on my to-do 
list.


___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: GTA02 is now an expensive brick / pcf50633 defaults

2009-01-06 Thread Andy Green
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Somebody in the thread at some point said:
|
| Mike Montour wrote:
| If you program the PCF50633 as:
|   - charger enabled
|   - 100mA current limit
|   - do not wake on USB insertion (avoids the brownout issue)
|
| then it will have the behaviour that you want - even with a
| completely-dead battery, you can plug it in and it will slow-charge the
| battery in hardware. I think it still technically violates one of the
| USB standards by drawing current without talking to the host, but IMHO
| it's unlikely to cause any real-world problems.
|
|
| 1. This really ought to be default behaviour, the current way is really
| *really* bad.
|
| 2. Why stick to 100mA? I thought the USB standard was for ports to support
| 500mA?
|
| 3. I'm sure the FR doesn't need to negotiate with its charger.
|
| 4. How easy is it to make this change?

The issue is more complicated than this.

pcf50633 has more than one level of hardcoded default actions, some
registers get reset when you tell it to enter what it calls standby
but we would more naturally call off, and more get reset again when
the small backup battery that is also present on GTA02 becomes
exhausted, called NOPOWER state.

The real default settings for our variant that occur with NOPOWER
forces the charger disabled.  So if you stick your FR in a drawer, the
main battery is exhausted, the backup battery goes down a day or
whatever later, nothing that we did in previous session about charger
status sticks, the charger is off.  In addition, due to VB_SYS issue, we
can't get easily get to the point of running any code on A5 to enable it
without a loan from the battery to get us started.

Sometimes the battery is in cutoff and does have some power in the cell,
it's just disconnected from the terminals.  That's when any kind of
external kick will get us out of the hole.

There is no violation of USB standards if you only pull 100mA, but
another default set by going off even is that we pull 500mA from the
USB host until the CPU can get started, and that is in violation.  But
since we can do nothing about it, and we didn't find a host that cares
yet, it's OK.

There's two interesting ideas from Mike though, one is that disable USB
insert as ON will help by giving longer for VB_SYS to charge and the
other is leave charger enabled.  For both of these, they are defeated
(USB insert is ON action, charger disabled) by NOPOWER and we have no
control then.  If the backup battery had not decayed, it could help, but
it only has very partial impact and is not magically delivering the
behaviour you want, GTA02 with this issue still will not start if left
long enough for backup battery to fall below the pcf50633 threshold for
NOPOWER.

- -Andy
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkljdhIACgkQOjLpvpq7dMpvDgCfSK+d1rosyd0cJIrP2dcIvkgz
yD0An1KMoTi57Z2oxRp0/8RrITsoPSF0
=LB9S
-END PGP SIGNATURE-

___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: GTA02 is now an expensive brick / pcf50633 defaults

2009-01-06 Thread bburdette
Andy Green wrote:

 
 There's two interesting ideas from Mike though, one is that disable USB
 insert as ON will help by giving longer for VB_SYS to charge and the
 other is leave charger enabled.  For both of these, they are defeated
 (USB insert is ON action, charger disabled) by NOPOWER and we have no
 control then.  If the backup battery had not decayed, it could help, but
 it only has very partial impact and is not magically delivering the
 behaviour you want, GTA02 with this issue still will not start if left
 long enough for backup battery to fall below the pcf50633 threshold for
 NOPOWER.
 

So are you saying there's no way to reprogram the freerunner to be able 
to charge from a (completely) depleted battery?


___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support


Re: GTA02 is now an expensive brick / pcf50633 defaults

2009-01-06 Thread Gothnet



bburdette wrote:
 
 Andy Green wrote:
 
 
 There's two interesting ideas from Mike though, one is that disable USB
 insert as ON will help by giving longer for VB_SYS to charge and the
 other is leave charger enabled.  For both of these, they are defeated
 (USB insert is ON action, charger disabled) by NOPOWER and we have no
 control then.  If the backup battery had not decayed, it could help, but
 it only has very partial impact and is not magically delivering the
 behaviour you want, GTA02 with this issue still will not start if left
 long enough for backup battery to fall below the pcf50633 threshold for
 NOPOWER.
 
 
 So are you saying there's no way to reprogram the freerunner to be able 
 to charge from a (completely) depleted battery?
 
 

That would seem to be the case.

That it can charge when there's enough power to start booting, or it can
trickle-charge when off (maybe, with some software modification) but that
when it's been off for a  couple of days you're out of luck.

BIG. DESIGN. FLAW.
-- 
View this message in context: 
http://n2.nabble.com/GTA02-is-now-an-expensive-brick-tp2109541p2120169.html
Sent from the Openmoko Support mailing list archive at Nabble.com.


___
support mailing list
support@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/support