diff options
-rw-r--r-- | board/kakadu/board.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/board/kakadu/board.c b/board/kakadu/board.c index 3237449495..9384e77cea 100644 --- a/board/kakadu/board.c +++ b/board/kakadu/board.c @@ -241,8 +241,20 @@ int pd_snk_is_vbus_provided(int port) return rt946x_is_vbus_ready(); } + +#define CHARGER_I2C_ADDR_FLAGS RT946X_ADDR_FLAGS + static void board_init(void) { + +#ifdef SECTION_IS_RW + int val; + i2c_read8(I2C_PORT_CHARGER, CHARGER_I2C_ADDR_FLAGS, + RT946X_REG_CHGCTRL1, &val); + val &= RT946X_MASK_OPA_MODE; + i2c_write8(I2C_PORT_CHARGER, CHARGER_I2C_ADDR_FLAGS, + RT946X_REG_CHGCTRL1, (val | RT946X_MASK_STAT_EN)); +#endif /* If the reset cause is external, pulse PMIC force reset. */ if (system_get_reset_flags() == EC_RESET_FLAG_RESET_PIN) { gpio_set_level(GPIO_PMIC_FORCE_RESET_ODL, 0); |