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] [day] [month] [year] [list]
Message-ID: <CANAwSgTowgbjLm56oH553ji8G8SiLVKyb3oaQzrR=hAp5t78Zw@mail.gmail.com>
Date:   Thu, 15 Jul 2021 15:54:01 +0530
From:   Anand Moon <linux.amoon@...il.com>
To:     Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Cc:     linux-phy@...ts.infradead.org,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        linux-amlogic@...ts.infradead.org,
        Linux Kernel <linux-kernel@...r.kernel.org>,
        Matt Corallo <oc2udbzfd@...tcorallo.com>,
        Rob Herring <robh+dt@...nel.org>,
        Neil Armstrong <narmstrong@...libre.com>,
        Kevin Hilman <khilman@...libre.com>,
        Jerome Brunet <jbrunet@...libre.com>,
        Kishon Vijay Abraham I <kishon@...com>,
        Vinod Koul <vkoul@...nel.org>,
        Emiliano Ingrassia <ingrassia@...genesys.com>,
        devicetree <devicetree@...r.kernel.org>
Subject: Re: [PATCHv1 1/3] ARM: dts: meson8b: odroidc1: Add usb phy power node

Hi Martin,

On Thu, 15 Jul 2021 at 05:00, Martin Blumenstingl
<martin.blumenstingl@...glemail.com> wrote:
>
> Hi Anand,
>
> On Wed, Jul 14, 2021 at 7:25 PM Anand Moon <linux.amoon@...il.com> wrote:
> [...]
> > Can you give these small changes a try,
> > $ git diff
> > diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts
> > b/arch/arm/boot/dts/meson8b-odroidc1.dts
> > index 748f4c6a050a..066523f14074 100644
> > --- a/arch/arm/boot/dts/meson8b-odroidc1.dts
> > +++ b/arch/arm/boot/dts/meson8b-odroidc1.dts
> > @@ -47,8 +47,9 @@ usb_pwr_en: regulator-usb-pwr-en {
> >                 /*
> >                  * signal name from schematics: PWREN
> >                  */
> > -               gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
> > +               gpio = <&gpio_ao GPIOAO_5 GPIO_OPEN_DRAIN>;
> >                 enable-active-high;
> > +               regulator-always-on;
> >         };
> >
> > [alarm@...hl-c1e ~]$ sudo cat /sys/kernel/debug/gpio | grep usb
> >  gpio-1953 (USB_HUB_RST_N       |usb-hub-reset       ) out hi
> >  gpio-1954 (USB_OTG_PWREN       |regulator-usb-pwr-en) out lo
> I can reproduce the /sys/kernel/debug/gpio output with this patch
>
> Still USB works for me regardless of whether USB_OTG_PWREN is HIGH or LOW
> This is something that is not possible if the regulator is really
> connected on the board like you are describing in this patch.
> If this .dts change was correct then I would expect that USB is
> breaking when inverting the GPIO polarity.
>
> I am using the "inverted GPIO polarity" approach to find the Ethernet
> PHY reset GPIO when working on boards for which I don't have the
> schematics:
Thanks for the hint,
> 1) make an assumption of which GPIO to use
> 2) try with GPIO_ACTIVE_LOW -> PHY should be detected
> 3) change it to GPIO_ACTIVE_HIGH -> PHY should not be found anymore
> (because it's in reset)
> 4) before submitting the board.dts upstream I of course change it back
> to GPIO_ACTIVE_LOW

Yes I am going to changes this to GPIO_ACTIVE_LOW in the next version.
These dts changes just assist in power through PHY to USB ports.
After going through the previous email I got this working see below.

[alarm@...hl-c1e linux-amlogic-5.y-devel]$ sudo cat
/sys/kernel/debug/gpio | grep usb
 gpio-1953 (USB_HUB_RST_N       |usb-hub-reset       ) out hi
 gpio-1954 (USB_OTG_PWREN       |regulator-usb-pwr-en) out lo ACTIVE LOW

>
> If during step 3) the PHY is still found then I know that it's not the
> correct GPIO.
> I am seeing the same behavior with this USB regulator. My
> interpretation of this is: either you are not using the right GPIO or
> the GPIO is not related to &usb1 (or it's PHY).
>
With reference to the schematic  odroid-c1+_rev0.4_20160226
section USB HOST POWER ---- MP62551DGT-LF-Z
Both USB POWER and PWREN help control the power to USB Ports.

>
> Best regards,
> Martin

Thanks
-Anand

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