Re: [PATCH v5 1/2] dt-bindings: cpufreq: add virtual cpufreq device

From: Viresh Kumar
Date: Mon Feb 05 2024 - 03:38:53 EST


On 02-02-24, 09:53, Rob Herring wrote:
> On Wed, Jan 31, 2024 at 10:23:03AM -0800, Saravana Kannan wrote:
> > We also need the OPP tables to indicate which CPUs are part of the
> > same cluster, etc. Don't want to invent a new "protocol" and just use
> > existing DT bindings.
>
> Topology binding is for that.

This one, right ?

Documentation/devicetree/bindings/dvfs/performance-domain.yaml

> You need per CPU Fmax, sure. But all the frequencies? I don't follow why
> you don't just have a max available capacity and then request the
> desired capacity. Then the host maps that to an underlying OPP. Why have
> an intermediate set of fake frequencies?

+1

> As these are normalized, I guess you are normalizing for capacity as
> well? Or you are using "capacity-dmips-mhz"?
>
> I'm also lost how this would work when you migrate and the underlying
> CPU changes. The DT is fixed.
>
> > > Also, we have "opp-level" for opaque values that aren't Hz.
> >
> > Still want to keep it Hz to be compatible with arch_freq_scale and
> > when virtualized CPU perf counters are available.

These are all specific to a driver only, that can be handled easily I guess. I
don't see a value to using Hz for this to be honest.

--
viresh