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 <bjorn.andersson@linaro.org>
11  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
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-msm8953
37          - qcom,rpmcc-msm8974
38          - qcom,rpmcc-msm8976
39          - qcom,rpmcc-msm8992
40          - qcom,rpmcc-msm8994
41          - qcom,rpmcc-msm8996
42          - qcom,rpmcc-msm8998
43          - qcom,rpmcc-qcm2290
44          - qcom,rpmcc-qcs404
45          - qcom,rpmcc-sdm660
46          - qcom,rpmcc-sm6115
47          - qcom,rpmcc-sm6125
48          - qcom,rpmcc-sm6375
49      - const: qcom,rpmcc
50
51  '#clock-cells':
52    const: 1
53
54  clocks:
55    minItems: 1
56    maxItems: 2
57
58  clock-names:
59    minItems: 1
60    maxItems: 2
61
62required:
63  - compatible
64  - '#clock-cells'
65
66allOf:
67  - if:
68      properties:
69        compatible:
70          contains:
71            enum:
72              - qcom,rpmcc-apq8060
73              - qcom,rpmcc-ipq806x
74              - qcom,rpmcc-msm8660
75
76    then:
77      properties:
78        clocks:
79          items:
80            - description: pxo clock
81
82        clock-names:
83          items:
84            - const: pxo
85
86  - if:
87      properties:
88        compatible:
89          contains:
90            const: qcom,rpmcc-apq8064
91    then:
92      properties:
93        clocks:
94          items:
95            - description: pxo clock
96            - description: cxo clock
97
98        clock-names:
99          items:
100            - const: pxo
101            - const: cxo
102
103  - if:
104      properties:
105        compatible:
106          contains:
107            enum:
108              - qcom,rpmcc-mdm9607
109              - qcom,rpmcc-msm8226
110              - qcom,rpmcc-msm8916
111              - qcom,rpmcc-msm8917
112              - qcom,rpmcc-msm8936
113              - qcom,rpmcc-msm8953
114              - qcom,rpmcc-msm8974
115              - qcom,rpmcc-msm8976
116              - qcom,rpmcc-msm8992
117              - qcom,rpmcc-msm8994
118              - qcom,rpmcc-msm8996
119              - qcom,rpmcc-msm8998
120              - qcom,rpmcc-qcm2290
121              - qcom,rpmcc-qcs404
122              - qcom,rpmcc-sdm660
123              - qcom,rpmcc-sm6115
124              - qcom,rpmcc-sm6125
125
126    then:
127      properties:
128        clocks:
129          items:
130            - description: xo clock
131
132        clock-names:
133          items:
134            - const: xo
135
136additionalProperties: false
137
138examples:
139  - |
140    rpm {
141        rpm-requests {
142            compatible = "qcom,rpm-msm8916";
143            qcom,smd-channels = "rpm_requests";
144
145            clock-controller {
146                compatible = "qcom,rpmcc-msm8916", "qcom,rpmcc";
147                #clock-cells = <1>;
148            };
149        };
150    };
151
152  - |
153    rpm {
154        clock-controller {
155            compatible = "qcom,rpmcc-ipq806x", "qcom,rpmcc";
156            #clock-cells = <1>;
157            clocks = <&pxo_board>;
158            clock-names = "pxo";
159        };
160    };
161