1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/clock/allwinner,sun4i-a10-ccu.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Allwinner Clock Control Unit Device Tree Bindings
8
9maintainers:
10  - Chen-Yu Tsai <wens@csie.org>
11  - Maxime Ripard <mripard@kernel.org>
12
13properties:
14  "#clock-cells":
15    const: 1
16
17  "#reset-cells":
18    const: 1
19
20  compatible:
21    enum:
22      - allwinner,sun4i-a10-ccu
23      - allwinner,sun5i-a10s-ccu
24      - allwinner,sun5i-a13-ccu
25      - allwinner,sun6i-a31-ccu
26      - allwinner,sun7i-a20-ccu
27      - allwinner,sun8i-a23-ccu
28      - allwinner,sun8i-a33-ccu
29      - allwinner,sun8i-a83t-ccu
30      - allwinner,sun8i-a83t-r-ccu
31      - allwinner,sun8i-h3-ccu
32      - allwinner,sun8i-h3-r-ccu
33      - allwinner,sun8i-r40-ccu
34      - allwinner,sun8i-v3-ccu
35      - allwinner,sun8i-v3s-ccu
36      - allwinner,sun9i-a80-ccu
37      - allwinner,sun50i-a64-ccu
38      - allwinner,sun50i-a64-r-ccu
39      - allwinner,sun50i-a100-ccu
40      - allwinner,sun50i-a100-r-ccu
41      - allwinner,sun50i-h5-ccu
42      - allwinner,sun50i-h6-ccu
43      - allwinner,sun50i-h6-r-ccu
44      - allwinner,sun50i-h616-ccu
45      - allwinner,sun50i-h616-r-ccu
46      - allwinner,suniv-f1c100s-ccu
47      - nextthing,gr8-ccu
48
49  reg:
50    maxItems: 1
51
52  clocks:
53    minItems: 2
54    maxItems: 4
55    items:
56      - description: High Frequency Oscillator (usually at 24MHz)
57      - description: Low Frequency Oscillator (usually at 32kHz)
58      - description: Internal Oscillator
59      - description: Peripherals PLL
60
61  clock-names:
62    minItems: 2
63    maxItems: 4
64    items:
65      - const: hosc
66      - const: losc
67      - const: iosc
68      - const: pll-periph
69
70required:
71  - "#clock-cells"
72  - "#reset-cells"
73  - compatible
74  - reg
75  - clocks
76  - clock-names
77
78if:
79  properties:
80    compatible:
81      enum:
82        - allwinner,sun8i-a83t-r-ccu
83        - allwinner,sun8i-h3-r-ccu
84        - allwinner,sun50i-a64-r-ccu
85        - allwinner,sun50i-a100-r-ccu
86        - allwinner,sun50i-h6-r-ccu
87        - allwinner,sun50i-h616-r-ccu
88
89then:
90  properties:
91    clocks:
92      minItems: 4
93      maxItems: 4
94
95    clock-names:
96      minItems: 4
97      maxItems: 4
98
99else:
100  if:
101    properties:
102      compatible:
103        enum:
104          - allwinner,sun50i-a100-ccu
105          - allwinner,sun50i-h6-ccu
106          - allwinner,sun50i-h616-ccu
107
108  then:
109    properties:
110      clocks:
111        minItems: 3
112        maxItems: 3
113
114      clock-names:
115        minItems: 3
116        maxItems: 3
117
118  else:
119    properties:
120      clocks:
121        minItems: 2
122        maxItems: 2
123
124      clock-names:
125        minItems: 2
126        maxItems: 2
127
128additionalProperties: false
129
130examples:
131  - |
132    ccu: clock@1c20000 {
133        compatible = "allwinner,sun8i-h3-ccu";
134        reg = <0x01c20000 0x400>;
135        clocks = <&osc24M>, <&osc32k>;
136        clock-names = "hosc", "losc";
137        #clock-cells = <1>;
138        #reset-cells = <1>;
139    };
140
141  - |
142    r_ccu: clock@1f01400 {
143        compatible = "allwinner,sun50i-a64-r-ccu";
144        reg = <0x01f01400 0x100>;
145        clocks = <&osc24M>, <&osc32k>, <&iosc>, <&ccu 11>;
146        clock-names = "hosc", "losc", "iosc", "pll-periph";
147        #clock-cells = <1>;
148        #reset-cells = <1>;
149    };
150
151...
152