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 = "/data/service/el1/public/usb/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", "func_mtp", "func_ptp"]; 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 func_mtp { 406 funcName = "f_generic.mtp"; 407 stringTabList = ["fnString_1"]; 408 fnString_1 { 409 language = 0x0409; 410 stringList = ["str_1", "str_2", "str_3"]; 411 str_1 { 412 id = 0; 413 str = "Media Transfer Protocol(MTP)"; 414 } 415 str_2 { 416 id = 1; 417 str = "USB MTP Device"; 418 } 419 str_3 { 420 id = 2; 421 str = "MTP"; 422 } 423 } 424 fsDescList = ["DataInterface", 425 "FsNotify_endpoint", 426 "FsIn_endpoint", 427 "FsOut_endpoint"]; 428 DataInterface { 429 bLength = 0x09; 430 bDescriptorType = 0x04; 431 bInterfaceNumber = 0x00; 432 bAlternateSetting = 0x00; 433 bNumEndpoints = 0x03; 434 bInterfaceClass = 0xFF; 435 bInterfaceSubClass = 0xFF; 436 bInterfaceProtocol = 0x00; 437 iInterface = 0x03; 438 } 439 FsNotify_endpoint { 440 bLength = 0x07; 441 bDescriptorType = 0x05; 442 bEndpointAddress = 0x81; 443 bmAttributes = 0x03; 444 wMaxPacketSize = 0x1C; 445 bInterval = 6; 446 } 447 FsIn_endpoint { 448 bLength = 0x07; 449 bDescriptorType = 0x05; 450 bEndpointAddress = 0x82; 451 bmAttributes = 0x02; 452 wMaxPacketSize = 0; 453 bInterval = 0; 454 } 455 FsOut_endpoint { 456 bLength = 0x07; 457 bDescriptorType = 0x05; 458 bEndpointAddress = 0x03; 459 bmAttributes = 0x02; 460 wMaxPacketSize = 0; 461 bInterval = 0; 462 } 463 hsDescList = ["DataInterface", 464 "HsNotify_endpoint", 465 "HsIn_endpoint", 466 "HsOut_endpoint"]; 467 HsNotify_endpoint { 468 bLength = 0x07; 469 bDescriptorType = 0x05; 470 bEndpointAddress = 0x81; 471 bmAttributes = 0x03; 472 wMaxPacketSize = 0x1C; 473 bInterval = 6; 474 } 475 HsIn_endpoint { 476 bLength = 0x07; 477 bDescriptorType = 0x05; 478 bEndpointAddress = 0x82; 479 bmAttributes = 0x02; 480 wMaxPacketSize = 512; 481 bInterval = 0; 482 } 483 HsOut_endpoint { 484 bLength = 0x07; 485 bDescriptorType = 0x05; 486 bEndpointAddress = 0x03; 487 bmAttributes = 0x02; 488 wMaxPacketSize = 512; 489 bInterval = 0; 490 } 491 ssDescList = ["DataInterface", 492 "SsNotify_endpoint", "ss_ep_comp_notify", 493 "SsIn_endpoint", "ss_ep_comp", 494 "SsOut_endpoint", "ss_ep_comp"]; 495 SsNotify_endpoint { 496 bLength = 0x07; 497 bDescriptorType = 0x05; 498 bEndpointAddress = 0x81; 499 bmAttributes = 0x03; 500 wMaxPacketSize = 0x1C; 501 bInterval = 0; 502 } 503 ss_ep_comp_notify { 504 bLength = 0x06; 505 bDescriptorType = 0x30; 506 bMaxBurst = 0x00; 507 bmAttributes = 0x00; 508 wBytesPerInterval = 0; 509 } 510 ss_ep_comp { 511 bLength = 0x06; 512 bDescriptorType = 0x30; 513 bMaxBurst = 0x00; 514 bmAttributes = 0x00; 515 wBytesPerInterval = 0x00; 516 } 517 SsIn_endpoint { 518 bLength = 0x07; 519 bDescriptorType = 0x05; 520 bEndpointAddress = 0x82; 521 bmAttributes = 0x02; 522 wMaxPacketSize = 1024; 523 bInterval = 0; 524 } 525 SsOut_endpoint { 526 bLength = 0x07; 527 bDescriptorType = 0x05; 528 bEndpointAddress = 0x3; 529 bmAttributes = 0x02; 530 wMaxPacketSize = 1024; 531 bInterval = 0; 532 } 533 } 534 func_ptp { 535 funcName = "f_generic.ptp"; 536 stringTabList = ["fnString_1"]; 537 fnString_1 { 538 language = 0x0409; 539 stringList = ["str_1", "str_2", "str_3", "str_4"]; 540 str_1 { 541 id = 0; 542 str = "Picture Transfer Protocol(PTP)"; 543 } 544 str_2 { 545 id = 1; 546 str = "USB PTP Device"; 547 } 548 str_3 { 549 id = 2; 550 str = "PTP"; 551 } 552 str_4 { 553 id = 2; 554 str = ""; 555 } 556 } 557 fsDescList = ["DataInterface", 558 "FsNotify_endpoint", 559 "FsIn_endpoint", 560 "FsOut_endpoint"]; 561 DataInterface { 562 bLength = 0x09; 563 bDescriptorType = 0x04; 564 bInterfaceNumber = 0x00; 565 bAlternateSetting = 0x00; 566 bNumEndpoints = 0x03; 567 bInterfaceClass = 0x06; 568 bInterfaceSubClass = 0x01; 569 bInterfaceProtocol = 0x01; 570 iInterface = 0x04; 571 } 572 FsNotify_endpoint { 573 bLength = 0x07; 574 bDescriptorType = 0x05; 575 bEndpointAddress = 0x81; 576 bmAttributes = 0x03; 577 wMaxPacketSize = 0x1C; 578 bInterval = 6; 579 } 580 FsIn_endpoint { 581 bLength = 0x07; 582 bDescriptorType = 0x05; 583 bEndpointAddress = 0x82; 584 bmAttributes = 0x02; 585 wMaxPacketSize = 0; 586 bInterval = 0; 587 } 588 FsOut_endpoint { 589 bLength = 0x07; 590 bDescriptorType = 0x05; 591 bEndpointAddress = 0x03; 592 bmAttributes = 0x02; 593 wMaxPacketSize = 0; 594 bInterval = 0; 595 } 596 hsDescList = ["DataInterface", 597 "HsNotify_endpoint", 598 "HsIn_endpoint", 599 "HsOut_endpoint"]; 600 HsNotify_endpoint { 601 bLength = 0x07; 602 bDescriptorType = 0x05; 603 bEndpointAddress = 0x81; 604 bmAttributes = 0x03; 605 wMaxPacketSize = 0x1C; 606 bInterval = 6; 607 } 608 HsIn_endpoint { 609 bLength = 0x07; 610 bDescriptorType = 0x05; 611 bEndpointAddress = 0x82; 612 bmAttributes = 0x02; 613 wMaxPacketSize = 512; 614 bInterval = 0; 615 } 616 HsOut_endpoint { 617 bLength = 0x07; 618 bDescriptorType = 0x05; 619 bEndpointAddress = 0x03; 620 bmAttributes = 0x02; 621 wMaxPacketSize = 512; 622 bInterval = 0; 623 } 624 ssDescList = ["DataInterface", 625 "SsNotify_endpoint", "ss_ep_comp_notify", 626 "SsIn_endpoint", "ss_ep_comp", 627 "SsOut_endpoint", "ss_ep_comp"]; 628 SsNotify_endpoint { 629 bLength = 0x07; 630 bDescriptorType = 0x05; 631 bEndpointAddress = 0x81; 632 bmAttributes = 0x03; 633 wMaxPacketSize = 0x1C; 634 bInterval = 0; 635 } 636 ss_ep_comp_notify { 637 bLength = 0x06; 638 bDescriptorType = 0x30; 639 bMaxBurst = 0x00; 640 bmAttributes = 0x00; 641 wBytesPerInterval = 0; 642 } 643 ss_ep_comp { 644 bLength = 0x06; 645 bDescriptorType = 0x30; 646 bMaxBurst = 0x00; 647 bmAttributes = 0x00; 648 wBytesPerInterval = 0x00; 649 } 650 SsIn_endpoint { 651 bLength = 0x07; 652 bDescriptorType = 0x05; 653 bEndpointAddress = 0x82; 654 bmAttributes = 0x02; 655 wMaxPacketSize = 1024; 656 bInterval = 0; 657 } 658 SsOut_endpoint { 659 bLength = 0x07; 660 bDescriptorType = 0x05; 661 bEndpointAddress = 0x3; 662 bmAttributes = 0x02; 663 wMaxPacketSize = 1024; 664 bInterval = 0; 665 } 666 } 667 } 668 } 669 custom_prop { 670 propTable = ["propList_1", "propList_2"]; 671 propList_1 { 672 configNum = 1; 673 interfaceNum = 2; 674 propList = ["prop_1", "prop_2"]; 675 prop_1 { 676 name = "testx"; 677 value = "xxxxxx"; 678 } 679 prop_2 { 680 name = "testy"; 681 value = "yyyyyy"; 682 } 683 } 684 propList_2 { 685 configNum = 1; 686 interfaceNum = 3; 687 propList = ["prop_1", "prop_2"]; 688 prop_1 { 689 name = "testm"; 690 value = "mmmmm"; 691 } 692 prop_2 { 693 name = "testn"; 694 value = "nnnnn"; 695 } 696 } 697 } 698 } 699} 700