board: purism: librem5: update the timeouts for birch

Signed-off-by: default avatarAngus Ainslie (Purism) <angus@akkea.ca>
parent 6ceb158f
......@@ -371,7 +371,7 @@ int init_tps65982(void)
printf( "%s: starting\n", __func__ );
if( tps65982_wait_for_app(8000,2000) ) {
if( tps65982_wait_for_app(500,100) ) {
/* check that VBAT is present and greater than 3000 mV. reseting the
tps65982 disconnects VBUS so we need a different power source.
Battery voltage greater than 4.15V likely means the battery is not
......@@ -389,11 +389,13 @@ int init_tps65982(void)
gpio_direction_output(TPS_RESET, 1);
mdelay( 2 );
gpio_direction_output(TPS_RESET, 0);
mdelay( 1000 );
mdelay( 100 );
if( tps65982_wait_for_app(8000,2000) ) {
if( tps65982_wait_for_app(1000,250) ) {
printf("tps65982 failed to boot\n" );
board_ecspi_init();
gpio_direction_output(LED_G, 0);
gpio_direction_output(LED_R, 1);
return 1;
}
......@@ -420,7 +422,7 @@ int init_tps65982(void)
int init_charger_bq25896(void)
{
u8 val;
int iinlim, vbat, ret, i;
int iinlim, vbat, ret;
struct udevice *udev, *bus;
/* Set the i2c bus */
......@@ -495,16 +497,13 @@ int init_charger_bq25896(void)
vbat = (val & 0x7f) * 20 + 2304;
printf("VBAT mV %d\n", vbat);
if ((vbat < 2400) && (iinlim <= 500)) {
if ((vbat < 2800) && (iinlim <= 500)) {
/* battery voltage too low and
* insufficient current to boot linux.
* Keep the charger disabled and try to boot
*/
gpio_direction_output(LED_G, 0);
gpio_direction_output(LED_R, 1);
printf("%s: voltage and current too low linux probably won't boot\n", __func__);
/* allow trickle charge 128 mA */
dm_i2c_reg_write(udev, 0x04, 0x1);
#if 0
} else {
if (iinlim > 500) {
/* have enough voltage and current to fastcharge */
......@@ -516,8 +515,12 @@ int init_charger_bq25896(void)
dm_i2c_reg_write(udev, 0x04, 0x2);
printf("%s: tricklecharge 256 mA\n", __func__);
}
#endif
}
/* set 1.6A charge limit */
dm_i2c_reg_write(udev, 0x04, 0x19);
/* re-enable charger */
val = dm_i2c_reg_read(udev, 0x03);
val = val | 0x10;
......@@ -584,8 +587,8 @@ int board_late_init(void)
#endif
if (fastboot_key_pressed()) {
printf("enter fastboot!\n");
env_set("bootcmd", "fastboot 0");
printf("stop in u-boot\n");
env_set("bootcmd", "");
}
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment