summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Lee <mike5@huaqin.corp-partner.google.com>2021-05-10 21:19:22 +0800
committerCommit Bot <commit-bot@chromium.org>2021-05-11 04:22:31 +0000
commite3f41fa1c31b6ddbb17a55ab17ae280fac45f8d6 (patch)
treee7facf45e029b3fc3180567a92d52ecfad14ab18
parentcf32e8b61c6dccc5025c6e6e27724f0320de7588 (diff)
downloadchrome-ec-e3f41fa1c31b6ddbb17a55ab17ae280fac45f8d6.tar.gz
Blipper: add USB-A power enable and disable
Enable CONFIG_USB_Enable CONFIG_USB_PORT_POWER_DUMB for enabling/disabling charging from USB-A ports. BUG=b:183472826 BRANCH=dedede TEST=make -j BOARD=blipper TEST=Run "test_that -b dedede firmware_ECUsbPorts" and pass Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Change-Id: I8639fb6f63e60acfd504aef60338324419ff1412 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2883380 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--board/blipper/board.c5
-rw-r--r--board/blipper/board.h4
-rw-r--r--board/blipper/gpio.inc2
3 files changed, 10 insertions, 1 deletions
diff --git a/board/blipper/board.c b/board/blipper/board.c
index 0bde4eb22d..c73877e1c4 100644
--- a/board/blipper/board.c
+++ b/board/blipper/board.c
@@ -199,6 +199,11 @@ __override const struct ec_response_keybd_config
return &blipper_keybd;
}
+/* USB-A charging control */
+const int usb_port_enable[USB_PORT_COUNT] = {
+ GPIO_EN_USB_A0_VBUS
+};
+
void board_init(void)
{
gpio_enable_interrupt(GPIO_USB_C0_INT_ODL);
diff --git a/board/blipper/board.h b/board/blipper/board.h
index 2d736c6ca5..419514b95e 100644
--- a/board/blipper/board.h
+++ b/board/blipper/board.h
@@ -70,6 +70,10 @@
#define CONFIG_KEYBOARD_REFRESH_ROW3
#define CONFIG_KEYBOARD_KEYPAD
+/* 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/blipper/gpio.inc b/board/blipper/gpio.inc
index 330e2a5865..5eeb6aec9f 100644
--- a/board/blipper/gpio.inc
+++ b/board/blipper/gpio.inc
@@ -76,7 +76,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_A0_VBUS, PIN(L, 6), GPIO_OUT_HIGH)
+GPIO(EN_USB_A0_VBUS, PIN(L, 6), GPIO_OUT_LOW)
GPIO(EN_USB_A1_VBUS, PIN(E, 6), GPIO_OUT_LOW)
GPIO(EC_AP_USB_C0_HPD, PIN(L, 4), GPIO_OUT_LOW)
GPIO(EC_AP_USB_C1_HDMI_HPD, PIN(K, 7), GPIO_OUT_LOW)