All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] AM35x: Add musb support
@ 2010-02-24 13:18 Ajay Kumar Gupta
       [not found] ` <1267017495-17548-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Ajay Kumar Gupta @ 2010-02-24 13:18 UTC (permalink / raw)
  To: linux-omap-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, Ajay Kumar Gupta

AM35x has musb interface (version 1.8) and uses CPPI41 DMA engine.
It supports upto 500mA of power in host mode.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
---
Created against latest l-o master branch and below patches.
[1] AM35xx: Add clock support for new modules on AM35xx
[2] OMAP2/3 clock: Extend find_idlest() to pass back idle
[3] musb: fix power field to hold all possible values
[4] musb: Add extvbus in musb_board_data 

I am posting musb driver layer platform file seperately to linux-usb list.

 arch/arm/mach-omap2/board-am3517evm.c |   10 ++++++++
 arch/arm/mach-omap2/usb-musb.c        |    4 +++
 arch/arm/plat-omap/include/plat/usb.h |   38 +++++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index aee0a02..805c7ab 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -273,6 +273,12 @@ static void __init am3517_evm_init_irq(void)
 	omap_gpio_init();
 }
 
+static struct omap_musb_board_data musb_board_data = {
+	.interface_type		= MUSB_INTERFACE_ULPI,
+	.mode			= MUSB_OTG,
+	.power			= 500,
+};
+
 static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
 	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
 	.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
@@ -286,6 +292,8 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
 
 #ifdef CONFIG_OMAP_MUX
 static struct omap_board_mux board_mux[] __initdata = {
+	/* USB OTG DRVVBUS offset = 0x212 */
+	OMAP3_MUX(CHASSIS_DMAREQ3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
 	{ .reg_offset = OMAP_MUX_TERMINATOR },
 };
 #else
@@ -313,6 +321,8 @@ static void __init am3517_evm_init(void)
 
 	i2c_register_board_info(1, am3517evm_i2c_boardinfo,
 				ARRAY_SIZE(am3517evm_i2c_boardinfo));
+	/* MUSB */
+	usb_musb_init(&musb_board_data);
 }
 
 static void __init am3517_evm_map_io(void)
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index 17726ac..1b08cff 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -28,6 +28,7 @@
 
 #include <mach/hardware.h>
 #include <mach/irqs.h>
+#include <mach/am35xx.h>
 #include <plat/mux.h>
 #include <plat/usb.h>
 
@@ -89,6 +90,9 @@ void __init usb_musb_init(struct omap_musb_board_data *board_data)
 {
 	if (cpu_is_omap243x()) {
 		musb_resources[0].start = OMAP243X_HS_BASE;
+	} else if (cpu_is_omap3517()) {
+		musb_resources[0].start = AM35XX_IPSS_USBOTGSS_BASE;
+		musb_resources[1].start = INT_35XX_USBOTG_IRQ;
 	} else if (cpu_is_omap34xx()) {
 		musb_resources[0].start = OMAP34XX_HSUSB_OTG_BASE;
 	} else if (cpu_is_omap44xx()) {
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
index d82bf77..2df6c70 100644
--- a/arch/arm/plat-omap/include/plat/usb.h
+++ b/arch/arm/plat-omap/include/plat/usb.h
@@ -168,5 +168,43 @@ void omap_usb_init(struct omap_usb_config *pdata);
 #	define	USBT2TLL5PI		(1 << 17)
 #	define	USB0PUENACTLOI		(1 << 16)
 #	define	USBSTANDBYCTRL		(1 << 15)
+/* AM3517 */
+/* USB 2.0 OTG module registers */
+#define USB_REVISION_REG	0x00
+#define USB_CTRL_REG		0x04
+#define USB_STAT_REG		0x08
+#define USB_EMULATION_REG	0x0c
+/* 0x10 Reserved */
+#define USB_AUTOREQ_REG		0x14
+#define USB_SRP_FIX_TIME_REG	0x18
+#define USB_TEARDOWN_REG	0x1c
+#define EP_INTR_SRC_REG		0x20
+#define EP_INTR_SRC_SET_REG	0x24
+#define EP_INTR_SRC_CLEAR_REG	0x28
+#define EP_INTR_MASK_REG	0x2c
+#define EP_INTR_MASK_SET_REG	0x30
+#define EP_INTR_MASK_CLEAR_REG	0x34
+#define EP_INTR_SRC_MASKED_REG	0x38
+#define CORE_INTR_SRC_REG	0x40
+#define CORE_INTR_SRC_SET_REG	0x44
+#define CORE_INTR_SRC_CLEAR_REG	0x48
+#define CORE_INTR_MASK_REG	0x4c
+#define CORE_INTR_MASK_SET_REG	0x50
+#define CORE_INTR_MASK_CLEAR_REG 0x54
+#define CORE_INTR_SRC_MASKED_REG 0x58
+/* 0x5c Reserved */
+#define USB_END_OF_INTR_REG	0x60
+
+/* Control register bits */
+#define USB_SOFT_RESET_MASK	1
+
+/* USB interrupt register bits */
+#define USB_INTR_USB_SHIFT	16
+#define USB_INTR_USB_MASK	(0x1ff << USB_INTR_USB_SHIFT)
+#define USB_INTR_DRVVBUS	0x100
+#define USB_INTR_RX_SHIFT	16
+#define USB_INTR_TX_SHIFT	0
+
+#define USB_MENTOR_CORE_OFFSET	0x400
 
 #endif	/* __ASM_ARCH_OMAP_USB_H */
-- 
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] AM35x: Add musb support
       [not found] ` <1267017495-17548-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
