diff options
Diffstat (limited to 'include/usb_pd.h')
-rw-r--r-- | include/usb_pd.h | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h index 5b389e1bb4..8ec4e9eaf3 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -590,6 +590,18 @@ struct partner_active_modes { #define PD_PRODUCT_PID(vdo) (((vdo) >> 16) & 0xffff) /* + * PD Rev 3.1 Revision Message Data Object (RMDO) + * Only bits 16-31 have data. A uint_16t is used to hold RMDOs upper 16 bits. + */ +struct rmdo { + int reserved : 16; + int minor_ver : 4; + int major_ver : 4; + int minor_rev : 4; + int major_rev : 4; +}; + +/* * Message id starts from 0 to 7. If last_msg_id is initialized to 0, * it will lead to repetitive message id with first received packet, * so initialize it with an invalid value 0xff. @@ -1017,6 +1029,7 @@ enum pd_dpm_request { DPM_REQUEST_FRS_DET_ENABLE = BIT(21), DPM_REQUEST_FRS_DET_DISABLE = BIT(22), DPM_REQUEST_DATA_RESET = BIT(23), + DPM_REQUEST_GET_REVISION = BIT(24), }; /** @@ -1152,7 +1165,11 @@ enum pd_ctrl_msg_type { PD_CTRL_FR_SWAP = 19, PD_CTRL_GET_PPS_STATUS = 20, PD_CTRL_GET_COUNTRY_CODES = 21, - /* 22-31 Reserved */ + PD_CTRL_GET_SINK_CAP_EXT = 22, + /* Used for REV 3.1 */ + PD_CTRL_GET_SOURCE_INFO = 23, + PD_CTRL_GET_REVISION = 24, + /* 25-31 Reserved */ }; /* Control message types which always mark the start of an AMS */ @@ -1225,7 +1242,14 @@ enum pd_ext_msg_type { PD_EXT_PPS_STATUS = 12, PD_EXT_COUNTRY_INFO = 13, PD_EXT_COUNTRY_CODES = 14, - /* 15-31 Reserved */ + /* Used for REV 3.1 */ + PD_EXT_SINK_CAP = 15, + PD_EXT_CONTROL = 16, + PD_EXT_EPR_SOURCE_CAP = 17, + PD_EXT_EPR_SINK_CAP = 18, + /* 19-29 Reserved */ + PD_EXT_VENDOR_DEF = 30, + /* 31 Reserved */ }; /* Alert Data Object fields for REV 3.0 */ @@ -1245,13 +1269,19 @@ enum pd_data_msg_type { PD_DATA_REQUEST = 2, PD_DATA_BIST = 3, PD_DATA_SINK_CAP = 4, - /* 5-14 Reserved for REV 2.0 */ + /* Used for REV 3.0 */ PD_DATA_BATTERY_STATUS = 5, PD_DATA_ALERT = 6, PD_DATA_GET_COUNTRY_INFO = 7, - /* 8-14 Reserved for REV 3.0 */ PD_DATA_ENTER_USB = 8, + /* Used for REV 3.1 */ + PD_DATA_EPR_REQUEST = 9, + PD_DATA_EPR_MODE = 10, + PD_DATA_SOURCE_INFO = 11, + PD_DATA_REVISION = 12, + /* 13-14 Reserved */ PD_DATA_VENDOR_DEF = 15, + /* 16-31 Reserved */ }; |