xref: /linux/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/power/qcom,rpmpd.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm RPM/RPMh Power domains
8
9maintainers:
10  - Bjorn Andersson <andersson@kernel.org>
11
12description:
13  For RPM/RPMh Power domains, we communicate a performance state to RPM/RPMh
14  which then translates it into a corresponding voltage on a rail.
15
16properties:
17  compatible:
18    oneOf:
19      - enum:
20          - qcom,mdm9607-rpmpd
21          - qcom,msm8226-rpmpd
22          - qcom,msm8909-rpmpd
23          - qcom,msm8916-rpmpd
24          - qcom,msm8917-rpmpd
25          - qcom,msm8939-rpmpd
26          - qcom,msm8953-rpmpd
27          - qcom,msm8974-rpmpd
28          - qcom,msm8974pro-pma8084-rpmpd
29          - qcom,msm8976-rpmpd
30          - qcom,msm8994-rpmpd
31          - qcom,msm8996-rpmpd
32          - qcom,msm8998-rpmpd
33          - qcom,qcm2290-rpmpd
34          - qcom,qcs404-rpmpd
35          - qcom,qdu1000-rpmhpd
36          - qcom,qm215-rpmpd
37          - qcom,sa8155p-rpmhpd
38          - qcom,sa8540p-rpmhpd
39          - qcom,sa8775p-rpmhpd
40          - qcom,sc7180-rpmhpd
41          - qcom,sc7280-rpmhpd
42          - qcom,sc8180x-rpmhpd
43          - qcom,sc8280xp-rpmhpd
44          - qcom,sdm660-rpmpd
45          - qcom,sdm670-rpmhpd
46          - qcom,sdm845-rpmhpd
47          - qcom,sdx55-rpmhpd
48          - qcom,sdx65-rpmhpd
49          - qcom,sdx75-rpmhpd
50          - qcom,sm6115-rpmpd
51          - qcom,sm6125-rpmpd
52          - qcom,sm6350-rpmhpd
53          - qcom,sm6375-rpmpd
54          - qcom,sm7150-rpmhpd
55          - qcom,sm8150-rpmhpd
56          - qcom,sm8250-rpmhpd
57          - qcom,sm8350-rpmhpd
58          - qcom,sm8450-rpmhpd
59          - qcom,sm8550-rpmhpd
60          - qcom,sm8650-rpmhpd
61          - qcom,x1e80100-rpmhpd
62      - items:
63          - enum:
64              - qcom,msm8937-rpmpd
65          - const: qcom,msm8917-rpmpd
66
67  '#power-domain-cells':
68    const: 1
69
70  operating-points-v2: true
71
72  opp-table:
73    type: object
74
75required:
76  - compatible
77  - '#power-domain-cells'
78  - operating-points-v2
79
80additionalProperties: false
81
82examples:
83  - |
84
85    // Example 1 (rpmh power domain controller and OPP table):
86
87    #include <dt-bindings/power/qcom-rpmpd.h>
88
89    rpmhpd: power-controller {
90      compatible = "qcom,sdm845-rpmhpd";
91      #power-domain-cells = <1>;
92      operating-points-v2 = <&rpmhpd_opp_table>;
93
94      rpmhpd_opp_table: opp-table {
95        compatible = "operating-points-v2";
96
97        rpmhpd_opp_ret: opp1 {
98          opp-level = <RPMH_REGULATOR_LEVEL_RETENTION>;
99        };
100
101        rpmhpd_opp_min_svs: opp2 {
102          opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
103        };
104
105        rpmhpd_opp_low_svs: opp3 {
106          opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
107        };
108
109        rpmhpd_opp_svs: opp4 {
110          opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
111        };
112
113        rpmhpd_opp_svs_l1: opp5 {
114          opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
115        };
116
117        rpmhpd_opp_nom: opp6 {
118          opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
119        };
120
121        rpmhpd_opp_nom_l1: opp7 {
122          opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
123        };
124
125        rpmhpd_opp_nom_l2: opp8 {
126          opp-level = <RPMH_REGULATOR_LEVEL_NOM_L2>;
127        };
128
129        rpmhpd_opp_turbo: opp9 {
130          opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
131        };
132
133        rpmhpd_opp_turbo_l1: opp10 {
134          opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
135        };
136      };
137    };
138
139  - |
140
141    // Example 2 (rpm power domain controller and OPP table):
142
143    rpmpd: power-controller {
144      compatible = "qcom,msm8996-rpmpd";
145      #power-domain-cells = <1>;
146      operating-points-v2 = <&rpmpd_opp_table>;
147
148      rpmpd_opp_table: opp-table {
149        compatible = "operating-points-v2";
150
151        rpmpd_opp_low: opp1 {
152          opp-level = <1>;
153        };
154
155        rpmpd_opp_ret: opp2 {
156          opp-level = <2>;
157        };
158
159        rpmpd_opp_svs: opp3 {
160          opp-level = <3>;
161        };
162
163        rpmpd_opp_normal: opp4 {
164          opp-level = <4>;
165        };
166
167        rpmpd_opp_high: opp5 {
168          opp-level = <5>;
169        };
170
171        rpmpd_opp_turbo: opp6 {
172          opp-level = <6>;
173        };
174      };
175    };
176
177  - |
178
179    // Example 3 (Client/Consumer device using OPP table):
180
181    leaky-device0@12350000 {
182      compatible = "foo,i-leak-current";
183      reg = <0x12350000 0x1000>;
184      power-domains = <&rpmhpd 0>;
185      operating-points-v2 = <&leaky_opp_table>;
186    };
187
188    leaky_opp_table: opp-table {
189      compatible = "operating-points-v2";
190      opp1 {
191        opp-hz = /bits/ 64 <144000>;
192        required-opps = <&rpmhpd_opp_low>;
193      };
194
195      opp2 {
196        opp-hz = /bits/ 64 <400000>;
197        required-opps = <&rpmhpd_opp_ret>;
198      };
199
200      opp3 {
201        opp-hz = /bits/ 64 <20000000>;
202        required-opps = <&rpmpd_opp_svs>;
203      };
204
205      opp4 {
206        opp-hz = /bits/ 64 <25000000>;
207        required-opps = <&rpmpd_opp_normal>;
208      };
209    };
210...
211