* [PATCH v3 0/3] usb: chipidea: msm: Clean and fix glue layer driver
@ 2014-04-22 9:43 Ivan T. Ivanov
2014-04-22 9:43 ` [PATCH v3 1/3] usb: chipidea: msm: Add device tree binding information Ivan T. Ivanov
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Ivan T. Ivanov @ 2014-04-22 9:43 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 2.
- Rename devicetree description file to ci-hdrc-qcom.txt to be in-line
with Freescale and Zevio naming scheme
- Use better name for usb-phy phandle.
- Make of_device_id structure const
[1] https://lkml.org/lkml/2014/2/18/209
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] 7+ messages in thread
* [PATCH v3 1/3] usb: chipidea: msm: Add device tree binding information
2014-04-22 9:43 [PATCH v3 0/3] usb: chipidea: msm: Clean and fix glue layer driver Ivan T. Ivanov
@ 2014-04-22 9:43 ` Ivan T. Ivanov
2014-04-22 15:07 ` Srinivas Kandagatla
2014-04-22 9:43 ` [PATCH v3 2/3] usb: chipidea: msm: Add device tree support Ivan T. Ivanov
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Ivan T. Ivanov @ 2014-04-22 9:43 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..7221072
--- /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: Sould 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] 7+ messages in thread
* [PATCH v3 2/3] usb: chipidea: msm: Add device tree support
2014-04-22 9:43 [PATCH v3 0/3] usb: chipidea: msm: Clean and fix glue layer driver Ivan T. Ivanov
2014-04-22 9:43 ` [PATCH v3 1/3] usb: chipidea: msm: Add device tree binding information Ivan T. Ivanov
@ 2014-04-22 9:43 ` Ivan T. Ivanov
2014-04-22 9:43 ` [PATCH v3 3/3] usb: chipidea: msm: Initialize offset of the capability registers Ivan T. Ivanov
2014-04-23 8:23 ` [PATCH v3 0/3] usb: chipidea: msm: Clean and fix glue layer driver Peter Chen
3 siblings, 0 replies; 7+ messages in thread
From: Ivan T. Ivanov @ 2014-04-22 9:43 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] 7+ messages in thread
* [PATCH v3 3/3] usb: chipidea: msm: Initialize offset of the capability registers
2014-04-22 9:43 [PATCH v3 0/3] usb: chipidea: msm: Clean and fix glue layer driver Ivan T. Ivanov
2014-04-22 9:43 ` [PATCH v3 1/3] usb: chipidea: msm: Add device tree binding information Ivan T. Ivanov
2014-04-22 9:43 ` [PATCH v3 2/3] usb: chipidea: msm: Add device tree support Ivan T. Ivanov
@ 2014-04-22 9:43 ` Ivan T. Ivanov
2014-04-23 8:23 ` [PATCH v3 0/3] usb: chipidea: msm: Clean and fix glue layer driver Peter Chen
3 siblings, 0 replies; 7+ messages in thread
From: Ivan T. Ivanov @ 2014-04-22 9:43 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] 7+ messages in thread
* Re: [PATCH v3 1/3] usb: chipidea: msm: Add device tree binding information
2014-04-22 9:43 ` [PATCH v3 1/3] usb: chipidea: msm: Add device tree binding information Ivan T. Ivanov
@ 2014-04-22 15:07 ` Srinivas Kandagatla
2014-04-22 15:20 ` Ivan T. Ivanov
0 siblings, 1 reply; 7+ messages in thread
From: Srinivas Kandagatla @ 2014-04-22 15:07 UTC (permalink / raw)
To: Ivan T. Ivanov, Rob Herring, Pawel Moll, Mark Rutland,
Peter Chen, Ian Campbell, Kumar Gala, Randy Dunlap
Cc: devicetree, linux-doc, linux-usb, linux-kernel, linux-arm-msm
On 22/04/14 10:43, Ivan T. Ivanov wrote:
> +- interrupts: interrupt-specifier for the controller interrupt.
> +- usb-phy: phandle for the PHY device
> +- dr_mode: Sould be "peripheral"
s/Sould/Should/
> +
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/3] usb: chipidea: msm: Add device tree binding information
2014-04-22 15:07 ` Srinivas Kandagatla
@ 2014-04-22 15:20 ` Ivan T. Ivanov
0 siblings, 0 replies; 7+ messages in thread
From: Ivan T. Ivanov @ 2014-04-22 15:20 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: Rob Herring, Pawel Moll, Mark Rutland, Peter Chen, Ian Campbell,
Kumar Gala, Randy Dunlap, devicetree, linux-doc, linux-usb,
linux-kernel, linux-arm-msm
On Tue, 2014-04-22 at 16:07 +0100, Srinivas Kandagatla wrote:
>
> On 22/04/14 10:43, Ivan T. Ivanov wrote:
> > +- interrupts: interrupt-specifier for the controller interrupt.
> > +- usb-phy: phandle for the PHY device
> > +- dr_mode: Sould be "peripheral"
> s/Sould/Should/
> > +
Thanks. will fix it.
Ivan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 0/3] usb: chipidea: msm: Clean and fix glue layer driver
2014-04-22 9:43 [PATCH v3 0/3] usb: chipidea: msm: Clean and fix glue layer driver Ivan T. Ivanov
` (2 preceding siblings ...)
2014-04-22 9:43 ` [PATCH v3 3/3] usb: chipidea: msm: Initialize offset of the capability registers Ivan T. Ivanov
@ 2014-04-23 8:23 ` Peter Chen
3 siblings, 0 replies; 7+ messages in thread
From: Peter Chen @ 2014-04-23 8:23 UTC (permalink / raw)
To: Ivan T. Ivanov; +Cc: Greg Kroah-Hartman, linux-kernel, linux-usb, linux-arm-msm
On Tue, Apr 22, 2014 at 12:43:14PM +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 2.
>
> - Rename devicetree description file to ci-hdrc-qcom.txt to be in-line
> with Freescale and Zevio naming scheme
> - Use better name for usb-phy phandle.
> - Make of_device_id structure const
>
> [1] https://lkml.org/lkml/2014/2/18/209
>
> 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
>
>
>
This patchset looks ok except the typo which Srinivas Kandagatla mentions.
--
Best Regards,
Peter Chen
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-04-23 9:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-22 9:43 [PATCH v3 0/3] usb: chipidea: msm: Clean and fix glue layer driver Ivan T. Ivanov
2014-04-22 9:43 ` [PATCH v3 1/3] usb: chipidea: msm: Add device tree binding information Ivan T. Ivanov
2014-04-22 15:07 ` Srinivas Kandagatla
2014-04-22 15:20 ` Ivan T. Ivanov
2014-04-22 9:43 ` [PATCH v3 2/3] usb: chipidea: msm: Add device tree support Ivan T. Ivanov
2014-04-22 9:43 ` [PATCH v3 3/3] usb: chipidea: msm: Initialize offset of the capability registers Ivan T. Ivanov
2014-04-23 8:23 ` [PATCH v3 0/3] usb: chipidea: msm: Clean and fix glue layer driver Peter Chen
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).