summaryrefslogtreecommitdiff
path: root/include/usb_defs.h
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2013-02-28 18:08:40 +0000
committerMarek Vasut <marex@denx.de>2013-05-05 23:54:21 +0200
commit7d9aa8fd87171164a6f14167a0c9c066f4312b8d (patch)
treebbb334c7825cec5fcf1b69118d9d43775ba61302 /include/usb_defs.h
parentb068deb363e34a72754877d3d8c7a71a5bc834db (diff)
downloadu-boot-imx-7d9aa8fd87171164a6f14167a0c9c066f4312b8d.zip
u-boot-imx-7d9aa8fd87171164a6f14167a0c9c066f4312b8d.tar.gz
u-boot-imx-7d9aa8fd87171164a6f14167a0c9c066f4312b8d.tar.bz2
usb: Add new command to set USB 2.0 port test modes
This patch adds a new 'usb test' command, that will set a port to a USB 2.0 test mode (see USB 2.0 spec 7.1.20). It supports all five test modes on both downstream hub ports and ordinary device's upstream ports. In addition, it supports EHCI root hub ports. Signed-off-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'include/usb_defs.h')
-rw-r--r--include/usb_defs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/usb_defs.h b/include/usb_defs.h
index 9502544..5c5478f 100644
--- a/include/usb_defs.h
+++ b/include/usb_defs.h
@@ -150,6 +150,18 @@
#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 */
@@ -208,6 +220,7 @@
#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