aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/usb/usb_ch9.h
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-10-27 14:07:28 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-11-23 20:35:51 +0100
commit46249be26753319877d67b2958c5070f179b5937 (patch)
treec05cf8c54383d3e54ff9e284080a787a3a720a2a /src/drivers/usb/usb_ch9.h
parent83fe6d7fd270aeca7b703dbd0f7e23902144840b (diff)
usbdebug: Refactor descriptor probing of dongle
Organized such that it is easy to support devices that do not export special Debug Descriptor. Some of these can still work in a fixed configuration and/or require additional initialisation for UART clocks etc. Change-Id: Id07fd6b69007332d67d9e9a456f58fdbca1999cd Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/7209 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/drivers/usb/usb_ch9.h')
-rw-r--r--src/drivers/usb/usb_ch9.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/drivers/usb/usb_ch9.h b/src/drivers/usb/usb_ch9.h
index a609bdb207..a4a3722ee8 100644
--- a/src/drivers/usb/usb_ch9.h
+++ b/src/drivers/usb/usb_ch9.h
@@ -81,6 +81,34 @@
#define USB_DEVICE_DEBUG_MODE 6 /* (special devices only) */
+/*
+ * USB Packet IDs (PIDs)
+ */
+
+/* token */
+#define USB_PID_OUT 0xe1
+#define USB_PID_IN 0x69
+#define USB_PID_SOF 0xa5
+#define USB_PID_SETUP 0x2d
+/* handshake */
+#define USB_PID_ACK 0xd2
+#define USB_PID_NAK 0x5a
+#define USB_PID_STALL 0x1e
+#define USB_PID_NYET 0x96
+/* data */
+#define USB_PID_DATA0 0xc3
+#define USB_PID_DATA1 0x4b
+#define USB_PID_DATA2 0x87
+#define USB_PID_MDATA 0x0f
+/* Special */
+#define USB_PID_PREAMBLE 0x3c
+#define USB_PID_ERR 0x3c
+#define USB_PID_SPLIT 0x78
+#define USB_PID_PING 0xb4
+#define USB_PID_UNDEF_0 0xf0
+
+#define USB_PID_DATA_TOGGLE 0x88
+
struct usb_ctrlrequest {
u8 bRequestType;
u8 bRequest;