public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] HS-USB support for 2430SDP
@ 2007-05-10 18:34 Kevin Hilman
  2007-05-10 18:34 ` [PATCH 1/2] ARM: OMAP: pin-mux fixups for 2430 Kevin Hilman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kevin Hilman @ 2007-05-10 18:34 UTC (permalink / raw)
  To: linux-omap-open-source

Here is base support for MUSB on the 2430SDP.  It adds mux fixup and
mux regs for HS-USB and the MUSB platform setup code.  Currently works
for gadget only.

Tested on OMAP2430SDP-v2.2 and v5.0.

Kevin

--

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] ARM: OMAP: pin-mux fixups for 2430
  2007-05-10 18:34 [PATCH 0/2] HS-USB support for 2430SDP Kevin Hilman
@ 2007-05-10 18:34 ` Kevin Hilman
  2007-05-10 18:34 ` [PATCH 2/2] ARM: OMAP: Support for HS-USB on 2430SDP Kevin Hilman
  2007-05-16 17:46 ` [PATCH 0/2] HS-USB support for 2430SDP Tony Lindgren
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin Hilman @ 2007-05-10 18:34 UTC (permalink / raw)
  To: linux-omap-open-source

[-- Attachment #1: mux.patch --]
[-- Type: text/plain, Size: 6440 bytes --]

Fix base register used for 2430 which is different from 2420. 
And add mux regs for HSUSB and McBSP

Signed-off-by: Kevin Hilman <khilman@mvista.com>

---
 arch/arm/mach-omap2/mux.c            |   36 ++++++++++++++++++++++++++++++++++
 arch/arm/mach-omap2/prcm-regs.h      |    2 -
 arch/arm/plat-omap/mux.c             |    9 ++++----
 include/asm-arm/arch-omap/mux.h      |   37 +++++++++++++++++++++++++++++++++++
 include/asm-arm/arch-omap/omap24xx.h |    3 ++
 5 files changed, 81 insertions(+), 6 deletions(-)

Index: dev/arch/arm/mach-omap2/mux.c
===================================================================
--- dev.orig/arch/arm/mach-omap2/mux.c
+++ dev/arch/arm/mach-omap2/mux.c
@@ -167,6 +167,42 @@ MUX_CFG_24XX("B3__24XX_KBR5",		0x30,	3,	
 MUX_CFG_24XX("AA4_24XX_KBC2",		0xe7,	3,	0,	0,	1)
 MUX_CFG_24XX("B13_24XX_KBC6",		0x110,	3,	0,	0,	1)
 
+/* 2430 USB */
+MUX_CFG_24XX("AD9_2430_USB0_PUEN",	0x133,	4,	0,	0,	1)
+MUX_CFG_24XX("Y11_2430_USB0_VP",	0x134,	4,	0,	0,	1)
+MUX_CFG_24XX("AD7_2430_USB0_VM",	0x135,	4,	0,	0,	1)
+MUX_CFG_24XX("AE7_2430_USB0_RCV",	0x136,	4,	0,	0,	1)
+MUX_CFG_24XX("AD4_2430_USB0_TXEN",	0x137,	4,	0,	0,	1)
+MUX_CFG_24XX("AF9_2430_USB0_SE0",	0x138,	4,	0,	0,	1)
+MUX_CFG_24XX("AE6_2430_USB0_DAT",	0x139,	4,	0,	0,	1)
+MUX_CFG_24XX("AD24_2430_USB1_SE0",	0x107,	2,	0,	0,	1)
+MUX_CFG_24XX("AB24_2430_USB1_RCV",	0x108,	2,	0,	0,	1)
+MUX_CFG_24XX("Y25_2430_USB1_TXEN",	0x109,	2,	0,	0,	1)
+MUX_CFG_24XX("AA26_2430_USB1_DAT",	0x10A,	2,	0,	0,	1)
+
+/* 2430 HS-USB */
+MUX_CFG_24XX("AD9_2430_USB0HS_DATA3",	0x133,	0,	0,	0,	1)
+MUX_CFG_24XX("Y11_2430_USB0HS_DATA4",	0x134,	0,	0,	0,	1)
+MUX_CFG_24XX("AD7_2430_USB0HS_DATA5",	0x135,	0,	0,	0,	1)
+MUX_CFG_24XX("AE7_2430_USB0HS_DATA6",	0x136,	0,	0,	0,	1)
+MUX_CFG_24XX("AD4_2430_USB0HS_DATA2",	0x137,	0,	0,	0,	1)
+MUX_CFG_24XX("AF9_2430_USB0HS_DATA0",	0x138,	0,	0,	0,	1)
+MUX_CFG_24XX("AE6_2430_USB0HS_DATA1",	0x139,	0,	0,	0,	1)
+MUX_CFG_24XX("AE8_2430_USB0HS_CLK",	0x13A,	0,	0,	0,	1)
+MUX_CFG_24XX("AD8_2430_USB0HS_DIR",	0x13B,	0,	0,	0,	1)
+MUX_CFG_24XX("AE5_2430_USB0HS_STP",	0x13c,	0,	1,	1,	1)
+MUX_CFG_24XX("AE9_2430_USB0HS_NXT",	0x13D,	0,	0,	0,	1)
+MUX_CFG_24XX("AC7_2430_USB0HS_DATA7",	0x13E,	0,	0,	0,	1)
+
+/* 2430 McBSP */
+MUX_CFG_24XX("AC10_2430_MCBSP2_FSX",	0x012E,	1,	0,	0,	1)
+MUX_CFG_24XX("AD16_2430_MCBSP2_CLX",	0x012F,	1,	0,	0,	1)
+MUX_CFG_24XX("AE13_2430_MCBSP2_DX",	0x0130,	1,	0,	0,	1)
+MUX_CFG_24XX("AD13_2430_MCBSP2_DR",	0x0131,	1,	0,	0,	1)
+MUX_CFG_24XX("AC10_2430_MCBSP2_FSX_OFF",0x012E,	0,	0,	0,	1)
+MUX_CFG_24XX("AD16_2430_MCBSP2_CLX_OFF",0x012F,	0,	0,	0,	1)
+MUX_CFG_24XX("AE13_2430_MCBSP2_DX_OFF",	0x0130,	0,	0,	0,	1)
+MUX_CFG_24XX("AD13_2430_MCBSP2_DR_OFF",	0x0131,	0,	0,	0,	1)
 };
 
 int __init omap2_mux_init(void)
Index: dev/arch/arm/mach-omap2/prcm-regs.h
===================================================================
--- dev.orig/arch/arm/mach-omap2/prcm-regs.h
+++ dev/arch/arm/mach-omap2/prcm-regs.h
@@ -350,9 +350,7 @@
 #endif
 
 /* IO CONFIG */
-#define OMAP24XX_CTRL_BASE		(L4_24XX_BASE)
 #define CONTROL_REG32(offset)		__REG32(OMAP24XX_CTRL_BASE + (offset))
-
 #define CONTROL_PADCONF_SPI1_NCS2	CONTROL_REG32(0x104)
 #define CONTROL_PADCONF_SYS_XTALOUT	CONTROL_REG32(0x134)
 #define CONTROL_PADCONF_UART1_RX	CONTROL_REG32(0x0C8)
Index: dev/arch/arm/plat-omap/mux.c
===================================================================
--- dev.orig/arch/arm/plat-omap/mux.c
+++ dev/arch/arm/plat-omap/mux.c
@@ -32,7 +32,6 @@
 
 #ifdef CONFIG_OMAP_MUX
 
-#define OMAP24XX_L4_BASE	0x48000000
 #define OMAP24XX_PULL_ENA	(1 << 3)
 #define OMAP24XX_PULL_UP	(1 << 4)
 
@@ -75,6 +74,7 @@ int __init_or_module omap_cfg_reg(const 
 	}
 
 	cfg = (struct pin_config *)&pin_table[index];
+#ifdef CONFIG_ARCH_OMAP24XX
 	if (cpu_is_omap24xx()) {
 		u8 reg = 0;
 
@@ -85,7 +85,7 @@ int __init_or_module omap_cfg_reg(const 
 			reg |= OMAP24XX_PULL_UP;
 #if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS)
 		{
-			u8 orig = omap_readb(OMAP24XX_L4_BASE + cfg->mux_reg);
+			u8 orig = omap_readb(OMAP24XX_CTRL_BASE + cfg->mux_reg);
 			u8 debug = 0;
 
 #ifdef	CONFIG_OMAP_MUX_DEBUG
@@ -95,14 +95,15 @@ int __init_or_module omap_cfg_reg(const 
 			if (debug || warn)
 				printk("MUX: setup %s (0x%08x): 0x%02x -> 0x%02x\n",
 						cfg->name,
-						OMAP24XX_L4_BASE + cfg->mux_reg,
+						OMAP24XX_CTRL_BASE + cfg->mux_reg,
 						orig, reg);
 		}
 #endif
-		omap_writeb(reg, OMAP24XX_L4_BASE + cfg->mux_reg);
+		omap_writeb(reg, OMAP24XX_CTRL_BASE + cfg->mux_reg);
 
 		return 0;
 	}
+#endif /* ARCH_OMAP24XX */
 
 	/* Check the mux register in question */
 	if (cfg->mux_reg) {
Index: dev/include/asm-arm/arch-omap/mux.h
===================================================================
--- dev.orig/include/asm-arm/arch-omap/mux.h
+++ dev/include/asm-arm/arch-omap/mux.h
@@ -557,6 +557,43 @@ enum omap24xx_index {
 	B3__24XX_KBR5,
 	AA4_24XX_KBC2,
 	B13_24XX_KBC6,
+
+	/* 2430 USB */
+	AD9_2430_USB0_PUEN,
+	Y11_2430_USB0_VP,
+	AD7_2430_USB0_VM,
+	AE7_2430_USB0_RCV,
+	AD4_2430_USB0_TXEN,
+	AF9_2430_USB0_SE0,
+	AE6_2430_USB0_DAT,
+	AD24_2430_USB1_SE0,
+	AB24_2430_USB1_RCV,
+	Y25_2430_USB1_TXEN,
+	AA26_2430_USB1_DAT,
+
+	/* 2430 HS-USB */
+	AD9_2430_USB0HS_DATA3,
+	Y11_2430_USB0HS_DATA4,
+	AD7_2430_USB0HS_DATA5,
+	AE7_2430_USB0HS_DATA6,
+	AD4_2430_USB0HS_DATA2,
+	AF9_2430_USB0HS_DATA0,
+	AE6_2430_USB0HS_DATA1,
+	AE8_2430_USB0HS_CLK,
+	AD8_2430_USB0HS_DIR,
+	AE5_2430_USB0HS_STP,
+	AE9_2430_USB0HS_NXT,
+	AC7_2430_USB0HS_DATA7,
+
+	/* 2430 McBSP */
+	AC10_2430_MCBSP2_FSX,
+	AD16_2430_MCBSP2_CLX,
+	AE13_2430_MCBSP2_DX,
+	AD13_2430_MCBSP2_DR,
+	AC10_2430_MCBSP2_FSX_OFF,
+	AD16_2430_MCBSP2_CLX_OFF,
+	AE13_2430_MCBSP2_DX_OFF,
+	AD13_2430_MCBSP2_DR_OFF,
 };
 
 #ifdef	CONFIG_OMAP_MUX
Index: dev/include/asm-arm/arch-omap/omap24xx.h
===================================================================
--- dev.orig/include/asm-arm/arch-omap/omap24xx.h
+++ dev/include/asm-arm/arch-omap/omap24xx.h
@@ -23,6 +23,7 @@
 #define OMAP24XX_32KSYNCT_BASE	(L4_24XX_BASE + 0x4000)
 #define OMAP24XX_PRCM_BASE	(L4_24XX_BASE + 0x8000)
 #define OMAP24XX_SDRC_BASE	(L3_24XX_BASE + 0x9000)
+#define OMAP24XX_CTRL_BASE	L4_24XX_BASE
 #endif
 
 #ifdef CONFIG_ARCH_OMAP2430
@@ -31,6 +32,8 @@
 #define OMAP243X_SMS_BASE	0x6C000000
 #define OMAP24XX_SDRC_BASE	0x6D000000
 #define OMAP243X_GPMC_BASE	0x6E000000
+#define OMAP243X_SCM_BASE	(L4_WK_243X_BASE + 0x2000)
+#define OMAP24XX_CTRL_BASE	OMAP243X_SCM_BASE
 #endif
 
 /* DSP SS */

--

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ARM: OMAP: Support for HS-USB on 2430SDP
  2007-05-10 18:34 [PATCH 0/2] HS-USB support for 2430SDP Kevin Hilman
  2007-05-10 18:34 ` [PATCH 1/2] ARM: OMAP: pin-mux fixups for 2430 Kevin Hilman
@ 2007-05-10 18:34 ` Kevin Hilman
  2007-05-16 17:46 ` [PATCH 0/2] HS-USB support for 2430SDP Tony Lindgren
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin Hilman @ 2007-05-10 18:34 UTC (permalink / raw)
  To: linux-omap-open-source

[-- Attachment #1: musb-fixups.patch --]
[-- Type: text/plain, Size: 12242 bytes --]

Currently only working in gadget mode.

Signed-off-by: Kevin Hilman <khilman@mvista.com>

---
 arch/arm/mach-omap2/Makefile            |    3 
 arch/arm/mach-omap2/board-2430sdp-usb.c |   69 ++++++++++++
 arch/arm/mach-omap2/board-2430sdp.c     |    2 
 drivers/usb/musb/omap2430.c             |    9 +
 drivers/usb/musb/omap2430.h             |    3 
 drivers/usb/musb/plat_uds.c             |    1 
 include/asm-arm/arch-omap/hdrc_cnf.h    |  177 ++++++++++++++++++++++++++++++++
 include/asm-arm/arch-omap/irqs.h        |    4 
 include/asm-arm/arch-omap/omap24xx.h    |    1 
 9 files changed, 267 insertions(+), 2 deletions(-)

Index: dev/arch/arm/mach-omap2/Makefile
===================================================================
--- dev.orig/arch/arm/mach-omap2/Makefile
+++ dev/arch/arm/mach-omap2/Makefile
@@ -21,7 +21,8 @@ mmu_mach-objs			:= mmu.o
 obj-$(CONFIG_MACH_OMAP_GENERIC)		+= board-generic.o
 obj-$(CONFIG_MACH_OMAP_H4)		+= board-h4.o
 obj-$(CONFIG_MACH_OMAP_2430SDP)		+= board-2430sdp.o \
-					   board-2430sdp-flash.o
+					   board-2430sdp-flash.o \
+					   board-2430sdp-usb.o
 obj-$(CONFIG_MACH_OMAP_APOLLON)		+= board-apollon.o \
 					   board-apollon-keys.o
 obj-$(CONFIG_MACH_NOKIA_N800)		+= board-n800.o board-n800-flash.o \
Index: dev/arch/arm/mach-omap2/board-2430sdp-usb.c
===================================================================
--- /dev/null
+++ dev/arch/arm/mach-omap2/board-2430sdp-usb.c
@@ -0,0 +1,69 @@
+/*
+ * linux/arch/arm/mach-omap2/board-2430sdp-usb.c
+ *
+ * Copyright (C) 2007 MontaVista Software, Inc. <source@mvista.com>
+ * Author: Kevin Hilman
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/delay.h>
+#include <linux/platform_device.h>
+#include <linux/usb/musb.h>
+
+#include <asm/arch/hardware.h>
+#include <asm/arch/usb.h>
+
+static struct resource musb_resources[] = {
+	[0] = {
+		.start	= OMAP243X_HS_BASE,
+		.end	= OMAP243X_HS_BASE + SZ_8K,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {	/* general IRQ */
+		.start	= INT_243X_HS_USB_MC,
+		.flags	= IORESOURCE_IRQ,
+	},
+	[2] = {	/* DMA IRQ */
+		.start	= INT_243X_HS_USB_DMA,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static struct musb_hdrc_platform_data musb_plat = {
+#ifdef CONFIG_USB_MUSB_OTG
+	.mode		= MUSB_OTG,
+#elif CONFIG_USB_MUSB_HDRC_HCD
+	.mode		= MUSB_HOST,
+#elif CONFIG_USB_GADGET_MUSB_HDRC
+	.mode		= MUSB_PERIPHERAL,
+#endif
+	.multipoint	= 1,
+};
+
+static u64 musb_dmamask = ~(u32)0;
+
+static struct platform_device musb_device = {
+	.name		= "musb_hdrc",
+	.id		= 0,
+	.dev = {
+		.dma_mask		= &musb_dmamask,
+		.coherent_dma_mask	= 0xffffffff,
+		.platform_data		= &musb_plat,
+	},
+	.num_resources	= ARRAY_SIZE(musb_resources),
+	.resource	= musb_resources,
+};
+
+void __init sdp2430_usb_init(void)
+{
+	if (platform_device_register(&musb_device) < 0) {
+		printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
+		return;
+	}
+}
+
Index: dev/arch/arm/mach-omap2/board-2430sdp.c
===================================================================
--- dev.orig/arch/arm/mach-omap2/board-2430sdp.c
+++ dev/arch/arm/mach-omap2/board-2430sdp.c
@@ -296,6 +296,7 @@ static int __init omap2430_i2c_init(void
 }
 
 extern void __init sdp2430_flash_init(void);
+extern void __init sdp2430_usb_init(void);
 
 static void __init omap_2430sdp_init(void)
 {
@@ -305,6 +306,7 @@ static void __init omap_2430sdp_init(voi
 	omap_serial_init();
 
 	sdp2430_flash_init();
+	sdp2430_usb_init();
 
 	spi_register_board_info(sdp2430_spi_board_info,
 				ARRAY_SIZE(sdp2430_spi_board_info));
Index: dev/drivers/usb/musb/omap2430.c
===================================================================
--- dev.orig/drivers/usb/musb/omap2430.c
+++ dev/drivers/usb/musb/omap2430.c
@@ -61,6 +61,12 @@ static void omap_vbus_power(struct musb 
 {
 }
 
+static void omap_set_vbus(struct musb *musb, int is_on)
+{
+	WARN_ON(is_on && is_peripheral_active(musb));
+	return omap_vbus_power(musb, is_on, 0);
+}
+
 int __init musb_platform_init(struct musb *musb)
 {
 	/* Erratum - reset value of STP has pull-down.
@@ -82,12 +88,13 @@ int __init musb_platform_init(struct mus
 			omap_readl(OTG_SYSSTATUS), omap_readl(OTG_INTERFSEL),
 			omap_readl(OTG_SIMENABLE));
 
+	musb->board_set_vbus = omap_set_vbus;
 	omap_vbus_power(musb, musb->board_mode == MUSB_HOST, 1);
 
 	return 0;
 }
 
-int __exit musb_platform_exit(struct musb *musb)
+int musb_platform_exit(struct musb *musb)
 {
 	omap_vbus_power(musb, 0 /*off*/, 1);
 	clk_disable(musb->clock);
Index: dev/drivers/usb/musb/omap2430.h
===================================================================
--- dev.orig/drivers/usb/musb/omap2430.h
+++ dev/drivers/usb/musb/omap2430.h
@@ -11,6 +11,9 @@
 #define __MUSB_OMAP243X_H__
 
 #ifdef CONFIG_ARCH_OMAP2430
+
+#include <asm/arch/usb.h>
+
 /*
  * OMAP2430-specific definitions
  */
Index: dev/drivers/usb/musb/plat_uds.c
===================================================================
--- dev.orig/drivers/usb/musb/plat_uds.c
+++ dev/drivers/usb/musb/plat_uds.c
@@ -1997,6 +1997,7 @@ static struct platform_driver musb_drive
 		.bus		= &platform_bus_type,
 		.owner		= THIS_MODULE,
 	},
+	.probe		= musb_probe,
 	.remove		= __devexit_p(musb_remove),
 	.shutdown	= musb_shutdown,
 	.suspend	= musb_suspend,
Index: dev/include/asm-arm/arch-omap/hdrc_cnf.h
===================================================================
--- /dev/null
+++ dev/include/asm-arm/arch-omap/hdrc_cnf.h
@@ -0,0 +1,177 @@
+/*
+ * Copyright 2005 Mentor Graphics Corporation
+ * USB High-Speed Multi-Point Dual-Role Controller Configuration
+ *
+ * Copyright Mentor Graphics Corporation and Licensors 2004
+ * Copyright (C) 2005 by Texas Instruments
+ *
+ * This file contains configuration constants for the (m)hdrc
+ * silicon as integrated into DaVinci CPUs.
+ */
+
+#ifndef	__ARCH_MUSB_HDRC_CNF
+#define	__ARCH_MUSB_HDRC_CNF
+
+/* ** Number of Tx endpoints ** */
+/* Legal values are 1 - 16 (this value includes EP0) */
+#define MUSB_C_NUM_EPT 8
+
+/* ** Number of Rx endpoints ** */
+/* Legal values are 1 - 16 (this value includes EP0) */
+#define MUSB_C_NUM_EPR 8
+
+/* ** Endpoint 1 to 15 direction types ** */
+/* C_EP1_DEF is defined if either Tx endpoint 1 or Rx endpoint 1 are used */
+#define MUSB_C_EP1_DEF
+
+/* C_EP1_TX_DEF is defined if Tx endpoint 1 is used */
+#define MUSB_C_EP1_TX_DEF
+
+/* C_EP1_RX_DEF is defined if Rx endpoint 1 is used */
+#define MUSB_C_EP1_RX_DEF
+
+/* C_EP1_TOR_DEF is defined if Tx endpoint 1 and Rx endpoint 1 share a FIFO */
+/*`define C_EP1_TOR_DEF */
+
+/* C_EP1_TAR_DEF is defined if both Tx endpoint 1 and Rx endpoint 1 are used */
+/* and do not share a FIFO */
+#define MUSB_C_EP1_TAR_DEF
+
+/* Similarly for all other used endpoints */
+#define MUSB_C_EP2_DEF
+#define MUSB_C_EP2_TX_DEF
+#define MUSB_C_EP2_RX_DEF
+#define MUSB_C_EP2_TAR_DEF
+#define MUSB_C_EP3_DEF
+#define MUSB_C_EP3_TX_DEF
+#define MUSB_C_EP3_RX_DEF
+#define MUSB_C_EP3_TAR_DEF
+#define MUSB_C_EP4_DEF
+#define MUSB_C_EP4_TX_DEF
+#define MUSB_C_EP4_RX_DEF
+#define MUSB_C_EP4_TAR_DEF
+#define MUSB_C_EP5_DEF
+#define MUSB_C_EP5_TX_DEF
+#define MUSB_C_EP5_RX_DEF
+#define MUSB_C_EP5_TAR_DEF
+#define MUSB_C_EP6_DEF
+#define MUSB_C_EP6_TX_DEF
+#define MUSB_C_EP6_RX_DEF
+#define MUSB_C_EP6_TAR_DEF
+#define MUSB_C_EP7_DEF
+#define MUSB_C_EP7_TX_DEF
+#define MUSB_C_EP7_RX_DEF
+#define MUSB_C_EP7_TAR_DEF
+
+/* ** Endpoint 1 to 15 FIFO address bits ** */
+/* Legal values are 3 to 13 - corresponding to FIFO sizes of 8 to 8192 bytes. */
+/* If an Tx endpoint shares a FIFO with an Rx endpoint then the Rx FIFO size */
+/* must be the same as the Tx FIFO size. */
+/* All endpoints 1 to 15 must be defined, unused endpoints should be set to 2. */
+#define MUSB_C_EP1T_BITS 10
+#define MUSB_C_EP1R_BITS 10
+#define MUSB_C_EP2T_BITS 9
+#define MUSB_C_EP2R_BITS 9
+#define MUSB_C_EP3T_BITS 3
+#define MUSB_C_EP3R_BITS 3
+#define MUSB_C_EP4T_BITS 3
+#define MUSB_C_EP4R_BITS 3
+#define MUSB_C_EP5T_BITS 3
+#define MUSB_C_EP5R_BITS 3
+#define MUSB_C_EP6T_BITS 3
+#define MUSB_C_EP6R_BITS 3
+#define MUSB_C_EP7T_BITS 3
+#define MUSB_C_EP7R_BITS 3
+#define MUSB_C_EP8T_BITS 2
+#define MUSB_C_EP8R_BITS 2
+#define MUSB_C_EP9T_BITS 2
+#define MUSB_C_EP9R_BITS 2
+#define MUSB_C_EP10T_BITS 2
+#define MUSB_C_EP10R_BITS 2
+#define MUSB_C_EP11T_BITS 2
+#define MUSB_C_EP11R_BITS 2
+#define MUSB_C_EP12T_BITS 2
+#define MUSB_C_EP12R_BITS 2
+#define MUSB_C_EP13T_BITS 2
+#define MUSB_C_EP13R_BITS 2
+#define MUSB_C_EP14T_BITS 2
+#define MUSB_C_EP14R_BITS 2
+#define MUSB_C_EP15T_BITS 2
+#define MUSB_C_EP15R_BITS 2
+
+/* Define the following constant if the USB2.0 Transceiver Macrocell data width is 16-bits. */
+/* `define C_UTM_16 */
+
+/* Define this constant if the CPU uses big-endian byte ordering. */
+/*`define C_BIGEND */
+
+/* Define the following constant if any Tx endpoint is required to support multiple bulk packets. */
+/* `define C_MP_TX */
+
+/* Define the following constant if any Rx endpoint is required to support multiple bulk packets. */
+/* `define C_MP_RX */
+
+/* Define the following constant if any Tx endpoint is required to support high bandwidth ISO. */
+/* `define C_HB_TX */
+
+/* Define the following constant if any Rx endpoint is required to support high bandwidth ISO. */
+/* `define C_HB_RX */
+
+/* Define the following constant if software connect/disconnect control is required. */
+#define MUSB_C_SOFT_CON
+
+/* Define the following constant if Vendor Control Registers are required. */
+/* `define C_VEND_REG */
+
+/* Vendor control register widths. */
+#define MUSB_C_VCTL_BITS 4
+#define MUSB_C_VSTAT_BITS 8
+
+
+/* Define the following constant to include a DMA controller. */
+#define MUSB_C_DMA
+
+/* Define the following constant if 2 or more DMA channels are required. */
+#define MUSB_C_DMA2
+
+/* Define the following constant if 3 or more DMA channels are required. */
+#define MUSB_C_DMA3
+
+/* Define the following constant if 4 or more DMA channels are required. */
+#define MUSB_C_DMA4
+
+/* Define the following constant if 5 or more DMA channels are required. */
+/*`define C_DMA5 */
+
+/* Define the following constant if 6 or more DMA channels are required. */
+/*`define C_DMA6 */
+
+/* Define the following constant if 7 or more DMA channels are required. */
+/*`define C_DMA7 */
+
+/* Define the following constant if 8 or more DMA channels are required. */
+/*`define C_DMA8 */
+
+
+/* ** Enable Dynamic FIFO Sizing ** */
+#define MUSB_C_DYNFIFO_DEF
+
+/* ** Derived constants ** */
+/* The following constants are derived from the previous configuration constants */
+
+/* Total number of endpoints
+ * Legal values are 2 - 16
+ * This must be equal to the larger of C_NUM_EPT, C_NUM_EPR
+ */
+#define MUSB_C_NUM_EPS 8
+
+/* C_EPMAX_BITS is equal to the largest endpoint FIFO word address bits */
+#define MUSB_C_EPMAX_BITS 12
+
+/* C_RAM_BITS is the number of address bits required to address the RAM (32-bit
+ * addresses).  It is defined as log2 of the sum of 2** of all the endpoint FIFO
+ * dword address bits (rounded up).
+ */
+#define MUSB_C_RAM_BITS 12
+
+#endif	/* __ARCH_MUSB_HDRC_CNF */
Index: dev/include/asm-arm/arch-omap/irqs.h
===================================================================
--- dev.orig/include/asm-arm/arch-omap/irqs.h
+++ dev/include/asm-arm/arch-omap/irqs.h
@@ -279,6 +279,10 @@
 #define INT_24XX_USB_IRQ_OTG	80
 #define INT_24XX_MMC_IRQ	83
 
+#define	INT_243X_HS_USB_MC	92
+#define	INT_243X_HS_USB_DMA	93
+#define	INT_243X_CARKIT		94
+
 /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and
  * 16 MPUIO lines */
 #define OMAP_MAX_GPIO_LINES	192
Index: dev/include/asm-arm/arch-omap/omap24xx.h
===================================================================
--- dev.orig/include/asm-arm/arch-omap/omap24xx.h
+++ dev/include/asm-arm/arch-omap/omap24xx.h
@@ -34,6 +34,7 @@
 #define OMAP243X_GPMC_BASE	0x6E000000
 #define OMAP243X_SCM_BASE	(L4_WK_243X_BASE + 0x2000)
 #define OMAP24XX_CTRL_BASE	OMAP243X_SCM_BASE
+#define OMAP243X_HS_BASE	(L4_24XX_BASE + 0x000ac000)
 #endif
 
 /* DSP SS */

--

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] HS-USB support for 2430SDP
  2007-05-10 18:34 [PATCH 0/2] HS-USB support for 2430SDP Kevin Hilman
  2007-05-10 18:34 ` [PATCH 1/2] ARM: OMAP: pin-mux fixups for 2430 Kevin Hilman
  2007-05-10 18:34 ` [PATCH 2/2] ARM: OMAP: Support for HS-USB on 2430SDP Kevin Hilman
@ 2007-05-16 17:46 ` Tony Lindgren
  2 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2007-05-16 17:46 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-omap-open-source

* Kevin Hilman <khilman@mvista.com> [070510 11:40]:
> Here is base support for MUSB on the 2430SDP.  It adds mux fixup and
> mux regs for HS-USB and the MUSB platform setup code.  Currently works
> for gadget only.
> 
> Tested on OMAP2430SDP-v2.2 and v5.0.

Pushing these today.

Tony

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-16 17:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-10 18:34 [PATCH 0/2] HS-USB support for 2430SDP Kevin Hilman
2007-05-10 18:34 ` [PATCH 1/2] ARM: OMAP: pin-mux fixups for 2430 Kevin Hilman
2007-05-10 18:34 ` [PATCH 2/2] ARM: OMAP: Support for HS-USB on 2430SDP Kevin Hilman
2007-05-16 17:46 ` [PATCH 0/2] HS-USB support for 2430SDP Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox