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