summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2017-05-08 01:09:40 -0500
committerYe Li <ye.li@nxp.com>2017-05-08 01:19:14 -0500
commit58e7ec10c0329d25aafe2f857417d48af9bc7ef3 (patch)
tree7b51eb2a56ed0c4bdc99234a11fe36efed42e320
parent9c9835ebceb5465d4d2cbe94e9fa091a24a88d1a (diff)
downloadu-boot-imx-58e7ec10c0329d25aafe2f857417d48af9bc7ef3.zip
u-boot-imx-58e7ec10c0329d25aafe2f857417d48af9bc7ef3.tar.gz
u-boot-imx-58e7ec10c0329d25aafe2f857417d48af9bc7ef3.tar.bz2
MLK-14779 mx6qdlsabreauto: Fix usb detect issue
The recent ehci-mx6 driver can support vbus-supply property, no need to request io expander pins in usb setup. If did this, the regulator for vbus-supply will fail to get due to the pin is occupied. Signed-off-by: Ye Li <ye.li@nxp.com>
-rw-r--r--board/freescale/mx6qsabreauto/mx6qsabreauto.c32
1 files changed, 6 insertions, 26 deletions
diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
index 804b430..83d86b0 100644
--- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c
+++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
@@ -733,32 +733,6 @@ static void setup_usb(void)
* For 6dl, this bit is reserved.
*/
imx_iomux_set_gpr_register(1, 13, 1, 0);
-
-#ifdef CONFIG_DM_PCA953X
- struct gpio_desc desc;
- int ret;
-
- ret = dm_gpio_lookup_name("gpio@32_7", &desc);
- if (ret)
- return;
-
- ret = dm_gpio_request(&desc, "usb_host1_pwr");
- if (ret)
- return;
-
- dm_gpio_set_dir_flags(&desc, GPIOD_IS_OUT);
-
- ret = dm_gpio_lookup_name("gpio@34_1", &desc);
- if (ret)
- return;
-
- ret = dm_gpio_request(&desc, "usb_otg_pwr");
- if (ret)
- return;
-
- dm_gpio_set_dir_flags(&desc, GPIOD_IS_OUT);
-#endif
-
}
int board_ehci_power(int port, int on)
@@ -794,6 +768,9 @@ int board_ehci_power(int port, int on)
ret = dm_gpio_lookup_name("gpio@34_1", &desc);
if (ret)
return ret;
+
+ dm_gpio_request(&desc, "usb_otg_pwr");
+ dm_gpio_set_dir_flags(&desc, GPIOD_IS_OUT);
if (on)
dm_gpio_set_value(&desc, 1);
@@ -804,6 +781,9 @@ int board_ehci_power(int port, int on)
ret = dm_gpio_lookup_name("gpio@32_7", &desc);
if (ret)
return ret;
+
+ dm_gpio_request(&desc, "usb_host1_pwr");
+ dm_gpio_set_dir_flags(&desc, GPIOD_IS_OUT);
if (on)
dm_gpio_set_value(&desc, 1);