]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARM: dts: stm32: stm32mp15x-mecio1-io: Fix ADC sampling times
authorDavid Jander <david@protonic.nl>
Wed, 18 Mar 2026 10:51:18 +0000 (11:51 +0100)
committerAlexandre Torgue <alexandre.torgue@foss.st.com>
Tue, 19 May 2026 09:40:07 +0000 (11:40 +0200)
Increase the minimum ADC sample times for all configured channels on
ADC1 and ADC2 to ensure measurement accuracy meets specifications.

The default 5us sample time is insufficient for the internal sampling
capacitor to fully charge. Increase the default time to 20us to relax
the input impedance requirements.

Additionally, the phint0_ain and phint1_ain channels require a much
longer sampling period due to their specific circuit design. Increase
their sample times to 200us. Remove stale comments regarding clock
cycles that no longer match the updated timings.

Fixes: 8267753c891c ("ARM: dts: stm32: Add MECIO1 and MECT1S board variants")
Co-developed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20260318105123.819807-3-o.rempel@pengutronix.de
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
arch/arm/boot/dts/st/stm32mp15x-mecio1-io.dtsi

index 1ce01bac98142ca26ead3bb6eb4a8c9991ab6483..1b1299770ca0d3401ce0f35734012b1cff1e9576 100644 (file)
 
        channel@0 {
                reg = <0>;
-               /* 16.5 ck_cycles sampling time */
-               st,min-sample-time-ns = <5000>;
+               st,min-sample-time-ns = <20000>;
                label = "p24v_stp";
        };
 
        channel@1 {
                reg = <1>;
-               st,min-sample-time-ns = <5000>;
+               st,min-sample-time-ns = <20000>;
                label = "p24v_hpdcm";
        };
 
        channel@2 {
                reg = <2>;
-               st,min-sample-time-ns = <5000>;
+               st,min-sample-time-ns = <20000>;
                label = "ain0";
        };
 
        channel@3 {
                reg = <3>;
-               st,min-sample-time-ns = <5000>;
+               st,min-sample-time-ns = <20000>;
                label = "hpdcm1_i2";
        };
 
        channel@5 {
                reg = <5>;
-               st,min-sample-time-ns = <5000>;
+               st,min-sample-time-ns = <20000>;
                label = "hpout1_i";
        };
 
        channel@6 {
                reg = <6>;
-               st,min-sample-time-ns = <5000>;
+               st,min-sample-time-ns = <20000>;
                label = "ain1";
        };
 
        channel@9 {
                reg = <9>;
-               st,min-sample-time-ns = <5000>;
+               st,min-sample-time-ns = <20000>;
                label = "hpout0_i";
        };
 
        channel@10 {
                reg = <10>;
-               st,min-sample-time-ns = <5000>;
+               st,min-sample-time-ns = <200000>;
                label = "phint0_ain";
        };
 
        channel@13 {
                reg = <13>;
-               st,min-sample-time-ns = <5000>;
+               st,min-sample-time-ns = <200000>;
                label = "phint1_ain";
        };
 
        channel@15 {
                reg = <15>;
-               st,min-sample-time-ns = <5000>;
+               st,min-sample-time-ns = <20000>;
                label = "hpdcm0_i1";
        };
 
        channel@16 {
                reg = <16>;
-               st,min-sample-time-ns = <5000>;
+               st,min-sample-time-ns = <20000>;
                label = "lsin";
        };
 
        channel@18 {
                reg = <18>;
-               st,min-sample-time-ns = <5000>;
+               st,min-sample-time-ns = <20000>;
                label = "hpdcm0_i2";
        };
 
        channel@19 {
                reg = <19>;
-               st,min-sample-time-ns = <5000>;
+               st,min-sample-time-ns = <20000>;
                label = "hpdcm1_i1";
        };
 };
 
        channel@2 {
                reg = <2>;
-               /* 16.5 ck_cycles sampling time */
-               st,min-sample-time-ns = <5000>;
+               st,min-sample-time-ns = <20000>;
                label = "ain2";
        };
 
        channel@6 {
                reg = <6>;
-               st,min-sample-time-ns = <5000>;
+               st,min-sample-time-ns = <20000>;
                label = "ain3";
        };
 };