io_usbvend.h (39fe5434cb9de5da40510028b17b96bc4eb312b3) io_usbvend.h (a320471147fe61ed9260295958f07cc23ec360c8)
1/************************************************************************
2 *
3 * USBVEND.H Vendor-specific USB definitions
4 *
5 * NOTE: This must be kept in sync with the Edgeport firmware and
6 * must be kept backward-compatible with older firmware.
7 *
8 ************************************************************************

--- 12 unchanged lines hidden (view full) ---

21/************************************************************************
22 *
23 * D e f i n e s / T y p e d e f s
24 *
25 ************************************************************************/
26
27//
28// Definitions of USB product IDs
1/************************************************************************
2 *
3 * USBVEND.H Vendor-specific USB definitions
4 *
5 * NOTE: This must be kept in sync with the Edgeport firmware and
6 * must be kept backward-compatible with older firmware.
7 *
8 ************************************************************************

--- 12 unchanged lines hidden (view full) ---

21/************************************************************************
22 *
23 * D e f i n e s / T y p e d e f s
24 *
25 ************************************************************************/
26
27//
28// Definitions of USB product IDs
29//
29//
30
31#define USB_VENDOR_ID_ION 0x1608 // Our VID
32#define USB_VENDOR_ID_TI 0x0451 // TI VID
33#define USB_VENDOR_ID_AXIOHM 0x05D9 /* Axiohm VID */
34
35//
36// Definitions of USB product IDs (PID)
37// We break the USB-defined PID into an OEM Id field (upper 6 bits)

--- 11 unchanged lines hidden (view full) ---

49#define ION_OEM_ID_MULTITECH 5 // 05h Multitech Rapidports
50#define ION_OEM_ID_AGILENT 6 // 06h AGILENT board
51
52
53// ION-device Device IDs
54// Product IDs - assigned to match middle digit of serial number (No longer true)
55
56#define ION_DEVICE_ID_80251_NETCHIP 0x020 // This bit is set in the PID if this edgeport hardware$
30
31#define USB_VENDOR_ID_ION 0x1608 // Our VID
32#define USB_VENDOR_ID_TI 0x0451 // TI VID
33#define USB_VENDOR_ID_AXIOHM 0x05D9 /* Axiohm VID */
34
35//
36// Definitions of USB product IDs (PID)
37// We break the USB-defined PID into an OEM Id field (upper 6 bits)

--- 11 unchanged lines hidden (view full) ---

49#define ION_OEM_ID_MULTITECH 5 // 05h Multitech Rapidports
50#define ION_OEM_ID_AGILENT 6 // 06h AGILENT board
51
52
53// ION-device Device IDs
54// Product IDs - assigned to match middle digit of serial number (No longer true)
55
56#define ION_DEVICE_ID_80251_NETCHIP 0x020 // This bit is set in the PID if this edgeport hardware$
57 // is based on the 80251+Netchip.
57 // is based on the 80251+Netchip.
58
59#define ION_DEVICE_ID_GENERATION_1 0x00 // Value for 930 based edgeports
60#define ION_DEVICE_ID_GENERATION_2 0x01 // Value for 80251+Netchip.
61#define ION_DEVICE_ID_GENERATION_3 0x02 // Value for Texas Instruments TUSB5052 chip
62#define ION_DEVICE_ID_GENERATION_4 0x03 // Watchport Family of products
63#define ION_GENERATION_MASK 0x03
64
65#define ION_DEVICE_ID_HUB_MASK 0x0080 // This bit in the PID designates a HUB device

--- 63 unchanged lines hidden (view full) ---

129#define ION_DEVICE_ID_TI_EDGEPORT_2 0x0205 // Edgeport/2 RS232
130#define ION_DEVICE_ID_TI_EDGEPORT_4I 0x0206 // Edgeport/4i RS422
131#define ION_DEVICE_ID_TI_EDGEPORT_2I 0x0207 // Edgeport/2i RS422/RS485
132#define ION_DEVICE_ID_TI_EDGEPORT_421 0x020C // Edgeport/421 4 hub 2 RS232 + Parallel (lucent on a different hub port)
133#define ION_DEVICE_ID_TI_EDGEPORT_21 0x020D // Edgeport/21 2 RS232 + Parallel (lucent on a different hub port)
134#define ION_DEVICE_ID_TI_EDGEPORT_416 0x0212 // Edgeport/416
135#define ION_DEVICE_ID_TI_EDGEPORT_1 0x0215 // Edgeport/1 RS232
136#define ION_DEVICE_ID_TI_EDGEPORT_42 0x0217 // Edgeport/42 4 hub 2 RS232
58
59#define ION_DEVICE_ID_GENERATION_1 0x00 // Value for 930 based edgeports
60#define ION_DEVICE_ID_GENERATION_2 0x01 // Value for 80251+Netchip.
61#define ION_DEVICE_ID_GENERATION_3 0x02 // Value for Texas Instruments TUSB5052 chip
62#define ION_DEVICE_ID_GENERATION_4 0x03 // Watchport Family of products
63#define ION_GENERATION_MASK 0x03
64
65#define ION_DEVICE_ID_HUB_MASK 0x0080 // This bit in the PID designates a HUB device

