Re: [PATCH v2 09/11] cpufreq: scmi: Add support to parse domain-id using #power-domain-cells

From: Ulf Hansson
Date: Mon Aug 21 2023 - 10:23:52 EST


On Wed, 26 Jul 2023 at 13:20, Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote:
>
> On Fri, 21 Jul 2023 at 16:37, Rob Herring <robh@xxxxxxxxxx> wrote:
> >
> > On Fri, Jul 21, 2023 at 01:52:17PM +0200, Ulf Hansson wrote:
> > > On Wed, 19 Jul 2023 at 17:24, Sudeep Holla <sudeep.holla@xxxxxxx> wrote:
> > > >
> > > > On Thu, Jul 13, 2023 at 04:17:36PM +0200, Ulf Hansson wrote:
> > > > > The performance domain-id can be described in DT using the power-domains
> > > > > property or the clock property. The latter is already supported, so let's
> > > > > add support for the power-domains too.
> > > > >
> > > >
> > > > How is this supposed to work for the CPUs ? The CPU power domains are
> > > > generally PSCI on most of the platforms and the one using OSI explicitly
> > > > need to specify the details while ones using PC will not need to. Also they
> > > > can never be performance domains too. So I am not sure if I am following this
> > > > correctly.
> > >
> > > Your concerns are certainly correct, I completely forgot about this.
> > > We need to specify what power-domain index belongs to what, by using
> > > power-domain-names in DT. So a CPU node, that has both psci for power
> > > and scmi for performance would then typically look like this:
> > >
> > > power-domains = <&CPU_PD0>, <&scmi_dvfs 4>;
> > > power-domain-names = "psci", "scmi";
> >
> > That is completely backwards. Entries are named based on the consumer
> > side. The function of each clock or interrupt for example. Here your
> > entries are based on the provider which should be opaque to the
> > consumer.
>
> Okay, so you would rather prefer something along the lines of the below?
>
> power-domain-names = "power", "perf";
>
> The "psci" name is already part of the current cpus DT binding
> (Documentation/devicetree/bindings/arm/cpus.yaml), so then it looks
> like that deserves an update too. Right?

Rob, may I have your thoughts around this? Is this an acceptable way
forward? Please advise me on what power-domain-names I should use
then.

Or, if you are insisting on using the performance-domain bindings?

Kind regards
Uffe