STMicroelectronics STM32 Real Time Clock

Schema identifier ($id): "http://devicetree.org/schemas/rtc/st,stm32-rtc.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Gabriel Fernandez <gabriel.fernandez@foss.st.com>"

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "st,stm32-rtc", "st,stm32h7-rtc", "st,stm32mp1-rtc", "st,stm32mp25-rtc"

reg — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

clock-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "pclk"

Item 2

Exact value (const): "rtc_ck"

interrupts — required here #

Maximum number of items (maxItems): 1

st,syscfg — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle-array

Array item rules (items) #

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 3

Phandle/offset/mask triplet. The phandle to pwrcfg used to access control register at offset, and change the dbp (Disable Backup Protection) bit represented by the mask, mandatory to disable/enable backup domain (RTC registers) write protection.

assigned-clocks — not listed as required here #

override default rtc_ck parent clock reference to the rtc_ck clock entry

Maximum number of items (maxItems): 1

assigned-clock-parents — not listed as required here #

override default rtc_ck parent clock phandle of the new parent clock of rtc_ck

Maximum number of items (maxItems): 1

Properties matching a name pattern (patternProperties) #

^rtc-[a-z]+-[0-9]+$ — name matches this regular expression #

Value type (type): "object"

Shared schema rule ($ref): /schemas/pinctrl/pinmux-node.yaml

Configuration of STM32 RTC pins description. STM32 RTC is able to output
some signals on specific pins:
- LSCO (Low Speed Clock Output) that allow to output LSE clock on a pin.
- Alarm out that allow to send a pulse on a pin when alarm A of the RTC
  expires.

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

function — not listed as required here

Allowed values (enum): "lsco", "alarm-a"

pins — not listed as required here

Allowed values (enum): "out1", "out2", "out2_rmp"

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "st,stm32-rtc"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 1

clock-names — not listed as required here

false — Not permitted by this property rule.

Properties matching a name pattern (patternProperties)

^rtc-[a-z]+-[0-9]+$ — name matches this regular expression

false — Not permitted by this property rule.

Required in this object (required): "st,syscfg"

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "st,stm32h7-rtc"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 2

Properties matching a name pattern (patternProperties)

^rtc-[a-z]+-[0-9]+$ — name matches this regular expression

false — Not permitted by this property rule.

Required in this object (required): "clock-names", "st,syscfg"

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "st,stm32mp1-rtc", "st,stm32mp25-rtc"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 2

assigned-clocks — not listed as required here

false — Not permitted by this property rule.

assigned-clock-parents — not listed as required here

false — Not permitted by this property rule.

Required in this object (required): "clock-names"

Required in this object (required): "compatible", "reg", "clocks", "interrupts"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/mfd/stm32f4-rcc.h>
#include <dt-bindings/clock/stm32fx-clock.h>
rtc@40002800 {
  compatible = "st,stm32-rtc";
  reg = <0x40002800 0x400>;
  clocks = <&rcc 1 CLK_RTC>;
  assigned-clocks = <&rcc 1 CLK_RTC>;
  assigned-clock-parents = <&rcc 1 CLK_LSE>;
  interrupt-parent = <&exti>;
  interrupts = <17 1>;
  st,syscfg = <&pwrcfg 0x00 0x100>;
};
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/stm32mp1-clks.h>
rtc@5c004000 {
  compatible = "st,stm32mp1-rtc";
  reg = <0x5c004000 0x400>;
  clocks = <&rcc RTCAPB>, <&rcc RTC>;
  clock-names = "pclk", "rtc_ck";
  interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page