From: Martin Blumenstingl <firstname.lastname@example.org>
To: Anand Moon <email@example.com>
Linux Kernel <firstname.lastname@example.org>,
Matt Corallo <email@example.com>,
Rob Herring <firstname.lastname@example.org>,
Neil Armstrong <email@example.com>,
Kevin Hilman <firstname.lastname@example.org>,
Jerome Brunet <email@example.com>,
Kishon Vijay Abraham I <firstname.lastname@example.org>,
Vinod Koul <email@example.com>,
Emiliano Ingrassia <firstname.lastname@example.org>,
Subject: Re: [PATCHv2 1/4] ARM: dts: meson8b: odroidc1: Add usb phy power node
Date: Sun, 18 Jul 2021 16:01:34 +0200 [thread overview]
Message-ID: <CAFBinCCGA0b=LVjbQood+iN+DHLodY0RJ-GrSOcgdzrDFJ25pQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4263 bytes --]
On Sun, Jul 18, 2021 at 3:29 PM Anand Moon <email@example.com> wrote:
> Hi Martin,
> Thanks for your valuable feedback,
> On Sun, 18 Jul 2021 at 17:07, Martin Blumenstingl
> <firstname.lastname@example.org> wrote:
> > Hi Anand,
> > On Sun, Jul 18, 2021 at 5:38 AM Anand Moon <email@example.com> wrote:
> > [...]
> > > > > enable input power to USB ports, set it to Active Low.
> > > > >
> > > > > [ 1.253149] phy phy-c1108820.phy.0: Looking up phy-supply from device tree
> > > > > [ 1.253166] phy phy-c1108820.phy.0: Looking up phy-supply property
> > > > > in node /soc/cbus@c1100000/phy@8820 failed
> > > > high prio:
> > > > Can you please describe how I can test this patch?
> > > > My concern is that previously I have tested your patch with ACTIVE_LOW
> > > > and ACTIVE_HIGH polarity.
> > > > In both cases USB is working and I cannot observe any change (apart
> > > > from this debug message being gone).
> > > >
> > > > In the Odroid-C1 schematics (page 1) GPIOAO.BIT5 is connected to USB_OTG *only*.
> > > > I cannot give my Acked-/Reviewed-/Tested-by without a description of
> > > > how I can actually test the GPIO potion of this patch.
> > This question is still open.
> > Even with all your explanations below I am missing a way to verify if
> > GPIOAO_5 is the correct GPIO to use.
> From the schematics 
> You could find references to PWREN <--- GPIOAO.BIT5
> The second reference is USB HOST Power Switch
> The third reference is USB HOST POWER.
> Hope I am clean in my thought process now.
Can you please point out the page numbers for me?
What I am seeing on page 1 is:
GPIOAO_5 (called GPIOAO.BIT5) is connected as an INPUT to the USB_OTG
PWREN signal (that's the green box with the label "USB_OTG.SchDoc"
Below (still on page 1) there's a whole section for
USB_HOST_PWR_SW.SchDoc and USB_HUB_GL852G-OHG.SchDoc.
This box also uses a PWREN signal, but from my understanding it's a
- PWREN in this area is an OUTPUT on the USB hub
(USB_HUB_GL852G-OHG.SchDoc). This is confirmed by the PWREN signals on
page 14 of the GL852 datasheet: 
- Then PWREN is an INPUT for the overcurrent switches (USB_HOST_PWR_SW.SchDoc)
This section does not mention GPIOAO_5 (or GPIOAO.BIT5) at all.
For better illustration I have attached a screenshot with some
annotations from the schematics.
This is how I understand the whole USB setup.
This doesn't mean that I am right though.
> > Technically I can write a patch that makes GPIOAO_13 (which is
> > connected to the status LED) show up as being used by
> > regulator-usb-pwr-en in debugfs.
> Yep, you are correct, If I used GPIOAO_13 wrong pin, it will not
> enable the USB power. See below.
> [alarm@archl-c1e ~]$ sudo cat /sys/kernel/debug/gpio | grep usb
> gpio-1953 (USB_HUB_RST_N |usb-hub-reset ) out hi
Did you also delete the "leds" node from meson8b-odroidc1.dts?
> > So for new .dts support phy-supply should not be used anymore for VBUS
> > because phy-supply (described as "Phandle to a regulator that provides
> > power to the PHY." in
> > Documentation/devicetree/bindings/phy/phy-bindings.txt) and
> > vbus-supply are two different things.
> It just came to my notice your email on this issue sees below.
>  https://firstname.lastname@example.org/
>  https://patchwork.kernel.org/patch/10868515/
>  https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=d8b475212bbf9e5f80c1c923a9701dca5ceb23e2
> From the openwrt commit d8b475212bbf9e5f80c1c923a9701dca5ceb23e2
> and binding yaml 
> USB DWC2 power is linked to vbus-supply, so it should be moved to usb node.
> Now I am getting your point correctly.
Yes, I think we're now on the same page on this topic
I totally forgot about some of these patches - great that you found
them and added them here for further documentation of this topic!
[-- Attachment #2: odroidc1-usb-pwren.png --]
[-- Type: image/png, Size: 123552 bytes --]
next prev parent reply other threads:[~2021-07-18 14:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-16 10:36 [PATCHv2 0/4] Meson-8b and Meson-gxbb Fix some missing code Anand Moon
2021-07-16 10:36 ` [PATCHv2 1/4] ARM: dts: meson8b: odroidc1: Add usb phy power node Anand Moon
2021-07-17 19:46 ` Martin Blumenstingl
2021-07-18 3:38 ` Anand Moon
2021-07-18 11:37 ` Martin Blumenstingl
2021-07-18 13:29 ` Anand Moon
2021-07-18 14:01 ` Martin Blumenstingl [this message]
2021-07-18 19:09 ` Martin Blumenstingl
2021-08-04 21:58 ` Martin Blumenstingl
2021-08-05 18:18 ` Anand Moon
2021-08-13 19:35 ` Anand Moon
2021-07-16 10:36 ` [PATCHv2 2/4] arm64: dts: amlogic: odroidc2: Fix the chip enable signal for usb power Anand Moon
2021-07-17 19:59 ` Martin Blumenstingl
2021-07-16 10:36 ` [PATCHv2 3/4] phy: amlogic: meson8b-usb2: Power off the PHY by putting it into reset mode Anand Moon
2021-07-16 10:36 ` [PATCHv2 4/4] phy: amlogic: meson8b-usb2: don't log an error on -EPROBE_DEFER Anand Moon
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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).