--- 63 unchanged lines hidden (view full) ---

129#define ION_DEVICE_ID_TI_EDGEPORT_2 0x0205 // Edgeport/2 RS232
130#define ION_DEVICE_ID_TI_EDGEPORT_4I 0x0206 // Edgeport/4i RS422
131#define ION_DEVICE_ID_TI_EDGEPORT_2I 0x0207 // Edgeport/2i RS422/RS485
132#define ION_DEVICE_ID_TI_EDGEPORT_421 0x020C // Edgeport/421 4 hub 2 RS232 + Parallel (lucent on a different hub port)
133#define ION_DEVICE_ID_TI_EDGEPORT_21 0x020D // Edgeport/21 2 RS232 + Parallel (lucent on a different hub port)
134#define ION_DEVICE_ID_TI_EDGEPORT_416 0x0212 // Edgeport/416
135#define ION_DEVICE_ID_TI_EDGEPORT_1 0x0215 // Edgeport/1 RS232
136#define ION_DEVICE_ID_TI_EDGEPORT_42 0x0217 // Edgeport/42 4 hub 2 RS232
137#define ION_DEVICE_ID_TI_EDGEPORT_22I 0x021A // Edgeport/22I is an Edgeport/4 with ports 1&2 RS422 and ports 3&4 RS232
137#define ION_DEVICE_ID_TI_EDGEPORT_22I 0x021A // Edgeport/22I is an Edgeport/4 with ports 1&2 RS422 and ports 3&4 RS232
138#define ION_DEVICE_ID_TI_EDGEPORT_2C 0x021B // Edgeport/2c RS232
139#define ION_DEVICE_ID_TI_EDGEPORT_221C 0x021C // Edgeport/221c is a TI based Edgeport/2 with lucent chip and
140 // 2 external hub ports - Large I2C
141#define ION_DEVICE_ID_TI_EDGEPORT_22C 0x021D // Edgeport/22c is a TI based Edgeport/2 with
142 // 2 external hub ports - Large I2C
143#define ION_DEVICE_ID_TI_EDGEPORT_21C 0x021E // Edgeport/21c is a TI based Edgeport/2 with lucent chip
144
138#define ION_DEVICE_ID_TI_EDGEPORT_2C 0x021B // Edgeport/2c RS232
139#define ION_DEVICE_ID_TI_EDGEPORT_221C 0x021C // Edgeport/221c is a TI based Edgeport/2 with lucent chip and
140 // 2 external hub ports - Large I2C
141#define ION_DEVICE_ID_TI_EDGEPORT_22C 0x021D // Edgeport/22c is a TI based Edgeport/2 with
142 // 2 external hub ports - Large I2C
143#define ION_DEVICE_ID_TI_EDGEPORT_21C 0x021E // Edgeport/21c is a TI based Edgeport/2 with lucent chip
144
145// Generation 3 devices -- 3410 based edgport/1 (256 byte I2C)
145// Generation 3 devices -- 3410 based edgport/1 (256 byte I2C)
146#define ION_DEVICE_ID_TI_TI3410_EDGEPORT_1 0x0240 // Edgeport/1 RS232
147#define ION_DEVICE_ID_TI_TI3410_EDGEPORT_1I 0x0241 // Edgeport/1i- RS422 model
148
149// Ti based software switchable RS232/RS422/RS485 devices
150#define ION_DEVICE_ID_TI_EDGEPORT_4S 0x0242 // Edgeport/4s - software switchable model
151#define ION_DEVICE_ID_TI_EDGEPORT_8S 0x0243 // Edgeport/8s - software switchable model
152#define ION_DEVICE_ID_TI_EDGEPORT_8 0x0244 // Edgeport/8 (single-CPU)
153#define ION_DEVICE_ID_TI_EDGEPORT_416B 0x0247 // Edgeport/416

--- 17 unchanged lines hidden (view full) ---

