xref: /linux/Documentation/devicetree/bindings/power/avs/qcom,cpr.yaml (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
18acf5cb9SYassine Oudjana# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28acf5cb9SYassine Oudjana%YAML 1.2
38acf5cb9SYassine Oudjana---
48acf5cb9SYassine Oudjana$id: http://devicetree.org/schemas/power/avs/qcom,cpr.yaml#
58acf5cb9SYassine Oudjana$schema: http://devicetree.org/meta-schemas/core.yaml#
68acf5cb9SYassine Oudjana
7*84e85359SKrzysztof Kozlowskititle: Qualcomm Core Power Reduction (CPR)
88acf5cb9SYassine Oudjana
98acf5cb9SYassine Oudjanamaintainers:
108acf5cb9SYassine Oudjana  - Niklas Cassel <nks@flawful.org>
118acf5cb9SYassine Oudjana
128acf5cb9SYassine Oudjanadescription: |
138acf5cb9SYassine Oudjana  CPR (Core Power Reduction) is a technology to reduce core power on a CPU
148acf5cb9SYassine Oudjana  or other device. Each OPP of a device corresponds to a "corner" that has
158acf5cb9SYassine Oudjana  a range of valid voltages for a particular frequency. While the device is
168acf5cb9SYassine Oudjana  running at a particular frequency, CPR monitors dynamic factors such as
178acf5cb9SYassine Oudjana  temperature, etc. and suggests adjustments to the voltage to save power
188acf5cb9SYassine Oudjana  and meet silicon characteristic requirements.
198acf5cb9SYassine Oudjana
208acf5cb9SYassine Oudjanaproperties:
218acf5cb9SYassine Oudjana  compatible:
228acf5cb9SYassine Oudjana    items:
238acf5cb9SYassine Oudjana      - enum:
248acf5cb9SYassine Oudjana          - qcom,qcs404-cpr
258acf5cb9SYassine Oudjana      - const: qcom,cpr
268acf5cb9SYassine Oudjana
278acf5cb9SYassine Oudjana  reg:
288acf5cb9SYassine Oudjana    description: Base address and size of the RBCPR register region.
298acf5cb9SYassine Oudjana    maxItems: 1
308acf5cb9SYassine Oudjana
318acf5cb9SYassine Oudjana  interrupts:
328acf5cb9SYassine Oudjana    maxItems: 1
338acf5cb9SYassine Oudjana
348acf5cb9SYassine Oudjana  clocks:
358acf5cb9SYassine Oudjana    items:
368acf5cb9SYassine Oudjana      - description: Reference clock.
378acf5cb9SYassine Oudjana
388acf5cb9SYassine Oudjana  clock-names:
398acf5cb9SYassine Oudjana    items:
408acf5cb9SYassine Oudjana      - const: ref
418acf5cb9SYassine Oudjana
428acf5cb9SYassine Oudjana  vdd-apc-supply:
438acf5cb9SYassine Oudjana    description: APC regulator supply.
448acf5cb9SYassine Oudjana
458acf5cb9SYassine Oudjana  '#power-domain-cells':
468acf5cb9SYassine Oudjana    const: 0
478acf5cb9SYassine Oudjana
488acf5cb9SYassine Oudjana  operating-points-v2:
498acf5cb9SYassine Oudjana    description: |
508acf5cb9SYassine Oudjana      A phandle to the OPP table containing the performance states
518acf5cb9SYassine Oudjana      supported by the CPR power domain.
528acf5cb9SYassine Oudjana
538acf5cb9SYassine Oudjana  acc-syscon:
544e71ed98SRob Herring    $ref: /schemas/types.yaml#/definitions/phandle
558acf5cb9SYassine Oudjana    description: A phandle to the syscon used for writing ACC settings.
568acf5cb9SYassine Oudjana
578acf5cb9SYassine Oudjana  nvmem-cells:
588acf5cb9SYassine Oudjana    items:
598acf5cb9SYassine Oudjana      - description: Corner 1 quotient offset
608acf5cb9SYassine Oudjana      - description: Corner 2 quotient offset
618acf5cb9SYassine Oudjana      - description: Corner 3 quotient offset
628acf5cb9SYassine Oudjana      - description: Corner 1 initial voltage
638acf5cb9SYassine Oudjana      - description: Corner 2 initial voltage
648acf5cb9SYassine Oudjana      - description: Corner 3 initial voltage
658acf5cb9SYassine Oudjana      - description: Corner 1 quotient
668acf5cb9SYassine Oudjana      - description: Corner 2 quotient
678acf5cb9SYassine Oudjana      - description: Corner 3 quotient
688acf5cb9SYassine Oudjana      - description: Corner 1 ring oscillator
698acf5cb9SYassine Oudjana      - description: Corner 2 ring oscillator
708acf5cb9SYassine Oudjana      - description: Corner 3 ring oscillator
718acf5cb9SYassine Oudjana      - description: Fuse revision
728acf5cb9SYassine Oudjana
738acf5cb9SYassine Oudjana  nvmem-cell-names:
748acf5cb9SYassine Oudjana    items:
758acf5cb9SYassine Oudjana      - const: cpr_quotient_offset1
768acf5cb9SYassine Oudjana      - const: cpr_quotient_offset2
778acf5cb9SYassine Oudjana      - const: cpr_quotient_offset3
788acf5cb9SYassine Oudjana      - const: cpr_init_voltage1
798acf5cb9SYassine Oudjana      - const: cpr_init_voltage2
808acf5cb9SYassine Oudjana      - const: cpr_init_voltage3
818acf5cb9SYassine Oudjana      - const: cpr_quotient1
828acf5cb9SYassine Oudjana      - const: cpr_quotient2
838acf5cb9SYassine Oudjana      - const: cpr_quotient3
848acf5cb9SYassine Oudjana      - const: cpr_ring_osc1
858acf5cb9SYassine Oudjana      - const: cpr_ring_osc2
868acf5cb9SYassine Oudjana      - const: cpr_ring_osc3
878acf5cb9SYassine Oudjana      - const: cpr_fuse_revision
888acf5cb9SYassine Oudjana
898acf5cb9SYassine Oudjanarequired:
908acf5cb9SYassine Oudjana  - compatible
918acf5cb9SYassine Oudjana  - reg
928acf5cb9SYassine Oudjana  - interrupts
938acf5cb9SYassine Oudjana  - clocks
948acf5cb9SYassine Oudjana  - clock-names
958acf5cb9SYassine Oudjana  - vdd-apc-supply
968acf5cb9SYassine Oudjana  - '#power-domain-cells'
978acf5cb9SYassine Oudjana  - operating-points-v2
988acf5cb9SYassine Oudjana  - nvmem-cells
998acf5cb9SYassine Oudjana  - nvmem-cell-names
1008acf5cb9SYassine Oudjana
1018acf5cb9SYassine OudjanaadditionalProperties: false
1028acf5cb9SYassine Oudjana
1038acf5cb9SYassine Oudjanaexamples:
1048acf5cb9SYassine Oudjana  - |
1058acf5cb9SYassine Oudjana    #include <dt-bindings/interrupt-controller/arm-gic.h>
1068acf5cb9SYassine Oudjana
1078acf5cb9SYassine Oudjana    cpr_opp_table: opp-table-cpr {
1088acf5cb9SYassine Oudjana        compatible = "operating-points-v2-qcom-level";
1098acf5cb9SYassine Oudjana
1108acf5cb9SYassine Oudjana        cpr_opp1: opp1 {
1118acf5cb9SYassine Oudjana            opp-level = <1>;
1128acf5cb9SYassine Oudjana            qcom,opp-fuse-level = <1>;
1138acf5cb9SYassine Oudjana        };
1148acf5cb9SYassine Oudjana        cpr_opp2: opp2 {
1158acf5cb9SYassine Oudjana            opp-level = <2>;
1168acf5cb9SYassine Oudjana            qcom,opp-fuse-level = <2>;
1178acf5cb9SYassine Oudjana        };
1188acf5cb9SYassine Oudjana        cpr_opp3: opp3 {
1198acf5cb9SYassine Oudjana            opp-level = <3>;
1208acf5cb9SYassine Oudjana            qcom,opp-fuse-level = <3>;
1218acf5cb9SYassine Oudjana        };
1228acf5cb9SYassine Oudjana    };
1238acf5cb9SYassine Oudjana
1248acf5cb9SYassine Oudjana    power-controller@b018000 {
1258acf5cb9SYassine Oudjana        compatible = "qcom,qcs404-cpr", "qcom,cpr";
1268acf5cb9SYassine Oudjana        reg = <0x0b018000 0x1000>;
1278acf5cb9SYassine Oudjana        interrupts = <0 15 IRQ_TYPE_EDGE_RISING>;
1288acf5cb9SYassine Oudjana        clocks = <&xo_board>;
1298acf5cb9SYassine Oudjana        clock-names = "ref";
1308acf5cb9SYassine Oudjana        vdd-apc-supply = <&pms405_s3>;
1318acf5cb9SYassine Oudjana        #power-domain-cells = <0>;
1328acf5cb9SYassine Oudjana        operating-points-v2 = <&cpr_opp_table>;
1338acf5cb9SYassine Oudjana        acc-syscon = <&tcsr>;
1348acf5cb9SYassine Oudjana
1358acf5cb9SYassine Oudjana        nvmem-cells = <&cpr_efuse_quot_offset1>,
1368acf5cb9SYassine Oudjana            <&cpr_efuse_quot_offset2>,
1378acf5cb9SYassine Oudjana            <&cpr_efuse_quot_offset3>,
1388acf5cb9SYassine Oudjana            <&cpr_efuse_init_voltage1>,
1398acf5cb9SYassine Oudjana            <&cpr_efuse_init_voltage2>,
1408acf5cb9SYassine Oudjana            <&cpr_efuse_init_voltage3>,
1418acf5cb9SYassine Oudjana            <&cpr_efuse_quot1>,
1428acf5cb9SYassine Oudjana            <&cpr_efuse_quot2>,
1438acf5cb9SYassine Oudjana            <&cpr_efuse_quot3>,
1448acf5cb9SYassine Oudjana            <&cpr_efuse_ring1>,
1458acf5cb9SYassine Oudjana            <&cpr_efuse_ring2>,
1468acf5cb9SYassine Oudjana            <&cpr_efuse_ring3>,
1478acf5cb9SYassine Oudjana            <&cpr_efuse_revision>;
1488acf5cb9SYassine Oudjana        nvmem-cell-names = "cpr_quotient_offset1",
1498acf5cb9SYassine Oudjana            "cpr_quotient_offset2",
1508acf5cb9SYassine Oudjana            "cpr_quotient_offset3",
1518acf5cb9SYassine Oudjana            "cpr_init_voltage1",
1528acf5cb9SYassine Oudjana            "cpr_init_voltage2",
1538acf5cb9SYassine Oudjana            "cpr_init_voltage3",
1548acf5cb9SYassine Oudjana            "cpr_quotient1",
1558acf5cb9SYassine Oudjana            "cpr_quotient2",
1568acf5cb9SYassine Oudjana            "cpr_quotient3",
1578acf5cb9SYassine Oudjana            "cpr_ring_osc1",
1588acf5cb9SYassine Oudjana            "cpr_ring_osc2",
1598acf5cb9SYassine Oudjana            "cpr_ring_osc3",
1608acf5cb9SYassine Oudjana            "cpr_fuse_revision";
1618acf5cb9SYassine Oudjana    };
162