The i.MX6UL CPU has two USB 2.0 OTG ports with integrated PHYs.

USB interfaces on the ConnectCore 6UL

On the ConnectCore 6UL system-on-module both USB OTG ports are available for peripheral use.

On the ConnectCore 6UL SBC Express:

  • USB_OTG1 is available at:

    • the bottom port of the stackable dual USB A-type connector on the top side of the board.

    • the micro AB-type connector on the bottom side of the board.

      The USB device shares the USB_OTG1 instance of the i.MX6UL processor with the bottom USB host port of the stacked connector. Connecting two devices to the USB_OTG1 port at the same time will cause a short circuit in the differential data pair.
  • USB_OTG2 is available at the top port of the stackable dual USB A-type connector on the top side of the board.

On the ConnectCore 6UL SBC Pro:

  • USB_OTG1 is available at the micro AB-type connector on the bottom side of the board.

  • USB_OTG2 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 6UL 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 6UL 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.MX6UL 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.MX6UL USB drivers are located at drivers/usb/.

File Description

chipidea/core.c

Chipidea IP core driver

chipidea/udc.c

Chipidea peripheral driver

chipidea/host.c

Chipidea host driver

chipidea/ci_hdrc_imx.c

i.MX glue layer

chipidea/otg.c

Chipidea OTG driver

chipidea/otg_fsm.c

Chipidea OTG HNP and SRP driver

chipidea/usbmisc_imx.c

i.MX SoC abstract layer

phy/phy-mxs-usb.c

i.MX USB physical driver

Device tree bindings and customization

The i.MX6UL USB controller device tree bindings are documented at Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt.

Example: ConnectCore 6UL SBC Express

Both USB OTG ports are configured by default to work as host. This is selected via the dr_mode property on the device tree:

ConnectCore 6UL SBC Express device tree
&usbotg1 {
	dr_mode = "host";
	power-active-high;
	disable-over-current;
	status="okay"
};

&usbotg2 {
	dr_mode = "host";
	power-active-high;
	disable-over-current;
	status="okay"
};

Example: ConnectCore 6UL SBC Pro

USB_OTG1 is configured by default to work as otg, while USB_OTG2 is configured as host. This is selected via the dr_mode property on the device tree.

The ConnectCore 6UL SBC Pro uses:

  • Pad GPIO0 (GPIO1_IO0) as OTG1 ID

  • Pad GPIO1 (GPIO1_IO1) as OTG1 Overcurrent

  • Pad GPIO4 (GPIO1_IO4) as OTG1 power enable

ConnectCore 6UL SBC Pro device tree
&usbotg1 {
	dr_mode = "otg";
	vbus-supply = <&reg_usb_otg1_vbus>;
	pinctrl-0 = <&pinctrl_usbotg1>;
	power-active-high;
	status = "okay";
};

&usbotg2 {
	dr_mode = "host";
	power-active-high;
	disable-over-current;
	status = "okay";
};

&iomuxc {
	imx6ul-ccimx6ul {

		pinctrl_usbotg1: usbotg1grp {
			fsl,pins = <
				MX6UL_PAD_GPIO1_IO00__ANATOP_OTG1_ID    0x17059
				MX6UL_PAD_GPIO1_IO04__GPIO1_IO04    0x17059 /* USBOTG1 PWR */
				MX6UL_PAD_GPIO1_IO01__USB_OTG1_OC    0x17059
			>;
		};
	};
};

Using the USB port

See the following topics for information on how to use the USB port.