Skip to contentSkip to conversation

arm: socfpga: config: Add USB support example

PATCH New Marek Vasut 2 participants 4 messages Oct 24, 2014 – Oct 27, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: socfpga: config: Add USB support example

Add example configuration stub for the DWC2 USB controller.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Vince Bridgers <[email protected]>
Cc Pavel Machek <[email protected]>
---
 include/configs/socfpga_common.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
include/configs/socfpga_common.h +15 -0
index 9de3aa7..1df886b 100644
@@ -176,6 +176,21 @@
 #define CONFIG_BAUDRATE			115200
 
 /*
+ * USB
+ */
+#ifdef CONFIG_CMD_USB
+#define CONFIG_USB_DWC2
+#define CONFIG_USB_STORAGE
+/*
+ * NOTE: User must define either of the following to select which
+ *       of the two USB controllers available on SoCFPGA to use.
+ *       The DWC2 driver doesn't support multiple USB controllers.
+ * #define CONFIG_USB_DWC2_REG_ADDR	SOCFPGA_USB0_ADDRESS
+ * #define CONFIG_USB_DWC2_REG_ADDR	SOCFPGA_USB1_ADDRESS
+ */
+#endif
+
+/*
  * U-Boot environment
  */
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
Signature · 1 line
2.0.0
#1 lore raw

PATCH 1/1 arm: socfpga: config: Add USB support example

Quoted 24 lines · Marek Vasut

Add example configuration stub for the DWC2 USB controller.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Vince Bridgers <[email protected]>
Cc Pavel Machek <[email protected]>
---
 include/configs/socfpga_common.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
include/configs/socfpga_common.h +5 -0
index 9de3aa7..1df886b 100644
@@ -176,6 +176,21 @@
 #define CONFIG_BAUDRATE			115200
 
 /*
+ * USB
+ */
+#ifdef CONFIG_CMD_USB
+#define CONFIG_USB_DWC2
+#define CONFIG_USB_STORAGE

include/configs/socfpga_common.h line 193

Quoted 10 lines
include/configs/socfpga_common.h +10 -0
+/*
+ * NOTE: User must define either of the following to select which
+ *       of the two USB controllers available on SoCFPGA to use.
+ *       The DWC2 driver doesn't support multiple USB controllers.
+ * #define CONFIG_USB_DWC2_REG_ADDR	SOCFPGA_USB0_ADDRESS
+ * #define CONFIG_USB_DWC2_REG_ADDR	SOCFPGA_USB1_ADDRESS
+ */
+#endif
+
+/*

Actually, I believe you should uncomment whatever configuration works for you. That way, users can see what you are actually using/testing.

With that:

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw

PATCH 1/1 arm: socfpga: config: Add USB support example

Quoted 33 lines · Pavel Machek
Quoted 32 lines · Marek Vasut

Add example configuration stub for the DWC2 USB controller.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Vince Bridgers <[email protected]>
Cc Pavel Machek <[email protected]>

---

 include/configs/socfpga_common.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
(quoted diff) +0 -0

b/include/configs/socfpga_common.h index 9de3aa7..1df886b 100644

include/configs/socfpga_common.h +10 -0
@@ -176,6 +176,21 @@
 
 #define CONFIG_BAUDRATE			115200
 
 /*
 
+ * USB
+ */
+#ifdef CONFIG_CMD_USB
+#define CONFIG_USB_DWC2
+#define CONFIG_USB_STORAGE
+/*
+ * NOTE: User must define either of the following to select which
+ *       of the two USB controllers available on SoCFPGA to use.
+ *       The DWC2 driver doesn't support multiple USB controllers.
+ * #define CONFIG_USB_DWC2_REG_ADDR	SOCFPGA_USB0_ADDRESS
Quoted 8 lines

include/configs/socfpga_common.h line 193

Quoted 5 lines
include/configs/socfpga_common.h +5 -0
+ * #define CONFIG_USB_DWC2_REG_ADDR	SOCFPGA_USB1_ADDRESS
+ */
+#endif
+
+/*

Actually, I believe you should uncomment whatever configuration works for you. That way, users can see what you are actually using/testing.

This is common config code, the user is supposed to define his own setup in board config code (ie. socfpga_cyclone5.h) . A subsequent patch doing just that would be fine.

Quoted 4 lines

With that:

Pavel

Best regards,
Marek Vasut