From: "Ivan T. Ivanov" <[email protected]>
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
From: "Ivan T. Ivanov" <[email protected]>
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 <[email protected]>
---
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
From: "Ivan T. Ivanov" <[email protected]>
Document device tree binding information as required by
the Qualcomm USB controller.
Signed-off-by: Ivan T. Ivanov <[email protected]>
---
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
From: "Ivan T. Ivanov" <[email protected]>
Allows controller to be specified via device tree.
Pass PHY phandle specified in DT to core driver.
Signed-off-by: Ivan T. Ivanov <[email protected]>
---
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
On Wed, Apr 23, 2014 at 03:28:01PM +0300, Ivan T. Ivanov wrote:
> From: "Ivan T. Ivanov" <[email protected]>
>
> 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
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" <[email protected]>
> >
> > 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
> >
> >
> >
>
>
> 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" <[email protected]>
> > >
> > > 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?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m????????????I?
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" <[email protected]>
> > > >
> > > > 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ܨ}Ơz&j:+vzZ++zfh~izw?&)ߢf^jǫym@Aa0hi
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" <[email protected]>
> > > > >
> > > > > 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
On Tue, 2014-04-29 at 08:45 +0800, Peter Chen wrote:
>
> Applied, thanks
Thank you,
Ivan