[PATCH] U-Boot GTA02: Always enable charger on startup

Werner Almesberger werner at openmoko.org
Tue Aug 25 13:03:29 CEST 2009


Rask Ingemann Lambertsen wrote:
>    This patch changes U-Boot to always enable the charger on startup.

Did you try to boot without battery ? If there's no battery and you
enable charging, Vsys will ramp up instantly, which fools the test
in battery_is_good.

> diff --git a/board/neo1973/gta02/gta02.c b/board/neo1973/gta02/gta02.c
> index a59a513..df41f5a 100644
> --- a/board/neo1973/gta02/gta02.c
> +++ b/board/neo1973/gta02/gta02.c
> @@ -467,6 +467,8 @@ static int wait_for_power(void)
>                  pcf50633_reg_write(PCF50633_REG_OOCSHDWN, 4);
>  	}
>  
> +	pcf50633_reg_set_bit_mask(PCF50633_REG_MBCC1, 1, 1); /* charge ! */
> +
>  	/* switch off the AUX LED */
>  	neo1973_led(GTA02_LED_AUX_RED, 0);
>  
> @@ -490,8 +492,6 @@ static void pcf50633_late_init(void)
>  	pcf50633_reg_write(PCF50633_REG_LDO6ENA, recent);
>  
>  	pcf50633_reg_write(PCF50633_REG_MBCC5, 0xff); /* 1A USB fast charge */
> -
> -	pcf50633_reg_set_bit_mask(PCF50633_REG_MBCC1, 1, 1); /* charge ! */
>  }
>  
>  int board_late_init(void)

Hmm, what does this change accomplish ?

- Werner



More information about the openmoko-kernel mailing list