host/otg切换

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

host/otg切换

1,911 Views
强王
Contributor IV

目前使用OTG USB口,有没有办法在软件可以动态切换为host/otg 功能

Labels (3)
Tags (2)
0 Kudos
4 Replies

1,566 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Hi Qiang,

人为地控制它,是做不到的,因为不符合OTG设计的协议。
Have a great day,
Dan

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

0 Kudos

1,566 Views
强王
Contributor IV

Dear Wang:

     现在有这么个需求,在OTG 那个USB口,既想能做HOST插U盘,又想能做OTG连MFG烧写.

    

     以前我们是硬件做了一个开关,把OTG的ID脚拉高/拉低实现的

     有没有办法通过软件来实现这个功能

0 Kudos

1,566 Views
BiyongSUN
NXP Employee
NXP Employee

You can use a dtb file with dr_mode of peripheral for mfg tool usb device mode 

Please check the device tree binding guide

kernel_imx/Documentation/devicetree/bindings/usb/fsl-usb.txt

24  - dr_mode : indicates the working mode for "fsl-usb2-dr" compatible

25    controllers.  Can be "host", "peripheral", or "otg".  Default to

26    "host" if not defined for backward compatibility.

0 Kudos

1,566 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Hi Qiang,

OTG的工作方式,不是这样的。应该是:根据外面接入的USB 设备类型,自动检测,并转换状态的。
Have a great day,
Dan

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

0 Kudos