Post Go back to editing

Unable to detect axi-core-tdd iio device

Category: Software

Hello,

Greeting!

I build the BOOT.BIN from the newest hdl_2022_r2. I try two projects: one is hdl/projects/ad9081_fmca_ebz_x_band/zcu102/; the other is projects/ad9081_fmca_ebz/zcu102. When I use ZCU102 and AD9081 to test firmware, the axi-core-tdd device cannot be detected. 

The result of "iio_attr -d" of project ad9081_fmca_ebz_x_band is as follows:

root@analog:~# iio_attr -d
IIO context has 39 devices:
        hwmon0, ina226: found 2 device attributes
        hwmon1, ina226: found 2 device attributes
        hwmon10, ina226: found 2 device attributes
        hwmon11, ina226: found 2 device attributes
        hwmon12, ina226: found 2 device attributes
        hwmon13, ina226: found 2 device attributes
        hwmon14, ina226: found 2 device attributes
        hwmon15, ina226: found 2 device attributes
        hwmon16, ina226: found 2 device attributes
        hwmon17, ina226: found 2 device attributes
        hwmon18, max20751: found 0 device attributes
        hwmon19, max20751: found 0 device attributes
        hwmon2, ina226: found 2 device attributes
        hwmon20, ltc2992: found 0 device attributes
        hwmon3, ina226: found 2 device attributes
        hwmon4, ina226: found 2 device attributes
        hwmon5, ina226: found 2 device attributes
        hwmon6, ina226: found 2 device attributes
        hwmon7, ina226: found 2 device attributes
        hwmon8, ina226: found 2 device attributes
        hwmon9, ina226: found 2 device attributes
        iio:device0, ltc2314-14: found 1 device attributes
        iio:device1, ams: found 1 device attributes
        iio:device18, adf4371-0: found 2 device attributes
        iio:device19, hmc7044: found 7 device attributes
        iio:device2, adar1000_csb_1_1: found 39 device attributes
        iio:device20, stingray_control: found 0 device attributes
        iio:device21, xud_control: found 0 device attributes
        iio:device22, imu_control: found 0 device attributes
        iio:device23, axi-ad9081-rx-hpc: found 13 device attributes
        iio:device24, axi-ad9081-tx-hpc: found 2 device attributes
        iio:device3, adar1000_csb_1_2: found 39 device attributes
        iio:device4, adar1000_csb_1_3: found 39 device attributes
        iio:device5, adar1000_csb_1_4: found 39 device attributes
        iio:device6, adar1000_csb_2_1: found 39 device attributes
        iio:device7, adar1000_csb_2_2: found 39 device attributes
        iio:device8, adar1000_csb_2_3: found 39 device attributes
        iio:device9, adar1000_csb_2_4: found 39 device attributes
        iio_sysfs_trigger: found 2 device attributes

The result of "iio_attr -d" of project ad9081_fmca_ebz is as follows:

root@analog:~# iio_attr -d
IIO context has 25 devices:
        hwmon0, ina226-u76: found 2 device attributes
        hwmon1, ina226-u77: found 2 device attributes
        hwmon10, ina226-u79: found 2 device attributes
        hwmon11, ina226-u81: found 2 device attributes
        hwmon12, ina226-u80: found 2 device attributes
        hwmon13, ina226-u84: found 2 device attributes
        hwmon14, ina226-u16: found 2 device attributes
        hwmon15, ina226-u65: found 2 device attributes
        hwmon16, ina226-u74: found 2 device attributes
        hwmon17, ina226-u75: found 2 device attributes
        hwmon18, max20751: found 0 device attributes
        hwmon19, max20751: found 0 device attributes
        hwmon2, ina226-u78: found 2 device attributes
        hwmon3, ina226-u87: found 2 device attributes
        hwmon4, ina226-u85: found 2 device attributes
        hwmon5, ina226-u86: found 2 device attributes
        hwmon6, ina226-u93: found 2 device attributes
        hwmon7, ina226-u88: found 2 device attributes
        hwmon8, ina226-u15: found 2 device attributes
        hwmon9, ina226-u92: found 2 device attributes
        iio:device0, xilinx-ams: found 1 device attributes
        iio:device1, hmc7044: found 8 device attributes
        iio:device2, axi-ad9081-rx-hpc: found 14 device attributes
        iio:device3, axi-ad9081-tx-hpc: found 3 device attributes
        iio_sysfs_trigger: found 2 device attributes

