# Generic OPP (Operating Performance Points)

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Opp bindings_

> Device-tree binding reference for Generic OPP (Operating Performance Points).

<!-- SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;opp&#47;opp&#45;v2&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Viresh Kumar &#60;viresh&#46;kumar&#64;linaro&#46;org&#62;&#34;</code></span>

<a id="dt-935ee547587f3e75de61"></a>

## All of these rules must match (<code>allOf</code>)

<a id="dt-d33de94ac1d3652cd22a"></a>

### Rule 1

> **Shared schema rule (<code>&#36;ref</code>):** <span id="dt-95c8874f25311f4b1ab1">[<code>opp&#45;v2&#45;base&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-opp/opp-v2-base.md#dt-root>)</span>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-5c1d81699dcbe840de83"></a>

### <code>compatible</code> — not listed as required here

**Exact value (<code>const</code>):** <span id="dt-1765195bf8e86c3ccec6"><code>&#34;operating&#45;points&#45;v2&#34;</code></span>

<a id="dt-63ab525a9812ac23c446"></a>

## Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">/*
 * Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states
 * together.
 */
cpus {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    cpu@0 {
        compatible = "arm,cortex-a9";
        device_type = "cpu";
        reg = &lt;0&gt;;
        next-level-cache = &lt;&amp;L2&gt;;
        clocks = &lt;&amp;clk_controller 0&gt;;
        clock-names = "cpu";
        cpu-supply = &lt;&amp;cpu_supply0&gt;;
        operating-points-v2 = &lt;&amp;cpu0_opp_table0&gt;;
    };

    cpu@1 {
        compatible = "arm,cortex-a9";
        device_type = "cpu";
        reg = &lt;1&gt;;
        next-level-cache = &lt;&amp;L2&gt;;
        clocks = &lt;&amp;clk_controller 0&gt;;
        clock-names = "cpu";
        cpu-supply = &lt;&amp;cpu_supply0&gt;;
        operating-points-v2 = &lt;&amp;cpu0_opp_table0&gt;;
    };
};

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

    opp-1000000000 {
        opp-hz = /bits/ 64 &lt;1000000000&gt;;
        opp-microvolt = &lt;975000 970000 985000&gt;;
        opp-microamp = &lt;70000&gt;;
        clock-latency-ns = &lt;300000&gt;;
        opp-suspend;
    };
    opp-1100000000 {
        opp-hz = /bits/ 64 &lt;1100000000&gt;;
        opp-microvolt = &lt;1000000 980000 1010000&gt;;
        opp-microamp = &lt;80000&gt;;
        clock-latency-ns = &lt;310000&gt;;
    };
    opp-1200000000 {
        opp-hz = /bits/ 64 &lt;1200000000&gt;;
        opp-microvolt = &lt;1025000&gt;;
        clock-latency-ns = &lt;290000&gt;;
        turbo-mode;
    };
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">/*
 * Example 2: Single cluster, Quad-core Qualcom-krait, switches DVFS states
 * independently.
 */
cpus {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    cpu@0 {
        compatible = "qcom,krait";
        device_type = "cpu";
        reg = &lt;0&gt;;
        next-level-cache = &lt;&amp;L2&gt;;
        clocks = &lt;&amp;clk_controller 0&gt;;
        clock-names = "cpu";
        cpu-supply = &lt;&amp;cpu_supply0&gt;;
        operating-points-v2 = &lt;&amp;cpu_opp_table&gt;;
    };

    cpu@1 {
        compatible = "qcom,krait";
        device_type = "cpu";
        reg = &lt;1&gt;;
        next-level-cache = &lt;&amp;L2&gt;;
        clocks = &lt;&amp;clk_controller 1&gt;;
        clock-names = "cpu";
        cpu-supply = &lt;&amp;cpu_supply1&gt;;
        operating-points-v2 = &lt;&amp;cpu_opp_table&gt;;
    };

    cpu@2 {
        compatible = "qcom,krait";
        device_type = "cpu";
        reg = &lt;2&gt;;
        next-level-cache = &lt;&amp;L2&gt;;
        clocks = &lt;&amp;clk_controller 2&gt;;
        clock-names = "cpu";
        cpu-supply = &lt;&amp;cpu_supply2&gt;;
        operating-points-v2 = &lt;&amp;cpu_opp_table&gt;;
    };

    cpu@3 {
        compatible = "qcom,krait";
        device_type = "cpu";
        reg = &lt;3&gt;;
        next-level-cache = &lt;&amp;L2&gt;;
        clocks = &lt;&amp;clk_controller 3&gt;;
        clock-names = "cpu";
        cpu-supply = &lt;&amp;cpu_supply3&gt;;
        operating-points-v2 = &lt;&amp;cpu_opp_table&gt;;
    };
};

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

    /*
     * Missing opp-shared property means CPUs switch DVFS states
     * independently.
     */

    opp-1000000000 {
        opp-hz = /bits/ 64 &lt;1000000000&gt;;
        opp-microvolt = &lt;975000 970000 985000&gt;;
        opp-microamp = &lt;70000&gt;;
        clock-latency-ns = &lt;300000&gt;;
        opp-suspend;
    };
    opp-1100000000 {
        opp-hz = /bits/ 64 &lt;1100000000&gt;;
        opp-microvolt = &lt;1000000 980000 1010000&gt;;
        opp-microamp = &lt;80000&gt;;
        clock-latency-ns = &lt;310000&gt;;
    };
    opp-1200000000 {
        opp-hz = /bits/ 64 &lt;1200000000&gt;;
        opp-microvolt = &lt;1025000&gt;;
        opp-microamp = &lt;90000&gt;;
        clock-latency-ns = &lt;290000&gt;;
        turbo-mode;
    };
};
</code></pre>

