xref: /freebsd/sys/contrib/device-tree/Bindings/clock/loongson,ls2k-clk.yaml (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
1cb7aa33aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2cb7aa33aSEmmanuel Vadot%YAML 1.2
3cb7aa33aSEmmanuel Vadot---
4cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/clock/loongson,ls2k-clk.yaml#
5cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6cb7aa33aSEmmanuel Vadot
7cb7aa33aSEmmanuel Vadottitle: Loongson-2 SoC Clock Control Module
8cb7aa33aSEmmanuel Vadot
9cb7aa33aSEmmanuel Vadotmaintainers:
10cb7aa33aSEmmanuel Vadot  - Yinbo Zhu <zhuyinbo@loongson.cn>
11cb7aa33aSEmmanuel Vadot
12cb7aa33aSEmmanuel Vadotdescription: |
13cb7aa33aSEmmanuel Vadot  Loongson-2 SoC clock control module is an integrated clock controller, which
14cb7aa33aSEmmanuel Vadot  generates and supplies to all modules.
15cb7aa33aSEmmanuel Vadot
16cb7aa33aSEmmanuel Vadotproperties:
17cb7aa33aSEmmanuel Vadot  compatible:
18cb7aa33aSEmmanuel Vadot    enum:
19*7d0873ebSEmmanuel Vadot      - loongson,ls2k0500-clk
20*7d0873ebSEmmanuel Vadot      - loongson,ls2k-clk  # This is for Loongson-2K1000
21*7d0873ebSEmmanuel Vadot      - loongson,ls2k2000-clk
22cb7aa33aSEmmanuel Vadot
23cb7aa33aSEmmanuel Vadot  reg:
24cb7aa33aSEmmanuel Vadot    maxItems: 1
25cb7aa33aSEmmanuel Vadot
26cb7aa33aSEmmanuel Vadot  clocks:
27cb7aa33aSEmmanuel Vadot    items:
28cb7aa33aSEmmanuel Vadot      - description: 100m ref
29cb7aa33aSEmmanuel Vadot
30cb7aa33aSEmmanuel Vadot  clock-names:
31cb7aa33aSEmmanuel Vadot    items:
32cb7aa33aSEmmanuel Vadot      - const: ref_100m
33cb7aa33aSEmmanuel Vadot
34cb7aa33aSEmmanuel Vadot  '#clock-cells':
35cb7aa33aSEmmanuel Vadot    const: 1
36cb7aa33aSEmmanuel Vadot    description:
37cb7aa33aSEmmanuel Vadot      The clock consumer should specify the desired clock by having the clock
38cb7aa33aSEmmanuel Vadot      ID in its "clocks" phandle cell. See include/dt-bindings/clock/loongson,ls2k-clk.h
39cb7aa33aSEmmanuel Vadot      for the full list of Loongson-2 SoC clock IDs.
40cb7aa33aSEmmanuel Vadot
41cb7aa33aSEmmanuel Vadotrequired:
42cb7aa33aSEmmanuel Vadot  - compatible
43cb7aa33aSEmmanuel Vadot  - reg
44cb7aa33aSEmmanuel Vadot  - clocks
45cb7aa33aSEmmanuel Vadot  - clock-names
46cb7aa33aSEmmanuel Vadot  - '#clock-cells'
47cb7aa33aSEmmanuel Vadot
48cb7aa33aSEmmanuel VadotadditionalProperties: false
49cb7aa33aSEmmanuel Vadot
50cb7aa33aSEmmanuel Vadotexamples:
51cb7aa33aSEmmanuel Vadot  - |
52cb7aa33aSEmmanuel Vadot    ref_100m: clock-ref-100m {
53cb7aa33aSEmmanuel Vadot        compatible = "fixed-clock";
54cb7aa33aSEmmanuel Vadot        #clock-cells = <0>;
55cb7aa33aSEmmanuel Vadot        clock-frequency = <100000000>;
56cb7aa33aSEmmanuel Vadot        clock-output-names = "ref_100m";
57cb7aa33aSEmmanuel Vadot    };
58cb7aa33aSEmmanuel Vadot
59cb7aa33aSEmmanuel Vadot    clk: clock-controller@1fe00480 {
60cb7aa33aSEmmanuel Vadot        compatible = "loongson,ls2k-clk";
61cb7aa33aSEmmanuel Vadot        reg = <0x1fe00480 0x58>;
62cb7aa33aSEmmanuel Vadot        #clock-cells = <1>;
63cb7aa33aSEmmanuel Vadot        clocks = <&ref_100m>;
64cb7aa33aSEmmanuel Vadot        clock-names = "ref_100m";
65cb7aa33aSEmmanuel Vadot    };
66