Skip to content

Commit 0fe97a9

Browse files
committed
dts: arm: st: add basic dts support for adc.
Adding ADC1 dts support to these series of soc, not covering ADC2. Signed-off-by: Song Qiang <[email protected]>
1 parent 161fa14 commit 0fe97a9

File tree

9 files changed

+112
-0
lines changed

9 files changed

+112
-0
lines changed

dts/arm/st/f0/stm32f0.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,15 @@
287287
#pwm-cells = <2>;
288288
};
289289
};
290+
291+
adc1: adc@40012400 {
292+
compatible = "st,stm32-adc";
293+
reg = <0x40012400 0x400>;
294+
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00000200>;
295+
interrupts = <12 0>;
296+
status = "disabled";
297+
label = "ADC_0";
298+
};
290299
};
291300
};
292301

dts/arm/st/f1/stm32f1.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,15 @@
220220
#pwm-cells = <2>;
221221
};
222222
};
223+
224+
adc1: adc@40012400 {
225+
compatible = "st,stm32-adc";
226+
reg = <0x40012400 0x400>;
227+
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00000200>;
228+
interrupts = <18 0>;
229+
status = "disabled";
230+
label = "ADC_0";
231+
};
223232
};
224233
};
225234

dts/arm/st/f2/stm32f2.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,15 @@
206206
status = "disabled";
207207
label = "OTGFS";
208208
};
209+
210+
adc1: adc@40012000 {
211+
compatible = "st,stm32-adc";
212+
reg = <0x40012000 0x400>;
213+
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00000100>;
214+
interrupts = <18 0>;
215+
status = "disabled";
216+
label = "ADC_0";
217+
};
209218
};
210219

211220
otgfs_phy: otgfs_phy {

dts/arm/st/f3/stm32f3.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,15 @@
286286
status = "disabled";
287287
label = "RTC_0";
288288
};
289+
290+
adc1: adc@50000000 {
291+
compatible = "st,stm32-adc";
292+
reg = <0x50000000 0x400>;
293+
clocks = <&rcc STM32_CLOCK_BUS_AHB1 0x10000000>;
294+
interrupts = <18 0>;
295+
status = "disabled";
296+
label = "ADC_0";
297+
};
289298
};
290299

291300
usb_fs_phy: usbphy {

dts/arm/st/f4/stm32f4.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,15 @@
359359
status = "disabled";
360360
label = "RTC_0";
361361
};
362+
363+
adc1: adc@40012000 {
364+
compatible = "st,stm32-adc";
365+
reg = <0x40012000 0x400>;
366+
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00000100>;
367+
interrupts = <18 0>;
368+
status = "disabled";
369+
label = "ADC_0";
370+
};
362371
};
363372

364373
otgfs_phy: otgfs_phy {

dts/arm/st/f7/stm32f7.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,15 @@
575575
status = "disabled";
576576
label = "RTC_0";
577577
};
578+
579+
adc1: adc@40012000 {
580+
compatible = "st,stm32-adc";
581+
reg = <0x40012000 0x400>;
582+
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00000100>;
583+
interrupts = <18 0>;
584+
status = "disabled";
585+
label = "ADC_0";
586+
};
578587
};
579588

580589
otghs_fs_phy: otghs_fs_phy {

dts/arm/st/l0/stm32l0.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,15 @@
155155
status = "disabled";
156156
label = "SPI_1";
157157
};
158+
159+
adc1: adc@40012400 {
160+
compatible = "st,stm32-adc";
161+
reg = <0x40012400 0x400>;
162+
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00000200>;
163+
interrupts = <12 0>;
164+
status = "disabled";
165+
label = "ADC_0";
166+
};
158167
};
159168
};
160169

dts/arm/st/l4/stm32l4.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,15 @@
283283
status = "disabled";
284284
label = "RTC_0";
285285
};
286+
287+
adc1: adc@50040000 {
288+
compatible = "st,stm32-adc";
289+
reg = <0x50040000 0x400>;
290+
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00002000>; //RCC_APB1ENR1_CAN1EN
291+
interrupts = <18 0>;
292+
status = "disabled";
293+
label = "ADC_0";
294+
};
286295
};
287296
};
288297

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#
2+
# Copyright (c) 2018, Song Qiang <[email protected]>
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
---
7+
title: ST Microcontroller STM32 Family ADC
8+
version: 0.1
9+
10+
description: >
11+
This is a representation of the STM32 ADC node
12+
13+
inherits:
14+
!include adc.yaml
15+
16+
properties:
17+
compatible:
18+
type: string
19+
category: required
20+
description: compatible strings
21+
constraint: "st,stm32-adc"
22+
23+
reg:
24+
type: array
25+
description: mmio register space
26+
generation: define
27+
category: required
28+
29+
clocks:
30+
type: array
31+
category: required
32+
description: Clock gate control information
33+
generation: define
34+
35+
interrupts:
36+
type: array
37+
category: required
38+
description: required interrupts
39+
generation: define
40+
...

0 commit comments

Comments
 (0)