This patch enables USB host support on the MX28EVK board.

Signed-off-by: Matthias Fuchs <matthias.fu...@esd.eu>
---
 board/freescale/mx28evk/mx28evk.c |    7 +++++++
 include/configs/mx28evk.h         |   12 ++++++++++++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/board/freescale/mx28evk/mx28evk.c 
b/board/freescale/mx28evk/mx28evk.c
index 0d04d44..1bc83e9 100644
--- a/board/freescale/mx28evk/mx28evk.c
+++ b/board/freescale/mx28evk/mx28evk.c
@@ -52,6 +52,13 @@ int board_early_init_f(void)
        /* SSP2 clock at 96MHz */
        mx28_set_sspclk(MXC_SSPCLK2, 96000, 0);
 
+#ifdef CONFIG_CMD_USB
+       mxs_iomux_setup_pad(MX28_PAD_SSP2_SS1__USB1_OVERCURRENT);
+       mxs_iomux_setup_pad(MX28_PAD_AUART2_RX__GPIO_3_8 |
+                       MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL);
+       gpio_direction_output(MX28_PAD_AUART2_RX__GPIO_3_8, 1);
+#endif
+
        return 0;
 }
 
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 8a752aa..8f791aa 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -64,6 +64,7 @@
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_NFS
 #define CONFIG_CMD_PING
+#define CONFIG_CMD_USB
 
 /*
  * Memory configurations
@@ -158,6 +159,17 @@
 #endif
 
 /*
+ * USB
+ */
+#ifdef CONFIG_CMD_USB
+#define        CONFIG_USB_EHCI
+#define        CONFIG_USB_EHCI_MXS
+#define        CONFIG_EHCI_MXS_PORT 1
+#define        CONFIG_EHCI_IS_TDI
+#define        CONFIG_USB_STORAGE
+#endif
+
+/*
  * Boot Linux
  */
 #define CONFIG_CMDLINE_TAG
-- 
1.6.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to