summaryrefslogtreecommitdiff
path: root/include/usb_tbt_alt_mode.h
diff options
context:
space:
mode:
authorli feng <li1.feng@intel.com>2020-06-30 17:02:14 -0700
committerCommit Bot <commit-bot@chromium.org>2020-07-18 05:04:29 +0000
commitd9cf2c2ffa2b88c04544d32e26ed1beff1eb5e40 (patch)
treef963498b2331b764a01a639db62204629fdac4da /include/usb_tbt_alt_mode.h
parenta3c994ccc1cda5450d8da2c568653ca10b7b8439 (diff)
downloadchrome-ec-d9cf2c2ffa2b88c04544d32e26ed1beff1eb5e40.tar.gz
TCPMv2: Add thunderbolt entry flow for active cable
Order of Enter Mode: SOP', SOP''(if supported), SOP Order of Exit Mode: SOP, SOP''(if supported), SOP' Entry flow start from TBT_START, state changes to TBT_ACTIVE if succeed; changes to TBT_INACTIVE if fail. Handling of NAK If any enter mode SOP* is NAK'ed, exit modes of all SOP* and retry enter. If any enter mode in retry is NAK'ed again, will exit modes of all SOP*, TBT entry failed. Special case: Exit in TBT_ACTIVE: start from TBT_ACTIVE, exit all modes of SOP*, then chagne state to TBT_INACTIVE. BUG=b:148528713 BRANCH=none TEST=1. Attach Thunderbolt dock and active cable, DUT enter Thunderbolt mode 2. Attach Thunderbolt dock and passive cable, DUT enter Thunderbolt mode Signed-off-by: li feng <li1.feng@intel.com> Change-Id: Iaaa63f70c4abc9c269cdbb2a504214f924155901 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2277487 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'include/usb_tbt_alt_mode.h')
-rw-r--r--include/usb_tbt_alt_mode.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/usb_tbt_alt_mode.h b/include/usb_tbt_alt_mode.h
index c46c471035..fb3aadb481 100644
--- a/include/usb_tbt_alt_mode.h
+++ b/include/usb_tbt_alt_mode.h
@@ -67,8 +67,10 @@ void tbt_teardown(int port);
* @param vdo_count The number of VDOs in vdm; must be at least VDO_MAX_SIZE
* @param vdm The VDM payload to be sent; output; must point to at least
* VDO_MAX_SIZE elements
+ * @param tx_type Transmit type(SOP, SOP', SOP'') for next VDM to be sent
* @return The number of VDOs written to VDM or -1 to indicate error
*/
-int tbt_setup_next_vdm(int port, int vdo_count, uint32_t *vdm);
+int tbt_setup_next_vdm(int port, int vdo_count, uint32_t *vdm,
+ enum tcpm_transmit_type *tx_type);
#endif