summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/clock/samsung,exynos850-clock.yaml
blob: cdc5ded59fe5e0b18e4a80387de4e7318f3d6fc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/samsung,exynos850-clock.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung Exynos850 SoC clock controller

maintainers:
  - Sam Protsenko <semen.protsenko@linaro.org>
  - Chanwoo Choi <cw00.choi@samsung.com>
  - Krzysztof Kozlowski <krzk@kernel.org>
  - Sylwester Nawrocki <s.nawrocki@samsung.com>
  - Tomasz Figa <tomasz.figa@gmail.com>

description: |
  Exynos850 clock controller is comprised of several CMU units, generating
  clocks for different domains. Those CMU units are modeled as separate device
  tree nodes, and might depend on each other. Root clocks in that clock tree are
  two external clocks:: OSCCLK (26 MHz) and RTCCLK (32768 Hz). Those external
  clocks must be defined as fixed-rate clocks in dts.

  CMU_TOP is a top-level CMU, where all base clocks are prepared using PLLs and
  dividers; all other leaf clocks (other CMUs) are usually derived from CMU_TOP.

  Each clock is assigned an identifier and client nodes can use this identifier
  to specify the clock which they consume. All clocks available for usage
  in clock consumer nodes are defined as preprocessor macros in
  'dt-bindings/clock/exynos850.h' header.

