blob: 27329c5dc38e6e1bb87ea50798eda2afb3cdb4a3 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mfd/st,stm32-lptimer.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: STMicroelectronics STM32 Low-Power Timers
8
9description: |
10 The STM32 Low-Power Timer (LPTIM) is a 16-bit timer that provides several
11 functions
12 - PWM output (with programmable prescaler, configurable polarity)
13 - Trigger source for STM32 ADC/DAC (LPTIM_OUT)
14 - Several counter modes:
15 - quadrature encoder to detect angular position and direction of rotary
16 elements, from IN1 and IN2 input signals.
17 - simple counter from IN1 input signal.
18
19maintainers:
20 - Fabrice Gasnier <fabrice.gasnier@foss.st.com>
21
22properties:
23 compatible:
24 const: st,stm32-lptimer
25
26 reg:
27 maxItems: 1
28
29 clocks:
30 maxItems: 1
31
32 clock-names:
33 items:
34 - const: mux
35
36 interrupts:
37 maxItems: 1
38
39 "#address-cells":
40 const: 1
41
42 "#size-cells":
43 const: 0
44
45 wakeup-source: true
46
47 pwm:
48 type: object
49 additionalProperties: false
50
51 properties:
52 compatible:
53 const: st,stm32-pwm-lp
54
55 "#pwm-cells":
56 const: 3
57
58 required:
59 - "#pwm-cells"
60 - compatible
61
62 counter:
63 type: object
64 additionalProperties: false
65
66 properties:
67 compatible:
68 const: st,stm32-lptimer-counter
69
70 required:
71 - compatible
72
73 timer:
74 type: object
75 additionalProperties: false
76
77 properties:
78 compatible:
79 const: st,stm32-lptimer-timer
80
81 required:
82 - compatible
83
84patternProperties:
85 "^trigger@[0-9]+$":
86 type: object
87 additionalProperties: false
88
89 properties:
90 compatible:
91 const: st,stm32-lptimer-trigger
92
93 reg:
94 description: Identify trigger hardware block.
95 items:
96 minimum: 0
97 maximum: 2
98
99 required:
100 - compatible
101 - reg
102
103required:
104 - "#address-cells"
105 - "#size-cells"
106 - compatible
107 - reg
108 - clocks
109 - clock-names
110
111additionalProperties: false
112
113examples:
114 - |
115 #include <dt-bindings/clock/stm32mp1-clks.h>
116 #include <dt-bindings/interrupt-controller/arm-gic.h>
117 timer@40002400 {
118 compatible = "st,stm32-lptimer";
119 reg = <0x40002400 0x400>;
120 clocks = <&timer_clk>;
121 clock-names = "mux";
122 interrupts-extended = <&exti 47 IRQ_TYPE_LEVEL_HIGH>;
123 #address-cells = <1>;
124 #size-cells = <0>;
125
126 pwm {
127 compatible = "st,stm32-pwm-lp";
128 #pwm-cells = <3>;
129 };
130
131 trigger@0 {
132 compatible = "st,stm32-lptimer-trigger";
133 reg = <0>;
134 };
135
136 counter {
137 compatible = "st,stm32-lptimer-counter";
138 };
139
140 timer {
141 compatible = "st,stm32-lptimer-timer";
142 };
143 };
144
145...