iMX7 USB otg / host role switch at runtime

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

iMX7 USB otg / host role switch at runtime

658 次查看
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

标签 (2)
0 项奖励
1 回复

639 次查看
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 项奖励