Post Go back to editing

Device Tree for AD7606 SPI on Raspberry

Hello!

I am trying to implement SPI driver for AD7606 (AD7606BSTZ) on Raspberry Pi 4B . The kernel v5.10.83  was build with support of AD7606_SPI driver as module. The chip is wired as it shown spec. During my tries to read data (in sys/bus/iio/deviceX/input_voltageY_raw) or test driver with iio_info command I am getting error "Input/output error (5)" or "Connection timed out (110)". I guess this is because there is mistake in device tree overlay. It is my first experience of implementing driver thus for me not all properties are clear. So need your support.

The device tree overlay is below:

/dts-v1/;
/plugin/;

#include </home/pi/Desktop/linux_master_5.10_depth=1/include/dt-bindings/gpio/gpio.h>
#include </home/pi/Desktop/linux_master_5.10_depth=1/include/dt-bindings/interrupt-controller/irq.h>

/ {
    compatible = "brcm,bcm2835";
    
    fragment@0 {
    target = <&spidev0>;
    __overlay__ {
        status = "disabled";
        };
    };
    fragment@1 {
    target = <&spi0>;
    __overlay__ {
        #address-cells = <1>;
        #size-cells = <0>;
        adc0: adc@0 {
            compatible = "adi,ad7606-8";
            reg = <0>;
            spi-max-frequency = <10000>;
            spi-cpol;
            spi-cpha;
            avcc-supply = <&vdd_5v0_reg>;
            interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
            interrupt-parent = <&gpio>;
            adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
            reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
            adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
            adi,oversampling-ratio-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>,
                                           <&gpio 23 GPIO_ACTIVE_HIGH>,
                                           <&gpio 26 GPIO_ACTIVE_HIGH>;
            standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
            adi,sw-mode;
            };
        };
    };
};

And reverted DT overlay is below(the part for SPI):

spi@7e204000 {
			compatible = "brcm,bcm2835-spi";
			clocks = < 0x08 0x14 >;
			status = "okay";
			#address-cells = < 0x01 >;
			interrupts = < 0x00 0x76 0x04 >;
			cs-gpios = < 0x07 0x08 0x01 0x07 0x07 0x01 >;
			#size-cells = < 0x00 >;
			dma-names = "tx\0rx";
			phandle = < 0x33 >;
			reg = < 0x7e204000 0x200 >;
			pinctrl-0 = < 0x0e 0x0f >;
			dmas = < 0x0c 0x06 0x0c 0x07 >;
			pinctrl-names = "default";

			adc@0 {
				spi-cpol;
				compatible = "adi,ad7606-8";
				adi,conversion-start-gpios = < 0x07 0x11 0x00 >;
				spi-cpha;
				adi,first-data-gpios = < 0x07 0x16 0x00 >;
				adi,oversampling-ratio-gpios = < 0x07 0x12 0x00 0x07 0x17 0x00 0x07 0x1a 0x00 >;
				interrupt-parent = < 0x07 >;
				interrupts = < 0x19 0x02 >;
				reset-gpios = < 0x07 0x1b 0x00 >;
				phandle = < 0xe9 >;
				avcc-supply = < 0xe2 >;
				standby-gpios = < 0x07 0x18 0x01 >;
				reg = < 0x00 >;
				adi,sw-mode;
				spi-max-frequency = < 0x2710 >;
			};

			spidev@1 {
				compatible = "spidev";
				#address-cells = < 0x01 >;
				#size-cells = < 0x00 >;
				phandle = < 0xb0 >;
				reg = < 0x01 >;
				spi-max-frequency = < 0x7735940 >;
			};

			spidev@0 {
				compatible = "spidev";
				status = "disabled";
				#address-cells = < 0x01 >;
				#size-cells = < 0x00 >;
				phandle = < 0xaf >;
				reg = < 0x00 >;
				spi-max-frequency = < 0x7735940 >;
			};
		};

