diff options
-rw-r--r-- | board/jacuzzi/board.c | 6 | ||||
-rw-r--r-- | board/jacuzzi/board.h | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/board/jacuzzi/board.c b/board/jacuzzi/board.c index 3d23faea5f..83e56827da 100644 --- a/board/jacuzzi/board.c +++ b/board/jacuzzi/board.c @@ -254,3 +254,9 @@ static void board_chipset_shutdown(void) gpio_set_level(GPIO_EN_USBA_5V, 0); } DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, board_chipset_shutdown, HOOK_PRIO_DEFAULT); + +int board_get_charger_i2c(void) +{ + /* TODO(b:138415463): confirm the bus allocation for future builds */ + return board_get_version() == 1 ? 2 : 1; +} diff --git a/board/jacuzzi/board.h b/board/jacuzzi/board.h index 0cafbd6469..6f7d5f4a35 100644 --- a/board/jacuzzi/board.h +++ b/board/jacuzzi/board.h @@ -60,8 +60,8 @@ #define I2C_PORT_BC12 0 #define I2C_PORT_TCPC0 0 #define I2C_PORT_USB_MUX 0 -#define I2C_PORT_CHARGER 1 #define I2C_PORT_BATTERY 1 +#define I2C_PORT_CHARGER board_get_charger_i2c() #define I2C_PORT_IO_EXPANDER_IT8801 1 /* Enable Accel over SPI */ @@ -126,6 +126,9 @@ void board_reset_pd_mcu(void); int board_get_version(void); int board_is_sourcing_vbus(int port); +/* returns the i2c port number of charger */ +int board_get_charger_i2c(void); + #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ |