AD9652 with Petalinux - Driver not loading after successful SPI handshake

Hello,

I am trying to use the AD9652 evaluation board with the microzed SoM running Petalinux 2018.2. So far I've successfully built the OS image using the ADI kernel and the microzed performs the handshake with the AD9652 over SPI. However, I can't get the microzed to load the AXI devices after the spi handshake completes. There are no error messages in the kernel boot log other than this cryptic printout shortly after the SPI handshake occurs (the first line was added by me to the ad9467.c file in the kernel so that I could verify the SPI success.)

Successfully found AD9652 on SPI bus.
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20170425 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20170425)
can: broadcast manager protocol (rev 20170425 t)
can: netlink gateway (rev 20170425) max_hops=1
mmc0: new high speed SDHC card at address aaaa
mmcblk0: mmc0:aaaa SS16G 14.8 GiB
 mmcblk0: p1
Registering SWP/SWPB emulation handler
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o

|
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
 INVERT DCO 0x0 CLK 250000000 Hz

Looking through the ad9467.c kernel file, I see that the printout is somehow related to the DCO calibration but I can't really make sense of it. Also, I don't even know if this signifies an error of some kind or not because there are no other messages about this and the system boots successfully. However, I cannot load the drivers. They are present when I do the cat modules.builtin | grep adc command but I cannot load them with modprobe or insmod. Does this signify a device-tree problem of some kind?

Can someone please assist me with this issue?

Thank you,

svv9

