1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/rtc/s3c-rtc.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Samsung S3C, S5P and Exynos Real Time Clock controller
8
9maintainers:
10  - Krzysztof Kozlowski <krzk@kernel.org>
11
12properties:
13  compatible:
14    oneOf:
15      - enum:
16          - samsung,s3c2410-rtc
17          - samsung,s3c2416-rtc
18          - samsung,s3c2443-rtc
19          - samsung,s3c6410-rtc
20      - const: samsung,exynos3250-rtc
21        deprecated: true
22
23  reg:
24    maxItems: 1
25
26  clocks:
27    description:
28      Must contain a list of phandle and clock specifier for the rtc
29      clock and in the case of a s3c6410 compatible controller, also
30      a source clock.
31    minItems: 1
32    maxItems: 2
33
34  clock-names:
35    description:
36      Must contain "rtc" and for a s3c6410 compatible controller
37      also "rtc_src".
38    minItems: 1
39    maxItems: 2
40
41  interrupts:
42    description:
43      Two interrupt numbers to the cpu should be specified. First
44      interrupt number is the rtc alarm interrupt and second interrupt number
45      is the rtc tick interrupt. The number of cells representing a interrupt
46      depends on the parent interrupt controller.
47    minItems: 2
48    maxItems: 2
49
50allOf:
51  - if:
52      properties:
53        compatible:
54          contains:
55            enum:
56              - samsung,s3c6410-rtc
57              - samsung,exynos3250-rtc
58    then:
59      properties:
60        clocks:
61          minItems: 2
62          maxItems: 2
63        clock-names:
64          items:
65            - const: rtc
66            - const: rtc_src
67    else:
68      properties:
69        clocks:
70          minItems: 1
71          maxItems: 1
72        clock-names:
73          items:
74            - const: rtc
75
76examples:
77  - |
78    rtc@10070000 {
79      compatible = "samsung,s3c6410-rtc";
80      reg = <0x10070000 0x100>;
81      interrupts = <0 44 4>, <0 45 4>;
82      clocks = <&clock 0>, // CLK_RTC
83               <&s2mps11_osc 0>; // S2MPS11_CLK_AP
84      clock-names = "rtc", "rtc_src";
85    };
86