171#define ION_DEVICE_ID_WP_LIGHT 0x307 // Watchport
172#define ION_DEVICE_ID_WP_RADIATION 0x308 // Watchport
173#define ION_DEVICE_ID_WP_ACCELERATION 0x309 // Watchport/A
174#define ION_DEVICE_ID_WP_DISTANCE 0x30A // Watchport/D Discontinued
175#define ION_DEVICE_ID_WP_PROX_DIST 0x30B // Watchport/D uses distance sensor
176 // Default to /P function
177
178#define ION_DEVICE_ID_PLUS_PWR_HP4CD 0x30C // 5052 Plus Power HubPort/4CD+ (for Dell)
146#define ION_DEVICE_ID_TI_TI3410_EDGEPORT_1 0x0240 // Edgeport/1 RS232
147#define ION_DEVICE_ID_TI_TI3410_EDGEPORT_1I 0x0241 // Edgeport/1i- RS422 model
148
149// Ti based software switchable RS232/RS422/RS485 devices
150#define ION_DEVICE_ID_TI_EDGEPORT_4S 0x0242 // Edgeport/4s - software switchable model
151#define ION_DEVICE_ID_TI_EDGEPORT_8S 0x0243 // Edgeport/8s - software switchable model
152#define ION_DEVICE_ID_TI_EDGEPORT_8 0x0244 // Edgeport/8 (single-CPU)
153#define ION_DEVICE_ID_TI_EDGEPORT_416B 0x0247 // Edgeport/416

--- 17 unchanged lines hidden (view full) ---

171#define ION_DEVICE_ID_WP_LIGHT 0x307 // Watchport
172#define ION_DEVICE_ID_WP_RADIATION 0x308 // Watchport
173#define ION_DEVICE_ID_WP_ACCELERATION 0x309 // Watchport/A
174#define ION_DEVICE_ID_WP_DISTANCE 0x30A // Watchport/D Discontinued
175#define ION_DEVICE_ID_WP_PROX_DIST 0x30B // Watchport/D uses distance sensor
176 // Default to /P function
177
178#define ION_DEVICE_ID_PLUS_PWR_HP4CD 0x30C // 5052 Plus Power HubPort/4CD+ (for Dell)
179#define ION_DEVICE_ID_PLUS_PWR_HP4C 0x30D // 5052 Plus Power HubPort/4C+
179#define ION_DEVICE_ID_PLUS_PWR_HP4C 0x30D // 5052 Plus Power HubPort/4C+
180#define ION_DEVICE_ID_PLUS_PWR_PCI 0x30E // 3410 Plus Power PCI Host Controller 4 port
181
182
183//
184// Definitions for AXIOHM USB product IDs
185//
186#define USB_VENDOR_ID_AXIOHM 0x05D9 // Axiohm VID
187

--- 24 unchanged lines hidden (view full) ---

212#define SYMBOL_DEVICE_ID_KEYFOB 0x0700
213
214
215//
216// Definitions for other product IDs
217#define ION_DEVICE_ID_MT4X56USB 0x1403 // OEM device
218
219
180#define ION_DEVICE_ID_PLUS_PWR_PCI 0x30E // 3410 Plus Power PCI Host Controller 4 port
181
182
183//
184// Definitions for AXIOHM USB product IDs
185//
186#define USB_VENDOR_ID_AXIOHM 0x05D9 // Axiohm VID
187

--- 24 unchanged lines hidden (view full) ---

