The i.MX6 CPU has one USB 2.0 OTG port with integrated PHY and three USB 2.0 Host ports.
USB interfaces on the ConnectCore 6
On the ConnectCore 6 system-on-module:
-
The USB OTG controller is available for peripheral use.
-
One USB Host controller is available for peripheral use.
On the ConnectCore 6 SBC:
-
USB_OTG is available at the micro AB-type connector on the bottom side of the board.
-
USB_H1 is connected to a four-port USB hub that makes it available at:
-
both ports of the stackable dual USB A-type connector on the top side of the board.
-
the PCIe connector.
-
the XBee socket (also available on an expansion connector).
-
Kernel configuration
You can manage the USB 2.0 support through the kernel configuration options:
-
Support for Host-side USB (CONFIG_USB)
-
EHCI HCD (USB 2.0) support (CONFIG_USB_EHCI_HCD)
-
ChipIdea Highspeed Dual Role Controller (CONFIG_USB_CHIPIDEA)
-
ChipIdea device controller (CONFIG_USB_CHIPIDEA_UDC)
-
ChipIdea host controller (CONFIG_USB_CHIPIDEA_HOST)
-
Freescale MXS USB PHY support (CONFIG_USB_MXS_PHY)
-
OTG support (CONFIG_USB_OTG)
All of these kernel configuration options are enabled as built-in on the default ConnectCore 6 SBC kernel configuration file.
The USB device driver provides the functionality for the USB gadget drivers. The USB gadget drivers implement one or more "functions", each providing a different capability.
The following gadget drivers are supported and enabled as loadable modules on the default ConnectCore 6 SBC kernel configuration file.
-
Mass Storage Gadget (CONFIG_USB_MASS_STORAGE)
-
Ethernet Gadget with CDC Ethernet support (CONFIG_USB_ETH)
-
Serial Gadget with ACM and CDC OBEX support (CONFIG_USB_G_SERIAL)
Gadget drivers are enabled as loadable modules because only one gadget function can be used at a time. Before using a gadget driver, you must first make sure no other gadget driver is loaded. |
Kernel driver
The i.MX6 universal serial bus (USB) driver implements a standard Linux driver interface to the CHIPIDEA USB-HS On-The-Go (OTG) controller. The CHIPIDEA USB controller is enhanced host controller interface (EHCI) compliant.
The i.MX6 USB drivers are located at drivers/usb/.
File | Description |
---|---|
Chipidea IP core driver |
|
Chipidea peripheral driver |
|
Chipidea host driver |
|
i.MX glue layer |
|
Chipidea OTG driver |
|
Chipidea OTG HNP and SRP driver |
|
i.MX SoC abstract layer |
|
i.MX USB physical driver |
Device tree bindings and customization
The i.MX6 USB controller device tree bindings are documented at Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt.
Example: USB Host on the ConnectCore 6 SBC
USB_H1 port is configured by default to work as host.
This is selected via the dr_mode
property on the device tree:
usbh1: usb@02184200 {
compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
reg = <0x02184200 0x200>;
interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6QDL_CLK_USBOH3>;
fsl,usbphy = <&usbphy2>;
fsl,usbmisc = <&usbmisc 1>;
dr_mode = "host";
ahb-burst-config = <0x0>;
tx-burst-size-dword = <0x10>;
rx-burst-size-dword = <0x10>;
status = "disabled";
};
&usbh1 {
fsl,reset-gpio = <&gpio3 10 GPIO_ACTIVE_HIGH>;
status = "okay";
};
Example: USB OTG on the ConnectCore 6 SBC
USB_OTG port is configured by default to work as otg.
This is selected via the dr_mode
property on the device tree, which defaults to otg if not defined.
usbotg: usb@02184000 {
compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
reg = <0x02184000 0x200>;
interrupts = <0 43 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6QDL_CLK_USBOH3>;
fsl,usbphy = <&usbphy1>;
fsl,usbmisc = <&usbmisc 0>;
ahb-burst-config = <0x0>;
tx-burst-size-dword = <0x10>;
rx-burst-size-dword = <0x10>;
fsl,anatop = <&anatop>;
status = "disabled";
};
&usbotg {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg>;
digi,power-line-active-high;
status = "okay";
};
&iomuxc {
usbotg {
pinctrl_usbotg: usbotg {
fsl,pins = <
MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059
MX6QDL_PAD_EIM_D22__USB_OTG_PWR 0x17059
MX6QDL_PAD_EIM_D21__USB_OTG_OC 0x17059
>;
};
};
};
Using the USB port
See the following topics for information on how to use the USB port.