diff mbox

[U-Boot,v4,2/3] AM335x : Configs to add USB support.

Message ID 1340969606-8448-3-git-send-email-harman_sohanpal@ti.com
State Superseded
Delegated to: Marek Vasut
Headers show

Commit Message

Harman Sohanpal June 29, 2012, 11:33 a.m. UTC
Adds required configs in config file for
am335x_evm to add support for usb.
Host mode or device mode selected according to 
the USB module selected from boards.cfg file.
Host for USB1 and device for USB0.
By default USB0 is selected.

Signed-off-by: Harman Sohanpal <harman_sohanpal@ti.com>
---
Changes for v2:
	- #define cleanups
Changes for v3:
	- remove configs for usb as keyboard in host mode.
	- removed extra test of CONFIG_USB_AM335X
	- changed commit message.
Changes for v4:
	-Selecting USB module according to config selected 
	 from boards.cfg file.
	- Selecting host mode if USB1 is selected.
	- Selecting device mode if USB0 is selected.

 include/configs/am335x_evm.h |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index d0fbc88..2a3ae0c 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -165,6 +165,42 @@ 
 #define CONFIG_SKIP_LOWLEVEL_INIT
 #endif
 
+
+/*
+ * USB configuration
+ * Enables CONFIG_MUSB_HCD for Host functionalities MSC for USB1
+ * Enables CONFIG_MUSB_UDC for Device functionalities for USB0
+ * Selected according to the USB module selected from boards.cfg.
+ */
+
+#define CONFIG_USB_AM335X
+#ifdef CONFIG_AM335X_USB0
+#define CONFIG_MUSB_UDC
+#elif defined(CONFIG_AM335X_USB1)
+#define CONFIG_MUSB_HCD
+#endif
+
+#ifdef CONFIG_MUSB_HCD
+#define CONFIG_CMD_USB
+#define CONFIG_USB_STORAGE
+#define CONGIG_CMD_STORAGE
+#define CONFIG_CMD_FAT
+#endif /* CONFIG_MUSB_HCD */
+
+#ifdef CONFIG_MUSB_UDC
+/* USB device configuration */
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_USB_DEVICE
+#define CONFIG_USB_TTY
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+#endif	/* CONFIG_SPL_BUILD */
+/* Change these to suit your needs */
+#define CONFIG_USBD_VENDORID            0x0451
+#define CONFIG_USBD_PRODUCTID           0x5678
+#define CONFIG_USBD_MANUFACTURER        "Texas Instruments"
+#define CONFIG_USBD_PRODUCT_NAME        "AM335xEVM"
+#endif /* CONFIG_MUSB_UDC */
+
 /* Unsupported features */
 #undef CONFIG_USE_IRQ