212#define SYMBOL_DEVICE_ID_KEYFOB 0x0700
213
214
215//
216// Definitions for other product IDs
217#define ION_DEVICE_ID_MT4X56USB 0x1403 // OEM device
218
219
220#define GENERATION_ID_FROM_USB_PRODUCT_ID( ProductId ) \
221 ( (__u16) ((ProductId >> 8) & (ION_GENERATION_MASK)) )
220#define GENERATION_ID_FROM_USB_PRODUCT_ID(ProductId) \
221 ((__u16) ((ProductId >> 8) & (ION_GENERATION_MASK)))
222
222
223#define MAKE_USB_PRODUCT_ID( OemId, DeviceId ) \
224 ( (__u16) (((OemId) << 10) || (DeviceId)) )
223#define MAKE_USB_PRODUCT_ID(OemId, DeviceId) \
224 ((__u16) (((OemId) << 10) || (DeviceId)))
225
225
226#define DEVICE_ID_FROM_USB_PRODUCT_ID( ProductId ) \
227 ( (__u16) ((ProductId) & (EDGEPORT_DEVICE_ID_MASK)) )
226#define DEVICE_ID_FROM_USB_PRODUCT_ID(ProductId) \
227 ((__u16) ((ProductId) & (EDGEPORT_DEVICE_ID_MASK)))
228
228
229#define OEM_ID_FROM_USB_PRODUCT_ID( ProductId ) \
230 ( (__u16) (((ProductId) >> 10) & 0x3F) )
229#define OEM_ID_FROM_USB_PRODUCT_ID(ProductId) \
230 ((__u16) (((ProductId) >> 10) & 0x3F))
231
232//
233// Definitions of parameters for download code. Note that these are
234// specific to a given version of download code and must change if the
235// corresponding download code changes.
236//
237
238// TxCredits value below which driver won't bother sending (to prevent too many small writes).
239// Send only if above 25%
231
232//
233// Definitions of parameters for download code. Note that these are
234// specific to a given version of download code and must change if the
235// corresponding download code changes.
236//
237
238// TxCredits value below which driver won't bother sending (to prevent too many small writes).
239// Send only if above 25%
240#define EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(InitialCredit, MaxPacketSize) (max( ((InitialCredit) / 4), (MaxPacketSize) ))
240#define EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(InitialCredit, MaxPacketSize) (max(((InitialCredit) / 4), (MaxPacketSize)))
241
242#define EDGE_FW_BULK_MAX_PACKET_SIZE 64 // Max Packet Size for Bulk In Endpoint (EP1)
243#define EDGE_FW_BULK_READ_BUFFER_SIZE 1024 // Size to use for Bulk reads
244
245#define EDGE_FW_INT_MAX_PACKET_SIZE 32 // Max Packet Size for Interrupt In Endpoint
246 // Note that many units were shipped with MPS=16, we
247 // force an upgrade to this value).
248#define EDGE_FW_INT_INTERVAL 2 // 2ms polling on IntPipe

--- 9 unchanged lines hidden (view full) ---

258// These are the definitions for the bRequest field for the
259// above bmRequestTypes.
260//
261// For the read/write Edgeport memory commands, the parameters
262// are as follows:
263// wValue = 16-bit address
264// wIndex = unused (though we could put segment 00: or FF: here)
265// wLength = # bytes to read/write (max 64)
241
242#define EDGE_FW_BULK_MAX_PACKET_SIZE 64 // Max Packet Size for Bulk In Endpoint (EP1)
243#define EDGE_FW_BULK_READ_BUFFER_SIZE 1024 // Size to use for Bulk reads
244
245#define EDGE_FW_INT_MAX_PACKET_SIZE 32 // Max Packet Size for Interrupt In Endpoint
246 // Note that many units were shipped with MPS=16, we
247 // force an upgrade to this value).
248#define EDGE_FW_INT_INTERVAL 2 // 2ms polling on IntPipe

--- 9 unchanged lines hidden (view full) ---

258// These are the definitions for the bRequest field for the
259// above bmRequestTypes.
260//
261// For the read/write Edgeport memory commands, the parameters
262// are as follows:
263// wValue = 16-bit address
264// wIndex = unused (though we could put segment 00: or FF: here)
265// wLength = # bytes to read/write (max 64)
266//
266//
267
268#define USB_REQUEST_ION_RESET_DEVICE 0 // Warm reboot Edgeport, retaining USB address
269#define USB_REQUEST_ION_GET_EPIC_DESC 1 // Get Edgeport Compatibility Descriptor
270// unused 2 // Unused, available
271#define USB_REQUEST_ION_READ_RAM 3 // Read EdgePort RAM at specified addr
272#define USB_REQUEST_ION_WRITE_RAM 4 // Write EdgePort RAM at specified addr
273#define USB_REQUEST_ION_READ_ROM 5 // Read EdgePort ROM at specified addr
274#define USB_REQUEST_ION_WRITE_ROM 6 // Write EdgePort ROM at specified addr
275#define USB_REQUEST_ION_EXEC_DL_CODE 7 // Begin execution of RAM-based download
276 // code by jumping to address in wIndex:wValue
277// 8 // Unused, available
278#define USB_REQUEST_ION_ENABLE_SUSPEND 9 // Enable/Disable suspend feature
279 // (wValue != 0: Enable; wValue = 0: Disable)
280
267
268#define USB_REQUEST_ION_RESET_DEVICE 0 // Warm reboot Edgeport, retaining USB address
269#define USB_REQUEST_ION_GET_EPIC_DESC 1 // Get Edgeport Compatibility Descriptor
270// unused 2 // Unused, available
271#define USB_REQUEST_ION_READ_RAM 3 // Read EdgePort RAM at specified addr
272#define USB_REQUEST_ION_WRITE_RAM 4 // Write EdgePort RAM at specified addr
273#define USB_REQUEST_ION_READ_ROM 5 // Read EdgePort ROM at specified addr
274#define USB_REQUEST_ION_WRITE_ROM 6 // Write EdgePort ROM at specified addr
275#define USB_REQUEST_ION_EXEC_DL_CODE 7 // Begin execution of RAM-based download
276 // code by jumping to address in wIndex:wValue
277// 8 // Unused, available
278#define USB_REQUEST_ION_ENABLE_SUSPEND 9 // Enable/Disable suspend feature
279 // (wValue != 0: Enable; wValue = 0: Disable)
280
281#define USB_REQUEST_ION_SEND_IOSP 10 // Send an IOSP command to the edgeport over the control pipe
281#define USB_REQUEST_ION_SEND_IOSP 10 // Send an IOSP command to the edgeport over the control pipe
282#define USB_REQUEST_ION_RECV_IOSP 11 // Receive an IOSP command from the edgeport over the control pipe
283
284
285#define USB_REQUEST_ION_DIS_INT_TIMER 0x80 // Sent to Axiohm to enable/ disable
286 // interrupt token timer
287 // wValue = 1, enable (default)
288 // wValue = 0, disable
289

