xref: /linux/Documentation/devicetree/bindings/rtc/amlogic,a4-rtc.yaml (revision 54fd6bd42e7bd351802ff1d193a2e33e4bfb1836)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2# Copyright (C) 2024 Amlogic, Inc. All rights reserved
3%YAML 1.2
4---
5$id: http://devicetree.org/schemas/rtc/amlogic,a4-rtc.yaml#
6$schema: http://devicetree.org/meta-schemas/core.yaml#
7
8title: Amlogic A4 and A5 RTC
9
10maintainers:
11  - Yiting Deng <yiting.deng@amlogic.com>
12  - Xianwei Zhao <xianwei.zhao@amlogic.com>
13
14allOf:
15  - $ref: rtc.yaml#
16
17properties:
18  compatible:
19    oneOf:
20      - enum:
21          - amlogic,a4-rtc
22          - amlogic,a5-rtc
23      - items:
24          - enum:
25              - amlogic,c3-rtc
26          - const: amlogic,a5-rtc
27
28  reg:
29    maxItems: 1
30
31  clocks:
32    items:
33      - description: RTC clock source, available 24M or 32K crystal
34          oscillator source. when using 24M, need to divide 24M into 32K.
35      - description: RTC module accesses the clock of the apb bus.
36
37  clock-names:
38    items:
39      - const: osc
40      - const: sys
41
42  interrupts:
43    maxItems: 1
44
45required:
46  - compatible
47  - reg
48  - clocks
49  - clock-names
50  - interrupts
51
52additionalProperties: false
53
54examples:
55  - |
56    #include <dt-bindings/interrupt-controller/arm-gic.h>
57    apb {
58        #address-cells = <2>;
59        #size-cells = <2>;
60
61        rtc@8e600 {
62            compatible = "amlogic,a4-rtc";
63            reg = <0x0 0x8e600 0x0 0x38>;
64            clocks = <&xtal_32k>, <&clkc_periphs 1>;
65            clock-names = "osc", "sys";
66            interrupts = <GIC_SPI 131 IRQ_TYPE_EDGE_RISING>;
67        };
68    };
69