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