Tool/software: Linux
Hi,
I am working on h/w based on DRA74xx Jancito6 SoC. It has dwc3 DRD from synopsys. We are trying to bring up USB dual role switch functionality in Linux kernel version 4.4.23.
We don't have OTG support on target due to h/w limitations. So we cant use ID PIN for mode selection. We are looking for role switch from software (using /sys/kernel/debugfs interface) .
Our intention is to have the USB DRD controller in host mode (dr_mode=host) at the startup. And then based on a condition we shall trigger the role switch, preferably by writing "device" to the debugfs file "mode". But when we do this, there is no role switch because the DWC controller will be still registered to XHCI driver and it does not register to the UDC driver. The same holds good for vice versa scenario, device mode to host mode switch.
Is there any way we can achieve this? Or if you already have a patch/solution that would help us achieve our goal?