Merge tag 'qcom-drivers-for-6.9-2' of https://git.kernel.org/pub/scm/linux/kernel...
[linux-block.git] / Documentation / devicetree / bindings / clock / google,gs101-clock.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/clock/google,gs101-clock.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Google GS101 SoC clock controller
8
9 maintainers:
10   - Peter Griffin <peter.griffin@linaro.org>
11
12 description: |
13   Google GS101 clock controller is comprised of several CMU units, generating
14   clocks for different domains. Those CMU units are modeled as separate device
15   tree nodes, and might depend on each other. The root clock in that clock tree
16   is OSCCLK (24.576 MHz). That external clock must be defined as a fixed-rate
17   clock in dts.
18
19   CMU_TOP is a top-level CMU, where all base clocks are prepared using PLLs and
20   dividers; all other leaf clocks (other CMUs) are usually derived from CMU_TOP.
21
22   Each clock is assigned an identifier and client nodes can use this identifier
23   to specify the clock which they consume. All clocks available for usage
24   in clock consumer nodes are defined as preprocessor macros in
25   'dt-bindings/clock/gs101.h' header.
26
27 properties:
28   compatible:
29     enum:
30       - google,gs101-cmu-top
31       - google,gs101-cmu-apm
32       - google,gs101-cmu-misc
33
34   clocks:
35     minItems: 1
36     maxItems: 2
37
38   clock-names:
39     minItems: 1
40     maxItems: 2
41
42   "#clock-cells":
43     const: 1
44
45   reg:
46     maxItems: 1
47
48 required:
49   - compatible
50   - "#clock-cells"
51   - clocks
52   - clock-names
53   - reg
54
55 allOf:
56   - if:
57       properties:
58         compatible:
59           contains:
60             enum:
61               - google,gs101-cmu-top
62               - google,gs101-cmu-apm
63     then:
64       properties:
65         clocks:
66           items:
67             - description: External reference clock (24.576 MHz)
68
69         clock-names:
70           items:
71             - const: oscclk
72
73   - if:
74       properties:
75         compatible:
76           contains:
77             const: google,gs101-cmu-misc
78
79     then:
80       properties:
81         clocks:
82           items:
83             - description: Misc bus clock (from CMU_TOP)
84             - description: Misc sss clock (from CMU_TOP)
85
86         clock-names:
87           items:
88             - const: dout_cmu_misc_bus
89             - const: dout_cmu_misc_sss
90
91 additionalProperties: false
92
93 examples:
94   # Clock controller node for CMU_TOP
95   - |
96     #include <dt-bindings/clock/google,gs101.h>
97
98     cmu_top: clock-controller@1e080000 {
99         compatible = "google,gs101-cmu-top";
100         reg = <0x1e080000 0x8000>;
101         #clock-cells = <1>;
102         clocks = <&ext_24_5m>;
103         clock-names = "oscclk";
104     };
105
106 ...