diff options
author | amber.chen <amber.chen@lcfc.corp-partner.google.com> | 2021-04-27 14:39:16 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-28 19:07:00 +0000 |
commit | abd72bf6f8fbcfc8f7d6c80e1e807dd0e6248f1b (patch) | |
tree | 67e1e24c9090ed46d7578a6c28de6dc772b4da3a | |
parent | 46506b0d075084e5d8c22aaa7937f02159719403 (diff) | |
download | chrome-ec-abd72bf6f8fbcfc8f7d6c80e1e807dd0e6248f1b.tar.gz |
boten: add USB-A power enable and disable
Enable CONFIG_USB_PORT_POWER_DUMB for enabling/disabling charging from
USB-A ports. This change also enables disables the USB1 low power limit
by default
BUG=b:182753927
BRANCH=dedede
TEST=make -j BOARD=boten
TEST=Run "test_that -b dedede firmware_ECUsbPorts"
Signed-off-by: amber.chen <amber.chen@lcfc.corp-partner.google.com>
Change-Id: I0d9721469cdd9744f24c36da3cf6d9185e46e630
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2852365
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Henry Sun <henrysun@google.com>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r-- | board/boten/board.c | 5 | ||||
-rw-r--r-- | board/boten/board.h | 4 | ||||
-rw-r--r-- | board/boten/gpio.inc | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/board/boten/board.c b/board/boten/board.c index 274dc4e521..dae2e74308 100644 --- a/board/boten/board.c +++ b/board/boten/board.c @@ -211,6 +211,11 @@ const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { }, }; +/* 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/boten/board.h b/board/boten/board.h index d0d93a952a..3976063373 100644 --- a/board/boten/board.h +++ b/board/boten/board.h @@ -90,6 +90,10 @@ /* USB Mux */ #define CONFIG_USB_MUX_IT5205 +/* 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/boten/gpio.inc b/board/boten/gpio.inc index eaccd0b8ae..afd17c3da0 100644 --- a/board/boten/gpio.inc +++ b/board/boten/gpio.inc @@ -80,7 +80,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) |