summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/rtc/ti,omap-rtc.yaml
blob: 02b3c23cf43505615c70092e0532970745c21a23 (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/ti,omap-rtc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Texas Instruments OMAP Real Time Clock

maintainers:
  - Keerthy <j-keerthy@ti.com>
  - Afzal Mohammed <afzal@ti.com>

description:
  The OMAP RTC is a year/month/day/hours/minutes/seconds BCD clock with
  century-range alarm matching, driven by the 32kHz clock.

properties:
  compatible:
    oneOf:
      - const: ti,da830-rtc
      - items:
          - const: ti,am3352-rtc
          - const: ti,da830-rtc
      - items:
          - const: ti,am4372-rtc
          - const: ti,am3352-rtc
          - const: ti,da830-rtc

  reg:
    maxItems: 1

  interrupts:
    minItems: 2
    maxItems: 2

  system-power-controller:
    type: boolean
    description:
      Indicates that this RTC controls system power via the pmic_power_en pin.

  clocks:
    minItems: 1
    maxItems: 2

  clock-names:
    minItems: 1
    items:
      - enum: [ext-clk, int-clk]
      - const: int-clk

  pinctrl-0:
    description:
      Phandle to pin configuration for the external wakeup pins.

  pinctrl-names:
    minItems: 1

  ti,hwmods:
    $ref: /schemas/types.yaml#/definitions/string
    description:
      Name of the hwmod associated with the RTC.
    const: rtc
    deprecated: true

patternProperties:
  "^ext-wakeup(-[0-9]+)?$":
    type: object

    description:
      Child node describing external wakeup pin configuration.

    properties:
      pins:
        pattern: '^ext_wakeup[0-3]$'

      input-enable:
        type: boolean
        description:
          Enables the external wakeup input on the selected pin.

      ti,active-high:
        type: boolean
        description:
          Sets the wakeup input polarity to active high. By default the
          input is active low.

    required:
      - pins

    additionalProperties: false

required:
  - compatible
  - reg
  - interrupts

allOf:
  - $ref: rtc.yaml#
  - if:
      not:
        properties:
          compatible:
            contains:
              const: ti,am3352-rtc
    then:
      properties:
        system-power-controller: false
      patternProperties:
        "^ext-wakeup(-[0-9]+)?$": false

unevaluatedProperties: false

examples:
  - |
    rtc@23000 {
        compatible = "ti,da830-rtc";
        reg = <0x23000 0x1000>;
        interrupts = <19>, <19>;
        clocks = <&clk_32768_ck>;
        clock-names = "int-clk";
    };

  - |
    rtc@0 {
        compatible = "ti,am3352-rtc", "ti,da830-rtc";
        reg = <0x0 0x1000>;
        interrupts = <75>, <76>;
        system-power-controller;
        clocks = <&clk_32k_rtc>, <&clk_32768_ck>;
        clock-names = "ext-clk", "int-clk";

        pinctrl-0 = <&ext_wakeup>;
        pinctrl-names = "default";

        ext-wakeup {
            pins = "ext_wakeup0";
            input-enable;
            ti,active-high;
        };
    };