Skip to content

Commit 401d07d

Browse files
Pavan Hollagregkh
authored andcommitted
platform/chrome: Update ChromeOS EC header for UCSI
Add EC host commands for reading and writing UCSI structures in the EC. The corresponding kernel driver is cros-ec-ucsi. Also update PD events supported by the EC. Acked-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Pavan Holla <[email protected]> Signed-off-by: Łukasz Bartosik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 533561a commit 401d07d

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

include/linux/platform_data/cros_ec_commands.h

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5044,8 +5044,11 @@ struct ec_response_pd_status {
50445044
#define PD_EVENT_POWER_CHANGE BIT(1)
50455045
#define PD_EVENT_IDENTITY_RECEIVED BIT(2)
50465046
#define PD_EVENT_DATA_SWAP BIT(3)
5047+
#define PD_EVENT_TYPEC BIT(4)
5048+
#define PD_EVENT_PPM BIT(5)
5049+
50475050
struct ec_response_host_event_status {
5048-
uint32_t status; /* PD MCU host event status */
5051+
uint32_t status; /* PD MCU host event status */
50495052
} __ec_align4;
50505053

50515054
/* Set USB type-C port role and muxes */
@@ -6105,6 +6108,29 @@ struct ec_response_typec_vdm_response {
61056108

61066109
#undef VDO_MAX_SIZE
61076110

6111+
/*
6112+
* UCSI OPM-PPM commands
6113+
*
6114+
* These commands are used for communication between OPM and PPM.
6115+
* Only UCSI3.0 is tested.
6116+
*/
6117+
6118+
#define EC_CMD_UCSI_PPM_SET 0x0140
6119+
6120+
/* The data size is stored in the host command protocol header. */
6121+
struct ec_params_ucsi_ppm_set {
6122+
uint16_t offset;
6123+
uint8_t data[];
6124+
} __ec_align2;
6125+
6126+
#define EC_CMD_UCSI_PPM_GET 0x0141
6127+
6128+
/* For 'GET' sub-commands, data will be returned as a raw payload. */
6129+
struct ec_params_ucsi_ppm_get {
6130+
uint16_t offset;
6131+
uint8_t size;
6132+
} __ec_align2;
6133+
61086134
/*****************************************************************************/
61096135
/* The command range 0x200-0x2FF is reserved for Rotor. */
61106136

0 commit comments

Comments
 (0)