summaryrefslogtreecommitdiff
path: root/board/kodama/board.h
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2019-10-23 20:02:29 +0800
committerCommit Bot <commit-bot@chromium.org>2019-12-16 08:06:07 +0000
commite25c81318a06506c79423900b9592a7caa36cfed (patch)
tree8ca5e83e6189513fb798b7ddb15836f60332efdc /board/kodama/board.h
parent7b61704fd1a09c5aae26f163e096d9695e479f21 (diff)
downloadchrome-ec-e25c81318a06506c79423900b9592a7caa36cfed.tar.gz
kodama/jacuzzi: enable i2c bitbang
- Enable bitbang driver - increase the console/hook stack size because accessing bitbang i2c bus requires more stack memory than before BUG=b:138161741,b:138415463 TEST=see CL:1765110 BRANCH=kukui Change-Id: I54aa0b5c37cd3fde497b552ea553e5542e594546 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1876290 Reviewed-by: Alexandru M Stan <amstan@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'board/kodama/board.h')
-rw-r--r--board/kodama/board.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/board/kodama/board.h b/board/kodama/board.h
index d6d7a329b1..cf71fe5dd2 100644
--- a/board/kodama/board.h
+++ b/board/kodama/board.h
@@ -28,6 +28,12 @@
#define CONFIG_BATTERY_HW_PRESENT_CUSTOM
+#define CONFIG_I2C_BITBANG
+#define I2C_BITBANG_PORT_COUNT 1
+#undef CONFIG_I2C_NACK_RETRY_COUNT
+#define CONFIG_I2C_NACK_RETRY_COUNT 3
+#define CONFIG_SMBUS_PEC
+
/* Battery */
#define BATTERY_DESIRED_CHARGING_CURRENT 2000 /* mA */
@@ -52,9 +58,9 @@
#define I2C_PORT_CHARGER 0
#define I2C_PORT_TCPC0 0
#define I2C_PORT_USB_MUX 0
-#define I2C_PORT_BATTERY 1
-#define I2C_PORT_VIRTUAL_BATTERY I2C_PORT_BATTERY
#define I2C_PORT_ACCEL 1
+#define I2C_PORT_BATTERY board_get_battery_i2c()
+#define I2C_PORT_VIRTUAL_BATTERY I2C_PORT_BATTERY
/* Define the host events which are allowed to wakeup AP in S3. */
#define CONFIG_MKBP_HOST_EVENT_WAKEUP_MASK \
@@ -113,6 +119,8 @@ int board_get_version(void);
int board_is_sourcing_vbus(int port);
void pogo_adc_interrupt(enum gpio_signal signal);
int board_discharge_on_ac(int enable);
+/* returns the i2c port number of battery */
+int board_get_battery_i2c(void);
#endif /* !__ASSEMBLER__ */