xref: /linux/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml (revision 7f71507851fc7764b36a3221839607d3a45c2025)
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,qcs615-rpmhpd
36          - qcom,qcs8300-rpmhpd
37          - qcom,qdu1000-rpmhpd
38          - qcom,qm215-rpmpd
39          - qcom,sa8155p-rpmhpd
40          - qcom,sa8540p-rpmhpd
41          - qcom,sa8775p-rpmhpd
42          - qcom,sar2130p-rpmhpd
43          - qcom,sc7180-rpmhpd
44          - qcom,sc7280-rpmhpd
45          - qcom,sc8180x-rpmhpd
46          - qcom,sc8280xp-rpmhpd
47          - qcom,sdm660-rpmpd
48          - qcom,sdm670-rpmhpd
49          - qcom,sdm845-rpmhpd
50          - qcom,sdx55-rpmhpd
51          - qcom,sdx65-rpmhpd
52          - qcom,sdx75-rpmhpd
53          - qcom,sm6115-rpmpd
54          - qcom,sm6125-rpmpd
55          - qcom,sm6350-rpmhpd
56          - qcom,sm6375-rpmpd
57          - qcom,sm7150-rpmhpd
58          - qcom,sm8150-rpmhpd
59          - qcom,sm8250-rpmhpd
60          - qcom,sm8350-rpmhpd
61          - qcom,sm8450-rpmhpd
62          - qcom,sm8550-rpmhpd
63          - qcom,sm8650-rpmhpd
64          - qcom,sm8750-rpmhpd
65          - qcom,x1e80100-rpmhpd
66      - items:
67          - enum:
68              - qcom,msm8937-rpmpd
69          - const: qcom,msm8917-rpmpd
70
71  '#power-domain-cells':
72    const: 1
73
74  operating-points-v2: true
75
76  opp-table:
77    type: object
78
79required:
80  - compatible
81  - '#power-domain-cells'
82  - operating-points-v2
83
84additionalProperties: false
85
86examples:
87  - |
88
89    // Example 1 (rpmh power domain controller and OPP table):
90
91    #include <dt-bindings/power/qcom-rpmpd.h>
92
93    rpmhpd: power-controller {
94      compatible = "qcom,sdm845-rpmhpd";
95      #power-domain-cells = <1>;
96      operating-points-v2 = <&rpmhpd_opp_table>;
97
98      rpmhpd_opp_table: opp-table {
99        compatible = "operating-points-v2";
100
101        rpmhpd_opp_ret: opp1 {
102          opp-level = <RPMH_REGULATOR_LEVEL_RETENTION>;
103        };
104
105        rpmhpd_opp_min_svs: opp2 {
106          opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
107        };
108
109        rpmhpd_opp_low_svs: opp3 {
110          opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
111        };
112
113        rpmhpd_opp_svs: opp4 {
114          opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
115        };
116
117        rpmhpd_opp_svs_l1: opp5 {
118          opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
119        };
120
121        rpmhpd_opp_nom: opp6 {
122          opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
123        };
124
125        rpmhpd_opp_nom_l1: opp7 {
126          opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
127        };
128
129        rpmhpd_opp_nom_l2: opp8 {
130          opp-level = <RPMH_REGULATOR_LEVEL_NOM_L2>;
131        };
132
133        rpmhpd_opp_turbo: opp9 {
134          opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
135        };
136
137        rpmhpd_opp_turbo_l1: opp10 {
138          opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
139        };
140      };
141    };
142
143  - |
144
145    // Example 2 (rpm power domain controller and OPP table):
146
147    rpmpd: power-controller {
148      compatible = "qcom,msm8996-rpmpd";
149      #power-domain-cells = <1>;
150      operating-points-v2 = <&rpmpd_opp_table>;
151
152      rpmpd_opp_table: opp-table {
153        compatible = "operating-points-v2";
154
155        rpmpd_opp_low: opp1 {
156          opp-level = <1>;
157        };
158
159        rpmpd_opp_ret: opp2 {
160          opp-level = <2>;
161        };
162
163        rpmpd_opp_svs: opp3 {
164          opp-level = <3>;
165        };
166
167        rpmpd_opp_normal: opp4 {
168          opp-level = <4>;
169        };
170
171        rpmpd_opp_high: opp5 {
172          opp-level = <5>;
173        };
174
175        rpmpd_opp_turbo: opp6 {
176          opp-level = <6>;
177        };
178      };
179    };
180
181  - |
182
183    // Example 3 (Client/Consumer device using OPP table):
184
185    leaky-device0@12350000 {
186      compatible = "foo,i-leak-current";
187      reg = <0x12350000 0x1000>;
188      power-domains = <&rpmhpd 0>;
189      operating-points-v2 = <&leaky_opp_table>;
190    };
191
192    leaky_opp_table: opp-table {
193      compatible = "operating-points-v2";
194      opp1 {
195        opp-hz = /bits/ 64 <144000>;
196        required-opps = <&rpmhpd_opp_low>;
197      };
198
199      opp2 {
200        opp-hz = /bits/ 64 <400000>;
201        required-opps = <&rpmhpd_opp_ret>;
202      };
203
204      opp3 {
205        opp-hz = /bits/ 64 <20000000>;
206        required-opps = <&rpmpd_opp_svs>;
207      };
208
209      opp4 {
210        opp-hz = /bits/ 64 <25000000>;
211        required-opps = <&rpmpd_opp_normal>;
212      };
213    };
214...
215