Skip to content

Commit 5e48a03

Browse files
Prashant MalaniEnric Balletbo i Serra
authored andcommitted
platform/chrome: cros_ec: Add TBT pd_ctrl fields
To support Thunderbolt compatibility mode, synchronize ec_response_usb_pd_control_v2 with the Chrome EC version, so that we get the Thunderbolt related control fields and macros. Signed-off-by: Prashant Malani <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]>
1 parent 447b4eb commit 5e48a03

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

include/linux/platform_data/cros_ec_commands.h

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4917,15 +4917,26 @@ struct ec_response_usb_pd_control_v1 {
49174917
#define USBC_PD_CC_UFP_ATTACHED 4 /* UFP attached to usbc */
49184918
#define USBC_PD_CC_DFP_ATTACHED 5 /* DPF attached to usbc */
49194919

4920+
/* Active/Passive Cable */
4921+
#define USB_PD_CTRL_ACTIVE_CABLE BIT(0)
4922+
/* Optical/Non-optical cable */
4923+
#define USB_PD_CTRL_OPTICAL_CABLE BIT(1)
4924+
/* 3rd Gen TBT device (or AMA)/2nd gen tbt Adapter */
4925+
#define USB_PD_CTRL_TBT_LEGACY_ADAPTER BIT(2)
4926+
/* Active Link Uni-Direction */
4927+
#define USB_PD_CTRL_ACTIVE_LINK_UNIDIR BIT(3)
4928+
49204929
struct ec_response_usb_pd_control_v2 {
49214930
uint8_t enabled;
49224931
uint8_t role;
49234932
uint8_t polarity;
49244933
char state[32];
4925-
uint8_t cc_state; /* USBC_PD_CC_*Encoded cc state */
4926-
uint8_t dp_mode; /* Current DP pin mode (MODE_DP_PIN_[A-E]) */
4927-
/* CL:1500994 Current cable type */
4928-
uint8_t reserved_cable_type;
4934+
uint8_t cc_state; /* enum pd_cc_states representing cc state */
4935+
uint8_t dp_mode; /* Current DP pin mode (MODE_DP_PIN_[A-E]) */
4936+
uint8_t reserved; /* Reserved for future use */
4937+
uint8_t control_flags; /* USB_PD_CTRL_*flags */
4938+
uint8_t cable_speed; /* TBT_SS_* cable speed */
4939+
uint8_t cable_gen; /* TBT_GEN3_* cable rounded support */
49294940
} __ec_align1;
49304941

49314942
#define EC_CMD_USB_PD_PORTS 0x0102

0 commit comments

Comments
 (0)