host/otg切换

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

host/otg切换

2,527 次查看
强王
Contributor IV

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

标签 (3)
标记 (2)
0 项奖励
回复
4 回复数

2,182 次查看
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 项奖励
回复

2,182 次查看
强王
Contributor IV

Dear Wang:

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

    

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

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

0 项奖励
回复

2,182 次查看
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 项奖励
回复

2,182 次查看
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 项奖励
回复