• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1root {
2    module = "usbfn";
3    acm_device_config {
4        match_attr = "usbfn_cdcacm_driver";
5        udc_name = "fcc00000.dwc3";
6    }
7    ecm_device_config {
8        match_attr = "usbfn_cdcecm_driver";
9        udc_name = "fcc00000.dwc3";
10    }
11    mtp_device_config {
12        match_attr = "usbfn_mtp_interface_driver";
13        udc_name = "fcc00000.dwc3";
14    }
15    usb_device_config {
16        match_attr = "usb_device_interface_driver";
17        port_file_path = "/sys/kernel/debug/usb/fcc00000.dwc3/mode";
18    }
19    usbfn_config {
20        match_attr = "usbfn_driver";
21        use_hcs = 1;
22        udc_name = "fcc00000.dwc3";
23        usb_dev_desc = "UsbDeviceDescriptor";
24        usb_dev_string = "UsbDeviceStrings";
25        usb_configuration = "UsbConfigs";
26        UsbDeviceDescriptor {
27            bLength = 18;
28            bDescriptorType = 0x01;
29            bcdUSB = 0x0200;
30            bDeviceClass = 0;
31            bDeviceSubClass = 0;
32            bDeviceProtocol = 0;
33            bMaxPacketSize0 = 0x40;
34            idVendor = 0x2207;
35            idProduct = 0x0018;
36            bcdDevice = 0x0223;
37            manufacturer = 0;
38            product = 1;
39            serialnumber = 2;
40            numConfigurations = 1;
41        }
42        UsbDeviceStrings {
43            stringTabList = ["string_1"];
44            string_1 {
45                language = 0x0409;
46                stringList = ["str_1", "str_2","str_3", "str_4"];
47                str_1 {
48                    id = 0;
49                    str =  "HISILICON";
50                }
51                str_2 {
52                    id = 1;
53                    str = "HDC Device";
54                }
55                str_3 {
56                    id = 2;
57                    str =  "0123456789POPLAR";
58                }
59                str_4 {
60                    id = 3;
61                    str = "hdc";
62                }
63            }
64        }
65        UsbConfigs {
66            configList = ["config_1"];
67            config_1  {
68                configurationValue = 1;
69                iConfiguration = 3;
70                attributes = 0xC0;
71                maxPower = 500;
72                functionList = ["func_ecm", "func_acm"];
73                func_ecm {
74                    funcName = "f_generic.e";
75                    stringTabList = ["fnString_1"];
76                    fnString_1 {
77                        language  = 0x0409;
78                        stringList = ["str_1", "str_2", "str_3", "str_4"];
79                        str_1 {
80                            id = 0;
81                            str = "CDC Ethernet Control Model (ECM)";
82                        }
83                        str_2 {
84                            id = 1;
85                            str = "0ac75ae91c79";
86                        }
87                        str_3 {
88                            id = 2;
89                            str = "CDC Ethernet Data";
90                        }
91                        str_4 {
92                            id = 3;
93                            str = "CDC ECM";
94                        }
95                    }
96                    fsDescList = ["assoc_interface", "ControlInterface", "cdc_header",
97                        "cdc_union", "cdc_ether", "FsNotify_endpoint", "DataNopInterface",
98                        "DataInterface", "FsIn_endpoint", "FsOut_endpoint"];
99                    assoc_interface {
100                        bLength = 0x08;
101                        bDescriptorType = 0x0B;
102                        bFirstInterface = 0x00;
103                        bInterfaceCount = 0x02;
104                        bFunctionClass = 0x02;
105                        bFunctionSubClass = 0x06;
106                        bFunctionProtocol = 0x00;
107                        iFunction = 0x04;
108                    }
109                    ControlInterface {
110                        bLength = 0x09;
111                        bDescriptorType = 0x04;
112                        bInterfaceNumber = 0x00;
113                        bAlternateSetting = 0x00;
114                        bNumEndpoints = 0x01;
115                        bInterfaceClass = 0x02;
116                        bInterfaceSubClass = 0x06;
117                        bInterfaceProtocol = 0x00;
118                        iInterface = 0x1;
119                    }
120                    cdc_header {
121                        bLength = 0x05;
122                        bDescriptorType = 0x24;
123                        desc_data = [0x05, 0x24, 0x00, 0x10, 0x01];
124                    }
125                    cdc_union {
126                        bLength = 0x05;
127                        bDescriptorType = 0x24;
128                        desc_data = [0x05, 0x24, 0x06, 0x00, 0x01];
129                    }
130                    cdc_ether {
131                        bLength = 0x0D;
132                        bDescriptorType = 0x24;
133                        desc_data = [0x0D, 0x24, 0x0F, 0x06, 0x00, 0x00, 0x00, 0x00,
134                                     0xEA, 0x05, 0x00, 0x00, 0x00];
135                    }
136                    DataNopInterface {
137                        bLength = 0x09;
138                        bDescriptorType = 0x04;
139                        bInterfaceNumber = 0x01;
140                        bAlternateSetting = 0x00;
141                        bNumEndpoints = 0x00;
142                        bInterfaceClass = 0x0A;
143                        bInterfaceSubClass = 0x00;
144                        bInterfaceProtocol = 0x06;
145                        iInterface = 0x00;
146                    }
147                    DataInterface {
148                        bLength = 0x09;
149                        bDescriptorType = 0x04;
150                        bInterfaceNumber = 0x01;
151                        bAlternateSetting = 0x01;
152                        bNumEndpoints = 0x02;
153                        bInterfaceClass = 0x0A;
154                        bInterfaceSubClass = 0x00;
155                        bInterfaceProtocol = 0x06;
156                        iInterface = 0x03;
157                    }
158                    FsNotify_endpoint {
159                        bLength = 0x07;
160                        bDescriptorType = 0x05;
161                        bEndpointAddress = 0x81;
162                        bmAttributes = 0x03;
163                        wMaxPacketSize = 16;
164                        bInterval = 32;
165                    }
166                    FsIn_endpoint {
167                        bLength = 0x07;
168                        bDescriptorType = 0x05;
169                        bEndpointAddress = 0x82;
170                        bmAttributes = 0x02;
171                        wMaxPacketSize = 0;
172                        bInterval = 0;
173                    }
174                    FsOut_endpoint {
175                        bLength = 0x07;
176                        bDescriptorType = 0x05;
177                        bEndpointAddress = 0x3;
178                        bmAttributes = 0x02;
179                        wMaxPacketSize = 0;
180                        bInterval = 0;
181                    }
182                    hsDescList = ["assoc_interface", "ControlInterface", "cdc_header",
183                        "cdc_union", "cdc_ether", "HsNotify_endpoint", "DataNopInterface",
184                        "DataInterface", "HsIn_endpoint", "HsOut_endpoint"];
185                    HsNotify_endpoint {
186                        bLength = 0x07;
187                        bDescriptorType = 0x05;
188                        bEndpointAddress = 0x81;
189                        bmAttributes = 0x03;
190                        wMaxPacketSize = 16;
191                        bInterval = 9;
192                    }
193                    HsIn_endpoint {
194                        bLength = 0x07;
195                        bDescriptorType = 0x05;
196                        bEndpointAddress = 0x82;
197                        bmAttributes = 0x02;
198                        wMaxPacketSize = 512;
199                        bInterval = 0;
200                    }
201                    HsOut_endpoint {
202                        bLength = 0x07;
203                        bDescriptorType = 0x05;
204                        bEndpointAddress = 0x3;
205                        bmAttributes = 0x02;
206                        wMaxPacketSize = 512;
207                        bInterval = 0;
208                    }
209                    ssDescList = ["assoc_interface", "ControlInterface", "cdc_header",
210                        "cdc_union", "cdc_ether", "SsNotify_endpoint", "ss_ep_comp_0",
211                        "DataNopInterface", "DataInterface", "SsIn_endpoint",
212                        "ss_ep_comp", "SsOut_endpoint", "ss_ep_comp"];
213                    SsNotify_endpoint {
214                        bLength = 0x07;
215                        bDescriptorType = 0x05;
216                        bEndpointAddress = 0x81;
217                        bmAttributes = 0x03;
218                        wMaxPacketSize = 16;
219                        bInterval = 9;
220                    }
221                    ss_ep_comp_0 {
222                        bLength = 0x06;
223                        bDescriptorType = 0x30;
224                        bMaxBurst = 0x00;
225                        bmAttributes = 0x00;
226                        wBytesPerInterval = 16;
227                    }
228                    ss_ep_comp {
229                        bLength = 0x06;
230                        bDescriptorType = 0x30;
231                        bMaxBurst = 0x00;
232                        bmAttributes = 0x00;
233                        wBytesPerInterval = 0x00;
234                    }
235                    SsIn_endpoint {
236                        bLength = 0x07;
237                        bDescriptorType = 0x05;
238                        bEndpointAddress = 0x82;
239                        bmAttributes = 0x02;
240                        wMaxPacketSize = 1024;
241                        bInterval = 0;
242                    }
243                    SsOut_endpoint {
244                        bLength = 0x07;
245                        bDescriptorType = 0x05;
246                        bEndpointAddress = 0x3;
247                        bmAttributes = 0x02;
248                        wMaxPacketSize = 1024;
249                        bInterval = 0;
250                    }
251                }
252                func_acm {
253                    funcName = "f_generic.a";
254                    stringTabList = ["fnString_1"];
255                    fnString_1 {
256                        language  = 0x0409;
257                        stringList = ["str_1", "str_2", "str_3"];
258                        str_1 {
259                            id = 0;
260                            str =  "CDC Abstract Control Model (ACM)";
261                        }
262                        str_2 {
263                            id = 1;
264                            str = "CDC ACM Data";
265                        }
266                        str_3 {
267                            id = 2;
268                            str = "CDC Serial";
269                        }
270                    }
271                    fsDescList = ["assoc_interface", "ControlInterface", "cdc_header",
272                        "cdc_call_mgmt", "cdc_acm", "cdc_union", "FsNotify_endpoint",
273                        "DataInterface", "FsIn_endpoint", "FsOut_endpoint"];
274                    assoc_interface {
275                        bLength = 0x08;
276                        bDescriptorType = 0x0B;
277                        bFirstInterface = 0x02;
278                        bInterfaceCount = 0x02;
279                        bFunctionClass = 0x02;
280                        bFunctionSubClass = 0x02;
281                        bFunctionProtocol = 0x01;
282                        iFunction = 0x03;
283                    }
284                    ControlInterface {
285                        bLength = 0x09;
286                        bDescriptorType = 0x04;
287                        bInterfaceNumber = 0x02;
288                        bAlternateSetting = 0x00;
289                        bNumEndpoints = 0x01;
290                        bInterfaceClass = 0x02;
291                        bInterfaceSubClass = 0x02;
292                        bInterfaceProtocol = 0x01;
293                        iInterface = 0x01;
294                    }
295                    cdc_header {
296                        bLength = 0x05;
297                        bDescriptorType = 0x24;
298                        desc_data = [0x05, 0x24, 0x00, 0x10, 0x01];
299                    }
300                    cdc_call_mgmt {
301                        bLength = 0x05;
302                        bDescriptorType = 0x24;
303                        desc_data = [0x05, 0x24, 0x01, 0x00, 0x01];
304                    }
305                    cdc_acm {
306                        bLength = 0x04;
307                        bDescriptorType = 0x24;
308                        desc_data = [0x04, 0x24, 0x02, 0x02];
309                    }
310                    cdc_union {
311                        bLength = 0x05;
312                        bDescriptorType = 0x24;
313                        desc_data = [0x05, 0x24, 0x06, 0x02, 0x03];
314                    }
315                    FsNotify_endpoint {
316                        bLength = 0x07;
317                        bDescriptorType = 0x05;
318                        bEndpointAddress = 0x81;
319                        bmAttributes = 0x03;
320                        wMaxPacketSize = 10;
321                        bInterval = 32;
322                    }
323                    DataInterface {
324                        bLength = 0x09;
325                        bDescriptorType = 0x04;
326                        bInterfaceNumber = 0x03;
327                        bAlternateSetting = 0x00;
328                        bNumEndpoints = 0x02;
329                        bInterfaceClass = 0x0A;
330                        bInterfaceSubClass = 0x00;
331                        bInterfaceProtocol = 0x02;
332                        iInterface = 0x02;
333                    }
334                    FsIn_endpoint {
335                        bLength = 0x07;
336                        bDescriptorType = 0x05;
337                        bEndpointAddress = 0x82;
338                        bmAttributes = 0x02;
339                        wMaxPacketSize = 0;
340                        bInterval = 0;
341                    }
342                    FsOut_endpoint {
343                        bLength = 0x07;
344                        bDescriptorType = 0x05;
345                        bEndpointAddress = 0x3;
346                        bmAttributes = 0x02;
347                        wMaxPacketSize = 0;
348                        bInterval = 0;
349                    }
350                    hsDescList = ["assoc_interface", "ControlInterface", "cdc_header",
351                        "cdc_call_mgmt", "cdc_acm", "cdc_union", "HsNotify_endpoint",
352                        "DataInterface", "HsIn_endpoint", "HsOut_endpoint"];
353                    HsNotify_endpoint {
354                        bLength = 0x07;
355                        bDescriptorType = 0x05;
356                        bEndpointAddress = 0x81;
357                        bmAttributes = 0x03;
358                        wMaxPacketSize = 10;
359                        bInterval = 9;
360                    }
361                    HsIn_endpoint {
362                        bLength = 0x07;
363                        bDescriptorType = 0x05;
364                        bEndpointAddress = 0x82;
365                        bmAttributes = 0x02;
366                        wMaxPacketSize = 512;
367                        bInterval = 0;
368                    }
369                    HsOut_endpoint {
370                        bLength = 0x07;
371                        bDescriptorType = 0x05;
372                        bEndpointAddress = 0x3;
373                        bmAttributes = 0x02;
374                        wMaxPacketSize = 512;
375                        bInterval = 0;
376                    }
377                    ssDescList = ["assoc_interface", "ControlInterface", "cdc_header",
378                        "cdc_call_mgmt", "cdc_acm", "cdc_union", "HsNotify_endpoint",
379                        "ss_ep_comp", "DataInterface", "SsIn_endpoint",
380                        "ss_ep_comp","SsOut_endpoint","ss_ep_comp"];
381                    ss_ep_comp {
382                        bLength = 0x06;
383                        bDescriptorType = 0x30;
384                        bMaxBurst = 0x00;
385                        bmAttributes = 0x00;
386                        wBytesPerInterval = 0x00;
387                    }
388                    SsIn_endpoint {
389                        bLength = 0x07;
390                        bDescriptorType = 0x05;
391                        bEndpointAddress = 0x82;
392                        bmAttributes = 0x02;
393                        wMaxPacketSize = 1024;
394                        bInterval = 0;
395                    }
396                    SsOut_endpoint {
397                        bLength = 0x07;
398                        bDescriptorType = 0x05;
399                        bEndpointAddress = 0x3;
400                        bmAttributes = 0x02;
401                        wMaxPacketSize = 1024;
402                        bInterval = 0;
403                    }
404                }
405            }
406        }
407        custom_prop {
408            propTable = ["propList_1", "propList_2"];
409            propList_1 {
410                configNum = 1;
411                interfaceNum = 2;
412                propList = ["prop_1", "prop_2"];
413                prop_1 {
414                    name = "testx";
415                    value = "xxxxxx";
416                }
417                prop_2 {
418                    name = "testy";
419                    value = "yyyyyy";
420                }
421            }
422            propList_2 {
423                configNum = 1;
424                interfaceNum = 3;
425                propList = ["prop_1", "prop_2"];
426                prop_1 {
427                    name = "testm";
428                    value = "mmmmm";
429                }
430                prop_2 {
431                    name = "testn";
432                    value = "nnnnn";
433                }
434            }
435        }
436    }
437}
438