Hello AD Community,
I'm currently working with the AD7124-8 ADC on a custom board and encountering an issue. The driver loads successfully and the device tree configuration seems to be correct. However, when I attempt to read from the raw data files (e.g., /sys/bus/iio/devices/iio:device0/in_voltage11-voltage0_raw), I consistently receive an Input/output error.
Device Tree for reference:
ad7124_mclk: oscillator {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <614400>;
//clock-frequency = <8192000>;
};
adc@0 {
compatible = "adi,ad7124-8";
reg = <0>;
spi-max-frequency = <5000000>;
interrupts = <25 2>;
interrupt-parent = <&gpio5>;
clocks = <&ad7124_mclk>;
clock-names = "mclk";
syncreset-gpios = <&pca9539 15 GPIO_ACTIVE_HIGH>;
spi-cpol;
spi-cpha;
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
diff-channels = <0 0>;
bipolar = <0>;
adi,buffered-positive;
};
channel@1 {
reg = <1>;
diff-channels = <1 0>;
bipolar = <0>;
adi,buffered-positive;
};
channel@2 {
reg = <2>;
diff-channels = <2 0>;
bipolar = <0>;
adi,buffered-positive;
};
channel@3 {
reg = <3>;
diff-channels = <3 0>;
bipolar = <0>;
adi,buffered-positive;
};
channel@4 {
reg = <4>;
diff-channels = <4 0>;
bipolar = <0>;
adi,buffered-positive;
};
channel@5 {
reg = <5>;
diff-channels = <5 0>;
bipolar = <0>;
adi,buffered-positive;
};
channel@6 {
reg = <6>;
diff-channels = <6 0>;
bipolar = <0>;
adi,buffered-positive;
};
channel@7 {
reg = <7>;
diff-channels = <7 0>;
bipolar = <0>;
adi,buffered-positive;
};
channel@8 {
reg = <8>;
diff-channels = <8 0>;
bipolar = <0>;
adi,buffered-positive;
};
channel@9 {
reg = <9>;
diff-channels = <9 0>;
bipolar = <0>;
adi,buffered-positive;
};
channel@10 {
reg = <10>;
diff-channels = <10 0>;
bipolar = <0>;
adi,buffered-positive;
};
channel@11 {
reg = <11>;
diff-channels = <11 0>;
bipolar = <0>;
adi,buffered-positive;
};
channel@12 {
reg = <12>;
diff-channels = <12 0>;
bipolar = <0>;
adi,buffered-positive;
};
channel@13 {
reg = <13>;
diff-channels = <13 0>;
bipolar = <0>;
adi,buffered-positive;
};
channel@14 {
reg = <14>;
diff-channels = <14 0>;
bipolar = <0>;
adi,buffered-positive;
};
channel@15 {
reg = <15>;
diff-channels = <15 0>;
bipolar = <0>;
adi,buffered-positive;
};
};
};
Observations:
The driver initializes successfully
Despite successful initialization, attempting to read the raw data from the ADC input channels results in an Input/output error.
root@target:/sys/bus/iio/devices/iio:device0# cat in_voltage11-voltage0_raw
cat: in_voltage11-voltage0_raw: Input/output error
Request:
I’m seeking advice on what could be causing this issue. Is there something specific in the configuration or hardware setup that I might be missing? Any guidance or suggestions for additional debugging steps would be greatly appreciated.
Thank you in advance for your support.