diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2014-10-30 10:34:27 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2014-10-30 10:34:27 +0100 |
commit | d59181a8b4ef69b7eb2ed065d8c4d752bbd8b51d (patch) | |
tree | 63990e8e4d9709284773d64f8968fdecf440f312 | |
parent | c0a8c8c179d6d4d27dcd508646586f2bebb6afcc (diff) |
colibri_imx6.c: enable USB host power consistently
-rw-r--r-- | board/toradex/colibri_imx6/colibri_imx6.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index bf52df5e938..d7d53271c41 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -208,17 +208,25 @@ static void setup_iomux_uart(void) int board_ehci_hcd_init(int port) { imx_iomux_v3_setup_multiple_pads(usb_pads, ARRAY_SIZE(usb_pads)); - - /* Set MXM USBH power enable */ - gpio_direction_output(GPIO_USBH_EN, 0); - mdelay(100); - return 0; } int board_ehci_power(int port, int on) { - /* No special PE for USBC, always on when ID pin signals host mode */ + switch (port) { + case 0: + /* control OTG power */ + /* No special PE for USBC, always on when ID pin signals host mode */ + break; + case 1: + /* Control MXM USBH */ + /* Set MXM USBH power enable, '0' means on */ + gpio_direction_output(GPIO_USBH_EN, !on); + mdelay(100); + break; + default: + break; + } return 0; } #endif |