Linux USB
 help / color / mirror / Atom feed
* Role Switch Driver on DWC3
@ 2020-07-08 11:41 Shah, Nehal-bakulchandra
  2020-07-08 12:44 ` Jun Li
  0 siblings, 1 reply; 2+ messages in thread
From: Shah, Nehal-bakulchandra @ 2020-07-08 11:41 UTC (permalink / raw)
  To: Felipe Balbi, linux-usb, Heikki Krogerus

Hi,

As per my understanding, role switch interface for DWC3 controller will be called in dwc3_drd_init.

However, dwc3_drd_init is called only if mode is USB_DR_MODE_OTG. However for USB3 V3.3 and above the following code exists.

/*
         * DWC_usb31 and DWC_usb3 v3.30a and higher do not support OTG
         * mode. If the controller supports DRD but the dr_mode is not
         * specified or set to OTG, then set the mode to peripheral.
         */
        if (mode == USB_DR_MODE_OTG &&
            dwc->revision >= DWC3_REVISION_330A)
            mode = USB_DR_MODE_PERIPHERAL;
    }

Hence, in this case role switch interface will never will be called.


Please clear my understanding, and in such case how can i use the role switch driver?


Regards

Nehal Shah



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-08 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-08 11:41 Role Switch Driver on DWC3 Shah, Nehal-bakulchandra
2020-07-08 12:44 ` Jun Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox