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

title: Loongson-2 SoC Clock Control Module

maintainers:
  - Yinbo Zhu <zhuyinbo@loongson.cn>

description: |
  Loongson-2 SoC clock control module is an integrated clock controller, which
  generates and supplies to all modules.

properties:
  compatible:
    enum:
      - loongson,ls2k0300-clk
      - loongson,ls2k0500-clk
      - loongson,ls2k-clk  # This is for Loongson-2K1000
      - loongson,ls2k2000-clk

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    items:
      - const: ref_100m

  '#clock-cells':
    const: 1
    description:
      The clock consumer should specify the desired clock by having the clock
      ID in its "clocks" phandle cell. See include/dt-bindings/clock/loongson,ls2k-clk.h
      for the full list of Loongson-2 SoC clock IDs.

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: loongson,ls2k0300-clk
    then:
      properties:
        clock-names: false
    else:
      required:
        - clock-names

required:
  - compatible
  - reg
  - clocks
  - '#clock-cells'

additionalProperties: false

examples:
  - |
    ref_100m: clock-ref-100m {
        compatible = "fixed-clock";
        #clock-cells = <0>;
        clock-frequency = <100000000>;
        clock-output-names = "ref_100m";
    };

    clk: clock-controller@1fe00480 {
        compatible = "loongson,ls2k-clk";
        reg = <0x1fe00480 0x58>;
        #clock-cells = <1>;
        clocks = <&ref_100m>;
        clock-names = "ref_100m";
    };