xref: /linux/Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml (revision 9f2c9170934eace462499ba0bfe042cc72900173)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: "http://devicetree.org/schemas/soc/qcom/qcom,smd-rpm.yaml#"
5$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6
7title: Qualcomm Resource Power Manager (RPM) over SMD/GLINK
8
9description: |
10  This driver is used to interface with the Resource Power Manager (RPM) found
11  in various Qualcomm platforms. The RPM allows each component in the system
12  to vote for state of the system resources, such as clocks, regulators and bus
13  frequencies.
14
15  The SMD or GLINK information for the RPM edge should be filled out.  See
16  qcom,smd.yaml for the required edge properties.  All SMD/GLINK related
17  properties will reside within the RPM node itself.
18
19  The RPM exposes resources to its subnodes.  The rpm_requests node must be
20  present and this subnode may contain children that designate regulator
21  resources.
22
23  Refer to Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
24  for information on the regulator subnodes that can exist under the
25  rpm_requests.
26
27maintainers:
28  - Andy Gross <agross@kernel.org>
29  - Bjorn Andersson <bjorn.andersson@linaro.org>
30
31properties:
32  compatible:
33    enum:
34      - qcom,rpm-apq8084
35      - qcom,rpm-ipq6018
36      - qcom,rpm-msm8226
37      - qcom,rpm-msm8909
38      - qcom,rpm-msm8916
39      - qcom,rpm-msm8936
40      - qcom,rpm-msm8953
41      - qcom,rpm-msm8974
42      - qcom,rpm-msm8976
43      - qcom,rpm-msm8996
44      - qcom,rpm-msm8998
45      - qcom,rpm-sdm660
46      - qcom,rpm-sm6115
47      - qcom,rpm-sm6125
48      - qcom,rpm-sm6375
49      - qcom,rpm-qcm2290
50      - qcom,rpm-qcs404
51
52  clock-controller:
53    $ref: /schemas/clock/qcom,rpmcc.yaml#
54    unevaluatedProperties: false
55
56  power-controller:
57    $ref: /schemas/power/qcom,rpmpd.yaml#
58
59  qcom,glink-channels:
60    $ref: /schemas/types.yaml#/definitions/string-array
61    description: Channel name used for the RPM communication
62    items:
63      - const: rpm_requests
64
65  qcom,smd-channels:
66    $ref: /schemas/types.yaml#/definitions/string-array
67    description: Channel name used for the RPM communication
68    items:
69      - const: rpm_requests
70
71patternProperties:
72  "^regulators(-[01])?$":
73    $ref: /schemas/regulator/qcom,smd-rpm-regulator.yaml#
74    unevaluatedProperties: false
75
76if:
77  properties:
78    compatible:
79      contains:
80        enum:
81          - qcom,rpm-apq8084
82          - qcom,rpm-msm8916
83          - qcom,rpm-msm8974
84          - qcom,rpm-msm8976
85          - qcom,rpm-msm8953
86then:
87  properties:
88    qcom,glink-channels: false
89  required:
90    - qcom,smd-channels
91else:
92  properties:
93    qcom,smd-channels: false
94  required:
95    - qcom,glink-channels
96
97required:
98  - compatible
99
100additionalProperties: false
101
102examples:
103  - |
104    #include <dt-bindings/interrupt-controller/arm-gic.h>
105    #include <dt-bindings/interrupt-controller/irq.h>
106
107    smd {
108        compatible = "qcom,smd";
109
110        rpm {
111            interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
112            qcom,ipc = <&apcs 8 0>;
113            qcom,smd-edge = <15>;
114
115            rpm-requests {
116                compatible = "qcom,rpm-msm8916";
117                qcom,smd-channels = "rpm_requests";
118
119                clock-controller {
120                    compatible = "qcom,rpmcc-msm8916", "qcom,rpmcc";
121                    #clock-cells = <1>;
122                    clocks = <&xo_board>;
123                    clock-names = "xo";
124                };
125
126                power-controller {
127                    compatible = "qcom,msm8916-rpmpd";
128                    #power-domain-cells = <1>;
129                    operating-points-v2 = <&rpmpd_opp_table>;
130
131                    rpmpd_opp_table: opp-table {
132                        compatible = "operating-points-v2";
133
134                        opp-1 {
135                            opp-level = <1>;
136                        };
137                        opp-2 {
138                            opp-level = <2>;
139                        };
140                    };
141                };
142            };
143        };
144    };
145