summaryrefslogtreecommitdiff
path: root/include/usb_pd_vdo.h
diff options
context:
space:
mode:
authorAyushee <ayushee.shah@intel.com>2020-09-24 15:40:07 -0700
committerCommit Bot <commit-bot@chromium.org>2020-11-05 04:11:47 +0000
commit1a265d194969d8778fdd759e1eed891f0638202b (patch)
tree9644b49b6c118bc0120c051530b16995d4bc5a78 /include/usb_pd_vdo.h
parente609f07eef8b851b19bf4b59b5263ac702d8b871 (diff)
downloadchrome-ec-1a265d194969d8778fdd759e1eed891f0638202b.tar.gz
TCPMv2: Add support for USB4 active cable
USB4 PD flow for active cables: Structured VDM version (cable revision)-- <2.0 -------->| | | >=2.0 | | | VDO version---- <1.3 -------> Modal op? -- N --| (B21:23 of | | Discover ID SOP'- y | Active cable VDO1) | | | TBT SVID? -- N --| >=1.3 | | | y | Cable USB4 support? - N | | | | Gen4 cable? - N - Skip USB4 mode entry y Skip USB4 | | mode entry | Enter USB4 y (SOP',SOP'',SOP) | | |<---- NAK ----- Enter mode TBT SOP'<---| | | | | ACK | | | | |<---- NAK ----- Enter mode TBT SOP'' | | | | Exit TBT mode SOP ACK | | | | ACK/NAK Enter USB4 mode | | SOP | Exit TBT mode SOP'' | | | ACK/NAK | | | Exit TBT mode SOP' | | | ACK/NAK | | | |--------Retry done? ---- N ------------| | y | Skip USB4 mode entry The CL also checks if the port is VCONN source before sending Enter USB SOP' and SOP'' messages and requests for a vconn swap is it isn't In case of reboot, the port sends exit Thunderbolt mode SOP' and SOP'' and skips sending exit Thunderbolt mode for SOP, since it didn't enter Thunderbolt mode SOP prior to reboot. Note: 1. This is only applicable when the port enters USB4 mode SOP and Thunderbolt mode with the cable plug. 2. It is a temporary behaviour until data reset feature is in place (b/141363146) BUG=b:156749387 BRANCH=None TEST=1.Able to enter into USB4 with active cable. 2.Able to exit Thunderbolt mode SOP' and SOP'' on reboot and re-enter into USB4 mode with active cable. Signed-off-by: Ayushee <ayushee.shah@intel.com> Change-Id: I828c7ca0fd9b7b1025f13bcc86c511692b9f9895 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2432868 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'include/usb_pd_vdo.h')
-rw-r--r--include/usb_pd_vdo.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/usb_pd_vdo.h b/include/usb_pd_vdo.h
index 2cecec5d84..e0b1bf65dc 100644
--- a/include/usb_pd_vdo.h
+++ b/include/usb_pd_vdo.h
@@ -243,6 +243,10 @@ union passive_cable_vdo_rev30 {
* 011b = [USB4] Gen3
* 100b..111b = Reserved, Shall Not be used
*/
+enum vdo_version {
+ VDO_VERSION_1_3 = 3,
+};
+
union active_cable_vdo1_rev30 {
struct {
enum usb_rev30_ss ss: 3;
@@ -257,7 +261,7 @@ union active_cable_vdo1_rev30 {
uint32_t reserved0 : 1;
uint32_t connector : 2;
uint32_t reserved1 : 1;
- uint32_t vdo_version : 3;
+ enum vdo_version vdo_ver : 3;
uint32_t fw_version : 4;
uint32_t hw_version : 4;
};
@@ -326,6 +330,11 @@ enum active_cable_usb2_support {
USB2_NOT_SUPPORTED,
};
+enum active_cable_usb4_support {
+ USB4_SUPPORTED,
+ USB4_NOT_SUPPORTED,
+};
+
union active_cable_vdo2_rev30 {
struct {
uint8_t usb_gen : 1;
@@ -335,7 +344,7 @@ union active_cable_vdo2_rev30 {
uint8_t usb_32_support : 1;
enum active_cable_usb2_support usb_20_support : 1;
uint8_t usb_20_hub_hop : 2;
- uint8_t usb_40_support : 1;
+ enum active_cable_usb4_support usb_40_support : 1;
enum retimer_active_element active_elem : 1;
uint8_t physical_conn : 1;
uint8_t u3_to_u0 : 1;