xref: /linux/Documentation/devicetree/bindings/clock/samsung,exynos2200-cmu.yaml (revision fa79e55d467366a2c52c68a261a0d6ea5f8a6534)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/clock/samsung,exynos2200-cmu.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Samsung Exynos2200 SoC clock controller
8
9maintainers:
10  - Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
11  - Chanwoo Choi <cw00.choi@samsung.com>
12  - Krzysztof Kozlowski <krzk@kernel.org>
13
14description: |
15  Exynos2200 clock controller is comprised of several CMU units, generating
16  clocks for different domains. Those CMU units are modeled as separate device
17  tree nodes, and might depend on each other. The root clocks in that root tree
18  are two external clocks: XTCXO (76.8 MHz) and RTCCLK (32768 Hz). XTCXO must be
19  defined as a fixed-rate clock in dts, whereas RTCCLK originates from PMIC.
20
21  CMU_TOP is a top-level CMU, where all base clocks are prepared using PLLs and
22  dividers; all other clocks of function blocks (other CMUs) are usually
23  derived from CMU_TOP.
24
25  Each clock is assigned an identifier and client nodes can use this identifier
26  to specify the clock which they consume. All clocks available for usage
27  in clock consumer nodes are defined as preprocessor macros in
28  'include/dt-bindings/clock/samsung,exynos2200-cmu.h' header.
29
30properties:
31  compatible:
32    enum:
33      - samsung,exynos2200-cmu-alive
34      - samsung,exynos2200-cmu-cmgp
35      - samsung,exynos2200-cmu-hsi0
36      - samsung,exynos2200-cmu-peric0
37      - samsung,exynos2200-cmu-peric1
38      - samsung,exynos2200-cmu-peric2
39      - samsung,exynos2200-cmu-peris
40      - samsung,exynos2200-cmu-top
41      - samsung,exynos2200-cmu-ufs
42      - samsung,exynos2200-cmu-vts
43
44  clocks:
45    minItems: 1
46    maxItems: 6
47
48  clock-names:
49    minItems: 1
50    maxItems: 6
51
52  "#clock-cells":
53    const: 1
54
55  reg:
56    maxItems: 1
57
58required:
59  - compatible
60  - clocks
61  - clock-names
62  - reg
63  - "#clock-cells"
64
65allOf:
66  - if:
67      properties:
68        compatible:
69          contains:
70            const: samsung,exynos2200-cmu-alive
71
72    then:
73      properties:
74        clocks:
75          items:
76            - description: External reference clock (76.8 MHz)
77            - description: CMU_ALIVE NOC clock (from CMU_TOP)
78
79        clock-names:
80          items:
81            - const: oscclk
82            - const: noc
83
84  - if:
85      properties:
86        compatible:
87          contains:
88            const: samsung,exynos2200-cmu-cmgp
89
90    then:
91      properties:
92        clocks:
93          items:
94            - description: External reference clock (76.8 MHz)
95            - description: CMU_CMGP NOC clock (from CMU_TOP)
96            - description: CMU_CMGP PERI clock (from CMU_TOP)
97
98        clock-names:
99          items:
100            - const: oscclk
101            - const: noc
102            - const: peri
103
104  - if:
105      properties:
106        compatible:
107          contains:
108            const: samsung,exynos2200-cmu-hsi0
109
110    then:
111      properties:
112        clocks:
113          items:
114            - description: External reference clock (76.8 MHz)
115            - description: External RTC clock (32768 Hz)
116            - description: CMU_HSI0 NOC clock (from CMU_TOP)
117            - description: CMU_HSI0 DPGTC clock (from CMU_TOP)
118            - description: CMU_HSI0 DPOSC clock (from CMU_TOP)
119            - description: CMU_HSI0 USB32DRD clock (from CMU_TOP)
120
121        clock-names:
122          items:
123            - const: oscclk
124            - const: rtcclk
125            - const: noc
126            - const: dpgtc
127            - const: dposc
128            - const: usb
129
130  - if:
131      properties:
132        compatible:
133          contains:
134            enum:
135              - samsung,exynos2200-cmu-peric0
136              - samsung,exynos2200-cmu-peric1
137              - samsung,exynos2200-cmu-peric2
138
139    then:
140      properties:
141        clocks:
142          items:
143            - description: External reference clock (76.8 MHz)
144            - description: CMU_PERICn NOC clock (from CMU_TOP)
145            - description: CMU_PERICn IP0 clock (from CMU_TOP)
146            - description: CMU_PERICn IP1 clock (from CMU_TOP)
147
148        clock-names:
149          items:
150            - const: oscclk
151            - const: noc
152            - const: ip0
153            - const: ip1
154
155  - if:
156      properties:
157        compatible:
158          contains:
159            const: samsung,exynos2200-cmu-peris
160
161    then:
162      properties:
163        clocks:
164          items:
165            - description: External reference clock (25.6 MHz)
166            - description: CMU_PERIS NOC clock (from CMU_TOP)
167            - description: CMU_PERIS GIC clock (from CMU_TOP)
168
169        clock-names:
170          items:
171            - const: tcxo_div3
172            - const: noc
173            - const: gic
174
175  - if:
176      properties:
177        compatible:
178          contains:
179            const: samsung,exynos2200-cmu-top
180
181    then:
182      properties:
183        clocks:
184          items:
185            - description: External reference clock (76.8 MHz)
186
187        clock-names:
188          items:
189            - const: oscclk
190
191  - if:
192      properties:
193        compatible:
194          contains:
195            const: samsung,exynos2200-cmu-ufs
196
197    then:
198      properties:
199        clocks:
200          items:
201            - description: External reference clock (76.8 MHz)
202            - description: CMU_UFS NOC clock (from CMU_TOP)
203            - description: CMU_UFS MMC clock (from CMU_TOP)
204            - description: CMU_UFS UFS clock (from CMU_TOP)
205
206        clock-names:
207          items:
208            - const: oscclk
209            - const: noc
210            - const: mmc
211            - const: ufs
212
213  - if:
214      properties:
215        compatible:
216          contains:
217            const: samsung,exynos2200-cmu-vts
218
219    then:
220      properties:
221        clocks:
222          items:
223            - description: External reference clock (76.8 MHz)
224            - description: CMU_VTS DMIC clock (from CMU_TOP)
225
226        clock-names:
227          items:
228            - const: oscclk
229            - const: dmic
230
231additionalProperties: false
232
233examples:
234  - |
235    #include <dt-bindings/clock/samsung,exynos2200-cmu.h>
236
237    cmu_vts: clock-controller@15300000 {
238        compatible = "samsung,exynos2200-cmu-vts";
239        reg = <0x15300000 0x8000>;
240        #clock-cells = <1>;
241
242        clocks = <&oscclk>,
243                 <&cmu_top CLK_DOUT_CMU_VTS_DMIC>;
244        clock-names = "oscclk", "dmic";
245    };
246
247...
248