summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/rtc/renesas,sh-rtc.yaml
blob: b95cb017f469613eb175e2187d48ab09ad486c1e (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
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/renesas,sh-rtc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Real Time Clock for Renesas SH and ARM SoCs

maintainers:
  - Chris Brandt <chris.brandt@renesas.com>
  - Geert Uytterhoeven <geert+renesas@glider.be>

properties:
  compatible:
    items:
      - const: renesas,r7s72100-rtc  # RZ/A1H
      - const: renesas,sh-rtc

  reg:
    maxItems: 1

  interrupts:
    maxItems: 3

  interrupt-names:
    items:
      - const: alarm
      - const: period
      - const: carry

  clocks:
    # The functional clock source for the RTC controller must be listed
    # first (if it exists). Additionally, potential clock counting sources
    # are to be listed.
    minItems: 1
    maxItems: 4

  clock-names:
    # The functional clock must be labeled as "fck". Other clocks
    # may be named in accordance to the SoC hardware manuals.
    minItems: 1
    maxItems: 4
    items:
      enum: [ fck, rtc_x1, rtc_x3, extal ]

required:
  - compatible
  - reg
  - interrupts
  - interrupt-names
  - clocks
  - clock-names

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/r7s72100-clock.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    rtc: rtc@fcff1000 {
        compatible = "renesas,r7s72100-rtc", "renesas,sh-rtc";
        reg = <0xfcff1000 0x2e>;
        interrupts = <GIC_SPI 276 IRQ_TYPE_EDGE_RISING>,
                     <GIC_SPI 277 IRQ_TYPE_EDGE_RISING>,
                     <GIC_SPI 278 IRQ_TYPE_EDGE_RISING>;
        interrupt-names = "alarm", "period", "carry";
        clocks = <&mstp6_clks R7S72100_CLK_RTC>, <&rtc_x1_clk>,
                 <&rtc_x3_clk>, <&extal_clk>;
        clock-names = "fck", "rtc_x1", "rtc_x3", "extal";
    };