Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <tzungbi@kernel.org>
Signed-off-by: Pavan Holla <pholla@chromium.org>
Signed-off-by: Łukasz Bartosik <ukaszb@chromium.org>
Link: https://lore.kernel.org/r/20241231131047.1757434-2-ukaszb@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Pavan Holla and committed by
Greg Kroah-Hartman
401d07d5 533561a8

+27 -1
+27 -1
include/linux/platform_data/cros_ec_commands.h
··· 5044 5044 #define PD_EVENT_POWER_CHANGE BIT(1) 5045 5045 #define PD_EVENT_IDENTITY_RECEIVED BIT(2) 5046 5046 #define PD_EVENT_DATA_SWAP BIT(3) 5047 + #define PD_EVENT_TYPEC BIT(4) 5048 + #define PD_EVENT_PPM BIT(5) 5049 + 5047 5050 struct ec_response_host_event_status { 5048 - uint32_t status; /* PD MCU host event status */ 5051 + uint32_t status; /* PD MCU host event status */ 5049 5052 } __ec_align4; 5050 5053 5051 5054 /* Set USB type-C port role and muxes */ ··· 6107 6104 } __ec_align1; 6108 6105 6109 6106 #undef VDO_MAX_SIZE 6107 + 6108 + /* 6109 + * UCSI OPM-PPM commands 6110 + * 6111 + * These commands are used for communication between OPM and PPM. 6112 + * Only UCSI3.0 is tested. 6113 + */ 6114 + 6115 + #define EC_CMD_UCSI_PPM_SET 0x0140 6116 + 6117 + /* The data size is stored in the host command protocol header. */ 6118 + struct ec_params_ucsi_ppm_set { 6119 + uint16_t offset; 6120 + uint8_t data[]; 6121 + } __ec_align2; 6122 + 6123 + #define EC_CMD_UCSI_PPM_GET 0x0141 6124 + 6125 + /* For 'GET' sub-commands, data will be returned as a raw payload. */ 6126 + struct ec_params_ucsi_ppm_get { 6127 + uint16_t offset; 6128 + uint8_t size; 6129 + } __ec_align2; 6110 6130 6111 6131 /*****************************************************************************/ 6112 6132 /* The command range 0x200-0x2FF is reserved for Rotor. */