3 ;;; Copyright 2003 Free Software Foundation, Inc.
5 ;;; This file is part of GNU Radio
7 ;;; GNU Radio is free software; you can redistribute it and/or modify
8 ;;; it under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 2, or (at your option)
10 ;;; any later version.
12 ;;; GNU Radio is distributed in the hope that it will be useful,
13 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Radio; see the file COPYING. If not, write to
19 ;;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 ;;; Boston, MA 02111-1307, USA.
23 ;;; USB Descriptor table for the USRP
25 ;;; We're a high-speed only device (480 Mb/sec) with 1 configuration
28 ;;; interface 0: command and status (ep0 COMMAND)
29 ;;; interface 1: Transmit path (ep2 OUT BULK)
30 ;;; interface 2: Receive path (ep6 IN BULK)
32 .module usb_descriptors
34 VID_FREE = 0xfffe ; Free Software Folks
35 PID_USRP = 0x0002 ; USRP
37 ;; We distinguish configured from unconfigured USRPs using the Device ID.
38 ;; If the MSB of the DID is 0, the device is unconfigured.
39 ;; The LSB of the DID is reserved for hardware revs.
41 DID_USRP = 0x0100 ; Device ID (bcd)
44 DSCR_DEVICE = 1 ; Descriptor type: Device
45 DSCR_CONFIG = 2 ; Descriptor type: Configuration
46 DSCR_STRING = 3 ; Descriptor type: String
47 DSCR_INTRFC = 4 ; Descriptor type: Interface
48 DSCR_ENDPNT = 5 ; Descriptor type: Endpoint
49 DSCR_DEVQUAL = 6 ; Descriptor type: Device Qualifier
57 ET_CONTROL = 0 ; Endpoint type: Control
58 ET_ISO = 1 ; Endpoint type: Isochronous
59 ET_BULK = 2 ; Endpoint type: Bulk
60 ET_INT = 3 ; Endpoint type: Interrupt
63 ;; configuration attributes
64 bmSELF_POWERED = 1 << 6
66 ;;; --------------------------------------------------------
68 ;;;--------------------------------------------------------
70 .area USBDESCSEG (XDATA)
72 ;;; ----------------------------------------------------------------
73 ;;; descriptors used when operating at high speed (480Mb/sec)
74 ;;; ----------------------------------------------------------------
76 .even ; descriptors must be 2-byte aligned for SUDPTR{H,L} to work
78 ;; The .even directive isn't really honored by the linker. Bummer!
79 ;; (There's no way to specify an alignment requirement for a given area,
80 ;; hence when they're concatenated together, even doesn't work.)
82 ;; We work around this by telling the linker to put USBDESCSEG
83 ;; at 0xE000 absolute. This means that the maximimum length of this
84 ;; segment is 480 bytes, leaving room for the two hash slots
85 ;; at 0xE1EO to 0xE1FF.
87 ;; As of July 7, 2004, this segment is 326 bytes long
89 _high_speed_device_descr::
92 .db <0x0200 ; Specification version (LSB)
93 .db >0x0200 ; Specification version (MSB)
94 .db 0xff ; device class (vendor specific)
95 .db 0xff ; device subclass (vendor specific)
96 .db 0xff ; device protocol (vendor specific)
97 .db 64 ; bMaxPacketSize0 for endpoint 0
98 .db <VID_FREE ; idVendor
99 .db >VID_FREE ; idVendor
100 .db <PID_USRP ; idProduct
101 .db >PID_USRP ; idProduct
102 _usb_desc_hw_rev_binary_patch_location_0::
103 .db <DID_USRP ; bcdDevice
104 .db >DID_USRP ; bcdDevice
105 .db SI_VENDOR ; iManufacturer (string index)
106 .db SI_PRODUCT ; iProduct (string index)
107 .db SI_SERIAL ; iSerial number (string index)
108 .db 1 ; bNumConfigurations
110 ;;; describes the other speed (12Mb/sec)
112 _high_speed_devqual_descr::
115 .db <0x0200 ; bcdUSB (LSB)
116 .db >0x0200 ; bcdUSB (MSB)
117 .db 0xff ; bDeviceClass
118 .db 0xff ; bDeviceSubClass
119 .db 0xff ; bDeviceProtocol
120 .db 64 ; bMaxPacketSize0
121 .db 1 ; bNumConfigurations (one config at 12Mb/sec)
125 _high_speed_config_descr::
128 .db <(_high_speed_config_descr_end - _high_speed_config_descr) ; LSB
129 .db >(_high_speed_config_descr_end - _high_speed_config_descr) ; MSB
130 .db 3 ; bNumInterfaces
131 .db 1 ; bConfigurationValue
132 .db 0 ; iConfiguration
133 .db 0x80 | bmSELF_POWERED ; bmAttributes
136 ;; interface descriptor 0 (command & status, ep0 COMMAND)
140 .db 0 ; bInterfaceNumber (zero based)
141 .db 0 ; bAlternateSetting
142 .db 0 ; bNumEndpoints
143 .db 0xff ; bInterfaceClass (vendor specific)
144 .db 0xff ; bInterfaceSubClass (vendor specific)
145 .db 0xff ; bInterfaceProtocol (vendor specific)
146 .db SI_COMMAND_AND_STATUS ; iInterface (description)
148 ;; interface descriptor 1 (transmit path, ep2 OUT BULK)
152 .db 1 ; bInterfaceNumber (zero based)
153 .db 0 ; bAlternateSetting
154 .db 1 ; bNumEndpoints
155 .db 0xff ; bInterfaceClass (vendor specific)
156 .db 0xff ; bInterfaceSubClass (vendor specific)
157 .db 0xff ; bInterfaceProtocol (vendor specific)
158 .db SI_TX_PATH ; iInterface (description)
160 ;; interface 1's end point
164 .db 0x02 ; bEndpointAddress (ep 2 OUT)
165 .db ET_BULK ; bmAttributes
166 .db <512 ; wMaxPacketSize (LSB)
167 .db >512 ; wMaxPacketSize (MSB)
168 .db 0 ; bInterval (iso only)
170 ;; interface descriptor 2 (receive path, ep6 IN BULK)
174 .db 2 ; bInterfaceNumber (zero based)
175 .db 0 ; bAlternateSetting
176 .db 1 ; bNumEndpoints
177 .db 0xff ; bInterfaceClass (vendor specific)
178 .db 0xff ; bInterfaceSubClass (vendor specific)
179 .db 0xff ; bInterfaceProtocol (vendor specific)
180 .db SI_RX_PATH ; iInterface (description)
182 ;; interface 2's end point
186 .db 0x86 ; bEndpointAddress (ep 6 IN)
187 .db ET_BULK ; bmAttributes
188 .db <512 ; wMaxPacketSize (LSB)
189 .db >512 ; wMaxPacketSize (MSB)
190 .db 0 ; bInterval (iso only)
192 _high_speed_config_descr_end:
194 ;;; ----------------------------------------------------------------
195 ;;; descriptors used when operating at full speed (12Mb/sec)
196 ;;; ----------------------------------------------------------------
199 _full_speed_device_descr::
202 .db <0x0200 ; Specification version (LSB)
203 .db >0x0200 ; Specification version (MSB)
204 .db 0xff ; device class (vendor specific)
205 .db 0xff ; device subclass (vendor specific)
206 .db 0xff ; device protocol (vendor specific)
207 .db 64 ; bMaxPacketSize0 for endpoint 0
208 .db <VID_FREE ; idVendor
209 .db >VID_FREE ; idVendor
210 .db <PID_USRP ; idProduct
211 .db >PID_USRP ; idProduct
212 _usb_desc_hw_rev_binary_patch_location_1::
213 .db <DID_USRP ; bcdDevice
214 .db >DID_USRP ; bcdDevice
215 .db SI_VENDOR ; iManufacturer (string index)
216 .db SI_PRODUCT ; iProduct (string index)
217 .db SI_NONE ; iSerial number (None)
218 .db 1 ; bNumConfigurations
221 ;;; describes the other speed (480Mb/sec)
223 _full_speed_devqual_descr::
228 .db 0xff ; bDeviceClass
229 .db 0xff ; bDeviceSubClass
230 .db 0xff ; bDeviceProtocol
231 .db 64 ; bMaxPacketSize0
232 .db 1 ; bNumConfigurations (one config at 480Mb/sec)
236 _full_speed_config_descr::
239 .db <(_full_speed_config_descr_end - _full_speed_config_descr) ; LSB
240 .db >(_full_speed_config_descr_end - _full_speed_config_descr) ; MSB
241 .db 1 ; bNumInterfaces
242 .db 1 ; bConfigurationValue
243 .db 0 ; iConfiguration
244 .db 0x80 | bmSELF_POWERED ; bmAttributes
247 ;; interface descriptor 0 (command & status, ep0 COMMAND)
251 .db 0 ; bInterfaceNumber (zero based)
252 .db 0 ; bAlternateSetting
253 .db 0 ; bNumEndpoints
254 .db 0xff ; bInterfaceClass (vendor specific)
255 .db 0xff ; bInterfaceSubClass (vendor specific)
256 .db 0xff ; bInterfaceProtocol (vendor specific)
257 .db SI_COMMAND_AND_STATUS ; iInterface (description)
259 _full_speed_config_descr_end:
261 ;;; ----------------------------------------------------------------
262 ;;; string descriptors
263 ;;; ----------------------------------------------------------------
265 _nstring_descriptors::
266 .db (_string_descriptors_end - _string_descriptors) / 2
268 _string_descriptors::
276 _string_descriptors_end:
279 ;; str0 contains the language ID's.
281 str0: .db str0_end - str0
285 .db <0x0409 ; magic code for US English (LSB)
286 .db >0x0409 ; magic code for US English (MSB)
291 str1: .db str1_end - str1
293 .db 'F, 0 ; 16-bit unicode
316 str2: .db str2_end - str2
327 _usb_desc_hw_rev_ascii_patch_location_0::
331 SI_COMMAND_AND_STATUS = 3
333 str3: .db str3_end - str3
355 str4: .db str4_end - str4
374 str5: .db str5_end - str5
392 str6: .db str6_end - str6
394 _usb_desc_serial_number_ascii::