STMicroelectronics STM32 Low-Power Timers

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

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

The STM32 Low-Power Timer (LPTIM) is a 16-bit timer that provides several
functions
 - PWM output (with programmable prescaler, configurable polarity)
 - Trigger source for STM32 ADC/DAC (LPTIM_OUT)
 - Several counter modes:
   - quadrature encoder to detect angular position and direction of rotary
     elements, from IN1 and IN2 input signals.
   - simple counter from IN1 input signal.

Maintainers (maintainers): "Fabrice Gasnier <fabrice.gasnier@foss.st.com>"

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Array item rules (items)

Item 1

Exact value (const): "st,stm32mp25-lptimer"

Item 2

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

Rule 2

Array item rules (items)

Item 1

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

reg — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Maximum number of items (maxItems): 1

clock-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "mux"

interrupts — not listed as required here #

Maximum number of items (maxItems): 1

#address-cells — required here #

Exact value (const): 1

#size-cells — required here #

Exact value (const): 0

wakeup-source — not listed as required here #

true — No constraints added by this property rule.

access-controllers — not listed as required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

power-domains — not listed as required here #

Maximum number of items (maxItems): 1

pwm — not listed as required here #

Value type (type): "object"

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

false

Not allowed by this rule.

Properties and child nodes (properties) #

compatible — required here

Exactly one of these rules must match (oneOf)

Rule 1

Array item rules (items)

Item 1

Exact value (const): "st,stm32mp25-pwm-lp"

Item 2

Exact value (const): "st,stm32-pwm-lp"

Rule 2

Array item rules (items)

Item 1

Exact value (const): "st,stm32-pwm-lp"

#pwm-cells — required here

Exact value (const): 3

Required in this object (required): "#pwm-cells", "compatible"

counter — not listed as required here #

Value type (type): "object"

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

false

Not allowed by this rule.

Properties and child nodes (properties) #

compatible — required here

Exactly one of these rules must match (oneOf)

Rule 1

Array item rules (items)

Item 1

Exact value (const): "st,stm32mp25-lptimer-counter"

Item 2

Exact value (const): "st,stm32-lptimer-counter"

Rule 2

Array item rules (items)

Item 1

Exact value (const): "st,stm32-lptimer-counter"

Required in this object (required): "compatible"

timer — not listed as required here #

Value type (type): "object"

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

false

Not allowed by this rule.

Properties and child nodes (properties) #

compatible — required here

Exactly one of these rules must match (oneOf)

Rule 1

Array item rules (items)

Item 1

Exact value (const): "st,stm32mp25-lptimer-timer"

Item 2

Exact value (const): "st,stm32-lptimer-timer"

Rule 2

Array item rules (items)

Item 1

Exact value (const): "st,stm32-lptimer-timer"

Required in this object (required): "compatible"

Properties matching a name pattern (patternProperties) #

^trigger@[0-9]+$ — name matches this regular expression #

Value type (type): "object"

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

false

Not allowed by this rule.

Properties and child nodes (properties) #

compatible — required here

Exactly one of these rules must match (oneOf)

Rule 1

Array item rules (items)

Item 1

Exact value (const): "st,stm32mp25-lptimer-trigger"

Item 2

Exact value (const): "st,stm32-lptimer-trigger"

Rule 2

Array item rules (items)

Item 1

Exact value (const): "st,stm32-lptimer-trigger"

reg — required here

Identify trigger hardware block.

Array item rules (items)

Minimum value (minimum): 0

Maximum value (maximum): 4

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

Required in this object (required): "#address-cells", "#size-cells", "compatible", "reg", "clocks", "clock-names"

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

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/clock/stm32mp1-clks.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
timer@40002400 {
  compatible = "st,stm32-lptimer";
  reg = <0x40002400 0x400>;
  clocks = <&timer_clk>;
  clock-names = "mux";
  interrupts-extended = <&exti 47 IRQ_TYPE_LEVEL_HIGH>;
  #address-cells = <1>;
  #size-cells = <0>;

  pwm {
    compatible = "st,stm32-pwm-lp";
    #pwm-cells = <3>;
  };

  trigger@0 {
    compatible = "st,stm32-lptimer-trigger";
    reg = <0>;
  };

  counter {
    compatible = "st,stm32-lptimer-counter";
  };

  timer {
    compatible = "st,stm32-lptimer-timer";
  };
};

Source notes #

Annotations retained from the schema source

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

Edit this page