summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2022-10-12 15:13:23 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-10-17 21:59:46 +0000
commit8718d77fb1a5382455df3bbd501ae8b7f99eddef (patch)
tree1b9066e80a78cfe505fa4a09b85ef4757a8f5f82
parent7cd3f25b6b80b8476aae5fa2b5c1b848216da6ad (diff)
downloadchrome-ec-8718d77fb1a5382455df3bbd501ae8b7f99eddef.tar.gz
Config: Introduce CONFIG to allow AP driven VDMs
This CONFIG will be used to gate behavior for the tidal flow feature where we allow the AP to drive our VDMs. For now, the CONFIG does nothing. BRANCH=None BUG=b:208884535 TEST=CQ+1 Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I11b4b34ebc9e77129569e4ade0de9243ded3dfeb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3953478 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
-rw-r--r--include/config.h3
-rw-r--r--zephyr/Kconfig.pd10
-rw-r--r--zephyr/shim/include/config_chip.h5
3 files changed, 18 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index 15e6231b3d..1e34f75a60 100644
--- a/include/config.h
+++ b/include/config.h
@@ -4490,6 +4490,9 @@
*/
#undef CONFIG_USB_PD_REQUIRE_AP_MODE_ENTRY
+/* Allow the AP to compose VDMs for us to send */
+#undef CONFIG_USB_PD_VDM_AP_CONTROL
+
/* Supports DP as UFP-D and requires HPD to DP_ATTEN converter */
#undef CONFIG_USB_PD_ALT_MODE_UFP_DP
diff --git a/zephyr/Kconfig.pd b/zephyr/Kconfig.pd
index 1b8832e031..881e181424 100644
--- a/zephyr/Kconfig.pd
+++ b/zephyr/Kconfig.pd
@@ -185,6 +185,16 @@ config PLATFORM_EC_USB_PD_REQUIRE_AP_MODE_ENTRY
the AP to direct the EC to enter a mode. This requires AP software
support.
+config PLATFORM_EC_USB_PD_VDM_AP_CONTROL
+ bool "USB Power Delivery VDMs may be sent by the AP"
+ depends on PLATFORM_EC_USB_MUX_AP_CONTROL
+ select PLATFORM_EC_USB_PD_REQUIRE_AP_MODE_ENTRY
+ help
+ Allow the AP an interface to send any VDM REQ message it would like
+ to. This allows the AP to fully drive the alternate mode entry
+ process, and requires that the AP also be able to control the USB
+ muxes in order to sequence that mode entry.
+
config PLATFORM_EC_USB_PD_ALT_MODE_DFP
bool "Downward Facing Port support"
default y
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index c2dc2ebf93..4c11b0b57c 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -2632,6 +2632,11 @@ extern char mock_jump_data[sizeof(struct jump_data) + 256];
#define CONFIG_USB_PD_REQUIRE_AP_MODE_ENTRY
#endif
+#undef CONFIG_USB_PD_VDM_AP_CONTROL
+#ifdef CONFIG_PLATFORM_EC_USB_PD_VDM_AP_CONTROL
+#define CONFIG_USB_PD_VDM_AP_CONTROL
+#endif
+
#undef CONFIG_USB_PD_CLEAR_HARD_RESET_STATUS
#ifdef CONFIG_PLATFORM_EC_USB_PD_CLEAR_HARD_RESET_STATUS
#define CONFIG_USB_PD_CLEAR_HARD_RESET_STATUS