linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver
@ 2014-04-23 12:28 Ivan T. Ivanov
  2014-04-23 12:28 ` [PATCH v4 1/3] usb: chipidea: msm: Add device tree binding information Ivan T. Ivanov
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Ivan T. Ivanov @ 2014-04-23 12:28 UTC (permalink / raw)
  To: Peter Chen
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, linux-kernel, linux-usb,
	linux-arm-msm

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

This series intend to fix driver, which was broken for a while.
It is used to create peripheral role device, which in coordination
with phy-usb-msm driver could provide USB2.0 gadget support for
Qualcomm targets.

Changes since version 3.

 - Fix typo in devicetree description file.

Previews version can be found here:

https://lkml.org/lkml/2014/4/22/195

Ivan T. Ivanov (3):
  usb: chipidea: msm: Add device tree binding information
  usb: chipidea: msm: Add device tree support
  usb: chipidea: msm: Initialize offset of the capability registers

 .../devicetree/bindings/usb/ci-hdrc-qcom.txt       | 17 +++++++++++++++
 drivers/usb/chipidea/ci_hdrc_msm.c                 | 24 +++++++++++++++++++++-
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt

--
1.8.3.2


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

* [PATCH v4 1/3] usb: chipidea: msm: Add device tree binding information
  2014-04-23 12:28 [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver Ivan T. Ivanov
@ 2014-04-23 12:28 ` Ivan T. Ivanov
  2014-04-23 12:28 ` [PATCH v4 2/3] usb: chipidea: msm: Add device tree support Ivan T. Ivanov
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Ivan T. Ivanov @ 2014-04-23 12:28 UTC (permalink / raw)
  To: Rob Herring, Pawel Moll, Mark Rutland, Peter Chen, Ian Campbell,
	Kumar Gala, Randy Dunlap
  Cc: Ivan T. Ivanov, devicetree, linux-doc, linux-usb, linux-kernel,
	linux-arm-msm

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

Document device tree binding information as required by
the Qualcomm USB controller.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
---
 Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt

diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt
new file mode 100644
index 0000000..f2899b5
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt
@@ -0,0 +1,17 @@
+Qualcomm CI13xxx (Chipidea) USB controllers
+
+Required properties:
+- compatible:   should contain "qcom,ci-hdrc"
+- reg:          offset and length of the register set in the memory map
+- interrupts:   interrupt-specifier for the controller interrupt.
+- usb-phy:      phandle for the PHY device
+- dr_mode:      Should be "peripheral"
+
+Examples:
+	gadget@f9a55000 {
+		compatible = "qcom,ci-hdrc";
+		reg = <0xf9a55000 0x400>;
+		dr_mode = "peripheral";
+		interrupts = <0 134 0>;
+		usb-phy = <&usbphy0>;
+	};
--
1.8.3.2


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

* [PATCH v4 2/3] usb: chipidea: msm: Add device tree support
  2014-04-23 12:28 [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver Ivan T. Ivanov
  2014-04-23 12:28 ` [PATCH v4 1/3] usb: chipidea: msm: Add device tree binding information Ivan T. Ivanov
