Greg Kroah-Hartman | 8b99514 | 2014-09-08 19:34:30 -0700 | [diff] [blame] | 1 | /* ES1 AP Bridge Chip USB descriptor definitions */ |
Greg Kroah-Hartman | d6e0e1c | 2014-09-06 13:13:13 -0700 | [diff] [blame] | 2 | |
| 3 | static const u8 es1_dev_descriptor[] = { |
| 4 | 0x12, /* __u8 bLength */ |
| 5 | 0x01, /* __u8 bDescriptorType; Device */ |
| 6 | 0x00, 0x02 /* __le16 bcdUSB v2.0 */ |
| 7 | 0x00, /* __u8 bDeviceClass */ |
| 8 | 0x00, /* __u8 bDeviceClass */ |
| 9 | 0x00, /* __u8 bDeviceSubClass; */ |
| 10 | 0x00, /* __u8 bDeviceProtocol; */ |
| 11 | 0x40, /* __u8 bMaxPacketSize0; 2^64 = 512 Bytes */ |
| 12 | |
| 13 | 0xff, 0xff, /* __le16 idVendor; 0xffff made up for now */ |
| 14 | 0x01, 0x00, /* __le16 idProduct; 0x0001 made up for now */ |
| 15 | 0x01, 0x00, /* __le16 bcdDevice; ES1 */ |
| 16 | |
| 17 | 0x03, /* __u8 iManufacturer; */ |
| 18 | 0x02, /* __u8 iProduct; */ |
| 19 | 0x01, /* __u8 iSerialNumber; */ |
| 20 | 0x01 /* __u8 bNumConfigurations; */ |
| 21 | }; |
| 22 | |
| 23 | static const u8 es1_config_descriptor[] = { |
| 24 | /* one configuration */ |
| 25 | 0x09, /* __u8 bLength; */ |
| 26 | 0x02, /* __u8 bDescriptorType; Configuration */ |
| 27 | 0x19, 0x00, /* __le16 wTotalLength; */ |
| 28 | 0x01, /* __u8 bNumInterfaces; (1) */ |
| 29 | 0x01, /* __u8 bConfigurationValue; */ |
| 30 | 0x00, /* __u8 iConfiguration; */ |
| 31 | 0xc0, /* __u8 bmAttributes; |
| 32 | Bit 7: must be set, |
| 33 | 6: Self-powered, |
| 34 | 5: Remote wakeup, |
| 35 | 4..0: resvd */ |
| 36 | 0x00, /* __u8 MaxPower; */ |
| 37 | |
| 38 | /* one interface */ |
| 39 | 0x09, /* __u8 if_bLength; */ |
| 40 | 0x04, /* __u8 if_bDescriptorType; Interface */ |
| 41 | 0x00, /* __u8 if_bInterfaceNumber; */ |
| 42 | 0x00, /* __u8 if_bAlternateSetting; */ |
Greg Kroah-Hartman | 082570b | 2014-09-13 16:15:07 -0700 | [diff] [blame] | 43 | 0x03, /* __u8 if_bNumEndpoints; */ |
Greg Kroah-Hartman | d6e0e1c | 2014-09-06 13:13:13 -0700 | [diff] [blame] | 44 | 0xff, /* __u8 if_bInterfaceClass; Vendor-specific */ |
| 45 | 0xff, /* __u8 if_bInterfaceSubClass; Vendor-specific */ |
| 46 | 0xff, /* __u8 if_bInterfaceProtocol; Vendor-specific */ |
| 47 | 0x00, /* __u8 if_iInterface; */ |
| 48 | |
Greg Kroah-Hartman | 8b99514 | 2014-09-08 19:34:30 -0700 | [diff] [blame] | 49 | /* three endpoints */ |
Greg Kroah-Hartman | d6e0e1c | 2014-09-06 13:13:13 -0700 | [diff] [blame] | 50 | 0x07, /* __u8 ep_bLength; */ |
| 51 | 0x05, /* __u8 ep_bDescriptorType; Endpoint */ |
| 52 | 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ |
Greg Kroah-Hartman | 082570b | 2014-09-13 16:15:07 -0700 | [diff] [blame] | 53 | 0x03, /* __u8 ep_bmAttributes; Interrupt */ |
Greg Kroah-Hartman | 8b99514 | 2014-09-08 19:34:30 -0700 | [diff] [blame] | 54 | 0x00, 0x04, /* __le16 ep_wMaxPacketSize; 1024 */ |
Greg Kroah-Hartman | 082570b | 2014-09-13 16:15:07 -0700 | [diff] [blame] | 55 | 0x40, /* __u8 ep_bInterval; 64ms */ |
Greg Kroah-Hartman | 8b99514 | 2014-09-08 19:34:30 -0700 | [diff] [blame] | 56 | |
| 57 | 0x07, /* __u8 ep_bLength; */ |
| 58 | 0x05, /* __u8 ep_bDescriptorType; Endpoint */ |
| 59 | 0x82, /* __u8 ep_bEndpointAddress; IN Endpoint 2 */ |
Greg Kroah-Hartman | d6e0e1c | 2014-09-06 13:13:13 -0700 | [diff] [blame] | 60 | 0x02, /* __u8 ep_bmAttributes; Bulk */ |
Greg Kroah-Hartman | 8b99514 | 2014-09-08 19:34:30 -0700 | [diff] [blame] | 61 | 0x00, 0x04, /* __le16 ep_wMaxPacketSize; 1024 */ |
Greg Kroah-Hartman | 082570b | 2014-09-13 16:15:07 -0700 | [diff] [blame] | 62 | 0x40 /* __u8 ep_bInterval; */ |
Greg Kroah-Hartman | d6e0e1c | 2014-09-06 13:13:13 -0700 | [diff] [blame] | 63 | |
| 64 | 0x07, /* __u8 ep_bLength; */ |
| 65 | 0x05, /* __u8 ep_bDescriptorType; Endpoint */ |
| 66 | 0x02, /* __u8 ep_bEndpointAddress; Out Endpoint 2 */ |
| 67 | 0x02, /* __u8 ep_bmAttributes; Bulk */ |
Greg Kroah-Hartman | 8b99514 | 2014-09-08 19:34:30 -0700 | [diff] [blame] | 68 | 0x00, 0x04, /* __le16 ep_wMaxPacketSize; 1024 */ |
Greg Kroah-Hartman | 082570b | 2014-09-13 16:15:07 -0700 | [diff] [blame] | 69 | 0x40 /* __u8 ep_bInterval; */ |
Greg Kroah-Hartman | d6e0e1c | 2014-09-06 13:13:13 -0700 | [diff] [blame] | 70 | }; |