summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/freescale-mx28-evk
diff options
context:
space:
mode:
authorEric Bénard <eric@eukrea.com>2013-09-10 19:57:56 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-09-11 08:32:20 +0200
commitc002de40aa1a959e9ca70f08b1b461d9409fef6d (patch)
tree3bbb937b2cf91b950910f04015ee71164d770bdd /arch/arm/boards/freescale-mx28-evk
parent000981f61b105a3b3fed4be6ed19158eec5ab969 (diff)
downloadbarebox-c002de40aa1a959e9ca70f08b1b461d9409fef6d.tar.gz
barebox-c002de40aa1a959e9ca70f08b1b461d9409fef6d.tar.xz
mx28-evk: enable USB
- USB1 is host (tested with a mass storage) - USB0 is device (quickly tested with DFU) Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/freescale-mx28-evk')
-rw-r--r--arch/arm/boards/freescale-mx28-evk/mx28-evk.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/boards/freescale-mx28-evk/mx28-evk.c b/arch/arm/boards/freescale-mx28-evk/mx28-evk.c
index 92f0a75655..fa631df95a 100644
--- a/arch/arm/boards/freescale-mx28-evk/mx28-evk.c
+++ b/arch/arm/boards/freescale-mx28-evk/mx28-evk.c
@@ -32,6 +32,8 @@
#include <mach/iomux.h>
#include <mach/ocotp.h>
#include <mach/devices.h>
+#include <mach/usb.h>
+#include <usb/fsl_usb2.h>
#include <spi/spi.h>
#include <asm/armlinux.h>
@@ -135,6 +137,11 @@ static const uint32_t mx28evk_pads[] = {
SSP2_D3 | VE_3_3V | PULLUP(1) | STRENGTH(S8MA), /* SS0 !CS */
SSP2_CMD | VE_3_3V | PULLUP(1) | STRENGTH(S8MA), /* MOSI DIO */
SSP2_SCK | VE_3_3V | PULLUP(1) | STRENGTH(S8MA), /* CLK */
+
+ /* USB VBUS1 ENABLE - default to ON */
+ AUART2_RX_GPIO | VE_3_3V | PULLUP(0) | GPIO_OUT | GPIO_VALUE(1),
+ /* USB VBUS0 ENABLE - default to OFF */
+ AUART2_TX_GPIO | VE_3_3V | PULLUP(0) | GPIO_OUT | GPIO_VALUE(0),
};
static struct mxs_mci_platform_data mci_pdata = {
@@ -247,6 +254,12 @@ static const struct spi_board_info mx28evk_spi_board_info[] = {
}
};
+#ifdef CONFIG_USB_GADGET_DRIVER_ARC
+static struct fsl_usb2_platform_data usb_pdata = {
+ .operating_mode = FSL_USB2_DR_DEVICE,
+ .phy_mode = FSL_USB2_PHY_UTMI,
+};
+#endif
static int mx28_evk_devices_init(void)
{
int i;
@@ -280,6 +293,14 @@ static int mx28_evk_devices_init(void)
add_generic_device("mxs_spi", 2, NULL, IMX_SSP2_BASE, 0x2000,
IORESOURCE_MEM, NULL);
+#ifdef CONFIG_USB_GADGET_DRIVER_ARC
+ imx28_usb_phy0_enable();
+ imx28_usb_phy1_enable();
+ add_generic_usb_ehci_device(DEVICE_ID_DYNAMIC, IMX_USB1_BASE, NULL);
+ add_generic_device("fsl-udc", DEVICE_ID_DYNAMIC, NULL, IMX_USB0_BASE,
+ 0x200, IORESOURCE_MEM, &usb_pdata);
+#endif
+
return 0;
}
device_initcall(mx28_evk_devices_init);