@ 2010-03-20 13:26   ` Sergei Shtylyov
  2010-03-21  2:48     ` Gupta, Ajay Kumar
  0 siblings, 1 reply; 11+ messages in thread
From: Sergei Shtylyov @ 2010-03-20 13:26 UTC (permalink / raw)
  To: Ajay Kumar Gupta
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA

Hello.

Ajay Kumar Gupta wrote:

> AM35x has musb interface (version 1.8) and uses CPPI41 DMA engine.
> It supports upto 500mA of power in host mode.
>
> Signed-off-by: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
> ---
> Created against latest l-o master branch and below patches.
> [1] AM35xx: Add clock support for new modules on AM35xx
> [2] OMAP2/3 clock: Extend find_idlest() to pass back idle
> [3] musb: fix power field to hold all possible values
> [4] musb: Add extvbus in musb_board_data 
>
> I am posting musb driver layer platform file seperately to linux-usb list.
>
>  arch/arm/mach-omap2/board-am3517evm.c |   10 ++++++++
>  arch/arm/mach-omap2/usb-musb.c        |    4 +++
>  arch/arm/plat-omap/include/plat/usb.h |   38 +++++++++++++++++++++++++++++++++
>  3 files changed, 52 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
> index aee0a02..805c7ab 100644
> --- a/arch/arm/mach-omap2/board-am3517evm.c
> +++ b/arch/arm/mach-omap2/board-am3517evm.c
> @@ -273,6 +273,12 @@ static void __init am3517_evm_init_irq(void)
>  	omap_gpio_init();
>  }
>  
> +static struct omap_musb_board_data musb_board_data = {
> +	.interface_type		= MUSB_INTERFACE_ULPI,
> +	.mode			= MUSB_OTG,
> +	.power			= 500,
> +};
> +
>  static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
>  	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
>  	.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
> @@ -286,6 +292,8 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
>  
>  #ifdef CONFIG_OMAP_MUX
>  static struct omap_board_mux board_mux[] __initdata = {
> +	/* USB OTG DRVVBUS offset = 0x212 */
> +	OMAP3_MUX(CHASSIS_DMAREQ3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
>  	{ .reg_offset = OMAP_MUX_TERMINATOR },
>  };
>  #else
> @@ -313,6 +321,8 @@ static void __init am3517_evm_init(void)
>  
>  	i2c_register_board_info(1, am3517evm_i2c_boardinfo,
>  				ARRAY_SIZE(am3517evm_i2c_boardinfo));
> +	/* MUSB */
> +	usb_musb_init(&musb_board_data);
>  }
>  
>  static void __init am3517_evm_map_io(void)
> diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
> index 17726ac..1b08cff 100644
> --- a/arch/arm/mach-omap2/usb-musb.c
> +++ b/arch/arm/mach-omap2/usb-musb.c
> @@ -28,6 +28,7 @@
>  
>  #include <mach/hardware.h>
>  #include <mach/irqs.h>
> +#include <mach/am35xx.h>
>  #include <plat/mux.h>
>  #include <plat/usb.h>
>  
> @@ -89,6 +90,9 @@ void __init usb_musb_init(struct omap_musb_board_data *board_data)
>  {
>  	if (cpu_is_omap243x()) {
>  		musb_resources[0].start = OMAP243X_HS_BASE;
> +	} else if (cpu_is_omap3517()) {
> +		musb_resources[0].start = AM35XX_IPSS_USBOTGSS_BASE;
> +		musb_resources[1].start = INT_35XX_USBOTG_IRQ;
>  	} else if (cpu_is_omap34xx()) {
>  		musb_resources[0].start = OMAP34XX_HSUSB_OTG_BASE;
>  	} else if (cpu_is_omap44xx()) {
> diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
> index d82bf77..2df6c70 100644
> --- a/arch/arm/plat-omap/include/plat/usb.h
> +++ b/arch/arm/plat-omap/include/plat/usb.h
> @@ -168,5 +168,43 @@ void omap_usb_init(struct omap_usb_config *pdata);
>  #	define	USBT2TLL5PI		(1 << 17)
>  #	define	USB0PUENACTLOI		(1 << 16)
>  #	define	USBSTANDBYCTRL		(1 << 15)
> +/* AM3517 */
> +/* USB 2.0 OTG module registers */
> +#define USB_REVISION_REG	0x00
> +#define USB_CTRL_REG		0x04
> +#define USB_STAT_REG		0x08
> +#define USB_EMULATION_REG	0x0c
> +/* 0x10 Reserved */
>   

   Wait... so the mode register isn't supported? Does AM35x support any 
accelerated modes?

> +#define USB_AUTOREQ_REG		0x14
> +#define USB_SRP_FIX_TIME_REG	0x18
> +#define USB_TEARDOWN_REG	0x1c
> +#define EP_INTR_SRC_REG		0x20
> +#define EP_INTR_SRC_SET_REG	0x24
> +#define EP_INTR_SRC_CLEAR_REG	0x28
> +#define EP_INTR_MASK_REG	0x2c
> +#define EP_INTR_MASK_SET_REG	0x30
> +#define EP_INTR_MASK_CLEAR_REG	0x34
> +#define EP_INTR_SRC_MASKED_REG	0x38
> +#define CORE_INTR_SRC_REG	0x40
> +#define CORE_INTR_SRC_SET_REG	0x44
> +#define CORE_INTR_SRC_CLEAR_REG	0x48
> +#define CORE_INTR_MASK_REG	0x4c
> +#define CORE_INTR_MASK_SET_REG	0x50
> +#define CORE_INTR_MASK_CLEAR_REG 0x54
> +#define CORE_INTR_SRC_MASKED_REG 0x58
> +/* 0x5c Reserved */
> +#define USB_END_OF_INTR_REG	0x60
>   

   Hm, I don't see the generic RNDIS EP size registers also. So, generic 
RNDIS mode isn't supported? Then cppi41_dma.c won't work with this 
chip... :-/

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCH] AM35x: Add musb support
  2010-03-20 13:26   ` Sergei Shtylyov
@ 2010-03-21  2:48     ` Gupta, Ajay Kumar
  2010-03-21 10:59       ` Sergei Shtylyov
  0 siblings, 1 reply; 11+ messages in thread
From: Gupta, Ajay Kumar @ 2010-03-21  2:48 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linux-omap, linux-usb

Hi,
> AM35x has musb interface (version 1.8) and uses CPPI41 DMA engine.
> It supports upto 500mA of power in host mode.
>
> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
> ---
> Created against latest l-o master branch and below patches.
> [1] AM35xx: Add clock support for new modules on AM35xx
> [2] OMAP2/3 clock: Extend find_idlest() to pass back idle
> [3] musb: fix power field to hold all possible values
> [4] musb: Add extvbus in musb_board_data
>
> I am posting musb driver layer platform file seperately to linux-usb list.
>
>  arch/arm/mach-omap2/board-am3517evm.c |   10 ++++++++
>  arch/arm/mach-omap2/usb-musb.c        |    4 +++
>  arch/arm/plat-omap/include/plat/usb.h |   38 +++++++++++++++++++++++++++++++++
>  3 files changed, 52 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
> index aee0a02..805c7ab 100644
> --- a/arch/arm/mach-omap2/board-am3517evm.c
> +++ b/arch/arm/mach-omap2/board-am3517evm.c
> @@ -273,6 +273,12 @@ static void __init am3517_evm_init_irq(void)
>       omap_gpio_init();
>  }
>
> +static struct omap_musb_board_data musb_board_data = {
> +     .interface_type         = MUSB_INTERFACE_ULPI,
> +     .mode                   = MUSB_OTG,
> +     .power                  = 500,
> +};
> +
>  static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
>       .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
>       .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
> @@ -286,6 +292,8 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
>
>  #ifdef CONFIG_OMAP_MUX
>  static struct omap_board_mux board_mux[] __initdata = {
> +     /* USB OTG DRVVBUS offset = 0x212 */
> +     OMAP3_MUX(CHASSIS_DMAREQ3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
>       { .reg_offset = OMAP_MUX_TERMINATOR },
>  };
>  #else
> @@ -313,6 +321,8 @@ static void __init am3517_evm_init(void)
>
>       i2c_register_board_info(1, am3517evm_i2c_boardinfo,
>                               ARRAY_SIZE(am3517evm_i2c_boardinfo));
> +     /* MUSB */
> +     usb_musb_init(&musb_board_data);
>  }
>
>  static void __init am3517_evm_map_io(void)
> diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
> index 17726ac..1b08cff 100644
> --- a/arch/arm/mach-omap2/usb-musb.c
> +++ b/arch/arm/mach-omap2/usb-musb.c
> @@ -28,6 +28,7 @@
>
>  #include <mach/hardware.h>
>  #include <mach/irqs.h>
> +#include <mach/am35xx.h>
>  #include <plat/mux.h>
>  #include <plat/usb.h>
>
> @@ -89,6 +90,9 @@ void __init usb_musb_init(struct omap_musb_board_data *board_data)
>  {
>       if (cpu_is_omap243x()) {
>               musb_resources[0].start = OMAP243X_HS_BASE;
> +     } else if (cpu_is_omap3517()) {
> +             musb_resources[0].start = AM35XX_IPSS_USBOTGSS_BASE;
> +             musb_resources[1].start = INT_35XX_USBOTG_IRQ;
>       } else if (cpu_is_omap34xx()) {
>               musb_resources[0].start = OMAP34XX_HSUSB_OTG_BASE;
>       } else if (cpu_is_omap44xx()) {
> diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
> index d82bf77..2df6c70 100644
> --- a/arch/arm/plat-omap/include/plat/usb.h
> +++ b/arch/arm/plat-omap/include/plat/usb.h
> @@ -168,5 +168,43 @@ void omap_usb_init(struct omap_usb_config *pdata);
>  #    define  USBT2TLL5PI             (1 << 17)
>  #    define  USB0PUENACTLOI          (1 << 16)
>  #    define  USBSTANDBYCTRL          (1 << 15)
> +/* AM3517 */
> +/* USB 2.0 OTG module registers */
> +#define USB_REVISION_REG     0x00
> +#define USB_CTRL_REG         0x04
> +#define USB_STAT_REG         0x08
> +#define USB_EMULATION_REG    0x0c
> +/* 0x10 Reserved */
>

>   Wait... so the mode register isn't supported? Does AM35x support any
> accelerated modes?

Mode register is available though with some difference due to 15Rx/Tx eps.
 I have not added CPPI4.1 DMA  specific register here..

> +#define USB_AUTOREQ_REG              0x14
> +#define USB_SRP_FIX_TIME_REG 0x18
> +#define USB_TEARDOWN_REG     0x1c
> +#define EP_INTR_SRC_REG              0x20
> +#define EP_INTR_SRC_SET_REG  0x24
> +#define EP_INTR_SRC_CLEAR_REG        0x28
> +#define EP_INTR_MASK_REG     0x2c
> +#define EP_INTR_MASK_SET_REG 0x30
> +#define EP_INTR_MASK_CLEAR_REG       0x34
> +#define EP_INTR_SRC_MASKED_REG       0x38
> +#define CORE_INTR_SRC_REG    0x40
> +#define CORE_INTR_SRC_SET_REG        0x44
> +#define CORE_INTR_SRC_CLEAR_REG      0x48
> +#define CORE_INTR_MASK_REG   0x4c
> +#define CORE_INTR_MASK_SET_REG       0x50
> +#define CORE_INTR_MASK_CLEAR_REG 0x54
> +#define CORE_INTR_SRC_MASKED_REG 0x58
> +/* 0x5c Reserved */
> +#define USB_END_OF_INTR_REG  0x60
>

>   Hm, I don't see the generic RNDIS EP size registers also. So, generic
> RNDIS mode isn't supported? Then cppi41_dma.c won't work with this
> chip... :-/

Generic RNDIS mode is suported and CPPi4,1 is already verified to be working on
AM3517. You can get more details on this at AM3517 TRM,

http://focus.ti.com/lit/ug/sprugr0/sprugr0.pdf

> WBR, Sergei


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

* Re: [PATCH] AM35x: Add musb support
  2010-03-21  2:48     ` Gupta, Ajay Kumar
@ 2010-03-21 10:59       ` Sergei Shtylyov
       [not found]         ` <4BA5FBF6.8010102-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Sergei Shtylyov @ 2010-03-21 10:59 UTC (permalink / raw)
  To: Gupta, Ajay Kumar; +Cc: linux-omap, linux-usb

Hello.

Gupta, Ajay Kumar wrote:

> Hi,
>   
>> AM35x has musb interface (version 1.8) and uses CPPI41 DMA engine.
>> It supports upto 500mA of power in host mode.
>>
>> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
>> ---
>> Created against latest l-o master branch and below patches.
>> [1] AM35xx: Add clock support for new modules on AM35xx
>> [2] OMAP2/3 clock: Extend find_idlest() to pass back idle
>> [3] musb: fix power field to hold all possible values
>> [4] musb: Add extvbus in musb_board_data
>>
>> I am posting musb driver layer platform file seperately to linux-usb list.
>>
>>  arch/arm/mach-omap2/board-am3517evm.c |   10 ++++++++
>>  arch/arm/mach-omap2/usb-musb.c        |    4 +++
>>  arch/arm/plat-omap/include/plat/usb.h |   38 +++++++++++++++++++++++++++++++++
>>  3 files changed, 52 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
>> index aee0a02..805c7ab 100644
>> --- a/arch/arm/mach-omap2/board-am3517evm.c
>> +++ b/arch/arm/mach-omap2/board-am3517evm.c
>> @@ -273,6 +273,12 @@ static void __init am3517_evm_init_irq(void)
>>       omap_gpio_init();
>>  }
>>
>> +static struct omap_musb_board_data musb_board_data = {
>> +     .interface_type         = MUSB_INTERFACE_ULPI,
>> +     .mode                   = MUSB_OTG,
>> +     .power                  = 500,
>> +};
>> +
>>  static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
>>       .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
>>       .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
>> @@ -286,6 +292,8 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
>>
>>  #ifdef CONFIG_OMAP_MUX
>>  static struct omap_board_mux board_mux[] __initdata = {
>> +     /* USB OTG DRVVBUS offset = 0x212 */
>> +     OMAP3_MUX(CHASSIS_DMAREQ3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
>>       { .reg_offset = OMAP_MUX_TERMINATOR },
>>  };
>>  #else
>> @@ -313,6 +321,8 @@ static void __init am3517_evm_init(void)
>>
>>       i2c_register_board_info(1, am3517evm_i2c_boardinfo,
>>                               ARRAY_SIZE(am3517evm_i2c_boardinfo));
>> +     /* MUSB */
>> +     usb_musb_init(&musb_board_data);
>>  }
>>
>>  static void __init am3517_evm_map_io(void)
>> diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
>> index 17726ac..1b08cff 100644
>> --- a/arch/arm/mach-omap2/usb-musb.c
>> +++ b/arch/arm/mach-omap2/usb-musb.c
>> @@ -28,6 +28,7 @@
>>
>>  #include <mach/hardware.h>
>>  #include <mach/irqs.h>
>> +#include <mach/am35xx.h>
>>  #include <plat/mux.h>
>>  #include <plat/usb.h>
>>
>> @@ -89,6 +90,9 @@ void __init usb_musb_init(struct omap_musb_board_data *board_data)
>>  {
>>       if (cpu_is_omap243x()) {
>>               musb_resources[0].start = OMAP243X_HS_BASE;
>> +     } else if (cpu_is_omap3517()) {
>> +             musb_resources[0].start = AM35XX_IPSS_USBOTGSS_BASE;
>> +             musb_resources[1].start = INT_35XX_USBOTG_IRQ;
>>       } else if (cpu_is_omap34xx()) {
>>               musb_resources[0].start = OMAP34XX_HSUSB_OTG_BASE;
>>       } else if (cpu_is_omap44xx()) {
>> diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
>> index d82bf77..2df6c70 100644
>> --- a/arch/arm/plat-omap/include/plat/usb.h
>> +++ b/arch/arm/plat-omap/include/plat/usb.h
>> @@ -168,5 +168,43 @@ void omap_usb_init(struct omap_usb_config *pdata);
>>  #    define  USBT2TLL5PI             (1 << 17)
>>  #    define  USB0PUENACTLOI          (1 << 16)
>>  #    define  USBSTANDBYCTRL          (1 << 15)
>> +/* AM3517 */
>> +/* USB 2.0 OTG module registers */
>> +#define USB_REVISION_REG     0x00
>> +#define USB_CTRL_REG         0x04
>> +#define USB_STAT_REG         0x08
>> +#define USB_EMULATION_REG    0x0c
>> +/* 0x10 Reserved */
>>  Wait... so the mode register isn't supported? Does AM35x support any
>> accelerated modes?
>>     
>
> Mode register is available though with some difference due to 15Rx/Tx eps.
> I have not added CPPI4.1 DMA  specific register here..
>   

   Ah. Then they're not compatible with DA8xx anyway...

>> +#define USB_AUTOREQ_REG              0x14
>> +#define USB_SRP_FIX_TIME_REG 0x18
>> +#define USB_TEARDOWN_REG     0x1c
>> +#define EP_INTR_SRC_REG              0x20
>> +#define EP_INTR_SRC_SET_REG  0x24
>> +#define EP_INTR_SRC_CLEAR_REG        0x28
>> +#define EP_INTR_MASK_REG     0x2c
>> +#define EP_INTR_MASK_SET_REG 0x30
>> +#define EP_INTR_MASK_CLEAR_REG       0x34
>> +#define EP_INTR_SRC_MASKED_REG       0x38
>> +#define CORE_INTR_SRC_REG    0x40
>> +#define CORE_INTR_SRC_SET_REG        0x44
>> +#define CORE_INTR_SRC_CLEAR_REG      0x48
>> +#define CORE_INTR_MASK_REG   0x4c
>> +#define CORE_INTR_MASK_SET_REG       0x50
>> +#define CORE_INTR_MASK_CLEAR_REG 0x54
>> +#define CORE_INTR_SRC_MASKED_REG 0x58
>> +/* 0x5c Reserved */
>> +#define USB_END_OF_INTR_REG  0x60
>>   Hm, I don't see the generic RNDIS EP size registers also. So, generic
>> RNDIS mode isn't supported? Then cppi41_dma.c won't work with this
>> chip... :-/
>>     
>
> Generic RNDIS mode is suported and CPPi4,1 is already verified to be working on
> AM3517.

   I wonder how it can work as the registers cppi41_dma.c relies upon 
are not the same as in DA8xx. Did you make some changes to cppi41_dma.c?

> You can get more details on this at AM3517 TRM,
>
> http://focus.ti.com/lit/ug/sprugr0/sprugr0.pdf
>   

   Thanks for the pointer...

WBR, Sergei



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

* RE: [PATCH] AM35x: Add musb support
       [not found]         ` <4BA5FBF6.8010102-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
@ 2010-03-22  6:42           ` Gupta, Ajay Kumar
  2010-03-22 10:14             ` Sergei Shtylyov
  0 siblings, 1 reply; 11+ messages in thread
From: Gupta, Ajay Kumar @ 2010-03-22  6:42 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA

Hi,

> >> +/* USB 2.0 OTG module registers */
> >> +#define USB_REVISION_REG     0x00
> >> +#define USB_CTRL_REG         0x04
> >> +#define USB_STAT_REG         0x08
> >> +#define USB_EMULATION_REG    0x0c
> >> +/* 0x10 Reserved */
> >>  Wait... so the mode register isn't supported? Does AM35x support any
> >> accelerated modes?
> >>
> >
> > Mode register is available though with some difference due to 15Rx/Tx
> eps.
> > I have not added CPPI4.1 DMA  specific register here..
> >
> 
>    Ah. Then they're not compatible with DA8xx anyway...

We could make it compatible with some change as done at,
http://arago-project.org/git/people/?p=sriram/ti-psp-omap.git;a=commitdiff;h=2ecce9529bd56c32997e0b2cbe84f7727ba5b217


> >> +#define USB_END_OF_INTR_REG  0x60
> >>   Hm, I don't see the generic RNDIS EP size registers also. So, generic
> >> RNDIS mode isn't supported? Then cppi41_dma.c won't work with this
> >> chip... :-/
> >>
> >
> > Generic RNDIS mode is suported and CPPi4,1 is already verified to be
> working on
> > AM3517.
> 
>    I wonder how it can work as the registers cppi41_dma.c relies upon
> are not the same as in DA8xx. Did you make some changes to cppi41_dma.c?

There were only few changes to make it work. You can see the changes
in our internal release tree at,
http://arago-project.org/git/people/?p=sriram/ti-psp-omap.git;a=summary

They have all the CPPI patches based out of your latest patch. All these
have to be reviewed/cleaned which is not happening as the base CPPI4.1 patch
itself is pending to be merged. 

Any update on CPPI4.1 driver location? Are you still waiting for Russell's reply?

Ajay
> 
> > You can get more details on this at AM3517 TRM,
> >
> > http://focus.ti.com/lit/ug/sprugr0/sprugr0.pdf
> >
> 
>    Thanks for the pointer...
> 
> WBR, Sergei
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] AM35x: Add musb support
  2010-03-22  6:42           ` Gupta, Ajay Kumar
@ 2010-03-22 10:14             ` Sergei Shtylyov
       [not found]               ` <4BA742ED.6080004-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Sergei Shtylyov @ 2010-03-22 10:14 UTC (permalink / raw)
  To: Gupta, Ajay Kumar; +Cc: Sergei Shtylyov, linux-omap, linux-usb

Hello.

Gupta, Ajay Kumar wrote:

>>>> +/* USB 2.0 OTG module registers */
>>>> +#define USB_REVISION_REG     0x00
>>>> +#define USB_CTRL_REG         0x04
>>>> +#define USB_STAT_REG         0x08
>>>> +#define USB_EMULATION_REG    0x0c
>>>> +/* 0x10 Reserved */
>>>>  Wait... so the mode register isn't supported? Does AM35x support any
>>>> accelerated modes?
>>>>
>>>>         
>>> Mode register is available though with some difference due to 15Rx/Tx
>>>       
>> eps.
>>     
>>> I have not added CPPI4.1 DMA  specific register here..
>>>
>>>       
>>    Ah. Then they're not compatible with DA8xx anyway...
>>     
>
> We could make it compatible with some change as done at,
> http://arago-project.org/git/people/?p=sriram/ti-psp-omap.git;a=commitdiff;h=2ecce9529bd56c32997e0b2cbe84f7727ba5b217
>   

   I'm not sure where cppi41_dma.c gets the definitions for 
USB_[RT]X_MODE_REG... anyway, I'm thinking of a different solution now, 
i.e. moving the functions that access the implementation specific 
acceleration

>>>> +#define USB_END_OF_INTR_REG  0x60
>>>>   Hm, I don't see the generic RNDIS EP size registers also. So, generic
>>>> RNDIS mode isn't supported? Then cppi41_dma.c won't work with this
>>>> chip... :-/
>>>>
>>>>         
>>> Generic RNDIS mode is suported and CPPi4,1 is already verified to be
>>>       
>> working on
>>     
>>> AM3517.
>>>       
>>    I wonder how it can work as the registers cppi41_dma.c relies upon
>> are not the same as in DA8xx. Did you make some changes to cppi41_dma.c?
>>     
>
> There were only few changes to make it work. You can see the changes
> in our internal release tree at,
> http://arago-project.org/git/people/?p=sriram/ti-psp-omap.git;a=summary
>
> They have all the CPPI patches based out of your latest patch. All these
>   

   My latest was take 5, this tree has take 3 as a base.

> have to be reviewed/cleaned which is not happening as the base CPPI4.1 patch
> itself is pending to be merged.
>
> Any update on CPPI4.1 driver location?

   I'm pretty sure it should be in arch/arm/common/...

>  Are you still waiting for Russell's reply?
>   

   Well, yes and no. I'm not hoping on Russell's reply though but 
haven't found time to move the code and post the new patch...

WBR, Sergei



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

* RE: [PATCH] AM35x: Add musb support
       [not found]               ` <4BA742ED.6080004-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
@ 2010-03-22 10:57                 ` Gupta, Ajay Kumar
       [not found]                   ` <19F8576C6E063C45BE387C64729E7394044DE0E71B-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Gupta, Ajay Kumar @ 2010-03-22 10:57 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA

Hi,
> >>> I have not added CPPI4.1 DMA  specific register here..
> >>>
> >>>
> >>    Ah. Then they're not compatible with DA8xx anyway...
> >>
> >
> > We could make it compatible with some change as done at,
> > http://arago-project.org/git/people/?p=sriram/ti-psp-
> omap.git;a=commitdiff;h=2ecce9529bd56c32997e0b2cbe84f7727ba5b217
> >
> 
> I'm not sure where cppi41_dma.c gets the definitions for
> USB_[RT]X_MODE_REG...

It is being used from plat/usb.h.

> anyway, I'm thinking of a different solution now,
> i.e. moving the functions that access the implementation specific
> acceleration
> 
> >>>> +#define USB_END_OF_INTR_REG  0x60
> >>    I wonder how it can work as the registers cppi41_dma.c relies upon
> >> are not the same as in DA8xx. Did you make some changes to
> cppi41_dma.c?
> >>
> >
> > There were only few changes to make it work. You can see the changes
> > in our internal release tree at,
> > http://arago-project.org/git/people/?p=sriram/ti-psp-omap.git;a=summary
> >
> > They have all the CPPI patches based out of your latest patch. All these
> >
> 
>    My latest was take 5, this tree has take 3 as a base.

Correct. Need to update.

> 
> > have to be reviewed/cleaned which is not happening as the base CPPI4.1
> patch
> > itself is pending to be merged.
> >
> > Any update on CPPI4.1 driver location?
> 
>    I'm pretty sure it should be in arch/arm/common/...
> 
> >  Are you still waiting for Russell's reply?
> >
> 
>    Well, yes and no. I'm not hoping on Russell's reply though but
> haven't found time to move the code and post the new patch...

Ok fine, would wait for this to get merged.

Ajay
> 
> WBR, Sergei
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] AM35x: Add musb support
       [not found]                   ` <19F8576C6E063C45BE387C64729E7394044DE0E71B-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
@ 2010-03-22 11:02                     ` Sergei Shtylyov
  2010-03-22 11:21                       ` Gupta, Ajay Kumar
  0 siblings, 1 reply; 11+ messages in thread
From: Sergei Shtylyov @ 2010-03-22 11:02 UTC (permalink / raw)
  To: Gupta, Ajay Kumar
  Cc: Sergei Shtylyov, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

Gupta, Ajay Kumar wrote:

>>>>> I have not added CPPI4.1 DMA  specific register here..
>>>>>
>>>>>
>>>>>           
>>>>    Ah. Then they're not compatible with DA8xx anyway...
>>>>
>>>>         
>>> We could make it compatible with some change as done at,
>>> http://arago-project.org/git/people/?p=sriram/ti-psp-
>>>       
>> omap.git;a=commitdiff;h=2ecce9529bd56c32997e0b2cbe84f7727ba5b217
>>     
>> I'm not sure where cppi41_dma.c gets the definitions for
>> USB_[RT]X_MODE_REG...
>>     
>
> It is being used from plat/usb.h.
>   

   I haven't found where it's included.

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCH] AM35x: Add musb support
  2010-03-22 11:02                     ` Sergei Shtylyov
@ 2010-03-22 11:21                       ` Gupta, Ajay Kumar
       [not found]                         ` <19F8576C6E063C45BE387C64729E7394044DE0E730-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Gupta, Ajay Kumar @ 2010-03-22 11:21 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linux-omap, linux-usb

Hi,
> -----Original Message-----
> From: Sergei Shtylyov [mailto:sshtylyov@mvista.com]
> Sent: Monday, March 22, 2010 4:33 PM
> To: Gupta, Ajay Kumar
> Cc: Sergei Shtylyov; linux-omap@vger.kernel.org; linux-usb@vger.kernel.org
> Subject: Re: [PATCH] AM35x: Add musb support
> 
> Gupta, Ajay Kumar wrote:
> 
> >>>>> I have not added CPPI4.1 DMA  specific register here..
> >>>>>
> >>>>>
> >>>>>
> >>>>    Ah. Then they're not compatible with DA8xx anyway...
> >>>>
> >>>>
> >>> We could make it compatible with some change as done at,
> >>> http://arago-project.org/git/people/?p=sriram/ti-psp-
> >>>
> >> omap.git;a=commitdiff;h=2ecce9529bd56c32997e0b2cbe84f7727ba5b217
> >>
> >> I'm not sure where cppi41_dma.c gets the definitions for
> >> USB_[RT]X_MODE_REG...
> >>
> >
> > It is being used from plat/usb.h.
> >
> 
>    I haven't found where it's included.

It's from cppi41_dma.h.

-Ajay
> 
> WBR, Sergei


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

* Re: [PATCH] AM35x: Add musb support
       [not found]                         ` <19F8576C6E063C45BE387C64729E7394044DE0E730-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
@ 2010-03-22 13:31                           ` Sergei Shtylyov
       [not found]                             ` <4BA77142.3050109-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Sergei Shtylyov @ 2010-03-22 13:31 UTC (permalink / raw)
  To: Gupta, Ajay Kumar
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA

Gupta, Ajay Kumar wrote:
>> -----Original Message-----
>> From: Sergei Shtylyov [mailto:sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org]
>> Sent: Monday, March 22, 2010 4:33 PM
>> To: Gupta, Ajay Kumar
>> Cc: Sergei Shtylyov; linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Subject: Re: [PATCH] AM35x: Add musb support
>>
>> Gupta, Ajay Kumar wrote:
>>
>>     
>>>>>>> I have not added CPPI4.1 DMA  specific register here..
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>>    Ah. Then they're not compatible with DA8xx anyway...
>>>>>>
>>>>>>
>>>>>>             
>>>>> We could make it compatible with some change as done at,
>>>>> http://arago-project.org/git/people/?p=sriram/ti-psp-
>>>>>
>>>>>           
>>>> omap.git;a=commitdiff;h=2ecce9529bd56c32997e0b2cbe84f7727ba5b217
>>>>
>>>> I'm not sure where cppi41_dma.c gets the definitions for
>>>> USB_[RT]X_MODE_REG...
>>>>
>>>>         
>>> It is being used from plat/usb.h.
>>>
>>>       
>>    I haven't found where it's included.
>>     
>
> It's from cppi41_dma.h.
>   

   Well, you've removed the register #define's from cppi41_dma.h and 
#includ'ed <plat/usb.h> BUT there's certainly no such header for DA8xx , 
so as I  suspected you've broken DA8xx support. That certainly won't do. :-/

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCH] AM35x: Add musb support
       [not found]                             ` <4BA77142.3050109-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
@ 2010-03-23  3:57                               ` Gupta, Ajay Kumar
  0 siblings, 0 replies; 11+ messages in thread