Do you have any idea about this problem?

Thanks,

Dongyu

Parents Reply
  • HI Ramona,

    I use your command and there is still the same error. I also try to re-build the Image and Devicetree following the instruction here. The Image can be built successfully but for the devicetree, the same error still occurs. Do you have any idea about this? Actually, I when I first run this command, there are so many options. I use the default choice for the most options. After that, this error occurs.

    Best,

    Dongyu 

Children
  • Hi Ramona,

    I figure out the make error. And I change the tdd name in the devicetree "zynqmp-zcu102-rev10-ad9081-m8-l4-tdd.dts"  as follows:

    // SPDX-License-Identifier: GPL-2.0
    /*
     * Analog Devices AD9081-FMC-EBZ
     * https://wiki.analog.com/resources/eval/user-guides/quadmxfe/quick-start
     * https://wiki.analog.com/resources/tools-software/linux-drivers/iio-mxfe/ad9081
     *
     * hdl_project: <ad9081_fmca_ebz/zcu102>
     * board_revision: <>
     *
     * Copyright (C) 2021 Analog Devices Inc.
     */
    
    #include "zynqmp-zcu102-rev10-ad9081-m8-l4-do.dts"
    
    &axi_data_offload_tx {
    	adi,oneshot;
    	adi,sync-config = <1>;
    };
    
    &axi_data_offload_rx {
    	adi,oneshot;
    	adi,sync-config = <1>;
    };
    
    &fpga_axi {
    	axi_tdd_0: axi-tdd-0@9c460000 {
    		compatible = "adi,axi-tdd";
    		reg = <0x9c460000 0x10000>;
    		clocks = <&zynqmp_clk PL0_REF>, <&hmc7044 6>;
    		clock-names = "s_axi_aclk", "intf_clk";
    	};
    };
    
    &axi_ad9081_core_tx {
    	adi,axi-pl-fifo-enable;
    };

    Then I rebuilt the Image and devicetree, but I still cannot detect the adi-tdd device using "iio_attr -d". Do you have any idea about this?
    Best,

    Dongyu

  • Hello,

    My colleague tested out the devicetree and we figured out why you couldn't see the device with iio_attr. Previously, the tdd driver was an iio driver but after the last update it was moved in misc, and in order to have the device show up in iio you also need to add it as a iio-fake-platform-device. She created a branch with the necessary modifications for your dts, and we tested it out and the device shows up and the attributed can be read/written.

    If you build the dtb from this branch: https://github.com/analogdevicesinc/linux/blob/staging/fix-tdd-dts/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-rev10-ad9081-m8-l4-tdd.dts#L33 , you should also have the device available. Please let us know if you run into any other issues.

    Thank you,
    Ramona

  • Hi Ramona,

    Thanks for your reply! I have tried this devicetree with Image 2022_R2, HDL generated from hdl_2022_R2. And my hardware include a zcu102 and ad9081. But I still cannot detect the tdd device. Could you send me your system, Image and BOOT.bin files? I wondering if my image and hdl are wrong.

    Besides, I noticed that there is the address of your new created device "iio_axu_tdd_0" is 0, is this correct?

    Thanks,

    Dongyu

  • Hello Dongyu,

    Just to check, after you built your devicetree from the branch, did you rename it to "system.dtb" when moving it to the boot partition of the board? If the devicetree is not name "system.dtb" it will not be loaded. We tried with 2 different build versions of the devicetree and the attributes of tdd can be accessed on our end. Moreover, please make sure you export the architecture and the cross-compiler, and that you also make de configuration adi_zynqmp_defconfig, before each build. Here is an example:

    export ARCH=arm64
    export CROSS_COMPILE=/opt/Xilinx/Vitis/2022.2/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-
    make adi_zynqmp_defconfig
    make xilinzynqmp-zcu102-rev10-ad9081-m8-l4-tdd.dtb


    Regarding the address, the "@0" of the iio_axi_tdd_0 is not the address, just a label for the fake-iio device.

    Unfortunately, I cannot attach files on EngineerZone, but if it still doesn't work for you, you can leave your email address here and I will send you the bootfiles on email.

    Best Regards,
    Ramona

  • Hi Ramona,

    Yeah, my pipeline is the same with what you said. I think maybe my image and boot.bin have something wrong. My email is dd7477@princeton.edu. Could you send these files to me? Thanks so much!

    Thanks,

    Dongyu