summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2022-05-23 13:59:38 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-05-26 23:13:57 +0000
commit24dcbaf1a255324feb8f473972ba6dcc28468ae2 (patch)
treee6932517cad926adf0ed063f5f9d625bd622d4fd /include
parente7ba53ffc045ec6a152674e15e48d51a09d675d6 (diff)
downloadchrome-ec-24dcbaf1a255324feb8f473972ba6dcc28468ae2.tar.gz
TCPMv2: Add support for combination of PPC & non-PPC ports
Some PD/TCPC chips have integrated power path control, this CL allows having combination of chips with discrete PPC and integrated PPC in same board. By checking board level function to see if board's port has PPC or not, logic decides to call PPC functions. BUG=none BRANCH=none TEST=Tested on ADL-RVP, CCGXX with integrated PPC & NCT3808 with discrete SN5S330 PPC combo works. Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Change-Id: I5289f41664c9c5bf6c4966c9dcf79274cebe8c2b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3146212 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/usbc_ppc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/usbc_ppc.h b/include/usbc_ppc.h
index ae7e0fba4c..5377f922ed 100644
--- a/include/usbc_ppc.h
+++ b/include/usbc_ppc.h
@@ -318,4 +318,17 @@ int ppc_get_alert_status(int port);
*/
int ppc_set_frs_enable(int port, int enable);
+/**
+ * Board specific function to check if the Type-C port has PPC
+ *
+ * Some PD/TCPC chips have integrated power path control. If the board is
+ * using combination of chips with discrete PPC and integrated PPC add an
+ * overridable board function to return false for integrated PPC ports and
+ * true for discrete PPC port.
+ *
+ * @param port: The Type-C port number to check
+ * @return true if Type-C port has PPC else false
+ */
+__override_proto bool board_port_has_ppc(int port);
+
#endif /* !defined(__CROS_EC_USBC_PPC_H) */