From 903439c6a33c43c18d8ec7ac9caa2f7082a36b95 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 7 Jan 2021 16:38:04 -0700 Subject: zephyr: Add the TCPM mux Kconfigs Add support for this feature which is required by the PS8815 driver, among others. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 build volteer on zephyr Signed-off-by: Simon Glass Change-Id: I36ec8b3a9289cc85ef74792738450dc6a9687dc0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2617043 Reviewed-by: Keith Short --- zephyr/Kconfig.usbc | 24 ++++++++++++++++++++++++ zephyr/shim/include/config_chip.h | 5 +++++ 2 files changed, 29 insertions(+) diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc index 61303b04d8..f641c5f7ed 100644 --- a/zephyr/Kconfig.usbc +++ b/zephyr/Kconfig.usbc @@ -471,6 +471,7 @@ config PLATFORM_EC_USB_PD_TCPC_RUNTIME_CONFIG config PLATFORM_EC_USB_PD_TCPM_PS8815 bool "Parade PS8815 USB-C Gen 2 Type-C Port Controller" + select PLATFORM_EC_USB_PD_TCPM_MUX help The Parade Technologies PS8815 is an active retiming/redriving (respectively for USB 3.1 Gen 2 / DisplayPort 1.4a HBR3) integrated @@ -499,6 +500,29 @@ config PLATFORM_EC_USB_PD_TCPM_TUSB422 Manager (TCPM), communicates with the TUSB422 through an I2C interface. +config PLATFORM_EC_USB_PD_TCPM_MUX + bool "Support optional register 18h steer the high-speed muxes" + help + Enable this option if the TCPC port controller supports the optional + register 18h CONFIG_STANDARD_OUTPUT to steer the high-speed muxes. + + See section 4.4.4 (CONFIGURE STANDARD OUTPUT) of the USB Type-C Port + Controller Interface Specification, Revision 2.0, Version 1.2 for more + information. + +config PLATFORM_EC_USB_MUX_RUNTIME_CONFIG + bool "USB mux runtime config" + default y + help + Allows the configuration of the USB mux to be set up at runtime. This + makes the usb_muxes[] array writable, i.e. not const. It should be + declared as such in the board config. + + This is useful when the board has runtime information that changes + the configuration, such as Chromium OS Board Info (CBI set in the + factory. Without this, multiple EC images would need to be installed + depending on the board. + config PLATFORM_EC_CMD_TCPC_DUMP bool "Console command: tcpc_dump" # anx7447 also supports this command, but is not yet enabled diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index a6e6854ed0..b4500f409d 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -466,4 +466,9 @@ enum battery_type { #define CONFIG_USB_MUX_VIRTUAL #endif +#undef CONFIG_USB_PD_TCPM_MUX +#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_MUX +#define CONFIG_USB_PD_TCPM_MUX +#endif + #endif /* __CROS_EC_CONFIG_CHIP_H */ -- cgit v1.2.1