]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
warp: Add USB Mass Storage support
authorFabio Estevam <fabio.estevam@freescale.com>
Sat, 28 Feb 2015 18:16:42 +0000 (15:16 -0300)
committerStefano Babic <sbabic@denx.de>
Mon, 2 Mar 2015 10:55:26 +0000 (11:55 +0100)
With UMS support we are able to flash the eMMC from U-boot, which is very
convenient.

Add UMS support to make the eMMC flashing process easier.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
board/warp/warp.c
include/configs/warp.h

index 3b275c2ce16104b65eb7cf96e5cb88441cb0eed6..21ac5e7d7413a5a49a3015f04af8e7185b67b44d 100644 (file)
@@ -21,6 +21,7 @@
 #include <watchdog.h>
 #include <fsl_esdhc.h>
 #include <mmc.h>
+#include <usb.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -82,6 +83,11 @@ int board_mmc_init(bd_t *bis)
        return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
 }
 
+int board_usb_phy_mode(int port)
+{
+       return USB_INIT_DEVICE;
+}
+
 int board_early_init_f(void)
 {
        setup_iomux_uart();
index 82036e497f40544c308e548f06eeffbee9a8d768..22acdcaf2518132641bcb118d5e922ade84a03b0 100644 (file)
 #define CONFIG_CMD_CACHE
 #endif
 
+/* USB Configs */
+#define CONFIG_CMD_USB
+#ifdef CONFIG_CMD_USB
+#define CONFIG_USB_EHCI
+#define CONFIG_USB_EHCI_MX6
+#define CONFIG_USB_STORAGE
+#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
+#define CONFIG_MXC_USB_PORTSC          (PORT_PTS_UTMI | PORT_PTS_PTW)
+#define CONFIG_MXC_USB_FLAGS           0
+#define CONFIG_USB_MAX_CONTROLLER_COUNT        1 /* Only OTG2 port enabled */
+#endif
+
+#define CONFIG_CI_UDC
+#define CONFIG_USBD_HS
+#define CONFIG_USB_GADGET_DUALSPEED
+
+#define CONFIG_USB_GADGET
+#define CONFIG_CMD_USB_MASS_STORAGE
+#define CONFIG_USB_GADGET_MASS_STORAGE
+#define CONFIG_USBDOWNLOAD_GADGET
+#define CONFIG_USB_GADGET_VBUS_DRAW    2
+
+#define CONFIG_G_DNL_VENDOR_NUM                0x0525
+#define CONFIG_G_DNL_PRODUCT_NUM       0xa4a5
+#define CONFIG_G_DNL_MANUFACTURER      "FSL"
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
        "script=boot.scr\0" \
        "image=zImage\0" \