在线时间164 小时
UID3253536
注册时间2016-3-21
NXP金币0
该用户从未签到
超级版主
 
- 积分
- 1566
- 最后登录
- 2023-1-17
|
硬件:usb otg diagram, as follow
软件:
Software: You can use USB OTG port for both host mode and device gadget mode. Thereare 2 signals you should care:- USB_OTG_ID- USB_OTG_MODE (control power for usb vbus in host mode, this is EIM_D22pin) In device tree:reg_usb_otg_vbus: regulator@0 {
compatible = "regulator-fixed";
reg = <0>;
regulator-name = "usb_otg_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio3 22 0>;
enable-active-high;
}; pinctrl_usbotg: usbotggrp {
fsl,pins = <
MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059 MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000
>;
}; &usbotg {
vbus-supply =<®_usb_otg_vbus>;
pinctrl-names = "default";
pinctrl-0 =<&pinctrl_usbotg>; disable-over-current; srp-disable; hnp-disable; adp-disable;
dr_mode = "otg";
status = "okay";
}; With aboveconfig, one can use OTG port for mouse, usb stick in host mode, and gadget modefor ADB
|
|