From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Stephan Gerhold <stephan@gerhold.net>
Cc: Loic Poulain <loic.poulain@linaro.org>,
agross@kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] arch: arm64: dts: apq8016-dbc: Add missing cpu opps
Date: Thu, 2 Apr 2020 18:31:19 -0700 [thread overview]
Message-ID: <20200403013119.GB20625@builder.lan> (raw)
In-Reply-To: <20200402081349.GA932@gerhold.net>
On Thu 02 Apr 01:13 PDT 2020, Stephan Gerhold wrote:
> Hi,
>
> On Wed, Apr 01, 2020 at 07:50:59PM +0200, Loic Poulain wrote:
> > The highest cpu frequency opps have been dropped because CPR is not
> > supported. However, we can simply specify operating voltage so that
> > they match the max corner voltages for each freq. With that, we can
> > support up to 1.36Ghz. Ideally, msm8916 CPR should be implemented to
> > fine tune operating voltages and optimize power consumption.
>
> Thanks for the patch! I was wondering how to enable the higher CPU
> frequencies for a while now...
>
> I was actually quite excited to see CPR being mainlined for QCS404.
> If we are trying to add such a workaround (rather than CPR) for MSM8916
> now, does that mean it's unlikely to see CPR working for MSM8916
> anytime soon?
>
> AFAICT, there is a WIP branch from Niklas Cassel here:
> https://git.linaro.org/people/nicolas.dechesne/niklas.cassel/kernel.git/log/?h=cpr-msm8916-mainline
> but it hasn't been updated for a while. (Not sure if it was working
> already...)
>
> Can someone explain what is missing to make CPR work for MSM8916?
>
CPR needs to control 3 things; VDD_APC, VDD_MX and MEMACC. On QCS404 it
seems we don't have to adjust VDD_MX, so the code for this is missing
from the driver.
So, afaict, what's missing is that rpmpd.c needs to gain support for
8916, then the CPR driver needs to gain a cpr_acc_desc and compatible
for 8916, it needs to reference the VDDMX power domain and before/after
we're adjusting the corner of the CPR we need to adjust the MX according
to the mapping specified in the downstream kernel (i.e. 1->4, 2->5 and
3->7).
Unfortunately, the requirement that VDDMX (VDD_MEM I presume) must be
higher than VDD_APC most likely needs to be taken into consideration for
Loic's proposed static voltage scaling as well. Unless VDD_MEM is left
in Turbo mode from the boot loader I think we need to take VDDMX to
corner 7 for speeds 998MHz and above (i.e. where we pull VDD_APC to
1.35V).
Regards,
Bjorn
> One other minor comment/question below.
>
> >
> > This patch:
> > - Adds missing opps and corresponding target voltages to msm8916.dtsi.
> > - Adds cpu-supply to apq8016-sbc.dtsi (board level info).
> > - Adds pm8916 spmi regulator node to pm8916.dtsi.
> >
> > Tested with a dragonboard-410c.
> >
> > Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> > ---
> > arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 24 ++++++++++++++++++++++++
> > arch/arm64/boot/dts/qcom/msm8916.dtsi | 24 ++++++++++++++++++++++++
> > arch/arm64/boot/dts/qcom/pm8916.dtsi | 6 ++++++
> > 3 files changed, 54 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> > index 037e26b..f1c1216 100644
> > --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> > @@ -560,6 +560,30 @@
> > qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
> > };
> >
> > +&spm_regulators {
> > + vdd_cpu: s2 {
> > + regulator-always-on;
> > + regulator-min-microvolt = <1050000>;
> > + regulator-max-microvolt = <1350000>;
> > + };
> > +};
> > +
> > +&CPU0 {
> > + cpu-supply = <&vdd_cpu>;
> > +};
> > +
> > +&CPU1 {
> > + cpu-supply = <&vdd_cpu>;
> > +};
> > +
> > +&CPU2 {
> > + cpu-supply = <&vdd_cpu>;
> > +};
> > +
> > +&CPU3 {
> > + cpu-supply = <&vdd_cpu>;
> > +};
> > +
>
> I'm a bit confused about the separation here. The cpu-supply is defined
> in the board-specific device tree, yet the voltages are set in the
> common device tree below.
>
> Is it even possible that the CPU is supplied by something other than S2
> and if yes, how likely is this?
>
> I'm asking because I have two other MSM8916 devices in mainline
> (and a few more pending upstreaming), and it seems like I would need to
> duplicate this into each of them.
>
> Thanks,
> Stephan
>
> > &smd_rpm_regulators {
> > vdd_l1_l2_l3-supply = <&pm8916_s3>;
> > vdd_l5-supply = <&pm8916_s3>;
> > diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
> > index 9f31064..9805af0 100644
> > --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
> > @@ -342,15 +342,39 @@
> >
> > opp-200000000 {
> > opp-hz = /bits/ 64 <200000000>;
> > + opp-microvolt = <1050000>;
> > };
> > opp-400000000 {
> > opp-hz = /bits/ 64 <400000000>;
> > + opp-microvolt = <1050000>;
> > + };
> > + opp-533330000 {
> > + opp-hz = /bits/ 64 <533330000>;
> > + opp-microvolt = <1150000>;
> > };
> > opp-800000000 {
> > opp-hz = /bits/ 64 <800000000>;
> > + opp-microvolt = <1150000>;
> > };
> > opp-998400000 {
> > opp-hz = /bits/ 64 <998400000>;
> > + opp-microvolt = <1350000>;
> > + };
> > + opp-1094400000 {
> > + opp-hz = /bits/ 64 <1094400000>;
> > + opp-microvolt = <1350000>;
> > + };
> > + opp-1152000000 {
> > + opp-hz = /bits/ 64 <1152000000>;
> > + opp-microvolt = <1350000>;
> > + };
> > + opp-1209600000 {
> > + opp-hz = /bits/ 64 <1209600000>;
> > + opp-microvolt = <1350000>;
> > + };
> > + opp-1363200000 {
> > + opp-hz = /bits/ 64 <1363200000>;
> > + opp-microvolt = <1350000>;
> > };
> > };
> >
> > diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi
> > index 0bcdf04..c9b9c4f 100644
> > --- a/arch/arm64/boot/dts/qcom/pm8916.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi
> > @@ -157,5 +157,11 @@
> > vdd-micbias-supply = <&pm8916_l13>;
> > #sound-dai-cells = <1>;
> > };
> > +
> > + spm_regulators: spm_regulators {
> > + compatible = "qcom,pm8916-regulators";
> > + #address-cells = <1>;
> > + #size-cells = <1>;
> > + };
> > };
> > };
> > --
> > 2.7.4
> >
next prev parent reply other threads:[~2020-04-03 1:31 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 17:50 [PATCH] arch: arm64: dts: apq8016-dbc: Add missing cpu opps Loic Poulain
2020-04-01 23:46 ` Bjorn Andersson
2020-04-02 8:13 ` Stephan Gerhold
2020-04-02 9:58 ` Loic Poulain
2020-04-03 1:31 ` Bjorn Andersson [this message]
2020-04-03 10:09 ` Stephan Gerhold
2020-04-03 18:00 ` Stephan Gerhold
2020-04-23 4:55 ` Bjorn Andersson
2020-04-26 12:31 ` Stephan Gerhold
2020-05-06 21:18 ` Stephan Gerhold
2020-05-07 5:34 ` Bjorn Andersson
2020-05-08 12:08 ` Ulf Hansson
2020-05-08 13:42 ` Stephan Gerhold
2020-05-11 5:29 ` Viresh Kumar
2020-05-07 10:46 ` Stephan Gerhold
2020-05-21 19:18 ` Stephan Gerhold
2020-05-23 12:08 ` Stephan Gerhold
2020-05-27 20:47 ` Georgi Djakov
2020-05-25 15:32 ` Niklas Cassel
2020-05-25 16:36 ` Stephan Gerhold
2020-05-25 19:44 ` Niklas Cassel
2020-05-26 8:59 ` Stephan Gerhold
2020-05-26 15:54 ` Niklas Cassel
2020-05-26 20:54 ` Stephan Gerhold
2020-05-27 10:39 ` Niklas Cassel
2020-05-27 12:04 ` Stephan Gerhold
2020-05-27 12:59 ` Niklas Cassel
2020-05-27 20:56 ` Stephan Gerhold
2020-05-27 23:10 ` Niklas Cassel
2020-05-28 13:32 ` Stephan Gerhold
2020-05-28 4:44 ` Viresh Kumar
2020-04-28 20:04 ` Amit Kucheria
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=20200403013119.GB20625@builder.lan \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=loic.poulain@linaro.org \
--cc=stephan@gerhold.net \
/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).