i.MX6 USB OTG with 3.18.19 kernel

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

i.MX6 USB OTG with 3.18.19 kernel

1,801 Views
daviidr
Contributor I

Hi,

I am porting a Linux 3.18.19 kernel on a board which features an i.MX6.

I would like to use it as a real USB OTG, ie as a device or as a host depending on the USB_OTG_ID pin: when low the interface act as a host, when high it acts as a device.

The hardware is OK, as the USB OTG is working as host or device with a Linux 3.0.35 kernel.

When I connect a USB stick to USB OTG, it is enumerated.

When I connect USB OTG to a host PC and "modprobe g_mass_storage", the USB OTG is enumerated by the host PC.

I also see on the a scope that the USB_OTG_ID pin is correctly driven.

With the 3.18.19 kernel, I cannot have both device and host working as expected, even if the USB_OTG_ID is correctly driven.

I can only have one feature working, depending on dr_mode value in the the device tree.

1) &usbotg {

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_usbotg>;

        vbus-supply = <&reg_5p0v>;

        disable-over-current;

        dr_mode = "otg";

        status = "okay";

};

=> USB OTG can enumerate a USB stick (host OK), but cannot be enumerated by a host PC (device NOK)

After connecting to a host PC, I see the following output in dmesg:  ci_hdrc ci_hdrc.0: timeout waiting for 00000800 in 11

2)

&usbotg {

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_usbotg>;

        vbus-supply = <&reg_5p0v>;

        disable-over-current;

        dr_mode = "peripheral";

        status = "okay";

};

=> USB OTG is enumerated by the host PC (device OK), but it cannot enumerate a USB stick (host NOK)

This seems normal, as the USB OTG is described as a peripheral, so it cannot work as a host.

What am I missing to have USB OTG working as a real OTG in case 1) ?

Regards,

David

0 Kudos
3 Replies

978 Views
fabio_estevam
NXP Employee
NXP Employee

3.18 is not a supported kernel version. Please use a recent kernel (4.1 from NXP or 4.13.2 from mainline) and let us know if you face these issues.

0 Kudos

978 Views
ramyaravichandr
Contributor I

Hi David,

As suggested by Linux device tree, dr_mode="otg" has to support the real OTG mode.

Actually for the first case,ci_hdrc is the host USB driver. It says Timeout.

Can you please share the debug log here for investigation?

Also, it will be great if you can  share the behaviour  for the following changes:

Host functionality  by setting  dr_mode="host".

Thanks,

Ramya

0 Kudos

978 Views
BiyongSUN
NXP Employee
NXP Employee

Please Use freescale standard BSP release

L3.10.17, L3.10.53, L3.14.28 to try.

0 Kudos