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