summaryrefslogtreecommitdiff
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-02-20 21:32:37 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2021-02-20 21:32:37 -0800
commit780607b9731feef575514108fc7956c54180f16e (patch)
tree873d8203bd441f6494bbd3f57a9f6371b2ea1973 /include/linux/platform_data
parente4286926abbbaab9b047c8bc25cae78ec990928f (diff)
parentb5a12546e779d4f5586f58e60e0ef5070a833a64 (diff)
Merge tag 'usb-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB and Thunderbolt updates from Greg KH: "Here is the big set of USB and Thunderbolt driver changes for 5.12-rc1. It's been an active set of development in these subsystems for the past few months: - loads of typec features added for new hardware - xhci features and bugfixes - dwc3 features added for more hardware support - dwc2 fixes and new hardware support - cdns3 driver updates for more hardware support - gadget driver cleanups and minor fixes - usb-serial fixes, new driver, and more devices supported - thunderbolt feature additions for new hardware - lots of other tiny fixups and additions The chrome driver changes are in here as well, as they depended on some of the typec changes, and the maintainer acked them. All of these have been in linux-next for a while with no reported issues" * tag 'usb-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (300 commits) dt-bindings: usb: mediatek: musb: add mt8516 compatbile dt-bindings: usb: mtk-xhci: add compatible for mt2701 and mt7623 dt-bindings: usb: mtk-xhci: add optional assigned clock properties Documentation: connector: Update the description of sink-vdos usb: misc: usb3503: Fix logic in usb3503_init() dt-bindings: usb: usb-device: fix typo in required properties usb: Replace lkml.org links with lore dt-bindings: usb: dwc3: add description for rk3328 dt-bindings: usb: convert rockchip,dwc3.txt to yaml usb: quirks: add quirk to start video capture on ELMO L-12F document camera reliable USB: quirks: sort quirk entries USB: serial: drop bogus to_usb_serial_port() checks USB: serial: make remove callback return void USB: serial: drop if with an always false condition usb: gadget: Assign boolean values to a bool variable usb: typec: tcpm: Get Sink VDO from fwnode dt-bindings: connector: Add SVDM VDO properties usb: typec: displayport: Fill the negotiated SVDM Version in the header usb: typec: ucsi: Determine common SVDM Version usb: typec: tcpm: Determine common SVDM Version ...
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/cros_ec_commands.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h
index 86376779ab31..50e1caad81be 100644
--- a/include/linux/platform_data/cros_ec_commands.h
+++ b/include/linux/platform_data/cros_ec_commands.h
@@ -1286,6 +1286,16 @@ enum ec_feature_code {
EC_FEATURE_ISH = 40,
/* New TCPMv2 TYPEC_ prefaced commands supported */
EC_FEATURE_TYPEC_CMD = 41,
+ /*
+ * The EC will wait for direction from the AP to enter Type-C alternate
+ * modes or USB4.
+ */
+ EC_FEATURE_TYPEC_REQUIRE_AP_MODE_ENTRY = 42,
+ /*
+ * The EC will wait for an acknowledge from the AP after setting the
+ * mux.
+ */
+ EC_FEATURE_TYPEC_MUX_REQUIRE_AP_ACK = 43,
};
#define EC_FEATURE_MASK_0(event_code) BIT(event_code % 32)
@@ -5567,6 +5577,32 @@ struct ec_response_typec_discovery {
struct svid_mode_info svids[0];
} __ec_align1;
+/* USB Type-C commands for AP-controlled device policy. */
+#define EC_CMD_TYPEC_CONTROL 0x0132
+
+enum typec_control_command {
+ TYPEC_CONTROL_COMMAND_EXIT_MODES,
+ TYPEC_CONTROL_COMMAND_CLEAR_EVENTS,
+ TYPEC_CONTROL_COMMAND_ENTER_MODE,
+};
+
+struct ec_params_typec_control {
+ uint8_t port;
+ uint8_t command; /* enum typec_control_command */
+ uint16_t reserved;
+
+ /*
+ * This section will be interpreted based on |command|. Define a
+ * placeholder structure to avoid having to increase the size and bump
+ * the command version when adding new sub-commands.
+ */
+ union {
+ uint32_t clear_events_mask;
+ uint8_t mode_to_enter; /* enum typec_mode */
+ uint8_t placeholder[128];
+ };
+} __ec_align1;
+
/*
* Gather all status information for a port.
*
@@ -6054,6 +6090,13 @@ struct ec_params_charger_control {
uint8_t allow_charging;
} __ec_align_size1;
+/* Get ACK from the USB-C SS muxes */
+#define EC_CMD_USB_PD_MUX_ACK 0x0603
+
+struct ec_params_usb_pd_mux_ack {
+ uint8_t port; /* USB-C port number */
+} __ec_align1;
+
/*****************************************************************************/
/*
* Reserve a range of host commands for board-specific, experimental, or