How to change from usb host to peripheral on the fly in linux userspace

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to change from usb host to peripheral on the fly in linux userspace

1,201 Views
DavisRoman
Contributor III

Hello,

I have a custom i.mx6 based system and I have a connector that exposes a usb interface. 

Our use-case requires that we be able to change between usb host and usb peripheral on the fly in linux userspace. Preferably via the command line.

I was hoping there was something in /sys that i can take advantage of.

I'm currently on a 4.1.15 kernel.

Any ideas would be appreciated,

Thank you,


Davis

0 Kudos
1 Reply

946 Views
igorpadykov
NXP Employee
NXP Employee

Hi Davis

I am afraid such functionality is not supported in nxp bsps, in general

seems one will have to write custom driver/application for usb role switch using

existing support in i.MX usb driver, please check Chapter 39 CHIPIDEA USB Driver

description of "HNP and SRP" in attached Linux Manual.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos