diff options
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r-- | include/ec_commands.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 7233d43bd3..1756a11247 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -2500,6 +2500,32 @@ struct ec_response_pd_status { int8_t status; /* currently empty */ } __packed; +/* Set USB type-C port role and muxes */ +#define EC_CMD_USB_PD_CONTROL 0x101 + +enum usb_pd_control_role { + USB_PD_CTRL_ROLE_NO_CHANGE = 0, + USB_PD_CTRL_ROLE_TOGGLE_ON = 1, /* == AUTO */ + USB_PD_CTRL_ROLE_TOGGLE_OFF = 2, + USB_PD_CTRL_ROLE_FORCE_SINK = 3, + USB_PD_CTRL_ROLE_FORCE_SOURCE = 4, +}; + +enum usb_pd_control_mux { + USB_PD_CTRL_MUX_NO_CHANGE = 0, + USB_PD_CTRL_MUX_NONE = 1, + USB_PD_CTRL_MUX_USB = 2, + USB_PD_CTRL_MUX_DP = 3, + USB_PD_CTRL_MUX_DOCK = 4, + USB_PD_CTRL_MUX_AUTO = 5, +}; + +struct ec_params_usb_pd_control { + uint8_t port; + uint8_t role; + uint8_t mux; +} __packed; + /*****************************************************************************/ /* * Passthru commands |