properties:
  compatible:
    enum:
      - samsung,exynos850-cmu-top
      - samsung,exynos850-cmu-apm
      - samsung,exynos850-cmu-aud
      - samsung,exynos850-cmu-cmgp
      - samsung,exynos850-cmu-core
      - samsung,exynos850-cmu-cpucl0
      - samsung,exynos850-cmu-cpucl1
      - samsung,exynos850-cmu-dpu
      - samsung,exynos850-cmu-g3d
      - samsung,exynos850-cmu-hsi
      - samsung,exynos850-cmu-is
      - samsung,exynos850-cmu-mfcmscl
      - samsung,exynos850-cmu-peri

  clocks:
    minItems: 1
    maxItems: 5

  clock-names:
    minItems: 1
    maxItems: 5

  "#clock-cells":
    const: 1

  reg:
    maxItems: 1

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: samsung,exynos850-cmu-top

    then:
      properties:
        clocks:
          items:
            - description: External reference clock (26 MHz)

        clock-names:
          items:
            - const: oscclk

  - if:
      properties:
        compatible:
          contains:
            const: samsung,exynos850-cmu-apm

    then:
      properties:
        clocks:
          items:
            - description: External reference clock (26 MHz)
            - description: CMU_APM bus clock (from CMU_TOP)

        clock-names:
          items:
            - const: oscclk
            - const: dout_clkcmu_apm_bus

  - if:
      properties:
        compatible:
          contains:
            const: samsung,exynos850-cmu-aud

    then:
      properties:
        clocks:
          items:
            - description: External reference clock (26 MHz)
            - description: AUD clock (from CMU_TOP)

        clock-names:
          items:
            - const: oscclk
            - const: dout_aud

  - if:
      properties:
        compatible:
          contains:
            const: samsung,exynos850-cmu-cmgp

    then:
      properties:
        clocks:
          items:
            - description: External reference clock (26 MHz)
            - description: CMU_CMGP bus clock (from CMU_APM)

        clock-names:
          items:
            - const: oscclk
            - const: gout_clkcmu_cmgp_bus

  - if:
      properties:
        compatible:
          contains:
            const: samsung,exynos850-cmu-core

    then:
      properties:
        clocks:
          items:
            - description: External reference clock (26 MHz)
            - description: CMU_CORE bus clock (from CMU_TOP)
            - description: CCI clock (from CMU_TOP)
            - description: eMMC clock (from CMU_TOP)
            - description: SSS clock (from CMU_TOP)

        clock-names:
          items:
            - const: oscclk
            - const: dout_core_bus
            - const: dout_core_cci
            - const: dout_core_mmc_embd
            - const: dout_core_sss

  - if:
      properties:
        compatible:
          contains:
            const: samsung,exynos850-cmu-cpucl0

    then:
      properties:
        clocks:
          items:
            - description: External reference clock (26 MHz)
            - description: CPUCL0 switch clock (from CMU_TOP)
            - description: CPUCL0 debug clock (from CMU_TOP)

        clock-names:
          items:
            - const: oscclk
            - const: dout_cpucl0_switch
            - const: dout_cpucl0_dbg

  - if:
      properties:
        compatible:
          contains:
            const: samsung,exynos850-cmu-cpucl1

    then:
      properties:
        clocks:
          items:
            - description: External reference clock (26 MHz)
            - description: CPUCL1 switch clock (from CMU_TOP)
            - description: CPUCL1 debug clock (from CMU_TOP)

        clock-names:
          items:
            - const: oscclk
            - const: dout_cpucl1_switch
            - const: dout_cpucl1_dbg

  - if:
      properties:
        compatible:
          contains:
            const: samsung,exynos850-cmu-dpu

    then:
      properties:
        clocks:
          items:
            - description: External reference clock (26 MHz)
            - description: DPU clock (from CMU_TOP)

        clock-names:
          items:
            - const: oscclk
            - const: dout_dpu

  - if:
      properties:
        compatible:
          contains:
            const: samsung,exynos850-cmu-g3d

    then:
      properties:
        clocks:
          items:
            - description: External reference clock (26 MHz)
            - description: G3D clock (from CMU_TOP)

        clock-names:
          items:
            - const: oscclk
            - const: dout_g3d_switch

  - if:
      properties:
        compatible:
          contains:
            const: samsung,exynos850-cmu-hsi

    then:
      properties:
        clocks:
          items:
            - description: External reference clock (26 MHz)
            - description: External RTC clock (32768 Hz)
            - description: CMU_HSI bus clock (from CMU_TOP)
            - description: SD card clock (from CMU_TOP)
            - description: USB 2.0 DRD clock (from CMU_TOP)

        clock-names:
          items:
            - const: oscclk
            - const: rtcclk
            - const: dout_hsi_bus
            - const: dout_hsi_mmc_card
            - const: dout_hsi_usb20drd

  - if:
      properties:
        compatible:
          contains:
            const: samsung,exynos850-cmu-is

    then:
      properties:
        clocks:
          items:
            - description: External reference clock (26 MHz)
            - description: CMU_IS bus clock (from CMU_TOP)
            - description: Image Texture Processing core clock (from CMU_TOP)
            - description: Visual Recognition Accelerator clock (from CMU_TOP)
            - description: Geometric Distortion Correction clock (from CMU_TOP)

        clock-names:
          items:
            - const: oscclk
            - const: dout_is_bus
            - const: dout_is_itp
            - const: dout_is_vra
            - const: dout_is_gdc

  - if:
      properties:
        compatible:
          contains:
            const: samsung,exynos850-cmu-mfcmscl

    then:
      properties:
        clocks:
          items:
            - description: External reference clock (26 MHz)
            - description: Multi-Format Codec clock (from CMU_TOP)
            - description: Memory to Memory Scaler clock (from CMU_TOP)
            - description: Multi-Channel Scaler clock (from CMU_TOP)
            - description: JPEG codec clock (from CMU_TOP)

        clock-names:
          items:
            - const: oscclk
            - const: dout_mfcmscl_mfc
            - const: dout_mfcmscl_m2m
            - const: dout_mfcmscl_mcsc
            - const: dout_mfcmscl_jpeg

  - if:
      properties:
        compatible:
          contains:
            const: samsung,exynos850-cmu-peri

    then:
      properties:
        clocks:
          items:
            - description: External reference clock (26 MHz)
            - description: CMU_PERI bus clock (from CMU_TOP)
            - description: UART clock (from CMU_TOP)
            - description: Parent clock for HSI2C and SPI (from CMU_TOP)

        clock-names:
          items:
            - const: oscclk
            - const: dout_peri_bus
            - const: dout_peri_uart
            - const: dout_peri_ip

required:
  - compatible
  - "#clock-cells"
  - clocks
  - clock-names
  - reg

additionalProperties: false

examples:
  # Clock controller node for CMU_PERI
  - |
    #include <dt-bindings/clock/exynos850.h>

    cmu_peri: clock-controller@10030000 {
        compatible = "samsung,exynos850-cmu-peri";
        reg = <0x10030000 0x8000>;
        #clock-cells = <1>;

        clocks = <&oscclk>, <&cmu_top CLK_DOUT_PERI_BUS>,
                 <&cmu_top CLK_DOUT_PERI_UART>,
                 <&cmu_top CLK_DOUT_PERI_IP>;
        clock-names = "oscclk", "dout_peri_bus",
                      "dout_peri_uart", "dout_peri_ip";
    };

...