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