summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/daisy/board.c40
-rw-r--r--board/daisy/board.h8
-rw-r--r--include/config.h1
3 files changed, 2 insertions, 47 deletions
diff --git a/board/daisy/board.c b/board/daisy/board.c
index 2a6eb6e3a5..eb1769916d 100644
--- a/board/daisy/board.c
+++ b/board/daisy/board.c
@@ -126,46 +126,6 @@ const struct i2c_port_t i2c_ports[] = {
};
BUILD_ASSERT(ARRAY_SIZE(i2c_ports) == I2C_PORTS_USED);
-/* Auto detect I2C host port
- * Daisy board has two I2C ports, I2C1(0) and I2C2(1), that can be configured
- * as host. PMU chip is connected directly to the EC, and hence can be used
- * for port detection
- */
-#ifdef CONFIG_I2C_HOST_AUTO
-static int i2c_host_port = -1;
-
-/* Detect if tps65090 pmu is present on a i2c bus.
- * This hack makes one single ec binary to work on boards with different
- * stuffing options.
- *
- * TODO: Revert i2c host port detection after all dev boards been reworked or
- * deprecated. Issue: http://crosbug.com/p/10622
- */
-static int tps65090_is_present(int bus)
-{
- const int tps65090_addr = 0x90;
- const int charger_ctrl_offset0 = 4;
- int rv, reg;
-
- rv = i2c_read8(bus, tps65090_addr, charger_ctrl_offset0, &reg);
-
- if (rv == EC_SUCCESS)
- return 1;
- return 0;
-}
-
-int board_i2c_host_port(void)
-{
- /* Default I2C host configuration is I2C1(0).
- * If PMU doesn't ack on I2C2(1), set the host port to 0.
- */
- if (i2c_host_port == -1)
- i2c_host_port = tps65090_is_present(1) ? 1 : 0;
-
- return i2c_host_port;
-}
-#endif /* CONFIG_I2C_HOST_AUTO */
-
void keyboard_suppress_noise(void)
{
/* notify audio codec of keypress for noise suppression */
diff --git a/board/daisy/board.h b/board/daisy/board.h
index c2af3ef525..f5fbf656a0 100644
--- a/board/daisy/board.h
+++ b/board/daisy/board.h
@@ -18,7 +18,6 @@
#define CONFIG_CHIPSET_GAIA
#endif
#define CONFIG_I2C
-#define CONFIG_I2C_HOST_AUTO
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
#define CONFIG_KEYBOARD_SUPPRESS_NOISE
#define CONFIG_PMU_TPS65090
@@ -51,11 +50,11 @@ enum module_id {
#define KB_OUT_PORT_LIST GPIO_B, GPIO_C
/* Charging */
-#define I2C_PORT_HOST board_i2c_host_port()
+#define I2C_PORT_HOST 0 /* Note: some Daisy systems used port 1 */
#define I2C_PORT_BATTERY I2C_PORT_HOST
#define I2C_PORT_CHARGER I2C_PORT_HOST
#define I2C_PORT_SLAVE 1
-#define I2C_PORTS_USED 2 /* Since host could be on either 0 or 1 */
+#define I2C_PORTS_USED 2
/* Timer selection */
#define TIM_CLOCK_MSB 3
@@ -117,9 +116,6 @@ enum gpio_signal {
GPIO_COUNT
};
-/* Auto detect EC i2c host port */
-int board_i2c_host_port(void);
-
#endif /* !__ASSEMBLER__ */
#endif /* __BOARD_H */
diff --git a/include/config.h b/include/config.h
index 1e9173f164..483a7e16b7 100644
--- a/include/config.h
+++ b/include/config.h
@@ -336,7 +336,6 @@
#undef CONFIG_I2C_ARBITRATION
#undef CONFIG_I2C_DEBUG
#undef CONFIG_I2C_DEBUG_PASSTHRU
-#undef CONFIG_I2C_HOST_AUTO
#undef CONFIG_I2C_PASSTHROUGH
#undef CONFIG_I2C_PASSTHRU_RESTRICTED