linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Clément Péron" <peron.clem@gmail.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: devicetree <devicetree@vger.kernel.org>,
	Chen-Yu Tsai <wens@csie.org>, Maxime Ripard <mripard@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-sunxi <linux-sunxi@googlegroups.com>,
	Rob Herring <robh+dt@kernel.org>, Piotr Oniszczuk <warpme@o2.pl>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [linux-sunxi] Re: [PATCH v2] arm64: dts: allwinner: h6: Use dummy regulator for Tanix TX6
Date: Tue, 28 Apr 2020 18:23:35 +0200	[thread overview]
Message-ID: <CAJiuCcco0d_UoWeHqh6oc0rFNAMFynXjLRQ6APsT0WBh7m+GQg@mail.gmail.com> (raw)
In-Reply-To: <98246e5d-ebef-bcb5-f0b8-d74b3834b835@arm.com>

Hi Robin,

On Tue, 28 Apr 2020 at 17:21, Robin Murphy <robin.murphy@arm.com> wrote:
>
> On 2020-04-28 3:26 pm, Clément Péron wrote:
> > Tanix TX6 has a fixed regulator. As DVFS is instructed to change
> > voltage to meet OPP table, the DVFS is not working as expected.
>
> Hmm, isn't that really a bug in the DVFS code? I guess it's just blindly
> propagating -EINVAL from the fixed regulators not implementing
> set_voltage, but AFAICS it has no real excuse not to be cleverer and
> still allow switching frequency as long as the voltage *is* high enough
> for the given OPP. I wonder how well it works if the regulator is
> programmable but shared with other consumers... that case probably can't
> be hacked around in DT.

Like you, I thought that the DVFS was clever enough to understand this
but guess not..

Maybe they are some cases where you don't want to leave the voltage high and
reduce the frequency. But I don't know such case.

Regards,
Clement




>
> Robin.
>
> > Avoid to introduce a new dedicated OPP Table where voltage are
> > equals to the fixed regulator as it will only duplicate all the OPPs.
> > Instead remove the fixed regulator so the DVFS framework will create
> > dummy regulator and will have the same behavior.
> >
> > Add some comments to explain this in the device-tree.
> >
> > Reported-by: Piotr Oniszczuk <warpme@o2.pl>
> > Fixes: add1e27fb703 ("arm64: dts: allwinner: h6: Enable CPU opp tables for Tanix TX6")
> > Signed-off-by: Clément Péron <peron.clem@gmail.com>
> > ---
> >   .../boot/dts/allwinner/sun50i-h6-tanix-tx6.dts | 18 ++++++++++++++++--
> >   1 file changed, 16 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
> > index be81330db14f..3e96fcb317ea 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
> > @@ -48,7 +48,15 @@
> >   };
> >
> >   &cpu0 {
> > -     cpu-supply = <&reg_vdd_cpu_gpu>;
> > +     /*
> > +      * Don't specify the CPU regulator, as it's a fixed
> > +      * regulator DVFS will not work as it is intructed
> > +      * to reach a voltage which can't be reached.
> > +      * Not specifying a regulator will create a dummy
> > +      * regulator allowing all OPPs.
> > +      *
> > +      * cpu-supply = <&reg_vdd_cpu_gpu>;
> > +      */
> >   };
> >
> >   &de {
> > @@ -68,7 +76,13 @@
> >   };
> >
> >   &gpu {
> > -     mali-supply = <&reg_vdd_cpu_gpu>;
> > +     /*
> > +      * Don't specify the GPU regulator, see comment
> > +      * above for the CPU supply.
> > +      *
> > +      * mali-supply = <&reg_vdd_cpu_gpu>;
> > +      */
> > +
> >       status = "okay";
> >   };
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/98246e5d-ebef-bcb5-f0b8-d74b3834b835%40arm.com.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-04-28 16:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 14:26 [PATCH v2] arm64: dts: allwinner: h6: Use dummy regulator for Tanix TX6 Clément Péron
2020-04-28 14:30 ` Clément Péron
2020-04-28 15:21 ` Robin Murphy
2020-04-28 16:23   ` Clément Péron [this message]
2020-04-28 16:45     ` [linux-sunxi] " Maxime Ripard
2020-04-30 13:48       ` Clément Péron
2020-05-04 16:40         ` Maxime Ripard
2020-05-04 12:27 ` [linux-sunxi] " Ondřej Jirman
2020-05-04 19:34   ` Clément Péron

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=CAJiuCcco0d_UoWeHqh6oc0rFNAMFynXjLRQ6APsT0WBh7m+GQg@mail.gmail.com \
    --to=peron.clem@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=mripard@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=warpme@o2.pl \
    --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 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).