|
| 1 | +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | +%YAML 1.2 |
| 3 | +--- |
| 4 | +$id: http://devicetree.org/schemas/power/avs/qcom,cpr.yaml# |
| 5 | +$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | + |
| 7 | +title: Qualcomm Core Power Reduction (CPR) bindings |
| 8 | + |
| 9 | +maintainers: |
| 10 | + - Niklas Cassel <nks@flawful.org> |
| 11 | + |
| 12 | +description: | |
| 13 | + CPR (Core Power Reduction) is a technology to reduce core power on a CPU |
| 14 | + or other device. Each OPP of a device corresponds to a "corner" that has |
| 15 | + a range of valid voltages for a particular frequency. While the device is |
| 16 | + running at a particular frequency, CPR monitors dynamic factors such as |
| 17 | + temperature, etc. and suggests adjustments to the voltage to save power |
| 18 | + and meet silicon characteristic requirements. |
| 19 | +
|
| 20 | +properties: |
| 21 | + compatible: |
| 22 | + items: |
| 23 | + - enum: |
| 24 | + - qcom,qcs404-cpr |
| 25 | + - const: qcom,cpr |
| 26 | + |
| 27 | + reg: |
| 28 | + description: Base address and size of the RBCPR register region. |
| 29 | + maxItems: 1 |
| 30 | + |
| 31 | + interrupts: |
| 32 | + maxItems: 1 |
| 33 | + |
| 34 | + clocks: |
| 35 | + items: |
| 36 | + - description: Reference clock. |
| 37 | + |
| 38 | + clock-names: |
| 39 | + items: |
| 40 | + - const: ref |
| 41 | + |
| 42 | + vdd-apc-supply: |
| 43 | + description: APC regulator supply. |
| 44 | + |
| 45 | + '#power-domain-cells': |
| 46 | + const: 0 |
| 47 | + |
| 48 | + operating-points-v2: |
| 49 | + description: | |
| 50 | + A phandle to the OPP table containing the performance states |
| 51 | + supported by the CPR power domain. |
| 52 | +
|
| 53 | + acc-syscon: |
| 54 | + description: A phandle to the syscon used for writing ACC settings. |
| 55 | + |
| 56 | + nvmem-cells: |
| 57 | + items: |
| 58 | + - description: Corner 1 quotient offset |
| 59 | + - description: Corner 2 quotient offset |
| 60 | + - description: Corner 3 quotient offset |
| 61 | + - description: Corner 1 initial voltage |
| 62 | + - description: Corner 2 initial voltage |
| 63 | + - description: Corner 3 initial voltage |
| 64 | + - description: Corner 1 quotient |
| 65 | + - description: Corner 2 quotient |
| 66 | + - description: Corner 3 quotient |
| 67 | + - description: Corner 1 ring oscillator |
| 68 | + - description: Corner 2 ring oscillator |
| 69 | + - description: Corner 3 ring oscillator |
| 70 | + - description: Fuse revision |
| 71 | + |
| 72 | + nvmem-cell-names: |
| 73 | + items: |
| 74 | + - const: cpr_quotient_offset1 |
| 75 | + - const: cpr_quotient_offset2 |
| 76 | + - const: cpr_quotient_offset3 |
| 77 | + - const: cpr_init_voltage1 |
| 78 | + - const: cpr_init_voltage2 |
| 79 | + - const: cpr_init_voltage3 |
| 80 | + - const: cpr_quotient1 |
| 81 | + - const: cpr_quotient2 |
| 82 | + - const: cpr_quotient3 |
| 83 | + - const: cpr_ring_osc1 |
| 84 | + - const: cpr_ring_osc2 |
| 85 | + - const: cpr_ring_osc3 |
| 86 | + - const: cpr_fuse_revision |
| 87 | + |
| 88 | +required: |
| 89 | + - compatible |
| 90 | + - reg |
| 91 | + - interrupts |
| 92 | + - clocks |
| 93 | + - clock-names |
| 94 | + - vdd-apc-supply |
| 95 | + - '#power-domain-cells' |
| 96 | + - operating-points-v2 |
| 97 | + - nvmem-cells |
| 98 | + - nvmem-cell-names |
| 99 | + |
| 100 | +additionalProperties: false |
| 101 | + |
| 102 | +examples: |
| 103 | + - | |
| 104 | + #include <dt-bindings/interrupt-controller/arm-gic.h> |
| 105 | +
|
| 106 | + cpr_opp_table: opp-table-cpr { |
| 107 | + compatible = "operating-points-v2-qcom-level"; |
| 108 | +
|
| 109 | + cpr_opp1: opp1 { |
| 110 | + opp-level = <1>; |
| 111 | + qcom,opp-fuse-level = <1>; |
| 112 | + }; |
| 113 | + cpr_opp2: opp2 { |
| 114 | + opp-level = <2>; |
| 115 | + qcom,opp-fuse-level = <2>; |
| 116 | + }; |
| 117 | + cpr_opp3: opp3 { |
| 118 | + opp-level = <3>; |
| 119 | + qcom,opp-fuse-level = <3>; |
| 120 | + }; |
| 121 | + }; |
| 122 | +
|
| 123 | + power-controller@b018000 { |
| 124 | + compatible = "qcom,qcs404-cpr", "qcom,cpr"; |
| 125 | + reg = <0x0b018000 0x1000>; |
| 126 | + interrupts = <0 15 IRQ_TYPE_EDGE_RISING>; |
| 127 | + clocks = <&xo_board>; |
| 128 | + clock-names = "ref"; |
| 129 | + vdd-apc-supply = <&pms405_s3>; |
| 130 | + #power-domain-cells = <0>; |
| 131 | + operating-points-v2 = <&cpr_opp_table>; |
| 132 | + acc-syscon = <&tcsr>; |
| 133 | +
|
| 134 | + nvmem-cells = <&cpr_efuse_quot_offset1>, |
| 135 | + <&cpr_efuse_quot_offset2>, |
| 136 | + <&cpr_efuse_quot_offset3>, |
| 137 | + <&cpr_efuse_init_voltage1>, |
| 138 | + <&cpr_efuse_init_voltage2>, |
| 139 | + <&cpr_efuse_init_voltage3>, |
| 140 | + <&cpr_efuse_quot1>, |
| 141 | + <&cpr_efuse_quot2>, |
| 142 | + <&cpr_efuse_quot3>, |
| 143 | + <&cpr_efuse_ring1>, |
| 144 | + <&cpr_efuse_ring2>, |
| 145 | + <&cpr_efuse_ring3>, |
| 146 | + <&cpr_efuse_revision>; |
| 147 | + nvmem-cell-names = "cpr_quotient_offset1", |
| 148 | + "cpr_quotient_offset2", |
| 149 | + "cpr_quotient_offset3", |
| 150 | + "cpr_init_voltage1", |
| 151 | + "cpr_init_voltage2", |
| 152 | + "cpr_init_voltage3", |
| 153 | + "cpr_quotient1", |
| 154 | + "cpr_quotient2", |
| 155 | + "cpr_quotient3", |
| 156 | + "cpr_ring_osc1", |
| 157 | + "cpr_ring_osc2", |
| 158 | + "cpr_ring_osc3", |
| 159 | + "cpr_fuse_revision"; |
| 160 | + }; |
0 commit comments