Parents
  • Hello again,

    Could I please get some assistance with this? I believe I am very close to making this work.

    Thank you,

    svv9

  • 0
    •  Analog Employees 
    on May 4, 2020 8:06 AM 6 months ago in reply to svv9

    Hi,

    Can you share more about your devicetree? Which modules are you exactly trying to load? Did you already tried to build them as builtin modules and see if they probe?

    Looking at the logs and I cant find any issue obvious to me...

    - Nuno Sá

  • Hi,

    Thank you for getting back to me!

    My device-tree is just a regular microzed devicetree (created from scratch in petalinux-tools) with a custom clock added for the AD9652 and the "compatible" properties changed to the ADI strings for the ADI DMA and AD9652 logic cores. I also changed the SPI bus device's compatible string to match that in the driver.

    Here are the relevant parts of the device tree:

    SPI bus:

                ad9652@0 {
                    compatible = "adi,ad9652";
                    reg = <0x0>;
                    spi-max-frequency = <0xf4240>;
                    adi,spi-3wire-enable;
                    clocks = <0x16 0x0>;
                    clock-names = "adc_clk";
                    linux,phandle = <0x11>;
                    phandle = <0x11>;
                };

    PL section:

        amba_pl {
            #address-cells = <0x1>;
            #size-cells = <0x1>;
            compatible = "simple-bus";
            ranges;

            axi_dmac@43c00000 {
                compatible = "adi,axi-dmac-1.00.a";
                interrupt-names = "irq";
                interrupt-parent = <0x4>;
                interrupts = <0x0 0x1f 0x0>;
                reg = <0x43c00000 0x10000>;
                #dma-cells = <0x1>;
                clocks = <0x1 0x10>;
                linux,phandle = <0x10>;

                adi,channels {
                    #size-cells = <0x0>;
                    #address-cells = <0x1>;

                    dma-channel@0 {
                        reg = <0x0>;
                        adi,source-bus-width = <0x10>;
                        adi,source-bus-type = <0x2>;
                        adi,destination-bus-width = <0x40>;
                        adi,destination-bus-type = <0x0>;
                    };
                };
            };

            axi_ad9652@43c10000 {
                compatible = "xlnx,cf-ad9467-core-1.00.a";
                reg = <0x43c10000 0x10000>;
                dmas = <0x10 0x0>;
                dma-names = "rx";
                spibus-connected = <0x11>;
            };
        };

    Custom clock created for the AD9652:

        clocks {

            clock_1@0 {
                compatible = "fixed-clock";
                clock-frequency = <0xee6b280>;
                clock-output-names = "adc_clk";
                #clock-cells = <0x0>;
                linux,phandle = <0x16>;
                phandle = <0x16>;
            };
        };

    As for the modules, I enabled them in the kernel configuration in petalinux-tools. When I do the cat modules.builtin | adc command I get the following output:

    kernel/drivers/iio/adc/cf_axi_adc.ko
    kernel/drivers/iio/adc/ad9467.ko
    kernel/drivers/iio/adc/xilinx-xadc.ko

    So the modules have you been successfully installed, right? Now i just need to load them but I don't know how to do it and it's not happening automatically after the SPI handshake.

  • 0
    •  Analog Employees 
    on May 5, 2020 8:00 AM 6 months ago in reply to svv9

    Hi,

    There's nothing to load. If you are seeing the above messages, that means that the ad9467 and the cf_aci_adc drivers are probing. Now, they can be fail to probe. Do you see anything under /sys/bus/iio/devices?

    Can you share your entire boot log?

    - Nuno Sá

  • Hello,

    Here is the full bootlog:



    U-Boot 2018.01 (Apr 27 2020 - 11:24:30 -0400) Xilinx Zynq ZC702

    Board: Xilinx Zynq
    Silicon: v3.1
    DRAM:  ECC disabled 1 GiB
    MMC:   sdhci@e0100000: 0 (SD)
    SF: Detected s25fl128s_64k with page size 256 Bytes, erase size 64 KiB, total 16 MiB
    *** Warning - bad CRC, using default environment

    In:    serial@e0001000
    Out:   serial@e0001000
    Err:   serial@e0001000
    Board: Xilinx Zynq
    Silicon: v3.1
    Net:   ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
    eth0: ethernet@e000b000
    U-BOOT for mz7020_adi

    ethernet@e000b000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    Hit any key to stop autoboot:  4  3  2  1  0
    Device: sdhci@e0100000
    Manufacturer ID: 3
    OEM: 5344
    Name: SS16G
    Tran Speed: 50000000
    Rd Block Len: 512
    SD version 3.0
    High Capacity: Yes
    Capacity: 14.8 GiB
    Bus Width: 4-bit
    Erase Group Size: 512 Bytes
    reading image.ub
    10011752 bytes read in 842 ms (11.3 MiB/s)
    ## Loading kernel from FIT Image at 10000000 ...
       Using 'conf@system-top.dtb' configuration
       Verifying Hash Integrity ... OK
       Trying 'kernel@1' kernel subimage
         Description:  Linux kernel
         Type:         Kernel Image
         Compression:  gzip compressed
         Data Start:   0x100000f4
         Data Size:    3959259 Bytes = 3.8 MiB
         Architecture: ARM
         OS:           Linux
         Load Address: 0x00008000
         Entry Point:  0x00008000
         Hash algo:    sha1
         Hash value:   32beeb4a920934b5c4b213c7550264f98df6418f
       Verifying Hash Integrity ... sha1+ OK
    ## Loading ramdisk from FIT Image at 10000000 ...
       Using 'conf@system-top.dtb' configuration
       Trying 'ramdisk@1' ramdisk subimage
         Description:  petalinux-user-image
         Type:         RAMDisk Image
         Compression:  gzip compressed
         Data Start:   0x103c975c
         Data Size:    6039946 Bytes = 5.8 MiB
         Architecture: ARM
         OS:           Linux
         Load Address: unavailable
         Entry Point:  unavailable
         Hash algo:    sha1
         Hash value:   1224bb63c3cfcb60bc5f9c7e6686f6830b9c55e0
       Verifying Hash Integrity ... sha1+ OK
    ## Loading fdt from FIT Image at 10000000 ...
       Using 'conf@system-top.dtb' configuration
       Trying 'fdt@system-top.dtb' fdt subimage
         Description:  Flattened Device Tree blob
         Type:         Flat Device Tree
         Compression:  uncompressed
         Data Start:   0x103c6bd0
         Data Size:    10953 Bytes = 10.7 KiB
         Architecture: ARM
         Hash algo:    sha1
         Hash value:   61d3dc6316369999340fbc4ccbd1d94e88215b39
       Verifying Hash Integrity ... sha1+ OK
       Booting using the fdt blob at 0x103c6bd0
       Uncompressing Kernel Image ... OK
       Loading Ramdisk to 07a3d000, end 07fff98a ... OK
       reserving fdt memory region: addr=7a36000 size=3000
       reserving fdt memory region: addr=7a30000 size=3000
       reserving fdt memory region: addr=7a3d000 size=5c299a
       Loading Device Tree to 07a2a000, end 07a2fac8 ... OK

    Starting kernel ...

    Booting Linux on physical CPU 0x0
    Linux version 4.14.0-xilinx (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #1 SMP PREEMPT Mon Apr 27 11:34:26 EDT 2020
    CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
    CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    OF: fdt: Machine model: xlnx,zynq-7000
    bootconsole [earlycon0] enabled
    Memory policy: Data cache writealloc
    cma: Reserved 16 MiB at 0x3f000000
    percpu: Embedded 16 pages/cpu @ef7cd000 s34764 r8192 d22580 u65536
    Built 1 zonelists, mobility grouping on.  Total pages: 260608
    Kernel command line: console=ttyPS0,115200 earlyprintk
    PID hash table entries: 4096 (order: 2, 16384 bytes)
    Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    Memory: 1006956K/1048576K available (6144K kernel code, 239K rwdata, 1588K rodata, 1024K init, 153K bss, 25236K reserved, 16384K cma-reserved, 245760K highmem)
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
        vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
        lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
        pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
        modules : 0xbf000000 - 0xbfe00000   (  14 MB)
          .text : 0xc0008000 - 0xc0700000   (7136 kB)
          .init : 0xc0900000 - 0xc0a00000   (1024 kB)
          .data : 0xc0a00000 - 0xc0a3bd80   ( 240 kB)
           .bss : 0xc0a3bd80 - 0xc0a62484   ( 154 kB)
    Preemptible hierarchical RCU implementation.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
        Tasks RCU enabled.
    RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
    NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    efuse mapped to f0802000
    slcr mapped to f0804000
    L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
    L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
    L2C-310 erratum 769419 enabled
    L2C-310 enabling early BRESP for Cortex-A9
    L2C-310 full line of zeros enabled for Cortex-A9
    L2C-310 ID prefetch enabled, offset 1 lines
    L2C-310 dynamic clock gating enabled, standby mode enabled
    L2C-310 cache controller enabled, 8 ways, 512 kB
    L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
    zynq_clock_init: clkc starts at f0804100
    Zynq clock init
    sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
    clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
    Switching to timer-based delay loop, resolution 3ns
    clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
    timer #0 at f080c000, irq=17
    Console: colour dummy device 80x30
    Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    CPU: Testing write buffer coherency: ok
    CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    Setting up static identity map for 0x100000 - 0x100060
    Hierarchical SRCU implementation.
    smp: Bringing up secondary CPUs ...
    CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    smp: Brought up 1 node, 2 CPUs
    SMP: Total of 2 processors activated (1333.33 BogoMIPS).
    CPU: All CPU(s) started in SVC mode.
    devtmpfs: initialized
    random: get_random_u32 called from bucket_table_alloc+0x1c4/0x204 with crng_init=0
    VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
    clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    futex hash table entries: 512 (order: 3, 32768 bytes)
    pinctrl core: initialized pinctrl subsystem
    random: fast init done
    NET: Registered protocol family 16
    DMA: preallocated 256 KiB pool for atomic coherent allocations
    cpuidle: using governor menu
    hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
    hw-breakpoint: maximum watchpoint size is 4 bytes.
    zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0xf0880000
    zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
    e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 25, base_baud = 3125000) is a xuartps
    `¬Ëk½±[ttyPS0] enabled
    console [ttyPS0] enabled
    bootconsole [earlycon0] disabled
    bootconsole [earlycon0] disabled
    vgaarb: loaded
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    media: Linux media interface: v0.10
    Linux video capture interface: v2.00
    pps_core: LinuxPPS API ver. 1 registered
    pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    PTP clock support registered
    EDAC MC: Ver: 3.0.0
    FPGA manager framework
    fpga-region fpga-full: FPGA Region probed
    Advanced Linux Sound Architecture Driver Initialized.
    clocksource: Switched to clocksource arm_global_timer
    NET: Registered protocol family 2
    TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
    TCP: Hash tables configured (established 8192 bind 8192)
    UDP hash table entries: 512 (order: 2, 16384 bytes)
    UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    NET: Registered protocol family 1
    RPC: Registered named UNIX socket transport module.
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    Trying to unpack rootfs image as initramfs...
    Freeing initrd memory: 5900K
    hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
    hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
    workingset: timestamp_bits=30 max_order=18 bucket_order=0
    jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
    bounce: pool size: 64 pages
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    io scheduler mq-deadline registered
    io scheduler kyber registered
    dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
    dma-pl330 f8003000.dmac:     DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
    brd: module loaded
    loop: module loaded
    m25p80 spi0.0: found s25fl128s, expected n25q512a
    m25p80 spi0.0: s25fl128s (16384 Kbytes)
    4 ofpart partitions found on MTD device spi0.0
    Creating 4 MTD partitions on "spi0.0":
    0x000000000000-0x000000500000 : "boot"
    0x000000500000-0x000000520000 : "bootenv"
    0x000000520000-0x000000fa0000 : "kernel"
    0x000000fa0000-0x000001000000 : "spare"
    libphy: Fixed MDIO Bus: probed
    CAN device driver interface
    libphy: MACB_mii_bus: probed
    macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 29 (00:0a:35:00:1e:53)
    Marvell 88E1510 e000b000.ethernet-ffffffff:00: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=e000b000.ethernet-ffffffff:00, irq=POLL)
    e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
    e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
    ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    ehci-pci: EHCI PCI platform driver
    usbcore: registered new interface driver usb-storage
    chipidea-usb2 e0002000.usb: e0002000.usb supply vbus not found, using dummy regulator
    ci_hdrc ci_hdrc.0: unable to init phy: -110
    ci_hdrc: probe of ci_hdrc.0 failed with error -110
    i2c /dev entries driver
    IR NEC protocol handler initialized
    IR RC5(x/sz) protocol handler initialized
    IR RC6 protocol handler initialized
    IR JVC protocol handler initialized
    IR Sony protocol handler initialized
    IR SANYO protocol handler initialized
    IR Sharp protocol handler initialized
    IR MCE Keyboard/mouse protocol handler initialized
    IR XMP protocol handler initialized
    cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at f098c000 with timeout 10s
    EDAC MC: ECC not enabled
    Xilinx Zynq CpuIdle Driver started
    sdhci: Secure Digital Host Controller Interface driver
    sdhci: Copyright(c) Pierre Ossman
    sdhci-pltfm: SDHCI platform and OF driver helper
    mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
    ledtrig-cpu: registered to indicate activity on CPUs
    usbcore: registered new interface driver usbhid
    usbhid: USB HID core driver
    Successfully found AD9652 on SPI bus.
    fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
    NET: Registered protocol family 10
    Segment Routing with IPv6
    sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    NET: Registered protocol family 17
    can: controller area network core (rev 20170425 abi 9)
    NET: Registered protocol family 29
    can: raw protocol (rev 20170425)
    can: broadcast manager protocol (rev 20170425 t)
    can: netlink gateway (rev 20170425) max_hops=1
    Registering SWP/SWPB emulation handler
    mmc0: new high speed SDHC card at address aaaa
    mmcblk0: mmc0:aaaa SS16G 14.8 GiB
     mmcblk0: p1
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o

    |
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
     INVERT DCO 0x0 CLK 250000000 Hz
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o

    |
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
     INVERT DCO 0x0 CLK 250000000 Hz
    hctosys: unable to open rtc device (rtc0)
    of_cfs_init
    of_cfs_init: OK
    ALSA device list:
      No soundcards found.
    Freeing unused kernel memory: 1024K
    INIT: version 2.88 booting
    Starting udev
    udevd[751]: starting version 3.2.2
    udevd[752]: starting eudev-3.2.2
    FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    Mon Apr 27 15:36:15 UTC 2020
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    Starting internet superserver: inetd.
    Configuring packages on first boot....
     (This may take several minutes. Please do not power off the machine.)
    Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
    update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
     Removing any system startup links for run-postinsts ...
      /etc/rcS.d/S99run-postinsts
    INIT: Entering runlevel: 5
    Configuring network interfaces... IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    udhcpc (v1.24.1) started
    Sending discover...
    Sending discover...
    Sending discover...
    No lease, forking to background
    done.
    Starting Dropbear SSH server: Generating key, this may take a while...
    Public key portion is:
    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3vmivyGwKaq6uuyK1kjwVSumYdZOVEIGH7J5kdABOBIt+2vE0lmRQ/6AhAIVrgKVwhyCq9by0eKul1drFYFbmew7VUNGmoF1vDXI+aZnGs/9d6M2PgxO3cH83T4xi9FGZx7gXEwLfqj2z5MJqiaNUJ2pckE2EPYLL+pC+VUDDmO3JLIWTczDQaAfyxKjVxvobTegVaOo4jgaFuDEeFce20wCPvUmxxrjTt2hYuJES4S6WVSGYG3nYjx5laJOH41lUO/AkjuP0Wec1DWUoyj4TXIrV8JVI6H9e0g9WfJlzea6AJ0KOjxURO81mIRdSxPe329sTqs1Hw0aBBoLuGC6h root@mz7020_adi
    Fingerprint: md5 11:1c:07:b7:0c:24:b7:a3:70:e1:bd:f4:2b:ad:a9:33
    dropbear.
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    Starting syslogd/klogd: done
    Starting tcf-agent: OK

    PetaLinux 2018.2 mz7020_adi /dev/ttyPS0

    mz7020_adi login:

    -----

    In sys/bus/iio/devices, I only have the following:

    iio:device0       iio_sysfs_trigger

    Thank you,

    svv9

Reply
  • Hello,

    Here is the full bootlog:



    U-Boot 2018.01 (Apr 27 2020 - 11:24:30 -0400) Xilinx Zynq ZC702

    Board: Xilinx Zynq
    Silicon: v3.1
    DRAM:  ECC disabled 1 GiB
    MMC:   sdhci@e0100000: 0 (SD)
    SF: Detected s25fl128s_64k with page size 256 Bytes, erase size 64 KiB, total 16 MiB
    *** Warning - bad CRC, using default environment

    In:    serial@e0001000
    Out:   serial@e0001000
    Err:   serial@e0001000
    Board: Xilinx Zynq
    Silicon: v3.1
    Net:   ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
    eth0: ethernet@e000b000
    U-BOOT for mz7020_adi

    ethernet@e000b000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    Hit any key to stop autoboot:  4  3  2  1  0
    Device: sdhci@e0100000
    Manufacturer ID: 3
    OEM: 5344
    Name: SS16G
    Tran Speed: 50000000
    Rd Block Len: 512
    SD version 3.0
    High Capacity: Yes
    Capacity: 14.8 GiB
    Bus Width: 4-bit
    Erase Group Size: 512 Bytes
    reading image.ub
    10011752 bytes read in 842 ms (11.3 MiB/s)
    ## Loading kernel from FIT Image at 10000000 ...
       Using 'conf@system-top.dtb' configuration
       Verifying Hash Integrity ... OK
       Trying 'kernel@1' kernel subimage
         Description:  Linux kernel
         Type:         Kernel Image
         Compression:  gzip compressed
         Data Start:   0x100000f4
         Data Size:    3959259 Bytes = 3.8 MiB
         Architecture: ARM
         OS:           Linux
         Load Address: 0x00008000
         Entry Point:  0x00008000
         Hash algo:    sha1
         Hash value:   32beeb4a920934b5c4b213c7550264f98df6418f
       Verifying Hash Integrity ... sha1+ OK
    ## Loading ramdisk from FIT Image at 10000000 ...
       Using 'conf@system-top.dtb' configuration
       Trying 'ramdisk@1' ramdisk subimage
         Description:  petalinux-user-image
         Type:         RAMDisk Image
         Compression:  gzip compressed
         Data Start:   0x103c975c
         Data Size:    6039946 Bytes = 5.8 MiB
         Architecture: ARM
         OS:           Linux
         Load Address: unavailable
         Entry Point:  unavailable
         Hash algo:    sha1
         Hash value:   1224bb63c3cfcb60bc5f9c7e6686f6830b9c55e0
       Verifying Hash Integrity ... sha1+ OK
    ## Loading fdt from FIT Image at 10000000 ...
       Using 'conf@system-top.dtb' configuration
       Trying 'fdt@system-top.dtb' fdt subimage
         Description:  Flattened Device Tree blob
         Type:         Flat Device Tree
         Compression:  uncompressed
         Data Start:   0x103c6bd0
         Data Size:    10953 Bytes = 10.7 KiB
         Architecture: ARM
         Hash algo:    sha1
         Hash value:   61d3dc6316369999340fbc4ccbd1d94e88215b39
       Verifying Hash Integrity ... sha1+ OK
       Booting using the fdt blob at 0x103c6bd0
       Uncompressing Kernel Image ... OK
       Loading Ramdisk to 07a3d000, end 07fff98a ... OK
       reserving fdt memory region: addr=7a36000 size=3000
       reserving fdt memory region: addr=7a30000 size=3000
       reserving fdt memory region: addr=7a3d000 size=5c299a
       Loading Device Tree to 07a2a000, end 07a2fac8 ... OK

    Starting kernel ...

    Booting Linux on physical CPU 0x0
    Linux version 4.14.0-xilinx (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #1 SMP PREEMPT Mon Apr 27 11:34:26 EDT 2020
    CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
    CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    OF: fdt: Machine model: xlnx,zynq-7000
    bootconsole [earlycon0] enabled
    Memory policy: Data cache writealloc
    cma: Reserved 16 MiB at 0x3f000000
    percpu: Embedded 16 pages/cpu @ef7cd000 s34764 r8192 d22580 u65536
    Built 1 zonelists, mobility grouping on.  Total pages: 260608
    Kernel command line: console=ttyPS0,115200 earlyprintk
    PID hash table entries: 4096 (order: 2, 16384 bytes)
    Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    Memory: 1006956K/1048576K available (6144K kernel code, 239K rwdata, 1588K rodata, 1024K init, 153K bss, 25236K reserved, 16384K cma-reserved, 245760K highmem)
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
        vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
        lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
        pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
        modules : 0xbf000000 - 0xbfe00000   (  14 MB)
          .text : 0xc0008000 - 0xc0700000   (7136 kB)
          .init : 0xc0900000 - 0xc0a00000   (1024 kB)
          .data : 0xc0a00000 - 0xc0a3bd80   ( 240 kB)
           .bss : 0xc0a3bd80 - 0xc0a62484   ( 154 kB)
    Preemptible hierarchical RCU implementation.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
        Tasks RCU enabled.
    RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
    NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    efuse mapped to f0802000
    slcr mapped to f0804000
    L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
    L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
    L2C-310 erratum 769419 enabled
    L2C-310 enabling early BRESP for Cortex-A9
    L2C-310 full line of zeros enabled for Cortex-A9
    L2C-310 ID prefetch enabled, offset 1 lines
    L2C-310 dynamic clock gating enabled, standby mode enabled
    L2C-310 cache controller enabled, 8 ways, 512 kB
    L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
    zynq_clock_init: clkc starts at f0804100
    Zynq clock init
    sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
    clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
    Switching to timer-based delay loop, resolution 3ns
    clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
    timer #0 at f080c000, irq=17
    Console: colour dummy device 80x30
    Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    CPU: Testing write buffer coherency: ok
    CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    Setting up static identity map for 0x100000 - 0x100060
    Hierarchical SRCU implementation.
    smp: Bringing up secondary CPUs ...
    CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    smp: Brought up 1 node, 2 CPUs
    SMP: Total of 2 processors activated (1333.33 BogoMIPS).
    CPU: All CPU(s) started in SVC mode.
    devtmpfs: initialized
    random: get_random_u32 called from bucket_table_alloc+0x1c4/0x204 with crng_init=0
    VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
    clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    futex hash table entries: 512 (order: 3, 32768 bytes)
    pinctrl core: initialized pinctrl subsystem
    random: fast init done
    NET: Registered protocol family 16
    DMA: preallocated 256 KiB pool for atomic coherent allocations
    cpuidle: using governor menu
    hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
    hw-breakpoint: maximum watchpoint size is 4 bytes.
    zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0xf0880000
    zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
    e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 25, base_baud = 3125000) is a xuartps
    `¬Ëk½±[ttyPS0] enabled
    console [ttyPS0] enabled
    bootconsole [earlycon0] disabled
    bootconsole [earlycon0] disabled
    vgaarb: loaded
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    media: Linux media interface: v0.10
    Linux video capture interface: v2.00
    pps_core: LinuxPPS API ver. 1 registered
    pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    PTP clock support registered
    EDAC MC: Ver: 3.0.0
    FPGA manager framework
    fpga-region fpga-full: FPGA Region probed
    Advanced Linux Sound Architecture Driver Initialized.
    clocksource: Switched to clocksource arm_global_timer
    NET: Registered protocol family 2
    TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
    TCP: Hash tables configured (established 8192 bind 8192)
    UDP hash table entries: 512 (order: 2, 16384 bytes)
    UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    NET: Registered protocol family 1
    RPC: Registered named UNIX socket transport module.
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    Trying to unpack rootfs image as initramfs...
    Freeing initrd memory: 5900K
    hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
    hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
    workingset: timestamp_bits=30 max_order=18 bucket_order=0
    jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
    bounce: pool size: 64 pages
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    io scheduler mq-deadline registered
    io scheduler kyber registered
    dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
    dma-pl330 f8003000.dmac:     DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
    brd: module loaded
    loop: module loaded
    m25p80 spi0.0: found s25fl128s, expected n25q512a
    m25p80 spi0.0: s25fl128s (16384 Kbytes)
    4 ofpart partitions found on MTD device spi0.0
    Creating 4 MTD partitions on "spi0.0":
    0x000000000000-0x000000500000 : "boot"
    0x000000500000-0x000000520000 : "bootenv"
    0x000000520000-0x000000fa0000 : "kernel"
    0x000000fa0000-0x000001000000 : "spare"
    libphy: Fixed MDIO Bus: probed
    CAN device driver interface
    libphy: MACB_mii_bus: probed
    macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 29 (00:0a:35:00:1e:53)
    Marvell 88E1510 e000b000.ethernet-ffffffff:00: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=e000b000.ethernet-ffffffff:00, irq=POLL)
    e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
    e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
    ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    ehci-pci: EHCI PCI platform driver
    usbcore: registered new interface driver usb-storage
    chipidea-usb2 e0002000.usb: e0002000.usb supply vbus not found, using dummy regulator
    ci_hdrc ci_hdrc.0: unable to init phy: -110
    ci_hdrc: probe of ci_hdrc.0 failed with error -110
    i2c /dev entries driver
    IR NEC protocol handler initialized
    IR RC5(x/sz) protocol handler initialized
    IR RC6 protocol handler initialized
    IR JVC protocol handler initialized
    IR Sony protocol handler initialized
    IR SANYO protocol handler initialized
    IR Sharp protocol handler initialized
    IR MCE Keyboard/mouse protocol handler initialized
    IR XMP protocol handler initialized
    cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at f098c000 with timeout 10s
    EDAC MC: ECC not enabled
    Xilinx Zynq CpuIdle Driver started
    sdhci: Secure Digital Host Controller Interface driver
    sdhci: Copyright(c) Pierre Ossman
    sdhci-pltfm: SDHCI platform and OF driver helper
    mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
    ledtrig-cpu: registered to indicate activity on CPUs
    usbcore: registered new interface driver usbhid
    usbhid: USB HID core driver
    Successfully found AD9652 on SPI bus.
    fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
    NET: Registered protocol family 10
    Segment Routing with IPv6
    sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    NET: Registered protocol family 17
    can: controller area network core (rev 20170425 abi 9)
    NET: Registered protocol family 29
    can: raw protocol (rev 20170425)
    can: broadcast manager protocol (rev 20170425 t)
    can: netlink gateway (rev 20170425) max_hops=1
    Registering SWP/SWPB emulation handler
    mmc0: new high speed SDHC card at address aaaa
    mmcblk0: mmc0:aaaa SS16G 14.8 GiB
     mmcblk0: p1
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o

    |
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
     INVERT DCO 0x0 CLK 250000000 Hz
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o

    |
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
    o
     INVERT DCO 0x0 CLK 250000000 Hz
    hctosys: unable to open rtc device (rtc0)
    of_cfs_init
    of_cfs_init: OK
    ALSA device list:
      No soundcards found.
    Freeing unused kernel memory: 1024K
    INIT: version 2.88 booting
    Starting udev
    udevd[751]: starting version 3.2.2
    udevd[752]: starting eudev-3.2.2
    FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    Mon Apr 27 15:36:15 UTC 2020
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    Starting internet superserver: inetd.
    Configuring packages on first boot....
     (This may take several minutes. Please do not power off the machine.)
    Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
    update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
     Removing any system startup links for run-postinsts ...
      /etc/rcS.d/S99run-postinsts
    INIT: Entering runlevel: 5
    Configuring network interfaces... IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    udhcpc (v1.24.1) started
    Sending discover...
    Sending discover...
    Sending discover...
    No lease, forking to background
    done.
    Starting Dropbear SSH server: Generating key, this may take a while...
    Public key portion is:
    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3vmivyGwKaq6uuyK1kjwVSumYdZOVEIGH7J5kdABOBIt+2vE0lmRQ/6AhAIVrgKVwhyCq9by0eKul1drFYFbmew7VUNGmoF1vDXI+aZnGs/9d6M2PgxO3cH83T4xi9FGZx7gXEwLfqj2z5MJqiaNUJ2pckE2EPYLL+pC+VUDDmO3JLIWTczDQaAfyxKjVxvobTegVaOo4jgaFuDEeFce20wCPvUmxxrjTt2hYuJES4S6WVSGYG3nYjx5laJOH41lUO/AkjuP0Wec1DWUoyj4TXIrV8JVI6H9e0g9WfJlzea6AJ0KOjxURO81mIRdSxPe329sTqs1Hw0aBBoLuGC6h root@mz7020_adi
    Fingerprint: md5 11:1c:07:b7:0c:24:b7:a3:70:e1:bd:f4:2b:ad:a9:33
    dropbear.
    hwclock: can't open '/dev/misc/rtc': No such file or directory
    Starting syslogd/klogd: done
    Starting tcf-agent: OK

    PetaLinux 2018.2 mz7020_adi /dev/ttyPS0

    mz7020_adi login:

    -----

    In sys/bus/iio/devices, I only have the following:

    iio:device0       iio_sysfs_trigger

    Thank you,

    svv9

