summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongBeum.Ha <ybha@samsung.corp-partner.google.com>2021-09-08 12:08:44 +0900
committerCommit Bot <commit-bot@chromium.org>2021-09-24 05:13:21 +0000
commit0daa354a7c8658877e0528e1f3c7e1943c945139 (patch)
treea1e30d82dd5bbd9b4e919f803a8f174a17f37a9a
parent9d98d6bd5650479a8bac5dce367aa7855a42bf53 (diff)
downloadchrome-ec-0daa354a7c8658877e0528e1f3c7e1943c945139.tar.gz
bugzzy : add enable signal for USB A
add power enable signal for USB A port BUG=b:192170188 BRANCH=None TEST=make -j BOARD=bugzzy Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Change-Id: Ib0392f4caacd2f7a7607653def89ed1cbd9e069e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3144984 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Henry Sun <henrysun@google.com>
-rw-r--r--board/bugzzy/board.c6
-rw-r--r--board/bugzzy/board.h4
-rw-r--r--board/bugzzy/gpio.inc2
3 files changed, 11 insertions, 1 deletions
diff --git a/board/bugzzy/board.c b/board/bugzzy/board.c
index beb954b1a3..0c51e5a328 100644
--- a/board/bugzzy/board.c
+++ b/board/bugzzy/board.c
@@ -740,3 +740,9 @@ static void handle_tsp_ta(void)
gpio_set_level(GPIO_TSP_TA, extpower_is_present());
}
DECLARE_HOOK(HOOK_AC_CHANGE, handle_tsp_ta, HOOK_PRIO_DEFAULT);
+
+/******************************************************************************/
+/* USB-A charging control */
+const int usb_port_enable[USB_PORT_COUNT] = {
+ GPIO_EN_USB_A0_VBUS,
+};
diff --git a/board/bugzzy/board.h b/board/bugzzy/board.h
index f3ac06bda7..c45bdae428 100644
--- a/board/bugzzy/board.h
+++ b/board/bugzzy/board.h
@@ -90,6 +90,10 @@
#define CONFIG_USB_PD_DISCHARGE_TCPC
#define CONFIG_USB_PD_TCPC_LOW_POWER
+/* USB Type A Features */
+#define USB_PORT_COUNT 1
+#define CONFIG_USB_PORT_POWER_DUMB
+
/* Variant references the TCPCs to determine Vbus sourcing */
#define CONFIG_USB_PD_5V_EN_CUSTOM
diff --git a/board/bugzzy/gpio.inc b/board/bugzzy/gpio.inc
index 5d6c9a626f..4e5f224a7b 100644
--- a/board/bugzzy/gpio.inc
+++ b/board/bugzzy/gpio.inc
@@ -90,6 +90,7 @@ GPIO(EC_AP_USB_C1_HDMI_HPD, PIN(9, 6), GPIO_OUT_LOW)
GPIO(EC_AP_USB_C0_HPD, PIN(9, 3), GPIO_OUT_LOW)
GPIO(HDMI_SEL_L, PIN(7, 2), GPIO_OUT_HIGH)
GPIO(EC_BATTERY_PRES_ODL, PIN(E, 1), GPIO_INPUT)
+GPIO(EN_USB_A0_VBUS, PIN(6, 3), GPIO_OUT_LOW)
/*
* Waddledoo doesn't have these physical pins coming to the EC but uses other
@@ -130,7 +131,6 @@ GPIO(GPIO35_NC, PIN(3, 5), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIO50_NC, PIN(5, 0), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIO57_NC, PIN(5, 7), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIO60_NC, PIN(6, 0), GPIO_INPUT | GPIO_PULL_DOWN)
-GPIO(GPIO63_NC, PIN(6, 3), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIO80_NC, PIN(8, 0), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIO81_NC, PIN(8, 1), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOC0_NC, PIN(C, 0), GPIO_INPUT | GPIO_PULL_DOWN)