diff options
author | Ayushee <ayushee.shah@intel.com> | 2020-10-08 16:28:35 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-14 20:33:10 +0000 |
commit | 913b68e8e43d5700e3432148b33428e1e1ce0d79 (patch) | |
tree | 425c5caf498b167ac1b8c0cf9cf57c21c18d4633 /baseboard | |
parent | c7c8840bae1d3e833655a2b09b6deb5a47db680b (diff) | |
download | chrome-ec-913b68e8e43d5700e3432148b33428e1e1ce0d79.tar.gz |
TBT:Add support for exit mode SOP'/SOP'' on chipset transition
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>
Diffstat (limited to 'baseboard')
-rw-r--r-- | baseboard/kukui/usb_pd_policy.c | 1 | ||||
-rw-r--r-- | baseboard/trogdor/usb_pd_policy.c | 3 | ||||
-rw-r--r-- | baseboard/zork/usb_pd_policy.c | 7 |
3 files changed, 6 insertions, 5 deletions
diff --git a/baseboard/kukui/usb_pd_policy.c b/baseboard/kukui/usb_pd_policy.c index b2ff65b849..02e16ae624 100644 --- a/baseboard/kukui/usb_pd_policy.c +++ b/baseboard/kukui/usb_pd_policy.c @@ -261,7 +261,6 @@ __override int svdm_dp_attention(int port, uint32_t *payload) __override void svdm_exit_dp_mode(int port) { - svdm_safe_dp_mode(port); gpio_set_level(GPIO_USB_C0_HPD_OD, 0); #ifdef VARIANT_KUKUI_DP_MUX_GPIO board_set_dp_mux_control(0, 0); diff --git a/baseboard/trogdor/usb_pd_policy.c b/baseboard/trogdor/usb_pd_policy.c index f66ea1f276..b3f4b9877e 100644 --- a/baseboard/trogdor/usb_pd_policy.c +++ b/baseboard/trogdor/usb_pd_policy.c @@ -253,9 +253,6 @@ __override void svdm_exit_dp_mode(int port) /* Disconnect the DP port selection mux. */ gpio_set_level(GPIO_DP_MUX_OE_L, 1); - /* Below svdm_safe_dp_mode() will disconnect SBU and DP/USB SS lines. */ - svdm_safe_dp_mode(port); - /* Signal AP for the HPD low event */ usb_mux_hpd_update(port, 0, 0); gpio_set_level(GPIO_DP_HOT_PLUG_DET, 0); diff --git a/baseboard/zork/usb_pd_policy.c b/baseboard/zork/usb_pd_policy.c index 513772213e..ad106c8b6b 100644 --- a/baseboard/zork/usb_pd_policy.c +++ b/baseboard/zork/usb_pd_policy.c @@ -148,13 +148,18 @@ __override void svdm_dp_post_config(int port) usb_mux_hpd_update(port, 1, 0); } -__override void svdm_exit_dp_mode(int port) +__override void svdm_safe_dp_mode(int port) { + /* make DP interface safe until configure */ dp_flags[port] = 0; dp_status[port] = 0; usb_mux_set(port, USB_PD_MUX_NONE, USB_SWITCH_CONNECT, pd_get_polarity(port)); +} + +__override void svdm_exit_dp_mode(int port) +{ gpio_or_ioex_set_level(PORT_TO_HPD(port), 0); usb_mux_hpd_update(port, 0, 0); |