@ 2014-04-23 12:28 ` Ivan T. Ivanov
  2014-04-23 12:28 ` [PATCH v4 3/3] usb: chipidea: msm: Initialize offset of the capability registers Ivan T. Ivanov
  2014-04-24  0:38 ` [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver Peter Chen
  3 siblings, 0 replies; 10+ messages in thread
From: Ivan T. Ivanov @ 2014-04-23 12:28 UTC (permalink / raw)
  To: Peter Chen
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, linux-usb, linux-kernel,
	linux-arm-msm

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

Allows controller to be specified via device tree.
Pass PHY phandle specified in DT to core driver.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
---
 drivers/usb/chipidea/ci_hdrc_msm.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c
index 2d51d85..736aeb2 100644
--- a/drivers/usb/chipidea/ci_hdrc_msm.c
+++ b/drivers/usb/chipidea/ci_hdrc_msm.c
@@ -57,9 +57,21 @@ static struct ci_hdrc_platform_data ci_hdrc_msm_platdata = {
 static int ci_hdrc_msm_probe(struct platform_device *pdev)
 {
 	struct platform_device *plat_ci;
+	struct usb_phy *phy;

 	dev_dbg(&pdev->dev, "ci_hdrc_msm_probe\n");

+	/*
+	 * OTG(PHY) driver takes care of PHY initialization, clock management,
+	 * powering up VBUS, mapping of registers address space and power
+	 * management.
+	 */
+	phy = devm_usb_get_phy_by_phandle(&pdev->dev, "usb-phy", 0);
+	if (IS_ERR(phy))
+		return PTR_ERR(phy);
+
+	ci_hdrc_msm_platdata.phy = phy;
+
 	plat_ci = ci_hdrc_add_device(&pdev->dev,
 				pdev->resource, pdev->num_resources,
 				&ci_hdrc_msm_platdata);
@@ -86,10 +98,19 @@ static int ci_hdrc_msm_remove(struct platform_device *pdev)
 	return 0;
 }

+static const struct of_device_id msm_ci_dt_match[] = {
+	{ .compatible = "qcom,ci-hdrc", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, msm_ci_dt_match);
+
 static struct platform_driver ci_hdrc_msm_driver = {
 	.probe = ci_hdrc_msm_probe,
 	.remove = ci_hdrc_msm_remove,
-	.driver = { .name = "msm_hsusb", },
+	.driver = {
+		.name = "msm_hsusb",
+		.of_match_table = msm_ci_dt_match,
+	},
 };

 module_platform_driver(ci_hdrc_msm_driver);
--
1.8.3.2


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

* [PATCH v4 3/3] usb: chipidea: msm: Initialize offset of the capability registers
  2014-04-23 12:28 [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver Ivan T. Ivanov
  2014-04-23 12:28 ` [PATCH v4 1/3] usb: chipidea: msm: Add device tree binding information Ivan T. Ivanov
  2014-04-23 12:28 ` [PATCH v4 2/3] usb: chipidea: msm: Add device tree support Ivan T. Ivanov
@ 2014-04-23 12:28 ` Ivan T. Ivanov
  2014-04-24  0:38 ` [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver Peter Chen
  3 siblings, 0 replies; 10+ messages in thread
From: Ivan T. Ivanov @ 2014-04-23 12:28 UTC (permalink / raw)
  To: Peter Chen
  Cc: Ivan T. Ivanov, Greg Kroah-Hartman, linux-usb, linux-kernel,
	linux-arm-msm

From: "Ivan T. Ivanov" <iivanov@mm-sol.com>

Since commit 62bb84e (usb: gadget: ci13xxx: convert to platform device)
start address of the capability registers is not passed correctly to
udc_probe(). Fix this.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
---
 drivers/usb/chipidea/ci_hdrc_msm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c
index 736aeb2..d72b9d2 100644
--- a/drivers/usb/chipidea/ci_hdrc_msm.c
+++ b/drivers/usb/chipidea/ci_hdrc_msm.c
@@ -47,6 +47,7 @@ static void ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event)

 static struct ci_hdrc_platform_data ci_hdrc_msm_platdata = {
 	.name			= "ci_hdrc_msm",
+	.capoffset		= DEF_CAPOFFSET,
 	.flags			= CI_HDRC_REGS_SHARED |
 				  CI_HDRC_REQUIRE_TRANSCEIVER |
 				  CI_HDRC_DISABLE_STREAMING,
--
1.8.3.2


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

* Re: [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver
  2014-04-23 12:28 [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver Ivan T. Ivanov
                   ` (2 preceding siblings ...)
  2014-04-23 12:28 ` [PATCH v4 3/3] usb: chipidea: msm: Initialize offset of the capability registers Ivan T. Ivanov
@ 2014-04-24  0:38 ` Peter Chen
  2014-04-24 14:31   ` Ivan T. Ivanov
  3 siblings, 1 reply; 10+ messages in thread
From: Peter Chen @ 2014-04-24  0:38 UTC (permalink / raw)
  To: Ivan T. Ivanov; +Cc: Greg Kroah-Hartman, linux-kernel, linux-usb, linux-arm-msm

On Wed, Apr 23, 2014 at 03:28:01PM +0300, Ivan T. Ivanov wrote:
> From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
> 
> This series intend to fix driver, which was broken for a while.
> It is used to create peripheral role device, which in coordination
> with phy-usb-msm driver could provide USB2.0 gadget support for
> Qualcomm targets.
> 
> Changes since version 3.
> 
>  - Fix typo in devicetree description file.
> 
> Previews version can be found here:

Since in your phy's patchset, you also access portsc which is in
chipidea register region, it is not a standard way.
In case, you will change something at chipidea driver in future
when you re-work your next revision phy's patchset, I do not
send this patchset to Greg right now.

Once your phy's patchset has accepted, notify me. I will send
this patchset to Greg.

Peter

> 
> https://lkml.org/lkml/2014/4/22/195
> 
> Ivan T. Ivanov (3):
>   usb: chipidea: msm: Add device tree binding information
>   usb: chipidea: msm: Add device tree support
>   usb: chipidea: msm: Initialize offset of the capability registers
> 
>  .../devicetree/bindings/usb/ci-hdrc-qcom.txt       | 17 +++++++++++++++
>  drivers/usb/chipidea/ci_hdrc_msm.c                 | 24 +++++++++++++++++++++-
>  2 files changed, 40 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt
> 
> --
> 1.8.3.2
> 
> 
> 

-- 

Best Regards,
Peter Chen

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

* Re: [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver
  2014-04-24  0:38 ` [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver Peter Chen
@ 2014-04-24 14:31   ` Ivan T. Ivanov
  2014-04-25  3:10     ` Peter Chen
  0 siblings, 1 reply; 10+ messages in thread
From: Ivan T. Ivanov @ 2014-04-24 14:31 UTC (permalink / raw)
  To: Peter Chen; +Cc: Greg Kroah-Hartman, linux-kernel, linux-usb, linux-arm-msm


Hi Peter, 

On Thu, 2014-04-24 at 08:38 +0800, Peter Chen wrote:
> On Wed, Apr 23, 2014 at 03:28:01PM +0300, Ivan T. Ivanov wrote:
> > From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
> > 
> > This series intend to fix driver, which was broken for a while.
> > It is used to create peripheral role device, which in coordination
> > with phy-usb-msm driver could provide USB2.0 gadget support for
> > Qualcomm targets.
> > 
> > Changes since version 3.
> > 
> >  - Fix typo in devicetree description file.
> > 
> > Previews version can be found here:
> 
> Since in your phy's patchset, you also access portsc which is in
> chipidea register region, it is not a standard way.
> In case, you will change something at chipidea driver in future
> when you re-work your next revision phy's patchset, I do not
> send this patchset to Greg right now.
> 

Did you see problems with _this_ particular patch set? There is no
direct dependency between PHY patches and these changes. 

Regards,
Ivan

> Once your phy's patchset has accepted, notify me. I will send
> this patchset to Greg.
> 
> Peter
> 
> > 
> > https://lkml.org/lkml/2014/4/22/195
> > 
> > Ivan T. Ivanov (3):
> >   usb: chipidea: msm: Add device tree binding information
> >   usb: chipidea: msm: Add device tree support
> >   usb: chipidea: msm: Initialize offset of the capability registers
> > 
> >  .../devicetree/bindings/usb/ci-hdrc-qcom.txt       | 17 +++++++++++++++
> >  drivers/usb/chipidea/ci_hdrc_msm.c                 | 24 +++++++++++++++++++++-
> >  2 files changed, 40 insertions(+), 1 deletion(-)
> >  create mode 100644 Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt
> > 
> > --
> > 1.8.3.2
> > 
> > 
> > 
> 



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

* RE: [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver
  2014-04-24 14:31   ` Ivan T. Ivanov
@ 2014-04-25  3:10     ` Peter Chen
  2014-04-28 14:03       ` Ivan T. Ivanov
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Chen @ 2014-04-25  3:10 UTC (permalink / raw)
  To: Ivan T. Ivanov; +Cc: Greg Kroah-Hartman, linux-kernel, linux-usb, linux-arm-msm

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1342 bytes --]


 
> 
> On Thu, 2014-04-24 at 08:38 +0800, Peter Chen wrote:
> > On Wed, Apr 23, 2014 at 03:28:01PM +0300, Ivan T. Ivanov wrote:
> > > From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
> > >
> > > This series intend to fix driver, which was broken for a while.
> > > It is used to create peripheral role device, which in coordination
> > > with phy-usb-msm driver could provide USB2.0 gadget support for
> > > Qualcomm targets.
> > >
> > > Changes since version 3.
> > >
> > >  - Fix typo in devicetree description file.
> > >
> > > Previews version can be found here:
> >
> > Since in your phy's patchset, you also access portsc which is in
> > chipidea register region, it is not a standard way.
> > In case, you will change something at chipidea driver in future when
> > you re-work your next revision phy's patchset, I do not send this
> > patchset to Greg right now.
> >
> 
> Did you see problems with _this_ particular patch set? There is no direct
> dependency between PHY patches and these changes.
> 
 
I have not seen problems for this patch set, if you make sure the current
phy operation (eg, "phy_type) at chipidea core does not affect you,
I am glad to accept this.

Peter
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver
  2014-04-25  3:10     ` Peter Chen
@ 2014-04-28 14:03       ` Ivan T. Ivanov
  2014-04-29  0:45         ` Peter Chen
  0 siblings, 1 reply; 10+ messages in thread
From: Ivan T. Ivanov @ 2014-04-28 14:03 UTC (permalink / raw)
  To: Peter Chen; +Cc: Greg Kroah-Hartman, linux-kernel, linux-usb, linux-arm-msm

On Fri, 2014-04-25 at 03:10 +0000, Peter Chen wrote:
>  
> > 
> > On Thu, 2014-04-24 at 08:38 +0800, Peter Chen wrote:
> > > On Wed, Apr 23, 2014 at 03:28:01PM +0300, Ivan T. Ivanov wrote:
> > > > From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
> > > >
> > > > This series intend to fix driver, which was broken for a while.
> > > > It is used to create peripheral role device, which in coordination
> > > > with phy-usb-msm driver could provide USB2.0 gadget support for
> > > > Qualcomm targets.
> > > >
> > > > Changes since version 3.
> > > >
> > > >  - Fix typo in devicetree description file.
> > > >
> > > > Previews version can be found here:
> > >
> > > Since in your phy's patchset, you also access portsc which is in
> > > chipidea register region, it is not a standard way.
> > > In case, you will change something at chipidea driver in future when
> > > you re-work your next revision phy's patchset, I do not send this
> > > patchset to Greg right now.
> > >
> > 
> > Did you see problems with _this_ particular patch set? There is no direct
> > dependency between PHY patches and these changes.
> > 
>  
> I have not seen problems for this patch set, if you make sure the current
> phy operation (eg, "phy_type) at chipidea core does not affect you,
> I am glad to accept this.

You mean phy_mode? Peripheral functionality is tested on top of
current linus/master and it looks fine.

Regards,
Ivan

> 
> Peter
> NrybXǧv^)޺{.n+{zX\x17ܨ}Ơz&j:+v\azZ++zfh~iz\x1ew?&)ߢ^[f^jǫym@Aa\x7f\f0h\x0fi\x7f



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

* Re: [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver
  2014-04-28 14:03       ` Ivan T. Ivanov
@ 2014-04-29  0:45         ` Peter Chen
  2014-04-29  6:40           ` Ivan T. Ivanov
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Chen @ 2014-04-29  0:45 UTC (permalink / raw)
  To: Ivan T. Ivanov; +Cc: Greg Kroah-Hartman, linux-kernel, linux-usb, linux-arm-msm

On Mon, Apr 28, 2014 at 05:03:35PM +0300, Ivan T. Ivanov wrote:
> On Fri, 2014-04-25 at 03:10 +0000, Peter Chen wrote:
> >  
> > > 
> > > On Thu, 2014-04-24 at 08:38 +0800, Peter Chen wrote:
> > > > On Wed, Apr 23, 2014 at 03:28:01PM +0300, Ivan T. Ivanov wrote:
> > > > > From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
> > > > >
> > > > > This series intend to fix driver, which was broken for a while.
> > > > > It is used to create peripheral role device, which in coordination
> > > > > with phy-usb-msm driver could provide USB2.0 gadget support for
> > > > > Qualcomm targets.
> > > > >
> > > > > Changes since version 3.
> > > > >
> > > > >  - Fix typo in devicetree description file.
> > > > >
> > > > > Previews version can be found here:
> > > >
> > > > Since in your phy's patchset, you also access portsc which is in
> > > > chipidea register region, it is not a standard way.
> > > > In case, you will change something at chipidea driver in future when
> > > > you re-work your next revision phy's patchset, I do not send this
> > > > patchset to Greg right now.
> > > >
> > > 
> > > Did you see problems with _this_ particular patch set? There is no direct
> > > dependency between PHY patches and these changes.
> > > 
> >  
> > I have not seen problems for this patch set, if you make sure the current
> > phy operation (eg, "phy_type) at chipidea core does not affect you,
> > I am glad to accept this.
> 
> You mean phy_mode? Peripheral functionality is tested on top of
> current linus/master and it looks fine.
> 

Applied, thanks

-- 

Best Regards,
Peter Chen

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

* Re: [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver
  2014-04-29  0:45         ` Peter Chen
@ 2014-04-29  6:40           ` Ivan T. Ivanov
  0 siblings, 0 replies; 10+ messages in thread
From: Ivan T. Ivanov @ 2014-04-29  6:40 UTC (permalink / raw)
  To: Peter Chen; +Cc: Greg Kroah-Hartman, linux-kernel, linux-usb, linux-arm-msm

On Tue, 2014-04-29 at 08:45 +0800, Peter Chen wrote:

> 
> Applied, thanks

Thank you,
Ivan




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

end of thread, other threads:[~2014-04-29  6:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-23 12:28 [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver Ivan T. Ivanov
2014-04-23 12:28 ` [PATCH v4 1/3] usb: chipidea: msm: Add device tree binding information Ivan T. Ivanov
2014-04-23 12:28 ` [PATCH v4 2/3] usb: chipidea: msm: Add device tree support Ivan T. Ivanov
2014-04-23 12:28 ` [PATCH v4 3/3] usb: chipidea: msm: Initialize offset of the capability registers Ivan T. Ivanov
2014-04-24  0:38 ` [PATCH v4 0/3] usb: chipidea: msm: Clean and fix glue layer driver Peter Chen
2014-04-24 14:31   ` Ivan T. Ivanov
2014-04-25  3:10     ` Peter Chen
2014-04-28 14:03       ` Ivan T. Ivanov
2014-04-29  0:45         ` Peter Chen
2014-04-29  6:40           ` Ivan T. Ivanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).