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

dt-bindings: rtc: update stm32-rtc documentation for stm32mp1 rtc

RTC embedded in stm32mp1 SoC is slightly different from stm32h7 one, it
doesn't require to disable backup domain write protection, and rtc_ck
parent clock assignment isn't allowed.
To sum up, stm32mp1 RTC requires 2 clocks, pclk and rtc_ck, and an RTC
alarm interrupt.

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

authored by

Amelie Delaunay and committed by
Alexandre Belloni
5c4554d6 02b0cc34

+20 -7
+20 -7
Documentation/devicetree/bindings/rtc/st,stm32-rtc.txt
··· 1 1 STM32 Real Time Clock 2 2 3 3 Required properties: 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. 4 + - 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. 6 8 - reg: address range of rtc register set. 7 9 - clocks: can use up to two clocks, depending on part used: 8 10 - "rtc_ck": RTC clock source. 9 - It is required on stm32(f4/f7) and stm32h7. 10 11 - "pclk": RTC APB interface clock. 11 12 It is not present on stm32(f4/f7). 12 - It is required on stm32h7. 13 + It is required on stm32(h7/mp1). 13 14 - clock-names: must be "rtc_ck" and "pclk". 14 - It is required only on stm32h7. 15 + It is required on stm32(h7/mp1). 15 16 - interrupt-parent: phandle for the interrupt controller. 16 - - interrupts: rtc alarm interrupt. 17 + It is required on stm32(f4/f7/h7). 18 + - interrupts: rtc alarm interrupt. On stm32mp1, a second interrupt is required 19 + for rtc alarm wakeup interrupt. 17 20 - st,syscfg: phandle/offset/mask triplet. The phandle to pwrcfg used to 18 21 access control register at offset, and change the dbp (Disable Backup 19 22 Protection) bit represented by the mask, mandatory to disable/enable backup 20 23 domain (RTC registers) write protection. 24 + It is required on stm32(f4/f7/h7). 21 25 22 - Optional properties (to override default rtc_ck parent clock): 26 + Optional properties (to override default rtc_ck parent clock on stm32(f4/f7/h7): 23 27 - assigned-clocks: reference to the rtc_ck clock entry. 24 28 - assigned-clock-parents: phandle of the new parent clock of rtc_ck. 25 29 ··· 51 47 interrupts = <17 1>; 52 48 interrupt-names = "alarm"; 53 49 st,syscfg = <&pwrcfg 0x00 0x100>; 50 + }; 51 + 52 + rtc: rtc@5c004000 { 53 + compatible = "st,stm32mp1-rtc"; 54 + reg = <0x5c004000 0x400>; 55 + clocks = <&rcc RTCAPB>, <&rcc RTC>; 56 + clock-names = "pclk", "rtc_ck"; 57 + interrupts-extended = <&intc GIC_SPI 3 IRQ_TYPE_NONE>, 58 + <&exti 19 1>; 54 59 };