--- 6 unchanged lines hidden (view full) ---

296//
297// This descriptor is only returned by Edgeport-compatible devices
298// supporting the EPiC spec. True ION devices do not return this
299// descriptor, but instead return STALL on receipt of the
300// GET_EPIC_DESC command. The driver interprets a STALL to mean that
301// this is a "real" Edgeport.
302//
303
282#define USB_REQUEST_ION_RECV_IOSP 11 // Receive an IOSP command from the edgeport over the control pipe
283
284
285#define USB_REQUEST_ION_DIS_INT_TIMER 0x80 // Sent to Axiohm to enable/ disable
286 // interrupt token timer
287 // wValue = 1, enable (default)
288 // wValue = 0, disable
289

--- 6 unchanged lines hidden (view full) ---

296//
297// This descriptor is only returned by Edgeport-compatible devices
298// supporting the EPiC spec. True ION devices do not return this
299// descriptor, but instead return STALL on receipt of the
300// GET_EPIC_DESC command. The driver interprets a STALL to mean that
301// this is a "real" Edgeport.
302//
303
304struct edge_compatibility_bits
305{
304struct edge_compatibility_bits {
306 // This __u32 defines which Vendor-specific commands/functionality
307 // the device supports on the default EP0 pipe.
308
309 __u32 VendEnableSuspend : 1; // 0001 Set if device supports ION_ENABLE_SUSPEND
310 __u32 VendUnused : 31; // Available for future expansion, must be 0
311
312 // This __u32 defines which IOSP commands are supported over the
313 // bulk pipe EP1.

--- 15 unchanged lines hidden (view full) ---

329 __u32 IOSPTxPurge : 1; // 2000 Purge TXBuffer and/or Fifo in Edgeport hardware
330 __u32 IOSPUnused : 18; // Available for future expansion, must be 0
331
332 // This __u32 defines which 'general' features are supported
333
334 __u32 TrueEdgeport : 1; // 0001 Set if device is a 'real' Edgeport
335 // (Used only by driver, NEVER set by an EPiC device)
336 __u32 GenUnused : 31; // Available for future expansion, must be 0
305 // This __u32 defines which Vendor-specific commands/functionality
306 // the device supports on the default EP0 pipe.
307
308 __u32 VendEnableSuspend : 1; // 0001 Set if device supports ION_ENABLE_SUSPEND
309 __u32 VendUnused : 31; // Available for future expansion, must be 0
310
311 // This __u32 defines which IOSP commands are supported over the
312 // bulk pipe EP1.

--- 15 unchanged lines hidden (view full) ---

328 __u32 IOSPTxPurge : 1; // 2000 Purge TXBuffer and/or Fifo in Edgeport hardware
329 __u32 IOSPUnused : 18; // Available for future expansion, must be 0
330
331 // This __u32 defines which 'general' features are supported
332
333 __u32 TrueEdgeport : 1; // 0001 Set if device is a 'real' Edgeport
334 // (Used only by driver, NEVER set by an EPiC device)
335 __u32 GenUnused : 31; // Available for future expansion, must be 0
337
338};
339
340#define EDGE_COMPATIBILITY_MASK0 0x0001
341#define EDGE_COMPATIBILITY_MASK1 0x3FFF
342#define EDGE_COMPATIBILITY_MASK2 0x0001
343
336};
337
338#define EDGE_COMPATIBILITY_MASK0 0x0001
339#define EDGE_COMPATIBILITY_MASK1 0x3FFF
340#define EDGE_COMPATIBILITY_MASK2 0x0001
341
344struct edge_compatibility_descriptor
345{
342struct edge_compatibility_descriptor {
346 __u8 Length; // Descriptor Length (per USB spec)
347 __u8 DescType; // Descriptor Type (per USB spec, =DEVICE type)
348 __u8 EpicVer; // Version of EPiC spec supported
343 __u8 Length; // Descriptor Length (per USB spec)
344 __u8 DescType; // Descriptor Type (per USB spec, =DEVICE type)
345 __u8 EpicVer; // Version of EPiC spec supported
349 // (Currently must be 1)
346 // (Currently must be 1)
350 __u8 NumPorts; // Number of serial ports supported
351 __u8 iDownloadFile; // Index of string containing download code filename
347 __u8 NumPorts; // Number of serial ports supported
348 __u8 iDownloadFile; // Index of string containing download code filename
352 // 0=no download, FF=download compiled into driver.
353 __u8 Unused[ 3 ]; // Available for future expansion, must be 0
354 // (Currently must be 0).
349 // 0=no download, FF=download compiled into driver.
350 __u8 Unused[3]; // Available for future expansion, must be 0
351 // (Currently must be 0).
355 __u8 MajorVersion; // Firmware version: xx.
356 __u8 MinorVersion; // yy.
357 __le16 BuildNumber; // zzzz (LE format)
358
359 // The following structure contains __u32s, with each bit
360 // specifying whether the EPiC device supports the given
361 // command or functionality.
352 __u8 MajorVersion; // Firmware version: xx.
353 __u8 MinorVersion; // yy.
354 __le16 BuildNumber; // zzzz (LE format)
355
356 // The following structure contains __u32s, with each bit
357 // specifying whether the EPiC device supports the given
358 // command or functionality.
362
363 struct edge_compatibility_bits Supports;
359 struct edge_compatibility_bits Supports;
364
365};
366
367// Values for iDownloadFile
368#define EDGE_DOWNLOAD_FILE_NONE 0 // No download requested
369#define EDGE_DOWNLOAD_FILE_INTERNAL 0xFF // Download the file compiled into driver (930 version)
370#define EDGE_DOWNLOAD_FILE_I930 0xFF // Download the file compiled into driver (930 version)
371#define EDGE_DOWNLOAD_FILE_80251 0xFE // Download the file compiled into driver (80251 version)
372

--- 13 unchanged lines hidden (view full) ---

386#define EDGE_MANUF_DESC_LEN sizeof(struct edge_manuf_descriptor)
387
388// Boot params descriptor
389#define EDGE_BOOT_DESC_ADDR 0x00FF7FC0
390#define EDGE_BOOT_DESC_LEN sizeof(struct edge_boot_descriptor)
391
392// Define the max block size that may be read or written
393// in a read/write RAM/ROM command.
360};
361
362// Values for iDownloadFile
363#define EDGE_DOWNLOAD_FILE_NONE 0 // No download requested
364#define EDGE_DOWNLOAD_FILE_INTERNAL 0xFF // Download the file compiled into driver (930 version)
365#define EDGE_DOWNLOAD_FILE_I930 0xFF // Download the file compiled into driver (930 version)
366#define EDGE_DOWNLOAD_FILE_80251 0xFE // Download the file compiled into driver (80251 version)
367

