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