目前使用OTG USB口,有没有办法在软件可以动态切换为host/otg 功能
Hi Qiang,
人为地控制它,是做不到的,因为不符合OTG设计的协议。
Have a great day,
Dan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Dear Wang:
现在有这么个需求,在OTG 那个USB口,既想能做HOST插U盘,又想能做OTG连MFG烧写.
以前我们是硬件做了一个开关,把OTG的ID脚拉高/拉低实现的
有没有办法通过软件来实现这个功能
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.
Hi Qiang,
OTG的工作方式,不是这样的。应该是:根据外面接入的USB 设备类型,自动检测,并转换状态的。
Have a great day,
Dan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------