diff options
author | Simon Glass <sjg@chromium.org> | 2021-01-14 14:24:09 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-16 03:18:35 +0000 |
commit | 716bb53fc22491ce4c4cc87f1c979006b917710f (patch) | |
tree | 8ef3d893df8e53b80c5aab29ae79735b98d99547 /board/volteer/usbc_config.c | |
parent | e14f7cc304c5bae37399665aa0885cfc506ff607 (diff) | |
download | chrome-ec-716bb53fc22491ce4c4cc87f1c979006b917710f.tar.gz |
volteer: Move USB-A charging info to usbc_config
Move this information into a file that can be built by Zephyr, so that
it can enable USB-A charging.
Note: This is not related to USB-C. Should we create a charger.c file
in board/volteer?
BUG=b:175434113
BRANCH=none
TEST=make BOARD=volteer -j30
With a zephyr-chrome CL, build volteer on zephyr
Type 'usbchargemode 0 on' on volteer and see it start charging the phone
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I6658ebba1e473cafed2c8ae05e4013207f26ef3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2631098
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'board/volteer/usbc_config.c')
-rw-r--r-- | board/volteer/usbc_config.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/board/volteer/usbc_config.c b/board/volteer/usbc_config.c index bc2d368ffd..9e76eef5bd 100644 --- a/board/volteer/usbc_config.c +++ b/board/volteer/usbc_config.c @@ -6,6 +6,7 @@ /* Volteer family-specific USB-C configuration */ #include "common.h" #include "cbi_ec_fw_config.h" +#include "gpio.h" #include "hooks.h" #include "system.h" #include "timer.h" @@ -198,6 +199,13 @@ BUILD_ASSERT(ARRAY_SIZE(tcpc_config) == USBC_PORT_COUNT); BUILD_ASSERT(CONFIG_USB_PD_PORT_MAX_COUNT == USBC_PORT_COUNT); /******************************************************************************/ +/* USB-A charging control */ + +const int usb_port_enable[USB_PORT_COUNT] = { + GPIO_EN_PP5000_USBA, +}; + +/******************************************************************************/ /* USBC mux configuration - Tiger Lake includes internal mux */ struct usb_mux usbc1_tcss_usb_mux = { .usb_port = USBC_PORT_C1, |