]> git.sur5r.net Git - u-boot/blobdiff - include/usb_defs.h
usb: Add new command to set USB 2.0 port test modes
[u-boot] / include / usb_defs.h
index 8032e5712524ee322842e3eebf16a438eb4d99a7..5c5478f7cf56ca239b5dc51a59a4b7bd0e0b80c5 100644 (file)
 #define USB_DIR_OUT           0
 #define USB_DIR_IN            0x80
 
-/* USB device speeds */
-#define USB_SPEED_FULL         0x0     /* 12Mbps */
-#define USB_SPEED_LOW          0x1     /* 1.5Mbps */
-#define USB_SPEED_HIGH         0x2     /* 480Mbps */
-#define USB_SPEED_RESERVED     0x3
-
 /* Descriptor types */
 #define USB_DT_DEVICE        0x01
 #define USB_DT_CONFIG        0x02
 #define USB_REQ_SET_IDLE            0x0A
 #define USB_REQ_SET_PROTOCOL        0x0B
 
+/* Device features */
+#define USB_FEAT_HALT               0x00
+#define USB_FEAT_WAKEUP             0x01
+#define USB_FEAT_TEST               0x02
+
+/* Test modes */
+#define USB_TEST_MODE_J             0x01
+#define USB_TEST_MODE_K             0x02
+#define USB_TEST_MODE_SE0_NAK       0x03
+#define USB_TEST_MODE_PACKET        0x04
+#define USB_TEST_MODE_FORCE_ENABLE  0x05
+
 
 /* "pipe" definitions */
 
 #define USB_PORT_FEAT_C_SUSPEND      18
 #define USB_PORT_FEAT_C_OVER_CURRENT 19
 #define USB_PORT_FEAT_C_RESET        20
+#define USB_PORT_FEAT_TEST           21
 
 /* wPortStatus bits */
 #define USB_PORT_STAT_CONNECTION    0x0001