Hi All,
We are working on IMX6Q based customize board. We are working on wand board based linux kernel. Kernel variant : imx_3.14.28
IWe have USB OTG device on our board.
We want to test USB OTG in host mode and gadget mode.
Which are required modules to test USB OTG in both mode?
Which device entry it will create once modules get loaded successfully?
Which config option we need to enable in kernel config file?
Thanks,
Jemish
Hi Jemish
one can test USB with unit tests (imx-test):
folder .../mxc_usb_test
http://repository.timesys.com/buildsources/i/imx-test/imx-test-3.14.28-1.0.0/
for kernel config file refer to attached Linux Manual Chapter 41 CHIPIDEA USB Driver
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor,
Thanks a lot for your suggestion!
Sorry for late response got stuck with some other work!
With reference manual you provided we managed to make some progress on USB-OTG but not completely.
&usbotg {
vbus-supply = <®_usb_otg_vbus>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg_1>;
disable-over-current;
dr_mode = "otg";
status = "okay";
};
We haven't tested in host mode yet we will keep you posted for the same.
Thanks,
Jemish
Hi Igor,
One more input from my side. What should be pin configuration settings in device tree file for USB OTG to work in both mode "host" and "gadget").
For me both modes are working individually but not simultaneously.
HOST mode pin configurations:
NOTE : With below pin configuration only HOST mode is working fine.
reg_usb_otg_vbus: usb_otg_vbus {
compatible = "regulator-fixed";
regulator-name = "usb_otg_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio3 22 0>;
enable-active-high;
};
usbotg {
pinctrl_usbotg_1: usbotggrp-1 {
fsl,pins = <
MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059
MX6QDL_PAD_KEY_COL4__USB_OTG_OC 0x17059
MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x000b0
>;
};
&usbotg {
vbus-supply = <®_usb_otg_vbus>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg_1>;
disable-over-current;
dr_mode = "otg";
status = "okay";
}
Gadget Mode : (Comment out ID pin: Which is strange)
With below pin configuration only Gadget mode is working
usbotg {
pinctrl_usbotg_1: usbotggrp-1 {
fsl,pins = <
/* MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059 */
MX6QDL_PAD_KEY_COL4__USB_OTG_OC 0x17059
MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x000b0
>;
};
Please suggest.
Thanks,
Jemish
Hi Igor,
This is got resolved. This is was happening due to hardware bug.
Below are the observations.
We can close this thread now.
Thanks,
Jemish