From 59a621abc70464352eaf540bd6cb896935b9ba72 Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Mon, 22 Mar 2021 10:43:42 -0600 Subject: soc/intel/tgl,mb/google/volteer: Add API for Type-C aux bias pads TGL boards using the Type-C subsystem for USB Type-C ports without a retimer attached may require a DC bias on the aux lines for certain modes to work. This patch adds native coreboot support for programming the IOM to handle this DC bias via a simple devicetree setting. Previously a UPD was required to tell the FSP which GPIOs were used for the pullup and pulldown biases, but the API for this UPD was effectively undocumented. BUG=b:174116646 TEST=Verified on volteer2 that a Type-C flash drive is enumerated succesfully on all ports. Verified all major power flows (boot, reboot, powerdown and S0ix/suspend) still work as expected. Signed-off-by: Tim Wawrzynczak Change-Id: I70e36a41e760f4a435511c147cc5744a77dbccc0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/51649 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/soc/intel/common/block/include/intelblocks/tcss.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/soc/intel/common/block/include') diff --git a/src/soc/intel/common/block/include/intelblocks/tcss.h b/src/soc/intel/common/block/include/intelblocks/tcss.h index 68e279ca2a..29093d1664 100644 --- a/src/soc/intel/common/block/include/intelblocks/tcss.h +++ b/src/soc/intel/common/block/include/intelblocks/tcss.h @@ -3,6 +3,8 @@ #ifndef _TCSS_H_ #define _TCSS_H_ +#include + /* PMC IPC related offsets and commands */ #define PMC_IPC_USBC_CMD_ID 0xA7 #define PMC_IPC_USBC_SUBCMD_ID 0x0 @@ -136,7 +138,17 @@ struct tcss_port_map { uint8_t usb3_port; /* USB3 Port Number */ }; -void tcss_configure(void); +struct typec_aux_bias_pads { + gpio_t pad_auxn_dc; + gpio_t pad_auxp_dc; +}; + +/* + * 1) Initialize TCSS muxes to disconnected state + * 2) Configure GPIO pads to provide DC Bias on AUX signals + * 3) Detect DP-over-Type-C alternate mode + */ +void tcss_configure(const struct typec_aux_bias_pads pads[MAX_TYPE_C_PORTS]); /* * Mainboard method to setup any mux config needed for TCSS display operations. -- cgit v1.2.3