Skip to contentSkip to conversation

warp: Add USB Mass Storage support

PATCH New Fabio Estevam 3 participants 6 messages Feb 28, 2015 – Mar 2, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 warp: Add USB Mass Storage support

From: Fabio Estevam <[email protected]>

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.

---
Changes since v1:
- Use the standard 'USB Mass Storage' term

 board/warp/warp.c      |  6 ++++++
 include/configs/warp.h | 26 ++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)
board/warp/warp.c +6 -0
index 3b275c2..21ac5e7 100644
@@ -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();
include/configs/warp.h +26 -0
index 82036e4..cfc2323 100644
@@ -120,6 +120,32 @@
 #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" \
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 2/2 warp: Select BOUNCE_BUFFER and CMD_EXT options

From: Fabio Estevam <[email protected]>

Add EXT2/EXT4 and BOUNCE_BUFFER support.

---
Changes since v1:
- None

 include/configs/warp.h | 4 ++++
 1 file changed, 4 insertions(+)
include/configs/warp.h +4 -0
index cfc2323..8379cec 100644
@@ -46,6 +46,10 @@
 #define CONFIG_MMC
 #define CONFIG_CMD_MMC
 #define CONFIG_GENERIC_MMC
+#define CONFIG_BOUNCE_BUFFER
+#define CONFIG_CMD_EXT2
+#define CONFIG_CMD_EXT4
+#define CONFIG_CMD_EXT4_WRITE
 #define CONFIG_CMD_FAT
 #define CONFIG_DOS_PARTITION
 
Signature · 1 line
1.9.1
#3 lore raw

PATCH v2 2/2 warp: Select BOUNCE_BUFFER and CMD_EXT options

In reply to Fabio Estevam
Quoted 6 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Add EXT2/EXT4 and BOUNCE_BUFFER support.

---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#4 lore raw

PATCH v2 1/2 warp: Add USB Mass Storage support

In reply to Fabio Estevam
Quoted 8 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#5 lore raw

PATCH v2 1/2 warp: Add USB Mass Storage support

In reply to Fabio Estevam
Quoted 9 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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.

---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================