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