UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant suppamax
Participant
397 Views
Registered: ‎06-11-2018

Driving AXI-SPI from linux

Hi,

 

in my design the ARM core can configure the blocks implemented in PL via a AXI2SPI  module.

 

I configured the linux with the following options

CONFIG_SPI_XILINX=y

CONFIG_SPI_SPIDEV=y

and my device-tree looks like

/ {
	amba_pl: amba_pl@0 {
		#address-cells = <2>;
		#size-cells = <2>;
		compatible = "simple-bus";
		ranges ;
		axi_quad_spi_0: axi_quad_spi@a0000000 {
			bits-per-word = <8>;
			compatible = "xlnx,xps-spi-2.00.a";
			fifo-size = <16>;
			interrupt-names = "ip2intc_irpt";
			interrupt-parent = <&gic>;
			interrupts = <0 89 1>;
			num-cs = <0x1>;
			reg = <0x0 0xa0000000 0x0 0x800000>;
			xlnx,num-ss-bits = <0x1>;
			xlnx,spi-mode = <0>;
		};
		psu_ctrl_ipi: PERIPHERAL@ff380000 {
			/* This is a place holder node for a custom IP, user may need to update the entries */
			compatible = "xlnx,PERIPHERAL-1.0";
			reg = <0x0 0xff380000 0x0 0x80000>;
		};
		psu_message_buffers: PERIPHERAL@ff990000 {
			/* This is a place holder node for a custom IP, user may need to update the entries */
			compatible = "xlnx,PERIPHERAL-1.0";
			reg = <0x0 0xff990000 0x0 0x10000>;
		};
	};
};

Now - it's not clear to me how it is possible to control the AXI2SPI module.

I understand I should use the spi-xilinx driver, but I don't know how to do it (nor how to check that it has been correctly loaded).

0 Kudos
3 Replies
Xilinx Employee
Xilinx Employee
354 Views
Registered: ‎06-27-2017

Re: Driving AXI-SPI from linux

Hi @suppamax,

 

you can try test procedure mentioned in below wiki,

 

http://www.wiki.xilinx.com/Linux%20SPI%20Driver

 

Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
0 Kudos
Participant suppamax
Participant
347 Views
Registered: ‎06-11-2018

Re: Driving AXI-SPI from linux

Do you mean that I should add a "my_component" node within axi_quad_spi, which will allow me to access my PL logic?
0 Kudos
Participant suppamax
Participant
330 Views
Registered: ‎06-11-2018

Re: Driving AXI-SPI from linux

Also, here is the boot log: there is no message regarding spi.

Is this expected?

How to debug this issue?

0 Kudos