summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2016-05-19 08:49:34 +0800
committerchrome-bot <chrome-bot@chromium.org>2016-06-07 08:21:34 -0700
commitd766e4cf4ea81d9b1269c8007e9be39758426447 (patch)
treeeb088dc5c3fa3c945553bd7ddb0fb00b329fedf4 /include
parent091eea69da7a743035cb6c30d0883f6057007066 (diff)
downloadchrome-ec-d766e4cf4ea81d9b1269c8007e9be39758426447.tar.gz
ec_commands: Add new EC_CMD_PD_CONTROL command
This commands makes it possible to control the PD chip (or the interaction between EC and PD), from the AP. - PD_SUSPEND: Suspends the PD chip: EC needs to stop talking to PD chip. Useful at beginning of PD FW update. - PD_RESUME: Resumes the PD chip: EC can start talking to PD chip again. Useful at end of PD FW update. - PD_RESET: Resets the PD chip (called at the end of the update). - PD_CONTROL_DISABLE: Prevents further calls to this command (for security reason, we do not want the AP to be able to call the other subcommands after the update has been performed). BRANCH=none BUG=chrome-os-partner:52433 TEST=ectool pdcontrol {suspend,resume,reset,disable} Change-Id: I7a955dd27b65086c21d195a6504aa7392eb0406d Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/342584 Reviewed-by: Randall Spangler <rspangler@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/config.h1
-rw-r--r--include/ec_commands.h15
2 files changed, 16 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index c7862fdae5..d149d2eb2e 100644
--- a/include/config.h
+++ b/include/config.h
@@ -556,6 +556,7 @@
#undef CONFIG_CMD_MCDP
#define CONFIG_CMD_MD
#define CONFIG_CMD_PD
+#undef CONFIG_CMD_PD_CONTROL
#undef CONFIG_CMD_PD_DEV_DUMP_INFO
#undef CONFIG_CMD_PD_FLASH
#undef CONFIG_CMD_PLL
diff --git a/include/ec_commands.h b/include/ec_commands.h
index d58c560d62..f14e6a0fa8 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -3647,6 +3647,21 @@ struct ec_params_pd_write_log_entry {
#endif /* !__ACPI__ */
+/* Control USB-PD chip */
+#define EC_CMD_PD_CONTROL 0x119
+
+enum ec_pd_control_cmd {
+ PD_SUSPEND = 0, /* Suspend the PD chip (EC: stop talking to PD) */
+ PD_RESUME, /* Resume the PD chip (EC: start talking to PD) */
+ PD_RESET, /* Force reset the PD chip */
+ PD_CONTROL_DISABLE /* Disable further calls to this command */
+};
+
+struct ec_params_pd_control {
+ uint8_t chip; /* chip id (should be 0) */
+ uint8_t subcmd;
+} __packed;
+
/*****************************************************************************/
/*
* Blob commands are just opaque chunks of data, sent with proto v3.