summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/usb_pd_protocol.c19
-rw-r--r--common/usbc/usb_tc_drp_acc_trysrc_sm.c19
-rw-r--r--include/config.h16
3 files changed, 41 insertions, 13 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index 29b07a0767..4c480c4bed 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -426,13 +426,20 @@ static void set_vconn(int port, int enable)
ppc_set_vconn(port, 0);
/*
- * We always need to tell the TCPC to enable Vconn first, otherwise some
- * TCPCs get confused when a PPC sets secondary CC line to 5V and TCPC
- * immediately disconnect. If there is a PPC, both devices will
- * potentially source Vconn, but that should be okay since Vconn has
- * "make before break" electrical requirements when swapping anyway.
+ * Some TCPCs/PPC combinations can trigger OVP if the TCPC doesn't
+ * source VCONN. This happens if the TCPC will trip OVP with 5V, and the
+ * PPC doesn't isolate the TCPC from VCONN when sourcing. But, some PPCs
+ * which do isolate the TCPC can't handle 5V on its host-side CC pins,
+ * so the TCPC shouldn't source VCONN in those cases.
+ *
+ * In the first case, both TCPC and PPC will potentially source Vconn,
+ * but that should be okay since Vconn has "make before break"
+ * electrical requirements when swapping anyway.
+ *
+ * See b/72961003 and b/180973460
*/
- tcpm_set_vconn(port, enable);
+ if (IS_ENABLED(CONFIG_USB_PD_TCPC_VCONN))
+ tcpm_set_vconn(port, enable);
if (IS_ENABLED(CONFIG_USBC_PPC_VCONN) && enable)
ppc_set_vconn(port, 1);
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
index 30f1d6ac85..b45d7377d6 100644
--- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c
+++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
@@ -1692,13 +1692,20 @@ static void set_vconn(int port, int enable)
ppc_set_vconn(port, 0);
/*
- * We always need to tell the TCPC to enable Vconn first, otherwise some
- * TCPCs get confused and think the CC line is in over voltage mode and
- * immediately disconnects. If there is a PPC, both devices will
- * potentially source Vconn, but that should be okay since Vconn has
- * "make before break" electrical requirements when swapping anyway.
+ * Some TCPCs/PPC combinations can trigger OVP if the TCPC doesn't
+ * source VCONN. This happens if the TCPC will trip OVP with 5V, and the
+ * PPC doesn't isolate the TCPC from VCONN when sourcing. But, some PPCs
+ * which do isolate the TCPC can't handle 5V on its host-side CC pins,
+ * so the TCPC shouldn't source VCONN in those cases.
+ *
+ * In the first case, both TCPC and PPC will potentially source Vconn,
+ * but that should be okay since Vconn has "make before break"
+ * electrical requirements when swapping anyway.
+ *
+ * See b/72961003 and b/180973460
*/
- tcpm_set_vconn(port, enable);
+ if (IS_ENABLED(CONFIG_USB_PD_TCPC_VCONN))
+ tcpm_set_vconn(port, enable);
if (IS_ENABLED(CONFIG_USBC_PPC_VCONN) && enable)
ppc_set_vconn(port, 1);
diff --git a/include/config.h b/include/config.h
index a7177856b3..1d6181e135 100644
--- a/include/config.h
+++ b/include/config.h
@@ -4180,6 +4180,9 @@
/* Define EC and TCPC modules are in one integrated chip */
#undef CONFIG_USB_PD_TCPC_ON_CHIP
+/* If VCONN is enabled, the TCPC will provide VCONN */
+#define CONFIG_USB_PD_TCPC_VCONN
+
/* Enable the encoding of msg SOP* in bits 31-28 of 32-bit msg header type */
#undef CONFIG_USB_PD_DECODE_SOP
@@ -5345,10 +5348,21 @@
#define CONFIG_USBC_PPC_VCONN
#endif
-/* The SYV682X supports VCONN and needs to be informed of CC polarity */
+/*
+ * The SYV682X supports VCONN and needs to be informed of CC polarity.
+ * There is a 3.6V limit on the HOST_CC signals, so the TCPC should not source
+ * 5V VCONN.
+ *
+ * For the ITE integrated TCPC, it wants to be notified of VCONN but won't
+ * source VCONN itself, so is safe to keep enabled.
+ */
#if defined(CONFIG_USBC_PPC_SYV682X)
#define CONFIG_USBC_PPC_POLARITY
#define CONFIG_USBC_PPC_VCONN
+#if !defined(CONFIG_USB_PD_TCPM_DRIVER_IT83XX) && \
+ !defined(CONFIG_USB_PD_TCPM_DRIVER_IT8XXX2)
+#undef CONFIG_USB_PD_TCPC_VCONN
+#endif
#endif
/*****************************************************************************/