diff options
author | Simon Glass <sjg@chromium.org> | 2021-01-14 12:32:33 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-16 03:17:57 +0000 |
commit | 7e5f1b5a13524099088d365ea4261c65942dd069 (patch) | |
tree | 3ab0aacb92436f1973c277c15b08c54b8eb07688 /zephyr | |
parent | e279c05dcaeefee027ae0e32ac7e4e8b145df403 (diff) | |
download | chrome-ec-7e5f1b5a13524099088d365ea4261c65942dd069.tar.gz |
zephyr: Add support for USB_PD_TCPC_LOW_POWER
Enable this option so that we can enable dual role properly. At
present it doesn't work due to a check in tusb422.
BUG=b:175434113
BRANCH=none
TEST=make BOARD=volteer -j30
With a zephyr-chrome CL, build volteer on zephyr
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Icc1bc149df3d6659e5f88b68540d3462cbe6adf5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2631086
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr')
-rw-r--r-- | zephyr/Kconfig.usbc | 19 | ||||
-rw-r--r-- | zephyr/shim/include/config_chip.h | 8 |
2 files changed, 27 insertions, 0 deletions
diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc index 63e08722fb..b3cd420242 100644 --- a/zephyr/Kconfig.usbc +++ b/zephyr/Kconfig.usbc @@ -416,6 +416,25 @@ config PLATFORM_EC_USBC_PPC_DEDICATED_INT ppc_get_alert_status() to find out he interrupt status for a port. This function should be provided by the board code. +config PLATFORM_EC_USB_PD_TCPC_LOW_POWER + bool "Allow Type-C Port Controller to enter low-power mode" + default y + help + Allows entry to a low power mode when the USB port is idle. + When enabled, an enter_low_power_mode member is present in tcpm_drv + and should be set to a function that selects that mode, such as + tcpci_enter_low_power_mode() for TCPCI-compatible TCPCs. + +config PLATFORM_EC_USB_PD_TCPC_LPM_EXIT_DEBOUNCE_US + int "Debounce delay when exiting low-power mode (uS)" + depends on PLATFORM_EC_USB_PD_TCPC_LOW_POWER + default 25000 + help + Some TCPCs need additional time following a VBUS change to internally + debounce the CC line status and update the CC_STATUS register. This + is the delay in microseconds to allow before checking the CC line + status in the EC. + choice "Type-C Port Manager (TCPM)" prompt "Choose a Type-C Port Manager (TCPM) to manage TCPC" diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index 2352857366..6898314ab6 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -506,4 +506,12 @@ enum battery_type { #define CONFIG_HAS_TASK_PD_INT #endif +#undef CONFIG_USB_PD_TCPC_LOW_POWER +#undef CONFIG_USB_PD_TCPC_LPM_EXIT_DEBOUNCE +#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPC_LOW_POWER +#define CONFIG_USB_PD_TCPC_LOW_POWER +#define CONFIG_USB_PD_TCPC_LPM_EXIT_DEBOUNCE \ + CONFIG_PLATFORM_EC_USB_PD_TCPC_LPM_EXIT_DEBOUNCE_US +#endif /* CONFIG_PLATFORM_EC_USB_PD_TCPC_LOW_POWER */ + #endif /* __CROS_EC_CONFIG_CHIP_H */ |