summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
authorAbe Levkoy <alevkoy@chromium.org>2020-10-15 10:52:50 -0600
committerCommit Bot <commit-bot@chromium.org>2020-10-22 19:38:09 +0000
commite1728abb335acf11e2c9512ae88181a770935850 (patch)
tree75e3d109394193178e2552bf41f0492d44f5db01 /include/ec_commands.h
parent67645100a8dd165840c65f4bb73343ec1e53300f (diff)
downloadchrome-ec-e1728abb335acf11e2c9512ae88181a770935850.tar.gz
TCPMv2: Add typeccontrol enter-mode subcommand
Define and implement TYPEC_CONTROL_COMMAND_ENTER_MODE. Allow DPM state to be accessed asynchronously by host commands. Add support for this command to ectool. BUG=b:168030639 TEST=Attach DP dongle; discovers but does not enter TEST=ectool typeccontrol 1 2 0; enters DP TEST=Attach TBT dock and TBT active cable; discovers but does not enter TEST=ectool typeccontrol 1 2 1; enters TBT BRANCH=none Change-Id: I218c4b9a92004ef1efe9a27b2a920031961b33f3 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2454538 Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r--include/ec_commands.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 226571b005..c378847904 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -6371,6 +6371,14 @@ struct ec_response_typec_discovery {
enum typec_control_command {
TYPEC_CONTROL_COMMAND_EXIT_MODES,
TYPEC_CONTROL_COMMAND_CLEAR_EVENTS,
+ TYPEC_CONTROL_COMMAND_ENTER_MODE,
+};
+
+/* Modes (USB or alternate) that a type-C port may enter. */
+enum typec_mode {
+ TYPEC_MODE_DP,
+ TYPEC_MODE_TBT,
+ TYPEC_MODE_USB4,
};
struct ec_params_typec_control {
@@ -6385,6 +6393,7 @@ struct ec_params_typec_control {
*/
union {
uint32_t clear_events_mask;
+ uint8_t mode_to_enter; /* enum typec_mode */
uint8_t placeholder[128];
};
} __ec_align1;