lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 29 Oct 2014 21:13:50 +0100
From:	Roman Byshko <rbyshko@...il.com>
To:	Maxime Ripard <maxime.ripard@...e-electrons.com>
Cc:	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	devicetree@...r.kernel.org, Kishon Vijay Abraham I <kishon@...com>,
	Russell King <linux@....linux.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Mark Rutland <mark.rutland@....com>,
	Pawel Moll <pawel.moll@....com>,
	Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH 2/5] ARM: dtsi: sunxi: add common VBUS regulator

Hi Maxime,

thank you for the review!

On Tue, Oct 28, 2014 at 10:51 PM, Maxime Ripard
<maxime.ripard@...e-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?

Best,
Roman


> Thanks,
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