2024-09-11 01:09 PM
Greeting.
I'm trying to get our ADC subsystem up and running and getting weird errors in dmesg during boot. I'm assuming I've done something wrong with devicetree but I can't seem to figure out a working combination from the docs.
Full part number of our MPU is STM32MP157CAC3.
During boot we get error -61 during the probe of the two converters as shown below
Thanks,
-LinuxAddict
$ dmesg | grep -E "adc|iio"
[ 2.510869] iio iio:device0: No channels configured
[ 2.514812] stm32-adc: probe of 48003000.adc:adc@0 failed with error -61
[ 2.522467] iio iio:device0: No channels configured
[ 2.526055] stm32-adc: probe of 48003000.adc:adc@100 failed with error -61
Here's our devicetree portions:
&pinctrl {
adc1_pins: adc1-single-ended {
analog-inputs1 {
pinmux = <STM32_PINMUX('C', 0, ANALOG)>,
<STM32_PINMUX('A', 5, ANALOG)>;
bias-disable;
} ;
} ;
};
&adc {
pinctrl-names = "default";
pinctrl-0 = <&adc1_pins>;
status = "okay";
vdda-supply = <&vdd>;
vref-supply = <&v3v3>;
/* ANALOG_IN1 = ADC2_INP0 (pin ANA0) */
/* ANALOG_IN2 = ADC2_INP1 (pin ANA1) */
/* ANALOG_IN3 = ADC1_INP10 (pin PC0) */
/* ANALOG_IN4 = ADC1_INP19 (pin PA5) */
adc1: adc@0 {
status = "okay";
channel@0 {
reg = <0>;
st,min-sample-time-ns = <10000>; /* 10µs sampling time */
label = "ANALOG_IN_1";
};
channel@1 {
reg = <1>;
st,min-sample-time-ns = <10000>; /* 10µs sampling time */
label = "ANALOG_IN_2";
};
};
adc2: adc@100 {
status = "okay";
channel@10 {
reg = <10>;
st,min-sample-time-ns = <10000>; /* 10µs sampling time */
label = "ANALOG_IN_3";
};
channel@19 {
reg = <19>;
st,min-sample-time-ns = <10000>; /* 10µs sampling time */
label = "ANALOG_IN_4";
};
};
};
2024-09-13 06:15 AM
Hi @LinuxAddict ,
Have you checked the various wiki pages to see if you've missed anything?
https://wiki.st.com/stm32mpu/wiki/ADC_device_tree_configuration
https://wiki.st.com/stm32mpu/wiki/ADC_OpenSTLinux_drivers
Regards,
Grégory
2024-09-13 01:57 PM
Gregory,
Yes, thank you for the response.
I've consulted both of the wiki pages paying especially careful attention to the ADC device tree page to no avail.
Thanks,
-Adrian
2024-09-16 12:48 AM
Hi @LinuxAddict ,
Could you check these different points, please:
Regards,
Grégory