From 7201602a18b63fc5236f025d22dc726637866cb6 Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Wed, 10 Jan 2024 20:38:05 +0000 Subject: soc/intel/common/tcss: Guard disabling MUX with TCSS_HAS_USBC_OPS Currently, SOC_INTEL_COMMON_BLOCK_TCSS will set MUX to disabled. The two related options to re-configure it for either USB devices or displays, are currently only supported by the ChromeEC. As such, any device without the ChromeEC will boot with attached USB-C devices in a non-functional state. Add TCSS_HAS_USBC_OPS to make this feature configurable, and set the default to enabled if the board features the ChromeEC. Signed-off-by: Sean Rhodes Change-Id: Ia848668ae9af4637fc7cffec9eb694f29d7deba9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/79882 Reviewed-by: Kapil Porwal Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/soc/intel/common/block/tcss/tcss.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/soc/intel/common/block/tcss/tcss.c') diff --git a/src/soc/intel/common/block/tcss/tcss.c b/src/soc/intel/common/block/tcss/tcss.c index 7c58e3ae58..974aeb625a 100644 --- a/src/soc/intel/common/block/tcss/tcss.c +++ b/src/soc/intel/common/block/tcss/tcss.c @@ -442,23 +442,22 @@ void tcss_configure(const struct typec_aux_bias_pads aux_bias_pads[MAX_TYPE_C_PO size_t i; port_map = tcss_get_port_info(&num_ports); - if (port_map == NULL) + if ((port_map == NULL) || platform_is_resuming()) return; - if (!platform_is_resuming()) { + if (CONFIG(TCSS_HAS_USBC_OPS)) for (i = 0; i < num_ports; i++) tcss_init_mux(i, &port_map[i]); - /* This should be performed before alternate modes are entered */ - if (tcss_ops.configure_aux_bias_pads) - tcss_ops.configure_aux_bias_pads(aux_bias_pads); + /* This should be performed before alternate modes are entered */ + if (tcss_ops.configure_aux_bias_pads) + tcss_ops.configure_aux_bias_pads(aux_bias_pads); - if (CONFIG(ENABLE_TCSS_DISPLAY_DETECTION)) - tcss_configure_dp_mode(port_map, num_ports); + if (CONFIG(ENABLE_TCSS_DISPLAY_DETECTION)) + tcss_configure_dp_mode(port_map, num_ports); - if (CONFIG(ENABLE_TCSS_USB_DETECTION)) - tcss_configure_usb_mode(port_map, num_ports); - } + if (CONFIG(ENABLE_TCSS_USB_DETECTION)) + tcss_configure_usb_mode(port_map, num_ports); } bool tcss_valid_tbt_auth(void) -- cgit v1.2.3