summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/clock/ingenic,cgu.yaml
blob: 5dd7ea8a78e4bafb38d4e5419df9469db9d49582 (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
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/ingenic,cgu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Ingenic SoCs CGU devicetree bindings

description: |
  The CGU in an Ingenic SoC provides all the clocks generated on-chip. It
  typically includes a variety of PLLs, multiplexers, dividers & gates in order
  to provide many different clock signals derived from only 2 external source
  clocks.

maintainers:
  - Paul Cercueil <paul@crapouillou.net>

select:
  properties:
    compatible:
      contains:
        enum:
          - ingenic,jz4740-cgu
          - ingenic,jz4725b-cgu
          - ingenic,jz4770-cgu
          - ingenic,jz4780-cgu
          - ingenic,x1000-cgu
          - ingenic,x1830-cgu
  required:
    - compatible

properties:
  $nodename:
    pattern: "^clock-controller@[0-9a-f]+$"

  "#address-cells":
    const: 1

  "#size-cells":
    const: 1

  "#clock-cells":
    const: 1

  ranges: true

  compatible:
    items:
      - enum:
          - ingenic,jz4740-cgu
          - ingenic,jz4725b-cgu
          - ingenic,jz4770-cgu
          - ingenic,jz4780-cgu
          - ingenic,x1000-cgu
          - ingenic,x1830-cgu
      - const: simple-mfd
    minItems: 1

  reg:
    maxItems: 1

  clocks:
    items:
      - description: External oscillator clock
      - description: Internal 32 kHz RTC clock

  clock-names:
    items:
      - const: ext
      - enum:
          - rtc
          - osc32k # Different name, same clock

  assigned-clocks:
    minItems: 1
    maxItems: 64

  assigned-clock-parents:
    minItems: 1
    maxItems: 64

  assigned-clock-rates:
    minItems: 1
    maxItems: 64

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

patternProperties:
  "^usb-phy@[a-f0-9]+$":
    allOf: [ $ref: "../usb/ingenic,jz4770-phy.yaml#" ]

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/jz4770-cgu.h>
    cgu: clock-controller@10000000 {
      compatible = "ingenic,jz4770-cgu", "simple-mfd";
      reg = <0x10000000 0x100>;
      #address-cells = <1>;
      #size-cells = <1>;
      ranges = <0x0 0x10000000 0x100>;

      clocks = <&ext>, <&osc32k>;
      clock-names = "ext", "osc32k";

      #clock-cells = <1>;

      otg_phy: usb-phy@3c {
        compatible = "ingenic,jz4770-phy";
        reg = <0x3c 0x10>;

        clocks = <&cgu JZ4770_CLK_OTG_PHY>;

        vcc-supply = <&ldo5>;

        #phy-cells = <0>;
      };
    };