Free Runner won't turn on
Andy Green
andy at openmoko.com
Mon Sep 15 11:06:29 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Somebody in the thread at some point said:
| On Mon, 15 Sep 2008 08:54:07 +0100
| Andy Green <andy at openmoko.com> wrote:
|
|> -----BEGIN PGP SIGNED MESSAGE-----
|> Hash: SHA1
|>
|> Somebody in the thread at some point said:
|>
|> | no. shutdown from holding power button seems not to be working
|> anymore | (just freezed with blinking red light).
|>
|> Blinking red light means kernel panic. It'd be great to have a
|> backtrace from it but you'd need a debug board.
|
| Oh, blinking == kernel panic that is interesting...
| As I wrote already: sometimes I need to remove the
| battery multiple times before it came back, the interesting thing is:
| I remove the battery put it back in after some seconds, power it on
| (with or without AUX), phone does not boot *BUT* starts with
| blinking again -> can u-Boot panic too?
|
| Anyway, I do not have a debug board, sorry.
U-Boot doesn't have panic code, but it does have a bunch of code
intending to stop you booting if your battery is low.
#define SAFE_POWER_MILLIVOLT 3400
...
static int battery_is_good(void)
{
/* battery is absent -> don't boot */
if (pcf50633_reg_read(PCF50633_REG_BVMCTL) & 1)
return 0;
/* we could try to boot, but we'll probably die on the way */
if (pcf50633_read_battvolt() < SAFE_POWER_MILLIVOLT)
return 0;
return 1;
}
...
static void wait_for_power(void)
{
int seconds = 0;
int led_cycle = 1;
while (1) {
poll_charger();
/* track what the time-critical udc callback allows us */
if (pcf50633_usb_last_maxcurrent != udc_usb_maxcurrent)
pcf50633_usb_maxcurrent(udc_usb_maxcurrent);
/* we have plenty of external power -> try to boot */
if (pcf50633_usb_last_maxcurrent >= 500)
break;
/* cpu_idle sits with interrupts off destroying USB operation
* don't run it unless we are in trouble
*/
if (!battery_is_good())
cpu_idle();
else
udelay(1000000);
if (neo1973_new_second()) {
/*
* Probe the battery only if the current LED cycle is
* about to end, so that it had time to discharge.
*/
if (led_cycle && battery_is_good())
break;
seconds++;
}
led_cycle = !seconds || (seconds & 1);
/*
* Blink the AUX LED, unless it's broken (which is the case in
* GTA02v5 it is) and draws excessive current, which we just
* can't afford in this delicate situation.
*/
if (gta02_revision > 5)
neo1973_led(GTA02_LED_AUX_RED, led_cycle);
/* alternate LED and charger cycles */
pcf50633_reg_set_bit_mask(PCF50633_REG_MBCC1, 1, !led_cycle);
}
/* switch off the AUX LED */
neo1973_led(GTA02_LED_AUX_RED, 0);
}
If you have A6 PCB revision NAND U-Boot (NOR does not have this) will
slowly blink the light telling you it thinks your battery is too low to
be going on with if it feels it is <3.4V. Kernel panic blink is much
faster, several times a second.
Welcome to the exciting world of pcf50633 power behaviours, U-Boot
chapter. In the future, we throw all this out and just do it in Linux.
- -Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAkjOJZUACgkQOjLpvpq7dMrg7QCgjIGDuUx6PygGWeT2n9iVONqr
AdcAn3F0zP3MlnxUc7MQr27XBMgDTGJP
=P7MT
-----END PGP SIGNATURE-----
More information about the support
mailing list