summaryrefslogtreecommitdiff
path: root/board/kano/i2c.c
diff options
context:
space:
mode:
authorDavid Wu <david_wu@quanta.corp-partner.google.com>2021-07-08 12:44:40 +0800
committerCommit Bot <commit-bot@chromium.org>2021-07-09 02:56:58 +0000
commitde941c3ac9c049fea4fa199a95b39d0df20ce6c0 (patch)
tree84fbcab492854b00fe81b2ddb4eaa8ade8a6716e /board/kano/i2c.c
parent9cc0bbeaafabca2e8671c356587949dad594e67e (diff)
downloadchrome-ec-de941c3ac9c049fea4fa199a95b39d0df20ce6c0.tar.gz
kano: Initial EC image
Create the initial EC image for the kano variant by copying the brya reference board EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.5.0). BUG=b:193052432 BRANCH=None TEST=make BOARD=kano Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com> Change-Id: Icc2418fbc9ac568fd2aae640c3d379867be6254a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3012671 Reviewed-by: Boris Mittelberg <bmbm@google.com>
Diffstat (limited to 'board/kano/i2c.c')
-rw-r--r--board/kano/i2c.c78
1 files changed, 78 insertions, 0 deletions
diff --git a/board/kano/i2c.c b/board/kano/i2c.c
new file mode 100644
index 0000000000..bb55b13d0c
--- /dev/null
+++ b/board/kano/i2c.c
@@ -0,0 +1,78 @@
+/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+ * 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 "i2c.h"
+
+/* I2C port map configuration */
+const struct i2c_port_t i2c_ports[] = {
+ {
+ /* I2C0 */
+ .name = "sensor",
+ .port = I2C_PORT_SENSOR,
+ .kbps = 400,
+ .scl = GPIO_EC_I2C_SENSOR_SCL,
+ .sda = GPIO_EC_I2C_SENSOR_SDA,
+ },
+ {
+ /* I2C1 */
+ .name = "tcpc0,2",
+ .port = I2C_PORT_USB_C0_C2_TCPC,
+ .kbps = 1000,
+ .scl = GPIO_EC_I2C_USB_C0_C2_TCPC_SCL,
+ .sda = GPIO_EC_I2C_USB_C0_C2_TCPC_SDA,
+ },
+ {
+ /* I2C2 */
+ .name = "ppc0,2",
+ .port = I2C_PORT_USB_C0_C2_PPC,
+ .kbps = 1000,
+ .scl = GPIO_EC_I2C_USB_C0_C2_PPC_BC_SCL,
+ .sda = GPIO_EC_I2C_USB_C0_C2_PPC_BC_SDA,
+ },
+ {
+ /* I2C3 */
+ .name = "retimer0,2",
+ .port = I2C_PORT_USB_C0_C2_MUX,
+ .kbps = 1000,
+ .scl = GPIO_EC_I2C_USB_C0_C2_RT_SCL,
+ .sda = GPIO_EC_I2C_USB_C0_C2_RT_SDA,
+ },
+ {
+ /* I2C4 C1 TCPC */
+ .name = "tcpc1",
+ .port = I2C_PORT_USB_C1_TCPC,
+ .kbps = 400,
+ .scl = GPIO_EC_I2C_USB_C1_TCPC_SCL,
+ .sda = GPIO_EC_I2C_USB_C1_TCPC_SDA,
+ },
+ {
+ /* I2C5 */
+ .name = "battery",
+ .port = I2C_PORT_BATTERY,
+ .kbps = 100,
+ .scl = GPIO_EC_I2C_BAT_SCL,
+ .sda = GPIO_EC_I2C_BAT_SDA,
+ },
+ {
+ /* I2C6 */
+ .name = "ppc1",
+ .port = I2C_PORT_USB_C1_PPC,
+ .kbps = 400,
+ .scl = GPIO_EC_I2C_USB_C1_MIX_SCL,
+ .sda = GPIO_EC_I2C_USB_C1_MIX_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);