summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml
blob: 1f36ccc4cde1d799a23f639a93d554078eff949a (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
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/xlnx,versal-clk.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Xilinx Versal clock controller

maintainers:
  - Michal Simek <michal.simek@amd.com>

description: |
  The clock controller is a hardware block of Xilinx versal clock tree. It
  reads required input clock frequencies from the devicetree and acts as clock
  provider for all clock consumers of PS clocks.

properties:
  compatible:
    oneOf:
      - const: xlnx,versal-clk
      - items:
          - enum:
              - xlnx,versal-net-clk
          - const: xlnx,versal-clk

  "#clock-cells":
    const: 1

  clocks:
    description: List of clock specifiers which are external input
      clocks to the given clock controller.
    minItems: 2
    items:
      - description: reference clock
      - description: alternate reference clock for programmable logic
      - description: alternate reference clock

  clock-names:
    minItems: 2
    items:
      - const: ref
      - const: pl_alt_ref
      - const: alt_ref

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

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - xlnx,versal-net-clk
    then:
      properties:
        clocks:
          minItems: 3
        clock-names:
          minItems: 3
    else:
      properties:
        clocks:
          maxItems: 2
        clock-names:
          maxItems: 2

examples:
  - |
    firmware {
      versal-firmware {
        compatible = "xlnx,versal-firmware";
        method = "smc";
        versal_clk: clock-controller {
          #clock-cells = <1>;
          compatible = "xlnx,versal-clk";
          clocks = <&ref>,  <&pl_alt_ref>;
          clock-names = "ref", "pl_alt_ref";
        };
      };
    };

  - |
    clock-controller {
      compatible = "xlnx,versal-net-clk", "xlnx,versal-clk";
      clocks = <&ref>, <&pl_alt_ref>, <&alt_ref>;
      clock-names = "ref", "pl_alt_ref", "alt_ref";
      #clock-cells = <1>;
    };
...