From 043ee28da36f45eeda1015a65827ff5feca00b5d Mon Sep 17 00:00:00 2001 From: Alexandru M Stan Date: Mon, 23 Apr 2018 11:42:07 -0700 Subject: [PATCH] cheza: Increase charger current to max 1.5A is really too low for our bringup tests, increase it to max until we have a battery driver. BRANCH=none BUG=b/74395451 TEST="gpioset EN_PP5000_A 1" should not brownout the system TEST=Backlight can turn on TEST=Kernel boots and is stable for swboyd Change-Id: I789b18304c36f6f68296796c076699af722cb5d6 Signed-off-by: Alexandru M Stan Reviewed-on: https://chromium-review.googlesource.com/1024502 Reviewed-by: Wai-Hong Tam --- board/cheza/board.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/board/cheza/board.c b/board/cheza/board.c index 0995ef0089..cd9e334216 100644 --- a/board/cheza/board.c +++ b/board/cheza/board.c @@ -21,6 +21,7 @@ /* 8-bit I2C address */ #define PI3USB9281_I2C_ADDR 0x4a #define DA9313_I2C_ADDR 0xd0 +#define CHARGER_I2C_ADDR 0x12 /* Wake-up pins for hibernate */ const enum gpio_signal hibernate_wake_pins[] = { @@ -63,5 +64,11 @@ static void board_init(void) * TODO(b/77957956): Remove it after hardware fix. */ i2c_write8(I2C_PORT_POWER, DA9313_I2C_ADDR, 0x02, 0x34); + + /* + * Increase AdapterCurrentLimit{1,2} to max (6080mA) + */ + i2c_write16(I2C_PORT_POWER, CHARGER_I2C_ADDR, 0x3B, 0x17c0); + i2c_write16(I2C_PORT_POWER, CHARGER_I2C_ADDR, 0x3F, 0x17c0); } DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);