xref: /freebsd/sys/contrib/device-tree/Bindings/power/qcom,rpmpd.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/power/qcom,rpmpd.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: Qualcomm RPM/RPMh Power domains
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10b97ee269SEmmanuel Vadot  - Bjorn Andersson <andersson@kernel.org>
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel Vadotdescription:
13c66ec88fSEmmanuel Vadot  For RPM/RPMh Power domains, we communicate a performance state to RPM/RPMh
14c66ec88fSEmmanuel Vadot  which then translates it into a corresponding voltage on a rail.
15c66ec88fSEmmanuel Vadot
16c66ec88fSEmmanuel Vadotproperties:
17c66ec88fSEmmanuel Vadot  compatible:
18c66ec88fSEmmanuel Vadot    enum:
195956d97fSEmmanuel Vadot      - qcom,mdm9607-rpmpd
20c9ccf3a3SEmmanuel Vadot      - qcom,msm8226-rpmpd
21b97ee269SEmmanuel Vadot      - qcom,msm8909-rpmpd
225def4c47SEmmanuel Vadot      - qcom,msm8916-rpmpd
235def4c47SEmmanuel Vadot      - qcom,msm8939-rpmpd
248cc087a1SEmmanuel Vadot      - qcom,msm8953-rpmpd
25c66ec88fSEmmanuel Vadot      - qcom,msm8976-rpmpd
265def4c47SEmmanuel Vadot      - qcom,msm8994-rpmpd
27c66ec88fSEmmanuel Vadot      - qcom,msm8996-rpmpd
28c66ec88fSEmmanuel Vadot      - qcom,msm8998-rpmpd
29e67e8565SEmmanuel Vadot      - qcom,qcm2290-rpmpd
30c66ec88fSEmmanuel Vadot      - qcom,qcs404-rpmpd
318bab661aSEmmanuel Vadot      - qcom,qdu1000-rpmhpd
32d5b0e70fSEmmanuel Vadot      - qcom,sa8540p-rpmhpd
33*cb7aa33aSEmmanuel Vadot      - qcom,sa8775p-rpmhpd
345def4c47SEmmanuel Vadot      - qcom,sdm660-rpmpd
35c66ec88fSEmmanuel Vadot      - qcom,sc7180-rpmhpd
362eb4d8dcSEmmanuel Vadot      - qcom,sc7280-rpmhpd
375956d97fSEmmanuel Vadot      - qcom,sc8180x-rpmhpd
38d5b0e70fSEmmanuel Vadot      - qcom,sc8280xp-rpmhpd
398bab661aSEmmanuel Vadot      - qcom,sdm670-rpmhpd
40c66ec88fSEmmanuel Vadot      - qcom,sdm845-rpmhpd
415def4c47SEmmanuel Vadot      - qcom,sdx55-rpmhpd
42d5b0e70fSEmmanuel Vadot      - qcom,sdx65-rpmhpd
43354d7675SEmmanuel Vadot      - qcom,sm6115-rpmpd
44e67e8565SEmmanuel Vadot      - qcom,sm6125-rpmpd
458cc087a1SEmmanuel Vadot      - qcom,sm6350-rpmhpd
467ef62cebSEmmanuel Vadot      - qcom,sm6375-rpmpd
47c66ec88fSEmmanuel Vadot      - qcom,sm8150-rpmhpd
48c66ec88fSEmmanuel Vadot      - qcom,sm8250-rpmhpd
492eb4d8dcSEmmanuel Vadot      - qcom,sm8350-rpmhpd
50e67e8565SEmmanuel Vadot      - qcom,sm8450-rpmhpd
518bab661aSEmmanuel Vadot      - qcom,sm8550-rpmhpd
52c66ec88fSEmmanuel Vadot
53c66ec88fSEmmanuel Vadot  '#power-domain-cells':
54c66ec88fSEmmanuel Vadot    const: 1
55c66ec88fSEmmanuel Vadot
56c66ec88fSEmmanuel Vadot  operating-points-v2: true
57c66ec88fSEmmanuel Vadot
58c66ec88fSEmmanuel Vadot  opp-table:
59c66ec88fSEmmanuel Vadot    type: object
60c66ec88fSEmmanuel Vadot
61c66ec88fSEmmanuel Vadotrequired:
62c66ec88fSEmmanuel Vadot  - compatible
63c66ec88fSEmmanuel Vadot  - '#power-domain-cells'
64c66ec88fSEmmanuel Vadot  - operating-points-v2
65c66ec88fSEmmanuel Vadot
66c66ec88fSEmmanuel VadotadditionalProperties: false
67c66ec88fSEmmanuel Vadot
68c66ec88fSEmmanuel Vadotexamples:
69c66ec88fSEmmanuel Vadot  - |
70c66ec88fSEmmanuel Vadot
71c66ec88fSEmmanuel Vadot    // Example 1 (rpmh power domain controller and OPP table):
72c66ec88fSEmmanuel Vadot
73c66ec88fSEmmanuel Vadot    #include <dt-bindings/power/qcom-rpmpd.h>
74c66ec88fSEmmanuel Vadot
75c66ec88fSEmmanuel Vadot    rpmhpd: power-controller {
76c66ec88fSEmmanuel Vadot      compatible = "qcom,sdm845-rpmhpd";
77c66ec88fSEmmanuel Vadot      #power-domain-cells = <1>;
78c66ec88fSEmmanuel Vadot      operating-points-v2 = <&rpmhpd_opp_table>;
79c66ec88fSEmmanuel Vadot
80c66ec88fSEmmanuel Vadot      rpmhpd_opp_table: opp-table {
81c66ec88fSEmmanuel Vadot        compatible = "operating-points-v2";
82c66ec88fSEmmanuel Vadot
83c66ec88fSEmmanuel Vadot        rpmhpd_opp_ret: opp1 {
84c66ec88fSEmmanuel Vadot          opp-level = <RPMH_REGULATOR_LEVEL_RETENTION>;
85c66ec88fSEmmanuel Vadot        };
86c66ec88fSEmmanuel Vadot
87c66ec88fSEmmanuel Vadot        rpmhpd_opp_min_svs: opp2 {
88c66ec88fSEmmanuel Vadot          opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
89c66ec88fSEmmanuel Vadot        };
90c66ec88fSEmmanuel Vadot
91c66ec88fSEmmanuel Vadot        rpmhpd_opp_low_svs: opp3 {
92c66ec88fSEmmanuel Vadot          opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
93c66ec88fSEmmanuel Vadot        };
94c66ec88fSEmmanuel Vadot
95c66ec88fSEmmanuel Vadot        rpmhpd_opp_svs: opp4 {
96c66ec88fSEmmanuel Vadot          opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
97c66ec88fSEmmanuel Vadot        };
98c66ec88fSEmmanuel Vadot
99c66ec88fSEmmanuel Vadot        rpmhpd_opp_svs_l1: opp5 {
100c66ec88fSEmmanuel Vadot          opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
101c66ec88fSEmmanuel Vadot        };
102c66ec88fSEmmanuel Vadot
103c66ec88fSEmmanuel Vadot        rpmhpd_opp_nom: opp6 {
104c66ec88fSEmmanuel Vadot          opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
105c66ec88fSEmmanuel Vadot        };
106c66ec88fSEmmanuel Vadot
107c66ec88fSEmmanuel Vadot        rpmhpd_opp_nom_l1: opp7 {
108c66ec88fSEmmanuel Vadot          opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
109c66ec88fSEmmanuel Vadot        };
110c66ec88fSEmmanuel Vadot
111c66ec88fSEmmanuel Vadot        rpmhpd_opp_nom_l2: opp8 {
112c66ec88fSEmmanuel Vadot          opp-level = <RPMH_REGULATOR_LEVEL_NOM_L2>;
113c66ec88fSEmmanuel Vadot        };
114c66ec88fSEmmanuel Vadot
115c66ec88fSEmmanuel Vadot        rpmhpd_opp_turbo: opp9 {
116c66ec88fSEmmanuel Vadot          opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
117c66ec88fSEmmanuel Vadot        };
118c66ec88fSEmmanuel Vadot
119c66ec88fSEmmanuel Vadot        rpmhpd_opp_turbo_l1: opp10 {
120c66ec88fSEmmanuel Vadot          opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
121c66ec88fSEmmanuel Vadot        };
122c66ec88fSEmmanuel Vadot      };
123c66ec88fSEmmanuel Vadot    };
124c66ec88fSEmmanuel Vadot
125c66ec88fSEmmanuel Vadot  - |
126c66ec88fSEmmanuel Vadot
127c66ec88fSEmmanuel Vadot    // Example 2 (rpm power domain controller and OPP table):
128c66ec88fSEmmanuel Vadot
129c66ec88fSEmmanuel Vadot    rpmpd: power-controller {
130c66ec88fSEmmanuel Vadot      compatible = "qcom,msm8996-rpmpd";
131c66ec88fSEmmanuel Vadot      #power-domain-cells = <1>;
132c66ec88fSEmmanuel Vadot      operating-points-v2 = <&rpmpd_opp_table>;
133c66ec88fSEmmanuel Vadot
134c66ec88fSEmmanuel Vadot      rpmpd_opp_table: opp-table {
135c66ec88fSEmmanuel Vadot        compatible = "operating-points-v2";
136c66ec88fSEmmanuel Vadot
137c66ec88fSEmmanuel Vadot        rpmpd_opp_low: opp1 {
138c66ec88fSEmmanuel Vadot          opp-level = <1>;
139c66ec88fSEmmanuel Vadot        };
140c66ec88fSEmmanuel Vadot
141c66ec88fSEmmanuel Vadot        rpmpd_opp_ret: opp2 {
142c66ec88fSEmmanuel Vadot          opp-level = <2>;
143c66ec88fSEmmanuel Vadot        };
144c66ec88fSEmmanuel Vadot
145c66ec88fSEmmanuel Vadot        rpmpd_opp_svs: opp3 {
146c66ec88fSEmmanuel Vadot          opp-level = <3>;
147c66ec88fSEmmanuel Vadot        };
148c66ec88fSEmmanuel Vadot
149c66ec88fSEmmanuel Vadot        rpmpd_opp_normal: opp4 {
150c66ec88fSEmmanuel Vadot          opp-level = <4>;
151c66ec88fSEmmanuel Vadot        };
152c66ec88fSEmmanuel Vadot
153c66ec88fSEmmanuel Vadot        rpmpd_opp_high: opp5 {
154c66ec88fSEmmanuel Vadot          opp-level = <5>;
155c66ec88fSEmmanuel Vadot        };
156c66ec88fSEmmanuel Vadot
157c66ec88fSEmmanuel Vadot        rpmpd_opp_turbo: opp6 {
158c66ec88fSEmmanuel Vadot          opp-level = <6>;
159c66ec88fSEmmanuel Vadot        };
160c66ec88fSEmmanuel Vadot      };
161c66ec88fSEmmanuel Vadot    };
162c66ec88fSEmmanuel Vadot
163c66ec88fSEmmanuel Vadot  - |
164c66ec88fSEmmanuel Vadot
165c66ec88fSEmmanuel Vadot    // Example 3 (Client/Consumer device using OPP table):
166c66ec88fSEmmanuel Vadot
167c66ec88fSEmmanuel Vadot    leaky-device0@12350000 {
168c66ec88fSEmmanuel Vadot      compatible = "foo,i-leak-current";
169c66ec88fSEmmanuel Vadot      reg = <0x12350000 0x1000>;
170c66ec88fSEmmanuel Vadot      power-domains = <&rpmhpd 0>;
171c66ec88fSEmmanuel Vadot      operating-points-v2 = <&leaky_opp_table>;
172c66ec88fSEmmanuel Vadot    };
173c66ec88fSEmmanuel Vadot
174c66ec88fSEmmanuel Vadot    leaky_opp_table: opp-table {
175c66ec88fSEmmanuel Vadot      compatible = "operating-points-v2";
176c66ec88fSEmmanuel Vadot      opp1 {
177c66ec88fSEmmanuel Vadot        opp-hz = /bits/ 64 <144000>;
178c66ec88fSEmmanuel Vadot        required-opps = <&rpmhpd_opp_low>;
179c66ec88fSEmmanuel Vadot      };
180c66ec88fSEmmanuel Vadot
181c66ec88fSEmmanuel Vadot      opp2 {
182c66ec88fSEmmanuel Vadot        opp-hz = /bits/ 64 <400000>;
183c66ec88fSEmmanuel Vadot        required-opps = <&rpmhpd_opp_ret>;
184c66ec88fSEmmanuel Vadot      };
185c66ec88fSEmmanuel Vadot
186c66ec88fSEmmanuel Vadot      opp3 {
187c66ec88fSEmmanuel Vadot        opp-hz = /bits/ 64 <20000000>;
188c66ec88fSEmmanuel Vadot        required-opps = <&rpmpd_opp_svs>;
189c66ec88fSEmmanuel Vadot      };
190c66ec88fSEmmanuel Vadot
191c66ec88fSEmmanuel Vadot      opp4 {
192c66ec88fSEmmanuel Vadot        opp-hz = /bits/ 64 <25000000>;
193c66ec88fSEmmanuel Vadot        required-opps = <&rpmpd_opp_normal>;
194c66ec88fSEmmanuel Vadot      };
195c66ec88fSEmmanuel Vadot    };
196c66ec88fSEmmanuel Vadot...
197