Message ID | 20250403-dt-cpu-schema-v1-9-076be7171a85@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Arm cpu schema clean-ups | expand |
On Fri, 4 Apr 2025 at 05:02, Rob Herring (Arm) <robh@kernel.org> wrote: > > "rpmhpd" is not documented nor used anywhere. As the enable-method is > "psci" use "psci" for the power-domain name. > > Signed-off-by: Rob Herring (Arm) <robh@kernel.org> > --- > arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 2 +- > arch/arm/boot/dts/qcom/qcom-sdx65.dtsi | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi > index 39530eb580ea..64d9858b4248 100644 > --- a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi > +++ b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi > @@ -57,7 +57,7 @@ cpu0: cpu@0 { > enable-method = "psci"; > clocks = <&apcs>; > power-domains = <&rpmhpd SDX55_CX>; > - power-domain-names = "rpmhpd"; > + power-domain-names = "psci"; As I understand it, this isn't for cpu-power-mgmt but for cpu-performance-scaling. I have been thinking of adding a common power-domain-name for this, but never reached to do it. I think the last one we added was the Airoha SoC [1] which uses "perf", which seems to be the most common one. Still I don't see that being documented. > operating-points-v2 = <&cpu_opp_table>; > }; > }; > diff --git a/arch/arm/boot/dts/qcom/qcom-sdx65.dtsi b/arch/arm/boot/dts/qcom/qcom-sdx65.dtsi > index 6b23ee676c9e..bfd04e53c5a8 100644 > --- a/arch/arm/boot/dts/qcom/qcom-sdx65.dtsi > +++ b/arch/arm/boot/dts/qcom/qcom-sdx65.dtsi > @@ -58,7 +58,7 @@ cpu0: cpu@0 { > enable-method = "psci"; > clocks = <&apcs>; > power-domains = <&rpmhpd SDX65_CX_AO>; > - power-domain-names = "rpmhpd"; > + power-domain-names = "psci"; Ditto. > operating-points-v2 = <&cpu_opp_table>; > }; > }; > > -- > 2.47.2 > > Kind regards Uffe [1] drivers/cpufreq/airoha-cpufreq.c Documentation/devicetree/bindings/cpufreq/airoha,en7581-cpufreq.yaml drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c
On Fri, Apr 4, 2025 at 5:31 AM Ulf Hansson <ulf.hansson@linaro.org> wrote: > > On Fri, 4 Apr 2025 at 05:02, Rob Herring (Arm) <robh@kernel.org> wrote: > > > > "rpmhpd" is not documented nor used anywhere. As the enable-method is > > "psci" use "psci" for the power-domain name. > > > > Signed-off-by: Rob Herring (Arm) <robh@kernel.org> > > --- > > arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 2 +- > > arch/arm/boot/dts/qcom/qcom-sdx65.dtsi | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi > > index 39530eb580ea..64d9858b4248 100644 > > --- a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi > > +++ b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi > > @@ -57,7 +57,7 @@ cpu0: cpu@0 { > > enable-method = "psci"; > > clocks = <&apcs>; > > power-domains = <&rpmhpd SDX55_CX>; > > - power-domain-names = "rpmhpd"; > > + power-domain-names = "psci"; > > As I understand it, this isn't for cpu-power-mgmt but for > cpu-performance-scaling. > > I have been thinking of adding a common power-domain-name for this, > but never reached to do it. I think the last one we added was the > Airoha SoC [1] which uses "perf", which seems to be the most common > one. Still I don't see that being documented. It's all a mess and abuse of the power-domains binding... "perf" is documented. I can add "rpmhpd" I suppose, but I don't see anything using the name. Or I can remove it. Rob
On 4/4/25 4:59 AM, Rob Herring (Arm) wrote: > "rpmhpd" is not documented nor used anywhere. As the enable-method is > "psci" use "psci" for the power-domain name. > > Signed-off-by: Rob Herring (Arm) <robh@kernel.org> > --- "psci" is what we want here, but these platforms require some more massaging.. These SoCs don't seem to have any PSCI idle states (deeper than WFI) described, which is no bueno, as they support some.. I'll try to improve this. Konrad
On Fri, 4 Apr 2025 at 22:41, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote: > > On 4/4/25 4:59 AM, Rob Herring (Arm) wrote: > > "rpmhpd" is not documented nor used anywhere. As the enable-method is > > "psci" use "psci" for the power-domain name. > > > > Signed-off-by: Rob Herring (Arm) <robh@kernel.org> > > --- > > "psci" is what we want here, but these platforms require some more > massaging.. So this isn't for CPU performance scaling? > > These SoCs don't seem to have any PSCI idle states (deeper than WFI) > described, which is no bueno, as they support some.. If PSCI PC mode is the only supported CPU suspend mode, we don't need the power-domain topology to be described in DT as it's optional to use. Is this a PC or OSI based platform? > > I'll try to improve this. > > Konrad > Kind regards Uffe
On 4/7/25 6:27 PM, Ulf Hansson wrote: > On Fri, 4 Apr 2025 at 22:41, Konrad Dybcio > <konrad.dybcio@oss.qualcomm.com> wrote: >> >> On 4/4/25 4:59 AM, Rob Herring (Arm) wrote: >>> "rpmhpd" is not documented nor used anywhere. As the enable-method is >>> "psci" use "psci" for the power-domain name. >>> >>> Signed-off-by: Rob Herring (Arm) <robh@kernel.org> >>> --- >> >> "psci" is what we want here, but these platforms require some more >> massaging.. > > So this isn't for CPU performance scaling? Nope! > >> >> These SoCs don't seem to have any PSCI idle states (deeper than WFI) >> described, which is no bueno, as they support some.. > > If PSCI PC mode is the only supported CPU suspend mode, we don't need > the power-domain topology to be described in DT as it's optional to > use. > > Is this a PC or OSI based platform? Unfortunately it seems like only PC mode is implemented. Konrad
On Wed, Apr 09, 2025 at 08:35:29PM +0200, Konrad Dybcio wrote: > On 4/7/25 6:27 PM, Ulf Hansson wrote: > > On Fri, 4 Apr 2025 at 22:41, Konrad Dybcio > > <konrad.dybcio@oss.qualcomm.com> wrote: > >> > >> On 4/4/25 4:59 AM, Rob Herring (Arm) wrote: > >>> "rpmhpd" is not documented nor used anywhere. As the enable-method is > >>> "psci" use "psci" for the power-domain name. > >>> > >>> Signed-off-by: Rob Herring (Arm) <robh@kernel.org> > >>> --- > >> > >> "psci" is what we want here, but these platforms require some more > >> massaging.. > > > > So this isn't for CPU performance scaling? > > Nope! > Huh, this is definitely "perf" (= cpufreq) and not "psci" (= cpuidle). If you run blame on this line you get to: commit 0ec7bde7b590f8efa5823df3b52b32dd373060ff Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Date: Thu Apr 8 22:34:45 2021 +0530 ARM: dts: qcom: sdx55: Add CPUFreq support Add CPUFreq support to SDX55 platform using the cpufreq-dt driver. There is no dedicated hardware block available on this platform to carry on the CPUFreq duties. Hence, it is accomplished using the CPU clock and regulators tied together by the operating points table. https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0ec7bde7b590f8efa5823df3b52b32dd373060ff The OPP table looks like it's supposed to set SDX55_CX performance states according to the chosen CPU frequency. MSM8909 has a similar setup where the CPU is supplied directly by VDDCX and we describe that with "perf" too [1]. What I don't understand is why the name "rpmhpd" does not appear in any driver. The MSM8909 setup goes via qcom-cpufreq-nvmem, where "perf" is directly assigned for cpufreq scaling. I can only think of two possible reasons: - The power domain is implicitly attached to the OPP table(?), because there is just a single power domain defined on the CPU, or - This was never working correctly. For both cases, I think it would be best to change the power domain name to "perf" like Uffe suggested. Thanks, Stephan [1]: https://lore.kernel.org/linux-pm/20231018-msm8909-cpufreq-v2-0-0962df95f654@kernkonzept.com/
On 4/10/25 9:10 AM, Stephan Gerhold wrote: > On Wed, Apr 09, 2025 at 08:35:29PM +0200, Konrad Dybcio wrote: >> On 4/7/25 6:27 PM, Ulf Hansson wrote: >>> On Fri, 4 Apr 2025 at 22:41, Konrad Dybcio >>> <konrad.dybcio@oss.qualcomm.com> wrote: >>>> >>>> On 4/4/25 4:59 AM, Rob Herring (Arm) wrote: >>>>> "rpmhpd" is not documented nor used anywhere. As the enable-method is >>>>> "psci" use "psci" for the power-domain name. >>>>> >>>>> Signed-off-by: Rob Herring (Arm) <robh@kernel.org> >>>>> --- >>>> >>>> "psci" is what we want here, but these platforms require some more >>>> massaging.. >>> >>> So this isn't for CPU performance scaling? >> >> Nope! >> > > Huh, this is definitely "perf" (= cpufreq) and not "psci" (= cpuidle). > If you run blame on this line you get to: > > commit 0ec7bde7b590f8efa5823df3b52b32dd373060ff > Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> > Date: Thu Apr 8 22:34:45 2021 +0530 > > ARM: dts: qcom: sdx55: Add CPUFreq support > > Add CPUFreq support to SDX55 platform using the cpufreq-dt driver. > There is no dedicated hardware block available on this platform to > carry on the CPUFreq duties. Hence, it is accomplished using the CPU > clock and regulators tied together by the operating points table. > > https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0ec7bde7b590f8efa5823df3b52b32dd373060ff > > The OPP table looks like it's supposed to set SDX55_CX performance > states according to the chosen CPU frequency. MSM8909 has a similar > setup where the CPU is supplied directly by VDDCX and we describe that > with "perf" too [1]. Ohh right I was under the impression that qcom,cpufreq-hw is used on those too, but apparently not.. Konrad
diff --git a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi index 39530eb580ea..64d9858b4248 100644 --- a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi +++ b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi @@ -57,7 +57,7 @@ cpu0: cpu@0 { enable-method = "psci"; clocks = <&apcs>; power-domains = <&rpmhpd SDX55_CX>; - power-domain-names = "rpmhpd"; + power-domain-names = "psci"; operating-points-v2 = <&cpu_opp_table>; }; }; diff --git a/arch/arm/boot/dts/qcom/qcom-sdx65.dtsi b/arch/arm/boot/dts/qcom/qcom-sdx65.dtsi index 6b23ee676c9e..bfd04e53c5a8 100644 --- a/arch/arm/boot/dts/qcom/qcom-sdx65.dtsi +++ b/arch/arm/boot/dts/qcom/qcom-sdx65.dtsi @@ -58,7 +58,7 @@ cpu0: cpu@0 { enable-method = "psci"; clocks = <&apcs>; power-domains = <&rpmhpd SDX65_CX_AO>; - power-domain-names = "rpmhpd"; + power-domain-names = "psci"; operating-points-v2 = <&cpu_opp_table>; }; };
"rpmhpd" is not documented nor used anywhere. As the enable-method is "psci" use "psci" for the power-domain name. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> --- arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 2 +- arch/arm/boot/dts/qcom/qcom-sdx65.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)