summaryrefslogtreecommitdiff
path: root/board/hades/i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/hades/i2c.c')
-rw-r--r--board/hades/i2c.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/board/hades/i2c.c b/board/hades/i2c.c
new file mode 100644
index 0000000000..bf8c88b211
--- /dev/null
+++ b/board/hades/i2c.c
@@ -0,0 +1,56 @@
+/* Copyright 2023 The ChromiumOS Authors
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "common.h"
+#include "compile_time_macros.h"
+#include "hooks.h"
+#include "i2c.h"
+
+#define BOARD_ID_FAST_PLUS_CAPABLE 2
+
+/* I2C port map configuration */
+const struct i2c_port_t i2c_ports[] = {
+ {
+ /* I2C1 */
+ .name = "tcpc0",
+ .port = I2C_PORT_USB_C0_TCPC,
+ .kbps = 400,
+ .scl = GPIO_EC_I2C_USB_C0_SCL,
+ .sda = GPIO_EC_I2C_USB_C0_SDA,
+ },
+ {
+ /* I2C2 */
+ .name = "tcpc2",
+ .port = I2C_PORT_USB_C2_TCPC,
+ .kbps = 400,
+ .scl = GPIO_EC_I2C_USB_C2_SCL,
+ .sda = GPIO_EC_I2C_USB_C2_SDA,
+ },
+ {
+ /* I2C5 */
+ .name = "battery",
+ .port = I2C_PORT_BATTERY,
+ .kbps = 100,
+ .scl = GPIO_EC_I2C_BAT_SCL,
+ .sda = GPIO_EC_I2C_BAT_SDA,
+ },
+ {
+ /* I2C6 */
+ .name = "usba1",
+ .port = I2C_PORT_USBA1_RT,
+ .kbps = 400,
+ .scl = GPIO_EC_I2C_USBA_RT_SCL,
+ .sda = GPIO_EC_I2C_USBA_RT_SDA,
+ },
+ {
+ /* I2C7 */
+ .name = "eeprom",
+ .port = I2C_PORT_EEPROM,
+ .kbps = 400,
+ .scl = GPIO_EC_I2C_MISC_SCL_R,
+ .sda = GPIO_EC_I2C_MISC_SDA_R,
+ },
+};
+const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);