No SPI traffic to AD9250 on ADI Linux but interface works fine with no-os on Xilinx Standalone.

Hi, 

I'm using Analog Devices Linux release 2018_R2 on a custom Zynq-7000 board with a AD9250 ADC. I'm having an issue where there is no SPI traffic coming out of the Zynq-7000 to the AD9250.

I have the signals connected to an oscilloscope and to verify that the connection is correct, I created a Xilinx SDK workspace and made a simple standalone (no-os) SPI program to communicate with the AD9250 chip. Using the SPI program I wrote I was able to see SPI traffic on my oscilloscope and I was able to read the AD9250 CHIP ID register successfully. So I know the devices are physically connected correctly.

When I boot my Linux image, no traffic comes out of the SPI bus.

Here are the tools I am using to build my HDL fabric and Linux build tools:

Vivado 2018.2 with ADI HDL release 2018_R2

Petalinux 2018.2 using Analog Devices Linux for external kernel source release 2018_R2

I'm wondering if my device tree entry for the SPI interface is correct:

&spi0 {
	compatible = "xlnx,zynq-spi-r1p6";
	reg = <0xe0006000 0x1000>;
	status = "okay";
	num-cs = <3>;
	#address-cells = <1>;
	#size-cells = <0>;
	
	adc0_ad9250: ad9250@0 {
		compatible = "adi,ad9250";
		reg = <0>;
		spi-max-frequency = <10000000>;
		adi,spi-3wire-enable;	
	};
};

&axi_ad9250_0 {
	compatible = "xlnx,axi-ad9250-1.00.a";
	reg = <0x44a1000 0x1000>;
	status = "okay";
	
	dmas = <axi_ad9250_0_dma 0>;
	dma-names = "rx";
	spibus-connected = <&adc0_ad9250>;
};

When I boot Linux I did a dmesg | grep spi command and I get the following results for the SPI interface:

[4.468457] cdns-spi e0006000.spi: registered master spi1
[4.468639] spi spi1.0: setup mode 0, 8 bits/w, 10000000 Hz max --> 0
[4.468826] cdns-spi e0006000.spi: registered child spi1.0

[4.702585] ad9467: probe of spi1.0 failed with error -2

I also did a peek of the configuration register for the SPI interface and it came up with a value of 0x00000000, I assume some bits need to be set for the clock prescaler and to enable master mode but I'm not entirely sure how the SPI driver treats registers and if it sets them once or sets and then resets them to zero every transaction.

Is there anything that I could have wrong or anything else I can try? Is there a way for me to have OS restart IIO and probe the SPI bus again without a powercycle?

Thanks.

Parents Reply Children
No Data