2 * USB virtual root hub descriptors
5 * Stephen Warren swarren@wwwdotorg.org
9 * SPDX-License-Identifier: GPL-2.0+
12 #ifndef __USBROOTHUBDES_H__
13 #define __USBROOTHUBDES_H__
15 /* Device descriptor */
16 static __u8 root_hub_dev_des[] = {
17 0x12, /* __u8 bLength; */
18 0x01, /* __u8 bDescriptorType; Device */
19 0x10, /* __u16 bcdUSB; v1.1 */
21 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */
22 0x00, /* __u8 bDeviceSubClass; */
23 0x00, /* __u8 bDeviceProtocol; */
24 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */
25 0x00, /* __u16 idVendor; */
27 0x00, /* __u16 idProduct; */
29 0x00, /* __u16 bcdDevice; */
31 0x00, /* __u8 iManufacturer; */
32 0x01, /* __u8 iProduct; */
33 0x00, /* __u8 iSerialNumber; */
34 0x01, /* __u8 bNumConfigurations; */
37 /* Configuration descriptor */
38 static __u8 root_hub_config_des[] = {
39 0x09, /* __u8 bLength; */
40 0x02, /* __u8 bDescriptorType; Configuration */
41 0x19, /* __u16 wTotalLength; */
43 0x01, /* __u8 bNumInterfaces; */
44 0x01, /* __u8 bConfigurationValue; */
45 0x00, /* __u8 iConfiguration; */
46 0x40, /* __u8 bmAttributes;
52 0x00, /* __u8 MaxPower; */
54 0x09, /* __u8 if_bLength; */
55 0x04, /* __u8 if_bDescriptorType; Interface */
56 0x00, /* __u8 if_bInterfaceNumber; */
57 0x00, /* __u8 if_bAlternateSetting; */
58 0x01, /* __u8 if_bNumEndpoints; */
59 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */
60 0x00, /* __u8 if_bInterfaceSubClass; */
61 0x00, /* __u8 if_bInterfaceProtocol; */
62 0x00, /* __u8 if_iInterface; */
64 0x07, /* __u8 ep_bLength; */
65 0x05, /* __u8 ep_bDescriptorType; Endpoint */
66 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */
67 0x03, /* __u8 ep_bmAttributes; Interrupt */
68 0x02, /* __u16 ep_wMaxPacketSize; ((MAX_ROOT_PORTS + 1) / 8 */
70 0xff, /* __u8 ep_bInterval; 255 ms */
73 #ifdef WANT_USB_ROOT_HUB_HUB_DES
74 static unsigned char root_hub_hub_des[] = {
75 0x09, /* __u8 bLength; */
76 0x29, /* __u8 bDescriptorType; Hub-descriptor */
77 0x02, /* __u8 bNbrPorts; */
78 0x00, /* __u16 wHubCharacteristics; */
80 0x01, /* __u8 bPwrOn2pwrGood; 2ms */
81 0x00, /* __u8 bHubContrCurrent; 0 mA */
82 0x00, /* __u8 DeviceRemovable; *** 7 Ports max *** */
83 0xff, /* __u8 PortPwrCtrlMask; *** 7 ports max *** */
87 static unsigned char root_hub_str_index0[] = {
88 0x04, /* __u8 bLength; */
89 0x03, /* __u8 bDescriptorType; String-descriptor */
90 0x09, /* __u8 lang ID */
91 0x04, /* __u8 lang ID */
94 static unsigned char root_hub_str_index1[] = {
95 32, /* __u8 bLength; */
96 0x03, /* __u8 bDescriptorType; String-descriptor */
97 'U', /* __u8 Unicode */
99 '-', /* __u8 Unicode */
100 0, /* __u8 Unicode */
101 'B', /* __u8 Unicode */
102 0, /* __u8 Unicode */
103 'o', /* __u8 Unicode */
104 0, /* __u8 Unicode */
105 'o', /* __u8 Unicode */
106 0, /* __u8 Unicode */
107 't', /* __u8 Unicode */
108 0, /* __u8 Unicode */
109 ' ', /* __u8 Unicode */
110 0, /* __u8 Unicode */
111 'R', /* __u8 Unicode */
112 0, /* __u8 Unicode */
113 'o', /* __u8 Unicode */
114 0, /* __u8 Unicode */
115 'o', /* __u8 Unicode */
116 0, /* __u8 Unicode */
117 't', /* __u8 Unicode */
118 0, /* __u8 Unicode */
119 ' ', /* __u8 Unicode */
120 0, /* __u8 Unicode */
121 'H', /* __u8 Unicode */
122 0, /* __u8 Unicode */
123 'u', /* __u8 Unicode */
124 0, /* __u8 Unicode */
125 'b', /* __u8 Unicode */
126 0, /* __u8 Unicode */