summaryrefslogtreecommitdiff
path: root/include/usb_tbt_alt_mode.h
Commit message (Collapse)AuthorAgeFilesLines
* ish: Trim down the release branchstabilize-wristpin-14469.59.B-ishstabilize-voshyr-14637.B-ishstabilize-quickfix-14695.187.B-ishstabilize-quickfix-14695.124.B-ishstabilize-quickfix-14526.91.B-ishstabilize-14695.85.B-ishstabilize-14695.107.B-ishstabilize-14682.B-ishstabilize-14633.B-ishstabilize-14616.B-ishstabilize-14589.B-ishstabilize-14588.98.B-ishstabilize-14588.14.B-ishstabilize-14588.123.B-ishstabilize-14536.B-ishstabilize-14532.B-ishstabilize-14528.B-ishstabilize-14526.89.B-ishstabilize-14526.84.B-ishstabilize-14526.73.B-ishstabilize-14526.67.B-ishstabilize-14526.57.B-ishstabilize-14498.B-ishstabilize-14496.B-ishstabilize-14477.B-ishstabilize-14469.9.B-ishstabilize-14469.8.B-ishstabilize-14469.58.B-ishstabilize-14469.41.B-ishstabilize-14442.B-ishstabilize-14438.B-ishstabilize-14411.B-ishstabilize-14396.B-ishstabilize-14395.B-ishstabilize-14388.62.B-ishstabilize-14388.61.B-ishstabilize-14388.52.B-ishstabilize-14385.B-ishstabilize-14345.B-ishstabilize-14336.B-ishstabilize-14333.B-ishrelease-R99-14469.B-ishrelease-R98-14388.B-ishrelease-R102-14695.B-ishrelease-R101-14588.B-ishrelease-R100-14526.B-ishfirmware-cherry-14454.B-ishfirmware-brya-14505.B-ishfirmware-brya-14505.71.B-ishfactory-kukui-14374.B-ishfactory-guybrush-14600.B-ishfactory-cherry-14455.B-ishfactory-brya-14517.B-ishJack Rosenthal2021-11-051-105/+0
| | | | | | | | | | | | | | | | | | | | | | In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* TCPM: Rename enum tcpm_sop_type and its constantsAbe Levkoy2021-08-311-3/+3
| | | | | | | | | | | | | | | As a followup to CL:3104290, give the TCPCI TRANSMIT and RX_BUF_FRAME_TYPE types more consistent names. Most of them can be used for receiving, not just transmitting. Fix lint errors thus revealed. BUG=b:155476419 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I399ec479eacc18622fc4d3f55f8bdabf4560fcff Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3125995 Reviewed-by: Keith Short <keithshort@chromium.org>
* TCPM: Rename enum tcpm_transmit_typeAbe Levkoy2021-08-181-3/+4
| | | | | | | | | | | | | | | Rename tcpm_transmit_type to tcpm_sop_type to reflect that it can be used for Rx as well. Describe it in comments. This prepares to consolidate enum pd_msg_type into this enum. BUG=b:155476419 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Ife97d4ad51c48f2e832b94e007954919e236a309 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3104290 Reviewed-by: Keith Short <keithshort@chromium.org>
* USB4: For AP mode entry, add support for active cablesAyushee Shah2021-03-101-0/+10
| | | | | | | | | | | | | | | | | | For AP mode entry, request to enter Thunderbolt cable mode entry prior to entering USB4 mode if - 1. Thunderbolt Mode SOP' VDO active/passive bit (B25) is TBT_CABLE_ACTIVE or 2. It's an active cable with VDM version < 2.0 or VDO version < 1.3 BUG=b:181286325 BRANCH=None TEST=Able to enter USB4 mode with LRD cable Signed-off-by: Ayushee Shah <ayushee.shah@intel.com> Change-Id: Ie223fa3d95c2357a0e50aeea93444e6f7639cc3f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2724653 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* tcpm: Move tcpm.h into an include directorySimon Glass2020-12-221-1/+1
| | | | | | | | | | | | | | | | | | This header file is used from quite a few files, relying on the EC build system to find includes in the driver/tcpm directory. For Zephyr we don't want to add that as an include. It makes more sense for header files to be in an include directory, so move it and fix up the users. BUG=b:175434113 BRANCH=none TEST=build Zephyr and ECOS on volteer Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I5851914b1a7d3fdc1ba911c0fbe9046afbaf6f5d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597985 Reviewed-by: Keith Short <keithshort@chromium.org>
* TCPMv2: Add support for USB4 active cableAyushee2020-11-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* TCPMv2: Avoid alt mode files from changing DPM statesAyushee2020-10-141-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | USB4 mode: Added a function to check if the USB4 entry is completed Thunderbolt mode: Added 2 flags TBT_RETRY_DONE, TBT_EXIT_DONE to track the Thunderbolt mode's exit and if retry is needed and a new function to check if if the Thunderbolt mode entry is completed DisplayPort mode: Added a function to check if the DisplayPort entry is completed BUG=b:169169804 BRANCH=None TEST=1. Able to enter alternate mode on hotplug and reboot 2. Able to exit the alternate mode on chipset transition and on DPM's exit mode request. Change-Id: I09662449143ad8d94b30ae102ed5ce79db852687 Signed-off-by: Ayushee <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2421425 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* TBT:Add support for exit mode SOP'/SOP'' on chipset transitionAyushee2020-10-141-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When chipset is transitioning to a new state or on sysjump, the EC re-negotiates to enter an alternate mode on booting up. This commit adds support for exiting Thunderbolt mode for SOP' and SOP'' for active cable on chipset transition and also moves all the alternate mode exit rotines to their respective files. It also delays deleting the SVID data until after the EXIT_MODE message has ACKed and avoids pd_dfp_exit_mode() from changing the alternate mode's internal states. This commit also makes sure that the mux is set to safe state before exiting the alternate mode and it is reconfigured according to the port's current data role on receiving ACK/NAK from the cable/port partner. BUG=b:151169925, b:159717794 BRANCH=none TEST=On reboot, able to exit and re-enter into DisplayPort mode, Thunderbolt mode with passive cable and thunderbolt mode with active cable. Change-Id: If1e48e9f31cd678e23fe89bd3494551b5d1a78f1 Signed-off-by: Ayushee <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2415082 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* TCPMv2: Add thunderbolt entry flow for active cableli feng2020-07-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* TCPMv2: Add common exit mode for all the alternate modesAyushee2020-07-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | When chipset is transitioning to a new state or on sysjump, the SOC re-negotiates to enter an alternate mode on booting up. This commit: 1. Adds a common DPM function to check for all the active alternate modes one at a time, construct the VDM and send the DPM request to exit the mode. 2. Marks thunderbolt mode as inactive in DFP's thunderbolt mode exit function. BUG=b:152235216 BRANCH=None TEST=Tested on volteer: 1. On connecting a DP dongle, able to enter into DP alternate mode on reboot 2. On connecting a Thunderbolt dock, able to enter into Thunderbolt mode on reboot Change-Id: I7da6a4b08cab9abb3446c0dafdc7c9e9378ef00e Signed-off-by: Ayushee <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2270877 Tested-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* TCPMv2: Add Entry flow for Thunderbolt modeAyushee2020-06-301-0/+65
Create a separate module for representing Thunderbolt mode which decides whether and how we can enter into Thunderbolt alternate mode. Modify the Device Policy Manger (usb_pd_dpm.c) to first check if the port partner and cable is a Thunderbolt Compatible. If not, continue the rest of the PD flow undisturbed. BUG=b:148528713 BRANCH=none TEST=1. Attach Thunderbolt dock, DUT should enter Thunderbolt mode 2. Attach Type-C dock, DUT should enter DP mode 3. Attach DP dongle, DUT should enter DP mode Change-Id: I369eb6337144676996c9d94a412eec060eacd273 Signed-off-by: Ayushee <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2250488 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>