xref: /src/sys/contrib/device-tree/Bindings/clock/samsung,exynosautov920-clock.yaml (revision 68ad2b0d7af2a3571c4abac9afa712f9b09b721c)
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,exynosautov920-clock.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Samsung ExynosAuto v920 SoC clock controller
8
9maintainers:
10  - Sunyeal Hong <sunyeal.hong@samsung.com>
11  - Shin Son <shin.son@samsung.com>
12  - Chanwoo Choi <cw00.choi@samsung.com>
13  - Krzysztof Kozlowski <krzk@kernel.org>
14  - Sylwester Nawrocki <s.nawrocki@samsung.com>
15
16description: |
17  ExynosAuto v920 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/XTCXO (38.4 MHz) and RTCCLK/XrtcXTI (32768 Hz).
21  The external OSCCLK must be defined as fixed-rate clock in dts.
22
23  CMU_TOP is a top-level CMU, where all base clocks are prepared using PLLs and
24  dividers; all other clocks of function blocks (other CMUs) are usually
25  derived from CMU_TOP.
26
27  Each clock is assigned an identifier and client nodes can use this identifier
28  to specify the clock which they consume. All clocks available for usage
29  in clock consumer nodes are defined as preprocessor macros in
30  'include/dt-bindings/clock/samsung,exynosautov920.h' header.
31
32properties:
33  compatible:
34    enum:
35      - samsung,exynosautov920-cmu-cpucl0
36      - samsung,exynosautov920-cmu-cpucl1
37      - samsung,exynosautov920-cmu-cpucl2
38      - samsung,exynosautov920-cmu-hsi0
39      - samsung,exynosautov920-cmu-hsi1
40      - samsung,exynosautov920-cmu-hsi2
41      - samsung,exynosautov920-cmu-misc
42      - samsung,exynosautov920-cmu-peric0
43      - samsung,exynosautov920-cmu-peric1
44      - samsung,exynosautov920-cmu-top
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,exynosautov920-cmu-top
66
67    then:
68      properties:
69        clocks:
70          items:
71            - description: External reference clock (38.4 MHz)
72
73        clock-names:
74          items:
75            - const: oscclk
76
77  - if:
78      properties:
79        compatible:
80          contains:
81            enum:
82              - samsung,exynosautov920-cmu-cpucl0
83
84    then:
85      properties:
86        clocks:
87          items:
88            - description: External reference clock (38.4 MHz)
89            - description: CMU_CPUCL0 SWITCH clock (from CMU_TOP)
90            - description: CMU_CPUCL0 CLUSTER clock (from CMU_TOP)
91            - description: CMU_CPUCL0 DBG clock (from CMU_TOP)
92
93        clock-names:
94          items:
95            - const: oscclk
96            - const: switch
97            - const: cluster
98            - const: dbg
99
100  - if:
101      properties:
102        compatible:
103          contains:
104            enum:
105              - samsung,exynosautov920-cmu-cpucl1
106
107    then:
108      properties:
109        clocks:
110          items:
111            - description: External reference clock (38.4 MHz)
112            - description: CMU_CPUCL1 SWITCH clock (from CMU_TOP)
113            - description: CMU_CPUCL1 CLUSTER clock (from CMU_TOP)
114
115        clock-names:
116          items:
117            - const: oscclk
118            - const: switch
119            - const: cluster
120
121  - if:
122      properties:
123        compatible:
124          contains:
125            enum:
126              - samsung,exynosautov920-cmu-cpucl2
127
128    then:
129      properties:
130        clocks:
131          items:
132            - description: External reference clock (38.4 MHz)
133            - description: CMU_CPUCL2 SWITCH clock (from CMU_TOP)
134            - description: CMU_CPUCL2 CLUSTER clock (from CMU_TOP)
135
136        clock-names:
137          items:
138            - const: oscclk
139            - const: switch
140            - const: cluster
141
142  - if:
143      properties:
144        compatible:
145          contains:
146            enum:
147              - samsung,exynosautov920-cmu-peric0
148              - samsung,exynosautov920-cmu-peric1
149
150    then:
151      properties:
152        clocks:
153          items:
154            - description: External reference clock (38.4 MHz)
155            - description: CMU_PERICn NOC clock (from CMU_TOP)
156            - description: CMU_PERICn IP clock (from CMU_TOP)
157
158        clock-names:
159          items:
160            - const: oscclk
161            - const: noc
162            - const: ip
163
164  - if:
165      properties:
166        compatible:
167          enum:
168            - samsung,exynosautov920-cmu-misc
169            - samsung,exynosautov920-cmu-hsi0
170
171    then:
172      properties:
173        clocks:
174          items:
175            - description: External reference clock (38.4 MHz)
176            - description: CMU_MISC/CMU_HSI0 NOC clock (from CMU_TOP)
177
178        clock-names:
179          items:
180            - const: oscclk
181            - const: noc
182
183  - if:
184      properties:
185        compatible:
186          contains:
187            const: samsung,exynosautov920-cmu-hsi1
188
189    then:
190      properties:
191        clocks:
192          items:
193            - description: External reference clock (38.4 MHz)
194            - description: CMU_HSI1 NOC clock (from CMU_TOP)
195            - description: CMU_HSI1 USBDRD clock (from CMU_TOP)
196            - description: CMU_HSI1 MMC_CARD clock (from CMU_TOP)
197
198        clock-names:
199          items:
200            - const: oscclk
201            - const: noc
202            - const: usbdrd
203            - const: mmc_card
204
205  - if:
206      properties:
207        compatible:
208          contains:
209            const: samsung,exynosautov920-cmu-hsi2
210
211    then:
212      properties:
213        clocks:
214          items:
215            - description: External reference clock (38.4 MHz)
216            - description: CMU_HSI2 NOC clock (from CMU_TOP)
217            - description: CMU_HSI2 NOC UFS clock (from CMU_TOP)
218            - description: CMU_HSI2 UFS EMBD clock (from CMU_TOP)
219            - description: CMU_HSI2 ETHERNET clock (from CMU_TOP)
220
221        clock-names:
222          items:
223            - const: oscclk
224            - const: noc
225            - const: ufs
226            - const: embd
227            - const: ethernet
228
229required:
230  - compatible
231  - "#clock-cells"
232  - clocks
233  - clock-names
234  - reg
235
236additionalProperties: false
237
238examples:
239  # Clock controller node for CMU_PERIC0
240  - |
241    #include <dt-bindings/clock/samsung,exynosautov920.h>
242
243    cmu_peric0: clock-controller@10800000 {
244        compatible = "samsung,exynosautov920-cmu-peric0";
245        reg = <0x10800000 0x8000>;
246        #clock-cells = <1>;
247
248        clocks = <&xtcxo>,
249                 <&cmu_top DOUT_CLKCMU_PERIC0_NOC>,
250                 <&cmu_top DOUT_CLKCMU_PERIC0_IP>;
251        clock-names = "oscclk",
252                      "noc",
253                      "ip";
254    };
255
256...
257