summaryrefslogtreecommitdiff
path: root/common/usbc/usb_tc_drp_acc_trysrc_sm.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/usbc/usb_tc_drp_acc_trysrc_sm.c')
-rw-r--r--common/usbc/usb_tc_drp_acc_trysrc_sm.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
index 964d6dda8c..5e3117e582 100644
--- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c
+++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
@@ -1791,13 +1791,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);