1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/rtc/rtc-ds1307.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Dallas DS1307 and compatible RTC
8
9maintainers:
10  - Alexandre Belloni <alexandre.belloni@bootlin.com>
11
12properties:
13  compatible:
14    oneOf:
15      - enum:
16          - dallas,ds1307
17          - dallas,ds1308
18          - dallas,ds1337
19          - dallas,ds1338
20          - dallas,ds1339
21          - dallas,ds1388
22          - dallas,ds1340
23          - dallas,ds1341
24          - maxim,ds3231
25          - st,m41t0
26          - st,m41t00
27          - st,m41t11
28          - microchip,mcp7940x
29          - microchip,mcp7941x
30          - pericom,pt7c4338
31          - epson,rx8025
32          - isil,isl12057
33          - epson,rx8130
34
35      - items:
36          - enum:
37              - st,m41t00
38          - const: dallas,ds1338
39
40  reg:
41    maxItems: 1
42
43  interrupts:
44    minItems: 1
45    maxItems: 2
46
47  interrupt-names:
48    maxItems: 2
49
50  "#clock-cells":
51    const: 1
52
53  clock-output-names:
54    description: From common clock binding to override the default output clock name.
55
56  wakeup-source:
57    description: Enables wake up of host system on alarm.
58
59  vcc-supply: true
60
61allOf:
62  - $ref: rtc.yaml
63  - if:
64      properties:
65        compatible:
66          contains:
67            enum:
68              - dallas,ds1339
69              - dallas,ds1340
70              - dallas,ds1388
71    then:
72      properties:
73        trickle-resistor-ohms:
74          description: Selected resistor for trickle charger. Should be specified if trickle
75            charger should be enabled.
76          enum: [ 250, 2000, 4000 ]
77
78        trickle-diode-disable:
79          description: Do not use internal trickle charger diode. Should be given if internal
80            trickle charger diode should be disabled (superseded by aux-voltage-chargeable)
81          deprecated: true
82
83unevaluatedProperties: false
84
85required:
86  - compatible
87  - reg
88
89examples:
90  - |
91    i2c {
92      #address-cells = <1>;
93      #size-cells = <0>;
94
95      rtc@68 {
96        compatible = "dallas,ds1337";
97        reg = <0x68>;
98        interrupt-parent = <&gpio4>;
99        interrupts = <20 0>;
100        trickle-resistor-ohms = <250>;
101      };
102    };
103