Re: [PATCH v2 1/2] dt-bindings: devfreq: Document support for Airoha Subsystem Scale
From: Christian Marangi (Ansuel)
Date: Fri Oct 09 2026 - 11:18:48 EST
Il giorno ven 9 ott 2026 alle ore 17:06 Conor Dooley
<conor@xxxxxxxxxx> ha scritto:
>
> On Fri, Oct 09, 2026 at 09:33:28AM +0200, Christian Marangi wrote:
> > Airoha SoC contains multiple subsystems that are scaled to a
> > specific OPP taking the CPU clock as reference. Such subsystem
> > can enter idle or performance state based on the system load
> > and power consumption conditions.
> >
> > Example of such subsystems are GSW (Gigabit Switch), NPU (Custom
> > Risc Co-Processor for Network acceleration), SOE (Crypto Module) BUS...
>
> The device you document here does not appear to exist at all, since it
> just consumes a clock without any registers or anything. Why can't these
> operating points be added to the actual consumers: the switch, the npu,
> or event the bus itself in one case. In the bus case, I think that's
> exactly what simple-pm-bus does?
>
Can the consumer be registered as a devfreq with all the other thing?
Isn't that problematic?
Also one big problem is that some subsystem are used internally.
Example SOE and BUS. (and also NPU)
How those can be configured to follow the CPU frequency and
use the required-opp and opp?
> >
> > Document all the required property and provide examples for the various
> > subsystem OPP + subsystem scale nodes.
> >
> > Signed-off-by: Christian Marangi <ansuelsmth@xxxxxxxxx>
> > ---
> > .../devfreq/airoha,subsystem-scale.yaml | 114 ++++++++++++++++++
> > 1 file changed, 114 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/devfreq/airoha,subsystem-scale.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/devfreq/airoha,subsystem-scale.yaml b/Documentation/devicetree/bindings/devfreq/airoha,subsystem-scale.yaml
> > new file mode 100644
> > index 000000000000..2cf7f23a926c
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/devfreq/airoha,subsystem-scale.yaml
> > @@ -0,0 +1,114 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/devfreq/airoha,subsystem-scale.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Airoha SoC Subsystem Scale Driver
> > +
> > +maintainers:
> > + - Christian Marangi <ansuelsmth@xxxxxxxxx>
> > +
> > +description:
> > + Airoha SoC contains multiple subsystems that are scaled to a
> > + specific OPP taking the CPU clock as reference. Such subsystem
> > + can enter idle or performance state based on the system load
> > + and power consumption conditions.
> > +
> > + Example of such subsystems are GSW (Gigabit Switch), NPU (Custom
> > + Risc Co-Processor for Network acceleration), SOE (Crypto Module) BUS...
> > +
> > +properties:
> > + compatible:
> > + const: airoha,an7581-subsystem-scale
> > +
> > + clocks:
> > + maxItems: 1
> > +
> > + operating-points-v2:
> > + description:
> > + OPP table of the related subsystem supported rates that referenced
> > + clocks will be scaled to.
> > +
> > +required:
> > + - compatible
> > + - clocks
> > + - operating-points-v2
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/clock/en7523-clk.h>
> > +
> > + npu_opp_table: opp-table-npu {
> > + compatible = "operating-points-v2";
> > +
> > + npu_low: opp-400000000 {
> > + opp-hz = /bits/ 64 <400000000>;
> > + };
> > +
> > + npu_high: opp-720000000 {
> > + opp-hz = /bits/ 64 <720000000>;
> > + };
> > + };
> > +
> > + emi_opp_table: opp-table-emi {
> > + compatible = "operating-points-v2";
> > +
> > + emi_low: opp-400000000 {
> > + opp-hz = /bits/ 64 <400000000>;
> > + };
> > +
> > + emi_high: opp-540000000 {
> > + opp-hz = /bits/ 64 <540000000>;
> > + };
> > + };
> > +
> > + bus_opp_table: opp-table-bus {
> > + compatible = "operating-points-v2";
> > +
> > + bus_low: opp-200000000 {
> > + opp-hz = /bits/ 64 <200000000>;
> > + };
> > +
> > + bus_high: opp-300000000 {
> > + opp-hz = /bits/ 64 <300000000>;
> > + };
> > + };
> > +
> > + gsw_opp_table: opp-table-gsw {
> > + compatible = "operating-points-v2";
> > +
> > + gsw_low: opp-200000000 {
> > + opp-hz = /bits/ 64 <200000000>;
> > + };
> > +
> > + gsw_high: opp-500000000 {
> > + opp-hz = /bits/ 64 <500000000>;
> > + };
> > + };
> > +
> > + npu-subsystem {
> > + compatible = "airoha,an7581-subsystem-scale";
> > + operating-points-v2 = <&npu_opp_table>;
> > + clocks = <&scuclk EN7523_CLK_NPU>;
> > + };
> > +
> > + emi-subsystem {
> > + compatible = "airoha,an7581-subsystem-scale";
> > + operating-points-v2 = <&emi_opp_table>;
> > + clocks = <&scuclk EN7523_CLK_EMI>;
> > + };
> > +
> > + bus-subsystem {
> > + compatible = "airoha,an7581-subsystem-scale";
> > + operating-points-v2 = <&bus_opp_table>;
> > + clocks = <&scuclk EN7523_CLK_BUS>;
> > + };
> > +
> > + gsw-subsystem {
> > + compatible = "airoha,an7581-subsystem-scale";
> > + operating-points-v2 = <&gsw_opp_table>;
> > + clocks = <&scuclk EN7523_CLK_GSW>;
> > + };
> > --
> > 2.55.0
> >