Hi Sid, > -----Original Message----- > From: Sid Spry <sid@xxxxxxx> > Sent: Friday, September 18, 2020 7:55 AM > To: linux-usb@xxxxxxxxxxxxxxx > Subject: Enabling Device DWC3 Device Mode > > I've a RK3399 based board (RockPro64) and am unable to find any useful > information on how to ensure the USB controller is set up for device/gadget > operation. > > The base armbian (Ubuntu Focal based distribution) kernel did not have > dwc2/dwc3 modules compiled. I compiled the modules for kernel ~5.7 after > ensuring that dual role mode was supported along with gadget configfs and > am able to modprobe them, but I see no devices populate in /sys/class/udc > and no dmesg errors. > > I should be able to target any kernel version, but I am concerned that there > may be missing device tree information but am unsure how to check that. > Most people seem uninterested in using the device mode on this hardware, > but it was 1 of 2 boards, based on the same part, that I found claiming to > support device mode USB3. For DWC3 device mode support, maybe you could check Layerscape platforms as a reference. There is a doc which has details on how-to: https://www.nxp.com/docs/en/user-guide/LSDKUG_Rev20.04.pdf search 'Gadget driver' . One of the example in DTS is arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi and arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts, and you need to manually update it by following above doc to enable device mode. Regards, Ran > Cheers!