On Thu, Oct 22, 2020, at 4:06 PM, Dmitry N. Mikushin wrote: > Yes, AFAIK PCI_DEVICE_ID_INTEL_GLK_XHCI is actually 0x31a8, and I do have it: > > 00:15.0 USB controller [0c03]: Intel Corporation Device [8086:31a8] (rev 03) > > Board is M1K. > My kernel is 5.4.0-48-lowlatency with the following additional patch: > https://lore.kernel.org/patchwork/patch/1037542/ > I have dwc3 as a kernel module. > I'm not testing any gadget, I just have no idea what to test. Could > you please suggest some sources on how I should map gadget onto my > dwc3 port? > > Thanks & Kind Regards, > - Dmitry. > After you set the DRD switch to device do you see a device in /sys/class/udc? I will show you how to use configfs. You must enable USB gadget configfs. It is easier to use in my opinion. The other gadget drivers simply need to be loaded, but I am unsure how they work with newer DWC3 hardware. Most of the code is written for android and android uses configfs. `modprobe libcomposite` then execute the following, using that name: #!/usr/bin/env bash cd /sys/kernel/config/usb_gadget if [[ -d "g0" ]]; then echo "" > g0/UDC rm -rf g0; fi mkdir g0 cd g0 echo "0x1d6b" > idVendor echo "0x0104" > idProduct mkdir strings/0x409 echo "0000000000" > strings/0x409/serialnumber echo "Your Company" > strings/0x409/manufacturer echo "Your Device" > strings/0x409/product mkdir functions/ncm.usb0 mkdir configs/c.1 ln -s functions/ncm.usb0 configs/c.1 # List /sys/class/udc and take a name for this line: echo "" > UDC This will set up a Ethernet NCM device. There are similar instructions from the configfs author in a powerpoint. More device types are in the documentation.