From 716bb53fc22491ce4c4cc87f1c979006b917710f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 14 Jan 2021 14:24:09 -0700 Subject: 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 Change-Id: I6658ebba1e473cafed2c8ae05e4013207f26ef3d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2631098 Reviewed-by: Jack Rosenthal --- board/volteer/usbc_config.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'board/volteer/usbc_config.c') 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" @@ -197,6 +198,13 @@ struct tcpc_config_t tcpc_config[] = { 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 = { -- cgit v1.2.1