From 698cf4fb48979e47d522827fcdfcf5d2f117ddce Mon Sep 17 00:00:00 2001 From: Vijay Hiremath Date: Fri, 15 Nov 2019 12:38:54 -0800 Subject: volteer: Add USB-C policy BUG=b:140578872 BRANCH=none TEST=USB2.0 & USB3.0 device detected over Type-C port 0 Change-Id: I44790aac3543589c32dcd60f84e4e67d5d76cdab Signed-off-by: Vijay Hiremath Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1922752 Reviewed-by: Keith Short --- board/volteer/board.h | 8 ++++++++ board/volteer/gpio.inc | 4 ++++ 2 files changed, 12 insertions(+) (limited to 'board/volteer') diff --git a/board/volteer/board.h b/board/volteer/board.h index 06d13e1526..737b0b62ff 100644 --- a/board/volteer/board.h +++ b/board/volteer/board.h @@ -38,6 +38,14 @@ /* Sensors */ /* USB Type C and USB PD defines */ +/* + * USB-C port's USB2 & USB3 mapping from schematics + * USB2 numbering on PCH - 1 to n + * USB3 numbering on AP - 0 to n (PMC's USB3 numbering for MUX + * configuration is - 1 to n hence add +1) + */ +#define USBC_PORT_0_USB2_NUM 9 +#define USBC_PORT_0_USB3_NUM 1 /* USB Type A Features */ diff --git a/board/volteer/gpio.inc b/board/volteer/gpio.inc index 359a651d7e..e8327b8e5e 100644 --- a/board/volteer/gpio.inc +++ b/board/volteer/gpio.inc @@ -115,6 +115,10 @@ GPIO(EC_I2C7_EEPROM_SDA, PIN(B, 2), GPIO_INPUT) /* Battery signals */ GPIO(EC_BATT_PRES_ODL, PIN(E, 1), GPIO_INPUT) +/* Physical HPD pins are not needed on EC as these are configured by PMC */ +GPIO(USB_C0_DP_HPD, PIN(F, 3), GPIO_INPUT) +GPIO(USB_C1_DP_HPD, PIN(7, 0), GPIO_INPUT) + /* Alternate functions GPIO definitions */ ALTERNATE(PIN_MASK(B, BIT(5) | BIT(4)), 0, MODULE_I2C, (GPIO_INPUT | GPIO_SEL_1P8V)) /* I2C0 */ ALTERNATE(PIN_MASK(9, BIT(0) | BIT(2) | BIT(1)), 0, MODULE_I2C, 0) /* I2C1 SCL / I2C2 */ -- cgit v1.2.1