| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
#if !defined(_USBVEND_H) |
| 16 |
#define _USBVEND_H |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
#define USB_VENDOR_ID_ION 0x1608 // Our VID |
| 29 |
#define USB_VENDOR_ID_TI 0x0451 // TI VID |
| 30 |
#define USB_VENDOR_ID_AXIOHM 0x05D9 |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
#define ION_OEM_ID_ION 0 // 00h Inside Out Networks |
| 42 |
#define ION_OEM_ID_NLYNX 1 // 01h NLynx Systems |
| 43 |
#define ION_OEM_ID_GENERIC 2 // 02h Generic OEM |
| 44 |
#define ION_OEM_ID_MAC 3 // 03h Mac Version |
| 45 |
#define ION_OEM_ID_MEGAWOLF 4 // 04h Lupusb OEM Mac version (MegaWolf) |
| 46 |
#define ION_OEM_ID_MULTITECH 5 // 05h Multitech Rapidports |
| 47 |
#define ION_OEM_ID_AGILENT 6 // 06h AGILENT board |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
#define ION_DEVICE_ID_80251_NETCHIP 0x020 // This bit is set in the PID if this edgeport hardware$ |
| 54 |
|
| 55 |
|
| 56 |
#define ION_DEVICE_ID_GENERATION_1 0x00 // Value for 930 based edgeports |
| 57 |
#define ION_DEVICE_ID_GENERATION_2 0x01 // Value for 80251+Netchip. |
| 58 |
#define ION_DEVICE_ID_GENERATION_3 0x02 // Value for Texas Instruments TUSB5052 chip |
| 59 |
#define ION_DEVICE_ID_GENERATION_4 0x03 // Watchport Family of products |
| 60 |
#define ION_GENERATION_MASK 0x03 |
| 61 |
|
| 62 |
#define ION_DEVICE_ID_HUB_MASK 0x0080 // This bit in the PID designates a HUB device |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
#define EDGEPORT_DEVICE_ID_MASK 0x0ff // Not including OEM or GENERATION fields |
| 67 |
|
| 68 |
#define ION_DEVICE_ID_UNCONFIGURED_EDGE_DEVICE 0x000 // In manufacturing only |
| 69 |
#define ION_DEVICE_ID_EDGEPORT_4 0x001 // Edgeport/4 RS232 |
| 70 |
#define ION_DEVICE_ID_EDGEPORT_8R 0x002 // Edgeport with RJ45 no Ring |
| 71 |
#define ION_DEVICE_ID_RAPIDPORT_4 0x003 // Rapidport/4 |
| 72 |
#define ION_DEVICE_ID_EDGEPORT_4T 0x004 // Edgeport/4 RS232 for Telxon (aka "Fleetport") |
| 73 |
#define ION_DEVICE_ID_EDGEPORT_2 0x005 // Edgeport/2 RS232 |
| 74 |
#define ION_DEVICE_ID_EDGEPORT_4I 0x006 // Edgeport/4 RS422 |
| 75 |
#define ION_DEVICE_ID_EDGEPORT_2I 0x007 // Edgeport/2 RS422/RS485 |
| 76 |
#define ION_DEVICE_ID_EDGEPORT_8RR 0x008 // Edgeport with RJ45 with Data and RTS/CTS only |
| 77 |
|
| 78 |
|
| 79 |
#define ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT 0x00B // Edgeport/(4)21 Parallel port (USS720) |
| 80 |
#define ION_DEVICE_ID_EDGEPORT_421 0x00C // Edgeport/421 Hub+RS232+Parallel |
| 81 |
#define ION_DEVICE_ID_EDGEPORT_21 0x00D // Edgeport/21 RS232+Parallel |
| 82 |
#define ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU 0x00E // Half of an Edgeport/8 (the kind with 2 EP/4s on 1 PCB) |
| 83 |
#define ION_DEVICE_ID_EDGEPORT_8 0x00F // Edgeport/8 (single-CPU) |
| 84 |
#define ION_DEVICE_ID_EDGEPORT_2_DIN 0x010 // Edgeport/2 RS232 with Apple DIN connector |
| 85 |
#define ION_DEVICE_ID_EDGEPORT_4_DIN 0x011 // Edgeport/4 RS232 with Apple DIN connector |
| 86 |
#define ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU 0x012 // Half of an Edgeport/16 (the kind with 2 EP/8s) |
| 87 |
#define ION_DEVICE_ID_EDGEPORT_COMPATIBLE 0x013 // Edgeport Compatible, for NCR, Axiohm etc. testing |
| 88 |
#define ION_DEVICE_ID_EDGEPORT_8I 0x014 // Edgeport/8 RS422 (single-CPU) |
| 89 |
#define ION_DEVICE_ID_EDGEPORT_1 0x015 // Edgeport/1 RS232 |
| 90 |
#define ION_DEVICE_ID_EPOS44 0x016 // Half of an EPOS/44 (TIUMP BASED) |
| 91 |
#define ION_DEVICE_ID_EDGEPORT_42 0x017 // Edgeport/42 |
| 92 |
#define ION_DEVICE_ID_EDGEPORT_412_8 0x018 // Edgeport/412 8 port part |
| 93 |
#define ION_DEVICE_ID_EDGEPORT_412_4 0x019 // Edgeport/412 4 port part |
| 94 |
#define ION_DEVICE_ID_EDGEPORT_22I 0x01A // Edgeport/22I is an Edgeport/4 with ports 1&2 RS422 and ports 3&4 RS232 |
| 95 |
|
| 96 |
|
| 97 |
#define ION_DEVICE_ID_EDGEPORT_2C 0x01B // Edgeport/2c is a TI based Edgeport/2 - Small I2c |
| 98 |
#define ION_DEVICE_ID_EDGEPORT_221C 0x01C // Edgeport/221c is a TI based Edgeport/2 with lucent chip and |
| 99 |
|
| 100 |
#define ION_DEVICE_ID_EDGEPORT_22C 0x01D // Edgeport/22c is a TI based Edgeport/2 with |
| 101 |
|
| 102 |
#define ION_DEVICE_ID_EDGEPORT_21C 0x01E // Edgeport/21c is a TI based Edgeport/2 with lucent chip |
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
#define ION_DEVICE_ID_TI3410_EDGEPORT_1 0x040 // Edgeport/1 RS232 |
| 115 |
#define ION_DEVICE_ID_TI3410_EDGEPORT_1I 0x041 // Edgeport/1i- RS422 model |
| 116 |
|
| 117 |
|
| 118 |
#define ION_DEVICE_ID_EDGEPORT_4S 0x042 // Edgeport/4s - software switchable model |
| 119 |
#define ION_DEVICE_ID_EDGEPORT_8S 0x043 // Edgeport/8s - software switchable model |
| 120 |
|
| 121 |
|
| 122 |
#define ION_DEVICE_ID_EDGEPORT_E 0x0E0 // Edgeport/E Usb to Ethernet |
| 123 |
|
| 124 |
|
| 125 |
#define ION_DEVICE_ID_TI_EDGEPORT_4 0x0201 // Edgeport/4 RS232 |
| 126 |
#define ION_DEVICE_ID_TI_EDGEPORT_2 0x0205 // Edgeport/2 RS232 |
| 127 |
#define ION_DEVICE_ID_TI_EDGEPORT_4I 0x0206 // Edgeport/4i RS422 |
| 128 |
#define ION_DEVICE_ID_TI_EDGEPORT_2I 0x0207 // Edgeport/2i RS422/RS485 |
| 129 |
#define ION_DEVICE_ID_TI_EDGEPORT_421 0x020C // Edgeport/421 4 hub 2 RS232 + Parallel (lucent on a different hub port) |
| 130 |
#define ION_DEVICE_ID_TI_EDGEPORT_21 0x020D // Edgeport/21 2 RS232 + Parallel (lucent on a different hub port) |
| 131 |
#define ION_DEVICE_ID_TI_EDGEPORT_416 0x0212 // Edgeport/416 |
| 132 |
#define ION_DEVICE_ID_TI_EDGEPORT_1 0x0215 // Edgeport/1 RS232 |
| 133 |
#define ION_DEVICE_ID_TI_EDGEPORT_42 0x0217 // Edgeport/42 4 hub 2 RS232 |
| 134 |
#define ION_DEVICE_ID_TI_EDGEPORT_22I 0x021A // Edgeport/22I is an Edgeport/4 with ports 1&2 RS422 and ports 3&4 RS232 |
| 135 |
#define ION_DEVICE_ID_TI_EDGEPORT_2C 0x021B // Edgeport/2c RS232 |
| 136 |
#define ION_DEVICE_ID_TI_EDGEPORT_221C 0x021C // Edgeport/221c is a TI based Edgeport/2 with lucent chip and |
| 137 |
|
| 138 |
#define ION_DEVICE_ID_TI_EDGEPORT_22C 0x021D // Edgeport/22c is a TI based Edgeport/2 with |
| 139 |
|
| 140 |
#define ION_DEVICE_ID_TI_EDGEPORT_21C 0x021E // Edgeport/21c is a TI based Edgeport/2 with lucent chip |
| 141 |
|
| 142 |
|
| 143 |
#define ION_DEVICE_ID_TI_TI3410_EDGEPORT_1 0x0240 // Edgeport/1 RS232 |
| 144 |
#define ION_DEVICE_ID_TI_TI3410_EDGEPORT_1I 0x0241 // Edgeport/1i- RS422 model |
| 145 |
|
| 146 |
|
| 147 |
#define ION_DEVICE_ID_TI_EDGEPORT_4S 0x0242 // Edgeport/4s - software switchable model |
| 148 |
#define ION_DEVICE_ID_TI_EDGEPORT_8S 0x0243 // Edgeport/8s - software switchable model |
| 149 |
#define ION_DEVICE_ID_TI_EDGEPORT_8 0x0244 // Edgeport/8 (single-CPU) |
| 150 |
#define ION_DEVICE_ID_TI_EDGEPORT_416B 0x0247 // Edgeport/416 |
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
#define ION_DEVICE_ID_WP_UNSERIALIZED 0x300 // Watchport based on 3410 both 1-wire and binary products |
| 161 |
#define ION_DEVICE_ID_WP_PROXIMITY 0x301 // Watchport/P Discontinued |
| 162 |
#define ION_DEVICE_ID_WP_MOTION 0x302 // Watchport/M |
| 163 |
#define ION_DEVICE_ID_WP_MOISTURE 0x303 // Watchport/W |
| 164 |
#define ION_DEVICE_ID_WP_TEMPERATURE 0x304 // Watchport/T |
| 165 |
#define ION_DEVICE_ID_WP_HUMIDITY 0x305 // Watchport/H |
| 166 |
|
| 167 |
#define ION_DEVICE_ID_WP_POWER 0x306 // Watchport |
| 168 |
#define ION_DEVICE_ID_WP_LIGHT 0x307 // Watchport |
| 169 |
#define ION_DEVICE_ID_WP_RADIATION 0x308 // Watchport |
| 170 |
#define ION_DEVICE_ID_WP_ACCELERATION 0x309 // Watchport/A |
| 171 |
#define ION_DEVICE_ID_WP_DISTANCE 0x30A // Watchport/D Discontinued |
| 172 |
#define ION_DEVICE_ID_WP_PROX_DIST 0x30B // Watchport/D uses distance sensor |
| 173 |
|
| 174 |
|
| 175 |
#define ION_DEVICE_ID_PLUS_PWR_HP4CD 0x30C // 5052 Plus Power HubPort/4CD+ (for Dell) |
| 176 |
#define ION_DEVICE_ID_PLUS_PWR_HP4C 0x30D // 5052 Plus Power HubPort/4C+ |
| 177 |
#define ION_DEVICE_ID_PLUS_PWR_PCI 0x30E // 3410 Plus Power PCI Host Controller 4 port |
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
#define USB_VENDOR_ID_AXIOHM 0x05D9 // Axiohm VID |
| 184 |
|
| 185 |
#define AXIOHM_DEVICE_ID_MASK 0xffff |
| 186 |
#define AXIOHM_DEVICE_ID_EPIC_A758 0xA758 |
| 187 |
#define AXIOHM_DEVICE_ID_EPIC_A794 0xA794 |
| 188 |
#define AXIOHM_DEVICE_ID_EPIC_A225 0xA225 |
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
#define USB_VENDOR_ID_NCR 0x0404 // NCR VID |
| 195 |
|
| 196 |
#define NCR_DEVICE_ID_MASK 0xffff |
| 197 |
#define NCR_DEVICE_ID_EPIC_0202 0x0202 |
| 198 |
#define NCR_DEVICE_ID_EPIC_0203 0x0203 |
| 199 |
#define NCR_DEVICE_ID_EPIC_0310 0x0310 |
| 200 |
#define NCR_DEVICE_ID_EPIC_0311 0x0311 |
| 201 |
#define NCR_DEVICE_ID_EPIC_0312 0x0312 |
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
#define USB_VENDOR_ID_SYMBOL 0x05E0 // Symbol VID |
| 208 |
#define SYMBOL_DEVICE_ID_MASK 0xffff |
| 209 |
#define SYMBOL_DEVICE_ID_KEYFOB 0x0700 |
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
#define ION_DEVICE_ID_BLACKBOX_IC135A 0x0801 // OEM device (rebranded Edgeport/4) |
| 215 |
#define ION_DEVICE_ID_MT4X56USB 0x1403 // OEM device |
| 216 |
#define ION_DEVICE_ID_E5805A 0x1A01 // OEM device (rebranded Edgeport/4) |
| 217 |
|
| 218 |
|
| 219 |
#define GENERATION_ID_FROM_USB_PRODUCT_ID(ProductId) \ |
| 220 |
((__u16) ((ProductId >> 8) & (ION_GENERATION_MASK))) |
| 221 |
|
| 222 |
#define MAKE_USB_PRODUCT_ID(OemId, DeviceId) \ |
| 223 |
((__u16) (((OemId) << 10) || (DeviceId))) |
| 224 |
|
| 225 |
#define DEVICE_ID_FROM_USB_PRODUCT_ID(ProductId) \ |
| 226 |
((__u16) ((ProductId) & (EDGEPORT_DEVICE_ID_MASK))) |
| 227 |
|
| 228 |
#define OEM_ID_FROM_USB_PRODUCT_ID(ProductId) \ |
| 229 |
((__u16) (((ProductId) >> 10) & 0x3F)) |
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
#define EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(InitialCredit, MaxPacketSize) (max(((InitialCredit) / 4), (MaxPacketSize))) |
| 240 |
|
| 241 |
#define EDGE_FW_BULK_MAX_PACKET_SIZE 64 // Max Packet Size for Bulk In Endpoint (EP1) |
| 242 |
#define EDGE_FW_BULK_READ_BUFFER_SIZE 1024 // Size to use for Bulk reads |
| 243 |
|
| 244 |
#define EDGE_FW_INT_MAX_PACKET_SIZE 32 // Max Packet Size for Interrupt In Endpoint |
| 245 |
|
| 246 |
|
| 247 |
#define EDGE_FW_INT_INTERVAL 2 // 2ms polling on IntPipe |
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
#define USB_REQUEST_ION_RESET_DEVICE 0 // Warm reboot Edgeport, retaining USB address |
| 268 |
#define USB_REQUEST_ION_GET_EPIC_DESC 1 // Get Edgeport Compatibility Descriptor |
| 269 |
|
| 270 |
#define USB_REQUEST_ION_READ_RAM 3 // Read EdgePort RAM at specified addr |
| 271 |
#define USB_REQUEST_ION_WRITE_RAM 4 // Write EdgePort RAM at specified addr |
| 272 |
#define USB_REQUEST_ION_READ_ROM 5 // Read EdgePort ROM at specified addr |
| 273 |
#define USB_REQUEST_ION_WRITE_ROM 6 // Write EdgePort ROM at specified addr |
| 274 |
#define USB_REQUEST_ION_EXEC_DL_CODE 7 // Begin execution of RAM-based download |
| 275 |
|
| 276 |
|
| 277 |
#define USB_REQUEST_ION_ENABLE_SUSPEND 9 // Enable/Disable suspend feature |
| 278 |
|
| 279 |
|
| 280 |
#define USB_REQUEST_ION_SEND_IOSP 10 // Send an IOSP command to the edgeport over the control pipe |
| 281 |
#define USB_REQUEST_ION_RECV_IOSP 11 // Receive an IOSP command from the edgeport over the control pipe |
| 282 |
|
| 283 |
|
| 284 |
#define USB_REQUEST_ION_DIS_INT_TIMER 0x80 // Sent to Axiohm to enable/ disable |
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
struct edge_compatibility_bits { |
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
__u32 VendEnableSuspend : 1; |
| 308 |
__u32 VendUnused : 31; |
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
__u32 IOSPOpen : 1; |
| 315 |
__u32 IOSPClose : 1; |
| 316 |
__u32 IOSPChase : 1; |
| 317 |
__u32 IOSPSetRxFlow : 1; |
| 318 |
__u32 IOSPSetTxFlow : 1; |
| 319 |
__u32 IOSPSetXChar : 1; |
| 320 |
__u32 IOSPRxCheck : 1; |
| 321 |
__u32 IOSPSetClrBreak : 1; |
| 322 |
__u32 IOSPWriteMCR : 1; |
| 323 |
__u32 IOSPWriteLCR : 1; |
| 324 |
__u32 IOSPSetBaudRate : 1; |
| 325 |
__u32 IOSPDisableIntPipe : 1; |
| 326 |
__u32 IOSPRxDataAvail : 1; |
| 327 |
__u32 IOSPTxPurge : 1; |
| 328 |
__u32 IOSPUnused : 18; |
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
__u32 TrueEdgeport : 1; |
| 333 |
|
| 334 |
__u32 GenUnused : 31; |
| 335 |
}; |
| 336 |
|
| 337 |
#define EDGE_COMPATIBILITY_MASK0 0x0001 |
| 338 |
#define EDGE_COMPATIBILITY_MASK1 0x3FFF |
| 339 |
#define EDGE_COMPATIBILITY_MASK2 0x0001 |
| 340 |
|
| 341 |
struct edge_compatibility_descriptor { |
| 342 |
__u8 Length; |
| 343 |
__u8 DescType; |
| 344 |
__u8 EpicVer; |
| 345 |
|
| 346 |
__u8 NumPorts; |
| 347 |
__u8 iDownloadFile; |
| 348 |
|
| 349 |
__u8 Unused[3]; |
| 350 |
|
| 351 |
__u8 MajorVersion; |
| 352 |
__u8 MinorVersion; |
| 353 |
__le16 BuildNumber; |
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
struct edge_compatibility_bits Supports; |
| 359 |
}; |
| 360 |
|
| 361 |
|
| 362 |
#define EDGE_DOWNLOAD_FILE_NONE 0 // No download requested |
| 363 |
#define EDGE_DOWNLOAD_FILE_INTERNAL 0xFF // Download the file compiled into driver (930 version) |
| 364 |
#define EDGE_DOWNLOAD_FILE_I930 0xFF // Download the file compiled into driver (930 version) |
| 365 |
#define EDGE_DOWNLOAD_FILE_80251 0xFE // Download the file compiled into driver (80251 version) |
| 366 |
|
| 367 |
|
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
#define EDGE_MANUF_DESC_ADDR_V1 0x00FF7F00 |
| 375 |
#define EDGE_MANUF_DESC_LEN_V1 sizeof(EDGE_MANUF_DESCRIPTOR_V1) |
| 376 |
|
| 377 |
|
| 378 |
|
| 379 |
#define EDGE_MANUF_DESC_ADDR 0x00FF7C00 |
| 380 |
#define EDGE_MANUF_DESC_LEN sizeof(struct edge_manuf_descriptor) |
| 381 |
|
| 382 |
|
| 383 |
#define EDGE_BOOT_DESC_ADDR 0x00FF7FC0 |
| 384 |
#define EDGE_BOOT_DESC_LEN sizeof(struct edge_boot_descriptor) |
| 385 |
|
| 386 |
|
| 387 |
|
| 388 |
#define MAX_SIZE_REQ_ION_READ_MEM ((__u16)64) |
| 389 |
#define MAX_SIZE_REQ_ION_WRITE_MEM ((__u16)64) |
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
|
| 396 |
|
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
|
| 404 |
|
| 405 |
|
| 406 |
|
| 407 |
|
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
|
| 412 |
|
| 413 |
|
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
#define MAX_SERIALNUMBER_LEN 12 |
| 423 |
#define MAX_ASSEMBLYNUMBER_LEN 14 |
| 424 |
|
| 425 |
struct edge_manuf_descriptor { |
| 426 |
|
| 427 |
__u16 RootDescTable[0x10]; |
| 428 |
__u8 DescriptorArea[0x2E0]; |
| 429 |
|
| 430 |
|
| 431 |
__u8 Length; |
| 432 |
__u8 DescType; |
| 433 |
__u8 DescVer; |
| 434 |
__u8 NumRootDescEntries; |
| 435 |
|
| 436 |
__u8 RomSize; |
| 437 |
__u8 RamSize; |
| 438 |
__u8 CpuRev; |
| 439 |
__u8 BoardRev; |
| 440 |
|
| 441 |
__u8 NumPorts; |
| 442 |
__u8 DescDate[3]; |
| 443 |
|
| 444 |
|
| 445 |
__u8 SerNumLength; |
| 446 |
__u8 SerNumDescType; |
| 447 |
__le16 SerialNumber[MAX_SERIALNUMBER_LEN]; |
| 448 |
|
| 449 |
__u8 AssemblyNumLength; |
| 450 |
__u8 AssemblyNumDescType; |
| 451 |
__le16 AssemblyNumber[MAX_ASSEMBLYNUMBER_LEN]; |
| 452 |
|
| 453 |
__u8 OemAssyNumLength; |
| 454 |
__u8 OemAssyNumDescType; |
| 455 |
__le16 OemAssyNumber[MAX_ASSEMBLYNUMBER_LEN]; |
| 456 |
|
| 457 |
__u8 ManufDateLength; |
| 458 |
__u8 ManufDateDescType; |
| 459 |
__le16 ManufDate[6]; |
| 460 |
|
| 461 |
__u8 Reserved3[0x4D]; |
| 462 |
|
| 463 |
__u8 UartType; |
| 464 |
__u8 IonPid; |
| 465 |
|
| 466 |
|
| 467 |
__u8 IonConfig; |
| 468 |
|
| 469 |
|
| 470 |
}; |
| 471 |
|
| 472 |
|
| 473 |
#define MANUF_DESC_VER_1 1 // Original definition of MANUF_DESC |
| 474 |
#define MANUF_DESC_VER_2 2 // Ver 2, starts at xC00h len 3C0h |
| 475 |
|
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
#define MANUF_UART_EXAR_654_EARLY 0 // Exar 16C654 in Edgeport/4s before 11/98 |
| 482 |
#define MANUF_UART_EXAR_654 1 // Exar 16C654 |
| 483 |
#define MANUF_UART_EXAR_2852 2 // Exar 16C2852 |
| 484 |
|
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
|
| 490 |
|
| 491 |
|
| 492 |
|
| 493 |
|
| 494 |
#define MANUF_CPU_REV_AD4 1 // 930 AD4, with EP1 Rx bug (needs RXSPM) |
| 495 |
#define MANUF_CPU_REV_AD5 2 // 930 AD5, with above bug (supposedly) fixed |
| 496 |
#define MANUF_CPU_80251 0x20 // Intel 80251 |
| 497 |
|
| 498 |
|
| 499 |
#define MANUF_BOARD_REV_A 1 // Original version, == Manuf Rev A |
| 500 |
#define MANUF_BOARD_REV_B 2 // Manuf Rev B, wakeup interrupt works |
| 501 |
#define MANUF_BOARD_REV_C 3 // Manuf Rev C, 2/4 ports, rs232/rs422 |
| 502 |
#define MANUF_BOARD_REV_GENERATION_2 0x20 // Second generaiton edgeport |
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
|
| 507 |
#define MANUF_CPU_REV_1 1 // C251TB Rev 1 (Need actual Intel rev here) |
| 508 |
|
| 509 |
#define MANUF_BOARD_REV_A 1 // First rev of 251+Netchip design |
| 510 |
|
| 511 |
#define MANUF_SERNUM_LENGTH sizeof(((struct edge_manuf_descriptor *)0)->SerialNumber) |
| 512 |
#define MANUF_ASSYNUM_LENGTH sizeof(((struct edge_manuf_descriptor *)0)->AssemblyNumber) |
| 513 |
#define MANUF_OEMASSYNUM_LENGTH sizeof(((struct edge_manuf_descriptor *)0)->OemAssyNumber) |
| 514 |
#define MANUF_MANUFDATE_LENGTH sizeof(((struct edge_manuf_descriptor *)0)->ManufDate) |
| 515 |
|
| 516 |
#define MANUF_ION_CONFIG_DIAG_NO_LOOP 0x20 // As below but no ext loopback test |
| 517 |
#define MANUF_ION_CONFIG_DIAG 0x40 // 930 based device: 1=Run h/w diags, 0=norm |
| 518 |
|
| 519 |
#define MANUF_ION_CONFIG_MASTER 0x80 // 930 based device: 1=Master mode, 0=Normal |
| 520 |
|
| 521 |
|
| 522 |
|
| 523 |
|
| 524 |
|
| 525 |
|
| 526 |
|
| 527 |
|
| 528 |
|
| 529 |
|
| 530 |
struct edge_boot_descriptor { |
| 531 |
__u8 Length; |
| 532 |
__u8 DescType; |
| 533 |
__u8 DescVer; |
| 534 |
__u8 Reserved1; |
| 535 |
|
| 536 |
__le16 BootCodeLength; |
| 537 |
|
| 538 |
|
| 539 |
__u8 MajorVersion; |
| 540 |
__u8 MinorVersion; |
| 541 |
__le16 BuildNumber; |
| 542 |
|
| 543 |
__u16 EnumRootDescTable; |
| 544 |
__u8 NumDescTypes; |
| 545 |
|
| 546 |
__u8 Reserved4; |
| 547 |
|
| 548 |
__le16 Capabilities; |
| 549 |
__u8 Reserved2[0x28]; |
| 550 |
__u8 UConfig0; |
| 551 |
__u8 UConfig1; |
| 552 |
__u8 Reserved3[6]; |
| 553 |
|
| 554 |
}; |
| 555 |
|
| 556 |
|
| 557 |
#define BOOT_DESC_VER_1 1 // Original definition of BOOT_PARAMS |
| 558 |
#define BOOT_DESC_VER_2 2 // 2nd definition, descriptors not included in boot |
| 559 |
|
| 560 |
|
| 561 |
|
| 562 |
|
| 563 |
#define BOOT_CAP_RESET_CMD 0x0001 // If set, boot correctly supports ION_RESET_DEVICE |
| 564 |
|
| 565 |
|
| 566 |
|
| 567 |
|
| 568 |
|
| 569 |
|
| 570 |
|
| 571 |
#define UMP5152 0x52 |
| 572 |
#define UMP3410 0x10 |
| 573 |
|
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
|
| 578 |
#define I2C_DESC_TYPE_INFO_BASIC 0x01 |
| 579 |
#define I2C_DESC_TYPE_FIRMWARE_BASIC 0x02 |
| 580 |
#define I2C_DESC_TYPE_DEVICE 0x03 |
| 581 |
#define I2C_DESC_TYPE_CONFIG 0x04 |
| 582 |
#define I2C_DESC_TYPE_STRING 0x05 |
| 583 |
#define I2C_DESC_TYPE_FIRMWARE_AUTO 0x07 // for 3410 download |
| 584 |
#define I2C_DESC_TYPE_CONFIG_KLUDGE 0x14 // for 3410 |
| 585 |
#define I2C_DESC_TYPE_WATCHPORT_VERSION 0x15 // firmware version number for watchport |
| 586 |
#define I2C_DESC_TYPE_WATCHPORT_CALIBRATION_DATA 0x16 // Watchport Calibration Data |
| 587 |
|
| 588 |
#define I2C_DESC_TYPE_FIRMWARE_BLANK 0xf2 |
| 589 |
|
| 590 |
|
| 591 |
#define I2C_DESC_TYPE_ION 0 // Not defined by TI |
| 592 |
|
| 593 |
|
| 594 |
struct ti_i2c_desc { |
| 595 |
__u8 Type; |
| 596 |
__le16 Size; |
| 597 |
__u8 CheckSum; |
| 598 |
__u8 Data[]; |
| 599 |
} __attribute__((packed)); |
| 600 |
|
| 601 |
|
| 602 |
|
| 603 |
struct ti_i2c_firmware_rec { |
| 604 |
__u8 Ver_Major; |
| 605 |
__u8 Ver_Minor; |
| 606 |
__u8 Data[]; |
| 607 |
} __attribute__((packed)); |
| 608 |
|
| 609 |
|
| 610 |
struct watchport_firmware_version { |
| 611 |
|
| 612 |
__u8 Version_Major; |
| 613 |
__u8 Version_Minor; |
| 614 |
} __attribute__((packed)); |
| 615 |
|
| 616 |
|
| 617 |
|
| 618 |
struct ti_i2c_image_header { |
| 619 |
__le16 Length; |
| 620 |
__u8 CheckSum; |
| 621 |
} __attribute__((packed)); |
| 622 |
|
| 623 |
struct ti_basic_descriptor { |
| 624 |
__u8 Power; |
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
|
| 630 |
|
| 631 |
|
| 632 |
__u16 HubVid; |
| 633 |
__u16 HubPid; |
| 634 |
__u16 DevPid; |
| 635 |
__u8 HubTime; |
| 636 |
__u8 HubCurrent; |
| 637 |
} __attribute__((packed)); |
| 638 |
|
| 639 |
|
| 640 |
|
| 641 |
#define TI_CPU_REV_5052 2 // 5052 based edgeports |
| 642 |
#define TI_CPU_REV_3410 3 // 3410 based edgeports |
| 643 |
|
| 644 |
#define TI_BOARD_REV_TI_EP 0 // Basic ti based edgeport |
| 645 |
#define TI_BOARD_REV_COMPACT 1 // Compact board |
| 646 |
#define TI_BOARD_REV_WATCHPORT 2 // Watchport |
| 647 |
|
| 648 |
|
| 649 |
#define TI_GET_CPU_REVISION(x) (__u8)((((x)>>4)&0x0f)) |
| 650 |
#define TI_GET_BOARD_REVISION(x) (__u8)(((x)&0x0f)) |
| 651 |
|
| 652 |
#define TI_I2C_SIZE_MASK 0x1f // 5 bits |
| 653 |
#define TI_GET_I2C_SIZE(x) ((((x) & TI_I2C_SIZE_MASK)+1)*256) |
| 654 |
|
| 655 |
#define TI_MAX_I2C_SIZE (16 * 1024) |
| 656 |
|
| 657 |
#define TI_MANUF_VERSION_0 0 |
| 658 |
|
| 659 |
|
| 660 |
#define TI_CONFIG2_RS232 0x01 |
| 661 |
#define TI_CONFIG2_RS422 0x02 |
| 662 |
#define TI_CONFIG2_RS485 0x04 |
| 663 |
#define TI_CONFIG2_SWITCHABLE 0x08 |
| 664 |
|
| 665 |
#define TI_CONFIG2_WATCHPORT 0x10 |
| 666 |
|
| 667 |
|
| 668 |
struct edge_ti_manuf_descriptor { |
| 669 |
__u8 IonConfig; |
| 670 |
__u8 IonConfig2; |
| 671 |
__u8 Version; |
| 672 |
__u8 CpuRev_BoardRev; |
| 673 |
__u8 NumPorts; |
| 674 |
__u8 NumVirtualPorts; |
| 675 |
__u8 HubConfig1; |
| 676 |
__u8 HubConfig2; |
| 677 |
__u8 TotalPorts; |
| 678 |
__u8 Reserved; |
| 679 |
} __attribute__((packed)); |
| 680 |
|
| 681 |
|
| 682 |
#endif |