diff options
author | Scott Collyer <scollyer@google.com> | 2018-06-27 11:08:05 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-07-03 22:31:02 -0700 |
commit | 797146cb4c63a00a9535ad92fcbb75e65d98d688 (patch) | |
tree | cdeb0742001643bf5cbc76d67159170fd91f0d72 /board/dragonegg | |
parent | d915b701cae9cd6aca74effbec2b99907d7a06c7 (diff) | |
download | chrome-ec-797146cb4c63a00a9535ad92fcbb75e65d98d688.tar.gz |
DragonEgg: Add I2C pins/alt functions and config table
This CL adds the gpio definitions for I2C pins and the I2C
configuration table.
BRANCH=none
BUG=b:110880394
TEST=make buildall
Change-Id: I9d239573257dbd6a3a3110875b1c970721f73677
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1117361
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Rachel Nancollas <rachelsn@google.com>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board/dragonegg')
-rw-r--r-- | board/dragonegg/gpio.inc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/board/dragonegg/gpio.inc b/board/dragonegg/gpio.inc index d730fe5beb..d853b99ebe 100644 --- a/board/dragonegg/gpio.inc +++ b/board/dragonegg/gpio.inc @@ -28,3 +28,23 @@ GPIO(SYS_RESET_L, PIN(D, 1), GPIO_ODR_HIGH) /* SYS_RST_ODL */ GPIO(ENTERING_RW, PIN(G, 0), GPIO_OUT_LOW) /* EC_ENTERING_RW */ GPIO(PCH_WAKE_L, PIN(D, 5), GPIO_ODR_HIGH) /* EC_PCH_WAKE_ODL */ GPIO(PCH_PWRBTN_L, PIN(B, 6), GPIO_ODR_HIGH) /* EC_PCH_PWR_BTN_ODL */ + +/* I2C pins - Alternate function below configures I2C module on these pins */ +GPIO(I2C0_SCL, PIN(B, 3), GPIO_INPUT) /* EC_PROG_SCL */ +GPIO(I2C0_SDA, PIN(B, 4), GPIO_INPUT) /* EC_PROG_SDA */ +GPIO(I2C1_SCL, PIN(C, 1), GPIO_INPUT) /* EC_I2C_SENSOR_KB_BL_SCL */ +GPIO(I2C1_SDA, PIN(C, 2), GPIO_INPUT) /* EC_I2C_SENSOR_KB_BL_SDA */ +GPIO(I2C2_SCL, PIN(F, 6), GPIO_INPUT) /* EC_I2C_USB_C1C2_SCL */ +GPIO(I2C2_SDA, PIN(F, 7), GPIO_INPUT) /* EC_I2C_USB_C1C2_SDA */ +GPIO(I2C4_SCL, PIN(E, 0), GPIO_INPUT) /* EC_I2C_USB_C0_SCL */ +GPIO(I2C4_SDA, PIN(E, 7), GPIO_INPUT) /* EC_I2C_USB_C0_SDA */ +GPIO(I2C5_SCL, PIN(A, 4), GPIO_INPUT) /* EC_I2C_POWER_SCL */ +GPIO(I2C5_SDA, PIN(A, 5), GPIO_INPUT) /* EC_I2C_POWER_SDA */ + +/* Alternate functions GPIO definitions */ +ALTERNATE(PIN_MASK(B, 0x18), 0, MODULE_I2C, 0) /* I2C0 */ +ALTERNATE(PIN_MASK(C, 0x06), 0, MODULE_I2C, 0) /* I2C1 */ +ALTERNATE(PIN_MASK(F, 0xC0), 0, MODULE_I2C, 0) /* I2C2 */ +ALTERNATE(PIN_MASK(E, 0x81), 0, MODULE_I2C, 0) /* I2C4 */ +ALTERNATE(PIN_MASK(A, 0x30), 0, MODULE_I2C, 0) /* I2C5 */ + |