summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/damu/board.c6
-rw-r--r--board/damu/board.h7
-rw-r--r--board/damu/ec.tasklist2
-rw-r--r--board/damu/gpio.inc2
4 files changed, 16 insertions, 1 deletions
diff --git a/board/damu/board.c b/board/damu/board.c
index 36d946a1bb..673978c05d 100644
--- a/board/damu/board.c
+++ b/board/damu/board.c
@@ -27,6 +27,7 @@
#include "hooks.h"
#include "host_command.h"
#include "i2c.h"
+#include "i2c_bitbang.h"
#include "it8801.h"
#include "keyboard_scan.h"
#include "lid_switch.h"
@@ -73,6 +74,11 @@ const struct i2c_port_t i2c_ports[] = {
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
+const struct i2c_port_t i2c_bitbang_ports[] = {
+ {"battery", 2, 100, GPIO_I2C3_SCL, GPIO_I2C3_SDA, .drv = &bitbang_drv},
+};
+const unsigned int i2c_bitbang_ports_used = ARRAY_SIZE(i2c_bitbang_ports);
+
#define BC12_I2C_ADDR PI3USB9201_I2C_ADDR_3
/* power signal list. Must match order of enum power_signal. */
diff --git a/board/damu/board.h b/board/damu/board.h
index 348d09d55b..c1c74cdc27 100644
--- a/board/damu/board.h
+++ b/board/damu/board.h
@@ -35,6 +35,13 @@
#undef CONFIG_EXTPOWER_DEBOUNCE_MS
#define CONFIG_EXTPOWER_DEBOUNCE_MS 200
+#define CONFIG_I2C_BITBANG
+#undef I2C_BITBANG_PORT_COUNT
+#define I2C_BITBANG_PORT_COUNT 1
+#undef CONFIG_I2C_NACK_RETRY_COUNT
+#define CONFIG_I2C_NACK_RETRY_COUNT 3
+#define CONFIG_SMBUS_PEC
+
#define CONFIG_USB_PD_TCPM_FUSB302
#define CONFIG_USB_PD_DISCHARGE_GPIO
#define CONFIG_USB_PD_TCPC_LOW_POWER
diff --git a/board/damu/ec.tasklist b/board/damu/ec.tasklist
index 4b7574652e..283af8595a 100644
--- a/board/damu/ec.tasklist
+++ b/board/damu/ec.tasklist
@@ -7,7 +7,7 @@
* See CONFIG_TASK_LIST in config.h for details.
*/
#define CONFIG_TASK_LIST \
- TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \
+ TASK_ALWAYS(HOOKS, hook_task, NULL, VENTI_TASK_STACK_SIZE) \
TASK_ALWAYS(CHARGER, charger_task, NULL, VENTI_TASK_STACK_SIZE) \
TASK_ALWAYS(USB_CHG_P0, usb_charger_task, NULL, VENTI_TASK_STACK_SIZE) \
TASK_NOTEST(CHIPSET, chipset_task, NULL, LARGER_TASK_STACK_SIZE) \
diff --git a/board/damu/gpio.inc b/board/damu/gpio.inc
index d9b1856948..6b4a5ce117 100644
--- a/board/damu/gpio.inc
+++ b/board/damu/gpio.inc
@@ -56,6 +56,8 @@ GPIO(I2C1_SCL, PIN(B, 8), GPIO_INPUT)
GPIO(I2C1_SDA, PIN(B, 9), GPIO_INPUT)
GPIO(I2C2_SCL, PIN(A, 11), GPIO_INPUT)
GPIO(I2C2_SDA, PIN(A, 12), GPIO_INPUT)
+GPIO(I2C3_SCL, PIN(A, 5), GPIO_ODR_HIGH)
+GPIO(I2C3_SDA, PIN(C, 4), GPIO_ODR_HIGH)
/* Analog pins */
GPIO(BOARD_ID, PIN(C, 0), GPIO_ANALOG)