diff options
author | Ayushee <ayushee.shah@intel.com> | 2019-06-21 02:42:32 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-17 21:06:36 +0000 |
commit | 0d7346d351d64724ab475ac3769829ed2ec9a7a2 (patch) | |
tree | 4ea8d416cc36e8ada03edbbdbb515d869bd846db /driver | |
parent | e0d99a923236fb2f65fb8301e6ac631ba4d4267b (diff) | |
download | chrome-ec-0d7346d351d64724ab475ac3769829ed2ec9a7a2.tar.gz |
TCPMv1: Add support for Thunderbolt-compatible mode
Thunderbolt is a hardware interface that allows connection of external
peripherals to a computer. This code enables thunderbolt 3 over Type-C
interface. Thunderbolt provides concurrent support for PCIe transactions
and DisplayPort and the thunderbolt controller provides isochronous
communication on a single network style interface, allowing a Host
computer to communicate at high bandwidth with multiple data/display
devices through a single physical connection.
The USB Type-C specification allows for Alternate Modes to be supported
on the connector and cables. This CL adds a Discovery flow to determine
if an Thunderbolt Alternate Mode is supported and a mechanism for
switching in thunderbolt mode.
TBT USB PD flow:
-------------------Explicit contact---------------------
Discover Identity(SOP) ---- Modal operation supported?
|
---------- ACK -----|---- NACK --- Disable TBT
|
Discover Identity(SOP') --- Check and store response
(CL:1707851 and CL:1553898)
|
Is cable super speed?
-------- Yes -------|----- No ---- Disable TBT
|
Discover SVID (SOP) -------- SVID == 0x8087?
|
------------- Yes -----|------ No ---- Disable TBT
|
Discover SVID (SOP') -------- SVID == 0x8087?
|
----------- yes------- | - No - Limit TBT to passive Gen 2
|
Discover Mode (SOP) ------ Store device response
---------------|
|
Discover Mode (SOP') ----- Store cable response
|
Enter Safe mode
|
Active cable?
--------- Yes -----|-------- No ---------
| |
Enter TBT mode (SOP' SOP" SOP) Enter TBT mode SOP
(Note: This is not implemented in this CL)
BUG=b:140643923
BRANCH=none
TEST=Tested on Tglrvp-u able to enter into Thunderbolt-compatible mode &
Non Thunderbolt-compatible devices are detected as per their spec.
Change-Id: I65ed86e9f32d36fe8e30c3285f516b9871f3e119
Signed-off-by: Ayushee <ayushee.shah@intel.com>
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1926379
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/usb_mux/usb_mux.c | 5 | ||||
-rw-r--r-- | driver/usb_mux/virtual.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/driver/usb_mux/usb_mux.c b/driver/usb_mux/usb_mux.c index 93c741c1e9..7fc4934001 100644 --- a/driver/usb_mux/usb_mux.c +++ b/driver/usb_mux/usb_mux.c @@ -238,14 +238,15 @@ static int command_typec(int argc, char **argv) mux_state = usb_mux_get(port); ccprintf("Port %d: USB=%d DP=%d POLARITY=%s HPD_IRQ=%d " - "HPD_LVL=%d SAFE=%d\n", port, + "HPD_LVL=%d SAFE=%d TBT=%d\n", port, !!(mux_state & USB_PD_MUX_USB_ENABLED), !!(mux_state & USB_PD_MUX_DP_ENABLED), mux_state & USB_PD_MUX_POLARITY_INVERTED ? "INVERTED" : "NORMAL", !!(mux_state & USB_PD_MUX_HPD_IRQ), !!(mux_state & USB_PD_MUX_HPD_LVL), - !!(mux_state & USB_PD_MUX_SAFE_MODE)); + !!(mux_state & USB_PD_MUX_SAFE_MODE), + !!(mux_state & USB_PD_MUX_TBT_COMPAT_ENABLED)); return EC_SUCCESS; } diff --git a/driver/usb_mux/virtual.c b/driver/usb_mux/virtual.c index a6e8377ce8..cef3e89ca2 100644 --- a/driver/usb_mux/virtual.c +++ b/driver/usb_mux/virtual.c @@ -19,7 +19,7 @@ #define USB_PD_MUX_HPD_STATE (USB_PD_MUX_HPD_LVL | USB_PD_MUX_HPD_IRQ) #define USB_PD_MUX_USB_DP_STATE (USB_PD_MUX_USB_ENABLED | \ USB_PD_MUX_DP_ENABLED | USB_PD_MUX_POLARITY_INVERTED | \ - USB_PD_MUX_SAFE_MODE) + USB_PD_MUX_SAFE_MODE | USB_PD_MUX_TBT_COMPAT_ENABLED) static mux_state_t virtual_mux_state[CONFIG_USB_PD_PORT_MAX_COUNT]; |