[PATCH 7/8] ARM: dts: stm32: adopt generic iio bindings for adc channels on dhcor-drc

Olivier Moysan olivier.moysan at foss.st.com
Wed May 24 06:39:16 PDT 2023


Use STM32 ADC generic bindings instead of legacy bindings on
DHCOR DRC Compact board.

The STM32 ADC specific binding to declare channels has been deprecated,
hence adopt the generic IIO channels bindings, instead.
The STM32MP151 device tree now exposes internal channels using the
generic binding. This makes the change mandatory here to avoid a mixed
use of legacy and generic binding, which is not supported by the driver.

Signed-off-by: Olivier Moysan <olivier.moysan at foss.st.com>
---
 .../dts/stm32mp15xx-dhcor-drc-compact.dtsi    | 28 ++++++++++++++++---
 1 file changed, 24 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcor-drc-compact.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcor-drc-compact.dtsi
index 39af79dc654c..92d906bfd5d7 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcor-drc-compact.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcor-drc-compact.dtsi
@@ -57,15 +57,35 @@ &adc {	/* X11 ADC inputs */
 	status = "okay";
 
 	adc1: adc at 0 {
-		st,adc-channels = <0 1 6>;
-		st,min-sample-time-nsecs = <5000>;
 		status = "okay";
+		channel at 0 {
+			reg = <0>;
+			st,min-sample-time-ns = <5000>;
+		};
+		channel at 1 {
+			reg = <1>;
+			st,min-sample-time-ns = <5000>;
+		};
+		channel at 6 {
+			reg = <6>;
+			st,min-sample-time-ns = <5000>;
+		};
 	};
 
 	adc2: adc at 100 {
-		st,adc-channels = <0 1 2>;
-		st,min-sample-time-nsecs = <5000>;
 		status = "okay";
+		channel at 0 {
+			reg = <0>;
+			st,min-sample-time-ns = <5000>;
+		};
+		channel at 1 {
+			reg = <1>;
+			st,min-sample-time-ns = <5000>;
+		};
+		channel at 2 {
+			reg = <2>;
+			st,min-sample-time-ns = <5000>;
+		};
 	};
 };
 
-- 
2.25.1




More information about the linux-arm-kernel mailing list