* [PATCH v1] usb: phy: nop: device tree documentation for vbus
@ 2014-11-09 13:02 Robert Jarzmik
[not found] ` <1415538138-24434-1-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Robert Jarzmik @ 2014-11-09 13:02 UTC (permalink / raw)
To: Felipe Balbi, Mark Rutland
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA, Robert Jarzmik
Enhance the phy documentation by adding 2 new optional bindings :
- the vbus gpio, which detects usb insertion
- the vbus regulator, which provides current drawn from the usb cable
Signed-off-by: Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org>
---
Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
index 1bd37fa..65dfe4b 100644
--- a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
+++ b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
@@ -17,6 +17,11 @@ Optional properties:
- reset-gpios: Should specify the GPIO for reset.
+- vbus-gpios: should specify the GPIO detecting a VBus insertion
+ (see Documentation/devicetree/bindings/gpio/gpio.txt)
+- vbus-regulator : should specifiy the regulator supplying current drawn from
+ the VBus line (see Documentation/devicetree/bindings/regulator/regulator.txt).
+
Example:
hsusb1_phy {
@@ -26,8 +31,11 @@ Example:
clock-names = "main_clk";
vcc-supply = <&hsusb1_vcc_regulator>;
reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
+ vbus-gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
+ vbus-regulator = <&vbus_regulator>;
};
hsusb1_phy is a NOP USB PHY device that gets its clock from an oscillator
and expects that clock to be configured to 19.2MHz by the NOP PHY driver.
hsusb1_vcc_regulator provides power to the PHY and GPIO 7 controls RESET.
+GPIO 13 detects VBus insertion, and accordingly notifies the vbus-regulator.
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v1] usb: phy: nop: device tree documentation for vbus
[not found] ` <1415538138-24434-1-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
@ 2014-11-21 15:45 ` Felipe Balbi
2014-11-21 17:17 ` Robert Jarzmik
0 siblings, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2014-11-21 15:45 UTC (permalink / raw)
To: Robert Jarzmik
Cc: Felipe Balbi, Mark Rutland, linux-usb-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 1575 bytes --]
On Sun, Nov 09, 2014 at 02:02:18PM +0100, Robert Jarzmik wrote:
> Enhance the phy documentation by adding 2 new optional bindings :
> - the vbus gpio, which detects usb insertion
> - the vbus regulator, which provides current drawn from the usb cable
>
> Signed-off-by: Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org>
> ---
> Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
> index 1bd37fa..65dfe4b 100644
> --- a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
> +++ b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
> @@ -17,6 +17,11 @@ Optional properties:
>
> - reset-gpios: Should specify the GPIO for reset.
>
> +- vbus-gpios: should specify the GPIO detecting a VBus insertion
> + (see Documentation/devicetree/bindings/gpio/gpio.txt)
> +- vbus-regulator : should specifiy the regulator supplying current drawn from
> + the VBus line (see Documentation/devicetree/bindings/regulator/regulator.txt).
> +
> Example:
>
> hsusb1_phy {
> @@ -26,8 +31,11 @@ Example:
> clock-names = "main_clk";
> vcc-supply = <&hsusb1_vcc_regulator>;
> reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
> + vbus-gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
> + vbus-regulator = <&vbus_regulator>;
not sure why you need vbus-gpios here. You can pass the gpio to the
regulator as enable-gpio, right ?
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] usb: phy: nop: device tree documentation for vbus
2014-11-21 15:45 ` Felipe Balbi
@ 2014-11-21 17:17 ` Robert Jarzmik
[not found] ` <87r3ww5v7d.fsf-GANU6spQydw@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Robert Jarzmik @ 2014-11-21 17:17 UTC (permalink / raw)
To: Felipe Balbi
Cc: Mark Rutland, linux-usb-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA
Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> writes:
> On Sun, Nov 09, 2014 at 02:02:18PM +0100, Robert Jarzmik wrote:
>> hsusb1_phy {
>> @@ -26,8 +31,11 @@ Example:
>> clock-names = "main_clk";
>> vcc-supply = <&hsusb1_vcc_regulator>;
>> reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
>> + vbus-gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
>> + vbus-regulator = <&vbus_regulator>;
>
> not sure why you need vbus-gpios here. You can pass the gpio to the
> regulator as enable-gpio, right ?
Euh no. From my understanding a regulator enable-gpio is an _output_ gpio
enabling the regulator. This vbus-gpio is an _input_ gpio detecting the vbus
assertion. Maybe a name like "vbus-detect-gpio" would be more accurante ?
Cheers.
--
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] usb: phy: nop: device tree documentation for vbus
[not found] ` <87r3ww5v7d.fsf-GANU6spQydw@public.gmane.org>
@ 2014-11-21 17:22 ` Felipe Balbi
2014-11-21 17:49 ` Robert Jarzmik
0 siblings, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2014-11-21 17:22 UTC (permalink / raw)
To: Robert Jarzmik
Cc: Felipe Balbi, Mark Rutland, linux-usb-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 983 bytes --]
On Fri, Nov 21, 2014 at 06:17:58PM +0100, Robert Jarzmik wrote:
> Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> writes:
>
> > On Sun, Nov 09, 2014 at 02:02:18PM +0100, Robert Jarzmik wrote:
> >> hsusb1_phy {
> >> @@ -26,8 +31,11 @@ Example:
> >> clock-names = "main_clk";
> >> vcc-supply = <&hsusb1_vcc_regulator>;
> >> reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
> >> + vbus-gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
> >> + vbus-regulator = <&vbus_regulator>;
> >
> > not sure why you need vbus-gpios here. You can pass the gpio to the
> > regulator as enable-gpio, right ?
>
> Euh no. From my understanding a regulator enable-gpio is an _output_ gpio
> enabling the regulator. This vbus-gpio is an _input_ gpio detecting the vbus
> assertion. Maybe a name like "vbus-detect-gpio" would be more accurante ?
aha, that clears it up, yeah. So the GPIO is detecting if we have VBUS
from the host side while the regulator supplies VBUS ?
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] usb: phy: nop: device tree documentation for vbus
2014-11-21 17:22 ` Felipe Balbi
@ 2014-11-21 17:49 ` Robert Jarzmik
[not found] ` <87ioi85tqc.fsf-GANU6spQydw@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Robert Jarzmik @ 2014-11-21 17:49 UTC (permalink / raw)
To: Felipe Balbi
Cc: Mark Rutland, linux-usb-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA
Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> writes:
> On Fri, Nov 21, 2014 at 06:17:58PM +0100, Robert Jarzmik wrote:
>> Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> writes:
>>
>> > On Sun, Nov 09, 2014 at 02:02:18PM +0100, Robert Jarzmik wrote:
>> >> hsusb1_phy {
>> >> @@ -26,8 +31,11 @@ Example:
>> >> clock-names = "main_clk";
>> >> vcc-supply = <&hsusb1_vcc_regulator>;
>> >> reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
>> >> + vbus-gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
>> >> + vbus-regulator = <&vbus_regulator>;
>> >
>> > not sure why you need vbus-gpios here. You can pass the gpio to the
>> > regulator as enable-gpio, right ?
>>
>> Euh no. From my understanding a regulator enable-gpio is an _output_ gpio
>> enabling the regulator. This vbus-gpio is an _input_ gpio detecting the vbus
>> assertion. Maybe a name like "vbus-detect-gpio" would be more accurante ?
>
> aha, that clears it up, yeah. So the GPIO is detecting if we have VBUS
> from the host side while the regulator supplies VBUS ?
Yup, exactly. I'll amend the name for v2.
Cheers.
--
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] usb: phy: nop: device tree documentation for vbus
[not found] ` <87ioi85tqc.fsf-GANU6spQydw@public.gmane.org>
@ 2014-11-21 18:03 ` Felipe Balbi
0 siblings, 0 replies; 6+ messages in thread
From: Felipe Balbi @ 2014-11-21 18:03 UTC (permalink / raw)
To: Robert Jarzmik
Cc: Felipe Balbi, Mark Rutland, linux-usb-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]
On Fri, Nov 21, 2014 at 06:49:47PM +0100, Robert Jarzmik wrote:
> Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> writes:
>
> > On Fri, Nov 21, 2014 at 06:17:58PM +0100, Robert Jarzmik wrote:
> >> Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> writes:
> >>
> >> > On Sun, Nov 09, 2014 at 02:02:18PM +0100, Robert Jarzmik wrote:
> >> >> hsusb1_phy {
> >> >> @@ -26,8 +31,11 @@ Example:
> >> >> clock-names = "main_clk";
> >> >> vcc-supply = <&hsusb1_vcc_regulator>;
> >> >> reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
> >> >> + vbus-gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
> >> >> + vbus-regulator = <&vbus_regulator>;
> >> >
> >> > not sure why you need vbus-gpios here. You can pass the gpio to the
> >> > regulator as enable-gpio, right ?
> >>
> >> Euh no. From my understanding a regulator enable-gpio is an _output_ gpio
> >> enabling the regulator. This vbus-gpio is an _input_ gpio detecting the vbus
> >> assertion. Maybe a name like "vbus-detect-gpio" would be more accurante ?
> >
> > aha, that clears it up, yeah. So the GPIO is detecting if we have VBUS
> > from the host side while the regulator supplies VBUS ?
> Yup, exactly. I'll amend the name for v2.
Thank you
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-11-21 18:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-09 13:02 [PATCH v1] usb: phy: nop: device tree documentation for vbus Robert Jarzmik
[not found] ` <1415538138-24434-1-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
2014-11-21 15:45 ` Felipe Balbi
2014-11-21 17:17 ` Robert Jarzmik
[not found] ` <87r3ww5v7d.fsf-GANU6spQydw@public.gmane.org>
2014-11-21 17:22 ` Felipe Balbi
2014-11-21 17:49 ` Robert Jarzmik
[not found] ` <87ioi85tqc.fsf-GANU6spQydw@public.gmane.org>
2014-11-21 18:03 ` Felipe Balbi
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).