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 /board | |
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 'board')
-rw-r--r-- | board/asurada/usb_pd_policy.c | 4 | ||||
-rw-r--r-- | board/elm/usb_pd_policy.c | 1 | ||||
-rw-r--r-- | board/flapjack/usb_pd_policy.c | 1 | ||||
-rw-r--r-- | board/oak/usb_pd_policy.c | 1 | ||||
-rw-r--r-- | board/pdeval-stm32f072/usb_pd_policy.c | 1 | ||||
-rw-r--r-- | board/samus_pd/usb_pd_policy.c | 1 |
6 files changed, 0 insertions, 9 deletions
diff --git a/board/asurada/usb_pd_policy.c b/board/asurada/usb_pd_policy.c index 8cc8b0a922..c20d4f4746 100644 --- a/board/asurada/usb_pd_policy.c +++ b/board/asurada/usb_pd_policy.c @@ -146,7 +146,6 @@ __override int svdm_dp_attention(int port, uint32_t *payload) __override void svdm_exit_dp_mode(int port) { - svdm_safe_dp_mode(port); #ifdef CONFIG_USB_PD_DP_HPD_GPIO svdm_set_hpd_gpio(port, 0); #endif /* CONFIG_USB_PD_DP_HPD_GPIO */ @@ -158,9 +157,6 @@ __override void svdm_exit_dp_mode(int port) if (port == USB_PD_PORT_TCPC_MST) baseboard_mst_enable_control(port, 0); #endif -#ifdef CONFIG_USB_PD_TCPMV2 - dp_teardown(port); -#endif } int pd_snk_is_vbus_provided(int port) diff --git a/board/elm/usb_pd_policy.c b/board/elm/usb_pd_policy.c index 5cfc60650e..2eeab736d9 100644 --- a/board/elm/usb_pd_policy.c +++ b/board/elm/usb_pd_policy.c @@ -87,7 +87,6 @@ __override int svdm_dp_attention(int port, uint32_t *payload) __override void svdm_exit_dp_mode(int port) { - svdm_safe_dp_mode(port); anx7688_hpd_disable(port); } #endif /* CONFIG_USB_PD_ALT_MODE_DFP */ diff --git a/board/flapjack/usb_pd_policy.c b/board/flapjack/usb_pd_policy.c index 20de95dc3b..3603b6c931 100644 --- a/board/flapjack/usb_pd_policy.c +++ b/board/flapjack/usb_pd_policy.c @@ -145,7 +145,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); gpio_set_level(GPIO_USB_C0_DP_OE_L, 1); usb_mux_hpd_update(port, 0, 0); diff --git a/board/oak/usb_pd_policy.c b/board/oak/usb_pd_policy.c index bf2fca3f49..a4e62ebe88 100644 --- a/board/oak/usb_pd_policy.c +++ b/board/oak/usb_pd_policy.c @@ -101,7 +101,6 @@ __override int svdm_dp_attention(int port, uint32_t *payload) __override void svdm_exit_dp_mode(int port) { - svdm_safe_dp_mode(port); board_typec_dp_off(port, dp_flags); } #endif /* CONFIG_USB_PD_ALT_MODE_DFP */ diff --git a/board/pdeval-stm32f072/usb_pd_policy.c b/board/pdeval-stm32f072/usb_pd_policy.c index 78026c9e7b..f5bbf8d619 100644 --- a/board/pdeval-stm32f072/usb_pd_policy.c +++ b/board/pdeval-stm32f072/usb_pd_policy.c @@ -274,7 +274,6 @@ __override int svdm_dp_attention(int port, uint32_t *payload) __override void svdm_exit_dp_mode(int port) { - svdm_safe_dp_mode(port); #ifdef CONFIG_USB_PD_TCPM_ANX7447 anx7447_tcpc_clear_hpd_status(port); #endif diff --git a/board/samus_pd/usb_pd_policy.c b/board/samus_pd/usb_pd_policy.c index 9eed4f77b5..cdf234a743 100644 --- a/board/samus_pd/usb_pd_policy.c +++ b/board/samus_pd/usb_pd_policy.c @@ -147,6 +147,5 @@ __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(PORT_TO_HPD(port), 0); } |