Skip to contentSkip to conversation

n810 USB: Initialize USB-FS

RFC PATCH In review Michael Buesch 1 participant 2 messages Mar 9, 2011 – Mar 16, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 n810 USB: Initialize USB-FS

The "omap_otg" platform device has to be registered in order to get USB working on the n810.
I currently do this by calling the USB-FS init, which in turn registers the omap_otg platform device.

The omap_usb_config structure values were copied from n770 code, so I have no idea whether this is correct or not.

However, with all the patches I just sent (including this one), I get USB working properly on the n810.

---

arch/arm/mach-omap2/board-n8x0.c +11 -0
Index: linux-2.6.38-rc7/arch/arm/mach-omap2/board-n8x0.c
===================================================================
@@ -40,6 +40,7 @@
 #include <plat/serial.h>
 #include <plat/cbus.h>
 #include <plat/gpio-switch.h>
+#include <plat/usb.h>
 
 #include "mux.h"
 
@@ -395,6 +396,14 @@ static struct musb_hdrc_platform_data tu
 	.config		= &musb_config,
 };
 
+static struct omap_usb_config n8x0_omap_usb_config __initdata = {
+	.otg		= 1,
+	.register_host	= 1,
+	.register_dev	= 1,
+	.hmc_mode	= 16,
+	.pins[0]	= 6,
+};
+
 static void __init n8x0_usb_init(void)
 {
 	int ret = 0;
@@ -417,6 +426,8 @@ static void __init n8x0_usb_init(void)
 	if (ret != 0)
 		goto err;
 
+	omap2_usbfs_init(&n8x0_omap_usb_config);
+
 	printk(announce);
 
 	return;
Signature · 1 line
Greetings, Michael.
#1 lore raw
Quoted 44 lines · Michael Buesch

The "omap_otg" platform device has to be registered in order to get USB working on the n810.
I currently do this by calling the USB-FS init, which in turn registers the omap_otg platform device.

The omap_usb_config structure values were copied from n770 code, so I have no idea whether this is correct or not.

However, with all the patches I just sent (including this one), I get USB working properly on the n810.

---

Index: linux-2.6.38-rc7/arch/arm/mach-omap2/board-n8x0.c
===================================================================

arch/arm/mach-omap2/board-n8x0.c +9 -0
@@ -40,6 +40,7 @@
 #include <plat/serial.h>
 #include <plat/cbus.h>
 #include <plat/gpio-switch.h>
+#include <plat/usb.h>
 
 #include "mux.h"
 
@@ -395,6 +396,14 @@ static struct musb_hdrc_platform_data tu
 	.config		= &musb_config,
 };
 
+static struct omap_usb_config n8x0_omap_usb_config __initdata = {
+	.otg		= 1,
+	.register_host	= 1,
+	.register_dev	= 1,
+	.hmc_mode	= 16,
+	.pins[0]	= 6,
+};
+
 static void __init n8x0_usb_init(void)
 {
 	int ret = 0;

arch/arm/mach-omap2/board-n8x0.c static void __init n8x0_usb_init(void) · line 433

Quoted 8 lines
arch/arm/mach-omap2/board-n8x0.c +2 -0
@@ -417,6 +426,8 @@ static void __init n8x0_usb_init(void)
 	if (ret != 0)
 		goto err;
 
+	omap2_usbfs_init(&n8x0_omap_usb_config);
+
 	printk(announce);
 
 	return;

Is there any news on this one?
If not, I'd suggest merging this in its current form, even if we're unsure whether it's 100% correct, because it actually makes the USB work on the n810.

If you merge this, you can add a

Signature · 1 line
Greetings Michael.