--- 13 unchanged lines hidden (view full) ---

381#define EDGE_MANUF_DESC_LEN sizeof(struct edge_manuf_descriptor)
382
383// Boot params descriptor
384#define EDGE_BOOT_DESC_ADDR 0x00FF7FC0
385#define EDGE_BOOT_DESC_LEN sizeof(struct edge_boot_descriptor)
386
387// Define the max block size that may be read or written
388// in a read/write RAM/ROM command.
394#define MAX_SIZE_REQ_ION_READ_MEM ( (__u16) 64 )
395#define MAX_SIZE_REQ_ION_WRITE_MEM ( (__u16) 64 )
389#define MAX_SIZE_REQ_ION_READ_MEM ((__u16)64)
390#define MAX_SIZE_REQ_ION_WRITE_MEM ((__u16)64)
396
397
398//
399// Notes for the following two ION vendor-specific param descriptors:
400//
401// 1. These have a standard USB descriptor header so they look like a
402// normal descriptor.
403// 2. Any strings in the structures are in USB-defined string

--- 136 unchanged lines hidden (view full) ---

540 __u8 Reserved1; // C3 -- unused, set to 0 --
541
542 __le16 BootCodeLength; // C4 Boot code goes from FF:0000 to FF:(len-1)
543 // (LE format)
544
545 __u8 MajorVersion; // C6 Firmware version: xx.
546 __u8 MinorVersion; // C7 yy.
547 __le16 BuildNumber; // C8 zzzz (LE format)
391
392
393//
394// Notes for the following two ION vendor-specific param descriptors:
395//
396// 1. These have a standard USB descriptor header so they look like a
397// normal descriptor.
398// 2. Any strings in the structures are in USB-defined string

