summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/clock/allwinner,sun4i-a10-ccu.yaml
blob: a27025cd390999de887cc2358b770442150bbce8 (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
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/allwinner,sun4i-a10-ccu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Allwinner Clock Control Unit Device Tree Bindings

maintainers:
  - Chen-Yu Tsai <wens@csie.org>
  - Maxime Ripard <mripard@kernel.org>

properties:
  "#clock-cells":
    const: 1

  "#reset-cells":
    const: 1

  compatible:
    enum:
      - allwinner,sun4i-a10-ccu
      - allwinner,sun5i-a10s-ccu
      - allwinner,sun5i-a13-ccu
      - allwinner,sun6i-a31-ccu
      - allwinner,sun7i-a20-ccu
      - allwinner,sun8i-a23-ccu
      - allwinner,sun8i-a33-ccu
      - allwinner,sun8i-a83t-ccu
      - allwinner,sun8i-a83t-r-ccu
      - allwinner,sun8i-h3-ccu
      - allwinner,sun8i-h3-r-ccu
      - allwinner,sun8i-r40-ccu
      - allwinner,sun8i-v3-ccu
      - allwinner,sun8i-v3s-ccu
      - allwinner,sun9i-a80-ccu
      - allwinner,sun50i-a64-ccu
      - allwinner,sun50i-a64-r-ccu
      - allwinner,sun50i-a100-ccu
      - allwinner,sun50i-a100-r-ccu
      - allwinner,sun50i-h5-ccu
      - allwinner,sun50i-h6-ccu
      - allwinner,sun50i-h6-r-ccu
      - allwinner,sun50i-h616-ccu
      - allwinner,sun50i-h616-r-ccu
      - allwinner,suniv-f1c100s-ccu
      - nextthing,gr8-ccu

  reg:
    maxItems: 1

  clocks:
    minItems: 2
    maxItems: 4
    items:
      - description: High Frequency Oscillator (usually at 24MHz)
      - description: Low Frequency Oscillator (usually at 32kHz)
      - description: Internal Oscillator
      - description: Peripherals PLL

  clock-names:
    minItems: 2
    maxItems: 4
    items:
      - const: hosc
      - const: losc
      - const: iosc
      - const: pll-periph

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

if:
  properties:
    compatible:
      enum:
        - allwinner,sun8i-a83t-r-ccu
        - allwinner,sun8i-h3-r-ccu
        - allwinner,sun50i-a64-r-ccu
        - allwinner,sun50i-a100-r-ccu
        - allwinner,sun50i-h6-r-ccu
        - allwinner,sun50i-h616-r-ccu

then:
  properties:
    clocks:
      minItems: 4
      maxItems: 4

    clock-names:
      minItems: 4
      maxItems: 4

else:
  if:
    properties:
      compatible:
        enum:
          - allwinner,sun50i-a100-ccu
          - allwinner,sun50i-h6-ccu
          - allwinner,sun50i-h616-ccu

  then:
    properties:
      clocks:
        minItems: 3
        maxItems: 3

      clock-names:
        minItems: 3
        maxItems: 3

  else:
    properties:
      clocks:
        minItems: 2
        maxItems: 2

      clock-names:
        minItems: 2
        maxItems: 2

additionalProperties: false

examples:
  - |
    ccu: clock@1c20000 {
        compatible = "allwinner,sun8i-h3-ccu";
        reg = <0x01c20000 0x400>;
        clocks = <&osc24M>, <&osc32k>;
        clock-names = "hosc", "losc";
        #clock-cells = <1>;
        #reset-cells = <1>;
    };

  - |
    r_ccu: clock@1f01400 {
        compatible = "allwinner,sun50i-a64-r-ccu";
        reg = <0x01f01400 0x100>;
        clocks = <&osc24M>, <&osc32k>, <&iosc>, <&ccu 11>;
        clock-names = "hosc", "losc", "iosc", "pll-periph";
        #clock-cells = <1>;
        #reset-cells = <1>;
    };

...