summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/include
diff options
context:
space:
mode:
authorJohn <john.zhao@intel.com>2022-03-09 17:51:56 -0800
committerFelix Held <felix-coreboot@felixheld.de>2022-04-06 16:19:18 +0000
commit848b42558c29aca8e08564303f9a3ab8007722ac (patch)
tree51757aabc8ebddd194ec1f18807907f315751fe4 /src/soc/intel/common/block/include
parent740eee5eec2a978192e8b74327cb96b735b7d0ed (diff)
soc/intel/common: Abstract the common TCSS functions
This change abstracts the common TCSS functions for pad configuration and Thunderbolt authentication. BUG=b:213574324 TEST=Build platforms coreboot images successfully. Change-Id: I3302aabfb5f540c41da6359f11376b4202c6310b Signed-off-by: John Zhao <john.zhao@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/62723 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Subrata Banik <subratabanik@google.com>
Diffstat (limited to 'src/soc/intel/common/block/include')
-rw-r--r--src/soc/intel/common/block/include/intelblocks/tcss.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/soc/intel/common/block/include/intelblocks/tcss.h b/src/soc/intel/common/block/include/intelblocks/tcss.h
index 181eff0bf8..5209858bd5 100644
--- a/src/soc/intel/common/block/include/intelblocks/tcss.h
+++ b/src/soc/intel/common/block/include/intelblocks/tcss.h
@@ -137,12 +137,22 @@ struct typec_aux_bias_pads {
gpio_t pad_auxp_dc;
};
+struct soc_tcss_ops {
+ void (*configure_aux_bias_pads)(const struct typec_aux_bias_pads *pads);
+ bool (*valid_tbt_auth)(void);
+};
+
+extern const struct soc_tcss_ops tcss_ops;
+
+/* Method to configure pads */
+void tcss_configure_aux_bias_pads_regbar(const struct typec_aux_bias_pads *pads);
+
/*
* 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]);
+void tcss_configure(const struct typec_aux_bias_pads aux_bias_pads[MAX_TYPE_C_PORTS]);
/*
* Method to get only the port information to initialize the muxes to
@@ -152,6 +162,6 @@ void tcss_configure(const struct typec_aux_bias_pads pads[MAX_TYPE_C_PORTS]);
const struct tcss_port_map *tcss_get_port_info(size_t *num_ports);
/* Method to validate the Thunderbolt authentication */
-uint32_t tcss_valid_tbt_auth(void);
+bool tcss_valid_tbt_auth(void);
#endif /* _TCSS_H_ */