summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/usb_common.c5
-rw-r--r--common/usbc/usb_tc_drp_acc_trysrc_sm.c11
2 files changed, 12 insertions, 4 deletions
diff --git a/common/usb_common.c b/common/usb_common.c
index dc8fb21e0a..9e17c0d98c 100644
--- a/common/usb_common.c
+++ b/common/usb_common.c
@@ -356,6 +356,11 @@ __overridable bool board_is_usb_pd_port_present(int port)
return (port >= 0) && (port < board_get_usb_pd_port_count());
}
+__overridable bool board_is_dts_port(int port)
+{
+ return true;
+}
+
int pd_get_retry_count(int port, enum tcpm_transmit_type type)
{
/* PD 3.0 6.7.7: nRetryCount = 2; PD 2.0 6.6.9: nRetryCount = 3 */
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
index 554cf5129b..d84b2c5216 100644
--- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c
+++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
@@ -2321,7 +2321,7 @@ static void tc_attach_wait_snk_run(const int port)
/* Check for connection */
tcpm_get_cc(port, &cc1, &cc2);
- if (cc_is_rp(cc1) && cc_is_rp(cc2))
+ if (cc_is_rp(cc1) && cc_is_rp(cc2) && board_is_dts_port(port))
new_cc_state = PD_CC_DFP_DEBUG_ACC;
else if (cc_is_rp(cc1) || cc_is_rp(cc2))
new_cc_state = PD_CC_DFP_ATTACHED;
@@ -2855,9 +2855,12 @@ static void tc_attach_wait_src_run(const int port)
/* Check for connection */
tcpm_get_cc(port, &cc1, &cc2);
- /* Debug accessory */
- if (cc_is_snk_dbg_acc(cc1, cc2)) {
- /* Debug accessory */
+ if (cc_is_snk_dbg_acc(cc1, cc2) && board_is_dts_port(port)) {
+ /*
+ * Debug accessory.
+ * A debug accessory in a non-DTS port will be
+ * recognized by at_least_one_rd as UFP attached.
+ */
new_cc_state = PD_CC_UFP_DEBUG_ACC;
} else if (cc_is_at_least_one_rd(cc1, cc2)) {
/* UFP attached */