xref: /freebsd/sys/contrib/device-tree/Bindings/soc/qcom/qcom,smd-rpm.yaml (revision 3c4ba5f55438f7afd4f4b0b56f88f2bb505fd6a6)
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
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 information for the RPM edge should be filled out.  See qcom,smd.yaml
16  for the required edge properties.  All SMD related properties will reside
17  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-qcm2290
49      - qcom,rpm-qcs404
50
51  clock-controller:
52    $ref: /schemas/clock/qcom,rpmcc.yaml#
53    unevaluatedProperties: false
54
55  power-controller:
56    $ref: /schemas/power/qcom,rpmpd.yaml#
57
58  qcom,smd-channels:
59    $ref: /schemas/types.yaml#/definitions/string-array
60    description: Channel name used for the RPM communication
61    items:
62      - const: rpm_requests
63
64if:
65  properties:
66    compatible:
67      contains:
68        enum:
69          - qcom,rpm-apq8084
70          - qcom,rpm-msm8916
71          - qcom,rpm-msm8974
72          - qcom,rpm-msm8953
73then:
74  required:
75    - qcom,smd-channels
76
77required:
78  - compatible
79
80additionalProperties: false
81
82examples:
83  - |
84    #include <dt-bindings/interrupt-controller/arm-gic.h>
85    #include <dt-bindings/interrupt-controller/irq.h>
86
87    smd {
88        compatible = "qcom,smd";
89
90        rpm {
91            interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
92            qcom,ipc = <&apcs 8 0>;
93            qcom,smd-edge = <15>;
94
95            rpm-requests {
96                compatible = "qcom,rpm-msm8916";
97                qcom,smd-channels = "rpm_requests";
98
99                clock-controller {
100                    compatible = "qcom,rpmcc-msm8916", "qcom,rpmcc";
101                    #clock-cells = <1>;
102                    clocks = <&xo_board>;
103                    clock-names = "xo";
104                };
105
106                power-controller {
107                    compatible = "qcom,msm8916-rpmpd";
108                    #power-domain-cells = <1>;
109                    operating-points-v2 = <&rpmpd_opp_table>;
110
111                    rpmpd_opp_table: opp-table {
112                        compatible = "operating-points-v2";
113
114                        opp-1 {
115                            opp-level = <1>;
116                        };
117                        opp-2 {
118                            opp-level = <2>;
119                        };
120                    };
121                };
122            };
123        };
124    };
125