summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/usb_pd_protocol.c5
-rw-r--r--include/config.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index 286a48aa87..4c882eae0c 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -1675,6 +1675,11 @@ void pd_task(void *u)
/* Ensure the power supply is in the default state */
pd_power_supply_reset(port);
+#ifdef CONFIG_USB_PD_TCPC_BOARD_INIT
+ /* Board specific TCPC init */
+ board_tcpc_init();
+#endif
+
/* Initialize TCPM driver and wait for TCPC to be ready */
res = tcpm_init(port);
diff --git a/include/config.h b/include/config.h
index 985cf91079..200dce82de 100644
--- a/include/config.h
+++ b/include/config.h
@@ -2521,6 +2521,9 @@
/* Use TCPC module (type-C port controller) */
#undef CONFIG_USB_PD_TCPC
+/* Board provides specific TCPC init function */
+#undef CONFIG_USB_PD_TCPC_BOARD_INIT
+
/* Enable TCPC to enter low power mode */
#undef CONFIG_USB_PD_TCPC_LOW_POWER