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