Children
  • 0
    •  Analog Employees 
    on May 22, 2020 8:36 AM 6 months ago in reply to svv9

    Hi,

    It looks like your probing is failing, more precisely the post setup function. At this point Im not sure what might the problem since I never really used that part and I don't the HW to investigate further. However, maybe give a look at zynq-zc706-adv7511-fmcomms6.dts since it's also using that part. It seems a different compatible string is being used for the axi core (though I don't think that's the problem). Also, setting 'adi,spi-3wire-enable;' seems irrelevant to me since the driver is not looking at AFAICT. One other thing that I remembered, which kernel branch are you using? I'm assuming the 2018_R2?

    - Nuno Sá

  • Hi Nuno,

    Yes, I am using the 2018_R2 branch. That is also the version of my petalinux tools and Vivado.

  • Thanks for the pointer. Where can I find more information about this post setup function? Is it located in the ad9467.c file as well?

    EDIT: I managed to trace through the cf_axi_adc_core.c file and am discovering the fact that, in the axiadc_probe function in cf_axi_adc_core.c, the following conditional statement evaluates to true (the printk's are added by me for tracing):

        if (!st->dp_disable && !axiadc_read(st, ADI_REG_ID) &&
            of_find_property(pdev->dev.of_node, "dmas", NULL)) {
            
            //Debug here
            printk("Error condition.");
            ret = axiadc_configure_ring_stream(indio_dev, NULL);
            printk("ret = %d", ret);
            if (ret < 0)
                goto err_put_converter;
        }

    The value of ret comes out to be -517 when printed with the %d flag. This is an error code returned by the axiadc_configure_ring_stream function in cf_axi_adc_ring_stream.c, more specifically the PTR_ERR function.

    What does -517 returned from PTR_ERR mean?

  • +1
    •  Analog Employees 
    on May 28, 2020 10:18 AM 5 months ago in reply to svv9

    Hi,

    -517 means EPROBE_DEFER which tells you that your resource is still not available (in this case, the DMA channel). Most likely, the DMA driver is still not probed at this point. So, this is not necessarily your issue if you see your prints again afterwards with ret = 0? If you don't, then you may have some issue in your devicetree related with the dma configuration... It might be happening that the dma driver is failing to probe your dma device leading to this.

    - Nuno Sá

  • Hi Nuno,

    Thank you for the pointer to the dma. I looked in the dma-axi-dmac.c driver file and realized that the probe function was not being called. So, I looked again through the kernel configuration and realized that I did not have the Analog Devices AXI-DMAC DMA support enabled in the kernel configuration. After enabling this I am able to get the message in the boot log:

    cf_axi_adc 43c10000.axi_ad9652: ADI AIM (9.00.b) at 0x43C10000 mapped to 0xf09b0000, probed ADC AD9652 as MASTER

    And can see the IIO device in the /sys/bus/iio/devices folder.

    Thank you for your help! I think the issue's been solved.

    -svv9