summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2021-02-02 09:43:50 -0800
committerCommit Bot <commit-bot@chromium.org>2021-02-23 20:44:24 +0000
commit43d31aa5a47f9cb6ef226b347426f8a0639301aa (patch)
tree5153044f197b11741815d4e02e6267d02396c9d1
parent6f4fbfa40b93730b9bc0cb3713e87068cc072a3e (diff)
downloadchrome-ec-43d31aa5a47f9cb6ef226b347426f8a0639301aa.tar.gz
TCPMv2: Allow DFP ALT-DP mode without chipset task
This CL guards checks related to AP power state with a check for chipset task. This is required for boards which might still want to do ALT-DP mode, but do not have an AP, such as a type-c dock. BUG=b:175660576 BRANCH=None TEST=Verified on quiche that C1 port will enter alt-dp mode as DFP Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: Iefd2254c2e8376fa061184b9fed7c5d79f65ce01 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2677704 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2715848 Tested-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
-rw-r--r--common/usb_pd_alt_mode_dfp.c3
-rw-r--r--common/usbc/usb_pd_dpm.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/common/usb_pd_alt_mode_dfp.c b/common/usb_pd_alt_mode_dfp.c
index fe9e46f35b..ed4352a1ea 100644
--- a/common/usb_pd_alt_mode_dfp.c
+++ b/common/usb_pd_alt_mode_dfp.c
@@ -1041,9 +1041,10 @@ __overridable int svdm_enter_dp_mode(int port, uint32_t mode_caps)
* when the SoC is off as opposed to suspend where adding a display
* could cause a wake up.)
*/
+#ifdef HAS_TASK_CHIPSET
if (chipset_in_state(CHIPSET_STATE_ANY_OFF))
return -1;
-
+#endif
/* Only enter mode if device is DFP_D capable */
if (mode_caps & MODE_DP_SNK) {
svdm_safe_dp_mode(port);
diff --git a/common/usbc/usb_pd_dpm.c b/common/usbc/usb_pd_dpm.c
index 9c85011331..57a94806d8 100644
--- a/common/usbc/usb_pd_dpm.c
+++ b/common/usbc/usb_pd_dpm.c
@@ -192,6 +192,8 @@ static void dpm_attempt_mode_entry(int port)
*/
return;
}
+
+#ifdef HAS_TASK_CHIPSET
/*
* Do not try to enter mode while CPU is off.
* CPU transitions (e.g b/158634281) can occur during the discovery
@@ -201,6 +203,7 @@ static void dpm_attempt_mode_entry(int port)
*/
if (chipset_in_or_transitioning_to_state(CHIPSET_STATE_ANY_OFF))
return;
+#endif
/*
* If discovery has not occurred for modes, do not attempt to switch
* to alt mode.