Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1# 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 oneOf:
25 - items:
26 - const: st,stm32mp25-lptimer
27 - const: st,stm32-lptimer
28 - items:
29 - const: st,stm32-lptimer
30
31 reg:
32 maxItems: 1
33
34 clocks:
35 maxItems: 1
36
37 clock-names:
38 items:
39 - const: mux
40
41 interrupts:
42 maxItems: 1
43
44 "#address-cells":
45 const: 1
46
47 "#size-cells":
48 const: 0
49
50 wakeup-source: true
51
52 access-controllers:
53 minItems: 1
54 maxItems: 2
55
56 power-domains:
57 maxItems: 1
58
59 pwm:
60 type: object
61 additionalProperties: false
62
63 properties:
64 compatible:
65 oneOf:
66 - items:
67 - const: st,stm32mp25-pwm-lp
68 - const: st,stm32-pwm-lp
69 - items:
70 - const: st,stm32-pwm-lp
71
72 "#pwm-cells":
73 const: 3
74
75 required:
76 - "#pwm-cells"
77 - compatible
78
79 counter:
80 type: object
81 additionalProperties: false
82
83 properties:
84 compatible:
85 oneOf:
86 - items:
87 - const: st,stm32mp25-lptimer-counter
88 - const: st,stm32-lptimer-counter
89 - items:
90 - const: st,stm32-lptimer-counter
91
92 required:
93 - compatible
94
95 timer:
96 type: object
97 additionalProperties: false
98
99 properties:
100 compatible:
101 oneOf:
102 - items:
103 - const: st,stm32mp25-lptimer-timer
104 - const: st,stm32-lptimer-timer
105 - items:
106 - const: st,stm32-lptimer-timer
107
108 required:
109 - compatible
110
111patternProperties:
112 "^trigger@[0-9]+$":
113 type: object
114 additionalProperties: false
115
116 properties:
117 compatible:
118 oneOf:
119 - items:
120 - const: st,stm32mp25-lptimer-trigger
121 - const: st,stm32-lptimer-trigger
122 - items:
123 - const: st,stm32-lptimer-trigger
124
125 reg:
126 description: Identify trigger hardware block.
127 items:
128 minimum: 0
129 maximum: 4
130
131 required:
132 - compatible
133 - reg
134
135required:
136 - "#address-cells"
137 - "#size-cells"
138 - compatible
139 - reg
140 - clocks
141 - clock-names
142
143additionalProperties: false
144
145examples:
146 - |
147 #include <dt-bindings/clock/stm32mp1-clks.h>
148 #include <dt-bindings/interrupt-controller/arm-gic.h>
149 timer@40002400 {
150 compatible = "st,stm32-lptimer";
151 reg = <0x40002400 0x400>;
152 clocks = <&timer_clk>;
153 clock-names = "mux";
154 interrupts-extended = <&exti 47 IRQ_TYPE_LEVEL_HIGH>;
155 #address-cells = <1>;
156 #size-cells = <0>;
157
158 pwm {
159 compatible = "st,stm32-pwm-lp";
160 #pwm-cells = <3>;
161 };
162
163 trigger@0 {
164 compatible = "st,stm32-lptimer-trigger";
165 reg = <0>;
166 };
167
168 counter {
169 compatible = "st,stm32-lptimer-counter";
170 };
171
172 timer {
173 compatible = "st,stm32-lptimer-timer";
174 };
175 };
176
177...