hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/include/uapi/linux/usb/ch9.h
....@@ -138,11 +138,11 @@
138138 * Test Mode Selectors
139139 * See USB 2.0 spec Table 9-7
140140 */
141
-#define TEST_J 1
142
-#define TEST_K 2
143
-#define TEST_SE0_NAK 3
144
-#define TEST_PACKET 4
145
-#define TEST_FORCE_EN 5
141
+#define USB_TEST_J 1
142
+#define USB_TEST_K 2
143
+#define USB_TEST_SE0_NAK 3
144
+#define USB_TEST_PACKET 4
145
+#define USB_TEST_FORCE_ENABLE 5
146146
147147 /* Status Type */
148148 #define USB_STATUS_TYPE_STANDARD 0
....@@ -326,6 +326,10 @@
326326 #define USB_CLASS_CONTENT_SEC 0x0d /* content security */
327327 #define USB_CLASS_VIDEO 0x0e
328328 #define USB_CLASS_WIRELESS_CONTROLLER 0xe0
329
+#define USB_CLASS_PERSONAL_HEALTHCARE 0x0f
330
+#define USB_CLASS_AUDIO_VIDEO 0x10
331
+#define USB_CLASS_BILLBOARD 0x11
332
+#define USB_CLASS_USB_TYPE_C_BRIDGE 0x12
329333 #define USB_CLASS_MISC 0xef
330334 #define USB_CLASS_APP_SPEC 0xfe
331335 #define USB_CLASS_VENDOR_SPEC 0xff
....@@ -897,6 +901,8 @@
897901 #define USB_BESL_SUPPORT (1 << 2) /* supports BESL */
898902 #define USB_BESL_BASELINE_VALID (1 << 3) /* Baseline BESL valid*/
899903 #define USB_BESL_DEEP_VALID (1 << 4) /* Deep BESL valid */
904
+#define USB_SET_BESL_BASELINE(p) (((p) & 0xf) << 8)
905
+#define USB_SET_BESL_DEEP(p) (((p) & 0xf) << 12)
900906 #define USB_GET_BESL_BASELINE(p) (((p) & (0xf << 8)) >> 8)
901907 #define USB_GET_BESL_DEEP(p) (((p) & (0xf << 12)) >> 12)
902908 } __attribute__((packed));
....@@ -962,9 +968,22 @@
962968 __le32 bmSublinkSpeedAttr[1]; /* list of sublink speed attrib entries */
963969 #define USB_SSP_SUBLINK_SPEED_SSID (0xf) /* sublink speed ID */
964970 #define USB_SSP_SUBLINK_SPEED_LSE (0x3 << 4) /* Lanespeed exponent */
971
+#define USB_SSP_SUBLINK_SPEED_LSE_BPS 0
972
+#define USB_SSP_SUBLINK_SPEED_LSE_KBPS 1
973
+#define USB_SSP_SUBLINK_SPEED_LSE_MBPS 2
974
+#define USB_SSP_SUBLINK_SPEED_LSE_GBPS 3
975
+
965976 #define USB_SSP_SUBLINK_SPEED_ST (0x3 << 6) /* Sublink type */
977
+#define USB_SSP_SUBLINK_SPEED_ST_SYM_RX 0
978
+#define USB_SSP_SUBLINK_SPEED_ST_ASYM_RX 1
979
+#define USB_SSP_SUBLINK_SPEED_ST_SYM_TX 2
980
+#define USB_SSP_SUBLINK_SPEED_ST_ASYM_TX 3
981
+
966982 #define USB_SSP_SUBLINK_SPEED_RSVD (0x3f << 8) /* Reserved */
967983 #define USB_SSP_SUBLINK_SPEED_LP (0x3 << 14) /* Link protocol */
984
+#define USB_SSP_SUBLINK_SPEED_LP_SS 0
985
+#define USB_SSP_SUBLINK_SPEED_LP_SSP 1
986
+
968987 #define USB_SSP_SUBLINK_SPEED_LSM (0xff << 16) /* Lanespeed mantissa */
969988 } __attribute__((packed));
970989
....@@ -1083,26 +1102,6 @@
10831102 * (SSAC) specified in bmAttributes[4:0]. SSAC is zero-based
10841103 */
10851104 #define USB_DT_USB_SSP_CAP_SIZE(ssac) (12 + (ssac + 1) * 4)
1086
-
1087
-/*
1088
- * Configuration Summary descriptors: Defines a list of device preferred
1089
- * configurations. This descriptor may be used by Host software to decide
1090
- * which Configuration to use to obtain the desired functionality.
1091
- */
1092
-#define USB_CAP_TYPE_CONFIG_SUMMARY 0x10
1093
-#define USB_CONFIG_SUMMARY_DESC_REV 0x100
1094
-
1095
-struct usb_config_summary_descriptor {
1096
- __u8 bLength;
1097
- __u8 bDescriptorType;
1098
- __u8 bDevCapabilityType;
1099
- __u16 bcdVersion;
1100
- __u8 bClass;
1101
- __u8 bSubClass;
1102
- __u8 bProtocol;
1103
- __u8 bConfigurationCount;
1104
- __u8 bConfigurationIndex[];
1105
-} __attribute__((packed));
11061105
11071106 /*-------------------------------------------------------------------------*/
11081107
....@@ -1243,7 +1242,7 @@
12431242 * As per USB compliance update, a device that is actively drawing
12441243 * more than 100mA from USB must report itself as bus-powered in
12451244 * the GetStatus(DEVICE) call.
1246
- * http://compliance.usb.org/index.asp?UpdateFile=Electrical&Format=Standard#34
1245
+ * https://compliance.usb.org/index.asp?UpdateFile=Electrical&Format=Standard#34
12471246 */
12481247 #define USB_SELF_POWER_VBUS_MAX_DRAW 100
12491248