xref: /freebsd/sys/contrib/device-tree/Bindings/rtc/loongson,rtc.yaml (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*f126890aSEmmanuel Vadot%YAML 1.2
3*f126890aSEmmanuel Vadot---
4*f126890aSEmmanuel Vadot$id: http://devicetree.org/schemas/rtc/loongson,rtc.yaml#
5*f126890aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*f126890aSEmmanuel Vadot
7*f126890aSEmmanuel Vadottitle: Loongson Real-Time Clock
8*f126890aSEmmanuel Vadot
9*f126890aSEmmanuel Vadotdescription:
10*f126890aSEmmanuel Vadot  The Loongson family chips use an on-chip counter 0 (Time Of Year
11*f126890aSEmmanuel Vadot  counter) as the RTC.
12*f126890aSEmmanuel Vadot
13*f126890aSEmmanuel Vadotmaintainers:
14*f126890aSEmmanuel Vadot  - Binbin Zhou <zhoubinbin@loongson.cn>
15*f126890aSEmmanuel Vadot
16*f126890aSEmmanuel VadotallOf:
17*f126890aSEmmanuel Vadot  - $ref: rtc.yaml#
18*f126890aSEmmanuel Vadot
19*f126890aSEmmanuel Vadotproperties:
20*f126890aSEmmanuel Vadot  compatible:
21*f126890aSEmmanuel Vadot    oneOf:
22*f126890aSEmmanuel Vadot      - enum:
23*f126890aSEmmanuel Vadot          - loongson,ls1b-rtc
24*f126890aSEmmanuel Vadot          - loongson,ls1c-rtc
25*f126890aSEmmanuel Vadot          - loongson,ls7a-rtc
26*f126890aSEmmanuel Vadot          - loongson,ls2k1000-rtc
27*f126890aSEmmanuel Vadot      - items:
28*f126890aSEmmanuel Vadot          - enum:
29*f126890aSEmmanuel Vadot              - loongson,ls2k2000-rtc
30*f126890aSEmmanuel Vadot              - loongson,ls2k0500-rtc
31*f126890aSEmmanuel Vadot          - const: loongson,ls7a-rtc
32*f126890aSEmmanuel Vadot
33*f126890aSEmmanuel Vadot  reg:
34*f126890aSEmmanuel Vadot    maxItems: 1
35*f126890aSEmmanuel Vadot
36*f126890aSEmmanuel Vadot  interrupts:
37*f126890aSEmmanuel Vadot    maxItems: 1
38*f126890aSEmmanuel Vadot
39*f126890aSEmmanuel Vadotrequired:
40*f126890aSEmmanuel Vadot  - compatible
41*f126890aSEmmanuel Vadot  - reg
42*f126890aSEmmanuel Vadot
43*f126890aSEmmanuel VadotunevaluatedProperties: false
44*f126890aSEmmanuel Vadot
45*f126890aSEmmanuel Vadotexamples:
46*f126890aSEmmanuel Vadot  - |
47*f126890aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
48*f126890aSEmmanuel Vadot
49*f126890aSEmmanuel Vadot    rtc@1fe27800 {
50*f126890aSEmmanuel Vadot        compatible = "loongson,ls2k1000-rtc";
51*f126890aSEmmanuel Vadot        reg = <0x1fe27800 0x100>;
52*f126890aSEmmanuel Vadot
53*f126890aSEmmanuel Vadot        interrupt-parent = <&liointc1>;
54*f126890aSEmmanuel Vadot        interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
55*f126890aSEmmanuel Vadot    };
56*f126890aSEmmanuel Vadot
57*f126890aSEmmanuel Vadot...
58