From: Gupta, Ajay Kumar @ 2010-03-23  3:57 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA

Hi,
> >>> It is being used from plat/usb.h.
> >>>
> >>>
> >>    I haven't found where it's included.
> >>
> >
> > It's from cppi41_dma.h.
> >
> 
>    Well, you've removed the register #define's from cppi41_dma.h and
> #includ'ed <plat/usb.h>

Correct.

> BUT there's certainly no such header for DA8xx , so as I  suspected
> you've broken DA8xx support. That certainly won't do.:-/

As cppi4.1 register layouts are different in DA8x and AM3517 so we can't
use common place (cppi41_dma.h)for them and therefore I moved them
to plat/usb.h defines.

Ajay
> 
> WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2010-03-23  3:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-24 13:18 [PATCH] AM35x: Add musb support Ajay Kumar Gupta
     [not found] ` <1267017495-17548-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-03-20 13:26   ` Sergei Shtylyov
2010-03-21  2:48     ` Gupta, Ajay Kumar
2010-03-21 10:59       ` Sergei Shtylyov
     [not found]         ` <4BA5FBF6.8010102-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
2010-03-22  6:42           ` Gupta, Ajay Kumar
2010-03-22 10:14             ` Sergei Shtylyov
     [not found]               ` <4BA742ED.6080004-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2010-03-22 10:57                 ` Gupta, Ajay Kumar
     [not found]                   ` <19F8576C6E063C45BE387C64729E7394044DE0E71B-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2010-03-22 11:02                     ` Sergei Shtylyov
2010-03-22 11:21                       ` Gupta, Ajay Kumar
     [not found]                         ` <19F8576C6E063C45BE387C64729E7394044DE0E730-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2010-03-22 13:31                           ` Sergei Shtylyov
     [not found]                             ` <4BA77142.3050109-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
2010-03-23  3:57                               ` Gupta, Ajay Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.