<pre id="dt-d0212a4cd671f89a0b40"><code class="language-dts">/*
 * Example 3: Dual-cluster, Dual-core per cluster. CPUs within a cluster switch
 * DVFS state together.
 */
cpus {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    cpu@0 {
        compatible = "arm,cortex-a7";
        device_type = "cpu";
        reg = &lt;0&gt;;
        next-level-cache = &lt;&amp;L2&gt;;
        clocks = &lt;&amp;clk_controller 0&gt;;
        clock-names = "cpu";
        cpu-supply = &lt;&amp;cpu_supply0&gt;;
        operating-points-v2 = &lt;&amp;cluster0_opp&gt;;
    };

    cpu@1 {
        compatible = "arm,cortex-a7";
        device_type = "cpu";
        reg = &lt;1&gt;;
        next-level-cache = &lt;&amp;L2&gt;;
        clocks = &lt;&amp;clk_controller 0&gt;;
        clock-names = "cpu";
        cpu-supply = &lt;&amp;cpu_supply0&gt;;
        operating-points-v2 = &lt;&amp;cluster0_opp&gt;;
    };

    cpu@100 {
        compatible = "arm,cortex-a15";
        device_type = "cpu";
        reg = &lt;100&gt;;
        next-level-cache = &lt;&amp;L2&gt;;
        clocks = &lt;&amp;clk_controller 1&gt;;
        clock-names = "cpu";
        cpu-supply = &lt;&amp;cpu_supply1&gt;;
        operating-points-v2 = &lt;&amp;cluster1_opp&gt;;
    };

    cpu@101 {
        compatible = "arm,cortex-a15";
        device_type = "cpu";
        reg = &lt;101&gt;;
        next-level-cache = &lt;&amp;L2&gt;;
        clocks = &lt;&amp;clk_controller 1&gt;;
        clock-names = "cpu";
        cpu-supply = &lt;&amp;cpu_supply1&gt;;
        operating-points-v2 = &lt;&amp;cluster1_opp&gt;;
    };
};

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

    opp-1000000000 {
        opp-hz = /bits/ 64 &lt;1000000000&gt;;
        opp-microvolt = &lt;975000 970000 985000&gt;;
        opp-microamp = &lt;70000&gt;;
        clock-latency-ns = &lt;300000&gt;;
        opp-suspend;
    };
    opp-1100000000 {
        opp-hz = /bits/ 64 &lt;1100000000&gt;;
        opp-microvolt = &lt;1000000 980000 1010000&gt;;
        opp-microamp = &lt;80000&gt;;
        clock-latency-ns = &lt;310000&gt;;
    };
    opp-1200000000 {
        opp-hz = /bits/ 64 &lt;1200000000&gt;;
        opp-microvolt = &lt;1025000&gt;;
        opp-microamp = &lt;90000&gt;;
        clock-latency-ns = &lt;290000&gt;;
        turbo-mode;
    };
};

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

    opp-1300000000 {
        opp-hz = /bits/ 64 &lt;1300000000&gt;;
        opp-microvolt = &lt;1050000 1045000 1055000&gt;;
        opp-microamp = &lt;95000&gt;;
        clock-latency-ns = &lt;400000&gt;;
        opp-suspend;
    };
    opp-1400000000 {
        opp-hz = /bits/ 64 &lt;1400000000&gt;;
        opp-microvolt = &lt;1075000&gt;;
        opp-microamp = &lt;100000&gt;;
        clock-latency-ns = &lt;400000&gt;;
    };
    opp-1500000000 {
        opp-hz = /bits/ 64 &lt;1500000000&gt;;
        opp-microvolt = &lt;1100000 1010000 1110000&gt;;
        opp-microamp = &lt;95000&gt;;
        clock-latency-ns = &lt;400000&gt;;
        turbo-mode;
    };
};
</code></pre>

