I am trying to understand the AD7380 Linux driver and device tree documented at https://wiki.analog.com/resources/tools-software/linux-drivers/iio-adc/ad738x#devicetree.
We have a Xilinx UltraScale design implemented based on the FMC evaluation card HDL with DMA, i2c, and SPI on an AXI bus. The Linux image is built with PetaLinux, and includes libiio, libiio-tests, and libiio-iiod. The DMA controller, i2c interface and spi_engine are in the device tree based on the HDL design.
I actually have a few questions:
- How does the device tree fragment shown connect to a particular SPI interface in the device tree?
- It looks like the driver at https://github.com/analogdevicesinc/linux/blob/master/drivers/iio/adc/ad738x.c will need to be modified to take advantage of DMA. Is the driver for the AD4020 a good example of the code that needs to be incorporated into the AD738x IIO driver to support high speed operation with the offloading engine?
- Are there #include statements that need to go before this device tree fragment to pull in definitions?