0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/rtc/st,stm32-rtc.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: STMicroelectronics STM32 Real Time Clock Bindings
0008
0009 maintainers:
0010 - Gabriel Fernandez <gabriel.fernandez@foss.st.com>
0011
0012 properties:
0013 compatible:
0014 enum:
0015 - st,stm32-rtc
0016 - st,stm32h7-rtc
0017 - st,stm32mp1-rtc
0018
0019 reg:
0020 maxItems: 1
0021
0022 clocks:
0023 minItems: 1
0024 maxItems: 2
0025
0026 clock-names:
0027 items:
0028 - const: pclk
0029 - const: rtc_ck
0030
0031 interrupts:
0032 maxItems: 1
0033
0034 st,syscfg:
0035 $ref: "/schemas/types.yaml#/definitions/phandle-array"
0036 items:
0037 minItems: 3
0038 maxItems: 3
0039 description: |
0040 Phandle/offset/mask triplet. The phandle to pwrcfg used to
0041 access control register at offset, and change the dbp (Disable Backup
0042 Protection) bit represented by the mask, mandatory to disable/enable backup
0043 domain (RTC registers) write protection.
0044
0045 assigned-clocks:
0046 description: |
0047 override default rtc_ck parent clock reference to the rtc_ck clock entry
0048 maxItems: 1
0049
0050 assigned-clock-parents:
0051 description: |
0052 override default rtc_ck parent clock phandle of the new parent clock of rtc_ck
0053 maxItems: 1
0054
0055 allOf:
0056 - if:
0057 properties:
0058 compatible:
0059 contains:
0060 const: st,stm32-rtc
0061
0062 then:
0063 properties:
0064 clocks:
0065 minItems: 1
0066 maxItems: 1
0067
0068 clock-names: false
0069
0070 required:
0071 - st,syscfg
0072
0073 - if:
0074 properties:
0075 compatible:
0076 contains:
0077 const: st,stm32h7-rtc
0078
0079 then:
0080 properties:
0081 clocks:
0082 minItems: 2
0083 maxItems: 2
0084
0085 required:
0086 - clock-names
0087 - st,syscfg
0088
0089 - if:
0090 properties:
0091 compatible:
0092 contains:
0093 const: st,stm32mp1-rtc
0094
0095 then:
0096 properties:
0097 clocks:
0098 minItems: 2
0099 maxItems: 2
0100
0101 assigned-clocks: false
0102 assigned-clock-parents: false
0103
0104 required:
0105 - clock-names
0106
0107 required:
0108 - compatible
0109 - reg
0110 - clocks
0111 - interrupts
0112
0113 additionalProperties: false
0114
0115 examples:
0116 - |
0117 #include <dt-bindings/mfd/stm32f4-rcc.h>
0118 #include <dt-bindings/clock/stm32fx-clock.h>
0119 rtc@40002800 {
0120 compatible = "st,stm32-rtc";
0121 reg = <0x40002800 0x400>;
0122 clocks = <&rcc 1 CLK_RTC>;
0123 assigned-clocks = <&rcc 1 CLK_RTC>;
0124 assigned-clock-parents = <&rcc 1 CLK_LSE>;
0125 interrupt-parent = <&exti>;
0126 interrupts = <17 1>;
0127 st,syscfg = <&pwrcfg 0x00 0x100>;
0128 };
0129
0130 - |
0131 #include <dt-bindings/interrupt-controller/arm-gic.h>
0132 #include <dt-bindings/clock/stm32mp1-clks.h>
0133 rtc@5c004000 {
0134 compatible = "st,stm32mp1-rtc";
0135 reg = <0x5c004000 0x400>;
0136 clocks = <&rcc RTCAPB>, <&rcc RTC>;
0137 clock-names = "pclk", "rtc_ck";
0138 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
0139 };
0140
0141 ...