usb: musb: Adding support for ti81xx
Subsystems (7)
v3 cover usb: musb: Adding support for ti81xx
This patch set adds support for musb interface for TI81XX platforms and are dependent on recent patch series from Hemant Pedanekar at [1] and [2].
TI81XX platform has dual musb instances, uses CPPI4.1 DMA and has built in usb PHY. The current set of patches supports only the first interface and in PIO mode.
[1] http://marc.info/?l=linux-omap&m=131247989220300&w=2
[2] http://marc.info/?l=linux-omap&m=131411961308438&w=2
Changes from v2:
- Fixed a typo in patch 3/6
- Used kmemdup for wrapper structure pointer in patch 6/6
Ajay Kumar Gupta (1):
omap: musb: ti81xx: Add phy power function
Ravi Babu (5):
omap: musb: Adding hwmod data for ti81xx
omap: musb: Adding support for ti81xx
ti816evm: Add support for musb interface
ti814evm: Add support for musb interface
usb: musb: Add support for ti81xx platform
arch/arm/mach-omap2/board-ti8148evm.c | 9 + arch/arm/mach-omap2/board-ti8168evm.c | 9 + arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 74 +++ arch/arm/mach-omap2/omap_phy_internal.c | 24 + arch/arm/mach-omap2/usb-musb.c | 3 + arch/arm/plat-omap/include/plat/usb.h | 32 ++ drivers/usb/musb/Kconfig | 6 + drivers/usb/musb/Makefile | 1 + drivers/usb/musb/musb_core.c | 4 +- drivers/usb/musb/musb_dsps.c | 693 ++++++++++++++++++++++++++++ 10 files changed, 854 insertions(+), 1 deletions(-) create mode 100644 drivers/usb/musb/musb_dsps.c
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1315576070-7618-1-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org
PATCH v3 1/6 omap: musb: Adding hwmod data for ti81xx
From: Ravi Babu <[email protected]>
The usb subsystem (usbss) in ti81xx has two musb interfaces. There are three irqs and three address spaces for usbss, musb0 and musb1 respectively. Created one hwmod with three irq and memory resources.
--- arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 74 ++++++++++++++++++++++++++++ 1 files changed, 74 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod_81xx_data.c +74 -0
@@ -194,6 +194,7 @@ static struct omap_hwmod ti81xx_timer4_hwmod;static struct omap_hwmod ti81xx_timer5_hwmod;static struct omap_hwmod ti81xx_timer6_hwmod;static struct omap_hwmod ti81xx_timer7_hwmod; +static struct omap_hwmod ti81xx_usbss_hwmod;/* L4 SLOW -> TIMER1 interface */ static struct omap_hwmod_addr_space ti81xx_timer1_addr_space[] = {
@@ -650,6 +651,78 @@ static struct omap_hwmod ti81xx_timer7_hwmod = { .omap_chip = OMAP_CHIP_INIT(CHIP_IS_TI816X | CHIP_IS_TI814X) }; +/* L3 SLOW -> USBSS interface */ +static struct omap_hwmod_addr_space ti81xx_usbss_addr_space[] = { + { + .name ="usbss" , + .pa_start =0x47400000 , + .pa_end =0x47400000 +SZ_4K -1 , + .flags =ADDR_TYPE_RT + }, + { + .name ="musb0" , + .pa_start =0x47401000 , + .pa_end =0x47401000 +SZ_2K -1 , + .flags =ADDR_TYPE_RT + }, + { + .name ="musb1" , + .pa_start =0x47401800 , + .pa_end =0x47401800 +SZ_2K -1 , + .flags =ADDR_TYPE_RT + }, + { + }, +}; + +static struct omap_hwmod_class_sysconfig ti81xx_usbhsotg_sysc = { + .rev_offs =0x0 , + .sysc_offs =0x10 , + .sysc_flags = (SYSC_HAS_SIDLEMODE |SYSC_HAS_SOFTRESET ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART ), + .sysc_fields = &omap_hwmod_sysc_type2, +}; + +static struct omap_hwmod_class ti81xx_usbotg_class = { + .name ="usbotg" , + .sysc = &ti81xx_usbhsotg_sysc, +}; + +static struct omap_hwmod_irq_info ti81xx_usbss_mpu_irqs[] = { + { .name ="usbss-irq" , .irq =17 , }, + { .name ="musb0-irq" , .irq =18 , }, + { .name ="musb1-irq" , .irq =19 , }, + { .irq =-1 , }, +}; + +static struct omap_hwmod_ocp_if ti81xx_l3_slow__usbss = { + .master = &ti81xx_l3_slow_hwmod, + .slave = &ti81xx_usbss_hwmod, + .clk ="usbotg_ick" , + .addr = ti81xx_usbss_addr_space, + .user =OCP_USER_MPU , + .flags =OCPIF_SWSUP_IDLE , +}; + +static struct omap_hwmod_ocp_if *ti81xx_usbss_slaves[] = { + &ti81xx_l3_slow__usbss, +}; + +static struct omap_hwmod ti81xx_usbss_hwmod = { + .name ="usb_otg_hs" , + .mpu_irqs = ti81xx_usbss_mpu_irqs, + .main_clk ="usbotg_ick" , + .clkdm_name ="default_usb_clkdm" , + .prcm = { + .omap4 = { + .clkctrl_offs =TI816X_CM_DEFAULT_USB_CLKCTRL_OFFSET , + }, + }, + .slaves = ti81xx_usbss_slaves, + .slaves_cnt =ARRAY_SIZE (ti81xx_usbss_slaves), + .class = &ti81xx_usbotg_class, + .omap_chip =OMAP_CHIP_INIT (CHIP_IS_TI816X |CHIP_IS_TI814X ) +};static __initdata struct omap_hwmod *ti81xx_hwmods[] = { &ti81xx_l3_fast_hwmod,
@@ -668,6 +741,7 @@ static __initdata struct omap_hwmod *ti81xx_hwmods[] = { &ti81xx_timer5_hwmod, &ti81xx_timer6_hwmod, &ti81xx_timer7_hwmod, + &ti81xx_usbss_hwmod, NULL, };
Signature · 6 lines
1.6.2.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1315576070-7618-2-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org
RE: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xx
Hi,
Quoted 4 lines
To: [email protected]
Cc: [email protected]; Balbi, Felipe; [email protected]; B, Ravi; Cousson, Benoit; Gupta, Ajay Kumar
Subject: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xx
Felipe,
I am planning to send patch 1/6 along with next revision of ti81xx hwmod baseport patch from Hemant so that all hwmod data gets reviewed at one place.
So now only rest 5 (2/6 to 6/6) patches needs to be queued for usb.
I hope this will be fine with you. Let me know if you want me to post Same 5 patches separately.
Ajay
Quoted 2 lines
From: Ravi Babu <[email protected]>
[...]
Quoted 3 lines
--
1.6.2.4
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 19F8576C6E063C45BE387C64729E739404ECA545E3-/tLxBxkBPtCIQmiDNMet8wC/[email protected]
Re: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xx
Hi,
Quoted 10 lines · Ajay Kumar
Quoted 4 lines
To: [email protected]
Cc: [email protected]; Balbi, Felipe; [email protected]; B, Ravi; Cousson, Benoit; Gupta, Ajay Kumar
Subject: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xxFelipe,
I am planning to send patch 1/6 along with next revision of ti81xx hwmod baseport patch from Hemant so that all hwmod data gets reviewed at one place.
Quoted 4 lines
So now only rest 5 (2/6 to 6/6) patches needs to be queued for usb.
I hope this will be fine with you. Let me know if you want me to post Same 5 patches separately.
I guess it's better to queue them separately. I will only take whatever lies in drivers/usb/musb
Signature · 1 line
balbi
RE: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xx
Hi,
Quoted 11 lines · Ajay Kumar
Quoted 10 lines
Quoted 4 lines
To: [email protected]
Cc: [email protected]; Balbi, Felipe; [email protected]; B, Ravi; Cousson, Benoit; Gupta, Ajay Kumar
Subject: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xxFelipe,
I am planning to send patch 1/6 along with next revision of ti81xx hwmod baseport patch from Hemant so that all hwmod data gets reviewed at one place.
Quoted 7 lines
Quoted 4 lines
So now only rest 5 (2/6 to 6/6) patches needs to be queued for usb.
I hope this will be fine with you. Let me know if you want me to post Same 5 patches separately.
I guess it's better to queue them separately. I will only take whatever lies in
drivers/usb/musb
Ok fine so usb hwmod patch will come from Hemant in his hwmod baseport Series. I will resubmit the one patch fixing your comment.
Thanks,
Ajay
Quoted 3 lines
--
balbi
Re: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xx
Hi,
Quoted 14 lines · Ajay Kumar
Hi,
Quoted 13 lines · Ajay Kumar
Quoted 12 lines
Quoted 4 lines
To: [email protected]
Cc: [email protected]; Balbi, Felipe; [email protected]; B, Ravi; Cousson, Benoit; Gupta, Ajay Kumar
Subject: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xxFelipe,
I am planning to send patch 1/6 along with next revision of ti81xx hwmod baseport patch from Hemant so that all hwmod data gets reviewed at one place.So now only rest 5 (2/6 to 6/6) patches needs to be queued for usb.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I hope this will be fine with you. Let me know if you want me to post Same 5 patches separately.
I guess it's better to queue them separately. I will only take whatever lies in
drivers/usb/musbOk fine so usb hwmod patch will come from Hemant in his hwmod baseport Series. I will resubmit the one patch fixing your comment.
ok cool, tks.
For you platform_data stuff (if you have any), you can add a header to include/linux/platform_data/musb-dsps.h
Or something similar.
Signature · 1 line
balbi
RE: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xx
Hi,
Quoted 22 lines · Ajay Kumar
Quoted 13 lines
Hi,
Quoted 12 lines · Ajay Kumar
Quoted 11 lines
Quoted 4 lines
To: [email protected]
Cc: [email protected]; Balbi, Felipe; [email protected]; B, Ravi; Cousson, Benoit; Gupta, Ajay Kumar
Subject: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xxFelipe,
I am planning to send patch 1/6 along with next revision of ti81xx hwmod baseport patch from Hemant so that all hwmod data gets reviewed at one place.So now only rest 5 (2/6 to 6/6) patches needs to be queued for
usb.
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
I hope this will be fine with you. Let me know if you want me to post Same 5 patches separately.
I guess it's better to queue them separately. I will only take whatever lies in
drivers/usb/musb
Quoted 7 lines
Quoted 2 lines
Ok fine so usb hwmod patch will come from Hemant in his hwmod baseport Series. I will resubmit the one patch fixing your comment.
ok cool, tks.
For you
platform_datastuff (if you have any), you can add a header toinclude/linux/platform_data/musb-dsps.h
I need to access "struct omap_musb_board_data" and so would add "#include <plat/usb.h>" in new file drivers/usb/musb/musb_dsps.h.
Any comment ?
Ajay
Quoted 6 lines
Or something similar.
--
balbi
A message that is not in the archive (sent off-list or not yet received): 19F8576C6E063C45BE387C64729E739404ECCE551F-/tLxBxkBPtCIQmiDNMet8wC/[email protected]
Re: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xx
Hi,
Quoted 28 lines · Ajay Kumar
Hi,
Quoted 27 lines · Ajay Kumar
Quoted 13 lines
Hi,
Quoted 12 lines · Ajay Kumar
Quoted 11 lines
Quoted 4 lines
To: [email protected]
Cc: [email protected]; Balbi, Felipe; [email protected]; B, Ravi; Cousson, Benoit; Gupta, Ajay Kumar
Subject: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xxFelipe,
I am planning to send patch 1/6 along with next revision of ti81xx hwmod baseport patch from Hemant so that all hwmod data gets reviewed at one place.So now only rest 5 (2/6 to 6/6) patches needs to be queued for
usb.
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
I hope this will be fine with you. Let me know if you want me to post Same 5 patches separately.
I guess it's better to queue them separately. I will only take whatever lies in
drivers/usb/musbOk fine so usb hwmod patch will come from Hemant in his hwmod baseport Series. I will resubmit the one patch fixing your comment.
ok cool, tks.
Quoted 7 lines
Quoted 2 lines
For you
platform_datastuff (if you have any), you can add a header toinclude/linux/platform_data/musb-dsps.hI need to access "struct
omap_musb_board_data" and so would add "#include <plat/usb.h>" in new filedrivers/usb/musb/musb_dsps.h.Any comment ?
It would be nice to move that platform_data from <plat> to <linux/platform_data>
Signature · 1 line
balbi
A message that is not in the archive (sent off-list or not yet received): 20111011091055.GE10155-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org
RE: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xx
Hi,
Quoted 36 lines · Ajay Kumar
Quoted 4 lines
Hi,
Quoted 3 lines · Ajay Kumar
Quoted 2 lines
Hi,
Quoted 1 line
On Mon, Sep 26, 2011 at 03:21:07PM +0530, Gupta, Ajay Kumar
Quoted 15 lines · wrote:
Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
To: [email protected]
Cc: [email protected]; Balbi, Felipe; [email protected]; B, Ravi; Cousson, Benoit; Gupta, Ajay Kumar
Subject: [PATCH 1/6 v3] omap: musb: Adding hwmod data for
ti81xxQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Felipe,
I am planning to send patch 1/6 along with next revision of ti81xx hwmod baseport patch from Hemant so that all hwmod data gets reviewed at one place.So now only rest 5 (2/6 to 6/6) patches needs to be queued for
usb.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I hope this will be fine with you. Let me know if you want me to post Same 5 patches separately.
I guess it's better to queue them separately. I will only take whatever lies in
drivers/usb/musbOk fine so usb hwmod patch will come from Hemant in his hwmod baseport Series. I will resubmit the one patch fixing your
comment.
Quoted 6 lines
Quoted 5 lines
ok cool, tks.
For you
platform_datastuff (if you have any), you can add a header toinclude/linux/platform_data/musb-dsps.h
Quoted 7 lines
Quoted 4 lines
I need to access "struct
omap_musb_board_data" and so would add "#include <plat/usb.h>" in new filedrivers/usb/musb/musb_dsps.h.Any comment ?
It would be nice to move that
platform_datafrom <plat> to <linux/platform_data>
Yes, correct. But that would need change at below files.
arch/arm/mach-omap2/board-4430sdp.c:static struct omap_musb_board_data musb_board_data = { arch/arm/mach-omap2/board-am3517evm.c:static struct omap_musb_board_data musb_board_data = { arch/arm/mach-omap2/board-omap3evm.c:static struct omap_musb_board_data musb_board_data = { arch/arm/mach-omap2/board-rx51.c:static struct omap_musb_board_data musb_board_data = { arch/arm/mach-omap2/board-omap4panda.c:static struct omap_musb_board_data musb_board_data = { arch/arm/mach-omap2/board-ti8168evm.c:static struct omap_musb_board_data musb_board_data = { arch/arm/mach-omap2/board-omap4pcm049.c:static struct omap_musb_board_data musb_board_data = { arch/arm/mach-omap2/usb-musb.c:static void usb_musb_mux_init(struct omap_musb_board_data *board_data) arch/arm/mach-omap2/board-ti8148evm.c:static struct omap_musb_board_data musb_board_data = { arch/arm/mach-omap2/board-am335xevm.c:static struct omap_musb_board_data musb_board_data = { arch/arm/mach-omap2/board-ti8148evm.c.orig:static struct omap_musb_board_data musb_board_data = { arch/arm/mach-omap2/board-omap3evm.c.orig:static struct omap_musb_board_data musb_board_data = { drivers/usb/musb/am35x.c:drivers/usb/musb/musb_dsps.cdrivers/usb/musb/omap2430.c:
I think this can be done in a separate patch and let the ti81xx 6/6 Patch to remain same.
The separate patch will replace "#include <plat/usb.h>" to "#include <platform_data/usb.h>"
Ajay
Quoted 3 lines
--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xx
Hi,
Quoted 63 lines · Ajay Kumar
Hi,
Quoted 36 lines · Ajay Kumar
Quoted 4 lines
Hi,
Quoted 3 lines · Ajay Kumar
Quoted 2 lines
Hi,
Quoted 1 line
On Mon, Sep 26, 2011 at 03:21:07PM +0530, Gupta, Ajay Kumar
Quoted 15 lines · wrote:
Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
To: [email protected]
Cc: [email protected]; Balbi, Felipe; [email protected]; B, Ravi; Cousson, Benoit; Gupta, Ajay Kumar
Subject: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xxQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Felipe,
I am planning to send patch 1/6 along with next revision of ti81xx hwmod baseport patch from Hemant so that all hwmod data gets reviewed at one place.So now only rest 5 (2/6 to 6/6) patches needs to be queued for
usb.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I hope this will be fine with you. Let me know if you want me to post Same 5 patches separately.
I guess it's better to queue them separately. I will only take whatever lies in
drivers/usb/musbOk fine so usb hwmod patch will come from Hemant in his hwmod baseport Series. I will resubmit the one patch fixing your
comment.
Quoted 6 lines
Quoted 5 lines
ok cool, tks.
For you
platform_datastuff (if you have any), you can add a header toinclude/linux/platform_data/musb-dsps.hQuoted 7 lines
Quoted 4 lines
I need to access "struct
omap_musb_board_data" and so would add "#include <plat/usb.h>" in new filedrivers/usb/musb/musb_dsps.h.Any comment ?
It would be nice to move that
platform_datafrom <plat> to <linux/platform_data>Yes, correct. But that would need change at below files.
arch/arm/mach-omap2/board-4430sdp.c:static struct
omap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-am3517evm.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-omap3evm.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-rx51.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-omap4panda.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-ti8168evm.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-omap4pcm049.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/usb-musb.c:static voidusb_musb_mux_init(struct omap_musb_board_data *board_data)arch/arm/mach-omap2/board-ti8148evm.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-am335xevm.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-ti8148evm.c.orig:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-omap3evm.c.orig:static structomap_musb_board_datamusb_board_data= {drivers/usb/musb/am35x.c:drivers/usb/musb/musb_dsps.cdrivers/usb/musb/omap2430.c:
Quoted 5 lines
I think this can be done in a separate patch and let the ti81xx 6/6 Patch to remain same.
The separate patch will replace "#include <
plat/usb.h>" to "#include <platform_data/usb.h>"
cool, that can be done with a sed script ;-)
Signature · 1 line
balbi
RE: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xx
Hi,
Quoted 74 lines
Quoted 3 lines
Quoted 3 lines · Ajay Kumar
Quoted 2 lines
Hi,
Quoted 1 line
On Mon, Oct 10, 2011 at 10:40:55AM +0530, Gupta, Ajay Kumar
Quoted 70 lines · wrote:
Quoted 34 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Hi,
Quoted 1 line
On Mon, Sep 26, 2011 at 03:21:07PM +0530, Gupta, Ajay Kumar
Quoted 16 lines · wrote:
Quoted 16 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
To: [email protected]
Cc: [email protected]; Balbi, Felipe; [email protected]; B, Ravi; Cousson, Benoit; Gupta, Ajay Kumar
Subject: [PATCH 1/6 v3] omap: musb: Adding hwmod data for ti81xxQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Felipe,
I am planning to send patch 1/6 along with next revision of ti81xx hwmod baseport patch from Hemant so that all hwmod data gets reviewed at one place.So now only rest 5 (2/6 to 6/6) patches needs to be queued for
usb.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I hope this will be fine with you. Let me know if you want me to post Same 5 patches separately.
I guess it's better to queue them separately. I will only take whatever lies in
drivers/usb/musbOk fine so usb hwmod patch will come from Hemant in his hwmod baseport Series. I will resubmit the one patch fixing your
comment.
Quoted 6 lines
Quoted 5 lines
ok cool, tks.
For you
platform_datastuff (if you have any), you can add a header toinclude/linux/platform_data/musb-dsps.hQuoted 7 lines
Quoted 4 lines
I need to access "struct
omap_musb_board_data" and so would add "#include <plat/usb.h>" in new filedrivers/usb/musb/musb_dsps.h.Any comment ?
It would be nice to move that
platform_datafrom <plat> to <linux/platform_data>Yes, correct. But that would need change at below files.
arch/arm/mach-omap2/board-4430sdp.c:static struct
omap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-am3517evm.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-omap3evm.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-rx51.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-omap4panda.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-ti8168evm.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-omap4pcm049.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/usb-musb.c:static voidusb_musb_mux_init(struct omap_musb_board_data *board_data)arch/arm/mach-omap2/board-ti8148evm.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-am335xevm.c:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-ti8148evm.c.orig:static structomap_musb_board_datamusb_board_data= { arch/arm/mach-omap2/board-omap3evm.c.orig:static structomap_musb_board_datamusb_board_data= {drivers/usb/musb/am35x.c:drivers/usb/musb/musb_dsps.cdrivers/usb/musb/omap2430.c:
Quoted 7 lines
Quoted 5 lines
I think this can be done in a separate patch and let the ti81xx 6/6 Patch to remain same.
The separate patch will replace "#include <
plat/usb.h>" to "#include <platform_data/usb.h>"cool, that can be done with a sed script ;-)
Ok fine then I will send the refreshed 5 patch set for ti81xx and 3 patch set for am335x correcting your comments.
Thanks,
Ajay
Quoted 3 lines
--
balbi
PATCH v3 4/6 ti816evm: Add support for musb interface
In reply to a message not in the archiveFrom: Ravi Babu <[email protected]>
Adding musb support in ti816 EVM board file.
--- arch/arm/mach-omap2/board-ti8168evm.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-ti8168evm.c +9 -0
@@ -23,6 +23,14 @@#include <plat/irqs.h> #include <plat/board.h> #include <plat/common.h> +#include <plat/usb.h> + +static struct omap_musb_board_data musb_board_data = { + .set_phy_power = ti81xx_musb_phy_power, + .interface_type =MUSB_INTERFACE_ULPI , + .mode =MUSB_OTG , + .power =500 , +};static struct omap_board_config_kernel ti8168_evm_config[]__initdata = { };
@@ -38,6 +46,7 @@ static void __init ti8168_evm_init(void)omap_serial_init (); omap_board_config = ti8168_evm_config; omap_board_config_size =ARRAY_SIZE (ti8168_evm_config); +usb_musb_init (&musb_board_data); }static void __init ti8168_evm_map_io (void )
Signature · 6 lines
1.6.2.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1315576070-7618-5-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org
Felipe Balbi
Acked-byRe: [PATCH 4/6 v3] ti816evm: Add support for musb interface
Hi,
Quoted 6 lines · Ajay Kumar Gupta
From: Ravi Babu <[email protected]>
Adding musb support in ti816 EVM board file.
Signed-off-by Ajay Kumar Gupta <[email protected]>Signed-off-by Ravi Babu <[email protected]>
this looks ok, but should go through OMAP tree:
Signature · 1 line
balbi
PATCH v3 2/6 omap: musb: Adding support for ti81xx
In reply to Ajay Kumar GuptaFrom: Ravi Babu <[email protected]>
Added musb support for ti81xx platform which has two instances of musb interface and uses CPPI4.1 DMA. The current patch set adds support for single instance and in PIO mode only.
--- arch/arm/mach-omap2/usb-musb.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/usb-musb.c +3 -0
@@ -143,6 +143,9 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)if (cpu_is_omap3517 () ||cpu_is_omap3505 ()) { oh_name ="am35x_otg_hs" ; name ="musb-am35x" ; + }else if (cpu_is_ti81xx ()) { + oh_name ="usb_otg_hs" ; + name ="musb-ti81xx" ; }else { oh_name ="usb_otg_hs" ; name ="musb-omap2430" ;
Signature · 1 line
1.6.2.4
Re: [PATCH 2/6 v3] omap: musb: Adding support for ti81xx
Quoted 8 lines · Ajay Kumar Gupta
From: Ravi Babu <[email protected]>
Added musb support for ti81xx platform which has two instances of musb interface and uses CPPI4.1 DMA. The current patch set adds support for single instance and in PIO mode only.
Signed-off-by Ajay Kumar Gupta <[email protected]>Signed-off-by Ravi Babu <[email protected]>
Should go through OMAP tree:
Signature · 1 line
balbi
PATCH v3 3/6 omap: musb: ti81xx: Add phy power function
In reply to Ajay Kumar GuptaAdding ti81xx_musb_phy_power() which will be used by musb driver through its function pointer in board_data.
--- arch/arm/mach-omap2/omap_phy_internal.c | 24 +++++++++++++++++++++++ arch/arm/plat-omap/include/plat/usb.h | 32 +++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_phy_internal.c +24 -0
@@ -260,3 +260,27 @@ void am35x_set_mode(u8 musb_mode)omap_ctrl_writel (devconf2,AM35XX_CONTROL_DEVCONF2 ); } + +void ti81xx_musb_phy_power (u8 on) +{ +u32 usbphycfg =omap_ctrl_readl (USBCTRL0 ); + +if (on) { +if (cpu_is_ti816x ()) { + usbphycfg |=TI816X_USBPHY0_NORMAL_MODE ; + usbphycfg &= ~TI816X_USBPHY_REFCLK_OSC ; + }else if (cpu_is_ti814x ()) { + usbphycfg &= ~(USBPHY_CM_PWRDN |USBPHY_OTG_PWRDN + |USBPHY_DPINPUT |USBPHY_DMINPUT ); + usbphycfg |= (USBPHY_OTGVDET_EN |USBPHY_OTGSESSEND_EN + |USBPHY_DPOPBUFCTL |USBPHY_DMOPBUFCTL ); + } + }else { +if (cpu_is_ti816x ()) + usbphycfg &= ~TI816X_USBPHY0_NORMAL_MODE ; +else if (cpu_is_ti814x ()) + usbphycfg |=USBPHY_CM_PWRDN |USBPHY_OTG_PWRDN ; + + } +omap_ctrl_writel (usbphycfg,USBCTRL0 ); +}
arch/arm/plat-omap/include/plat/usb.h +32 -0
@@ -114,6 +114,7 @@ extern void am35x_musb_reset(void);extern void am35x_musb_phy_power (u8 on);extern void am35x_musb_clear_irq (void );extern void am35x_set_mode (u8 musb_mode); +extern void ti81xx_musb_phy_power (u8 on);/* * FIXME correct answer depends on hmc_mode,
@@ -273,6 +274,37 @@ static inline void omap2_usbfs_init(struct omap_usb_config *pdata)#define CONF2_OTGPWRDN (1 << 2)#define CONF2_DATPOL (1 << 1) +/* TI81XX specific definitions */ +#define USBCTRL0 0x620 +#define USBSTAT0 0x624 + +/* TI816X PHY controls bits */ +#define TI816X_USBPHY0_NORMAL_MODE (1 << 0) +#define TI816X_USBPHY_REFCLK_OSC (1 << 8) + +/* TI814X PHY controls bits */ +#define USBPHY_CM_PWRDN (1 << 0) +#define USBPHY_OTG_PWRDN (1 << 1) +#define USBPHY_CHGDET_DIS (1 << 2) +#define USBPHY_CHGDET_RSTRT (1 << 3) +#define USBPHY_SRCONDM (1 << 4) +#define USBPHY_SINKONDP (1 << 5) +#define USBPHY_CHGISINK_EN (1 << 6) +#define USBPHY_CHGVSRC_EN (1 << 7) +#define USBPHY_DMPULLUP (1 << 8) +#define USBPHY_DPPULLUP (1 << 9) +#define USBPHY_CDET_EXTCTL (1 << 10) +#define USBPHY_GPIO_MODE (1 << 12) +#define USBPHY_DPOPBUFCTL (1 << 13) +#define USBPHY_DMOPBUFCTL (1 << 14) +#define USBPHY_DPINPUT (1 << 15) +#define USBPHY_DMINPUT (1 << 16) +#define USBPHY_DPGPIO_PD (1 << 17) +#define USBPHY_DMGPIO_PD (1 << 18) +#define USBPHY_OTGVDET_EN (1 << 19) +#define USBPHY_OTGSESSEND_EN (1 << 20) +#define USBPHY_DATA_POLARITY (1 << 23) +#if defined(CONFIG_ARCH_OMAP1 ) && defined(CONFIG_USB )u32 omap1_usb0_init (unsigned nwires,unsigned is_device);u32 omap1_usb1_init (unsigned nwires);
Signature · 1 line
1.6.2.4
A message that is not in the archive (sent off-list or not yet received): 1315576070-7618-4-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org
Re: [PATCH 3/6 v3] omap: musb: ti81xx: Add phy power function
Quoted 5 lines · Ajay Kumar Gupta
Adding
ti81xx_musb_phy_power()which will be used by musb driver through its function pointer inboard_data.Signed-off-by Ajay Kumar Gupta <[email protected]>Signed-off-by Ravi Babu <[email protected]>
this should go through OMAP tree.
Quoted 26 lines
--- arch/arm/mach-omap2/omap_phy_internal.c | 24 +++++++++++++++++++++++ arch/arm/plat-omap/include/plat/usb.h | 32 +++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 0 deletions(-)arch/arm/mach-omap2/omap_phy_internal.c +13
-0@@ -260,3 +260,27 @@ void am35x_set_mode(u8 musb_mode)omap_ctrl_writel (devconf2,AM35XX_CONTROL_DEVCONF2 ); } + +void ti81xx_musb_phy_power (u8 on) +{ +u32 usbphycfg =omap_ctrl_readl (USBCTRL0 ); + +if (on) { +if (cpu_is_ti816x ()) { + usbphycfg |=TI816X_USBPHY0_NORMAL_MODE ; + usbphycfg &= ~TI816X_USBPHY_REFCLK_OSC ; + }else if (cpu_is_ti814x ()) { + usbphycfg &= ~(USBPHY_CM_PWRDN |USBPHY_OTG_PWRDN + |USBPHY_DPINPUT |USBPHY_DMINPUT ); + usbphycfg |= (USBPHY_OTGVDET_EN | USBPHY_OTGSESSEND_EN
arch/arm/mach-omap2/omap_phy_internal.c void am35x_set_mode(u8 musb_mode) · line 285
Quoted 10 lines
arch/arm/mach-omap2/omap_phy_internal.c +10
-0+ | USBPHY_DPOPBUFCTL | USBPHY_DMOPBUFCTL); + } + }else { +if (cpu_is_ti816x ()) + usbphycfg &= ~TI816X_USBPHY0_NORMAL_MODE ; +else if (cpu_is_ti814x ()) + usbphycfg |=USBPHY_CM_PWRDN |USBPHY_OTG_PWRDN ; + + } +omap_ctrl_writel (usbphycfg,USBCTRL0 );
don't use omap_ctrl_*(). ioremap your memory space.
Quoted 53 lines
arch/arm/plat-omap/include/plat/usb.h +32
-0@@ -114,6 +114,7 @@ extern void am35x_musb_reset(void);extern void am35x_musb_phy_power (u8 on);extern void am35x_musb_clear_irq (void );extern void am35x_set_mode (u8 musb_mode); +extern void ti81xx_musb_phy_power (u8 on);/* * FIXME correct answer depends on hmc_mode, @@ -273,6 +274,37 @@ static inline void omap2_usbfs_init(struct omap_usb_config *pdata)#define CONF2_OTGPWRDN (1 << 2)#define CONF2_DATPOL (1 << 1) +/* TI81XX specific definitions */ +#define USBCTRL0 0x620 +#define USBSTAT0 0x624 + +/* TI816X PHY controls bits */ +#define TI816X_USBPHY0_NORMAL_MODE (1 << 0) +#define TI816X_USBPHY_REFCLK_OSC (1 << 8) + +/* TI814X PHY controls bits */ +#define USBPHY_CM_PWRDN (1 << 0) +#define USBPHY_OTG_PWRDN (1 << 1) +#define USBPHY_CHGDET_DIS (1 << 2) +#define USBPHY_CHGDET_RSTRT (1 << 3) +#define USBPHY_SRCONDM (1 << 4) +#define USBPHY_SINKONDP (1 << 5) +#define USBPHY_CHGISINK_EN (1 << 6) +#define USBPHY_CHGVSRC_EN (1 << 7) +#define USBPHY_DMPULLUP (1 << 8) +#define USBPHY_DPPULLUP (1 << 9) +#define USBPHY_CDET_EXTCTL (1 << 10) +#define USBPHY_GPIO_MODE (1 << 12) +#define USBPHY_DPOPBUFCTL (1 << 13) +#define USBPHY_DMOPBUFCTL (1 << 14) +#define USBPHY_DPINPUT (1 << 15) +#define USBPHY_DMINPUT (1 << 16) +#define USBPHY_DPGPIO_PD (1 << 17) +#define USBPHY_DMGPIO_PD (1 << 18) +#define USBPHY_OTGVDET_EN (1 << 19) +#define USBPHY_OTGSESSEND_EN (1 << 20) +#define USBPHY_DATA_POLARITY (1 << 23) +#if defined(CONFIG_ARCH_OMAP1 ) && defined(CONFIG_USB )u32 omap1_usb0_init (unsigned nwires,unsigned is_device);u32 omap1_usb1_init (unsigned nwires);Signature · 1 line
1.6.2.4
Signature · 1 line
balbi
PATCH v3 5/6 ti814evm: Add support for musb interface
In reply to Ajay Kumar GuptaFrom: Ravi Babu <[email protected]>
Adding musb support in ti814 EVM board file.
--- arch/arm/mach-omap2/board-ti8148evm.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/board-ti8148evm.c +9 -0
@@ -23,6 +23,14 @@#include <plat/irqs.h> #include <plat/board.h> #include <plat/common.h> +#include <plat/usb.h> + +static struct omap_musb_board_data musb_board_data = { + .set_phy_power = ti81xx_musb_phy_power, + .interface_type =MUSB_INTERFACE_ULPI , + .mode =MUSB_OTG , + .power =500 , +};static struct omap_board_config_kernel ti8148_evm_config[]__initdata = { };
@@ -38,6 +46,7 @@ static void __init ti8148_evm_init(void)omap_serial_init (); omap_board_config = ti8148_evm_config; omap_board_config_size =ARRAY_SIZE (ti8148_evm_config); +usb_musb_init (&musb_board_data); }static void __init ti8148_evm_map_io (void )
Signature · 1 line
1.6.2.4
Re: [PATCH 5/6 v3] ti814evm: Add support for musb interface
Quoted 6 lines · Ajay Kumar Gupta
From: Ravi Babu <[email protected]>
Adding musb support in ti814 EVM board file.
Signed-off-by Ajay Kumar Gupta <[email protected]>Signed-off-by Ravi Babu <[email protected]>
similarly:
Signature · 1 line
balbi
PATCH v3 6/6 usb: musb: Add support for ti81xx platform
In reply to Ajay Kumar GuptaFrom: Ravi Babu <[email protected]>
TI81XX platform has two musb interfaces and uses CPPI4.1 DMA engine. It has builtin USB PHYs as AM35x. The current set of patches adds support for one instance and only in PIO mode.
--- drivers/usb/musb/Kconfig | 6 + drivers/usb/musb/Makefile | 1 + drivers/usb/musb/musb_core.c | 4 +- drivers/usb/musb/musb_dsps.c | 693 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 703 insertions(+), 1 deletions(-) create mode 100644 drivers/usb/musb/musb_dsps.c
drivers/usb/musb/Kconfig +6 -0
@@ -11,6 +11,7 @@ config USB_MUSB_HDRC depends on USB && USB_GADGET depends on (ARM || (BF54x && !BF544) || (BF52x && !BF522 && !BF523)) select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN) + select NOP_USB_XCEIV if SOC_OMAPTI81XX select TWL4030_USB if MACH_OMAP_3430SDP select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA select USB_OTG_UTILS
@@ -57,6 +58,10 @@ config USB_MUSB_AM35X tristate "AM35x" depends on ARCH_OMAP +config USB_MUSB_DSPS + tristate "TI DSPS platforms" + depends on SOC_OMAPTI81XX + config USB_MUSB_BLACKFIN tristate "Blackfin" depends on (BF54x && !BF544) || (BF52x && ! BF522 && !BF523)
@@ -71,6 +76,7 @@ config MUSB_PIO_ONLY bool 'Disable DMA (always use PIO)' depends on USB_MUSB_HDRC default USB_MUSB_TUSB6010 || USB_MUSB_DA8XX || USB_MUSB_AM35X + default SOC_OMAPTI81XX help All data is copied between memory and FIFO by the CPU. DMA controllers are ignored.
drivers/usb/musb/Makefile +1 -0
@@ -13,6 +13,7 @@ musb_hdrc-$(CONFIG_DEBUG_FS) += musb_debugfs.o # Hardware Glue Layer obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o +obj-$(CONFIG_USB_MUSB_DSPS) += musb_dsps.o obj-$(CONFIG_USB_MUSB_TUSB6010) += tusb6010.o obj-$(CONFIG_USB_MUSB_DAVINCI) += davinci.o obj-$(CONFIG_USB_MUSB_DA8XX) += da8xx.o
drivers/usb/musb/musb_core.c +3 -1
@@ -1014,7 +1014,9 @@ static void musb_shutdown(struct platform_device *pdev) || defined(CONFIG_USB_MUSB_OMAP2PLUS ) \ || defined(CONFIG_USB_MUSB_OMAP2PLUS_MODULE ) \ || defined(CONFIG_USB_MUSB_AM35X ) \ - || defined(CONFIG_USB_MUSB_AM35X_MODULE ) + || defined(CONFIG_USB_MUSB_AM35X_MODULE ) \ + || defined(CONFIG_USB_MUSB_DSPS ) \ + || defined(CONFIG_USB_MUSB_DSPS_MODULE )static ushort __initdata fifo_mode =4 ;#elif defined(CONFIG_USB_MUSB_UX500 ) \ || defined(CONFIG_USB_MUSB_UX500_MODULE )
drivers/usb/musb/musb_dsps.c new file +693 -0
693 lines not on this page · raw message
Signature · 1 line
1.6.2.4
Re: [PATCH 6/6 v3] usb: musb: Add support for ti81xx platform
Hi,
Quoted 34 lines · Ajay Kumar Gupta
drivers/usb/musb/musb_dsps.c new file +28
-0@@ -0,0 +1,693 @@ +/* +* Texas Instruments DSPS platforms "glue layer" +* +* Copyright (C) 2011, by Texas Instruments +* +* Based on the am35x "glue layer" code. +* +* This file is part of the Inventra Controller Driver for Linux. +* +* The Inventra Controller Driver for Linux 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. +* +* The Inventra Controller Driver for Linux is distributed in +* the hope that it will be useful, but WITHOUT ANY WARRANTY; +* without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +* License for more details. +* +* You should have received a copy of the GNU General Public License +* along with The Inventra Controller Driver for Linux ; if not, +* write to the Free Software Foundation, Inc., 59 Temple Place, +* Suite 330, Boston, MA 02111-1307 USA +* +* musb_dsps.c will be a common file for all the TI DSPS platforms +* such as dm64x, dm36x, dm35x, da8x, am35x and ti81x. +* For now only ti81x is using this and in future davinci.c, am35x.c
drivers/usb/musb/musb_dsps.c line 38
Quoted 10 lines
drivers/usb/musb/musb_dsps.c new file +10
-0+* da8xx.c would be merged to this file after testing. +*/ + +#include <linux/init.h> +#include <linux/io.h> +#include <linux/platform_device.h> +#include <linux/dma-mapping.h> +#include <linux/pm_runtime.h> + +#include <plat/usb.h>
can you avoid using <plat/usb.h> ?? Then we can compile on all architectures.
Signature · 1 line
balbi