2 * Copyright (c) 2013 Qualcomm Atheros, Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted (subject to the limitations in the
7 * disclaimer below) provided that the following conditions are met:
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the
17 * * Neither the name of Qualcomm Atheros nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
22 * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
23 * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
24 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
30 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
32 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
33 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 // UsbDeviceDescriptor
39 #define USB_DEVICE_DESC_TYPE 0x01
40 #define USB_DEVICE_DESC_LEN 0x12
41 #define USB_SPEC_VERSION 0x0200
42 #define USB_DEVICE_CLASS 0xFF
43 #define USB_DEVICE_SUB_CLASS 0xFF
44 #define USB_DEVICE_PROTOCOL 0xFF
45 #define USB_MAX_PKT_SIZE 0x40
46 #define USB_VENDOR_ID 0x0CF3
47 #define USB_PRODUCT_ID 0x7010
48 #define USB_DEVICE_BCD BOOTROM_VER
49 #define USB_MANUFACTURER_INDEX 0x10
50 #define USB_PRODUCT_INDEX 0x20
51 #define USB_SERIAL_INDEX 0x30
52 #define USB_CONFIGURATION_NUM 0x01
53 // end UsbDeviceDescriptor
55 #define USB_CONFIG_DESC_TYPE 0x02
56 #define USB_CONFIG_DESC_LEN 0x09
57 //#define USB_TOTAL_DESC_LEN 0x002E // 4 ep
58 //#define USB_TOTAL_DESC_LEN 0x0035 // 5 ep
59 #define USB_TOTAL_DESC_LEN 0x003C // 6 ep
60 #define USB_INTERFACE_NUM 0x01
61 #define USB_CONFIG_NUM 0x01
62 #define USB_STRING_INDEX 0x00
63 #define USB_ATTRIBUTE 0x80
64 #define USB_MAX_POWER 0xFA
66 #define USB_INTERFACE_DESC_TYPE 0x04
67 #define USB_INTERFACE_DESC_LEN 0x09
68 #define USB_INTERFACE_INDEX_NUM 0x00
69 #define USB_INTERFACE_ALT_SETTING 0x00
70 //#define USB_INTERFACE_EP_NUM 0x04
71 //#define USB_INTERFACE_EP_NUM 0x05
72 #define USB_INTERFACE_EP_NUM 0x06
73 #define USB_INTERFACE_CLASS 0xFF
74 #define USB_INTERFACE_SUB_CLASS 0x00
75 #define USB_INTERFACE_PROTOCOL 0x00
76 #define USB_INTERFACE_STRING_INDEX 0x00
78 #define USB_EP_DESC_TYPE 0x05
79 #define USB_EP_DESC_LEN 0x07
81 /* USB Endpoint attribute */
82 #define bUSB_EP1_NUM 0x01
83 #define bUSB_EP2_NUM 0x02
84 #define bUSB_EP3_NUM 0x03
85 #define bUSB_EP4_NUM 0x04
86 #define bUSB_EP5_NUM 0x05
87 #define bUSB_EP6_NUM 0x06
89 #define bUSB_EP_DIRECTION_IN 0x80
90 #define bUSB_EP_DIRECTION_OUT 0x00
92 #define bUSB_EP_TYPE_CONTROL 0x00
93 #define bUSB_EP_TYPE_ISOCHRONOUS 0x01
94 #define bUSB_EP_TYPE_BULK 0x02
95 #define bUSB_EP_TYPE_INTERRUPT 0x03
97 #define bUSB_EP_MAX_PKT_SIZE_64 0x0040
98 #define bUSB_EP_MAX_PKT_SIZE_512 0x0200
100 /* High Speed Endpoint */
101 #define USB_HS_EP1_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP1_NUM)
102 #define USB_HS_EP1_ATTRIBUTE bUSB_EP_TYPE_BULK
103 #define USB_HS_EP1_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_512
104 #define USB_HS_EP1_INTERVAL 0x00
106 #define USB_HS_EP2_ADDRESS (bUSB_EP_DIRECTION_IN | bUSB_EP2_NUM)
107 #define USB_HS_EP2_ATTRIBUTE bUSB_EP_TYPE_BULK
108 #define USB_HS_EP2_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_512
109 #define USB_HS_EP2_INTERVAL 0x00
111 #define USB_HS_EP3_ADDRESS (bUSB_EP_DIRECTION_IN | bUSB_EP3_NUM)
112 #define USB_HS_EP3_ATTRIBUTE bUSB_EP_TYPE_INTERRUPT
113 #define USB_HS_EP3_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
114 #define USB_HS_EP3_INTERVAL 0x01
116 #define USB_HS_EP4_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP4_NUM)
117 #define USB_HS_EP4_ATTRIBUTE bUSB_EP_TYPE_INTERRUPT //bUSB_EP_TYPE_BULK
118 #define USB_HS_EP4_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
119 #define USB_HS_EP4_INTERVAL 0x01 //0x00
121 #define USB_HS_EP5_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP5_NUM)
122 #define USB_HS_EP5_ATTRIBUTE bUSB_EP_TYPE_BULK
123 #define USB_HS_EP5_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_512
124 #define USB_HS_EP5_INTERVAL 0x00
126 #define USB_HS_EP6_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP6_NUM)
127 #define USB_HS_EP6_ATTRIBUTE bUSB_EP_TYPE_BULK
128 #define USB_HS_EP6_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_512
129 #define USB_HS_EP6_INTERVAL 0x00
131 /* Full Speed Endpoint */
132 #define USB_FS_EP1_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP1_NUM)
133 #define USB_FS_EP1_ATTRIBUTE bUSB_EP_TYPE_BULK
134 #define USB_FS_EP1_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
135 #define USB_FS_EP1_INTERVAL 0x00
137 #define USB_FS_EP2_ADDRESS (bUSB_EP_DIRECTION_IN | bUSB_EP2_NUM)
138 #define USB_FS_EP2_ATTRIBUTE bUSB_EP_TYPE_BULK
139 #define USB_FS_EP2_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
140 #define USB_FS_EP2_INTERVAL 0x00
142 #define USB_FS_EP3_ADDRESS (bUSB_EP_DIRECTION_IN | bUSB_EP3_NUM)
143 #define USB_FS_EP3_ATTRIBUTE bUSB_EP_TYPE_INTERRUPT
144 #define USB_FS_EP3_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
145 #define USB_FS_EP3_INTERVAL 0x01
147 #define USB_FS_EP4_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP4_NUM)
148 #define USB_FS_EP4_ATTRIBUTE bUSB_EP_TYPE_BULK
149 #define USB_FS_EP4_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
150 #define USB_FS_EP4_INTERVAL 0x00
152 #define USB_FS_EP5_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP5_NUM)
153 #define USB_FS_EP5_ATTRIBUTE bUSB_EP_TYPE_BULK
154 #define USB_FS_EP5_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
155 #define USB_FS_EP5_INTERVAL 0x00
157 #define USB_FS_EP6_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP6_NUM)
158 #define USB_FS_EP6_ATTRIBUTE bUSB_EP_TYPE_BULK
159 #define USB_FS_EP6_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
160 #define USB_FS_EP6_INTERVAL 0x00
162 //#define USB_QUALIFIER_DESC_ADDR 0x8cff00
163 //#define USB_OTHER_SPEED_DESC_ADDR 0x8cffA
165 #endif // end of _USB_TABLE_H_