<pre id="dt-cf8a683b5a963eb1c566"><code class="language-dts">/* Example 4: Handling multiple regulators */
cpus {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    cpu@0 {
        compatible = "foo,cpu-type";
        device_type = "cpu";
        reg = &lt;0&gt;;

        vcc0-supply = &lt;&amp;cpu_supply0&gt;;
        vcc1-supply = &lt;&amp;cpu_supply1&gt;;
        vcc2-supply = &lt;&amp;cpu_supply2&gt;;
        operating-points-v2 = &lt;&amp;cpu0_opp_table4&gt;;
    };
};

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

    opp-1000000000 {
        opp-hz = /bits/ 64 &lt;1000000000&gt;;
        opp-microvolt = &lt;970000&gt;, /* Supply 0 */
                        &lt;960000&gt;, /* Supply 1 */
                        &lt;960000&gt;; /* Supply 2 */
        opp-microamp =  &lt;70000&gt;,  /* Supply 0 */
                        &lt;70000&gt;,  /* Supply 1 */
                        &lt;70000&gt;;  /* Supply 2 */
        clock-latency-ns = &lt;300000&gt;;
    };

    /* OR */

    opp-1000000001 {
        opp-hz = /bits/ 64 &lt;1000000001&gt;;
        opp-microvolt = &lt;975000 970000 985000&gt;, /* Supply 0 */
                        &lt;965000 960000 975000&gt;, /* Supply 1 */
                        &lt;965000 960000 975000&gt;; /* Supply 2 */
        opp-microamp =  &lt;70000&gt;,    /* Supply 0 */
            &lt;70000&gt;,    /* Supply 1 */
            &lt;70000&gt;;    /* Supply 2 */
        clock-latency-ns = &lt;300000&gt;;
    };

    /* OR */

    opp-1000000002 {
        opp-hz = /bits/ 64 &lt;1000000002&gt;;
        opp-microvolt = &lt;975000 970000 985000&gt;, /* Supply 0 */
            &lt;965000 960000 975000&gt;, /* Supply 1 */
            &lt;965000 960000 975000&gt;; /* Supply 2 */
        opp-microamp =  &lt;70000&gt;,    /* Supply 0 */
            &lt;0&gt;,      /* Supply 1 doesn't need this */
            &lt;70000&gt;;    /* Supply 2 */
        clock-latency-ns = &lt;300000&gt;;
    };
};
</code></pre>

<pre id="dt-89dd782fdab7d446b5b9"><code class="language-dts">/*
 * Example 5: opp-supported-hw
 * (example: three level hierarchy of versions: cuts, substrate and process)
 */
