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,exynosautov9-clock.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Samsung Exynos Auto v9 SoC clock controller
8
9maintainers:
10  - Chanho Park <chanho61.park@samsung.com>
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  Exynos Auto v9 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 (26 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,exynosautov9.h' header.
31
32properties:
33  compatible:
34    enum:
35      - samsung,exynosautov9-cmu-top
36      - samsung,exynosautov9-cmu-busmc
37      - samsung,exynosautov9-cmu-core
38      - samsung,exynosautov9-cmu-fsys2
39      - samsung,exynosautov9-cmu-peric0
40      - samsung,exynosautov9-cmu-peric1
41      - samsung,exynosautov9-cmu-peris
42
43  clocks:
44    minItems: 1
45    maxItems: 5
46
47  clock-names:
48    minItems: 1
49    maxItems: 5
50
51  "#clock-cells":
52    const: 1
53
54  reg:
55    maxItems: 1
56
57allOf:
58  - if:
59      properties:
60        compatible:
61          contains:
62            const: samsung,exynosautov9-cmu-top
63
64    then:
65      properties:
66        clocks:
67          items:
68            - description: External reference clock (26 MHz)
69
70        clock-names:
71          items:
72            - const: oscclk
73
74  - if:
75      properties:
76        compatible:
77          contains:
78            const: samsung,exynosautov9-cmu-busmc
79
80    then:
81      properties:
82        clocks:
83          items:
84            - description: External reference clock (26 MHz)
85            - description: CMU_BUSMC bus clock (from CMU_TOP)
86
87        clock-names:
88          items:
89            - const: oscclk
90            - const: dout_clkcmu_busmc_bus
91
92  - if:
93      properties:
94        compatible:
95          contains:
96            const: samsung,exynosautov9-cmu-core
97
98    then:
99      properties:
100        clocks:
101          items:
102            - description: External reference clock (26 MHz)
103            - description: CMU_CORE bus clock (from CMU_TOP)
104
105        clock-names:
106          items:
107            - const: oscclk
108            - const: dout_clkcmu_core_bus
109
110  - if:
111      properties:
112        compatible:
113          contains:
114            const: samsung,exynosautov9-cmu-fsys2
115
116    then:
117      properties:
118        clocks:
119          items:
120            - description: External reference clock (26 MHz)
121            - description: CMU_FSYS2 bus clock (from CMU_TOP)
122            - description: UFS clock (from CMU_TOP)
123            - description: Ethernet clock (from CMU_TOP)
124
125        clock-names:
126          items:
127            - const: oscclk
128            - const: dout_clkcmu_fsys2_bus
129            - const: dout_fsys2_clkcmu_ufs_embd
130            - const: dout_fsys2_clkcmu_ethernet
131
132  - if:
133      properties:
134        compatible:
135          contains:
136            const: samsung,exynosautov9-cmu-peric0
137
138    then:
139      properties:
140        clocks:
141          items:
142            - description: External reference clock (26 MHz)
143            - description: CMU_PERIC0 bus clock (from CMU_TOP)
144            - description: PERIC0 IP clock (from CMU_TOP)
145
146        clock-names:
147          items:
148            - const: oscclk
149            - const: dout_clkcmu_peric0_bus
150            - const: dout_clkcmu_peric0_ip
151
152  - if:
153      properties:
154        compatible:
155          contains:
156            const: samsung,exynosautov9-cmu-peric1
157
158    then:
159      properties:
160        clocks:
161          items:
162            - description: External reference clock (26 MHz)
163            - description: CMU_PERIC1 bus clock (from CMU_TOP)
164            - description: PERIC1 IP clock (from CMU_TOP)
165
166        clock-names:
167          items:
168            - const: oscclk
169            - const: dout_clkcmu_peric1_bus
170            - const: dout_clkcmu_peric1_ip
171
172  - if:
173      properties:
174        compatible:
175          contains:
176            const: samsung,exynosautov9-cmu-peris
177
178    then:
179      properties:
180        clocks:
181          items:
182            - description: External reference clock (26 MHz)
183            - description: CMU_PERIS bus clock (from CMU_TOP)
184
185        clock-names:
186          items:
187            - const: oscclk
188            - const: dout_clkcmu_peris_bus
189
190required:
191  - compatible
192  - "#clock-cells"
193  - clocks
194  - clock-names
195  - reg
196
197additionalProperties: false
198
199examples:
200  # Clock controller node for CMU_FSYS2
201  - |
202    #include <dt-bindings/clock/samsung,exynosautov9.h>
203
204    cmu_fsys2: clock-controller@17c00000 {
205        compatible = "samsung,exynosautov9-cmu-fsys2";
206        reg = <0x17c00000 0x8000>;
207        #clock-cells = <1>;
208
209        clocks = <&xtcxo>,
210                 <&cmu_top DOUT_CLKCMU_FSYS2_BUS>,
211                 <&cmu_top DOUT_CLKCMU_FSYS2_UFS_EMBD>,
212                 <&cmu_top DOUT_CLKCMU_FSYS2_ETHERNET>;
213        clock-names = "oscclk",
214                      "dout_clkcmu_fsys2_bus",
215                      "dout_fsys2_clkcmu_ufs_embd",
216                      "dout_fsys2_clkcmu_ethernet";
217    };
218
219...
220