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.
39 // UsbDeviceDescriptor
40 #define USB_DEVICE_DESC_TYPE 0x01
41 #define USB_DEVICE_DESC_LEN 0x12
42 #define USB_SPEC_VERSION 0x0200
43 #define USB_DEVICE_CLASS 0xFF
44 #define USB_DEVICE_SUB_CLASS 0xFF
45 #define USB_DEVICE_PROTOCOL 0xFF
46 #define USB_MAX_PKT_SIZE 0x40
47 #define USB_VENDOR_ID 0x0CF3
48 #define USB_PRODUCT_ID 0x9271
50 #if 1 /* USB Device Descriptor : byte 12, 13 Device BCD -> Device release number in binary-coded decimal. */
51 #define USB_DEVICE_BCD BOOTROM_VER
53 #define USB_DEVICE_BCD 0x0106
56 #define USB_MANUFACTURER_INDEX 0x10
57 #define USB_PRODUCT_INDEX 0x20
58 #define USB_SERIAL_INDEX 0x30
59 #define USB_CONFIGURATION_NUM 0x01
60 // end UsbDeviceDescriptor
62 #define USB_CONFIG_DESC_TYPE 0x02
63 #define USB_CONFIG_DESC_LEN 0x09
64 //#define USB_TOTAL_DESC_LEN 0x002E // 4 ep
65 //#define USB_TOTAL_DESC_LEN 0x0035 // 5 ep
66 #define USB_TOTAL_DESC_LEN 0x003C // 6 ep
67 #define USB_INTERFACE_NUM 0x01
68 #define USB_CONFIG_NUM 0x01
69 #define USB_STRING_INDEX 0x00
70 #define USB_ATTRIBUTE 0x80
71 #define USB_MAX_POWER 0xFA
73 #define USB_INTERFACE_DESC_TYPE 0x04
74 #define USB_INTERFACE_DESC_LEN 0x09
75 #define USB_INTERFACE_INDEX_NUM 0x00
76 #define USB_INTERFACE_ALT_SETTING 0x00
77 //#define USB_INTERFACE_EP_NUM 0x04
78 //#define USB_INTERFACE_EP_NUM 0x05
79 #define USB_INTERFACE_EP_NUM 0x06
80 #define USB_INTERFACE_CLASS 0xFF
81 #define USB_INTERFACE_SUB_CLASS 0x00
82 #define USB_INTERFACE_PROTOCOL 0x00
83 #define USB_INTERFACE_STRING_INDEX 0x00
85 #define USB_EP_DESC_TYPE 0x05
86 #define USB_EP_DESC_LEN 0x07
88 /* USB Endpoint attribute */
89 #define bUSB_EP1_NUM 0x01
90 #define bUSB_EP2_NUM 0x02
91 #define bUSB_EP3_NUM 0x03
92 #define bUSB_EP4_NUM 0x04
93 #define bUSB_EP5_NUM 0x05
94 #define bUSB_EP6_NUM 0x06
96 #define bUSB_EP_DIRECTION_IN 0x80
97 #define bUSB_EP_DIRECTION_OUT 0x00
99 #define bUSB_EP_TYPE_CONTROL 0x00
100 #define bUSB_EP_TYPE_ISOCHRONOUS 0x01
101 #define bUSB_EP_TYPE_BULK 0x02
102 #define bUSB_EP_TYPE_INTERRUPT 0x03
104 #define bUSB_EP_MAX_PKT_SIZE_64 0x0040
105 #define bUSB_EP_MAX_PKT_SIZE_512 0x0200
107 /* High Speed Endpoint */
108 #define USB_HS_EP1_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP1_NUM)
109 #define USB_HS_EP1_ATTRIBUTE bUSB_EP_TYPE_BULK
110 #define USB_HS_EP1_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_512
111 #define USB_HS_EP1_INTERVAL 0x00
113 #define USB_HS_EP2_ADDRESS (bUSB_EP_DIRECTION_IN | bUSB_EP2_NUM)
114 #define USB_HS_EP2_ATTRIBUTE bUSB_EP_TYPE_BULK
115 #define USB_HS_EP2_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_512
116 #define USB_HS_EP2_INTERVAL 0x00
118 #define USB_HS_EP3_ADDRESS (bUSB_EP_DIRECTION_IN | bUSB_EP3_NUM)
119 #define USB_HS_EP3_ATTRIBUTE bUSB_EP_TYPE_INTERRUPT
120 #define USB_HS_EP3_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
121 #define USB_HS_EP3_INTERVAL 0x01
123 #define USB_HS_EP4_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP4_NUM)
124 #define USB_HS_EP4_ATTRIBUTE bUSB_EP_TYPE_INTERRUPT //bUSB_EP_TYPE_BULK
125 #define USB_HS_EP4_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
126 #define USB_HS_EP4_INTERVAL 0x01 //0x00
128 #define USB_HS_EP5_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP5_NUM)
129 #define USB_HS_EP5_ATTRIBUTE bUSB_EP_TYPE_BULK
130 #define USB_HS_EP5_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_512
131 #define USB_HS_EP5_INTERVAL 0x00
133 #define USB_HS_EP6_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP6_NUM)
134 #define USB_HS_EP6_ATTRIBUTE bUSB_EP_TYPE_BULK
135 #define USB_HS_EP6_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_512
136 #define USB_HS_EP6_INTERVAL 0x00
138 /* Full Speed Endpoint */
139 #define USB_FS_EP1_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP1_NUM)
140 #define USB_FS_EP1_ATTRIBUTE bUSB_EP_TYPE_BULK
141 #define USB_FS_EP1_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
142 #define USB_FS_EP1_INTERVAL 0x00
144 #define USB_FS_EP2_ADDRESS (bUSB_EP_DIRECTION_IN | bUSB_EP2_NUM)
145 #define USB_FS_EP2_ATTRIBUTE bUSB_EP_TYPE_BULK
146 #define USB_FS_EP2_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
147 #define USB_FS_EP2_INTERVAL 0x00
149 #define USB_FS_EP3_ADDRESS (bUSB_EP_DIRECTION_IN | bUSB_EP3_NUM)
150 #define USB_FS_EP3_ATTRIBUTE bUSB_EP_TYPE_INTERRUPT
151 #define USB_FS_EP3_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
152 #define USB_FS_EP3_INTERVAL 0x01
154 #define USB_FS_EP4_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP4_NUM)
155 #define USB_FS_EP4_ATTRIBUTE bUSB_EP_TYPE_BULK
156 #define USB_FS_EP4_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
157 #define USB_FS_EP4_INTERVAL 0x00
159 #define USB_FS_EP5_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP5_NUM)
160 #define USB_FS_EP5_ATTRIBUTE bUSB_EP_TYPE_BULK
161 #define USB_FS_EP5_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
162 #define USB_FS_EP5_INTERVAL 0x00
164 #define USB_FS_EP6_ADDRESS (bUSB_EP_DIRECTION_OUT | bUSB_EP6_NUM)
165 #define USB_FS_EP6_ATTRIBUTE bUSB_EP_TYPE_BULK
166 #define USB_FS_EP6_MAX_PACKET_SIZE bUSB_EP_MAX_PKT_SIZE_64
167 #define USB_FS_EP6_INTERVAL 0x00
169 //#define USB_QUALIFIER_DESC_ADDR 0x8cff00
170 //#define USB_OTHER_SPEED_DESC_ADDR 0x8cffA
172 #endif // end of _USB_TABLE_H_