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