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