Peios Learn
Documentation

Peios

Peios Peios Kernel Universal Directory Project

Developer Tools

Trail Acta Provium clackatoo CAF GCSL Pekit

Applications

Framewright

Standards and Conventions

Standards and Conventions Peios Specifications
Peios Kernel

Cpufreq bindings

Single-page view · as markdown

Airoha EN7581 CPUFreq

Peios Kernel / Hardware and drivers / Device-tree binding reference / Cpufreq bindings

Schema identifier ($id): "http://devicetree.org/schemas/cpufreq/airoha,en7581-cpufreq.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Christian Marangi <ansuelsmth@gmail.com>"

On newer Airoha SoC, CPU Frequency is scaled indirectly with SMC commands to ATF.

A virtual clock is exposed. This virtual clock is a get-only clock and is used to expose the current global CPU clock. The frequency info comes by the output of the SMC command that reports the clock in MHz.

The SMC sets the CPU clock by providing an index, this is modelled as performance states in a power domain.

CPUs can't be individually scaled as the CPU frequency is shared across all CPUs and is global.

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "airoha,en7581-cpufreq"

#clock-cells — required here #

Exact value (const): 0

#power-domain-cells — required here #

Exact value (const): 0

operating-points-v2 — required here #

true — No constraints added by this property rule.

Required in this object (required): "compatible", "#clock-cells", "#power-domain-cells", "operating-points-v2"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

