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