diff options
author | Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com> | 2022-02-10 10:33:08 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-02-17 11:20:41 +0000 |
commit | 55680f70d2a1e61c193fc78ff1d51c7437803683 (patch) | |
tree | e12ef58e7b092b03ac8925f2656acd612fec4239 /board/kinox/i2c.c | |
parent | 7e464f4acaef417e315c1d48779c2ea67b14993d (diff) | |
download | chrome-ec-stabilize-14526.73.B-main.tar.gz |
kinox: Initial EC imagestabilize-quickfix-14526.91.B-mainstabilize-14526.89.B-mainstabilize-14526.84.B-mainstabilize-14526.73.B-mainstabilize-14526.67.B-mainstabilize-14526.57.B-mainrelease-R100-14526.B-main
Create the initial EC image for the kinox variant by copying the
brask 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:215049181
BRANCH=None
TEST=make BOARD=kinox
Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Change-Id: I604216664a0efc690ba9cd2c0c071a0e4650b228
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3448054
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Commit-Queue: Zhuohao Lee <zhuohao@chromium.org>
Diffstat (limited to 'board/kinox/i2c.c')
-rw-r--r-- | board/kinox/i2c.c | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/board/kinox/i2c.c b/board/kinox/i2c.c new file mode 100644 index 0000000000..9c92852461 --- /dev/null +++ b/board/kinox/i2c.c @@ -0,0 +1,78 @@ +/* Copyright 2022 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 = "dp_redriver", + .port = I2C_PORT_DP_REDRIVER, + .kbps = 400, + .scl = GPIO_EC_I2C_DP_SCL, + .sda = GPIO_EC_I2C_DP_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_SCL, + .sda = GPIO_EC_I2C_USB_C0_C2_PPC_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 = "wireless_charger", + .port = I2C_PORT_QI, + .kbps = 400, + .scl = GPIO_EC_I2C_QI_SCL, + .sda = GPIO_EC_I2C_QI_SDA, + }, + { + /* I2C6 */ + .name = "ppc1", + .port = I2C_PORT_USB_C1_PPC, + .kbps = 1000, + .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); |