At this moment questions are:

  1. I am not sure that I wrote "avcc-supply" correct. What is "avcc-supply" property mean? There are few words about this.
  2. Has "adi,conversion-start-gpios" to be  really GPIO_ACTIVE_HIGH?
  3. This question more about raspberry but anyway if you give advice about this I would be happy: how to determine correct GPIO pin numbers in device tree properties. I used BCM2711 gpio numbers (like &gpio 22) but I am not sure that this is correct.
  • Hello,

    Does this wiki post help you with your questions?

    There is also the yaml file describing how to treat the devicetree with an example at the end.

    At a quick glance:

    1. avcc-supply seems to be a phandle to the devicetree entry for the device providing an external voltage reference. Try it as in the examples.
    2. Seems to me that adi,conversion-start-gpios really does have to be GPIO_ACTIVE_HIGH because it needs to match the actual chip behavior.
    3. Not an expert by a long shot, but I use the pinouts found on google. They note the GPIO number.

    Regards,
    Andrei

  • Andrei, thank you for reply. No wiki and yaml didn't help. Even in yaml I see mistake (`avcc-supply` is just boolean property but in wiki it is described as phandle)

    1.  `avcc-supply` yes it is phandle for power management. As I understand it should be phandle of voltage/current regulator. But my ad7606 power and reference voltage are not controlled by Raspberry. So I have to put some kind of plug to this property to avoid driver malfunction because `avcc-supply` is mandatory property . Of course it is board dependent but in my case (Raspberry 4b+) it should be `&vdd_5v0_reg`. Right?

    2. I asked this question because if I measure pulse of CONVST pin during reading value with current DT I can see that behavior of pulse is opposite than it described in technical spec. I can see that the voltage is low then during pulse it becomes high.

    3. The question actually about does pin numbers of bcm2711 chip (which you can get in google) match pin numbers in Device tree? For example, in property adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH> does the number "22" matches bcm2711 GPIO 22?

  • Hello,

    Apologies for the delayed response.

    1. I even though the avcc-supply is mandatory I don't see it actually used in the driver. There is the possibility that the driver only requests a dummy regulator. We should inspect dmesg to see what is happening.

    2. I don't understand the query yet, apologies. The CONVST A and B pins are described in the datasheet at page 14 of 37. It is specified that the conversion starts on a transition from low to high. Are you seeing something different?

    3. I am not familiar with this unfortunately. To me it makes sense that the pin numbers are the same in DT as well as in data sheet.

    The issue you are seeing can be caused by a few things. We should definitely inspect the dmesg output first to try to get more information on what is happening.

    Regards,
    Andrei

  • Hello, Andrei! First of all I answer your questions:

    1. I put phandle for existing 5v line '&vdd_5v0_regIn dmesg i don't see any problem about avcc-supply but log will be attached below. If I fill this property with nonexistent phandle te IIO device is not created. I hope everything fine here.

    2. Probably I am wrong but on page 26 there is Figure 44 and description that ADC catches rising edge of CONVST singnal. On picture there is inverted pulse.

    3. Yes, you are right! Now I know how to check debug file for GPIO. So everything is correct and below:

    root@raspberrypi:/sys/kernel/debug# cat gpio
    gpiochip0: GPIOs 0-57, parent: platform/fe200000.gpio, pinctrl-bcm2711:
     gpio-0   (ID_SDA              )
     gpio-1   (ID_SCL              )
     gpio-2   (SDA1                |sysfs               ) in  hi 
     gpio-3   (SCL1                |sysfs               ) in  hi 
     gpio-4   (GPIO_GCLK           |onewire@0           ) out hi 
     gpio-5   (GPIO5               |sysfs               ) in  hi 
     gpio-6   (GPIO6               |sysfs               ) in  hi 
     gpio-7   (SPI_CE1_N           |spi0 CS1            ) out hi ACTIVE LOW
     gpio-8   (SPI_CE0_N           |spi0 CS0            ) out hi ACTIVE LOW
     gpio-9   (SPI_MISO            |sysfs               ) in  lo 
     gpio-10  (SPI_MOSI            |sysfs               ) in  lo 
     gpio-11  (SPI_SCLK            |sysfs               ) in  hi 
     gpio-12  (GPIO12              |sysfs               ) in  lo 
     gpio-13  (GPIO13              |sysfs               ) in  lo 
     gpio-14  (TXD1                |sysfs               ) in  hi 
     gpio-15  (RXD1                |sysfs               ) in  hi 
     gpio-16  (GPIO16              |sysfs               ) in  lo 
     gpio-17  (GPIO17              |adi,conversion-start) out lo 
     gpio-18  (GPIO18              |adi,oversampling-rat) out lo 
     gpio-19  (GPIO19              |sysfs               ) in  lo 
     gpio-20  (GPIO20              |sysfs               ) in  lo 
     gpio-21  (GPIO21              |sysfs               ) in  lo 
     gpio-22  (GPIO22              |adi,first-data      ) in  lo 
     gpio-23  (GPIO23              |adi,oversampling-rat) out lo 
     gpio-24  (GPIO24              |standby             ) out lo ACTIVE LOW
     gpio-25  (GPIO25              |sysfs               ) in  lo IRQ 
     gpio-26  (GPIO26              |adi,oversampling-rat) out lo 
     gpio-27  (GPIO27              |reset               ) out lo 

    Here is dmesg log (including events when I try to use iio_info or read data in sysfs):

    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 5.10.83-v7l+ (root@raspberrypi) (gcc (Raspbian 8.3.0-6+rpi1) 8.3.0, GNU ld (GNU Binutils for Raspbian) 2.31.1) #1 SMP Sat Dec 18 23:25:51 HST 2021
    [    0.000000] CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d
    [    0.000000] CPU: div instructions available: patching division code
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [    0.000000] OF: fdt: Machine model: Raspberry Pi 4 Model B Rev 1.4
    [    0.000000] random: fast init done
    [    0.000000] Memory policy: Data cache writealloc
    [    0.000000] Reserved memory: created CMA memory pool at 0x000000001ac00000, size 320 MiB
    [    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
    [    0.000000] Zone ranges:
    [    0.000000]   DMA      [mem 0x0000000000000000-0x000000002fffffff]
    [    0.000000]   Normal   empty
    [    0.000000]   HighMem  [mem 0x0000000030000000-0x00000001ffffffff]
    [    0.000000] Movable zone start for each node
    [    0.000000] Early memory node ranges
    [    0.000000]   node   0: [mem 0x0000000000000000-0x0000000037ffffff]
    [    0.000000]   node   0: [mem 0x0000000040000000-0x00000000fbffffff]
    [    0.000000]   node   0: [mem 0x0000000100000000-0x00000001ffffffff]
    [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000001ffffffff]
    [    0.000000] On node 0 totalpages: 2048000
    [    0.000000]   DMA zone: 1728 pages used for memmap
    [    0.000000]   DMA zone: 0 pages reserved
    [    0.000000]   DMA zone: 196608 pages, LIFO batch:63
    [    0.000000]   HighMem zone: 1851392 pages, LIFO batch:63
    [    0.000000] percpu: Embedded 20 pages/cpu s50828 r8192 d22900 u81920
    [    0.000000] pcpu-alloc: s50828 r8192 d22900 u81920 alloc=20*4096
    [    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 2046272
    [    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1920x1080M@50,margin_left=48,margin_right=48,margin_top=48,margin_bottom=48 smsc95xx.macaddr=E4:5F:01:4C:2C:68 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyS0,115200 console=tty1 root=PARTUUID=6eb8b57d-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
    [    0.000000] Kernel parameter elevator= does not have any effect anymore.
                   Please use sysfs to set IO scheduler for individual devices.
    [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
    [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
    [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
    [    0.000000] software IO TLB: mapped [mem 0x0000000012400000-0x0000000016400000] (64MB)
    [    0.000000] Memory: 7705800K/8192000K available (10240K kernel code, 1366K rwdata, 3192K rodata, 2048K init, 882K bss, 158520K reserved, 327680K cma-reserved, 7405568K highmem)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
    [    0.000000] ftrace: allocating 34349 entries in 101 pages
    [    0.000000] ftrace: allocated 101 pages with 4 groups
    [    0.000000] rcu: Hierarchical RCU implementation.
    [    0.000000] 	Rude variant of Tasks RCU enabled.
    [    0.000000] 	Tracing variant of Tasks RCU enabled.
    [    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] GIC: Using split EOI/Deactivate mode
    [    0.000000] random: get_random_bytes called from start_kernel+0x3c8/0x59c with crng_init=1
    [    0.000008] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
    [    0.000035] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
    [    0.000098] bcm2835: system timer (irq = 25)
    [    0.000768] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
    [    0.000790] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
    [    0.000812] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
    [    0.000831] Switching to timer-based delay loop, resolution 18ns
    [    0.001093] Console: colour dummy device 80x30
    [    0.001867] printk: console [tty1] enabled
    [    0.001934] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=540000)
    [    0.001988] pid_max: default: 32768 minimum: 301
    [    0.002163] LSM: Security Framework initializing
    [    0.002374] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
    [    0.002419] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
    [    0.003960] cgroup: Disabling memory control group subsystem
    [    0.004219] CPU: Testing write buffer coherency: ok
    [    0.004721] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [    0.005972] Setting up static identity map for 0x200000 - 0x20003c
    [    0.006190] rcu: Hierarchical SRCU implementation.
    [    0.007154] smp: Bringing up secondary CPUs ...
    [    0.008441] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    [    0.009852] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
    [    0.011307] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
    [    0.011466] smp: Brought up 1 node, 4 CPUs
    [    0.011513] SMP: Total of 4 processors activated (432.00 BogoMIPS).
    [    0.011543] CPU: All CPU(s) started in HYP mode.
    [    0.011571] CPU: Virtualization extensions available.
    [    0.012469] devtmpfs: initialized
    [    0.027130] VFP support v0.3: implementor 41 architecture 3 part 40 variant 8 rev 0
    [    0.027399] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.027455] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
    [    0.035620] pinctrl core: initialized pinctrl subsystem
    [    0.036775] NET: Registered protocol family 16
    [    0.040954] DMA: preallocated 1024 KiB pool for atomic coherent allocations
    [    0.041733] audit: initializing netlink subsys (disabled)
    [    0.042014] audit: type=2000 audit(0.040:1): state=initialized audit_enabled=0 res=1
    [    0.042595] thermal_sys: Registered thermal governor 'step_wise'
    [    0.043325] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [    0.043380] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [    0.043832] Serial: AMBA PL011 UART driver
    [    0.078743] bcm2835-mbox fe00b880.mailbox: mailbox enabled
    [    0.090923] raspberrypi-firmware soc:firmware: Attached to firmware from 2021-12-01T15:01:54, variant start
    [    0.100935] raspberrypi-firmware soc:firmware: Firmware hash is 71bd3109023a0c8575585ba87cbb374d2eeb038f
    [    0.141222] Kprobes globally optimized
    [    0.146753] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1
    [    0.151050] vgaarb: loaded
    [    0.151534] SCSI subsystem initialized
    [    0.151797] usbcore: registered new interface driver usbfs
    [    0.151874] usbcore: registered new interface driver hub
    [    0.151963] usbcore: registered new device driver usb
    [    0.152338] usb_phy_generic phy: supply vcc not found, using dummy regulator
    [    0.154396] clocksource: Switched to clocksource arch_sys_counter
    [    1.181146] VFS: Disk quotas dquot_6.6.0
    [    1.181274] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [    1.181474] FS-Cache: Loaded
    [    1.181668] CacheFiles: Loaded
    [    1.182756] simple-framebuffer 3e513000.framebuffer: framebuffer at 0x3e513000, 0x6e7000 bytes, mapped to 0x(ptrval)
    [    1.182801] simple-framebuffer 3e513000.framebuffer: format=a8r8g8b8, mode=1824x984x32, linelength=7296
    [    1.192475] Console: switching to colour frame buffer device 228x61
    [    1.201596] simple-framebuffer 3e513000.framebuffer: fb0: simplefb registered!
    [    1.210528] NET: Registered protocol family 2
    [    1.210840] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
    [    1.212289] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
    [    1.212528] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
    [    1.212686] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
    [    1.212830] TCP: Hash tables configured (established 8192 bind 8192)
    [    1.213071] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
    [    1.213179] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
    [    1.213509] NET: Registered protocol family 1
    [    1.214304] RPC: Registered named UNIX socket transport module.
    [    1.214421] RPC: Registered udp transport module.
    [    1.214487] RPC: Registered tcp transport module.
    [    1.214551] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    1.214638] PCI: CLS 0 bytes, default 64
    [    1.217758] Initialise system trusted keyrings
    [    1.218066] workingset: timestamp_bits=14 max_order=21 bucket_order=7
    [    1.226466] zbud: loaded
    [    1.228797] FS-Cache: Netfs 'nfs' registered for caching
    [    1.229645] NFS: Registering the id_resolver key type
    [    1.229748] Key type id_resolver registered
    [    1.229811] Key type id_legacy registered
    [    1.230000] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
    [    1.230084] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
    [    1.231223] Key type asymmetric registered
    [    1.231291] Asymmetric key parser 'x509' registered
    [    1.234149] bounce: pool size: 64 pages
    [    1.236916] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
    [    1.239775] io scheduler mq-deadline registered
    [    1.242262] io scheduler kyber registered
    [    1.249628] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
    [    1.252277] brcm-pcie fd500000.pcie:   No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
    [    1.255085] brcm-pcie fd500000.pcie:      MEM 0x0600000000..0x063fffffff -> 0x00c0000000
    [    1.257786] brcm-pcie fd500000.pcie:   IB MEM 0x0000000000..0x01ffffffff -> 0x0400000000
    [    1.316516] brcm-pcie fd500000.pcie: link up, 5.0 GT/s PCIe x1 (SSC)
    [    1.319477] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
    [    1.321893] pci_bus 0000:00: root bus resource [bus 00-ff]
    [    1.324475] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff])
    [    1.327139] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
    [    1.329940] pci 0000:00:00.0: PME# supported from D0 D3hot
    [    1.336086] PCI: bus0: Fast back to back transfers disabled
    [    1.338998] pci 0000:01:00.0: [1106:3483] type 00 class 0x0c0330
    [    1.341566] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]
    [    1.344712] pci 0000:01:00.0: PME# supported from D0 D3hot
    [    1.350845] PCI: bus1: Fast back to back transfers disabled
    [    1.353480] pci 0000:00:00.0: BAR 8: assigned [mem 0x600000000-0x6000fffff]
    [    1.356121] pci 0000:01:00.0: BAR 0: assigned [mem 0x600000000-0x600000fff 64bit]
    [    1.358773] pci 0000:00:00.0: PCI bridge to [bus 01]
    [    1.361252] pci 0000:00:00.0:   bridge window [mem 0x600000000-0x6000fffff]
    [    1.364181] pcieport 0000:00:00.0: enabling device (0140 -> 0142)
    [    1.367010] pcieport 0000:00:00.0: PME: Signaling with IRQ 63
    [    1.379212] iproc-rng200 fe104000.rng: hwrng registered
    [    1.381975] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
    [    1.385585] gpiomem-bcm2835 fe200000.gpiomem: Initialised: Registers at 0xfe200000
    [    1.400665] brd: module loaded
    [    1.415855] loop: module loaded
    [    1.420312] Loading iSCSI transport class v2.0-870.
    [    1.426109] libphy: Fixed MDIO Bus: probed
    [    1.430393] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
    [    1.444439] libphy: bcmgenet MII bus: probed
    [    1.524539] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus
    [    1.528215] usbcore: registered new interface driver r8152
    [    1.530709] usbcore: registered new interface driver lan78xx
    [    1.533169] usbcore: registered new interface driver smsc95xx
    [    1.586225] xhci_hcd 0000:01:00.0: xHCI Host Controller
    [    1.588602] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
    [    1.594167] xhci_hcd 0000:01:00.0: hcc params 0x002841eb hci version 0x100 quirks 0x00000e0000000890
    [    1.598038] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
    [    1.600446] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    1.602807] usb usb1: Product: xHCI Host Controller
    [    1.605251] usb usb1: Manufacturer: Linux 5.10.83-v7l+ xhci-hcd
    [    1.607693] usb usb1: SerialNumber: 0000:01:00.0
    [    1.610838] hub 1-0:1.0: USB hub found
    [    1.613331] hub 1-0:1.0: 1 port detected
    [    1.616498] xhci_hcd 0000:01:00.0: xHCI Host Controller
    [    1.618903] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
    [    1.621245] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
    [    1.624071] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
    [    1.626555] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    1.628982] usb usb2: Product: xHCI Host Controller
    [    1.631400] usb usb2: Manufacturer: Linux 5.10.83-v7l+ xhci-hcd
    [    1.633808] usb usb2: SerialNumber: 0000:01:00.0
    [    1.637023] hub 2-0:1.0: USB hub found
    [    1.639493] hub 2-0:1.0: 4 ports detected
    [    1.643559] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
    [    1.646549] dwc_otg: FIQ enabled
    [    1.646564] dwc_otg: NAK holdoff enabled
    [    1.646579] dwc_otg: FIQ split-transaction FSM enabled
    [    1.646597] Module dwc_common_port init
    [    1.647070] usbcore: registered new interface driver uas
    [    1.649543] usbcore: registered new interface driver usb-storage
    [    1.652104] mousedev: PS/2 mouse device common for all mice
    [    1.656192] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
    [    1.662042] sdhci: Secure Digital Host Controller Interface driver
    [    1.664499] sdhci: Copyright(c) Pierre Ossman
    [    1.667669] mmc-bcm2835 fe300000.mmcnr: could not get clk, deferring probe
    [    1.670696] sdhci-pltfm: SDHCI platform and OF driver helper
    [    1.676354] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.679093] hid: raw HID events driver (C) Jiri Kosina
    [    1.681546] usbcore: registered new interface driver usbhid
    [    1.683879] usbhid: USB HID core driver
    [    1.692588] Initializing XFRM netlink socket
    [    1.695120] NET: Registered protocol family 17
    [    1.697714] Key type dns_resolver registered
    [    1.700413] Registering SWP/SWPB emulation handler
    [    1.702808] registered taskstats version 1
    [    1.705182] Loading compiled-in X.509 certificates
    [    1.708384] Key type ._fscrypt registered
    [    1.710709] Key type .fscrypt registered
    [    1.712990] Key type fscrypt-provisioning registered
    [    1.726988] uart-pl011 fe201000.serial: there is not valid maps for state default
    [    1.729665] uart-pl011 fe201000.serial: cts_event_workaround enabled
    [    1.732022] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 36, base_baud = 0) is a PL011 rev2
    [    1.743689] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
    [    1.747163] mmc-bcm2835 fe300000.mmcnr: mmc_debug:0 mmc_debug2:0
    [    1.749500] mmc-bcm2835 fe300000.mmcnr: DMA channel allocated
    [    1.781111] of_cfs_init
    [    1.783680] of_cfs_init: OK
    [    1.795858] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
    [    1.799873] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
    [    1.803719] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
    [    1.809071] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
    [    1.813024] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
    [    1.816424] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
    [    1.819670] Waiting for root device PARTUUID=6eb8b57d-02...
    [    1.884325] mmc1: new high speed SDIO card at address 0001
    [    1.904442] usb 1-1: new high-speed USB device number 2 using xhci_hcd
    [    1.934505] mmc0: new ultra high speed DDR50 SDHC card at address 0001
    [    1.937733] mmcblk0: mmc0:0001 SD16G 14.4 GiB
    [    1.942464]  mmcblk0: p1 p2
    [    1.973390] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    1.975798] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
    [    1.978928] devtmpfs: mounted
    [    1.991522] Freeing unused kernel memory: 2048K
    [    2.034744] Run /sbin/init as init process
    [    2.037014]   with arguments:
    [    2.037029]     /sbin/init
    [    2.037044]   with environment:
    [    2.037058]     HOME=/
    [    2.037072]     TERM=linux
    [    2.097072] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21
    [    2.099493] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
    [    2.101696] usb 1-1: Product: USB2.0 Hub
    [    2.106083] hub 1-1:1.0: USB hub found
    [    2.108757] hub 1-1:1.0: 4 ports detected
    [    2.480961] systemd[1]: System time before build time, advancing clock.
    [    2.591076] NET: Registered protocol family 10
    [    2.594900] Segment Routing with IPv6
    [    2.661749] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
    [    2.668502] systemd[1]: Detected architecture arm.
    [    2.739598] systemd[1]: Set hostname to <raspberrypi>.
    [    3.265351] systemd[1]: /etc/systemd/system/teamviewerd.service:8: PIDFile= references path below legacy directory /var/run/, updating /var/run/teamviewerd.pid → /run/teamviewerd.pid; please update the unit file accordingly.
    [    3.389201] systemd[1]: Configuration file /etc/systemd/system/myDevices.service is marked executable. Please remove executable permission bits. Proceeding anyway.
    [    3.393625] systemd[1]: /etc/systemd/system/myDevices.service:20: PIDFile= references path below legacy directory /var/run/, updating /var/run/myDevices/cayenne.pid → /run/myDevices/cayenne.pid; please update the unit file accordingly.
    [    3.497449] random: systemd: uninitialized urandom read (16 bytes read)
    [    3.512097] random: systemd: uninitialized urandom read (16 bytes read)
    [    3.517750] systemd[1]: Created slice User and Session Slice.
    [    3.525196] random: systemd: uninitialized urandom read (16 bytes read)
    [    3.528942] systemd[1]: Listening on Syslog Socket.
    [    3.537320] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
    [    3.545279] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [    3.826044] i2c /dev entries driver
    [    4.252076] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    [    4.403721] systemd-journald[141]: Received request to flush runtime journal from PID 1
    [    5.010474] Driver for 1-wire Dallas network protocol.
    [    5.025892] gpio-4 (onewire@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file
    [    5.039688] rpivid-mem feb00000.hevc-decoder: rpivid-hevcmem initialised: Registers at 0xfeb00000 length 0x00010000
    [    5.040319] rpivid-mem feb10000.rpivid-local-intc: rpivid-intcmem initialised: Registers at 0xfeb10000 length 0x00001000
    [    5.040871] rpivid-mem feb20000.h264-decoder: rpivid-h264mem initialised: Registers at 0xfeb20000 length 0x00010000
    [    5.041433] rpivid-mem feb30000.vp9-decoder: rpivid-vp9mem initialised: Registers at 0xfeb30000 length 0x00010000
    [    5.125622] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
    [    5.128692] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
    [    5.128721] [vc_sm_connected_init]: start
    [    5.133355] [vc_sm_connected_init]: installed successfully
    [    5.137552] mc: Linux media interface: v0.10
    [    5.188383] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
    [    5.196640] videodev: Linux video capture interface: v2.00
    [    5.263040] bcm2835_audio bcm2835_audio: card created with 8 channels
    [    5.265075] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
    [    5.282800] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
    [    5.285767] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
    [    5.299056] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
    [    5.299111] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
    [    5.322413] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
    [    5.322481] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
    [    5.349993] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
    [    5.350038] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
    [    5.357576] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
    [    5.357636] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
    [    5.444996] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
    [    5.528241] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
    [    5.531742] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
    [    5.532544] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
    [    5.533691] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
    [    5.533722] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
    [    5.533761] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
    [    5.533784] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
    [    5.533806] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
    [    5.552615] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20
    [    5.554187] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21
    [    5.558035] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22
    [    5.558495] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23
    [    5.558591] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
    [    5.558618] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
    [    5.558641] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
    [    5.558664] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
    [    5.563009] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
    [    5.577966] cfg80211: Loading compiled-in X.509 certificates for regulatory database
    [    5.695292] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
    [    5.782424] brcmfmac: F1 signature read @0x18000000=0x15264345
    [    5.814046] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
    [    5.815486] usbcore: registered new interface driver brcmfmac
    [    6.143692] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
    [    6.143820] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
    [    6.153850] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Jan  4 2021 19:56:29 version 7.45.229 (617f1f5 CY) FWID 01-2dbd9d2e
    [    6.183955] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 0
    [    6.234372] checking generic (3e513000 6e7000) vs hw (0 ffffffffffffffff)
    [    6.234478] fb0: switching to vc4drmfb from simple
    [    6.306445] Console: switching to colour dummy device 80x30
    [    6.310061] vc4-drm gpu: bound fe600000.firmwarekms (ops vc4_fkms_ops [vc4])
    [    6.319147] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1
    [    6.383161] vc4-drm gpu: [drm] HDMI-A-1: EDID is invalid:
    [    6.383187] 	[00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [    6.383203] 	[00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [    6.383218] 	[00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [    6.383233] 	[00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [    6.383248] 	[00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [    6.383262] 	[00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [    6.383277] 	[00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [    6.383292] 	[00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [    6.534540] Console: switching to colour frame buffer device 240x67
    [    6.564677] vc4-drm gpu: [drm] fb0: vc4drmfb frame buffer device
    [    7.799685] w1_master_driver w1_bus_master1: w1_search: max_slave_count 64 reached, will continue next search.
    [    8.232374] random: crng init done
    [    8.232394] random: 7 urandom warning(s) missed due to ratelimiting
    [    8.446798] uart-pl011 fe201000.serial: no DMA platform data
    [    8.708370] 8021q: 802.1Q VLAN Support v1.8
    [    8.964474] Adding 102396k swap on /var/swap.  Priority:-2 extents:38 across:3875268k SSFS
    [    9.181922] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
    [    9.643036] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
    [    9.643333] bcmgenet fd580000.ethernet eth0: Link is Down
    [   11.456808] broken atomic modeset userspace detected, disabling atomic
    [   11.754590] bcmgenet fd580000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
    [   11.754620] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [   14.308820] fuse: init (API version 7.32)
    [   15.298895] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
    [   16.101661] Bluetooth: Core ver 2.22
    [   16.101728] NET: Registered protocol family 31
    [   16.101736] Bluetooth: HCI device and connection manager initialized
    [   16.101750] Bluetooth: HCI socket layer initialized
    [   16.101759] Bluetooth: L2CAP socket layer initialized
    [   16.101775] Bluetooth: SCO socket layer initialized
    [   16.109728] Bluetooth: HCI UART driver ver 2.3
    [   16.109740] Bluetooth: HCI UART protocol H4 registered
    [   16.109796] Bluetooth: HCI UART protocol Three-wire (H5) registered
    [   16.109944] Bluetooth: HCI UART protocol Broadcom registered
    [   16.282930] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [   16.282939] Bluetooth: BNEP filters: protocol multicast
    [   16.282953] Bluetooth: BNEP socket layer initialized
    [   44.749596] Bluetooth: RFCOMM TTY layer initialized
    [   44.749620] Bluetooth: RFCOMM socket layer initialized
    [   44.749641] Bluetooth: RFCOMM ver 1.11
    [   58.978801] w1_master_driver w1_bus_master1: Attaching one wire slave 00.800000000000 crc 8c
    [   58.984079] w1_master_driver w1_bus_master1: Family 0 for 00.800000000000.8c is not registered.
    [   62.125984] v3d fec00000.v3d: MMU error from client L2T (0) at 0x4b61000, pte invalid
    [  122.586888] w1_master_driver w1_bus_master1: Attaching one wire slave 00.400000000000 crc 46
    [  122.597154] w1_master_driver w1_bus_master1: Family 0 for 00.400000000000.46 is not registered.
    [  173.990027] w1_master_driver w1_bus_master1: Attaching one wire slave 00.c00000000000 crc ca
    [  173.997892] w1_master_driver w1_bus_master1: Family 0 for 00.c00000000000.ca is not registered.
    [  250.430949] w1_master_driver w1_bus_master1: Attaching one wire slave 00.200000000000 crc 23
    [  250.437872] w1_master_driver w1_bus_master1: Family 0 for 00.200000000000.23 is not registered.
    [  314.002000] w1_master_driver w1_bus_master1: Attaching one wire slave 00.a00000000000 crc af
    [  314.008413] w1_master_driver w1_bus_master1: Family 0 for 00.a00000000000.af is not registered.
    [  351.932579] w1_master_driver w1_bus_master1: Attaching one wire slave 00.600000000000 crc 65
    [  351.946913] w1_master_driver w1_bus_master1: Family 0 for 00.600000000000.65 is not registered.
    [  392.431460] w1_master_driver w1_bus_master1: Attaching one wire slave 00.e00000000000 crc e9
    [  392.437066] w1_master_driver w1_bus_master1: Family 0 for 00.e00000000000.e9 is not registered.
    [  455.412190] w1_master_driver w1_bus_master1: Attaching one wire slave 00.100000000000 crc 9d
    [  455.420817] w1_master_driver w1_bus_master1: Family 0 for 00.100000000000.9d is not registered.
    [  494.562412] w1_master_driver w1_bus_master1: Attaching one wire slave 00.900000000000 crc 11
    [  494.568712] w1_master_driver w1_bus_master1: Family 0 for 00.900000000000.11 is not registered.
    [  569.782952] w1_master_driver w1_bus_master1: Attaching one wire slave 00.500000000000 crc db
    [  569.793316] w1_master_driver w1_bus_master1: Family 0 for 00.500000000000.db is not registered.
    [  621.742564] w1_master_driver w1_bus_master1: Attaching one wire slave 00.d00000000000 crc 57
    [  621.748812] w1_master_driver w1_bus_master1: Family 0 for 00.d00000000000.57 is not registered.
    [  648.222491] w1_master_driver w1_bus_master1: Attaching one wire slave 00.300000000000 crc be
    [  648.227920] w1_master_driver w1_bus_master1: Family 0 for 00.300000000000.be is not registered.
    [  697.562932] w1_master_driver w1_bus_master1: Attaching one wire slave 00.b00000000000 crc 32
    [  697.573634] w1_master_driver w1_bus_master1: Family 0 for 00.b00000000000.32 is not registered.
    [  736.853209] w1_master_driver w1_bus_master1: Attaching one wire slave 00.700000000000 crc f8
    [  736.863257] w1_master_driver w1_bus_master1: Family 0 for 00.700000000000.f8 is not registered.
    [  788.803242] w1_master_driver w1_bus_master1: Attaching one wire slave 00.f00000000000 crc 74
    [  788.808652] w1_master_driver w1_bus_master1: Family 0 for 00.f00000000000.74 is not registered.
    [  851.293994] w1_master_driver w1_bus_master1: Attaching one wire slave 00.080000000000 crc c2
    [  851.303095] w1_master_driver w1_bus_master1: Family 0 for 00.080000000000.c2 is not registered.
    [  904.594126] w1_master_driver w1_bus_master1: Attaching one wire slave 00.880000000000 crc 4e
    [  904.609278] w1_master_driver w1_bus_master1: Family 0 for 00.880000000000.4e is not registered.

    I have some update:

    I solved problem with error  `Connection timed out (110)`  The problem was with BUSY signal on GPIO 25 as interrupt control. For driver it is mandatory to detect falling edge to start filling spi buffer. I checked wiring and found problem. However second error `raw ERROR: Input/output error (5)` is still persist on all channels. My ideas are almost finished. Here is what I see when try iio_info:

    iio_info
    Library version: 0.23 (git tag: 81b7802)
    Compiled with backends: local xml ip usb
    IIO context created with local backend.
    Backend version: 0.23 (git tag: 81b7802)
    Backend description string: Linux raspberrypi 5.10.83-v7l+ #1 SMP Sat Dec 18 23:25:51 HST 2021 armv7l
    IIO context has 2 attributes:
    	local,kernel: 5.10.83-v7l+
    	uri: local:
    IIO context has 2 devices:
    	iio:device0: ad7606-8 (buffer capable)
    		9 channels found:
    			voltage0:  (input, index: 0, format: le:S16/16>>0)
    			2 channel-specific attributes found:
    				attr  0: raw ERROR: Input/output error (5)
    				attr  1: scale value: 0.152588
    			voltage1:  (input, index: 1, format: le:S16/16>>0)
    			2 channel-specific attributes found:
    				attr  0: raw ERROR: Input/output error (5)
    				attr  1: scale value: 0.152588
    			voltage2:  (input, index: 2, format: le:S16/16>>0)
    			2 channel-specific attributes found:
    				attr  0: raw ERROR: Input/output error (5)
    				attr  1: scale value: 0.152588
    			voltage3:  (input, index: 3, format: le:S16/16>>0)
    			2 channel-specific attributes found:
    				attr  0: raw ERROR: Input/output error (5)
    				attr  1: scale value: 0.152588
    			voltage4:  (input, index: 4, format: le:S16/16>>0)
    			2 channel-specific attributes found:
    				attr  0: raw ERROR: Input/output error (5)
    				attr  1: scale value: 0.152588
    			voltage5:  (input, index: 5, format: le:S16/16>>0)
    			2 channel-specific attributes found:
    				attr  0: raw ERROR: Input/output error (5)
    				attr  1: scale value: 0.152588
    			voltage6:  (input, index: 6, format: le:S16/16>>0)
    			2 channel-specific attributes found:
    				attr  0: raw ERROR: Input/output error (5)
    				attr  1: scale value: 0.152588
    			voltage7:  (input, index: 7, format: le:S16/16>>0)
    			2 channel-specific attributes found:
    				attr  0: raw ERROR: Input/output error (5)
    				attr  1: scale value: 0.152588
    			timestamp:  (input, index: 8, format: le:S64/64>>0)
    		3 device-specific attributes found:
    				attr  0: current_timestamp_clock value: realtime
    
    				attr  1: oversampling_ratio value: 1
    				attr  2: oversampling_ratio_available value: 1 2 4 8 16 32 64
    		2 buffer-specific attributes found:
    				attr  0: data_available value: 0
    				attr  1: watermark value: 1
    		Current trigger: trigger0(ad7606-8-dev0)
    	trigger0: ad7606-8-dev0
    		0 channels found:
    		No trigger on this device
    

  • Some Update about topic:

    There is still problem with `raw ERROR: Input/output error (5)`. I connected to Logic Analyzer to SPI and GPIO signals. By trying to use iio_info command and reading in sysfs by cat in_volrageX_raw. More details were observed. Looks transfer of data is working but strange thigs were noticed:

    4. The CONVST works opposite than it described in technical manual pic.48. On picture the signal is inverted.

    5. Driver transfer first 16 bits and then stops with resetting AD7606. Even If I try to read other channels I can see only first 16 bits and then reset. See pictures below.

    6. Looks clock signal and data MISO are not well aligned. 

    7. Even if input channel connected to the ground the MISO signal could be FFFF or 0000.

    Can anybody help with troubleshooting?

    here is reading one channgel:

    Logic analyzer

    here is reading all 8 channels by iio_info. Transfer interrupts after each 16 bits.

    iio_info

  •   I checked conditions when driver set chip in reset state and found problem here. The driver verifies if FIRSTDATA input is high when reading first channel and if it is not then driver creates error and reset the device. It is in function static int ad7606_read_samples of ad7606.c driver file:

    static int ad7606_read_samples(struct ad7606_state *st)
    {
    	unsigned int num = st->chip_info->num_channels - 1;
    	u16 *data = st->data;
    	int ret;
    
    	/*
    	 * The frstdata signal is set to high while and after reading the sample
    	 * of the first channel and low for all other channels. This can be used
    	 * to check that the incoming data is correctly aligned. During normal
    	 * operation the data should never become unaligned, but some glitch or
    	 * electrostatic discharge might cause an extra read or clock cycle.
    	 * Monitoring the frstdata signal allows to recover from such failure
    	 * situations.
    	 */
    
    	if (st->gpio_frstdata) {
    		ret = st->bops->read_block(st->dev, 1, data);
    		if (ret)
    			return ret;
    
    		if (!gpiod_get_value(st->gpio_frstdata)) {
    			ad7606_reset(st);
    			return -EIO;
    		}
    
    		data++;
    		num--;
    	}
    
    	return st->bops->read_block(st->dev, num, data);
    }

    For some reason idk the driver doesn't see HIGH level on FRSTDATA pin however logic analyzer detect it. Temporary I deleted property adi,conversion-start-gpios in Device tree and data reading works now. Probably FIRSTDATA signal disappears too fast  from input after reading first channel and driver can't detect high level.