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-ipq9574
37      - qcom,rpm-msm8226
38      - qcom,rpm-msm8909
39      - qcom,rpm-msm8916
40      - qcom,rpm-msm8936
41      - qcom,rpm-msm8953
42      - qcom,rpm-msm8974
43      - qcom,rpm-msm8976
44      - qcom,rpm-msm8994
45      - qcom,rpm-msm8996
46      - qcom,rpm-msm8998
47      - qcom,rpm-sdm660
48      - qcom,rpm-sm6115
49      - qcom,rpm-sm6125
50      - qcom,rpm-sm6375
51      - qcom,rpm-qcm2290
52      - qcom,rpm-qcs404
53
54  clock-controller:
55    $ref: /schemas/clock/qcom,rpmcc.yaml#
56    unevaluatedProperties: false
57
58  power-controller:
59    $ref: /schemas/power/qcom,rpmpd.yaml#
60
61  qcom,glink-channels:
62    $ref: /schemas/types.yaml#/definitions/string-array
63    description: Channel name used for the RPM communication
64    items:
65      - const: rpm_requests
66
67  qcom,smd-channels:
68    $ref: /schemas/types.yaml#/definitions/string-array
69    description: Channel name used for the RPM communication
70    items:
71      - const: rpm_requests
72
73patternProperties:
74  "^regulators(-[01])?$":
75    $ref: /schemas/regulator/qcom,smd-rpm-regulator.yaml#
76    unevaluatedProperties: false
77
78if:
79  properties:
80    compatible:
81      contains:
82        enum:
83          - qcom,rpm-apq8084
84          - qcom,rpm-msm8226
85          - qcom,rpm-msm8916
86          - qcom,rpm-msm8936
87          - qcom,rpm-msm8974
88          - qcom,rpm-msm8976
89          - qcom,rpm-msm8953
90          - qcom,rpm-msm8994
91then:
92  properties:
93    qcom,glink-channels: false
94  required:
95    - qcom,smd-channels
96else:
97  properties:
98    qcom,smd-channels: false
99  required:
100    - qcom,glink-channels
101
102required:
103  - compatible
104
105additionalProperties: false
106
107examples:
108  - |
109    #include <dt-bindings/interrupt-controller/arm-gic.h>
110    #include <dt-bindings/interrupt-controller/irq.h>
111
112    smd {
113        compatible = "qcom,smd";
114
115        rpm {
116            interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
117            qcom,ipc = <&apcs 8 0>;
118            qcom,smd-edge = <15>;
119
120            rpm-requests {
121                compatible = "qcom,rpm-msm8916";
122                qcom,smd-channels = "rpm_requests";
123
124                clock-controller {
125                    compatible = "qcom,rpmcc-msm8916", "qcom,rpmcc";
126                    #clock-cells = <1>;
127                    clocks = <&xo_board>;
128                    clock-names = "xo";
129                };
130
131                power-controller {
132                    compatible = "qcom,msm8916-rpmpd";
133                    #power-domain-cells = <1>;
134                    operating-points-v2 = <&rpmpd_opp_table>;
135
136                    rpmpd_opp_table: opp-table {
137                        compatible = "operating-points-v2";
138
139                        opp-1 {
140                            opp-level = <1>;
141                        };
142                        opp-2 {
143                            opp-level = <2>;
144                        };
145                    };
146                };
147            };
148        };
149    };
150