* [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
@ 2015-09-23 12:54 Subbaraya Sundeep Bhatta
2015-09-24 9:10 ` Peter Chen
2015-09-24 16:14 ` Rob Herring
0 siblings, 2 replies; 9+ messages in thread
From: Subbaraya Sundeep Bhatta @ 2015-09-23 12:54 UTC (permalink / raw)
To: balbi, peter.chen, devicetree, kishon
Cc: gregkh, linux-usb, linux-kernel, punnaia, Subbaraya Sundeep Bhatta
This patch adds binding doc info for generic ULPI PHYs
platform driver.
Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
---
.../devicetree/bindings/usb/ulpi-platform-phy.txt | 34 ++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
create mode 100644 Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
diff --git a/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
new file mode 100644
index 0000000..7b8cbb4
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
@@ -0,0 +1,34 @@
+Platform driver for generic ULPI PHYs
+
+Required properties:
+- compatible : Should be "ulpi-phy"
+- reg : Physical base address and size of the USB
+ controller registers map to which this PHY
+ is connected.
+- view-port : Should contain viewport register offset of the
+ USB controller to which this PHY is connected
+Optional properties:
+- drv-vbus : required if turning VBUS on/off has to be driven
+ by writing to PHY. This feature depends on board
+ design.
+
+Example:
+Below example shows the PHY binding for Chipidea USB controller which has
+ulpi viewport register at 0x0170
+
+ usb_phy0: phy0 {
+ compatible = "ulpi-phy";
+ reg = <0xe0002000 0x1000>;
+ view-port = <0x0170>;
+ drv-vbus;
+ };
+
+ usb0: usb@e0002000 {
+ compatible = "chipidea,usb2";
+ interrupt-parent = <&intc>;
+ interrupts = <0 21 4>;
+ reg = <0xe0002000 0x1000>;
+ phy_type = "ulpi";
+ dr_mode = "host";
+ usb-phy = <&usb_phy0>;
+ };
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
2015-09-23 12:54 [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver Subbaraya Sundeep Bhatta
@ 2015-09-24 9:10 ` Peter Chen
2015-09-24 9:26 ` Subbaraya Sundeep Bhatta
2015-09-24 16:14 ` Rob Herring
1 sibling, 1 reply; 9+ messages in thread
From: Peter Chen @ 2015-09-24 9:10 UTC (permalink / raw)
To: Subbaraya Sundeep Bhatta
Cc: balbi, devicetree, kishon, gregkh, linux-usb, linux-kernel,
punnaia, Subbaraya Sundeep Bhatta, linux-arm-kernel
On Wed, Sep 23, 2015 at 06:24:01PM +0530, Subbaraya Sundeep Bhatta wrote:
> This patch adds binding doc info for generic ULPI PHYs
> platform driver.
>
> Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
> ---
> .../devicetree/bindings/usb/ulpi-platform-phy.txt | 34 ++++++++++++++++++++
> 1 files changed, 34 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>
> diff --git a/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> new file mode 100644
> index 0000000..7b8cbb4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> @@ -0,0 +1,34 @@
> +Platform driver for generic ULPI PHYs
> +
> +Required properties:
> +- compatible : Should be "ulpi-phy"
> +- reg : Physical base address and size of the USB
> + controller registers map to which this PHY
> + is connected.
> +- view-port : Should contain viewport register offset of the
> + USB controller to which this PHY is connected
> +Optional properties:
> +- drv-vbus : required if turning VBUS on/off has to be driven
> + by writing to PHY. This feature depends on board
> + design.
> +
> +Example:
> +Below example shows the PHY binding for Chipidea USB controller which has
> +ulpi viewport register at 0x0170
> +
> + usb_phy0: phy0 {
> + compatible = "ulpi-phy";
> + reg = <0xe0002000 0x1000>;
> + view-port = <0x0170>;
> + drv-vbus;
> + };
> +
> + usb0: usb@e0002000 {
> + compatible = "chipidea,usb2";
> + interrupt-parent = <&intc>;
> + interrupts = <0 21 4>;
> + reg = <0xe0002000 0x1000>;
Although just call devm_ioremap twice for the same register region
does not cause any errors, I am not sure if it will has other
potential problems. Cc: arm list.
> + phy_type = "ulpi";
> + dr_mode = "host";
> + usb-phy = <&usb_phy0>;
> + };
> --
> 1.7.1
>
--
Best Regards,
Peter Chen
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
2015-09-24 9:10 ` Peter Chen
@ 2015-09-24 9:26 ` Subbaraya Sundeep Bhatta
2015-09-24 16:18 ` Rob Herring
0 siblings, 1 reply; 9+ messages in thread
From: Subbaraya Sundeep Bhatta @ 2015-09-24 9:26 UTC (permalink / raw)
To: Peter Chen
Cc: balbi, devicetree, kishon, gregkh, linux-usb, linux-kernel,
Punnaiah Choudary Kalluri, linux-arm-kernel
Hi Peter,
> -----Original Message-----
> From: Peter Chen [mailto:peter.chen@freescale.com]
> Sent: Thursday, September 24, 2015 2:41 PM
> To: Subbaraya Sundeep Bhatta
> Cc: balbi@ti.com; devicetree@vger.kernel.org; kishon@ti.com;
> gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; linux-
> kernel@vger.kernel.org; Punnaiah Choudary Kalluri; Subbaraya Sundeep Bhatta;
> linux-arm-kernel@lists.infradead.org
> Subject: Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
>
> On Wed, Sep 23, 2015 at 06:24:01PM +0530, Subbaraya Sundeep Bhatta
> wrote:
> > This patch adds binding doc info for generic ULPI PHYs platform
> > driver.
> >
> > Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
> > ---
> > .../devicetree/bindings/usb/ulpi-platform-phy.txt | 34
> ++++++++++++++++++++
> > 1 files changed, 34 insertions(+), 0 deletions(-) create mode 100644
> > Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> >
> > diff --git
> > a/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> > b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> > new file mode 100644
> > index 0000000..7b8cbb4
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> > @@ -0,0 +1,34 @@
> > +Platform driver for generic ULPI PHYs
> > +
> > +Required properties:
> > +- compatible : Should be "ulpi-phy"
> > +- reg : Physical base address and size of the USB
> > + controller registers map to which this PHY
> > + is connected.
> > +- view-port : Should contain viewport register offset of the
> > + USB controller to which this PHY is connected Optional
> > +properties:
> > +- drv-vbus : required if turning VBUS on/off has to be driven
> > + by writing to PHY. This feature depends on board
> > + design.
> > +
> > +Example:
> > +Below example shows the PHY binding for Chipidea USB controller which
> > +has ulpi viewport register at 0x0170
> > +
> > + usb_phy0: phy0 {
> > + compatible = "ulpi-phy";
> > + reg = <0xe0002000 0x1000>;
> > + view-port = <0x0170>;
> > + drv-vbus;
> > + };
> > +
> > + usb0: usb@e0002000 {
> > + compatible = "chipidea,usb2";
> > + interrupt-parent = <&intc>;
> > + interrupts = <0 21 4>;
> > + reg = <0xe0002000 0x1000>;
>
> Although just call devm_ioremap twice for the same register region does not
> cause any errors, I am not sure if it will has other potential problems. Cc: arm
> list.
Yes Peter I was also in doubt to call devm_ioremap twice for same register region.
devm_ioremap_resource complained hence modified to devm_ioremap. Thanks for
adding arm-list.
Sundeep
>
> > + phy_type = "ulpi";
> > + dr_mode = "host";
> > + usb-phy = <&usb_phy0>;
> > + };
> > --
> > 1.7.1
> >
>
> --
>
> Best Regards,
> Peter Chen
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
2015-09-23 12:54 [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver Subbaraya Sundeep Bhatta
2015-09-24 9:10 ` Peter Chen
@ 2015-09-24 16:14 ` Rob Herring
1 sibling, 0 replies; 9+ messages in thread
From: Rob Herring @ 2015-09-24 16:14 UTC (permalink / raw)
To: Subbaraya Sundeep Bhatta
Cc: Felipe Balbi, Peter Chen, devicetree, Kishon Vijay Abraham I,
Greg Kroah-Hartman, Linux USB List, linux-kernel,
Punnaiah Choudary Kalluri, Subbaraya Sundeep Bhatta
On Wed, Sep 23, 2015 at 7:54 AM, Subbaraya Sundeep Bhatta
<subbaraya.sundeep.bhatta@xilinx.com> wrote:
> This patch adds binding doc info for generic ULPI PHYs
> platform driver.
>
> Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
> ---
> .../devicetree/bindings/usb/ulpi-platform-phy.txt | 34 ++++++++++++++++++++
> 1 files changed, 34 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>
> diff --git a/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> new file mode 100644
> index 0000000..7b8cbb4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> @@ -0,0 +1,34 @@
> +Platform driver for generic ULPI PHYs
Platform driver has nothing to do with DT bindings.
> +
> +Required properties:
> +- compatible : Should be "ulpi-phy"
This needs a more specific compatible in addition.
> +- reg : Physical base address and size of the USB
> + controller registers map to which this PHY
> + is connected.
> +- view-port : Should contain viewport register offset of the
> + USB controller to which this PHY is connected
This is a property of the controller, not the phy.
> +Optional properties:
> +- drv-vbus : required if turning VBUS on/off has to be driven
> + by writing to PHY. This feature depends on board
> + design.
> +
> +Example:
> +Below example shows the PHY binding for Chipidea USB controller which has
> +ulpi viewport register at 0x0170
> +
> + usb_phy0: phy0 {
> + compatible = "ulpi-phy";
> + reg = <0xe0002000 0x1000>;
> + view-port = <0x0170>;
> + drv-vbus;
> + };
> +
> + usb0: usb@e0002000 {
> + compatible = "chipidea,usb2";
> + interrupt-parent = <&intc>;
> + interrupts = <0 21 4>;
> + reg = <0xe0002000 0x1000>;
> + phy_type = "ulpi";
> + dr_mode = "host";
> + usb-phy = <&usb_phy0>;
usb-phy is deprecated. Use phys and the generic phy binding instead.
> + };
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
2015-09-24 9:26 ` Subbaraya Sundeep Bhatta
@ 2015-09-24 16:18 ` Rob Herring
2015-09-30 16:18 ` Felipe Balbi
0 siblings, 1 reply; 9+ messages in thread
From: Rob Herring @ 2015-09-24 16:18 UTC (permalink / raw)
To: Subbaraya Sundeep Bhatta
Cc: Peter Chen, devicetree, gregkh, linux-usb, linux-kernel, balbi,
kishon, Punnaiah Choudary Kalluri, linux-arm-kernel
On Thu, Sep 24, 2015 at 4:26 AM, Subbaraya Sundeep Bhatta
<subbaraya.sundeep.bhatta@xilinx.com> wrote:
> Hi Peter,
>
>> -----Original Message-----
>> From: Peter Chen [mailto:peter.chen@freescale.com]
>> Sent: Thursday, September 24, 2015 2:41 PM
>> To: Subbaraya Sundeep Bhatta
>> Cc: balbi@ti.com; devicetree@vger.kernel.org; kishon@ti.com;
>> gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; linux-
>> kernel@vger.kernel.org; Punnaiah Choudary Kalluri; Subbaraya Sundeep Bhatta;
>> linux-arm-kernel@lists.infradead.org
>> Subject: Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
>>
>> On Wed, Sep 23, 2015 at 06:24:01PM +0530, Subbaraya Sundeep Bhatta
>> wrote:
>> > This patch adds binding doc info for generic ULPI PHYs platform
>> > driver.
>> >
>> > Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
>> > ---
>> > .../devicetree/bindings/usb/ulpi-platform-phy.txt | 34
>> ++++++++++++++++++++
>> > 1 files changed, 34 insertions(+), 0 deletions(-) create mode 100644
>> > Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>> >
>> > diff --git
>> > a/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>> > b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>> > new file mode 100644
>> > index 0000000..7b8cbb4
>> > --- /dev/null
>> > +++ b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>> > @@ -0,0 +1,34 @@
>> > +Platform driver for generic ULPI PHYs
>> > +
>> > +Required properties:
>> > +- compatible : Should be "ulpi-phy"
>> > +- reg : Physical base address and size of the USB
>> > + controller registers map to which this PHY
>> > + is connected.
>> > +- view-port : Should contain viewport register offset of the
>> > + USB controller to which this PHY is connected Optional
>> > +properties:
>> > +- drv-vbus : required if turning VBUS on/off has to be driven
>> > + by writing to PHY. This feature depends on board
>> > + design.
>> > +
>> > +Example:
>> > +Below example shows the PHY binding for Chipidea USB controller which
>> > +has ulpi viewport register at 0x0170
>> > +
>> > + usb_phy0: phy0 {
>> > + compatible = "ulpi-phy";
>> > + reg = <0xe0002000 0x1000>;
>> > + view-port = <0x0170>;
>> > + drv-vbus;
>> > + };
>> > +
>> > + usb0: usb@e0002000 {
>> > + compatible = "chipidea,usb2";
>> > + interrupt-parent = <&intc>;
>> > + interrupts = <0 21 4>;
>> > + reg = <0xe0002000 0x1000>;
>>
>> Although just call devm_ioremap twice for the same register region does not
>> cause any errors, I am not sure if it will has other potential problems. Cc: arm
>> list.
>
> Yes Peter I was also in doubt to call devm_ioremap twice for same register region.
> devm_ioremap_resource complained hence modified to devm_ioremap. Thanks for
> adding arm-list.
Don't put overlapping resources in the DT. Having 2 drivers accessing
the same registers is not a clean or safe design.
Rob
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
2015-09-24 16:18 ` Rob Herring
@ 2015-09-30 16:18 ` Felipe Balbi
2015-10-11 11:15 ` punnaiah choudary kalluri
0 siblings, 1 reply; 9+ messages in thread
From: Felipe Balbi @ 2015-09-30 16:18 UTC (permalink / raw)
To: Rob Herring
Cc: Subbaraya Sundeep Bhatta, Peter Chen, devicetree, gregkh,
linux-usb, linux-kernel, balbi, kishon,
Punnaiah Choudary Kalluri, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 3691 bytes --]
On Thu, Sep 24, 2015 at 11:18:01AM -0500, Rob Herring wrote:
> On Thu, Sep 24, 2015 at 4:26 AM, Subbaraya Sundeep Bhatta
> <subbaraya.sundeep.bhatta@xilinx.com> wrote:
> > Hi Peter,
> >
> >> -----Original Message-----
> >> From: Peter Chen [mailto:peter.chen@freescale.com]
> >> Sent: Thursday, September 24, 2015 2:41 PM
> >> To: Subbaraya Sundeep Bhatta
> >> Cc: balbi@ti.com; devicetree@vger.kernel.org; kishon@ti.com;
> >> gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; linux-
> >> kernel@vger.kernel.org; Punnaiah Choudary Kalluri; Subbaraya Sundeep Bhatta;
> >> linux-arm-kernel@lists.infradead.org
> >> Subject: Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
> >>
> >> On Wed, Sep 23, 2015 at 06:24:01PM +0530, Subbaraya Sundeep Bhatta
> >> wrote:
> >> > This patch adds binding doc info for generic ULPI PHYs platform
> >> > driver.
> >> >
> >> > Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
> >> > ---
> >> > .../devicetree/bindings/usb/ulpi-platform-phy.txt | 34
> >> ++++++++++++++++++++
> >> > 1 files changed, 34 insertions(+), 0 deletions(-) create mode 100644
> >> > Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> >> >
> >> > diff --git
> >> > a/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> >> > b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> >> > new file mode 100644
> >> > index 0000000..7b8cbb4
> >> > --- /dev/null
> >> > +++ b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> >> > @@ -0,0 +1,34 @@
> >> > +Platform driver for generic ULPI PHYs
> >> > +
> >> > +Required properties:
> >> > +- compatible : Should be "ulpi-phy"
> >> > +- reg : Physical base address and size of the USB
> >> > + controller registers map to which this PHY
> >> > + is connected.
> >> > +- view-port : Should contain viewport register offset of the
> >> > + USB controller to which this PHY is connected Optional
> >> > +properties:
> >> > +- drv-vbus : required if turning VBUS on/off has to be driven
> >> > + by writing to PHY. This feature depends on board
> >> > + design.
> >> > +
> >> > +Example:
> >> > +Below example shows the PHY binding for Chipidea USB controller which
> >> > +has ulpi viewport register at 0x0170
> >> > +
> >> > + usb_phy0: phy0 {
> >> > + compatible = "ulpi-phy";
> >> > + reg = <0xe0002000 0x1000>;
> >> > + view-port = <0x0170>;
> >> > + drv-vbus;
> >> > + };
> >> > +
> >> > + usb0: usb@e0002000 {
> >> > + compatible = "chipidea,usb2";
> >> > + interrupt-parent = <&intc>;
> >> > + interrupts = <0 21 4>;
> >> > + reg = <0xe0002000 0x1000>;
> >>
> >> Although just call devm_ioremap twice for the same register region does not
> >> cause any errors, I am not sure if it will has other potential problems. Cc: arm
> >> list.
> >
> > Yes Peter I was also in doubt to call devm_ioremap twice for same register region.
> > devm_ioremap_resource complained hence modified to devm_ioremap. Thanks for
> > adding arm-list.
>
> Don't put overlapping resources in the DT. Having 2 drivers accessing
> the same registers is not a clean or safe design.
thanks, saves me the trouble of saying the same thing.
Bottom line, if devm_ioremap_resource() fails, you're wrong. Just fix
your driver and move on.
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
2015-09-30 16:18 ` Felipe Balbi
@ 2015-10-11 11:15 ` punnaiah choudary kalluri
2015-10-11 14:40 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 9+ messages in thread
From: punnaiah choudary kalluri @ 2015-10-11 11:15 UTC (permalink / raw)
To: balbi
Cc: Rob Herring, Subbaraya Sundeep Bhatta, Peter Chen, devicetree,
gregkh, linux-usb, linux-kernel, kishon, linux-arm-kernel
On Wed, Sep 30, 2015 at 9:48 PM, Felipe Balbi <balbi@ti.com> wrote:
> On Thu, Sep 24, 2015 at 11:18:01AM -0500, Rob Herring wrote:
>> On Thu, Sep 24, 2015 at 4:26 AM, Subbaraya Sundeep Bhatta
>> <subbaraya.sundeep.bhatta@xilinx.com> wrote:
>> > Hi Peter,
>> >
>> >> -----Original Message-----
>> >> From: Peter Chen [mailto:peter.chen@freescale.com]
>> >> Sent: Thursday, September 24, 2015 2:41 PM
>> >> To: Subbaraya Sundeep Bhatta
>> >> Cc: balbi@ti.com; devicetree@vger.kernel.org; kishon@ti.com;
>> >> gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; linux-
>> >> kernel@vger.kernel.org; Punnaiah Choudary Kalluri; Subbaraya Sundeep Bhatta;
>> >> linux-arm-kernel@lists.infradead.org
>> >> Subject: Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
>> >>
>> >> On Wed, Sep 23, 2015 at 06:24:01PM +0530, Subbaraya Sundeep Bhatta
>> >> wrote:
>> >> > This patch adds binding doc info for generic ULPI PHYs platform
>> >> > driver.
>> >> >
>> >> > Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
>> >> > ---
>> >> > .../devicetree/bindings/usb/ulpi-platform-phy.txt | 34
>> >> ++++++++++++++++++++
>> >> > 1 files changed, 34 insertions(+), 0 deletions(-) create mode 100644
>> >> > Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>> >> >
>> >> > diff --git
>> >> > a/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>> >> > b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>> >> > new file mode 100644
>> >> > index 0000000..7b8cbb4
>> >> > --- /dev/null
>> >> > +++ b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>> >> > @@ -0,0 +1,34 @@
>> >> > +Platform driver for generic ULPI PHYs
>> >> > +
>> >> > +Required properties:
>> >> > +- compatible : Should be "ulpi-phy"
>> >> > +- reg : Physical base address and size of the USB
>> >> > + controller registers map to which this PHY
>> >> > + is connected.
>> >> > +- view-port : Should contain viewport register offset of the
>> >> > + USB controller to which this PHY is connected Optional
>> >> > +properties:
>> >> > +- drv-vbus : required if turning VBUS on/off has to be driven
>> >> > + by writing to PHY. This feature depends on board
>> >> > + design.
>> >> > +
>> >> > +Example:
>> >> > +Below example shows the PHY binding for Chipidea USB controller which
>> >> > +has ulpi viewport register at 0x0170
>> >> > +
>> >> > + usb_phy0: phy0 {
>> >> > + compatible = "ulpi-phy";
>> >> > + reg = <0xe0002000 0x1000>;
>> >> > + view-port = <0x0170>;
>> >> > + drv-vbus;
>> >> > + };
>> >> > +
>> >> > + usb0: usb@e0002000 {
>> >> > + compatible = "chipidea,usb2";
>> >> > + interrupt-parent = <&intc>;
>> >> > + interrupts = <0 21 4>;
>> >> > + reg = <0xe0002000 0x1000>;
>> >>
>> >> Although just call devm_ioremap twice for the same register region does not
>> >> cause any errors, I am not sure if it will has other potential problems. Cc: arm
>> >> list.
>> >
>> > Yes Peter I was also in doubt to call devm_ioremap twice for same register region.
>> > devm_ioremap_resource complained hence modified to devm_ioremap. Thanks for
>> > adding arm-list.
>>
>> Don't put overlapping resources in the DT. Having 2 drivers accessing
>> the same registers is not a clean or safe design.
>
> thanks, saves me the trouble of saying the same thing.
>
> Bottom line, if devm_ioremap_resource() fails, you're wrong. Just fix
> your driver and move on.
Any suggestions on how to move further?
Chipidea controller provides ulpi view port register for accessing the
usb phy registers. Now we want to add new driver for ulpi phy configuration
and that obviously it need of ulpi view port register access. So, sharing the
register space between these two drivers is necessary here.
Regards,
Punnaiah
>
> --
> balbi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
2015-10-11 11:15 ` punnaiah choudary kalluri
@ 2015-10-11 14:40 ` Kishon Vijay Abraham I
2015-10-28 11:55 ` Subbaraya Sundeep Bhatta
0 siblings, 1 reply; 9+ messages in thread
From: Kishon Vijay Abraham I @ 2015-10-11 14:40 UTC (permalink / raw)
To: punnaiah choudary kalluri, balbi
Cc: Rob Herring, Subbaraya Sundeep Bhatta, Peter Chen, devicetree,
gregkh, linux-usb, linux-kernel, linux-arm-kernel
Hi,
On Sunday 11 October 2015 04:45 PM, punnaiah choudary kalluri wrote:
> On Wed, Sep 30, 2015 at 9:48 PM, Felipe Balbi <balbi@ti.com> wrote:
>> On Thu, Sep 24, 2015 at 11:18:01AM -0500, Rob Herring wrote:
>>> On Thu, Sep 24, 2015 at 4:26 AM, Subbaraya Sundeep Bhatta
>>> <subbaraya.sundeep.bhatta@xilinx.com> wrote:
>>>> Hi Peter,
>>>>
>>>>> -----Original Message-----
>>>>> From: Peter Chen [mailto:peter.chen@freescale.com]
>>>>> Sent: Thursday, September 24, 2015 2:41 PM
>>>>> To: Subbaraya Sundeep Bhatta
>>>>> Cc: balbi@ti.com; devicetree@vger.kernel.org; kishon@ti.com;
>>>>> gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; linux-
>>>>> kernel@vger.kernel.org; Punnaiah Choudary Kalluri; Subbaraya Sundeep Bhatta;
>>>>> linux-arm-kernel@lists.infradead.org
>>>>> Subject: Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
>>>>>
>>>>> On Wed, Sep 23, 2015 at 06:24:01PM +0530, Subbaraya Sundeep Bhatta
>>>>> wrote:
>>>>>> This patch adds binding doc info for generic ULPI PHYs platform
>>>>>> driver.
>>>>>>
>>>>>> Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
>>>>>> ---
>>>>>> .../devicetree/bindings/usb/ulpi-platform-phy.txt | 34
>>>>> ++++++++++++++++++++
>>>>>> 1 files changed, 34 insertions(+), 0 deletions(-) create mode 100644
>>>>>> Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>>>>>>
>>>>>> diff --git
>>>>>> a/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>>>>>> b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>>>>>> new file mode 100644
>>>>>> index 0000000..7b8cbb4
>>>>>> --- /dev/null
>>>>>> +++ b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>>>>>> @@ -0,0 +1,34 @@
>>>>>> +Platform driver for generic ULPI PHYs
>>>>>> +
>>>>>> +Required properties:
>>>>>> +- compatible : Should be "ulpi-phy"
>>>>>> +- reg : Physical base address and size of the USB
>>>>>> + controller registers map to which this PHY
>>>>>> + is connected.
>>>>>> +- view-port : Should contain viewport register offset of the
>>>>>> + USB controller to which this PHY is connected Optional
>>>>>> +properties:
>>>>>> +- drv-vbus : required if turning VBUS on/off has to be driven
>>>>>> + by writing to PHY. This feature depends on board
>>>>>> + design.
>>>>>> +
>>>>>> +Example:
>>>>>> +Below example shows the PHY binding for Chipidea USB controller which
>>>>>> +has ulpi viewport register at 0x0170
>>>>>> +
>>>>>> + usb_phy0: phy0 {
>>>>>> + compatible = "ulpi-phy";
>>>>>> + reg = <0xe0002000 0x1000>;
>>>>>> + view-port = <0x0170>;
>>>>>> + drv-vbus;
>>>>>> + };
>>>>>> +
>>>>>> + usb0: usb@e0002000 {
>>>>>> + compatible = "chipidea,usb2";
>>>>>> + interrupt-parent = <&intc>;
>>>>>> + interrupts = <0 21 4>;
>>>>>> + reg = <0xe0002000 0x1000>;
>>>>>
>>>>> Although just call devm_ioremap twice for the same register region does not
>>>>> cause any errors, I am not sure if it will has other potential problems. Cc: arm
>>>>> list.
>>>>
>>>> Yes Peter I was also in doubt to call devm_ioremap twice for same register region.
>>>> devm_ioremap_resource complained hence modified to devm_ioremap. Thanks for
>>>> adding arm-list.
>>>
>>> Don't put overlapping resources in the DT. Having 2 drivers accessing
>>> the same registers is not a clean or safe design.
>>
>> thanks, saves me the trouble of saying the same thing.
>>
>> Bottom line, if devm_ioremap_resource() fails, you're wrong. Just fix
>> your driver and move on.
>
> Any suggestions on how to move further?
> Chipidea controller provides ulpi view port register for accessing the
> usb phy registers. Now we want to add new driver for ulpi phy configuration
> and that obviously it need of ulpi view port register access. So, sharing the
> register space between these two drivers is necessary here.
Why not program ULPI the same way as DWC3 does?
Thanks
Kishon
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
2015-10-11 14:40 ` Kishon Vijay Abraham I
@ 2015-10-28 11:55 ` Subbaraya Sundeep Bhatta
0 siblings, 0 replies; 9+ messages in thread
From: Subbaraya Sundeep Bhatta @ 2015-10-28 11:55 UTC (permalink / raw)
To: Kishon Vijay Abraham I, Punnaiah Choudary Kalluri, balbi
Cc: Rob Herring, Peter Chen, devicetree, gregkh, linux-usb,
linux-kernel, linux-arm-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 5311 bytes --]
Hi Kishon,
> -----Original Message-----
> From: Kishon Vijay Abraham I [mailto:kishon@ti.com]
> Sent: Sunday, October 11, 2015 8:11 PM
> To: Punnaiah Choudary Kalluri; balbi@ti.com
> Cc: Rob Herring; Subbaraya Sundeep Bhatta; Peter Chen;
> devicetree@vger.kernel.org; gregkh@linuxfoundation.org; linux-
> usb@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org
> Subject: Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
>
> Hi,
>
> On Sunday 11 October 2015 04:45 PM, punnaiah choudary kalluri wrote:
> > On Wed, Sep 30, 2015 at 9:48 PM, Felipe Balbi <balbi@ti.com> wrote:
> >> On Thu, Sep 24, 2015 at 11:18:01AM -0500, Rob Herring wrote:
> >>> On Thu, Sep 24, 2015 at 4:26 AM, Subbaraya Sundeep Bhatta
> >>> <subbaraya.sundeep.bhatta@xilinx.com> wrote:
> >>>> Hi Peter,
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: Peter Chen [mailto:peter.chen@freescale.com]
> >>>>> Sent: Thursday, September 24, 2015 2:41 PM
> >>>>> To: Subbaraya Sundeep Bhatta
> >>>>> Cc: balbi@ti.com; devicetree@vger.kernel.org; kishon@ti.com;
> >>>>> gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; linux-
> >>>>> kernel@vger.kernel.org; Punnaiah Choudary Kalluri; Subbaraya
> >>>>> Sundeep Bhatta; linux-arm-kernel@lists.infradead.org
> >>>>> Subject: Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI
> >>>>> platform driver
> >>>>>
> >>>>> On Wed, Sep 23, 2015 at 06:24:01PM +0530, Subbaraya Sundeep
> Bhatta
> >>>>> wrote:
> >>>>>> This patch adds binding doc info for generic ULPI PHYs platform
> >>>>>> driver.
> >>>>>>
> >>>>>> Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
> >>>>>> ---
> >>>>>> .../devicetree/bindings/usb/ulpi-platform-phy.txt | 34
> >>>>> ++++++++++++++++++++
> >>>>>> 1 files changed, 34 insertions(+), 0 deletions(-) create mode
> >>>>>> 100644
> >>>>>> Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> >>>>>>
> >>>>>> diff --git
> >>>>>> a/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> >>>>>> b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> >>>>>> new file mode 100644
> >>>>>> index 0000000..7b8cbb4
> >>>>>> --- /dev/null
> >>>>>> +++ b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
> >>>>>> @@ -0,0 +1,34 @@
> >>>>>> +Platform driver for generic ULPI PHYs
> >>>>>> +
> >>>>>> +Required properties:
> >>>>>> +- compatible : Should be "ulpi-phy"
> >>>>>> +- reg : Physical base address and size of the USB
> >>>>>> + controller registers map to which this PHY
> >>>>>> + is connected.
> >>>>>> +- view-port : Should contain viewport register offset of the
> >>>>>> + USB controller to which this PHY is
> >>>>>> +connected Optional
> >>>>>> +properties:
> >>>>>> +- drv-vbus : required if turning VBUS on/off has to be driven
> >>>>>> + by writing to PHY. This feature depends on board
> >>>>>> + design.
> >>>>>> +
> >>>>>> +Example:
> >>>>>> +Below example shows the PHY binding for Chipidea USB controller
> >>>>>> +which has ulpi viewport register at 0x0170
> >>>>>> +
> >>>>>> + usb_phy0: phy0 {
> >>>>>> + compatible = "ulpi-phy";
> >>>>>> + reg = <0xe0002000 0x1000>;
> >>>>>> + view-port = <0x0170>;
> >>>>>> + drv-vbus;
> >>>>>> + };
> >>>>>> +
> >>>>>> + usb0: usb@e0002000 {
> >>>>>> + compatible = "chipidea,usb2";
> >>>>>> + interrupt-parent = <&intc>;
> >>>>>> + interrupts = <0 21 4>;
> >>>>>> + reg = <0xe0002000 0x1000>;
> >>>>>
> >>>>> Although just call devm_ioremap twice for the same register region
> >>>>> does not cause any errors, I am not sure if it will has other
> >>>>> potential problems. Cc: arm list.
> >>>>
> >>>> Yes Peter I was also in doubt to call devm_ioremap twice for same register
> region.
> >>>> devm_ioremap_resource complained hence modified to devm_ioremap.
> >>>> Thanks for adding arm-list.
> >>>
> >>> Don't put overlapping resources in the DT. Having 2 drivers
> >>> accessing the same registers is not a clean or safe design.
> >>
> >> thanks, saves me the trouble of saying the same thing.
> >>
> >> Bottom line, if devm_ioremap_resource() fails, you're wrong. Just fix
> >> your driver and move on.
> >
> > Any suggestions on how to move further?
> > Chipidea controller provides ulpi view port register for accessing the
> > usb phy registers. Now we want to add new driver for ulpi phy
> > configuration and that obviously it need of ulpi view port register
> > access. So, sharing the register space between these two drivers is necessary
> here.
>
> Why not program ULPI the same way as DWC3 does?
Sorry for delay in response, back from long vacation.
Can we call generic PHY phy->power_on and power_off functions to do similar function as usb2_phy->set_vbus?
I assume it is to power on whole PHY chip but not to enable 5V on VBUS line.
Thanks,
Sundeep
>
> Thanks
> Kishon
ÿôèº{.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] 9+ messages in thread
end of thread, other threads:[~2015-10-28 11:55 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-23 12:54 [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver Subbaraya Sundeep Bhatta
2015-09-24 9:10 ` Peter Chen
2015-09-24 9:26 ` Subbaraya Sundeep Bhatta
2015-09-24 16:18 ` Rob Herring
2015-09-30 16:18 ` Felipe Balbi
2015-10-11 11:15 ` punnaiah choudary kalluri
2015-10-11 14:40 ` Kishon Vijay Abraham I
2015-10-28 11:55 ` Subbaraya Sundeep Bhatta
2015-09-24 16:14 ` Rob Herring
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).