summaryrefslogtreecommitdiff
path: root/board/pompom
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2020-09-15 16:16:59 -0700
committerCommit Bot <commit-bot@chromium.org>2020-09-17 01:47:19 +0000
commit5c752c2eec0a1ba2c3e801c3d91c274cfcc4d728 (patch)
tree8d4f03b86a1413690bd159d354f1e4a1cd436b9d /board/pompom
parent6e31d6a118d877ea53bef6d15016608bfee26583 (diff)
downloadchrome-ec-5c752c2eec0a1ba2c3e801c3d91c274cfcc4d728.tar.gz
Trogdor: Move the I2C config to the board level
Move the I2C config to the board level such that they can have different configs. Also add the extra I2C bus for WLC on Coachz. The device on this I2C bus supports fast-mode plus, 1Mbit/s. BRANCH=None BUG=b:167884598 TEST=Built all Trogdor variants. Change-Id: Ibcb0e110e1b2c67f8ba843c2dc08efabeb5fe9ba Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2412821 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Diffstat (limited to 'board/pompom')
-rw-r--r--board/pompom/board.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/board/pompom/board.c b/board/pompom/board.c
index 271784e898..f159b9fa83 100644
--- a/board/pompom/board.c
+++ b/board/pompom/board.c
@@ -89,6 +89,20 @@ static void board_connect_c0_sbu(enum gpio_signal s)
hook_call_deferred(&board_connect_c0_sbu_deferred_data, 0);
}
+/* I2C port map */
+const struct i2c_port_t i2c_ports[] = {
+ {"power", I2C_PORT_POWER, 100, GPIO_EC_I2C_POWER_SCL,
+ GPIO_EC_I2C_POWER_SDA},
+ {"tcpc0", I2C_PORT_TCPC0, 1000, GPIO_EC_I2C_USB_C0_PD_SCL,
+ GPIO_EC_I2C_USB_C0_PD_SDA},
+ {"eeprom", I2C_PORT_EEPROM, 400, GPIO_EC_I2C_EEPROM_SCL,
+ GPIO_EC_I2C_EEPROM_SDA},
+ {"sensor", I2C_PORT_SENSOR, 400, GPIO_EC_I2C_SENSOR_SCL,
+ GPIO_EC_I2C_SENSOR_SDA},
+};
+
+const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
+
/* ADC channels */
const struct adc_t adc_channels[] = {
/* Measure VBUS through a 1/10 voltage divider */