--- 136 unchanged lines hidden (view full) ---

535 __u8 Reserved1; // C3 -- unused, set to 0 --
536
537 __le16 BootCodeLength; // C4 Boot code goes from FF:0000 to FF:(len-1)
538 // (LE format)
539
540 __u8 MajorVersion; // C6 Firmware version: xx.
541 __u8 MinorVersion; // C7 yy.
542 __le16 BuildNumber; // C8 zzzz (LE format)
548
543
549 __u16 EnumRootDescTable; // CA Root of ROM-based descriptor table
550 __u8 NumDescTypes; // CC Number of supported descriptor types
551
552 __u8 Reserved4; // CD Fix Compiler Packing
553
554 __le16 Capabilities; // CE-CF Capabilities flags (LE format)
555 __u8 Reserved2[0x28]; // D0 -- unused, set to 0 --
556 __u8 UConfig0; // F8 930-defined CPU configuration byte 0

--- 35 unchanged lines hidden (view full) ---

592#define I2C_DESC_TYPE_WATCHPORT_CALIBRATION_DATA 0x16 // Watchport Calibration Data
593
594#define I2C_DESC_TYPE_FIRMWARE_BLANK 0xf2
595
596// Special section defined by ION
597#define I2C_DESC_TYPE_ION 0 // Not defined by TI
598
599
544 __u16 EnumRootDescTable; // CA Root of ROM-based descriptor table
545 __u8 NumDescTypes; // CC Number of supported descriptor types
546
547 __u8 Reserved4; // CD Fix Compiler Packing
548
549 __le16 Capabilities; // CE-CF Capabilities flags (LE format)
550 __u8 Reserved2[0x28]; // D0 -- unused, set to 0 --
551 __u8 UConfig0; // F8 930-defined CPU configuration byte 0

--- 35 unchanged lines hidden (view full) ---

