summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAbe Levkoy <alevkoy@chromium.org>2023-05-15 12:46:52 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-05-16 21:19:52 +0000
commitcfc740514c3de776534d22673ebf05fe8c906c5b (patch)
tree24c8b87eb98d51c9621899d5695de600b9941bff /common
parent32a3d94e879efebef135062342fdbd9dae8ec463 (diff)
downloadchrome-ec-cfc740514c3de776534d22673ebf05fe8c906c5b.tar.gz
TCPMv2: Do not attempt Enter_USB under PD 2.0
If the port partner is not PD 3.0 or higher, do not consider it to support USB4/Enter_USB. If the AP requests USB4 entry, disregard the request and consider mode entry complete. Avoid repeatedly sending Enter_USB to a PD 2.0 partner. BUG=b:279421317 TEST=twister -s drivers/drivers.usbc_usb4_mode Change-Id: I3e82738f816e6dd5af24d627b6cd971a34d74586 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4533369 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Tested-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Jameson Thies <jthies@google.com>
Diffstat (limited to 'common')
-rw-r--r--common/usbc/usb_mode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/usbc/usb_mode.c b/common/usbc/usb_mode.c
index 017f89fc74..157c1b1f04 100644
--- a/common/usbc/usb_mode.c
+++ b/common/usbc/usb_mode.c
@@ -20,6 +20,7 @@
#include "usb_pd_dpm_sm.h"
#include "usb_pd_tcpm.h"
#include "usb_pe_sm.h"
+#include "usb_prl_sm.h"
#include "usb_tbt_alt_mode.h"
#include "usbc_ppc.h"
@@ -169,6 +170,9 @@ bool enter_usb_port_partner_is_capable(int port)
if (usb4_state[port] == USB4_INACTIVE)
return false;
+ if (prl_get_rev(port, TCPCI_MSG_SOP) < PD_REV30)
+ return false;
+
if (!PD_PRODUCT_IS_USB4(disc->identity.product_t1.raw_value))
return false;