All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Samuel Holland <samuel@sholland.org>, Harald Geyer <harald@ccbib.org>
Cc: Chen-Yu Tsai <wens@csie.org>,
	linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org,
	Torsten Duwe <duwe@suse.de>
Subject: Re: Re: [PATCH] arm64: dts: allwinner: teres-i: Add GPIO port regulators
Date: Mon, 25 Apr 2022 18:28:35 +0200	[thread overview]
Message-ID: <5259899.Sb9uPGUboI@kista> (raw)
In-Reply-To: <462969fd722eec45aa5f142de48b7fbd@ccbib.org>

Hi Harald!

Dne ponedeljek, 25. april 2022 ob 13:01:54 CEST je Harald Geyer napisal(a):
> On 24.04.2022 03:56, Samuel Holland wrote:
> > On 4/15/22 11:56 AM, Harald Geyer wrote:
> >> Allwinner A64 SoC has separate supplies for PC, PD, PE, PG and PL.
> >>
> >> Usually supplies are linked via the 'regulator-name' property of
> >> regulator nodes. However when regulators are shared we need to
> >> declare the additional links in the pinctrl node.
> >>
> >> Signed-off-by: Harald Geyer <harald@ccbib.org>
> >
> > I'm curious if this solved an issue for you, or if this is just for 
> > accuracy.
> > Both of these regulators have the regulator-always-on property, so
> > they should have been enabled already.
> 
> You are right, there shouldn't be any change in functionality. It is 
> mostly
> for extra correctness. However the pincontrol driver started spewing 
> lot's
> of warnings about missing regulator nodes a few versions back. The 
> visible
> effect of this change is to silence those warnings. Also make the DTS 
> more
> future proof in case the driver is made even more picky in the future.
> 
> > If it's the latter reason, why not add the other
> > ports? Regardless:
> 
> PD, PE and PL have dedicated regulators, that can be matched via the
> 'regulator-name' property. I didn't want to specify the same 
> information
> in two places.

"regulator-name" is only a label, while phandle is actual regulator reference 
that can be used by the driver. While DT files reside in Linux kernel source, 
they are used by other OSes and bootloaders, so you can't really assume what 
is good or not just by judging based on Linux behaviour. So please add PD and 
PL regulators too.

> 
> For the PF supply, I couldn't find any connection information in the
> board schematic. I could have added a dummy regulator. But since there 
> is
> only one warning about pf-supply during driver initialization and not 
> the
> dozens of warnings I see about PC and PG, I figured, I'd rather not add
> information of dubious use or qualiy.

You mean PE right? There is no PF supply on A64. Anyway, if it's not on 
schematic, it can be assumed unconnected and thus you shouldn't define that 
property. Messages like "using dummy regulator" are fine in such cases .

There is no issue of "dubious quality" if schematic is clear. Also don't worry 
about usefulness. DT files are hardware description files. They should reflect 
hardware configuration, no matter how useful information seems.

FYI, information in this case is useful to the driver. If you check sunxi 
pinctrl driver, you can see that port bias is set according to regulator 
voltage.

Best regards,
Jernej

> 
> best regards,
> Harald
> 
> 
> > Reviewed-by: Samuel Holland <samuel@sholland.org>
> >
> >> ---
> >>  arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts | 5 +++++
> >>  1 file changed, 5 insertions(+)
> >>
> >> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts 
> >> b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
> >> index aff0660b899c..cc316ef2e2d6 100644
> >> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
> >> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
> >> @@ -197,6 +197,11 @@ &ohci1 {
> >>  	status = "okay";
> >>  };
> >>
> >> +&pio {
> >> +	vcc-pc-supply = <&reg_dcdc1>;
> >> +	vcc-pg-supply = <&reg_aldo2>;
> >> +};
> >> +
> >>  &pwm {
> >>  	status = "okay";
> >>  };
> >>
> 
> 



  reply	other threads:[~2022-04-25 16:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-15 16:56 [PATCH] arm64: dts: allwinner: teres-i: Add GPIO port regulators Harald Geyer
2022-04-24  2:56 ` Samuel Holland
2022-04-25 11:01   ` Harald Geyer
2022-04-25 16:28     ` Jernej Škrabec [this message]
2022-04-26  4:05       ` Samuel Holland
2022-04-26 14:21         ` Harald Geyer
2022-04-27 17:35           ` Samuel Holland

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=5259899.Sb9uPGUboI@kista \
    --to=jernej.skrabec@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=duwe@suse.de \
    --cc=harald@ccbib.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=samuel@sholland.org \
    --cc=wens@csie.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.