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,exynos850-clock.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Samsung Exynos850 SoC clock controller
8
9maintainers:
10  - Sam Protsenko <semen.protsenko@linaro.org>
11  - Chanwoo Choi <cw00.choi@samsung.com>
12  - Krzysztof Kozlowski <krzk@kernel.org>
13  - Sylwester Nawrocki <s.nawrocki@samsung.com>
14  - Tomasz Figa <tomasz.figa@gmail.com>
15
16description: |
17  Exynos850 clock controller is comprised of several CMU units, generating
18  clocks for different domains. Those CMU units are modeled as separate device
19  tree nodes, and might depend on each other. Root clocks in that clock tree are
20  two external clocks:: OSCCLK (26 MHz) and RTCCLK (32768 Hz). Those external
21  clocks must be defined as fixed-rate clocks in dts.
22
23  CMU_TOP is a top-level CMU, where all base clocks are prepared using PLLs and
24  dividers; all other leaf clocks (other CMUs) are usually derived from CMU_TOP.
25
26  Each clock is assigned an identifier and client nodes can use this identifier
27  to specify the clock which they consume. All clocks available for usage
28  in clock consumer nodes are defined as preprocessor macros in
29  'dt-bindings/clock/exynos850.h' header.
30
31properties:
32  compatible:
33    enum:
34      - samsung,exynos850-cmu-top
35      - samsung,exynos850-cmu-apm
36      - samsung,exynos850-cmu-aud
37      - samsung,exynos850-cmu-cmgp
38      - samsung,exynos850-cmu-core
39      - samsung,exynos850-cmu-dpu
40      - samsung,exynos850-cmu-hsi
41      - samsung,exynos850-cmu-is
42      - samsung,exynos850-cmu-mfcmscl
43      - samsung,exynos850-cmu-peri
44
45  clocks:
46    minItems: 1
47    maxItems: 5
48
49  clock-names:
50    minItems: 1
51    maxItems: 5
52
53  "#clock-cells":
54    const: 1
55
56  reg:
57    maxItems: 1
58
59allOf:
60  - if:
61      properties:
62        compatible:
63          contains:
64            const: samsung,exynos850-cmu-top
65
66    then:
67      properties:
68        clocks:
69          items:
70            - description: External reference clock (26 MHz)
71
72        clock-names:
73          items:
74            - const: oscclk
75
76  - if:
77      properties:
78        compatible:
79          contains:
80            const: samsung,exynos850-cmu-apm
81
82    then:
83      properties:
84        clocks:
85          items:
86            - description: External reference clock (26 MHz)
87            - description: CMU_APM bus clock (from CMU_TOP)
88
89        clock-names:
90          items:
91            - const: oscclk
92            - const: dout_clkcmu_apm_bus
93
94  - if:
95      properties:
96        compatible:
97          contains:
98            const: samsung,exynos850-cmu-aud
99
100    then:
101      properties:
102        clocks:
103          items:
104            - description: External reference clock (26 MHz)
105            - description: AUD clock (from CMU_TOP)
106
107        clock-names:
108          items:
109            - const: oscclk
110            - const: dout_aud
111
112  - if:
113      properties:
114        compatible:
115          contains:
116            const: samsung,exynos850-cmu-cmgp
117
118    then:
119      properties:
120        clocks:
121          items:
122            - description: External reference clock (26 MHz)
123            - description: CMU_CMGP bus clock (from CMU_APM)
124
125        clock-names:
126          items:
127            - const: oscclk
128            - const: gout_clkcmu_cmgp_bus
129
130  - if:
131      properties:
132        compatible:
133          contains:
134            const: samsung,exynos850-cmu-core
135
136    then:
137      properties:
138        clocks:
139          items:
140            - description: External reference clock (26 MHz)
141            - description: CMU_CORE bus clock (from CMU_TOP)
142            - description: CCI clock (from CMU_TOP)
143            - description: eMMC clock (from CMU_TOP)
144            - description: SSS clock (from CMU_TOP)
145
146        clock-names:
147          items:
148            - const: oscclk
149            - const: dout_core_bus
150            - const: dout_core_cci
151            - const: dout_core_mmc_embd
152            - const: dout_core_sss
153
154  - if:
155      properties:
156        compatible:
157          contains:
158            const: samsung,exynos850-cmu-dpu
159
160    then:
161      properties:
162        clocks:
163          items:
164            - description: External reference clock (26 MHz)
165            - description: DPU clock (from CMU_TOP)
166
167        clock-names:
168          items:
169            - const: oscclk
170            - const: dout_dpu
171
172  - if:
173      properties:
174        compatible:
175          contains:
176            const: samsung,exynos850-cmu-hsi
177
178    then:
179      properties:
180        clocks:
181          items:
182            - description: External reference clock (26 MHz)
183            - description: External RTC clock (32768 Hz)
184            - description: CMU_HSI bus clock (from CMU_TOP)
185            - description: SD card clock (from CMU_TOP)
186            - description: "USB 2.0 DRD clock (from CMU_TOP)"
187
188        clock-names:
189          items:
190            - const: oscclk
191            - const: rtcclk
192            - const: dout_hsi_bus
193            - const: dout_hsi_mmc_card
194            - const: dout_hsi_usb20drd
195
196  - if:
197      properties:
198        compatible:
199          contains:
200            const: samsung,exynos850-cmu-is
201
202    then:
203      properties:
204        clocks:
205          items:
206            - description: External reference clock (26 MHz)
207            - description: CMU_IS bus clock (from CMU_TOP)
208            - description: Image Texture Processing core clock (from CMU_TOP)
209            - description: Visual Recognition Accelerator clock (from CMU_TOP)
210            - description: Geometric Distortion Correction clock (from CMU_TOP)
211
212        clock-names:
213          items:
214            - const: oscclk
215            - const: dout_is_bus
216            - const: dout_is_itp
217            - const: dout_is_vra
218            - const: dout_is_gdc
219
220  - if:
221      properties:
222        compatible:
223          contains:
224            const: samsung,exynos850-cmu-mfcmscl
225
226    then:
227      properties:
228        clocks:
229          items:
230            - description: External reference clock (26 MHz)
231            - description: Multi-Format Codec clock (from CMU_TOP)
232            - description: Memory to Memory Scaler clock (from CMU_TOP)
233            - description: Multi-Channel Scaler clock (from CMU_TOP)
234            - description: JPEG codec clock (from CMU_TOP)
235
236        clock-names:
237          items:
238            - const: oscclk
239            - const: dout_mfcmscl_mfc
240            - const: dout_mfcmscl_m2m
241            - const: dout_mfcmscl_mcsc
242            - const: dout_mfcmscl_jpeg
243
244  - if:
245      properties:
246        compatible:
247          contains:
248            const: samsung,exynos850-cmu-peri
249
250    then:
251      properties:
252        clocks:
253          items:
254            - description: External reference clock (26 MHz)
255            - description: CMU_PERI bus clock (from CMU_TOP)
256            - description: UART clock (from CMU_TOP)
257            - description: Parent clock for HSI2C and SPI (from CMU_TOP)
258
259        clock-names:
260          items:
261            - const: oscclk
262            - const: dout_peri_bus
263            - const: dout_peri_uart
264            - const: dout_peri_ip
265
266required:
267  - compatible
268  - "#clock-cells"
269  - clocks
270  - clock-names
271  - reg
272
273additionalProperties: false
274
275examples:
276  # Clock controller node for CMU_PERI
277  - |
278    #include <dt-bindings/clock/exynos850.h>
279
280    cmu_peri: clock-controller@10030000 {
281        compatible = "samsung,exynos850-cmu-peri";
282        reg = <0x10030000 0x8000>;
283        #clock-cells = <1>;
284
285        clocks = <&oscclk>, <&cmu_top CLK_DOUT_PERI_BUS>,
286                 <&cmu_top CLK_DOUT_PERI_UART>,
287                 <&cmu_top CLK_DOUT_PERI_IP>;
288        clock-names = "oscclk", "dout_peri_bus",
289                      "dout_peri_uart", "dout_peri_ip";
290    };
291
292...
293