]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mx6qsabrelite: add and enable USB Host 1 support
authorWolfgang Grandegger <wg@denx.de>
Wed, 8 Feb 2012 22:33:26 +0000 (22:33 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Mon, 26 Mar 2012 21:09:23 +0000 (23:09 +0200)
Cc: Stefano Babic <sbabic@denx.de>
Cc: Jason Liu <jason.hui@linaro.org>
Signed-off-by: Wolfgang Grandegger <wg@denx.de>
board/freescale/mx6qsabrelite/mx6qsabrelite.c
include/configs/mx6qsabrelite.h

index f884bb53a091637d8e30ffbda3bfe17dbc80f0ad..db1bea9830640fe75ea18103090b6896977aebb0 100644 (file)
@@ -140,12 +140,30 @@ static void setup_iomux_enet(void)
        imx_iomux_v3_setup_multiple_pads(enet_pads2, ARRAY_SIZE(enet_pads2));
 }
 
+iomux_v3_cfg_t usb_pads[] = {
+       MX6Q_PAD_GPIO_17__GPIO_7_12 | MUX_PAD_CTRL(NO_PAD_CTRL),
+};
+
 static void setup_iomux_uart(void)
 {
        imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
        imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads));
 }
 
+#ifdef CONFIG_USB_EHCI_MX6
+int board_ehci_hcd_init(int port)
+{
+       imx_iomux_v3_setup_multiple_pads(usb_pads, ARRAY_SIZE(usb_pads));
+
+       /* Reset USB hub */
+       gpio_direction_output(GPIO_NUMBER(7, 12), 0);
+       mdelay(2);
+       gpio_set_value(GPIO_NUMBER(7, 12), 1);
+
+       return 0;
+}
+#endif
+
 #ifdef CONFIG_FSL_ESDHC
 struct fsl_esdhc_cfg usdhc_cfg[2] = {
        {USDHC3_BASE_ADDR, 1},
index 982f03f7104ecf58e5505c9c3c4216a1bc4cbf04..93000f037667aeda172cd4afe20edd01f48f5cb6 100644 (file)
 #define CONFIG_PHYLIB
 #define CONFIG_PHY_MICREL
 
+/* USB Configs */
+#define CONFIG_CMD_USB
+#define CONFIG_CMD_FAT
+#define CONFIG_USB_EHCI
+#define CONFIG_USB_EHCI_MX6
+#define CONFIG_USB_STORAGE
+#define CONFIG_USB_HOST_ETHER
+#define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_SMSC95XX
+#define CONFIG_MXC_USB_PORT    1
+#define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
+#define CONFIG_MXC_USB_FLAGS   0
+
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
 #define CONFIG_CONS_INDEX              1