AnsweredAssumed Answered

USB interface on IMX6

Question asked by j b on Jul 30, 2014
Latest reply on Aug 4, 2014 by CarlosCasillas

I'm confused about the correct way to wire and use the USB interfaces both OTG and host on the IMX6 on custom hardware. 

 

Chapter 65 of the reference manual lists pins used for OTG controller.

• USB_OTG_VBUS

• USB_OTG_DN

• USB_OTG_DP

• USB_OTG_CHD_B, see Universal Serial Bus 2.0 Integrated PHY (USB-PHY).

The following external signals are multiplexed with other pins. For the pin mapping, see

External Signals. For the IOMUXC register setting, see IOMUX Controller (IOMUXC)

• USB_OTG_ID

• USB_OTG_PWR

• USB_OTG_OC

 

Here are the IMX6 multiplexed cpu pad's I used.

GPIO_1:       USB_OTG_ID

KEY_COL4:  USB_OTG_OC

KEY_ROW4: USB_OTG_PWR_EN

 

GPIO_3: USB_H1_OC

GPIO_0: USB_H1_PWR_EN

 

In the kernel I've chosen the usb function for each of the multiplexed GPIO pins in my board-custom.h file.

MX6Q_PAD_GPIO_0__USBOH3_USBH1_PWR

MX6Q_PAD_GPIO_1__USBOTG_ID

MX6Q_PAD_GPIO_3__USBOH3_USBH1_OC

MX6Q_PAD_KEY_COL4_USBOH3_USBOTG_OC

MX6Q_PAD_KEY_ROW4_USBOH3_USBOTG_PWR

Additionally, I've set bit 13 of GPR1.

 

However, I'm confused by the MX6Q sabresd dev kit.  Why does the kernel code set it's USB power pins (for both OTG and H1) to the gpio function instead of the USBOH3 PWR function?

Specifically in board-mx6q_sabresd.h file:

/* USB power pin */

MX6Q_PAD_EIM_D22__GPIO_3_22

MX6Q_PAD_ENET_TXD1__GPIO_1_29


How do I edit my board-custom.c file to reflect my hardware using the the USB mux functions?  Specifically, if I use the USB mux power I'm not sure how to write mx6_set_otghost_vbus_func

mx6_set_host1_vbus_func


 

 

Here is my schematic showing the connections to the two USB connectors.

usb.png

Outcomes