iMX7 USB otg / host role switch at runtime

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

iMX7 USB otg / host role switch at runtime

627 Views
davidwhitehouse
Contributor I

Hello,

We've got an iMX7 system running - using USB1 with a MicroUSB connector (with ID pin connection) and a USB type A on it (obviously only connecting to 1 of the connectors at a time).

For flashing the eMMC we're using the UUU tool. For the booted system we want the USB1 configured as a HOST so we set the device tree to dr_mode = "host"; - this then breaks the UUU tool as the system boots in HOST mode and cannot connect to UUU.

We're now configuring the dr_mode = "otg"; so the UUU can run and update the board when needed, but late in boot sequence we want to switch to HOST mode for the USB type A connector to work.

Is there a runtime method (Linux) we can use to switch the USB interface from otg to host without needing the USB ID pin?

Kind regards,

Dave

Labels (2)
0 Kudos
1 Reply

608 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

 The dr_mode = "otg" is for dual role for usb, so you do not need to modify. But the roles can not switch at runtime, for host and device is depending on the hardware connect and usb work mode. When you use the uuu to download it will work on device mode. When system runs on the board, and you connect the usb keyboard or usb to usb via the otg line, it will work as host mode.

0 Kudos