587#define I2C_DESC_TYPE_WATCHPORT_CALIBRATION_DATA 0x16 // Watchport Calibration Data
588
589#define I2C_DESC_TYPE_FIRMWARE_BLANK 0xf2
590
591// Special section defined by ION
592#define I2C_DESC_TYPE_ION 0 // Not defined by TI
593
594
600struct ti_i2c_desc
601{
595struct ti_i2c_desc {
602 __u8 Type; // Type of descriptor
603 __u16 Size; // Size of data only not including header
604 __u8 CheckSum; // Checksum (8 bit sum of data only)
605 __u8 Data[0]; // Data starts here
596 __u8 Type; // Type of descriptor
597 __u16 Size; // Size of data only not including header
598 __u8 CheckSum; // Checksum (8 bit sum of data only)
599 __u8 Data[0]; // Data starts here
606}__attribute__((packed));
600} __attribute__((packed));
607
608// for 5152 devices only (type 2 record)
609// for 3410 the version is stored in the WATCHPORT_FIRMWARE_VERSION descriptor
601
602// for 5152 devices only (type 2 record)
603// for 3410 the version is stored in the WATCHPORT_FIRMWARE_VERSION descriptor
610struct ti_i2c_firmware_rec
611{
604struct ti_i2c_firmware_rec {
612 __u8 Ver_Major; // Firmware Major version number
613 __u8 Ver_Minor; // Firmware Minor version number
614 __u8 Data[0]; // Download starts here
605 __u8 Ver_Major; // Firmware Major version number
606 __u8 Ver_Minor; // Firmware Minor version number
607 __u8 Data[0]; // Download starts here
615}__attribute__((packed));
608} __attribute__((packed));
616
617
609
610
618struct watchport_firmware_version
619{
611struct watchport_firmware_version {
620// Added 2 bytes for version number
621 __u8 Version_Major; // Download Version (for Watchport)
622 __u8 Version_Minor;
612// Added 2 bytes for version number
613 __u8 Version_Major; // Download Version (for Watchport)
614 __u8 Version_Minor;
623}__attribute__((packed));
615} __attribute__((packed));
624
625
626// Structure of header of download image in fw_down.h
616
617
618// Structure of header of download image in fw_down.h
627struct ti_i2c_image_header
628{
619struct ti_i2c_image_header {
629 __le16 Length;
630 __u8 CheckSum;
620 __le16 Length;
621 __u8 CheckSum;
631}__attribute__((packed));
622} __attribute__((packed));
632
623
633struct ti_basic_descriptor
634{
624struct ti_basic_descriptor {
635 __u8 Power; // Self powered
636 // bit 7: 1 - power switching supported
637 // 0 - power switching not supported
638 //
639 // bit 0: 1 - self powered
640 // 0 - bus powered
641 //
642 //

--- 15 unchanged lines hidden (view full) ---

658
659
660#define TI_GET_CPU_REVISION(x) (__u8)((((x)>>4)&0x0f))
661#define TI_GET_BOARD_REVISION(x) (__u8)(((x)&0x0f))
662
663#define TI_I2C_SIZE_MASK 0x1f // 5 bits
664#define TI_GET_I2C_SIZE(x) ((((x) & TI_I2C_SIZE_MASK)+1)*256)
665
625 __u8 Power; // Self powered
626 // bit 7: 1 - power switching supported
627 // 0 - power switching not supported
628 //
629 // bit 0: 1 - self powered
630 // 0 - bus powered
631 //
632 //

--- 15 unchanged lines hidden (view full) ---

648
649
650#define TI_GET_CPU_REVISION(x) (__u8)((((x)>>4)&0x0f))
651#define TI_GET_BOARD_REVISION(x) (__u8)(((x)&0x0f))
652
653#define TI_I2C_SIZE_MASK 0x1f // 5 bits
654#define TI_GET_I2C_SIZE(x) ((((x) & TI_I2C_SIZE_MASK)+1)*256)
655
666#define TI_MAX_I2C_SIZE ( 16 * 1024 )
656#define TI_MAX_I2C_SIZE (16 * 1024)
667
657
668#define TI_MANUF_VERSION_0 0
658#define TI_MANUF_VERSION_0 0
669
670// IonConig2 flags
671#define TI_CONFIG2_RS232 0x01
672#define TI_CONFIG2_RS422 0x02
673#define TI_CONFIG2_RS485 0x04
674#define TI_CONFIG2_SWITCHABLE 0x08
675
676#define TI_CONFIG2_WATCHPORT 0x10
677
678
659
660// IonConig2 flags
661#define TI_CONFIG2_RS232 0x01
662#define TI_CONFIG2_RS422 0x02
663#define TI_CONFIG2_RS485 0x04
664#define TI_CONFIG2_SWITCHABLE 0x08
665
666#define TI_CONFIG2_WATCHPORT 0x10
667
668
679struct edge_ti_manuf_descriptor
680{
669struct edge_ti_manuf_descriptor {
681 __u8 IonConfig; // Config byte for ION manufacturing use
682 __u8 IonConfig2; // Expansion
683 __u8 Version; // Version
684 __u8 CpuRev_BoardRev; // CPU revision level (0xF0) and Board Rev Level (0x0F)
685 __u8 NumPorts; // Number of ports for this UMP
686 __u8 NumVirtualPorts; // Number of Virtual ports
687 __u8 HubConfig1; // Used to configure the Hub
688 __u8 HubConfig2; // Used to configure the Hub
689 __u8 TotalPorts; // Total Number of Com Ports for the entire device (All UMPs)
690 __u8 Reserved; // Reserved
670 __u8 IonConfig; // Config byte for ION manufacturing use
671 __u8 IonConfig2; // Expansion
672 __u8 Version; // Version
673 __u8 CpuRev_BoardRev; // CPU revision level (0xF0) and Board Rev Level (0x0F)
674 __u8 NumPorts; // Number of ports for this UMP
675 __u8 NumVirtualPorts; // Number of Virtual ports
676 __u8 HubConfig1; // Used to configure the Hub
677 __u8 HubConfig2; // Used to configure the Hub
678 __u8 TotalPorts; // Total Number of Com Ports for the entire device (All UMPs)
679 __u8 Reserved; // Reserved
691}__attribute__((packed));
680} __attribute__((packed));
692
693
694#endif // if !defined(_USBVEND_H)
681
682
683#endif // if !defined(_USBVEND_H)