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-20 05:41:30 +0000
commit2dda283151963da2ee760c61246e132086300dc7 (patch)
tree209e1331feefc28ff379d11f96df0f76fcc8538e
parent7e6cc8586a12edab18234b272c2dcce3da430ab1 (diff)
downloadchrome-ec-2dda283151963da2ee760c61246e132086300dc7.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>
-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 3c9a641490..27f075f427 100644
--- a/common/usb_pd_alt_mode_dfp.c
+++ b/common/usb_pd_alt_mode_dfp.c
@@ -1044,9 +1044,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.