Thanks Ran. I took a look at the document, if you or anyone else can weigh in I'd appreciate it. The platform devices seem to be active, see below. On Thu, Sep 17, 2020, at 8:11 PM, Ran Wang wrote: > 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' . > Thanks for the pointer. Around line 771 is what I expected to see for my board. However, in arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi (I have the v2 board) the USB related entries I see are: &usbdrd3_0 { status = "okay"; }; &usbdrd_dwc3_0 { status = "okay"; dr_mode = "otg"; }; &usbdrd3_1 { status = "okay"; }; &usbdrd_dwc3_1 { status = "okay"; dr_mode = "host"; }; Starting at line 767. It's a lot sparser, but the dr_mode is there. I feel I should note that despite the lack of devices in /sys/class/udc I have nodes in /sys/bus/platform/drivers/dwc3: # ls /sys/bus/platform/drivers/dwc3 bind fe800000.usb fe900000.usb module uevent unbind > 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. > The document linked is relevant beginning page 445. The above dts settings seem appropriate and I have the necessary kernel configuration enabled. Any relevant drivers are modules. I'm not really sure how to diagnose it from here. Any help is appreciated. Thanks in advance!