cpus {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    cpu@0 {
        compatible = "arm,cortex-a7";
        device_type = "cpu";
        reg = &lt;0&gt;;
        cpu-supply = &lt;&amp;cpu_supply&gt;;
        operating-points-v2 = &lt;&amp;cpu0_opp_table_slow&gt;;
    };
};

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

    opp-600000000 {
        /*
         * Supports all substrate and process versions for 0xF
         * cuts, i.e. only first four cuts.
         */
        opp-supported-hw = &lt;0xF 0xFFFFFFFF 0xFFFFFFFF&gt;;
        opp-hz = /bits/ 64 &lt;600000000&gt;;
    };

    opp-800000000 {
        /*
         * Supports:
         * - cuts: only one, 6th cut (represented by 6th bit).
         * - substrate: supports 16 different substrate versions
         * - process: supports 9 different process versions
         */
        opp-supported-hw = &lt;0x20 0xff0000ff 0x0000f4f0&gt;;
        opp-hz = /bits/ 64 &lt;800000000&gt;;
    };

    opp-900000000 {
        /*
         * Supports:
         * - All cuts and substrate where process version is 0x2.
         * - All cuts and process where substrate version is 0x2.
         */
        opp-supported-hw = &lt;0xFFFFFFFF 0xFFFFFFFF 0x02&gt;,
                           &lt;0xFFFFFFFF 0x01 0xFFFFFFFF&gt;;
        opp-hz = /bits/ 64 &lt;900000000&gt;;
    };
};
</code></pre>

<pre id="dt-0a7a1e02b6a2bd0df8c7"><code class="language-dts">/*
 * Example 6: opp-microvolt-&lt;name&gt;, opp-microamp-&lt;name&gt;:
 * (example: device with two possible microvolt ranges: slow and fast)
 */
cpus {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    cpu@0 {
        compatible = "arm,cortex-a7";
        device_type = "cpu";
        reg = &lt;0&gt;;
        operating-points-v2 = &lt;&amp;cpu0_opp_table6&gt;;
    };
};

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

    opp-1000000000 {
        opp-hz = /bits/ 64 &lt;1000000000&gt;;
        opp-microvolt-slow = &lt;915000 900000 925000&gt;;
        opp-microvolt-fast = &lt;975000 970000 985000&gt;;
        opp-microamp-slow =  &lt;70000&gt;;
        opp-microamp-fast =  &lt;71000&gt;;
    };

    opp-1200000000 {
        opp-hz = /bits/ 64 &lt;1200000000&gt;;
        opp-microvolt-slow = &lt;915000 900000 925000&gt;, /* Supply vcc0 */
                             &lt;925000 910000 935000&gt;; /* Supply vcc1 */
        opp-microvolt-fast = &lt;975000 970000 985000&gt;, /* Supply vcc0 */
                             &lt;965000 960000 975000&gt;; /* Supply vcc1 */
        opp-microamp =  &lt;70000&gt;; /* Will be used for both slow/fast */
    };
};
</code></pre>

<pre id="dt-f015148604ca561352a9"><code class="language-dts">/*
 * Example 7: Single cluster Quad-core ARM cortex A53, OPP points from firmware,
 * distinct clock controls but two sets of clock/voltage/current lines.
 */
cpus {
    #address-cells = &lt;2&gt;;
    #size-cells = &lt;0&gt;;

    cpu@0 {
        compatible = "arm,cortex-a53";
        device_type = "cpu";
        reg = &lt;0x0 0x100&gt;;
        next-level-cache = &lt;&amp;A53_L2&gt;;
        clocks = &lt;&amp;dvfs_controller 0&gt;;
        operating-points-v2 = &lt;&amp;cpu_opp0_table&gt;;
    };
    cpu@1 {
        compatible = "arm,cortex-a53";
        device_type = "cpu";
        reg = &lt;0x0 0x101&gt;;
        next-level-cache = &lt;&amp;A53_L2&gt;;
        clocks = &lt;&amp;dvfs_controller 1&gt;;
        operating-points-v2 = &lt;&amp;cpu_opp0_table&gt;;
    };
    cpu@2 {
        compatible = "arm,cortex-a53";
        device_type = "cpu";
        reg = &lt;0x0 0x102&gt;;
        next-level-cache = &lt;&amp;A53_L2&gt;;
        clocks = &lt;&amp;dvfs_controller 2&gt;;
        operating-points-v2 = &lt;&amp;cpu_opp1_table&gt;;
    };
    cpu@3 {
        compatible = "arm,cortex-a53";
        device_type = "cpu";
        reg = &lt;0x0 0x103&gt;;
        next-level-cache = &lt;&amp;A53_L2&gt;;
        clocks = &lt;&amp;dvfs_controller 3&gt;;
        operating-points-v2 = &lt;&amp;cpu_opp1_table&gt;;
    };

};

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

cpu_opp1_table: opp-table-1 {
    compatible = "operating-points-v2";
    opp-shared;
};
</code></pre>

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)</span></p>

</details>
