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