Hello,
I'm trying to configure ADC AD7124-8 on a petalinux 2021.2 running on a Zynq SoC (FPGA + ARM).
I've activated the SPI0 on Vivado (which will be know as "SPI1 on Petalinux, SPI0 is reserved for a QSPI) and set the Pins and clock frequency at 166MHz.
I've also configurer the devicetree
system-user.dtsi:
----
&spi0 {
is-decoded-cs = <0>;
num-cs = <3>;
status = "okay";
adc@0 {
compatible = "adi,ad7124-8";
reg = <0>;
spi-max-frequency = <5000000>;
#address-cells = <1>;
#size-cells = <0>;
//spi-cpol;
channel@0 {
reg = <0>;
diff-channels = <2 3>;
};
channel@1 {
reg = <1>;
diff-channels = <4 5>;
};
channel@2 {
reg = <2>;
diff-channels = <6 7>;
};
channel@3 {
reg = <3>;
diff-channels = <8 9>;
};
};
};
---
(I tried to use "insert code" but it removes all text with < >)
On the kernel configuration, I added the AD7124 driver as module) and "user mod SPI device driver support".
After compilation I connect to the system, and then try to activate the SPi device and I get:
# modprobe ad7124 [ 855.870532] ad7124: probe of spi1.0 failed with error -2
and below, I get some values related to the devices:
root@petalinux:~# cat /sys/bus/spi/devices/spi1.0/driver_override root@petalinux:~# cat /sys/bus/spi/devices/spi1.0/modalias spi:ad7124-8 root@petalinux:~# cat /sys/bus/spi/devices/spi1.0/uevent OF_NAME=adc OF_FULLNAME=/axi/spi@e0006000/adc@0 OF_COMPATIBLE_0=adi,ad7124-8 OF_COMPATIBLE_N=1 MODALIAS=spi:ad7124-8 root@petalinux:~# cat /sys/bus/spi/devices/spi1.0/of_node/ #address-cells channel@0/ channel@2/ compatible reg #size-cells channel@1/ channel@3/ name spi-max-frequency root@petalinux:~# cat /sys/bus/spi/devices/spi1.0/of_node/reg root@petalinux:~# cat /sys/bus/spi/devices/spi1.0/of_node/spi-max-frequency LK@root@petalinux:~# cat /sys/bus/spi/devices/spi1.0/of_node/name adcroot@petalinux:~# cat /sys/bus/spi/devices/spi1.0/of_node/#address-cells root@petalinux:~# cat /sys/bus/spi/devices/spi1.0/of_node/#size-cells root@petalinux:~#
I got for example "LK@" for spi-max-frequency, which makes obviously no sense, and some parameters are not defined (emplty) like #address-cells, #size-cells, all reg parameters etc..
I have yet no idea I to go further, I only have this pithy message to help me, "error -2", which seems to correspond to "ENOEN No such file or directory", which file? which directory?
What could I do to help me discover what I did wrong?