Skip to content

Commit 5f1e363

Browse files
committed
dts: arm: st: l4: add counter nodes to timers of stm32l4 series
Add counter nodes to timer nodes in dts of stm32l4 series. This should enable the support of the basic counter API on all stm32l4 mcus for general-purpose and basic TIMx timers. Signed-off-by: Jan Kablitz <[email protected]>
1 parent 572ccd5 commit 5f1e363

File tree

5 files changed

+96
-0
lines changed

5 files changed

+96
-0
lines changed

dts/arm/st/l4/stm32l4.dtsi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,12 @@
282282
label = "PWM_2";
283283
#pwm-cells = <3>;
284284
};
285+
286+
counter {
287+
compatible = "st,stm32-counter";
288+
status = "disabled";
289+
label = "COUNTER_2";
290+
};
285291
};
286292

287293
timers6: timers@40001000 {
@@ -293,6 +299,12 @@
293299
st,prescaler = <0>;
294300
status = "disabled";
295301
label = "TIMERS_6";
302+
303+
counter {
304+
compatible = "st,stm32-counter";
305+
status = "disabled";
306+
label = "COUNTER_6";
307+
};
296308
};
297309

298310
timers15: timers@40014000 {
@@ -311,6 +323,12 @@
311323
label = "PWM_15";
312324
#pwm-cells = <3>;
313325
};
326+
327+
counter {
328+
compatible = "st,stm32-counter";
329+
status = "disabled";
330+
label = "COUNTER_15";
331+
};
314332
};
315333

316334
timers16: timers@40014400 {
@@ -329,6 +347,12 @@
329347
label = "PWM_16";
330348
#pwm-cells = <3>;
331349
};
350+
351+
counter {
352+
compatible = "st,stm32-counter";
353+
status = "disabled";
354+
label = "COUNTER_16";
355+
};
332356
};
333357

334358
rtc: rtc@40002800 {

dts/arm/st/l4/stm32l432.dtsi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
st,prescaler = <0>;
2929
status = "disabled";
3030
label = "TIMERS_7";
31+
32+
counter {
33+
compatible = "st,stm32-counter";
34+
status = "disabled";
35+
label = "COUNTER_7";
36+
};
3137
};
3238

3339
can1: can@40006400 {

dts/arm/st/l4/stm32l452.dtsi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@
124124
label = "PWM_3";
125125
#pwm-cells = <3>;
126126
};
127+
128+
counter {
129+
compatible = "st,stm32-counter";
130+
status = "disabled";
131+
label = "COUNTER_3";
132+
};
127133
};
128134

129135
dac1: dac@40007400 {

dts/arm/st/l4/stm32l471.dtsi

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@
125125
label = "PWM_3";
126126
#pwm-cells = <3>;
127127
};
128+
129+
counter {
130+
compatible = "st,stm32-counter";
131+
status = "disabled";
132+
label = "COUNTER_3";
133+
};
128134
};
129135

130136
timers4: timers@40000800 {
@@ -143,6 +149,12 @@
143149
label = "PWM_4";
144150
#pwm-cells = <3>;
145151
};
152+
153+
counter {
154+
compatible = "st,stm32-counter";
155+
status = "disabled";
156+
label = "COUNTER_4";
157+
};
146158
};
147159

148160
timers5: timers@40000c00 {
@@ -161,6 +173,12 @@
161173
label = "PWM_5";
162174
#pwm-cells = <3>;
163175
};
176+
177+
counter {
178+
compatible = "st,stm32-counter";
179+
status = "disabled";
180+
label = "COUNTER_5";
181+
};
164182
};
165183

166184
timers7: timers@40001400 {
@@ -172,6 +190,12 @@
172190
st,prescaler = <0>;
173191
status = "disabled";
174192
label = "TIMERS_7";
193+
194+
counter {
195+
compatible = "st,stm32-counter";
196+
status = "disabled";
197+
label = "COUNTER_7";
198+
};
175199
};
176200

177201
timers8: timers@40013400 {
@@ -208,6 +232,12 @@
208232
label = "PWM_17";
209233
#pwm-cells = <3>;
210234
};
235+
236+
counter {
237+
compatible = "st,stm32-counter";
238+
status = "disabled";
239+
label = "COUNTER_17";
240+
};
211241
};
212242

213243
can1: can@40006400 {

dts/arm/st/l4/stm32l4r5.dtsi

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@
152152
label = "PWM_3";
153153
#pwm-cells = <3>;
154154
};
155+
156+
counter {
157+
compatible = "st,stm32-counter";
158+
status = "disabled";
159+
label = "COUNTER_3";
160+
};
155161
};
156162

157163
timers4: timers@40000800 {
@@ -170,6 +176,12 @@
170176
label = "PWM_4";
171177
#pwm-cells = <3>;
172178
};
179+
180+
counter {
181+
compatible = "st,stm32-counter";
182+
status = "disabled";
183+
label = "COUNTER_4";
184+
};
173185
};
174186

175187
timers5: timers@40000c00 {
@@ -188,6 +200,12 @@
188200
label = "PWM_5";
189201
#pwm-cells = <3>;
190202
};
203+
204+
counter {
205+
compatible = "st,stm32-counter";
206+
status = "disabled";
207+
label = "COUNTER_5";
208+
};
191209
};
192210

193211
timers7: timers@40001400 {
@@ -206,6 +224,12 @@
206224
label = "PWM_7";
207225
#pwm-cells = <3>;
208226
};
227+
228+
counter {
229+
compatible = "st,stm32-counter";
230+
status = "disabled";
231+
label = "COUNTER_7";
232+
};
209233
};
210234

211235
timers8: timers@40013400 {
@@ -242,6 +266,12 @@
242266
label = "PWM_17";
243267
#pwm-cells = <3>;
244268
};
269+
270+
counter {
271+
compatible = "st,stm32-counter";
272+
status = "disabled";
273+
label = "COUNTER_17";
274+
};
245275
};
246276

247277
can1: can@40006400 {

0 commit comments

Comments
 (0)