performance-domain {
    compatible = "airoha,en7581-cpufreq";

    operating-points-v2 = <&cpu_smcc_opp_table>;

    #power-domain-cells = <0>;
    #clock-cells = <0>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Apple SoC cluster cpufreq device

Peios Kernel / Hardware and drivers / Device-tree binding reference / Cpufreq bindings

Schema identifier ($id): "http://devicetree.org/schemas/cpufreq/apple,cluster-cpufreq.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Hector Martin <marcan@marcan.st>"

Apple SoCs (e.g. M1) have a per-cpu-cluster DVFS controller that is part of the cluster management register block. This binding uses the standard operating-points-v2 table to define the CPU performance states, with the opp-level property specifying the hardware p-state index for that level.

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Array item rules (items)

Item 1

Allowed values (enum): "apple,t8103-cluster-cpufreq", "apple,t8112-cluster-cpufreq"

Item 2

Exact value (const): "apple,cluster-cpufreq"

Rule 2

Array item rules (items)

Item 1

Allowed values (enum): "apple,s8000-cluster-cpufreq", "apple,t8010-cluster-cpufreq", "apple,t8015-cluster-cpufreq", "apple,t6000-cluster-cpufreq"

Item 2

Exact value (const): "apple,t8103-cluster-cpufreq"

Item 3

Exact value (const): "apple,cluster-cpufreq"

Rule 3

Array item rules (items)

Item 1

Exact value (const): "apple,t7000-cluster-cpufreq"

Item 2

Exact value (const): "apple,s5l8960x-cluster-cpufreq"

Rule 4

Exact value (const): "apple,s5l8960x-cluster-cpufreq"

Rule 5

Array item rules (items)

Item 1

Exact value (const): "apple,t6020-cluster-cpufreq"

Item 2

Exact value (const): "apple,t8112-cluster-cpufreq"

reg — required here #

Maximum number of items (maxItems): 1

#performance-domain-cells — required here #

Exact value (const): 0

Required in this object (required): "compatible", "reg", "#performance-domain-cells"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

// This example shows a single CPU per domain and 2 domains,
// with two p-states per domain.
// Shipping hardware has 2-4 CPUs per domain and 2-6 domains.
cpus {
  #address-cells = <2>;
  #size-cells = <0>;

  cpu@0 {
    compatible = "apple,icestorm";
    device_type = "cpu";
    reg = <0x0 0x0>;
    operating-points-v2 = <&ecluster_opp>;
    performance-domains = <&cpufreq_e>;
  };

  cpu@10100 {
    compatible = "apple,firestorm";
    device_type = "cpu";
    reg = <0x0 0x10100>;
    operating-points-v2 = <&pcluster_opp>;
    performance-domains = <&cpufreq_p>;
  };
};

ecluster_opp: opp-table-0 {
  compatible = "operating-points-v2";
  opp-shared;

  opp01 {
    opp-hz = /bits/ 64 <600000000>;
    opp-level = <1>;
    clock-latency-ns = <7500>;
  };
  opp02 {
    opp-hz = /bits/ 64 <972000000>;
    opp-level = <2>;
    clock-latency-ns = <22000>;
  };
};

pcluster_opp: opp-table-1 {
  compatible = "operating-points-v2";
  opp-shared;

  opp01 {
    opp-hz = /bits/ 64 <600000000>;
    opp-level = <1>;
    clock-latency-ns = <8000>;
  };
  opp02 {
    opp-hz = /bits/ 64 <828000000>;
    opp-level = <2>;
    clock-latency-ns = <19000>;
  };
};

soc {
  #address-cells = <2>;
  #size-cells = <2>;

  cpufreq_e: performance-controller@210e20000 {
    compatible = "apple,t8103-cluster-cpufreq", "apple,cluster-cpufreq";
    reg = <0x2 0x10e20000 0 0x1000>;
    #performance-domain-cells = <0>;
  };

  cpufreq_p: performance-controller@211e20000 {
    compatible = "apple,t8103-cluster-cpufreq", "apple,cluster-cpufreq";
    reg = <0x2 0x11e20000 0 0x1000>;
    #performance-domain-cells = <0>;
  };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause

MediaTek's CPUFREQ

Peios Kernel / Hardware and drivers / Device-tree binding reference / Cpufreq bindings

Schema identifier ($id): "http://devicetree.org/schemas/cpufreq/cpufreq-mediatek-hw.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Hector Yuan <hector.yuan@mediatek.com>"

CPUFREQ HW is a hardware engine used by MediaTek SoCs to manage frequency in hardware. It is capable of controlling frequency for multiple clusters.

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "mediatek,cpufreq-hw"

reg — required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

Addresses and sizes for the memory of the HW bases in each frequency domain. Each entry corresponds to a register bank for each frequency domain present.

#performance-domain-cells — required here #

Number of cells in a performance domain specifier. Set const to 1 here for nodes providing multiple performance domains.

Exact value (const): 1

Required in this object (required): "compatible", "reg", "#performance-domain-cells"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

cpus {
        #address-cells = <1>;
        #size-cells = <0>;

        cpu0: cpu@0 {
            device_type = "cpu";
            compatible = "arm,cortex-a55";
            enable-method = "psci";
            performance-domains = <&performance 0>;
            reg = <0x000>;
        };
};

/* ... */

soc {
    #address-cells = <2>;
    #size-cells = <2>;

    performance: performance-controller@11bc00 {
        compatible = "mediatek,cpufreq-hw";
        reg = <0 0x0011bc10 0 0x120>, <0 0x0011bd30 0 0x120>;

        #performance-domain-cells = <1>;
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Qualcomm Technologies, Inc. CPUFREQ

Peios Kernel / Hardware and drivers / Device-tree binding reference / Cpufreq bindings

Schema identifier ($id): "http://devicetree.org/schemas/cpufreq/cpufreq-qcom-hw.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>"

CPUFREQ HW is a hardware engine used by some Qualcomm Technologies, Inc. (QTI) SoCs to manage frequency in hardware. It is capable of controlling frequency for multiple clusters.

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

v1 of CPUFREQ HW

Array item rules (items)

Item 1

Allowed values (enum): "qcom,qcm2290-cpufreq-hw", "qcom,qcs615-cpufreq-hw", "qcom,sc7180-cpufreq-hw", "qcom,sc8180x-cpufreq-hw", "qcom,sdm670-cpufreq-hw", "qcom,sdm845-cpufreq-hw", "qcom,sm6115-cpufreq-hw", "qcom,sm6350-cpufreq-hw", "qcom,sm8150-cpufreq-hw"

Item 2

Exact value (const): "qcom,cpufreq-hw"

Rule 2

v2 of CPUFREQ HW (EPSS)

Array item rules (items)

Item 1

Allowed values (enum): "qcom,milos-cpufreq-epss", "qcom,qcs8300-cpufreq-epss", "qcom,qdu1000-cpufreq-epss", "qcom,sa8255p-cpufreq-epss", "qcom,sa8775p-cpufreq-epss", "qcom,sar2130p-cpufreq-epss", "qcom,sc7280-cpufreq-epss", "qcom,sc8280xp-cpufreq-epss", "qcom,sdx75-cpufreq-epss", "qcom,sm4450-cpufreq-epss", "qcom,sm6375-cpufreq-epss", "qcom,sm8250-cpufreq-epss", "qcom,sm8350-cpufreq-epss", "qcom,sm8450-cpufreq-epss", "qcom,sm8550-cpufreq-epss", "qcom,sm8650-cpufreq-epss"

Item 2

Exact value (const): "qcom,cpufreq-epss"

reg — required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

Frequency domain 0 register region

Item 2

Frequency domain 1 register region

Item 3

Frequency domain 2 register region

Item 4

Frequency domain 3 register region

reg-names — not listed as required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

Exact value (const): "freq-domain0"

Item 2

Exact value (const): "freq-domain1"

Item 3

Exact value (const): "freq-domain2"

Item 4

Exact value (const): "freq-domain3"

clocks — required here #

Array item rules (items) #

Item 1

XO Clock

Item 2

GPLL0 Clock

clock-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "xo"

Item 2

Exact value (const): "alternate"

interrupts — not listed as required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 4

interrupt-names — not listed as required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

Exact value (const): "dcvsh-irq-0"

Item 2

Exact value (const): "dcvsh-irq-1"

Item 3

Exact value (const): "dcvsh-irq-2"

Item 4

Exact value (const): "dcvsh-irq-3"

#freq-domain-cells — required here #

Exact value (const): 1

#clock-cells — not listed as required here #

Exact value (const): 1

Required in this object (required): "compatible", "reg", "clocks", "clock-names", "#freq-domain-cells"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,qcm2290-cpufreq-hw", "qcom,sar2130p-cpufreq-epss", "qcom,sdx75-cpufreq-epss"

When the condition matches (then) #

Properties and child nodes (properties)

reg — not listed as required here

Maximum number of items (maxItems): 1

reg-names — not listed as required here

Maximum number of items (maxItems): 1

interrupts — not listed as required here

Maximum number of items (maxItems): 1

interrupt-names — not listed as required here

Maximum number of items (maxItems): 1

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,qcs615-cpufreq-hw", "qcom,qdu1000-cpufreq-epss", "qcom,sa8255p-cpufreq-epss", "qcom,sa8775p-cpufreq-epss", "qcom,sc7180-cpufreq-hw", "qcom,sc8180x-cpufreq-hw", "qcom,sc8280xp-cpufreq-epss", "qcom,sdm670-cpufreq-hw", "qcom,sdm845-cpufreq-hw", "qcom,sm4450-cpufreq-epss", "qcom,sm6115-cpufreq-hw", "qcom,sm6350-cpufreq-hw", "qcom,sm6375-cpufreq-epss"

When the condition matches (then) #

Properties and child nodes (properties)

reg — not listed as required here

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 2

reg-names — not listed as required here

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 2

interrupts — not listed as required here

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 2

interrupt-names — not listed as required here

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 2

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,milos-cpufreq-epss", "qcom,qcs8300-cpufreq-epss", "qcom,sc7280-cpufreq-epss", "qcom,sm8250-cpufreq-epss", "qcom,sm8350-cpufreq-epss", "qcom,sm8450-cpufreq-epss", "qcom,sm8550-cpufreq-epss"

When the condition matches (then) #

Properties and child nodes (properties)

reg — not listed as required here

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 3

reg-names — not listed as required here

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 3

interrupts — not listed as required here

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 3

interrupt-names — not listed as required here

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 3

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,sm8150-cpufreq-hw"

When the condition matches (then) #

Properties and child nodes (properties)

reg — not listed as required here

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 3

reg-names — not listed as required here

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 3

interrupts — not listed as required here

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 2

interrupt-names — not listed as required here

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 2

Rule 5 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,sm8650-cpufreq-epss"

When the condition matches (then) #

Properties and child nodes (properties)

reg — not listed as required here

Minimum number of items (minItems): 4

Maximum number of items (maxItems): 4

reg-names — not listed as required here

Minimum number of items (minItems): 4

Maximum number of items (maxItems): 4

interrupts — not listed as required here

Minimum number of items (minItems): 4

Maximum number of items (maxItems): 4

interrupt-names — not listed as required here

Minimum number of items (minItems): 4

Maximum number of items (maxItems): 4

Examples (examples) #

#include <dt-bindings/clock/qcom,gcc-sdm845.h>
#include <dt-bindings/clock/qcom,rpmh.h>

// Example 1: Dual-cluster, Quad-core per cluster. CPUs within a cluster
// switch DCVS state together.
cpus {
  #address-cells = <2>;
  #size-cells = <0>;

  CPU0: cpu@0 {
    device_type = "cpu";
    compatible = "qcom,kryo385";
    reg = <0x0 0x0>;
    enable-method = "psci";
    next-level-cache = <&L2_0>;
    qcom,freq-domain = <&cpufreq_hw 0>;
    clocks = <&cpufreq_hw 0>;
    L2_0: l2-cache {
      compatible = "cache";
      cache-unified;
      cache-level = <2>;
      next-level-cache = <&L3_0>;
      L3_0: l3-cache {
        compatible = "cache";
        cache-unified;
        cache-level = <3>;
      };
    };
  };

  CPU1: cpu@100 {
    device_type = "cpu";
    compatible = "qcom,kryo385";
    reg = <0x0 0x100>;
    enable-method = "psci";
    next-level-cache = <&L2_100>;
    qcom,freq-domain = <&cpufreq_hw 0>;
    clocks = <&cpufreq_hw 0>;
    L2_100: l2-cache {
      compatible = "cache";
      cache-unified;
      cache-level = <2>;
      next-level-cache = <&L3_0>;
    };
  };

  CPU2: cpu@200 {
    device_type = "cpu";
    compatible = "qcom,kryo385";
    reg = <0x0 0x200>;
    enable-method = "psci";
    next-level-cache = <&L2_200>;
    qcom,freq-domain = <&cpufreq_hw 0>;
    clocks = <&cpufreq_hw 0>;
    L2_200: l2-cache {
      compatible = "cache";
      cache-unified;
      cache-level = <2>;
      next-level-cache = <&L3_0>;
    };
  };

  CPU3: cpu@300 {
    device_type = "cpu";
    compatible = "qcom,kryo385";
    reg = <0x0 0x300>;
    enable-method = "psci";
    next-level-cache = <&L2_300>;
    qcom,freq-domain = <&cpufreq_hw 0>;
    clocks = <&cpufreq_hw 0>;
    L2_300: l2-cache {
      compatible = "cache";
      cache-unified;
      cache-level = <2>;
      next-level-cache = <&L3_0>;
    };
  };

  CPU4: cpu@400 {
    device_type = "cpu";
    compatible = "qcom,kryo385";
    reg = <0x0 0x400>;
    enable-method = "psci";
    next-level-cache = <&L2_400>;
    qcom,freq-domain = <&cpufreq_hw 1>;
    clocks = <&cpufreq_hw 1>;
    L2_400: l2-cache {
      compatible = "cache";
      cache-unified;
      cache-level = <2>;
      next-level-cache = <&L3_0>;
    };
  };

  CPU5: cpu@500 {
    device_type = "cpu";
    compatible = "qcom,kryo385";
    reg = <0x0 0x500>;
    enable-method = "psci";
    next-level-cache = <&L2_500>;
    qcom,freq-domain = <&cpufreq_hw 1>;
    clocks = <&cpufreq_hw 1>;
    L2_500: l2-cache {
      compatible = "cache";
      cache-unified;
      cache-level = <2>;
      next-level-cache = <&L3_0>;
    };
  };

  CPU6: cpu@600 {
    device_type = "cpu";
    compatible = "qcom,kryo385";
    reg = <0x0 0x600>;
    enable-method = "psci";
    next-level-cache = <&L2_600>;
    qcom,freq-domain = <&cpufreq_hw 1>;
    clocks = <&cpufreq_hw 1>;
    L2_600: l2-cache {
      compatible = "cache";
      cache-unified;
      cache-level = <2>;
      next-level-cache = <&L3_0>;
    };
  };

  CPU7: cpu@700 {
    device_type = "cpu";
    compatible = "qcom,kryo385";
    reg = <0x0 0x700>;
    enable-method = "psci";
    next-level-cache = <&L2_700>;
    qcom,freq-domain = <&cpufreq_hw 1>;
    clocks = <&cpufreq_hw 1>;
    L2_700: l2-cache {
      compatible = "cache";
      cache-unified;
      cache-level = <2>;
      next-level-cache = <&L3_0>;
    };
  };
};

soc {
  #address-cells = <1>;
  #size-cells = <1>;

  cpufreq@17d43000 {
    compatible = "qcom,sdm845-cpufreq-hw", "qcom,cpufreq-hw";
    reg = <0x17d43000 0x1400>, <0x17d45800 0x1400>;
    reg-names = "freq-domain0", "freq-domain1";

    clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GPLL0>;
    clock-names = "xo", "alternate";

    #freq-domain-cells = <1>;
    #clock-cells = <1>;
  };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause

Line 214: On some SoCs the Prime core shares the LMH irq with Big cores

MediaTek Hybrid CPUFreq for MT8196/MT6991 series SoCs

Peios Kernel / Hardware and drivers / Device-tree binding reference / Cpufreq bindings

Schema identifier ($id): "http://devicetree.org/schemas/cpufreq/mediatek,mt8196-cpufreq-hw.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Nicolas Frattaroli <nicolas.frattaroli@collabora.com>"

MT8196 uses CPUFreq management hardware that supports dynamic voltage frequency scaling (dvfs), and can support several performance domains.

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "mediatek,mt8196-cpufreq-hw"

reg — required here #

Array item rules (items) #

Item 1

FDVFS control register region

Item 2

OPP tables and control for performance domain 0

Item 3

OPP tables and control for performance domain 1

Item 4

OPP tables and control for performance domain 2

#performance-domain-cells — required here #

Exact value (const): 1

Required in this object (required): "compatible", "reg", "#performance-domain-cells"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

cpus {
        #address-cells = <1>;
        #size-cells = <0>;

        cpu0: cpu@0 {
            device_type = "cpu";
            compatible = "arm,cortex-a720";
            enable-method = "psci";
            performance-domains = <&performance 0>;
            reg = <0x000>;
        };

        /* ... */

        cpu6: cpu@600 {
            device_type = "cpu";
            compatible = "arm,cortex-x4";
            enable-method = "psci";
            performance-domains = <&performance 1>;
            reg = <0x600>;
        };

        cpu7: cpu@700 {
            device_type = "cpu";
            compatible = "arm,cortex-x925";
            enable-method = "psci";
            performance-domains = <&performance 2>;
            reg = <0x700>;
        };
};

/* ... */

soc {
    #address-cells = <2>;
    #size-cells = <2>;

    performance: performance-controller@c2c2034 {
        compatible = "mediatek,mt8196-cpufreq-hw";
        reg = <0 0xc220400 0 0x20>, <0 0xc2c0f20 0 0x120>,
              <0 0xc2c1040 0 0x120>, <0 0xc2c1160 0 0x120>;
        #performance-domain-cells = <1>;
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Qualcomm Technologies, Inc. NVMEM CPUFreq

Peios Kernel / Hardware and drivers / Device-tree binding reference / Cpufreq bindings

Schema identifier ($id): "http://devicetree.org/schemas/cpufreq/qcom-cpufreq-nvmem.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Ilia Lin <ilia.lin@kernel.org>"

In certain Qualcomm Technologies, Inc. SoCs such as QCS404, The CPU supply voltage is dynamically configured by Core Power Reduction (CPR) depending on current CPU frequency and efuse values. CPR provides a power domain with multiple levels that are selected depending on the CPU OPP in use. The CPUFreq driver sets the CPR power domain level according to the required OPPs defined in the CPU OPP tables.

For old implementation efuses are parsed to select the correct opp table and voltage and CPR is not supported/used.

Automatic schema selection (select) #

Properties and child nodes (properties) #

compatible — required here #

Rule for matching array elements (contains)

Allowed values (enum): "qcom,apq8064", "qcom,apq8096", "qcom,ipq5332", "qcom,ipq6018", "qcom,ipq8064", "qcom,ipq8074", "qcom,ipq9574", "qcom,msm8909", "qcom,msm8939", "qcom,msm8960", "qcom,msm8974", "qcom,msm8996", "qcom,qcs404"

Required in this object (required): "compatible"

Properties matching a name pattern (patternProperties) #

^opp-table(-[a-z0-9]+)?$ — name matches this regular expression #

All of these rules must match (allOf) #

Rule 1

Condition (if)

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "operating-points-v2-krait-cpu", "operating-points-v2-kryo-cpu"

When the condition matches (then)

Shared schema rule ($ref): /schemas/opp/opp-v2-kryo-cpu.yaml#

Rule 2

Condition (if)

Properties and child nodes (properties)

compatible — not listed as required here

Exact value (const): "operating-points-v2-qcom-level"

When the condition matches (then)

Shared schema rule ($ref): /schemas/opp/opp-v2-qcom-level.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "qcom,qcs404"

When the condition matches (then) #

Properties and child nodes (properties)

cpus — not listed as required here

Value type (type): "object"

Properties matching a name pattern (patternProperties)

^cpu@[0-9a-f]+$ — name matches this regular expression

Value type (type): "object"

Properties and child nodes (properties)

power-domains — required here

Maximum number of items (maxItems): 1

power-domain-names — required here

Array item rules (items)

Item 1

Exact value (const): "cpr"

Required in this object (required): "power-domains", "power-domain-names"

Properties matching a name pattern (patternProperties)

^opp-table(-[a-z0-9]+)?$ — name matches this regular expression

Condition (if)

Properties and child nodes (properties)

compatible — not listed as required here

Exact value (const): "operating-points-v2-kryo-cpu"

When the condition matches (then)

Properties matching a name pattern (patternProperties)

^opp-?[0-9]+$ — name matches this regular expression

Required in this object (required): "required-opps"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

true

Allowed by this rule.

Examples (examples) #

/ {
    model = "Qualcomm Technologies, Inc. QCS404 EVB 1000";
    compatible = "qcom,qcs404-evb-1000", "qcom,qcs404-evb", "qcom,qcs404";
    #address-cells = <2>;
    #size-cells = <2>;

    cpus {
        #address-cells = <1>;
        #size-cells = <0>;

        CPU0: cpu@100 {
            device_type = "cpu";
            compatible = "arm,cortex-a53";
            reg = <0x100>;
            enable-method = "psci";
            cpu-idle-states = <&CPU_SLEEP_0>;
            next-level-cache = <&L2_0>;
            #cooling-cells = <2>;
            clocks = <&apcs_glb>;
            operating-points-v2 = <&cpu_opp_table>;
            power-domains = <&cpr>;
            power-domain-names = "cpr";
        };

        CPU1: cpu@101 {
            device_type = "cpu";
            compatible = "arm,cortex-a53";
            reg = <0x101>;
            enable-method = "psci";
            cpu-idle-states = <&CPU_SLEEP_0>;
            next-level-cache = <&L2_0>;
            #cooling-cells = <2>;
            clocks = <&apcs_glb>;
            operating-points-v2 = <&cpu_opp_table>;
            power-domains = <&cpr>;
            power-domain-names = "cpr";
        };

        CPU2: cpu@102 {
            device_type = "cpu";
            compatible = "arm,cortex-a53";
            reg = <0x102>;
            enable-method = "psci";
            cpu-idle-states = <&CPU_SLEEP_0>;
            next-level-cache = <&L2_0>;
            #cooling-cells = <2>;
            clocks = <&apcs_glb>;
            operating-points-v2 = <&cpu_opp_table>;
            power-domains = <&cpr>;
            power-domain-names = "cpr";
        };

        CPU3: cpu@103 {
            device_type = "cpu";
            compatible = "arm,cortex-a53";
            reg = <0x103>;
            enable-method = "psci";
            cpu-idle-states = <&CPU_SLEEP_0>;
            next-level-cache = <&L2_0>;
            #cooling-cells = <2>;
            clocks = <&apcs_glb>;
            operating-points-v2 = <&cpu_opp_table>;
            power-domains = <&cpr>;
            power-domain-names = "cpr";
        };
    };

    cpu_opp_table: opp-table-cpu {
        compatible = "operating-points-v2-kryo-cpu";
        opp-shared;

        opp-1094400000 {
            opp-hz = /bits/ 64 <1094400000>;
            required-opps = <&cpr_opp1>;
        };
        opp-1248000000 {
            opp-hz = /bits/ 64 <1248000000>;
            required-opps = <&cpr_opp2>;
        };
        opp-1401600000 {
            opp-hz = /bits/ 64 <1401600000>;
            required-opps = <&cpr_opp3>;
        };
    };

    cpr_opp_table: opp-table-cpr {
        compatible = "operating-points-v2-qcom-level";

        cpr_opp1: opp1 {
            opp-level = <1>;
            qcom,opp-fuse-level = <1>;
        };
        cpr_opp2: opp2 {
            opp-level = <2>;
            qcom,opp-fuse-level = <2>;
        };
        cpr_opp3: opp3 {
            opp-level = <3>;
            qcom,opp-fuse-level = <3>;
        };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Virtual CPUFreq

Peios Kernel / Hardware and drivers / Device-tree binding reference / Cpufreq bindings

Schema identifier ($id): "http://devicetree.org/schemas/cpufreq/qemu,virtual-cpufreq.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "David Dai <davidai@google.com>", "Saravana Kannan <saravanak@google.com>"

Virtual CPUFreq is a virtualized driver in guest kernels that sends performance selection of its vCPUs as a hint to the host through MMIO regions. Each vCPU is associated with a performance domain which can be shared with other vCPUs. Each performance domain has its own set of registers for performance controls.

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "qemu,virtual-cpufreq"

reg — required here #

Maximum number of items (maxItems): 1

Address and size of region containing performance controls for each of the performance domains. Regions for each performance domain is placed contiguously and contain registers for controlling DVFS(Dynamic Frequency and Voltage) characteristics. The size of the region is proportional to total number of performance domains.

Required in this object (required): "compatible", "reg"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

soc {
  #address-cells = <1>;
  #size-cells = <1>;

  cpufreq@1040000 {
    compatible = "qemu,virtual-cpufreq";
    reg = <0x1040000 0x2000>;
  };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause

Peios Learn — documentation for Peios software.

Built with Trail.