summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
authorAyushee <ayushee.shah@intel.com>2019-03-04 12:27:43 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-07 20:22:29 -0800
commitf1b9abca8b287e18cfe63006b9b5d75c31501286 (patch)
tree5cb596bdda62544e4022af5048deff8786d35ef9 /include/ec_commands.h
parent19ffcaeb4176e26acf1a1c3f471ca3da9343a1ac (diff)
downloadchrome-ec-f1b9abca8b287e18cfe63006b9b5d75c31501286.tar.gz
usb_pd: Get current CC state
CC state has the information of type of device attached and it is needed to configure the Intel virtual muxes hence returning the current CC state in USB_PD_CONTROL host command. BUG=None BRANCH=None TEST=Verified on Dragonegg, able to get correct CC state Change-Id: I917321b599a17381e2ffbe5e813e676df03abd47 Signed-off-by: Ayushee <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/1468049 Commit-Ready: Ayushee Shah <ayushee.shah@intel.com> Tested-by: Ayushee Shah <ayushee.shah@intel.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r--include/ec_commands.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index fb33d7179e..93dd9b8736 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -4756,6 +4756,22 @@ struct ec_response_usb_pd_control_v1 {
char state[32];
} __ec_align1;
+/* Values representing usbc PD CC state */
+#define USBC_PD_CC_NONE 0 /* No accessory connected */
+#define USBC_PD_CC_NO_UFP 1 /* No UFP accessory connected */
+#define USBC_PD_CC_AUDIO_ACC 2 /* Audio accessory connected */
+#define USBC_PD_CC_DEBUG_ACC 3 /* Debug accessory connected */
+#define USBC_PD_CC_UFP_ATTACHED 4 /* UFP attached to usbc */
+#define USBC_PD_CC_DFP_ATTACHED 5 /* DPF attached to usbc */
+
+struct ec_response_usb_pd_control_v2 {
+ uint8_t enabled;
+ uint8_t role;
+ uint8_t polarity;
+ char state[32];
+ uint8_t cc_state; /* USBC_PD_CC_*Encoded cc state */
+} __ec_align1;
+
#define EC_CMD_USB_PD_PORTS 0x0102
/* Maximum number of PD ports on a device, num_ports will be <= this */