From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Roman Byshko <rbyshko@gmail.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
Kishon Vijay Abraham I <kishon@ti.com>,
Russell King <linux@arm.linux.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Mark Rutland <mark.rutland@arm.com>,
Pawel Moll <pawel.moll@arm.com>, Rob Herring <robh+dt@kernel.org>
Subject: Re: [PATCH 2/5] ARM: dtsi: sunxi: add common VBUS regulator
Date: Thu, 30 Oct 2014 17:41:25 +0100 [thread overview]
Message-ID: <20141030164125.GO21251@lukather> (raw)
In-Reply-To: <CAMXmWBmU0j_tf_fseDP5p527SaO=iLB-=fKp1PCvE9J6FQk6dw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3475 bytes --]
Hi,
On Wed, Oct 29, 2014 at 09:13:50PM +0100, Roman Byshko wrote:
> Hi Maxime,
>
> thank you for the review!
>
> On Tue, Oct 28, 2014 at 10:51 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > On Mon, Oct 27, 2014 at 10:43:02PM +0100, Roman Byshko wrote:
> >> Until now the regulator nodes for powering USB VBUS
> >> existed only for the two host controllers. Now the regulator
> >> is added for USB OTG too.
> >> ---
> >> arch/arm/boot/dts/sunxi-common-regulators.dtsi | 19 +++++++++++++++++++
> >> 1 file changed, 19 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/sunxi-common-regulators.dtsi b/arch/arm/boot/dts/sunxi-common-regulators.dtsi
> >> index c9c5b10..f521672 100644
> >> --- a/arch/arm/boot/dts/sunxi-common-regulators.dtsi
> >> +++ b/arch/arm/boot/dts/sunxi-common-regulators.dtsi
> >> @@ -21,6 +21,13 @@
> >> allwinner,pull = <0>;
> >> };
> >>
> >> + usb0_vbus_pin_a: usb0_vbus_pin@0 {
> >> + allwinner,pins = "PB9";
> >> + allwinner,function = "gpio_out";
> >> + allwinner,drive = <0>;
> >> + allwinner,pull = <0>;
> >> + };
> >> +
> >> usb1_vbus_pin_a: usb1_vbus_pin@0 {
> >> allwinner,pins = "PH6";
> >> allwinner,function = "gpio_out";
> >> @@ -49,6 +56,18 @@
> >> status = "disabled";
> >> };
> >>
> >> + reg_usb0_vbus: usb0-vbus {
> >> + compatible = "regulator-fixed";
> >> + pinctrl-names = "default";
> >> + pinctrl-0 = <&usb0_vbus_pin_a>;
> >> + regulator-name = "usb0-vbus";
> >> + regulator-min-microvolt = <5000000>;
> >> + regulator-max-microvolt = <5000000>;
> >> + enable-active-high;
> >> + gpio = <&pio 1 9 0>;
> >> + status = "disabled";
> >> + };
> >
> > We're using these regulators because a huuuge majority of the boards
> > out there, regardless of their SoC, are using the same GPIO to drive
> > the same regulator. Is this the case here? What board have you looked
> > at?
>
> Currently I'm developing and testing for Cubietruck. I also have a few
> other boards (with different SoC), I will add corresponding DT nodes
> for them later.
>
> As for GPIO which is used to drive the USB0 VBUS pin.
>
> $ git remote show origin
> * remote origin
> Fetch URL: https://github.com/linux-sunxi/sunxi-boards.git
> Push URL: https://github.com/linux-sunxi/sunxi-boards.git
> ...
> $ grep -A7 usbc0 -r . | grep usb_drv_vbus_gpio | grep port | sort |
> cut -d: -f2 | cut -d "<" -f1 | sort | uniq -c
> 1 PA16
> 1 PA17
> 67 PB09
> 4 PB10
> 1 PB9
> 1 PC17
> 1 PD25
> 4 PG11
> 21 PG12
> 1 PG13
> 1 PH17
> 4 power4
>
> So PB09 is most often used. PG12 is used on (alsmost always) A13. So
> propose to make PB09 default, then override it in sun5i-a13.dtsi and
> later in board dts file if needed.
>
> Cubietruck uses PH17. That is why I override PB09 in its dts file.
>
> Sounds good?
It does :)
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-10-30 16:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-27 21:43 [PATCH 0/5] ARM: sunxi: Add support for USB OTG PHY Roman Byshko
2014-10-27 21:43 ` [PATCH 1/5] phy: sun4i: add support for USB phy0 Roman Byshko
[not found] ` <668c1b5541fc0175957573bd5f8d40dd2eaccae1.1414444953.git.rbyshko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-28 21:47 ` Maxime Ripard
2014-10-29 2:24 ` Chen-Yu Tsai
2014-10-29 13:46 ` Roman Byshko
2014-10-30 16:40 ` Maxime Ripard
2014-10-27 21:43 ` [PATCH 2/5] ARM: dtsi: sunxi: add common VBUS regulator Roman Byshko
[not found] ` <210cc2a03d43e3d65b08f302b3b32663044ad94f.1414444953.git.rbyshko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-28 21:51 ` Maxime Ripard
2014-10-29 20:13 ` Roman Byshko
2014-10-30 16:41 ` Maxime Ripard [this message]
2014-10-27 21:43 ` [PATCH 3/5] ARM: sun7i: dtsi: add support for usbphy0 Roman Byshko
2014-10-27 21:43 ` [PATCH 4/5] ARM: dts: sun7i: Cubietruck: override regulator pin Roman Byshko
2014-10-27 21:43 ` [PATCH 5/5] ARM: dts: sun7i: Cubietruck: add power supply regulator for USB OTG VBUS Roman Byshko
2014-10-27 22:27 ` [PATCH 0/5] ARM: sunxi: Add support for USB OTG PHY Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141030164125.GO21251@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rbyshko@gmail.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).