blob: 130ca5b9825384c9f8c15525c990909daab04325 [file] [log] [blame]
Amelie Delaunay7c609302017-01-05 14:43:23 +01001STM32 Real Time Clock
2
3Required properties:
Amelie Delaunay5c4554d2018-05-17 14:04:25 +02004- compatible: can be one of the following:
5 - "st,stm32-rtc" for devices compatible with stm32(f4/f7).
6 - "st,stm32h7-rtc" for devices compatible with stm32h7.
7 - "st,stm32mp1-rtc" for devices compatible with stm32mp1.
Amelie Delaunay7c609302017-01-05 14:43:23 +01008- reg: address range of rtc register set.
Amelie Delaunayd2be2792017-07-06 10:47:44 +02009- clocks: can use up to two clocks, depending on part used:
10 - "rtc_ck": RTC clock source.
Amelie Delaunayd2be2792017-07-06 10:47:44 +020011 - "pclk": RTC APB interface clock.
12 It is not present on stm32(f4/f7).
Amelie Delaunay5c4554d2018-05-17 14:04:25 +020013 It is required on stm32(h7/mp1).
Amelie Delaunayd2be2792017-07-06 10:47:44 +020014- clock-names: must be "rtc_ck" and "pclk".
Amelie Delaunay5c4554d2018-05-17 14:04:25 +020015 It is required on stm32(h7/mp1).
Amelie Delaunay5c4554d2018-05-17 14:04:25 +020016- interrupts: rtc alarm interrupt. On stm32mp1, a second interrupt is required
17 for rtc alarm wakeup interrupt.
Amelie Delaunaydeb7dcf2018-04-19 15:21:42 +020018- st,syscfg: phandle/offset/mask triplet. The phandle to pwrcfg used to
19 access control register at offset, and change the dbp (Disable Backup
20 Protection) bit represented by the mask, mandatory to disable/enable backup
21 domain (RTC registers) write protection.
Amelie Delaunay5c4554d2018-05-17 14:04:25 +020022 It is required on stm32(f4/f7/h7).
Amelie Delaunay7c609302017-01-05 14:43:23 +010023
Amelie Delaunay5c4554d2018-05-17 14:04:25 +020024Optional properties (to override default rtc_ck parent clock on stm32(f4/f7/h7):
Amelie Delaunayd2be2792017-07-06 10:47:44 +020025- assigned-clocks: reference to the rtc_ck clock entry.
26- assigned-clock-parents: phandle of the new parent clock of rtc_ck.
Amelie Delaunay7c609302017-01-05 14:43:23 +010027
28Example:
29
30 rtc: rtc@40002800 {
31 compatible = "st,stm32-rtc";
32 reg = <0x40002800 0x400>;
33 clocks = <&rcc 1 CLK_RTC>;
34 assigned-clocks = <&rcc 1 CLK_RTC>;
35 assigned-clock-parents = <&rcc 1 CLK_LSE>;
36 interrupt-parent = <&exti>;
37 interrupts = <17 1>;
Amelie Delaunaydeb7dcf2018-04-19 15:21:42 +020038 st,syscfg = <&pwrcfg 0x00 0x100>;
Amelie Delaunay7c609302017-01-05 14:43:23 +010039 };
Amelie Delaunayd2be2792017-07-06 10:47:44 +020040
41 rtc: rtc@58004000 {
42 compatible = "st,stm32h7-rtc";
43 reg = <0x58004000 0x400>;
44 clocks = <&rcc RTCAPB_CK>, <&rcc RTC_CK>;
45 clock-names = "pclk", "rtc_ck";
46 assigned-clocks = <&rcc RTC_CK>;
47 assigned-clock-parents = <&rcc LSE_CK>;
48 interrupt-parent = <&exti>;
49 interrupts = <17 1>;
50 interrupt-names = "alarm";
Amelie Delaunaydeb7dcf2018-04-19 15:21:42 +020051 st,syscfg = <&pwrcfg 0x00 0x100>;
Amelie Delaunayd2be2792017-07-06 10:47:44 +020052 };
Amelie Delaunay5c4554d2018-05-17 14:04:25 +020053
54 rtc: rtc@5c004000 {
55 compatible = "st,stm32mp1-rtc";
56 reg = <0x5c004000 0x400>;
57 clocks = <&rcc RTCAPB>, <&rcc RTC>;
58 clock-names = "pclk", "rtc_ck";
59 interrupts-extended = <&intc GIC_SPI 3 IRQ_TYPE_NONE>,
60 <&exti 19 1>;
61 };