This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3357: Unable to read ADS7957 channels via Linux IIO

Part Number: AM3357
Other Parts Discussed in Thread: ADS7950, DAC104S085

Hello,

I have the following setup:

In the device tree I have the following configuration (only relevant parts):

&am33xx_pinmux {
    pinctrl-names = "default";
    spi1_pins: pinmux_spi1_pins {
        
        pinctrl-single,pins = <
            AM33XX_IOPAD(0x90c, PIN_INPUT | MUX_MODE2) /* (H17) gmii1_crs.spi1_d0 */
            AM33XX_IOPAD(0x910, PIN_INPUT | MUX_MODE2) /* (J15) gmii1_rxer.spi1_d1 */
            AM33XX_IOPAD(0x964, PIN_INPUT | MUX_MODE4) /* (C18) eCAP0_in_PWM0_out.spi1_sclk */

            AM33XX_IOPAD(0x978, PIN_INPUT | MUX_MODE7) /* (D18) uart1_ctsn.gpio0[12] */
            AM33XX_IOPAD(0x97c, PIN_INPUT | MUX_MODE7) /* (D19) uart1_rtsn.gpio0[13] */
        >;
    };
};

&spi1 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&spi1_pins>;
    cs-gpios =  <&gpio0 12 GPIO_ACTIVE_LOW>, <&gpio0 13 GPIO_ACTIVE_LOW>;
        spi-max-frequency = <60000000>;

    ads7957: adc@1 {
        compatible = "ti,ads7957";
        reg = <1>;
        #io-channel-cells = <1>;
        spi-max-frequency = <10000000>;
    };
};

TI's Linux driver is properly loaded and IIO subsystem detects ADS7957 chip:

root@am335x-cmpc30:~# dmesg | grep ads
[    5.806242] ads7950 spi1.1: spi1.1 supply vref not found, using dummy regulator
[    5.878974] ads7950 spi1.1: Linked as a consumer to regulator.0

However I'm unable to read any channel except first and last (and values are wrong). Here is output from the iio_info Linux tool:

root@am335x-cmpc30:~# iio_info
Library version: 0.15 (git tag: v0.15)
Compiled with backends: local xml ip usb
IIO context created with local backend.
Backend version: 0.15 (git tag: v0.15)
Backend description string: Linux am335x-cmpc30 4.19.94-rt39cmpc30_v8-ga242ccf3f1 #1 PREEMPT RT Fri Oct 23 10:26:45 UTC 2020 armv7l
IIO context has 1 attributes:
        local,kernel: 4.19.94-rt39cmpc30_v8-ga242ccf3f1
