xref: /freebsd/sys/contrib/device-tree/Bindings/clock/samsung,exynos850-clock.yaml (revision a64729f5077d77e13b9497cb33ecb3c82e606ee8)
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-g3d
41      - samsung,exynos850-cmu-hsi
42      - samsung,exynos850-cmu-is
43      - samsung,exynos850-cmu-mfcmscl
44      - samsung,exynos850-cmu-peri
45
46  clocks:
47    minItems: 1
48    maxItems: 5
49
50  clock-names:
51    minItems: 1
52    maxItems: 5
53
54  "#clock-cells":
55    const: 1
56
57  reg:
58    maxItems: 1
59
60allOf:
61  - if:
62      properties:
63        compatible:
64          contains:
65            const: samsung,exynos850-cmu-top
66
67    then:
68      properties:
69        clocks:
70          items:
71            - description: External reference clock (26 MHz)
72
73        clock-names:
74          items:
75            - const: oscclk
76
77  - if:
78      properties:
79        compatible:
80          contains:
81            const: samsung,exynos850-cmu-apm
82
83    then:
84      properties:
85        clocks:
86          items:
87            - description: External reference clock (26 MHz)
88            - description: CMU_APM bus clock (from CMU_TOP)
89
90        clock-names:
91          items:
92            - const: oscclk
93            - const: dout_clkcmu_apm_bus
94
95  - if:
96      properties:
97        compatible:
98          contains:
99            const: samsung,exynos850-cmu-aud
100
101    then:
102      properties:
103        clocks:
104          items:
105            - description: External reference clock (26 MHz)
106            - description: AUD clock (from CMU_TOP)
107
108        clock-names:
109          items:
110            - const: oscclk
111            - const: dout_aud
112
113  - if:
114      properties:
115        compatible:
116          contains:
117            const: samsung,exynos850-cmu-cmgp
118
119    then:
120      properties:
121        clocks:
122          items:
123            - description: External reference clock (26 MHz)
124            - description: CMU_CMGP bus clock (from CMU_APM)
125
126        clock-names:
127          items:
128            - const: oscclk
129            - const: gout_clkcmu_cmgp_bus
130
131  - if:
132      properties:
133        compatible:
134          contains:
135            const: samsung,exynos850-cmu-core
136
137    then:
138      properties:
139        clocks:
140          items:
141            - description: External reference clock (26 MHz)
142            - description: CMU_CORE bus clock (from CMU_TOP)
143            - description: CCI clock (from CMU_TOP)
144            - description: eMMC clock (from CMU_TOP)
145            - description: SSS clock (from CMU_TOP)
146
147        clock-names:
148          items:
149            - const: oscclk
150            - const: dout_core_bus
151            - const: dout_core_cci
152            - const: dout_core_mmc_embd
153            - const: dout_core_sss
154
155  - if:
156      properties:
157        compatible:
158          contains:
159            const: samsung,exynos850-cmu-dpu
160
161    then:
162      properties:
163        clocks:
164          items:
165            - description: External reference clock (26 MHz)
166            - description: DPU clock (from CMU_TOP)
167
168        clock-names:
169          items:
170            - const: oscclk
171            - const: dout_dpu
172
173  - if:
174      properties:
175        compatible:
176          contains:
177            const: samsung,exynos850-cmu-g3d
178
179    then:
180      properties:
181        clocks:
182          items:
183            - description: External reference clock (26 MHz)
184            - description: G3D clock (from CMU_TOP)
185
186        clock-names:
187          items:
188            - const: oscclk
189            - const: dout_g3d_switch
190
191  - if:
192      properties:
193        compatible:
194          contains:
195            const: samsung,exynos850-cmu-hsi
196
197    then:
198      properties:
199        clocks:
200          items:
201            - description: External reference clock (26 MHz)
202            - description: External RTC clock (32768 Hz)
203            - description: CMU_HSI bus clock (from CMU_TOP)
204            - description: SD card clock (from CMU_TOP)
205            - description: USB 2.0 DRD clock (from CMU_TOP)
206
207        clock-names:
208          items:
209            - const: oscclk
210            - const: rtcclk
211            - const: dout_hsi_bus
212            - const: dout_hsi_mmc_card
213            - const: dout_hsi_usb20drd
214
215  - if:
216      properties:
217        compatible:
218          contains:
219            const: samsung,exynos850-cmu-is
220
221    then:
222      properties:
223        clocks:
224          items:
225            - description: External reference clock (26 MHz)
226            - description: CMU_IS bus clock (from CMU_TOP)
227            - description: Image Texture Processing core clock (from CMU_TOP)
228            - description: Visual Recognition Accelerator clock (from CMU_TOP)
229            - description: Geometric Distortion Correction clock (from CMU_TOP)
230
231        clock-names:
232          items:
233            - const: oscclk
234            - const: dout_is_bus
235            - const: dout_is_itp
236            - const: dout_is_vra
237            - const: dout_is_gdc
238
239  - if:
240      properties:
241        compatible:
242          contains:
243            const: samsung,exynos850-cmu-mfcmscl
244
245    then:
246      properties:
247        clocks:
248          items:
249            - description: External reference clock (26 MHz)
250            - description: Multi-Format Codec clock (from CMU_TOP)
251            - description: Memory to Memory Scaler clock (from CMU_TOP)
252            - description: Multi-Channel Scaler clock (from CMU_TOP)
253            - description: JPEG codec clock (from CMU_TOP)
254
255        clock-names:
256          items:
257            - const: oscclk
258            - const: dout_mfcmscl_mfc
259            - const: dout_mfcmscl_m2m
260            - const: dout_mfcmscl_mcsc
261            - const: dout_mfcmscl_jpeg
262
263  - if:
264      properties:
265        compatible:
266          contains:
267            const: samsung,exynos850-cmu-peri
268
269    then:
270      properties:
271        clocks:
272          items:
273            - description: External reference clock (26 MHz)
274            - description: CMU_PERI bus clock (from CMU_TOP)
275            - description: UART clock (from CMU_TOP)
276            - description: Parent clock for HSI2C and SPI (from CMU_TOP)
277
278        clock-names:
279          items:
280            - const: oscclk
281            - const: dout_peri_bus
282            - const: dout_peri_uart
283            - const: dout_peri_ip
284
285required:
286  - compatible
287  - "#clock-cells"
288  - clocks
289  - clock-names
290  - reg
291
292additionalProperties: false
293
294examples:
295  # Clock controller node for CMU_PERI
296  - |
297    #include <dt-bindings/clock/exynos850.h>
298
299    cmu_peri: clock-controller@10030000 {
300        compatible = "samsung,exynos850-cmu-peri";
301        reg = <0x10030000 0x8000>;
302        #clock-cells = <1>;
303
304        clocks = <&oscclk>, <&cmu_top CLK_DOUT_PERI_BUS>,
305                 <&cmu_top CLK_DOUT_PERI_UART>,
306                 <&cmu_top CLK_DOUT_PERI_IP>;
307        clock-names = "oscclk", "dout_peri_bus",
308                      "dout_peri_uart", "dout_peri_ip";
309    };
310
311...
312