STMicroelectronics STM32 Timers
Schema identifier ($id): "http://devicetree.org/schemas/mfd/st,stm32-timers.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
This hardware block provides 3 types of timer along with PWM functionality:
- advanced-control timers consist of a 16-bit auto-reload counter driven
by a programmable prescaler, break input feature, PWM outputs and
complementary PWM outputs channels.
- general-purpose timers consist of a 16-bit or 32-bit auto-reload counter
driven by a programmable prescaler and PWM outputs.
- basic timers consist of a 16-bit auto-reload counter driven by a
programmable prescaler.
Maintainers (maintainers): "Fabrice Gasnier <fabrice.gasnier@foss.st.com>"
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "st,stm32-timers", "st,stm32mp25-timers"
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):"int"
resets — not listed as required here #
Maximum number of items (maxItems): 1
power-domains — not listed as required here #
Maximum number of items (maxItems): 1
dmas — not listed as required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 7
dma-names — not listed as required here #
Array item rules (items) #
Allowed values (
enum):"ch1","ch2","ch3","ch4","up","trig","com"
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 7
interrupts — not listed as required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Maximum number of items (
maxItems):1
Rule 2
Maximum number of items (
maxItems):4
interrupt-names — not listed as required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Array item rules (
items)Item 1
Exact value (
const):"global"
Rule 2
Array item rules (
items)Item 1
Exact value (
const):"brk"Item 2
Exact value (
const):"up"Item 3
Exact value (
const):"trg-com"Item 4
Exact value (
const):"cc"
#address-cells — not listed as required here #
Exact value (const): 1
#size-cells — not listed as required here #
Exact value (const): 0
access-controllers — not listed as required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 2
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
Allowed values (enum): "st,stm32-pwm", "st,stm32mp25-pwm"
#pwm-cells — required here
Exact value (const): 3
st,breakinput — not listed as required here
One or two <index level filter> to describe break input configurations.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-matrix
Array item rules (items)
Array item rules (
items)Item 1
"index" indicates on which break input (0 or 1) the configuration should be applied.
Item 2
"level" gives the active level (0=low or 1=high) of the input signal for this configuration
Item 3
"filter" gives the filtering value (up to 15) to be applied.
Maximum value (
maximum):15
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 2
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
Allowed values (enum): "st,stm32-timer-counter", "st,stm32mp25-timer-counter"
Required in this object (required): "compatible"
Properties matching a name pattern (patternProperties) #
^timer@[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
Allowed values (enum): "st,stm32-timer-trigger", "st,stm32h7-timer-trigger", "st,stm32mp25-timer-trigger"
reg — required here
Identify trigger hardware block.
Array item rules (items)
Minimum value (
minimum):0Maximum value (
maximum):19
Required in this object (required): "compatible", "reg"
Required in this object (required): "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>
timers2: timer@40000000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "st,stm32-timers";
reg = <0x40000000 0x400>;
clocks = <&rcc TIM2_K>;
clock-names = "int";
dmas = <&dmamux1 18 0x400 0x1>,
<&dmamux1 19 0x400 0x1>,
<&dmamux1 20 0x400 0x1>,
<&dmamux1 21 0x400 0x1>,
<&dmamux1 22 0x400 0x1>;
dma-names = "ch1", "ch2", "ch3", "ch4", "up";
pwm {
compatible = "st,stm32-pwm";
#pwm-cells = <3>;
st,breakinput = <0 1 5>;
};
timer@1 {
compatible = "st,stm32-timer-trigger";
reg = <1>;
};
counter {
compatible = "st,stm32-timer-counter";
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)