AD9121-M5372-EBZ based on AD-FMCOMMS1-EBZ

Hello,

I’m using the AD9121-M5372-EBZ evaluation board connected by FMC with a ZedBoard. By using these instructions:

  1. https://wiki.analog.com/resources/fpga/docs/build#folded_1
  2. https://wiki.analog.com/resources/eval/user-guides/ad-fmcomms1-ebz/software/linux/zynq
  3. https://wiki.analog.com/resources/tools-software/linux-drivers/iio-dds/axi-dac-dds-hdl

I try to launch LINUX – DAC working system without any success. First of all I modify HDL reference design by deleting the ADC IP blocks from block design and change pinout on FMC Connector. Then I have modified and generated the device tree file but unfortunately no communication has been established between the ARM and DAC (but the HDMI working perfectly). So I made some mistake, but I have no idea where. The differences between both evaluation boards (AD9121 and FMCOMMS1) are mainly in connection number in FMC connector. I only want to send data samples from Linux to 9121.

My board don’t have IIC connection whatsoever with AD9121. I also don’t see the my device on the list in /sys/bus/iio/devices .

After launching the Linux there are two alarming messages:

  1. UART:

spi_master spi32765: failed to transfer one message from queue

iio iio:device1: write failed (-5)

 mmcblk0: p1 p2

ad9523: probe of spi32765.3 failed with error -5

spi_master spi32765: failed to transfer one message from queue

ad9548: probe of spi32765.2 failed with error -5

spi_master spi32765: failed to transfer one message from queue

ad9122: probe of spi32765.0 failed with error -5

  1. HDMI Monitor:

Modprobe: FATAL: Could not load /lib/modules/4.6.0-ga8f23b8/modules.dep: No such file or directory

I have been researching and working on it from a long time, and I’ve exhausted all my ideas how to make this connection working.  Can anyone help me? Is someone working on this “changes” in reference design with a success?

 

Thank you in advance.

  • 0
    •  Analog Employees 
    on Jan 10, 2018 2:22 PM

    FMCOMMS1 used to use a AD9122 not the AD9121.

    Also this board doesn't have AD9523, AD9548 clock chips, it uses the AD9516.

    Why is it still probing them?

    Error: -5 is EIO (I/O error) which means the drivers can't talk to the HW.

    How did you connect the SPI to FPGA?

    Without knowing your connections, FPGA design and device tree we can't really provide you more help.

    -Michael 

  • 0
    •  Analog Employees 
    on Jan 11, 2018 7:53 AM

    You notice the spibus-connected property in the cf_ad9122_core_0 node?

    In this configuration the AXI-DAC driver requires the AD9122 SPI control driver to be instantiated before the AXI-DAC driver will probe. In your case the AD9122 SPI control driver can't instantiate simply because the infrasucture for that is missing.

    There are ways to use the AXI-DAC driver in standalone mode.

    You need to create a new compatible - and then provide struct axidds_core_info with the standalone member being true. Please see here:

    https://github.com/analogdevicesinc/linux/blob/xcomm_zynq/drivers/iio/frequency/cf_axi_dds.c#L1221

    https://github.com/analogdevicesinc/linux/blob/xcomm_zynq/drivers/iio/frequency/cf_axi_dds.c#L1171

    You also need a clock - can be a fixed rate dummy clock - otherwise the driver won't probe either:

    https://github.com/analogdevicesinc/linux/blob/xcomm_zynq/drivers/iio/frequency/cf_axi_dds.c#L1273

    -Michael

  • 0
    •  Analog Employees 
    on Jan 11, 2018 8:52 AM
    / {
         clocks {
              ad9121_sampl_clk: clock@0 {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                        clock-frequency = <500000000>; /* 500 Mhz */
                        clock-output-names = "sampl_clk";
              };
         };
    };

    [ -snip- ]

        cf_ad9122_core_0: cf-ad9122-core-lpc@74204000 {
            compatible = "adi,axi-ad9121";
            reg = <0x74204000 0x10000>;
            clocks = <&ad9121_sampl_clk>;
            dmas = <&tx_dma 0>;
            dma-names = "tx";
        };

    Try something like this. In the AXI-DAC driver create a new compatible string for "adi,axi-ad9121"

    Rebuild kernel and device tree afterwards.

    -Michael

  • 0
    •  Analog Employees 
    on Jan 11, 2018 9:27 AM

    looks good.

    -Michael

  • FMCOMMS1 used to use a AD9122 not the AD9121.

    Also this board doesn't have AD9523, AD9548 clock chips, it uses the AD9516.

    Yes, but I checked both Chips, and even in the AD documentation they seems very similar so from what I know the IP block should work for both of them. About the clocks I'm familiar with it. Now, the point is I want to send some samples from Linux, but I cannot find a way for this Eval Board to do so based on Your HDL references and docummentation.

    Why is it still probing them?

    Thats probably because I didn't delete the SPI part from device tree, but I assumed that this will not causing the communication problems with the AD9121.

    Error: -5 is EIO (I/O error) which means the drivers can't talk to the HW.

    Yes, thats because AD9121 EBZ don't have any SPI/IIC communication with the FPGA (so do with ARM). The only connection is clock signals and I/Q data: AD9122 Evaluation Board Quick Start Guide [Analog Devices Wiki]  .

    How did you connect the SPI to FPGA?

    I didn't. To handle the Evaluation Board there is need to connect via USB and change settings by Windows software. I accept that. I just want to send samples from Linux to FPGA (by DMA) which will send them to the DAC (with the use of AD-DAC-FMC addapter). Thats the point.

    Without knowing your connections, FPGA design and device tree we can't really provide you more help.

    I understand. Below I send You .dts file. About the FPGA design I just delete the AD9643 blocks from FCMOMMS1 HDL reference design. The rest is the same (memory mapping too).

    /dts-v1/;

    /include/ "zynq-zed.dtsi"
    /include/ "zynq-zed-adv7511.dtsi"

    &fpga_axi {
        fmc_i2c: i2c@41620000 {
            compatible = "xlnx,axi-iic-1.01.b", "xlnx,xps-iic-2.00.a";
            reg = <0x41620000 0x10000>;
            interrupt-parent = <&intc>;
            interrupts = <0 55 0x4>;
            clocks = <&clkc 15>;
            clock-names = "pclk";

            #size-cells = <0>;
            #address-cells = <1>;
        };

        tx_dma: dma@7c420000 {
            compatible = "adi,axi-dmac-1.00.a";
            reg = <0x7c420000 0x10000>;
            #dma-cells = <1>;
            interrupts = <0 56 0>;
            clocks = <&clkc 16>;

            dma-channel {
                adi,buswidth = <64>;
                adi,type = <1>;
                adi,cyclic;
            };
        };

        cf_ad9122_core_0: cf-ad9122-core-lpc@74204000 {
            compatible = "adi,axi-ad9122-6.00.a";
            reg = <0x74204000 0x10000>;
            spibus-connected = <&dac0_ad9122>;
            dmas = <&tx_dma 0>;
            dma-names = "tx";
            xlnx,dphase-timeout = <0x8>;
            xlnx,num-mem = <0x1>;
            xlnx,num-reg = <0x1>;
            xlnx,s-axi-min-size = <0x1ff>;
            xlnx,slv-awidth = <0x20>;
            xlnx,slv-dwidth = <0x20>;
            xlnx,use-wstrb = <0x0>;
        };
    };

    /include/ "adi-fmcomms1.dtsi"

    Thank You very much for Your answer and help.