From: Kishon Vijay Abraham I <hidden> Date: 2012-09-06 14:56:18
This patch series adds device tree support for MUSB.
The glue layer is now made to write to mailbox register (present in
control module) instead of calling phy layer to write to mailbox
register. Writing to mailbox register notifies the core of events like
device connect/disconnect.
Previously these patches were part of
[PATCH v7 0/7] omap: musb: Add device tree support
This patch series was created to contain only the *musb* part and it
also has one hwmod patch.
This patch series was created on
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git musb
Kishon Vijay Abraham I (3):
arm: omap: hwmod: add a new addr space in otg for writing to control
module
usb: musb: omap: write directly to mailbox instead of using phy
usb: musb: omap: Add device tree support for omap musb glue
Documentation/devicetree/bindings/usb/omap-usb.txt | 33 ++++++
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 5 +
drivers/usb/musb/omap2430.c | 106 ++++++++++++++++++--
drivers/usb/musb/omap2430.h | 9 ++
4 files changed, 146 insertions(+), 7 deletions(-)
create mode 100644 Documentation/devicetree/bindings/usb/omap-usb.txt
--
1.7.9.5
From: Kishon Vijay Abraham I <hidden> Date: 2012-09-06 14:56:14
The mailbox register for usb otg in omap is present in control module.
On detection of any events VBUS or ID, this register should be written
to send the notification to musb core.
Till we have a separate control module driver to write to control module,
omap2430 will handle the register writes to control module by itself. So
a new address space to represent this control module register is added
to usb_otg_hs.
Cc: Benoit Cousson <redacted>
Signed-off-by: Kishon Vijay Abraham I <redacted>
---
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 5 +++++
1 file changed, 5 insertions(+)
On 9/6/2012 8:25 PM, Kishon Vijay Abraham I wrote:
quoted hunk
The mailbox register for usb otg in omap is present in control module.
On detection of any events VBUS or ID, this register should be written
to send the notification to musb core.
Till we have a separate control module driver to write to control module,
omap2430 will handle the register writes to control module by itself. So
a new address space to represent this control module register is added
to usb_otg_hs.
Cc: Benoit Cousson <redacted>
Signed-off-by: Kishon Vijay Abraham I <redacted>
---
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 5 +++++
1 file changed, 5 insertions(+)
I do not have any objection/comment here, but I believe this is control
module address space required for USB module, right?
I am not sure this is right way of accessing control module space.
Actually Control Module Access required for drivers is one of the
blocking issue we have currently.
Also there was some effort put up by 'Konstantine' to convert Control
module to MFD driver, I haven't seen any further update on it. But it
would be good to check with him.
Thanks,
Vaibhav
From: Felipe Balbi <hidden> Date: 2012-09-06 17:17:30
Hi,
On Thu, Sep 06, 2012 at 09:04:58PM +0530, Vaibhav Hiremath wrote:
On 9/6/2012 8:25 PM, Kishon Vijay Abraham I wrote:
quoted
The mailbox register for usb otg in omap is present in control module.
On detection of any events VBUS or ID, this register should be written
to send the notification to musb core.
Till we have a separate control module driver to write to control module,
omap2430 will handle the register writes to control module by itself. So
a new address space to represent this control module register is added
to usb_otg_hs.
Cc: Benoit Cousson <redacted>
Signed-off-by: Kishon Vijay Abraham I <redacted>
---
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 5 +++++
1 file changed, 5 insertions(+)
I do not have any objection/comment here, but I believe this is control
module address space required for USB module, right?
I am not sure this is right way of accessing control module space.
Actually Control Module Access required for drivers is one of the
blocking issue we have currently.
Also there was some effort put up by 'Konstantine' to convert Control
module to MFD driver, I haven't seen any further update on it. But it
would be good to check with him.
this was an agreement with Benoit since we already lost a couple merge
windows for this patchset. We agreed to wait until -rc4 for SCM driver
and if it wasn't ready, we'd go ahead with this and SCM author would fix
it up on a patch converting users to new SCM driver.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120906/65c44fa3/attachment.sig>
From: Felipe Balbi <hidden> Date: 2012-09-06 17:22:31
Hi,
On Thu, Sep 06, 2012 at 08:13:03PM +0300, Felipe Balbi wrote:
Hi,
On Thu, Sep 06, 2012 at 09:04:58PM +0530, Vaibhav Hiremath wrote:
quoted
On 9/6/2012 8:25 PM, Kishon Vijay Abraham I wrote:
quoted
The mailbox register for usb otg in omap is present in control module.
On detection of any events VBUS or ID, this register should be written
to send the notification to musb core.
Till we have a separate control module driver to write to control module,
omap2430 will handle the register writes to control module by itself. So
a new address space to represent this control module register is added
to usb_otg_hs.
Cc: Benoit Cousson <redacted>
Signed-off-by: Kishon Vijay Abraham I <redacted>
---
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 5 +++++
1 file changed, 5 insertions(+)
I do not have any objection/comment here, but I believe this is control
module address space required for USB module, right?
I am not sure this is right way of accessing control module space.
Actually Control Module Access required for drivers is one of the
blocking issue we have currently.
Also there was some effort put up by 'Konstantine' to convert Control
module to MFD driver, I haven't seen any further update on it. But it
would be good to check with him.
this was an agreement with Benoit since we already lost a couple merge
windows for this patchset. We agreed to wait until -rc4 for SCM driver
and if it wasn't ready, we'd go ahead with this and SCM author would fix
it up on a patch converting users to new SCM driver.
Tony, can I get your Acked-by to this patch so I can take it together
with the rest of the series ? Thanks
ps: I'll apply this to my 'musb' branch which is immutable, so it's safe
to merge it into your tree once I apply.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120906/2db3b3d5/attachment.sig>
From: Tony Lindgren <tony@atomide.com> Date: 2012-09-06 19:56:22
* Felipe Balbi [off-list ref] [120906 10:23]:
Hi,
On Thu, Sep 06, 2012 at 08:13:03PM +0300, Felipe Balbi wrote:
quoted
Hi,
On Thu, Sep 06, 2012 at 09:04:58PM +0530, Vaibhav Hiremath wrote:
quoted
On 9/6/2012 8:25 PM, Kishon Vijay Abraham I wrote:
quoted
The mailbox register for usb otg in omap is present in control module.
On detection of any events VBUS or ID, this register should be written
to send the notification to musb core.
Till we have a separate control module driver to write to control module,
omap2430 will handle the register writes to control module by itself. So
a new address space to represent this control module register is added
to usb_otg_hs.
Cc: Benoit Cousson <redacted>
Signed-off-by: Kishon Vijay Abraham I <redacted>
---
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 5 +++++
1 file changed, 5 insertions(+)
I do not have any objection/comment here, but I believe this is control
module address space required for USB module, right?
I am not sure this is right way of accessing control module space.
Actually Control Module Access required for drivers is one of the
blocking issue we have currently.
Also there was some effort put up by 'Konstantine' to convert Control
module to MFD driver, I haven't seen any further update on it. But it
would be good to check with him.
this was an agreement with Benoit since we already lost a couple merge
windows for this patchset. We agreed to wait until -rc4 for SCM driver
and if it wasn't ready, we'd go ahead with this and SCM author would fix
it up on a patch converting users to new SCM driver.
Tony, can I get your Acked-by to this patch so I can take it together
with the rest of the series ? Thanks
ps: I'll apply this to my 'musb' branch which is immutable, so it's safe
to merge it into your tree once I apply.
It would be best if this got acked by Benoit and Paul as they may
have some other patches queued up. I'll ack if they ack ;)
Tony
From: Felipe Balbi <hidden> Date: 2012-09-10 16:03:32
Hi,
On Thu, Sep 06, 2012 at 12:56:07PM -0700, Tony Lindgren wrote:
* Felipe Balbi [off-list ref] [120906 10:23]:
quoted
Hi,
On Thu, Sep 06, 2012 at 08:13:03PM +0300, Felipe Balbi wrote:
quoted
Hi,
On Thu, Sep 06, 2012 at 09:04:58PM +0530, Vaibhav Hiremath wrote:
quoted
On 9/6/2012 8:25 PM, Kishon Vijay Abraham I wrote:
quoted
The mailbox register for usb otg in omap is present in control module.
On detection of any events VBUS or ID, this register should be written
to send the notification to musb core.
Till we have a separate control module driver to write to control module,
omap2430 will handle the register writes to control module by itself. So
a new address space to represent this control module register is added
to usb_otg_hs.
Cc: Benoit Cousson <redacted>
Signed-off-by: Kishon Vijay Abraham I <redacted>
---
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 5 +++++
1 file changed, 5 insertions(+)
I do not have any objection/comment here, but I believe this is control
module address space required for USB module, right?
I am not sure this is right way of accessing control module space.
Actually Control Module Access required for drivers is one of the
blocking issue we have currently.
Also there was some effort put up by 'Konstantine' to convert Control
module to MFD driver, I haven't seen any further update on it. But it
would be good to check with him.
this was an agreement with Benoit since we already lost a couple merge
windows for this patchset. We agreed to wait until -rc4 for SCM driver
and if it wasn't ready, we'd go ahead with this and SCM author would fix
it up on a patch converting users to new SCM driver.
Tony, can I get your Acked-by to this patch so I can take it together
with the rest of the series ? Thanks
ps: I'll apply this to my 'musb' branch which is immutable, so it's safe
to merge it into your tree once I apply.
It would be best if this got acked by Benoit and Paul as they may
have some other patches queued up. I'll ack if they ack ;)
Hi Felipe,
On 09/10/2012 05:58 PM, Felipe Balbi wrote:
Hi,
On Thu, Sep 06, 2012 at 12:56:07PM -0700, Tony Lindgren wrote:
quoted
* Felipe Balbi [off-list ref] [120906 10:23]:
quoted
Hi,
On Thu, Sep 06, 2012 at 08:13:03PM +0300, Felipe Balbi wrote:
quoted
Hi,
On Thu, Sep 06, 2012 at 09:04:58PM +0530, Vaibhav Hiremath wrote:
quoted
On 9/6/2012 8:25 PM, Kishon Vijay Abraham I wrote:
quoted
The mailbox register for usb otg in omap is present in control module.
On detection of any events VBUS or ID, this register should be written
to send the notification to musb core.
Till we have a separate control module driver to write to control module,
omap2430 will handle the register writes to control module by itself. So
a new address space to represent this control module register is added
to usb_otg_hs.
Cc: Benoit Cousson <redacted>
Signed-off-by: Kishon Vijay Abraham I <redacted>
---
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 5 +++++
1 file changed, 5 insertions(+)
I do not have any objection/comment here, but I believe this is control
module address space required for USB module, right?
I am not sure this is right way of accessing control module space.
Actually Control Module Access required for drivers is one of the
blocking issue we have currently.
Also there was some effort put up by 'Konstantine' to convert Control
module to MFD driver, I haven't seen any further update on it. But it
would be good to check with him.
this was an agreement with Benoit since we already lost a couple merge
windows for this patchset. We agreed to wait until -rc4 for SCM driver
and if it wasn't ready, we'd go ahead with this and SCM author would fix
it up on a patch converting users to new SCM driver.
Tony, can I get your Acked-by to this patch so I can take it together
with the rest of the series ? Thanks
ps: I'll apply this to my 'musb' branch which is immutable, so it's safe
to merge it into your tree once I apply.
It would be best if this got acked by Benoit and Paul as they may
have some other patches queued up. I'll ack if they ack ;)
Benoit, care to ack this patch ???
Gosh, that's hard to ack something like that :-)
But considering that the control module driver is not there yet, I have
no choice but accepting that one if we want to have the functionality
we've been waiting for years.
Could you just update the patch with a big disclaimer on top of the
address range to explain that this should not belong here and will be
removed ASAP, when the proper driver will be done.
Then you sign the patch with your blood and that should be fine for me :-).
Thanks,
Benoit
From: Felipe Balbi <hidden> Date: 2012-09-10 16:48:06
Hi,
On Mon, Sep 10, 2012 at 06:17:03PM +0200, Benoit Cousson wrote:
quoted
quoted
quoted
quoted
quoted
On 9/6/2012 8:25 PM, Kishon Vijay Abraham I wrote:
quoted
The mailbox register for usb otg in omap is present in control module.
On detection of any events VBUS or ID, this register should be written
to send the notification to musb core.
Till we have a separate control module driver to write to control module,
omap2430 will handle the register writes to control module by itself. So
a new address space to represent this control module register is added
to usb_otg_hs.
Cc: Benoit Cousson <redacted>
Signed-off-by: Kishon Vijay Abraham I <redacted>
---
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 5 +++++
1 file changed, 5 insertions(+)
I do not have any objection/comment here, but I believe this is control
module address space required for USB module, right?
I am not sure this is right way of accessing control module space.
Actually Control Module Access required for drivers is one of the
blocking issue we have currently.
Also there was some effort put up by 'Konstantine' to convert Control
module to MFD driver, I haven't seen any further update on it. But it
would be good to check with him.
this was an agreement with Benoit since we already lost a couple merge
windows for this patchset. We agreed to wait until -rc4 for SCM driver
and if it wasn't ready, we'd go ahead with this and SCM author would fix
it up on a patch converting users to new SCM driver.
Tony, can I get your Acked-by to this patch so I can take it together
with the rest of the series ? Thanks
ps: I'll apply this to my 'musb' branch which is immutable, so it's safe
to merge it into your tree once I apply.
It would be best if this got acked by Benoit and Paul as they may
have some other patches queued up. I'll ack if they ack ;)
Benoit, care to ack this patch ???
Gosh, that's hard to ack something like that :-)
btw, that's not different than what's already in tree, the only
difference is that now hwmod knows about it...
But considering that the control module driver is not there yet, I have
no choice but accepting that one if we want to have the functionality
we've been waiting for years.
Could you just update the patch with a big disclaimer on top of the
address range to explain that this should not belong here and will be
removed ASAP, when the proper driver will be done.
sure, that's doable... Kishon, can you do this ASAP ? I want to send my
pull requests tomorrow at the latest.
Then you sign the patch with your blood and that should be fine for me
:-).
Hi,
On Mon, Sep 10, 2012 at 10:13 PM, Felipe Balbi [off-list ref] wrote:
Hi,
On Mon, Sep 10, 2012 at 06:17:03PM +0200, Benoit Cousson wrote:
quoted
quoted
quoted
quoted
quoted
quoted
On 9/6/2012 8:25 PM, Kishon Vijay Abraham I wrote:
quoted
The mailbox register for usb otg in omap is present in control module.
On detection of any events VBUS or ID, this register should be written
to send the notification to musb core.
Till we have a separate control module driver to write to control module,
omap2430 will handle the register writes to control module by itself. So
a new address space to represent this control module register is added
to usb_otg_hs.
Cc: Benoit Cousson <redacted>
Signed-off-by: Kishon Vijay Abraham I <redacted>
---
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 5 +++++
1 file changed, 5 insertions(+)
I do not have any objection/comment here, but I believe this is control
module address space required for USB module, right?
I am not sure this is right way of accessing control module space.
Actually Control Module Access required for drivers is one of the
blocking issue we have currently.
Also there was some effort put up by 'Konstantine' to convert Control
module to MFD driver, I haven't seen any further update on it. But it
would be good to check with him.
this was an agreement with Benoit since we already lost a couple merge
windows for this patchset. We agreed to wait until -rc4 for SCM driver
and if it wasn't ready, we'd go ahead with this and SCM author would fix
it up on a patch converting users to new SCM driver.
Tony, can I get your Acked-by to this patch so I can take it together
with the rest of the series ? Thanks
ps: I'll apply this to my 'musb' branch which is immutable, so it's safe
to merge it into your tree once I apply.
It would be best if this got acked by Benoit and Paul as they may
have some other patches queued up. I'll ack if they ack ;)
Benoit, care to ack this patch ???
Gosh, that's hard to ack something like that :-)
btw, that's not different than what's already in tree, the only
difference is that now hwmod knows about it...
quoted
But considering that the control module driver is not there yet, I have
no choice but accepting that one if we want to have the functionality
we've been waiting for years.
Could you just update the patch with a big disclaimer on top of the
address range to explain that this should not belong here and will be
removed ASAP, when the proper driver will be done.
sure, that's doable... Kishon, can you do this ASAP ? I want to send my
pull requests tomorrow at the latest.
On Thu, Sep 06, 2012 at 22:43:03, Balbi, Felipe wrote:
Hi,
On Thu, Sep 06, 2012 at 09:04:58PM +0530, Vaibhav Hiremath wrote:
quoted
On 9/6/2012 8:25 PM, Kishon Vijay Abraham I wrote:
quoted
The mailbox register for usb otg in omap is present in control module.
On detection of any events VBUS or ID, this register should be written
to send the notification to musb core.
Till we have a separate control module driver to write to control module,
omap2430 will handle the register writes to control module by itself. So
a new address space to represent this control module register is added
to usb_otg_hs.
Cc: Benoit Cousson <redacted>
Signed-off-by: Kishon Vijay Abraham I <redacted>
---
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 5 +++++
1 file changed, 5 insertions(+)
I do not have any objection/comment here, but I believe this is control
module address space required for USB module, right?
I am not sure this is right way of accessing control module space.
Actually Control Module Access required for drivers is one of the
blocking issue we have currently.
Also there was some effort put up by 'Konstantine' to convert Control
module to MFD driver, I haven't seen any further update on it. But it
would be good to check with him.
this was an agreement with Benoit since we already lost a couple merge
windows for this patchset. We agreed to wait until -rc4 for SCM driver
and if it wasn't ready, we'd go ahead with this and SCM author would fix
it up on a patch converting users to new SCM driver.
Understood and thanks for confirming.
Thanks,
Vaibhav
From: Kishon Vijay Abraham I <hidden> Date: 2012-09-06 14:57:19
The glue layer should directly write to mailbox register (present in
control module) instead of calling phy layer to write to mailbox
register. Writing to mailbox register notifies the core of events like
device connect/disconnect.
Currently writing to control module register is taken care in this
driver which will be removed once the control module driver is in place.
Signed-off-by: Kishon Vijay Abraham I <redacted>
---
drivers/usb/musb/omap2430.c | 52 +++++++++++++++++++++++++++++++++++++------
drivers/usb/musb/omap2430.h | 9 ++++++++
2 files changed, 54 insertions(+), 7 deletions(-)
@@ -441,6 +472,7 @@ static int __devinit omap2430_probe(struct platform_device *pdev)structmusb_hdrc_platform_data*pdata=pdev->dev.platform_data;structplatform_device*musb;structomap2430_glue*glue;+structresource*res;intret=-ENOMEM;glue=devm_kzalloc(&pdev->dev,sizeof(*glue),GFP_KERNEL);
@@ -463,6 +495,12 @@ static int __devinit omap2430_probe(struct platform_device *pdev)glue->musb=musb;glue->status=OMAP_MUSB_UNKNOWN;+res=platform_get_resource(pdev,IORESOURCE_MEM,1);++glue->control_otghs=devm_request_and_ioremap(&pdev->dev,res);+if(glue->control_otghs==NULL)+dev_dbg(&pdev->dev,"Failed to obtain control memory\n");+pdata->platform_ops=&omap2430_ops;platform_set_drvdata(pdev,glue);
From: Kishon Vijay Abraham I <hidden> Date: 2012-09-06 14:59:58
Added device tree support for omap musb driver and updated the
Documentation with device tree binding information.
Signed-off-by: Kishon Vijay Abraham I <redacted>
---
Documentation/devicetree/bindings/usb/omap-usb.txt | 33 ++++++++++++
drivers/usb/musb/omap2430.c | 54 ++++++++++++++++++++
2 files changed, 87 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/omap-usb.txt
@@ -0,0 +1,33 @@+OMAP GLUE++OMAP MUSB GLUE+ - compatible : Should be "ti,musb-omap2430"+ - ti,hwmods : must be "usb_otg_hs"+ - multipoint : Should be "1" indicating the musb controller supports+ multipoint. This is a MUSB configuration-specific setting.+ - num_eps : Specifies the number of endpoints. This is also a+ MUSB configuration-specific setting. Should be set to "16"+ - ram_bits : Specifies the ram address size. Should be set to "12"+ - interface_type : This is a board specific setting to describe the type of+ interface between the controller and the phy. It should be "0" or "1"+ specifying ULPI and UTMI respectively.+ - mode : Should be "3" to represent OTG. "1" signifies HOST and "2"+ represents PERIPHERAL.+ - power : Should be "50". This signifies the controller can supply upto+ 100mA when operating in host mode.++SOC specific device node entry+usb_otg_hs: usb_otg_hs at 4a0ab000 {+ compatible = "ti,musb-omap2430";+ ti,hwmods = "usb_otg_hs";+ multipoint = <1>;+ num_eps = <16>;+ ram_bits = <12>;+};++Board specific device node entry+&usb_otg_hs {+ interface_type = <1>;+ mode = <3>;+ power = <50>;+};
@@ -501,6 +505,42 @@ static int __devinit omap2430_probe(struct platform_device *pdev)if(glue->control_otghs==NULL)dev_dbg(&pdev->dev,"Failed to obtain control memory\n");+if(np){+pdata=devm_kzalloc(&pdev->dev,sizeof(*pdata),GFP_KERNEL);+if(!pdata){+dev_err(&pdev->dev,+"failed to allocate musb platfrom data\n");+ret=-ENOMEM;+gotoerr1;+}++data=devm_kzalloc(&pdev->dev,sizeof(*data),GFP_KERNEL);+if(!data){+dev_err(&pdev->dev,+"failed to allocate musb board data\n");+ret=-ENOMEM;+gotoerr1;+}++config=devm_kzalloc(&pdev->dev,sizeof(*config),GFP_KERNEL);+if(!data){+dev_err(&pdev->dev,+"failed to allocate musb hdrc config\n");+gotoerr1;+}++of_property_read_u32(np,"mode",(u32*)&pdata->mode);+of_property_read_u32(np,"interface_type",+(u32*)&data->interface_type);+of_property_read_u32(np,"num_eps",(u32*)&config->num_eps);+of_property_read_u32(np,"ram_bits",(u32*)&config->ram_bits);+of_property_read_u32(np,"power",(u32*)&pdata->power);+config->multipoint=of_property_read_bool(np,"multipoint");++pdata->board_data=data;+pdata->config=config;+}+pdata->platform_ops=&omap2430_ops;platform_set_drvdata(pdev,glue);