Skip to content

Commit 04d28eb

Browse files
Olivier MoysanAlexandre Torgue
authored andcommitted
ARM: dts: stm32: add adc internal channels to stm32mp15
Add STM32 ADC2 internal channels VREFINT and VDDCORE to STM32MP15x SoCs. VBAT internal channel is not defined by default in SoC DT, and has be defined in board DT when needed, instead. This avoids unwanted current consumption on battery, when ADC conversions are performed on any other channels. The internal channels are defined in STM32MP15 SoC DT according to the generic IIO channel bindings. The STM32 driver does not support a mixed use of legacy and generic channels. When generic channels are defined, legacy channels are ignored. This involves that the board device trees using legacy bindings for ADC2, have to be reworked. Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
1 parent 5364e37 commit 04d28eb

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

arch/arm/boot/dts/stm32mp151.dtsi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,8 @@
10931093
adc1: adc@0 {
10941094
compatible = "st,stm32mp1-adc";
10951095
#io-channel-cells = <1>;
1096+
#address-cells = <1>;
1097+
#size-cells = <0>;
10961098
reg = <0x0>;
10971099
interrupt-parent = <&adc>;
10981100
interrupts = <0>;
@@ -1104,12 +1106,22 @@
11041106
adc2: adc@100 {
11051107
compatible = "st,stm32mp1-adc";
11061108
#io-channel-cells = <1>;
1109+
#address-cells = <1>;
1110+
#size-cells = <0>;
11071111
reg = <0x100>;
11081112
interrupt-parent = <&adc>;
11091113
interrupts = <1>;
11101114
dmas = <&dmamux1 10 0x400 0x01>;
11111115
dma-names = "rx";
11121116
status = "disabled";
1117+
channel@13 {
1118+
reg = <13>;
1119+
label = "vrefint";
1120+
};
1121+
channel@14 {
1122+
reg = <14>;
1123+
label = "vddcore";
1124+
};
11131125
};
11141126
};
11151127

0 commit comments

Comments
 (0)