Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: rtc: stm32: add support for STM32H7

This patch documents support for STM32H7 Real Time Clock.
It introduces a new compatible and rework clock definitions.
On STM32H7 we have a 'pclk' clock for register access, in addition to
the 'rtc_ck' clock.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

authored by

Amelie Delaunay and committed by
Alexandre Belloni
d2be279b 300a7735

+27 -5
+27 -5
Documentation/devicetree/bindings/rtc/st,stm32-rtc.txt
··· 1 1 STM32 Real Time Clock 2 2 3 3 Required properties: 4 - - compatible: "st,stm32-rtc". 4 + - compatible: can be either "st,stm32-rtc" or "st,stm32h7-rtc", depending on 5 + the device is compatible with stm32(f4/f7) or stm32h7. 5 6 - reg: address range of rtc register set. 6 - - clocks: reference to the clock entry ck_rtc. 7 + - clocks: can use up to two clocks, depending on part used: 8 + - "rtc_ck": RTC clock source. 9 + It is required on stm32(f4/f7) and stm32h7. 10 + - "pclk": RTC APB interface clock. 11 + It is not present on stm32(f4/f7). 12 + It is required on stm32h7. 13 + - clock-names: must be "rtc_ck" and "pclk". 14 + It is required only on stm32h7. 7 15 - interrupt-parent: phandle for the interrupt controller. 8 16 - interrupts: rtc alarm interrupt. 9 17 - st,syscfg: phandle for pwrcfg, mandatory to disable/enable backup domain 10 18 (RTC registers) write protection. 11 19 12 - Optional properties (to override default ck_rtc parent clock): 13 - - assigned-clocks: reference to the ck_rtc clock entry. 14 - - assigned-clock-parents: phandle of the new parent clock of ck_rtc. 20 + Optional properties (to override default rtc_ck parent clock): 21 + - assigned-clocks: reference to the rtc_ck clock entry. 22 + - assigned-clock-parents: phandle of the new parent clock of rtc_ck. 15 23 16 24 Example: 17 25 ··· 32 24 interrupt-parent = <&exti>; 33 25 interrupts = <17 1>; 34 26 st,syscfg = <&pwrcfg>; 27 + }; 28 + 29 + rtc: rtc@58004000 { 30 + compatible = "st,stm32h7-rtc"; 31 + reg = <0x58004000 0x400>; 32 + clocks = <&rcc RTCAPB_CK>, <&rcc RTC_CK>; 33 + clock-names = "pclk", "rtc_ck"; 34 + assigned-clocks = <&rcc RTC_CK>; 35 + assigned-clock-parents = <&rcc LSE_CK>; 36 + interrupt-parent = <&exti>; 37 + interrupts = <17 1>; 38 + interrupt-names = "alarm"; 39 + st,syscfg = <&pwrcfg>; 40 + status = "disabled"; 35 41 };