diff options
author | Keith Short <keithshort@chromium.org> | 2020-05-20 16:31:46 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-15 23:46:06 +0000 |
commit | 838ffc66db00a6576b30102662b1ae37cff9cab6 (patch) | |
tree | 0e89de413ab7d5b06c1e0641e2ded871789415f8 /board/volteer | |
parent | f6a4262385b7eb5e97cd0a768fdfbb016325db19 (diff) | |
download | chrome-ec-838ffc66db00a6576b30102662b1ae37cff9cab6.tar.gz |
volteer: 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:157147239, b:158708115
BRANCH=none
TEST=make buildall -j
TEST=Run "ectool usbchargemode 0 0" and verify USB VBUS turns off.
TEST=Run "test_that -b volteer firmware_ECUsbPorts"
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I89343fb4ed2d6c15bd1862f5a64e7a5cd68bdf69
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2223823
Tested-by: Eric Herrmann <eherrmann@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'board/volteer')
-rw-r--r-- | board/volteer/board.c | 9 | ||||
-rw-r--r-- | board/volteer/board.h | 6 | ||||
-rw-r--r-- | board/volteer/gpio.inc | 2 |
3 files changed, 17 insertions, 0 deletions
diff --git a/board/volteer/board.c b/board/volteer/board.c index 68515fd95e..e2d0d9cd5e 100644 --- a/board/volteer/board.c +++ b/board/volteer/board.c @@ -236,3 +236,12 @@ const struct pwm_t pwm_channels[] = { }, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); + +/******************************************************************************/ +/* USB-A charging control */ + +const int usb_port_enable[USB_PORT_COUNT] = { + GPIO_EN_PP5000_USBA, +}; + + diff --git a/board/volteer/board.h b/board/volteer/board.h index 9b09dab9c0..f1903cad36 100644 --- a/board/volteer/board.h +++ b/board/volteer/board.h @@ -21,6 +21,9 @@ #undef CONFIG_UART_TX_BUF_SIZE #define CONFIG_UART_TX_BUF_SIZE 4096 +/* Chipset features */ +#define CONFIG_POWER_PP5000_CONTROL + /* LED defines */ #define CONFIG_LED_PWM /* Although there are 2 LEDs, they are both controlled by the same lines. */ @@ -72,6 +75,9 @@ #define CONFIG_USB_PD_USB4 /* USB Type A Features */ +#define USB_PORT_COUNT 1 +#define CONFIG_USB_PORT_POWER_DUMB + /* BC 1.2 */ diff --git a/board/volteer/gpio.inc b/board/volteer/gpio.inc index 21484702d0..d14f1c9e59 100644 --- a/board/volteer/gpio.inc +++ b/board/volteer/gpio.inc @@ -94,6 +94,8 @@ GPIO(SYS_RST_ODL, PIN(C, 5), GPIO_ODR_HIGH) GPIO(EC_PCH_INT_ODL, PIN(B, 0), GPIO_ODR_HIGH) /* USB and USBC Signals */ +GPIO(EN_PP5000_USBA, PIN(C, 6), GPIO_OUT_LOW) /* Enable USB-A charging - all ports */ +GPIO(USB_A_LOW_PWR_OD, PIN(6, 6), GPIO_ODR_LOW) /* Don't limit USB-A charging by default - all ports */ /* * USB_C1 moved from GPIO32 to GPIO83 on boards with board ID >=1. |