xref: /linux/Documentation/devicetree/bindings/clock/ingenic,cgu.yaml (revision 4f6ecfaf3e22a70d905a627a0e84e9edb2b32835)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/clock/ingenic,cgu.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Ingenic SoCs CGU devicetree bindings
8
9description: |
10  The CGU in an Ingenic SoC provides all the clocks generated on-chip. It
11  typically includes a variety of PLLs, multiplexers, dividers & gates in order
12  to provide many different clock signals derived from only 2 external source
13  clocks.
14
15maintainers:
16  - Paul Cercueil <paul@crapouillou.net>
17
18select:
19  properties:
20    compatible:
21      contains:
22        enum:
23          - ingenic,jz4740-cgu
24          - ingenic,jz4725b-cgu
25          - ingenic,jz4770-cgu
26          - ingenic,jz4780-cgu
27          - ingenic,x1000-cgu
28          - ingenic,x1830-cgu
29  required:
30    - compatible
31
32properties:
33  $nodename:
34    pattern: "^clock-controller@[0-9a-f]+$"
35
36  "#address-cells":
37    const: 1
38
39  "#size-cells":
40    const: 1
41
42  "#clock-cells":
43    const: 1
44
45  ranges: true
46
47  compatible:
48    items:
49      - enum:
50          - ingenic,jz4740-cgu
51          - ingenic,jz4725b-cgu
52          - ingenic,jz4770-cgu
53          - ingenic,jz4780-cgu
54          - ingenic,x1000-cgu
55          - ingenic,x1830-cgu
56      - const: simple-mfd
57    minItems: 1
58
59  reg:
60    maxItems: 1
61
62  clocks:
63    items:
64      - description: External oscillator clock
65      - description: Internal 32 kHz RTC clock
66
67  clock-names:
68    items:
69      - const: ext
70      - enum:
71          - rtc
72          - osc32k # Different name, same clock
73
74  assigned-clocks:
75    minItems: 1
76    maxItems: 64
77
78  assigned-clock-parents:
79    minItems: 1
80    maxItems: 64
81
82  assigned-clock-rates:
83    minItems: 1
84    maxItems: 64
85
86required:
87  - "#clock-cells"
88  - compatible
89  - reg
90  - clocks
91  - clock-names
92
93patternProperties:
94  "^usb-phy@[a-f0-9]+$":
95    allOf: [ $ref: "../phy/ingenic,phy-usb.yaml#" ]
96
97additionalProperties: false
98
99examples:
100  - |
101    #include <dt-bindings/clock/jz4770-cgu.h>
102    cgu: clock-controller@10000000 {
103      compatible = "ingenic,jz4770-cgu", "simple-mfd";
104      reg = <0x10000000 0x100>;
105      #address-cells = <1>;
106      #size-cells = <1>;
107      ranges = <0x0 0x10000000 0x100>;
108
109      clocks = <&ext>, <&osc32k>;
110      clock-names = "ext", "osc32k";
111
112      #clock-cells = <1>;
113
114      otg_phy: usb-phy@3c {
115        compatible = "ingenic,jz4770-phy";
116        reg = <0x3c 0x10>;
117
118        clocks = <&cgu JZ4770_CLK_OTG_PHY>;
119
120        vcc-supply = <&ldo5>;
121
122        #phy-cells = <0>;
123      };
124    };
125