1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/clock/qcom,rpmcc.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm RPM Clock Controller
8
9maintainers:
10  - Bjorn Andersson <[email protected]>
11  - Krzysztof Kozlowski <[email protected]>
12
13description: |
14  The clock enumerators are defined in <dt-bindings/clock/qcom,rpmcc.h> and
15  come in pairs:: FOO_CLK followed by FOO_A_CLK. The latter clock is
16  an "active" clock, which means that the consumer only care that the clock is
17  available when the apps CPU subsystem is active, i.e. not suspended or in
18  deep idle. If it is important that the clock keeps running during system
19  suspend, you need to specify the non-active clock, the one not containing
20  *_A_* in the enumerator name.
21
22properties:
23  compatible:
24    items:
25      - enum:
26          - qcom,rpmcc-apq8060
27          - qcom,rpmcc-apq8064
28          - qcom,rpmcc-ipq806x
29          - qcom,rpmcc-mdm9607
30          - qcom,rpmcc-msm8226
31          - qcom,rpmcc-msm8660
32          - qcom,rpmcc-msm8909
33          - qcom,rpmcc-msm8916
34          - qcom,rpmcc-msm8917
35          - qcom,rpmcc-msm8936
36          - qcom,rpmcc-msm8937
37          - qcom,rpmcc-msm8940
38          - qcom,rpmcc-msm8953
39          - qcom,rpmcc-msm8974
40          - qcom,rpmcc-msm8976
41          - qcom,rpmcc-msm8992
42          - qcom,rpmcc-msm8994
43          - qcom,rpmcc-msm8996
44          - qcom,rpmcc-msm8998
45          - qcom,rpmcc-qcm2290
46          - qcom,rpmcc-qcs404
47          - qcom,rpmcc-sdm660
48          - qcom,rpmcc-sm6115
49          - qcom,rpmcc-sm6125
50          - qcom,rpmcc-sm6375
51      - const: qcom,rpmcc
52
53  '#clock-cells':
54    const: 1
55
56  clocks:
57    minItems: 1
58    maxItems: 2
59
60  clock-names:
61    minItems: 1
62    maxItems: 2
63
64required:
65  - compatible
66  - '#clock-cells'
67
68allOf:
69  - if:
70      properties:
71        compatible:
72          contains:
73            enum:
74              - qcom,rpmcc-apq8060
75              - qcom,rpmcc-ipq806x
76              - qcom,rpmcc-msm8660
77
78    then:
79      properties:
80        clocks:
81          items:
82            - description: pxo clock
83
84        clock-names:
85          items:
86            - const: pxo
87
88  - if:
89      properties:
90        compatible:
91          contains:
92            const: qcom,rpmcc-apq8064
93    then:
94      properties:
95        clocks:
96          items:
97            - description: pxo clock
98            - description: cxo clock
99
100        clock-names:
101          items:
102            - const: pxo
103            - const: cxo
104
105  - if:
106      properties:
107        compatible:
108          contains:
109            enum:
110              - qcom,rpmcc-mdm9607
111              - qcom,rpmcc-msm8226
112              - qcom,rpmcc-msm8916
113              - qcom,rpmcc-msm8917
114              - qcom,rpmcc-msm8936
115              - qcom,rpmcc-msm8937
116              - qcom,rpmcc-msm8940
117              - qcom,rpmcc-msm8953
118              - qcom,rpmcc-msm8974
119              - qcom,rpmcc-msm8976
120              - qcom,rpmcc-msm8992
121              - qcom,rpmcc-msm8994
122              - qcom,rpmcc-msm8996
123              - qcom,rpmcc-msm8998
124              - qcom,rpmcc-qcm2290
125              - qcom,rpmcc-qcs404
126              - qcom,rpmcc-sdm660
127              - qcom,rpmcc-sm6115
128              - qcom,rpmcc-sm6125
129
130    then:
131      properties:
132        clocks:
133          items:
134            - description: xo clock
135
136        clock-names:
137          items:
138            - const: xo
139
140additionalProperties: false
141
142examples:
143  - |
144    rpm {
145        rpm-requests {
146            compatible = "qcom,rpm-msm8916", "qcom,smd-rpm";
147            qcom,smd-channels = "rpm_requests";
148
149            clock-controller {
150                compatible = "qcom,rpmcc-msm8916", "qcom,rpmcc";
151                #clock-cells = <1>;
152            };
153        };
154    };
155
156  - |
157    rpm {
158        clock-controller {
159            compatible = "qcom,rpmcc-ipq806x", "qcom,rpmcc";
160            #clock-cells = <1>;
161            clocks = <&pxo_board>;
162            clock-names = "pxo";
163        };
164    };
165