IIO context has 1 devices:
        iio:device0: ads7957 (buffer capable)
                17 channels found:
                        voltage0:  (input, index: 0, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw value: 1
                                attr  1: scale ERROR: Invalid argument (-22)
                        voltage1:  (input, index: 1, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw ERROR: Input/output error (-5)
                                attr  1: scale ERROR: Invalid argument (-22)
                        voltage2:  (input, index: 2, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw ERROR: Input/output error (-5)
                                attr  1: scale ERROR: Invalid argument (-22)
                        voltage3:  (input, index: 3, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw ERROR: Input/output error (-5)
                                attr  1: scale ERROR: Invalid argument (-22)
                        voltage4:  (input, index: 4, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw ERROR: Input/output error (-5)
                                attr  1: scale ERROR: Invalid argument (-22)
                        voltage5:  (input, index: 5, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw ERROR: Input/output error (-5)
                                attr  1: scale ERROR: Invalid argument (-22)
                        voltage6:  (input, index: 6, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw ERROR: Input/output error (-5)
                                attr  1: scale ERROR: Invalid argument (-22)
                        voltage7:  (input, index: 7, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw ERROR: Input/output error (-5)
                                attr  1: scale ERROR: Invalid argument (-22)
                        voltage8:  (input, index: 8, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw ERROR: Input/output error (-5)
                                attr  1: scale ERROR: Invalid argument (-22)
                        voltage9:  (input, index: 9, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw ERROR: Input/output error (-5)
                                attr  1: scale ERROR: Invalid argument (-22)
                        voltage10:  (input, index: 10, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw ERROR: Input/output error (-5)
                                attr  1: scale ERROR: Invalid argument (-22)
                        voltage11:  (input, index: 11, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw ERROR: Input/output error (-5)
                                attr  1: scale ERROR: Invalid argument (-22)
                        voltage12:  (input, index: 12, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw ERROR: Input/output error (-5)
                                attr  1: scale ERROR: Invalid argument (-22)
                        voltage13:  (input, index: 13, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw ERROR: Input/output error (-5)
                                attr  1: scale ERROR: Invalid argument (-22)
                        voltage14:  (input, index: 14, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw ERROR: Input/output error (-5)
                                attr  1: scale ERROR: Invalid argument (-22)
                        voltage15:  (input, index: 15, format: be:u10/16>>2)
                        2 channel-specific attributes found:
                                attr  0: raw value: 523
                                attr  1: scale ERROR: Invalid argument (-22)
                        timestamp:  (input, index: 16, format: le:S64/64>>0)
                1 device-specific attributes found:
                                attr  0: current_timestamp_clock value: realtime

                2 buffer-specific attributes found:
                                attr  0: watermark value: 1
                                attr  1: data_available value: 0

Scale returns error, because I didn't specify regulator in device tree. This is on purpose, because ADS7957 has hardwired 3.3V voltage on my PCB. But channels should work correctly.

While debugging, I added kernel logs in the TI's ADS7957 driver and the following errors showed up:

[  598.869235] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (1 != 0)
[  598.880442] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (2 != 1)
[  598.891315] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (3 != 1)
[  598.902920] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (4 != 2)
[  598.912788] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (5 != 2)
[  598.923756] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (6 != 3)
[  598.934229] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (7 != 3)
[  598.945349] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (8 != 12)
[  598.956098] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (9 != 12)
[  598.966881] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (10 != 13)
[  598.977712] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (11 != 13)
[  598.988269] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (12 != 14)
[  598.999733] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (13 != 14)
[  599.010557] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (14 != 15)

So it seems, that for every read value driver detects, that it is coming from different channel that it expected.

I checked the SPI transmission with logic analyzer and decoded bytes looks valid (transmission ends with a correct value read from correct channel).

The same PCB works fine with self-coded baremetal driver on SYS/BIOS, so chip is working.

What am I doing wrong?

  • Hi Kuba,

    Please attach the full kernel boot log.

  • [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.19.94-rt39cmpc30_v8-ga242ccf3f1 (oe-user@oe-host) (gcc version 9.2.0 (GCC)) #1 PREEMPT RT Fri Oct 30 10:34:13 UTC 2020
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] OF: fdt: Machine model: Trumpf CMPC30
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] cma: Reserved 48 MiB at 0x8c000000
    [    0.000000] On node 0 totalpages: 65536
    [    0.000000]   Normal zone: 576 pages used for memmap
    [    0.000000]   Normal zone: 0 pages reserved
    [    0.000000]   Normal zone: 65536 pages, LIFO batch:15
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (neon)
    [    0.000000] random: get_random_bytes called from start_kernel+0xa8/0x448 with crng_init=0
    [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
    [    0.000000] pcpu-alloc: [0] 0 
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/sda1 rootfstype=ext4 rootwait
    [    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    [    0.000000] Memory: 200480K/262144K available (6144K kernel code, 253K rwdata, 1688K rodata, 1024K init, 231K bss, 12512K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
    [    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
    [    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 254 kB)
    [    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 232 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000] rcu:     RCU priority boosting: priority 1 delay 500 ms.
    [    0.000000]  No expedited grace period (rcu_normal_after_boot).
    [    0.000000]  Tasks RCU enabled.
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000025] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000046] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000055] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000288] timer_probe: no matching timers found
    [    0.000547] Console: colour dummy device 80x30
    [    0.000741] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.000744] This ensures that you still see kernel messages. Please
    [    0.000747] update your kernel commandline.
    [    0.000798] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
    [    0.058736] pid_max: default: 32768 minimum: 301
    [    0.059027] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.059043] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.060346] CPU: Testing write buffer coherency: ok
    [    0.060427] CPU0: Spectre v2: using BPIALL workaround
    [    0.061752] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.062158] rcu: Hierarchical SRCU implementation.
    [    0.065184] devtmpfs: initialized
    [    0.078920] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.079525] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.079560] futex hash table entries: 256 (order: 1, 8192 bytes)
    [    0.084542] pinctrl core: initialized pinctrl subsystem
    [    0.086412] NET: Registered protocol family 16
    [    0.090765] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.120764] l4_wkup_cm:clk:0010:0: failed to disable
    [    0.196397] gpio gpiochip0: (gpio-0-31): added GPIO chardev (254:0)
    [    0.196568] gpiochip_setup_dev: registered GPIOs 0 to 31 on device: gpiochip0 (gpio-0-31)
    [    0.196954] OMAP GPIO hardware version 0.1
    [    0.198323] gpio gpiochip1: (gpio-32-63): added GPIO chardev (254:1)
    [    0.198465] gpiochip_setup_dev: registered GPIOs 32 to 63 on device: gpiochip1 (gpio-32-63)
    [    0.199751] gpio gpiochip2: Persistence not supported for GPIO 18
    [    0.199775] GPIO line 82 (FET_nOE) hogged as output/low
    [    0.200088] gpio gpiochip2: (gpio-64-95): added GPIO chardev (254:2)
    [    0.200225] gpiochip_setup_dev: registered GPIOs 64 to 95 on device: gpiochip2 (gpio-64-95)
    [    0.201803] gpio gpiochip3: (gpio-96-127): added GPIO chardev (254:3)
    [    0.201933] gpiochip_setup_dev: registered GPIOs 96 to 127 on device: gpiochip3 (gpio-96-127)
    [    0.212285] No ATAGs?
    [    0.212302] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.231152] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.231761] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/regulator-vref[0]'
    [    0.233764] SCSI subsystem initialized
    [    0.234148] usbcore: registered new interface driver usbfs
    [    0.234236] usbcore: registered new interface driver hub
    [    0.234405] usbcore: registered new device driver usb
    [    0.235175] pps_core: LinuxPPS API ver. 1 registered
    [    0.235192] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.235799] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.236632] FPGA manager framework
    [    0.238502] clocksource: Switched to clocksource timer1
    [    0.252151] NET: Registered protocol family 2
    [    0.253436] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 7168 bytes)
    [    0.253495] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.253554] TCP bind hash table entries: 2048 (order: 3, 49152 bytes)
    [    0.253690] TCP: Hash tables configured (established 2048 bind 2048)
    [    0.253862] UDP hash table entries: 256 (order: 2, 16384 bytes)
    [    0.253922] UDP-Lite hash table entries: 256 (order: 2, 16384 bytes)
    [    0.254232] NET: Registered protocol family 1
    [    0.255253] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.257294] Initialise system trusted keyrings
    [    0.257747] workingset: timestamp_bits=14 max_order=16 bucket_order=2
    [    0.266980] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.270683] Key type asymmetric registered
    [    0.270714] Asymmetric key parser 'x509' registered
    [    0.270830] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
    [    0.270852] io scheduler noop registered
    [    0.270864] io scheduler deadline registered
    [    0.271280] io scheduler cfq registered (default)
    [    0.271301] io scheduler mq-deadline registered
    [    0.271313] io scheduler kyber registered
    [    0.274254] pinctrl-single 44e10800.pinmux: 142 pins, size 568
    [    0.281682] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [    0.286767] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
    [    0.845789] console [ttyS0] enabled
    [    0.850713] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 31, base_baud = 3000000) is a 8250
    [    0.862294] omap_rng 48310000.rng: Random Number Generator ver. 20
    [    0.868765] random: fast init done
    [    0.869090] random: crng init done
    [    0.880084] of_get_named_gpiod_flags: parsed 'cs-gpios' property of node '/ocp/spi@48030000[0]' - status (0)
    [    0.880128] of_get_named_gpiod_flags: parsed 'cs-gpios' property of node '/ocp/spi@48030000[1]' - status (0)
    [    0.880156] of_get_named_gpiod_flags: parsed 'cs-gpios' property of node '/ocp/spi@48030000[2]' - status (0)
    [    0.881974] m25p80 spi0.0: s25fl128s (16384 Kbytes)
    [    0.886960] 4 fixed-partitions partitions found on MTD device spi0.0
    [    0.893355] Creating 4 MTD partitions on "spi0.0":
    [    0.898190] 0x000000000000-0x000000020000 : "u-boot-spl"
    [    0.905190] 0x000000020000-0x000000120000 : "u-boot"
    [    0.911544] 0x000000120000-0x000000130000 : "u-boot-env"
    [    0.918207] 0x000000130000-0x000000790000 : "emergency-boot"
    [    0.926482] m25p80 spi0.1: n25q00 (131072 Kbytes)
    [    0.931276] 2 fixed-partitions partitions found on MTD device spi0.1
    [    0.937665] Creating 2 MTD partitions on "spi0.1":
    [    0.942494] 0x000000000000-0x000000200000 : "test_part0"
    [    0.949403] 0x000000200000-0x000000400000 : "test_part1"
    [    0.957455] of_get_named_gpiod_flags: parsed 'cs-gpios' property of node '/ocp/spi@481a0000[0]' - status (0)
    [    0.957492] of_get_named_gpiod_flags: parsed 'cs-gpios' property of node '/ocp/spi@481a0000[1]' - status (0)
    [    0.959551] mdio_bus fixed-0: GPIO lookup for consumer reset
    [    0.959568] mdio_bus fixed-0: using lookup tables for GPIO lookup
    [    0.959579] mdio_bus fixed-0: No GPIO consumer reset found
    [    0.959623] libphy: Fixed MDIO Bus: probed
    [    0.966905] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [    0.973571] ehci-platform: EHCI generic platform driver
    [    0.979209] usbcore: registered new interface driver usb-storage
    [    0.987742] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer reset
    [    0.987758] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [    0.987797] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [    0.987821] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [    0.987837] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [    0.987849] am335x-phy-driver 47401300.usb-phy: No GPIO consumer reset found
    [    0.987860] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer vbus-detect
    [    0.987869] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [    0.987891] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [    0.987911] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [    0.987922] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [    0.987931] am335x-phy-driver 47401300.usb-phy: No GPIO consumer vbus-detect found
    [    0.988075] am335x-phy-driver 47401300.usb-phy: 47401300.usb-phy supply vcc not found, using dummy regulator
    [    0.998193] am335x-phy-driver 47401300.usb-phy: Linked as a consumer to regulator.0
    [    1.010370] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer reset
    [    1.010389] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [    1.010429] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [    1.010453] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [    1.010469] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [    1.010481] am335x-phy-driver 47401b00.usb-phy: No GPIO consumer reset found
    [    1.010493] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer vbus-detect
    [    1.010501] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [    1.010523] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [    1.010544] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [    1.010554] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [    1.010564] am335x-phy-driver 47401b00.usb-phy: No GPIO consumer vbus-detect found
    [    1.010690] am335x-phy-driver 47401b00.usb-phy: 47401b00.usb-phy supply vcc not found, using dummy regulator
    [    1.020855] am335x-phy-driver 47401b00.usb-phy: Linked as a consumer to regulator.0
    [    1.043403] altera-ps-spi spi0.2: GPIO lookup for consumer nconfig
    [    1.043423] altera-ps-spi spi0.2: using device tree for GPIO lookup
    [    1.043488] of_get_named_gpiod_flags: parsed 'nconfig-gpios' property of node '/ocp/spi@48030000/fpgamgr0@2[0]' - status (0)
    [    1.043523] gpio gpiochip2: Persistence not supported for GPIO 19
    [    1.043542] altera-ps-spi spi0.2: GPIO lookup for consumer nstat
    [    1.043551] altera-ps-spi spi0.2: using device tree for GPIO lookup
    [    1.043586] of_get_named_gpiod_flags: parsed 'nstat-gpios' property of node '/ocp/spi@48030000/fpgamgr0@2[0]' - status (0)
    [    1.043602] gpio gpiochip2: Persistence not supported for GPIO 20
    [    1.043617] altera-ps-spi spi0.2: GPIO lookup for consumer confd
    [    1.043626] altera-ps-spi spi0.2: using device tree for GPIO lookup
    [    1.043658] of_get_named_gpiod_flags: parsed 'confd-gpios' property of node '/ocp/spi@48030000/fpgamgr0@2[0]' - status (0)
    [    1.043674] gpio gpiochip2: Persistence not supported for GPIO 21
    [    1.043865] fpga_manager fpga0: altera-ps-spi spi0.2 registered
    [    1.051717] NET: Registered protocol family 10
    [    1.058111] Segment Routing with IPv6
    [    1.062107] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.069340] NET: Registered protocol family 17
    [    1.074119] Key type dns_resolver registered
    [    1.078710] omap_voltage_late_init: Voltage driver support not added
    [    1.086347] Loading compiled-in X.509 certificates
    [    1.107295] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    1.112562] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    1.118761] gpiochip_find_base: found new base at 511
    [    1.119247] gpio gpiochip4: (omap-gpmc): added GPIO chardev (254:4)
    [    1.119403] gpiochip_setup_dev: registered GPIOs 511 to 511 on device: gpiochip4 (omap-gpmc)
    [    1.119978] gpmc cs0 before gpmc_cs_program_settings:
    [    1.125071] cs0 GPMC_CS_CONFIG1: 0x00000000
    [    1.129351] cs0 GPMC_CS_CONFIG2: 0x00101001
    [    1.133557] cs0 GPMC_CS_CONFIG3: 0x22060514
    [    1.137761] cs0 GPMC_CS_CONFIG4: 0x10057016
    [    1.141968] cs0 GPMC_CS_CONFIG5: 0x010f1111
    [    1.146172] cs0 GPMC_CS_CONFIG6: 0x8f070000
    [    1.150375] gpmc cs0 access configuration:
    [    1.154495] gpmc,mux-add-data = <0>;
    [    1.158086] gpmc,device-width = <1>;
    [    1.161679] gpmc,wait-pin = <0>;
    [    1.164926] gpmc,burst-length = <4>;
    [    1.168527] gpmc cs0 timings configuration:
    [    1.172742] gpmc,cs-on-ns = <10>; /* 1 ns - 10 ns; 1 ticks */
    [    1.178523] gpmc,cs-rd-off-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.185087] gpmc,cs-wr-off-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.191652] gpmc,adv-on-ns = <40>; /* 31 ns - 40 ns; 4 ticks */
    [    1.197604] gpmc,adv-rd-off-ns = <50>; /* 41 ns - 50 ns; 5 ticks */
    [    1.203907] gpmc,adv-wr-off-ns = <60>; /* 51 ns - 60 ns; 6 ticks */
    [    1.210211] gpmc,adv-aad-mux-on-ns = <10>; /* 1 ns - 10 ns; 1 ticks */
    [    1.216773] gpmc,adv-aad-mux-rd-off-ns = <20>; /* 11 ns - 20 ns; 2 ticks */
    [    1.223774] gpmc,adv-aad-mux-wr-off-ns = <20>; /* 11 ns - 20 ns; 2 ticks */
    [    1.230776] gpmc,oe-on-ns = <60>; /* 51 ns - 60 ns; 6 ticks */
    [    1.236641] gpmc,oe-off-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.242944] gpmc,oe-aad-mux-on-ns = <10>; /* 1 ns - 10 ns; 1 ticks */
    [    1.249423] gpmc,oe-aad-mux-off-ns = <30>; /* 21 ns - 30 ns; 3 ticks */
    [    1.256073] gpmc,we-on-ns = <50>; /* 41 ns - 50 ns; 5 ticks */
    [    1.261941] gpmc,we-off-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.268242] gpmc,rd-cycle-ns = <170>; /* 161 ns - 170 ns; 17 ticks */
    [    1.274720] gpmc,wr-cycle-ns = <170>; /* 161 ns - 170 ns; 17 ticks */
    [    1.281198] gpmc,access-ns = <150>; /* 141 ns - 150 ns; 15 ticks */
    [    1.287498] gpmc,page-burst-access-ns = <10>; /* 1 ns - 10 ns; 1 ticks */
    [    1.294324] gpmc,bus-turnaround-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.300714] gpmc,cycle2cycle-delay-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.307363] gpmc,wait-monitoring-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.313840] gpmc,clk-activation-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.320230] gpmc,wr-data-mux-bus-ns = <70>; /* 61 ns - 70 ns; 7 ticks */
    [    1.326968] gpmc,wr-access-ns = <150>; /* 141 ns - 150 ns; 15 ticks */
    [    1.333542] GPMC CS0: cs_on            :   0 ticks,   0 ns (was   1 ticks)   0 ns
    [    1.341068] GPMC CS0: cs_rd_off        :  16 ticks, 160 ns (was  16 ticks) 160 ns
    [    1.348593] GPMC CS0: cs_wr_off        :  16 ticks, 160 ns (was  16 ticks) 160 ns
    [    1.356117] GPMC CS0: adv_on           :   1 ticks,  10 ns (was   4 ticks)  10 ns
    [    1.363642] GPMC CS0: adv_rd_off       :   2 ticks,  20 ns (was   5 ticks)  20 ns
    [    1.371168] GPMC CS0: adv_wr_off       :   2 ticks,  20 ns (was   6 ticks)  20 ns
    [    1.378693] GPMC CS0: adv_aad_mux_on   :   0 ticks,   0 ns (was   1 ticks)   0 ns
    [    1.386217] GPMC CS0: adv_aad_mux_rd_off:   0 ticks,   0 ns (was   2 ticks)   0 ns
    [    1.393828] GPMC CS0: adv_aad_mux_wr_off:   0 ticks,   0 ns (was   2 ticks)   0 ns
    [    1.401442] GPMC CS0: oe_on            :   3 ticks,  30 ns (was   6 ticks)  30 ns
    [    1.408968] GPMC CS0: oe_off           :  15 ticks, 150 ns (was  16 ticks) 150 ns
    [    1.416489] GPMC CS0: oe_aad_mux_on    :   0 ticks,   0 ns (was   1 ticks)   0 ns
    [    1.424012] GPMC CS0: oe_aad_mux_off   :   0 ticks,   0 ns (was   3 ticks)   0 ns
    [    1.431537] GPMC CS0: we_on            :   3 ticks,  30 ns (was   5 ticks)  30 ns
    [    1.439063] GPMC CS0: we_off           :  15 ticks, 150 ns (was  16 ticks) 150 ns
    [    1.446586] GPMC CS0: rd_cycle         :  16 ticks, 160 ns (was  17 ticks) 160 ns
    [    1.454110] GPMC CS0: wr_cycle         :  16 ticks, 160 ns (was  17 ticks) 160 ns
    [    1.461637] GPMC CS0: access           :  13 ticks, 130 ns (was  15 ticks) 130 ns
    [    1.469162] GPMC CS0: page_burst_access:   1 ticks,  10 ns (was   1 ticks)  10 ns
    [    1.476685] GPMC CS0: bus_turnaround   :   0 ticks,   0 ns (was   0 ticks)   0 ns
    [    1.484209] GPMC CS0: cycle2cycle_delay:  10 ticks, 100 ns (was   0 ticks) 100 ns
    [    1.491735] GPMC CS0: wr_data_mux_bus  :   3 ticks,  30 ns (was   7 ticks)  30 ns
    [    1.499260] GPMC CS0: wr_access        :   0 ticks,   0 ns (was  15 ticks)   0 ns
    [    1.506783] GPMC CS0: wait_monitoring  :   0 ticks,   0 ns (was   0 ticks)   0 ns
    [    1.514307] GPMC CS0: clk_activation   :   0 ticks,   0 ns (was   0 ticks)   0 ns
    [    1.521828] GPMC CS0 CLK period is 10 ns (div 1)
    [    1.526471] gpmc cs0 after gpmc_cs_set_timings:
    [    1.531025] cs0 GPMC_CS_CONFIG1: 0x00001200
    [    1.535230] cs0 GPMC_CS_CONFIG2: 0x00101000
    [    1.539435] cs0 GPMC_CS_CONFIG3: 0x00020201
    [    1.543640] cs0 GPMC_CS_CONFIG4: 0x0f030f03
    [    1.547841] cs0 GPMC_CS_CONFIG5: 0x010d1010
    [    1.552046] cs0 GPMC_CS_CONFIG6: 0x80030ac0
    [    1.556247] gpmc cs0 access configuration:
    [    1.560365] gpmc,mux-add-data = <2>;
    [    1.563958] gpmc,device-width = <2>;
    [    1.567550] gpmc,wait-pin = <0>;
    [    1.570796] gpmc,burst-length = <4>;
    [    1.574392] gpmc,cycle2cycle-samecsen = <1>;
    [    1.578685] gpmc,cycle2cycle-diffcsen = <1>;
    [    1.582974] gpmc cs0 timings configuration:
    [    1.587180] gpmc,cs-on-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.592785] gpmc,cs-rd-off-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.599352] gpmc,cs-wr-off-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.605914] gpmc,adv-on-ns = <10>; /* 1 ns - 10 ns; 1 ticks */
    [    1.611780] gpmc,adv-rd-off-ns = <20>; /* 11 ns - 20 ns; 2 ticks */
    [    1.618080] gpmc,adv-wr-off-ns = <20>; /* 11 ns - 20 ns; 2 ticks */
    [    1.624380] gpmc,adv-aad-mux-on-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.630771] gpmc,adv-aad-mux-rd-off-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.637507] gpmc,adv-aad-mux-wr-off-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.644246] gpmc,oe-on-ns = <30>; /* 21 ns - 30 ns; 3 ticks */
    [    1.650115] gpmc,oe-off-ns = <150>; /* 141 ns - 150 ns; 15 ticks */
    [    1.656415] gpmc,oe-aad-mux-on-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.662718] gpmc,oe-aad-mux-off-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.669109] gpmc,we-on-ns = <30>; /* 21 ns - 30 ns; 3 ticks */
    [    1.674975] gpmc,we-off-ns = <150>; /* 141 ns - 150 ns; 15 ticks */
    [    1.681277] gpmc,rd-cycle-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.687753] gpmc,wr-cycle-ns = <160>; /* 151 ns - 160 ns; 16 ticks */
    [    1.694229] gpmc,access-ns = <130>; /* 121 ns - 130 ns; 13 ticks */
    [    1.700534] gpmc,page-burst-access-ns = <10>; /* 1 ns - 10 ns; 1 ticks */
    [    1.707358] gpmc,bus-turnaround-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.713747] gpmc,cycle2cycle-delay-ns = <100>; /* 91 ns - 100 ns; 10 ticks */
    [    1.720923] gpmc,wait-monitoring-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.727398] gpmc,clk-activation-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.733787] gpmc,wr-data-mux-bus-ns = <30>; /* 21 ns - 30 ns; 3 ticks */
    [    1.740526] gpmc,wr-access-ns = <0>; /* 0 ns - 0 ns; 0 ticks */
    [    1.779609] rtc rtc0: bq32k: dev (253:0)
    [    1.779652] bq32k 0-0068: rtc core: registered bq32k as rtc0
    [    1.785973] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    1.796178] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [    1.801603] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [    1.809435] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
    [    1.817751] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    1.825016] usb usb1: Product: MUSB HDRC host driver
    [    1.830012] usb usb1: Manufacturer: Linux 4.19.94-rt39cmpc30_v8-ga242ccf3f1 musb-hcd
    [    1.837796] usb usb1: SerialNumber: musb-hdrc.0
    [    1.843363] hub 1-0:1.0: USB hub found
    [    1.847216] hub 1-0:1.0: 1 port detected
    [    1.856396] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [    1.861861] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    [    1.869674] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
    [    1.877989] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    1.885252] usb usb2: Product: MUSB HDRC host driver
    [    1.890250] usb usb2: Manufacturer: Linux 4.19.94-rt39cmpc30_v8-ga242ccf3f1 musb-hcd
    [    1.898034] usb usb2: SerialNumber: musb-hdrc.1
    [    1.903526] hub 2-0:1.0: USB hub found
    [    1.907374] hub 2-0:1.0: 1 port detected
    [    1.913035] bq32k 0-0068: setting system clock to 2020-11-02 13:43:12 UTC (1604324592)
    [    1.922897] Waiting for root device /dev/sda1...
    [    2.348537] usb 2-1: new high-speed USB device number 2 using musb-hdrc
    [    2.529772] usb 2-1: New USB device found, idVendor=0781, idProduct=5583, bcdDevice= 1.00
    [    2.538005] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [    2.545184] usb 2-1: Product: Ultra Fit
    [    2.549049] usb 2-1: Manufacturer: SanDisk
    [    2.553170] usb 2-1: SerialNumber: 4C530000050204221060
    [    2.559652] usb-storage 2-1:1.0: USB Mass Storage device detected
    [    2.566614] scsi host0: usb-storage 2-1:1.0
    [    3.609778] scsi 0:0:0:0: Direct-Access     SanDisk  Ultra Fit        1.00 PQ: 0 ANSI: 6
    [    3.619469] sd 0:0:0:0: [sda] 30031872 512-byte logical blocks: (15.4 GB/14.3 GiB)
    [    3.630195] sd 0:0:0:0: [sda] Write Protect is off
    [    3.635043] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
    [    3.636095] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    [    3.654617]  sda: sda1 sda2 sda3
    [    3.663129] sd 0:0:0:0: [sda] Attached SCSI removable disk
    [    3.681591] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
    [    3.689537] VFS: Mounted root (ext4 filesystem) readonly on device 8:1.
    [    3.697701] devtmpfs: mounted
    [    3.703331] Freeing unused kernel memory: 1024K
    [    3.708385] Run /sbin/init as init process
    [    4.232149] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
    [    4.449898] udevd[93]: starting version 3.2.8
    [    4.560153] udevd[94]: starting eudev-3.2.8
    [    4.756879] fpga_clock: loading out-of-tree module taints kernel.
    [    4.783454] cmpc30_fpga fpga_uio: firmware file: CMPC30_DC71.rbf
    [    4.805284] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds_cmpc30/led0[0]' - status (0)
    [    4.805329] gpio gpiochip3: Persistence not supported for GPIO 18
    [    4.805336] no flags found for gpios
    [    4.805744] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds_cmpc30/led1[0]' - status (0)
    [    4.805766] gpio gpiochip2: Persistence not supported for GPIO 22
    [    4.805771] no flags found for gpios
    [    4.805973] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds_cmpc30/led2[0]' - status (0)
    [    4.805991] gpio gpiochip2: Persistence not supported for GPIO 23
    [    4.805996] no flags found for gpios
    [    4.806169] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds_cmpc30/led3[0]' - status (0)
    [    4.806187] gpio gpiochip2: Persistence not supported for GPIO 24
    [    4.806191] no flags found for gpios
    [    4.806359] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds_cmpc30/led4[0]' - status (0)
    [    4.806377] gpio gpiochip2: Persistence not supported for GPIO 25
    [    4.806381] no flags found for gpios
    [    4.829097] fpga_manager fpga0: writing CMPC30_DC71.rbf to altera-ps-spi spi0.2
    [    4.952495] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    5.004270] pcf857x 0-0021: probe error -121 for 'pcf8575'
    [    5.004761] pcf857x: probe of 0-0021 failed with error -121
    [    5.041692] gpiochip_find_base: found new base at 495
    [    5.043984] at24 0-0050: GPIO lookup for consumer wp
    [    5.043996] at24 0-0050: using device tree for GPIO lookup
    [    5.044063] of_get_named_gpiod_flags: parsed 'wp-gpios' property of node '/ocp/i2c@44e0b000/eeprom@50[0]' - status (0)
    [    5.044099] gpio gpiochip2: Persistence not supported for GPIO 26
    [    5.045339] gpio gpiochip5: (mcp23s17.0): added GPIO chardev (254:5)
    [    5.045552] gpiochip_setup_dev: registered GPIOs 495 to 510 on device: gpiochip5 (mcp23s17.0)
    [    5.061823] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
    [    5.069653] gpiochip_find_base: found new base at 479
    [    5.087657] gpio gpiochip6: (mcp23017): added GPIO chardev (254:6)
    [    5.087959] gpiochip_setup_dev: registered GPIOs 479 to 494 on device: gpiochip6 (mcp23017)
    [    5.106489] mcp230xx: probe of 0-0020 failed with error -121
    [    5.893912] ads7950 spi1.1: Linked as a consumer to regulator.1
    [    5.960839] CAN device driver interface
    [    6.007892] c_can_platform 481d0000.can: c_can_platform device registered (regs=93d32281, irq=34)
    [    6.331626] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [    6.398488] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [    6.465024] omap-aes 53500000.aes: will run requests pump with realtime priority
    [    6.501001] remoteproc remoteproc0: wkup_m3 is available
    [    6.541721] remoteproc remoteproc0: powering up wkup_m3
    [    6.574384] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 243436
    [    6.582729] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
    [    6.583215] remoteproc remoteproc0: remote processor wkup_m3 is now up
    [    6.655514] mdio_bus 4a332400.mdio: GPIO lookup for consumer reset
    [    6.655529] mdio_bus 4a332400.mdio: using device tree for GPIO lookup
    [    6.655594] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/ocp/pruss-soc-bus@4a326004/pruss@4a300000/mdio@4a332400[0]' - status (0)
    [    6.655625] gpio gpiochip2: Persistence not supported for GPIO 5
    [    6.655653] mdio_bus 4a332400.mdio: GPIO lookup for consumer reset
    [    6.655661] mdio_bus 4a332400.mdio: using device tree for GPIO lookup
    [    6.655698] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/ocp/pruss-soc-bus@4a326004/pruss@4a300000/mdio@4a332400[1]' - status (0)
    [    6.655792] gpio gpiochip1: Persistence not supported for GPIO 31
    [    6.655816] mdio_bus 4a332400.mdio: GPIO lookup for consumer reset
    [    6.655824] mdio_bus 4a332400.mdio: using device tree for GPIO lookup
    [    6.655853] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/pruss-soc-bus@4a326004/pruss@4a300000/mdio@4a332400[2]'
    [    6.655875] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/pruss-soc-bus@4a326004/pruss@4a300000/mdio@4a332400[2]'
    [    6.655887] mdio_bus 4a332400.mdio: using lookup tables for GPIO lookup
    [    6.655898] mdio_bus 4a332400.mdio: No GPIO consumer reset found
    [    6.708991] davinci_mdio 4a332400.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    6.709064] libphy: 4a332400.mdio: probed
    [    7.034580] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/pruss-soc-bus@4a326004/pruss@4a300000/mdio@4a332400/ethernet-phy@1[0]'
    [    7.425897] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/pruss-soc-bus@4a326004/pruss@4a300000/mdio@4a332400/ethernet-phy@2[0]'
    [    7.426452] davinci_mdio 4a332400.mdio: phy[1]: device 4a332400.mdio:01, driver TI TLK10X 10/100 Mbps PHY
    [    7.436232] davinci_mdio 4a332400.mdio: phy[2]: device 4a332400.mdio:02, driver TI TLK10X 10/100 Mbps PHY
    [    7.537277] remoteproc remoteproc1: 4a334000.pru is available
    [    7.584512] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully
    [    7.626891] remoteproc remoteproc2: 4a338000.pru is available
    [    7.661496] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully
    [    7.959695] prueth pruss_eth: pruss_fw_drop_untagged_vlan 0
    [    7.965335] prueth pruss_eth: pruss MC Mask (Port 0) ff:ff:ff:ff:ff:ff
    [    7.980575] prueth pruss_eth: pruss MC Mask (Port 1) ff:ff:ff:ff:ff:ff
    [    8.002355] prueth pruss_eth: TI PRU ethernet (type 0) driver initialized
    [   10.319039] i2c /dev entries driver
    [   10.435898] EXT4-fs (sda1): re-mounted. Opts: (null)
    [   11.378168] iep ptp bc clkid -1
    [   11.381679] remoteproc remoteproc1: powering up 4a334000.pru
    [   11.392150] remoteproc remoteproc1: Booting fw image ti-pruss/am335x-pru0-prueth-fw.elf, size 7796
    [   11.401445] pruss 4a300000.pruss: configured system_events[63-0] = 00000600,04500000
    [   11.409274] pruss 4a300000.pruss: configured intr_channels = 0x000000d5 host_intr = 0x00000155
    [   11.417939] remoteproc remoteproc1: remote processor 4a334000.pru is now up
    [   11.425433] net eth0: started
    [   11.428971] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [  167.914332] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (1 != 0)
    [  167.923601] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (2 != 0)
    [  167.936878] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (3 != 0)
    [  167.949734] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (4 != 0)
    [  167.962248] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (5 != 0)
    [  167.974692] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (6 != 0)
    [  167.986954] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (7 != 0)
    [  167.999729] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (8 != 0)
    [  168.012292] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (9 != 0)
    [  168.024798] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (10 != 0)
    [  168.037109] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (11 != 0)
    [  168.049897] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (12 != 0)
    [  168.062534] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (13 != 0)
    [  168.075061] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (14 != 0)
    [  168.087404] chan->address != TI_ADS7950_EXTRACT(ret, 12, 4) -> (15 != 0)

    Note, that last lines come from log added in ADS7950 kernel driver. They indicate, that driver reads data from different channel than expected.

  • Also note, that errors coming from MCP23xxx and PCF85xxx appear because that chips are not presents on board that I am using and are still defined in device tree.

    As a side note, I successfully launched on the same PCB TI DAC104S085 and it works fine in IIO.

  • Hello Kuba,

    Is there a reason you list two chip select pins?

    I am reassigning this to the ADC team to see if they notice anything out of the ordinary.

    Regards,

    Nick

  • First chip select is for another device which I removed from the above DT to make less information noise.

  • Hello Kuba,

    I just found that the ADC team already commented that they did not have expertise to look at Linux drivers in your previous post ADS7957: Unable to read channels via Linux IIO.

    I did not notice anything suspicious the first time I looked at your device tree, but it will be a couple of days before I can devote some time to taking a second look at this.

    Does your other SPI device work as expected?

    Regards,

    Nick

  • Hello Kuba,

    I took another look at the Linux driver you are using. Unfortunately, it was written by a member of the community instead of TI. So TI has never tested to see if that driver works properly. I cannot support debugging non-TI code on these forums :(

    Maybe the driver author would be able to comment on getting to a known good state? (see email at the bottom of the ti-ads7950.c driver).

    Regards,

    Nick

  • Thanks for the suggestion.

    Actually, I managed to make it work by changing the SPI clock to 1Mhz (very slow, but at least it is working).

    This suggests that maybe there is some hardware issue... I will have to investigate it on my own.

    Thanks for the help!