HI igorpadykov ,
I have tried for both Host and Device mode configuration using OTG, In device mode it's working fine but in host mode device(pendrive with OTG cable) continuously disconnecting and reconnecting. For Reference i have attached the log below with my menu configurations and device tree.
LOG:
root@imx6_fs_wcam:~# usb 2-1: New USB device found, idVendor=1908, idProduct=0226
usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 2-1: USB disconnect, device number 89
usb 2-1: new high-speed USB device number 90 using ci_hdrc
usb 2-1: New USB device found, idVendor=1908, idProduct=0226
usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
root@imx6_fs_wcam:~# usb 2-1: USB disconnect, device number 90
usb 2-1: new high-speed USB device number 91 using ci_hdrc
usb 2-1: New USB device found, idVendor=1908, idProduct=0226
usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 2-1: USB disconnect, device number 91
usb 2-1: new high-speed USB device number 92 using ci_hdrc
usb 2-1: New USB device found, idVendor=1908, idProduct=0226
usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 2-1: USB disconnect, device number 92
usb 2-1: new high-speed USB device number 93 using ci_hdrc
root@imx6_fs_wcam:~# usb 2-1: New USB device found, idVendor=1908, idProduct=0226
usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 2-1: USB disconnect, device number 93
usb 2-1: new high-speed USB device number 94 using ci_hdrc
usb 2-1: New USB device found, idVendor=1908, idProduct=0226
usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 2-1: USB disconnect, device number 94
root@imx6_fs_wcam:~# usb 2-1: new high-speed USB device number 95 using ci_hdrc
usb 2-1: New USB device found, idVendor=1908, idProduct=0226
usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 2-1: USB disconnect, device number 95
Menuconfig: (kernel - 3.14.28 yocto setup)
CONFIG_IMX_HAVE_PLATFORM_FSL_USB2_UDC=y
CONFIG_USB_HID=y
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_COMMON=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_DEFAULT_PERSIST=y
CONFIG_USB_OTG=y
CONFIG_USB_OTG_FSM=y
CONFIG_USB_WUSB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_FSL_MPH_DR_OF=y
CONFIG_USB_EHCI_PCI=y
CONFIG_USB_EHCI_MXC=y
CONFIG_USB_EHCI_HCD_PLATFORM=y
CONFIG_USB_HWA_HCD=y
CONFIG_USB_STORAGE=m
CONFIG_USB_STORAGE_DEBUG=y
CONFIG_USB_CHIPIDEA=y
CONFIG_USB_CHIPIDEA_UDC=y
CONFIG_USB_CHIPIDEA_HOST=y
CONFIG_USB_PHY=y
CONFIG_USB_MXS_PHY=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DEBUG_FS=y
CONFIG_USB_GADGET_VBUS_DRAW=2
CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
CONFIG_USB_FSL_USB2=y
CONFIG_USB_LIBCOMPOSITE=m
CONFIG_USB_F_MASS_STORAGE=m
CONFIG_USB_MASS_STORAGE=m
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>;
output-high;
enable-active-high;
};
reg_usb_h1_vbus: regulator@1 {
compatible = "regulator-fixed";
reg = <1>;
regulator-name = "usb_h1_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio1 29 0>;
enable-active-high;
};
pinctrl_usbotg: usbotggrp {
fsl,pins = <
MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059
MX6QDL_PAD_EIM_D21__USB_OTG_OC 0x80000000
>;
};
&usbh1 {
vbus-supply = <®_usb_h1_vbus>;
status = "okay";
};
&usbotg {
vbus-supply = <®_usb_otg_vbus>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg>;
dr-mode="otg";
output-high;
disable-over-current;
status = "okay";
};
Kindly help me to resolve this issue.
Thanks
Lavanya