summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@chromium.org>2019-09-13 17:31:16 +0000
committerCommit Bot <commit-bot@chromium.org>2019-09-18 08:21:50 +0000
commitbaf03777a464986b4956d58e8060f8348bde3298 (patch)
tree68d7c01f0c10efd0d2fb83a7d366acf81efb7856 /board
parent483bb8f07b77929e029ba0518fa56bba39bfe710 (diff)
downloadchrome-ec-baf03777a464986b4956d58e8060f8348bde3298.tar.gz
jacuzzi: move charger to bitbang port
In board rev 1, ISL9238C is connected to I2C port 2 (bitbanging bus). BUG=b:138415463 TEST=make BRANCH=master Change-Id: If94bc73a66caf1a73cbd0beb23eaf7f35cdea2ba Signed-off-by: Ting Shen <phoenixshen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1803974 Commit-Queue: Yilun Lin <yllin@chromium.org> Reviewed-by: Yilun Lin <yllin@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/jacuzzi/board.c6
-rw-r--r--board/jacuzzi/board.h5
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 */