From 0fd827f7df34010375837bdf219c5f9da2e9013d Mon Sep 17 00:00:00 2001 From: Devin Lu Date: Tue, 23 Jun 2020 23:01:02 +0800 Subject: drawcia: enable USB-A power 5V BUG=none BRANCH=none TEST=make sure USB-A port works. Signed-off-by: Devin Lu Change-Id: Ie22f7129932b26d2b47913c4a2e49450ded4d5c5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2260177 Reviewed-by: Diana Z --- board/drawcia/board.c | 5 +++++ board/drawcia/board.h | 6 +++++- board/drawcia/gpio.inc | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'board') diff --git a/board/drawcia/board.c b/board/drawcia/board.c index 849c172066..27f04658ee 100644 --- a/board/drawcia/board.c +++ b/board/drawcia/board.c @@ -44,6 +44,11 @@ #define INT_RECHECK_US 5000 +/* GPIO to enable/disable the USB Type-A port. */ +const int usb_port_enable[USB_PORT_COUNT] = { + GPIO_EN_USB_A_5V, +}; + /* C0 interrupt line shared by BC 1.2 and charger */ static void check_c0_line(void); DECLARE_DEFERRED(check_c0_line); diff --git a/board/drawcia/board.h b/board/drawcia/board.h index 95d7073ff9..769b2432e6 100644 --- a/board/drawcia/board.h +++ b/board/drawcia/board.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* Waddledee board configuration */ +/* Drawcia board configuration */ #ifndef __CROS_EC_BOARD_H #define __CROS_EC_BOARD_H @@ -75,6 +75,10 @@ #define CONFIG_USBC_RETIMER_TUSB544 /* C1 Redriver: TUSB544 */ +/* USB Type A Features */ +#define USB_PORT_COUNT 1 +#define CONFIG_USB_PORT_POWER_DUMB + #ifndef __ASSEMBLER__ #include "gpio_signal.h" diff --git a/board/drawcia/gpio.inc b/board/drawcia/gpio.inc index df8524c7c2..b60f03638c 100644 --- a/board/drawcia/gpio.inc +++ b/board/drawcia/gpio.inc @@ -79,6 +79,7 @@ GPIO(EC_I2C_USB_C0_SCL, PIN(A, 4), GPIO_INPUT) GPIO(EC_I2C_USB_C0_SDA, PIN(A, 5), GPIO_INPUT) /* USB pins */ +GPIO(EN_USB_A_5V, PIN(L, 6), GPIO_OUT_LOW) GPIO(EN_USB_C0_CC1_VCONN, PIN(H, 4), GPIO_OUT_LOW) GPIO(EN_USB_C0_CC2_VCONN, PIN(H, 6), GPIO_OUT_LOW) GPIO(EC_AP_USB_C0_HPD, PIN(L, 4), GPIO_OUT_LOW) @@ -115,7 +116,6 @@ GPIO(GPIOG7_NC, PIN(G, 7), GPIO_INPUT | GPIO_PULL_DOWN) GPIO(GPIOJ4_NC, PIN(J, 4), GPIO_INPUT | GPIO_PULL_DOWN) GPIO(GPIOJ5_NC, PIN(J, 5), GPIO_INPUT | GPIO_PULL_DOWN) GPIO(GPIOJ6_NC, PIN(J, 6), GPIO_INPUT | GPIO_PULL_DOWN) -GPIO(GPIOL6_NC, PIN(L, 6), GPIO_INPUT | GPIO_PULL_DOWN) GPIO(GPIOM6_NC, PIN(M, 6), GPIO_INPUT | GPIO_PULL_DOWN) /* Alternate functions GPIO definitions */ -- cgit v1.2.1