summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Lu <devin.lu@quantatw.com>2020-06-23 23:01:02 +0800
committerCommit Bot <commit-bot@chromium.org>2020-06-24 02:49:00 +0000
commit0fd827f7df34010375837bdf219c5f9da2e9013d (patch)
treecdc7e9b65f0bba925e86d2840d08370feef3983c
parent678a714db346f57757f587f89460846c4ab1d8ad (diff)
downloadchrome-ec-0fd827f7df34010375837bdf219c5f9da2e9013d.tar.gz
drawcia: enable USB-A power 5V
BUG=none BRANCH=none TEST=make sure USB-A port works. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ie22f7129932b26d2b47913c4a2e49450ded4d5c5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2260177 Reviewed-by: Diana Z <dzigterman@chromium.org>
-rw-r--r--board/drawcia/board.c5
-rw-r--r--board/drawcia/board.h6
-rw-r--r--board/drawcia/gpio.inc2
3 files changed, 11 insertions, 2 deletions
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 */