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: 
Highlighted
Contributor
Contributor
6,888 Views
Registered: ‎08-09-2013

Linux driver for (AXI Quad SPI v3.2) in Zynq

Hello,

I am trying to use various spi modules (separate from the Zynq built-in SPI) inside the Zynq.

When creating a AXI Quad SPI module (simple version - Standard mode, no FIFO, 1 device), I can't seem to get it recognized by Linux. The driver is compiled in Linux.

 

My device tree:

 

    ABCBus:spi1 {
        compatible = "xlnx,xps-spi-2.00.b";
        reg = < 0x41E30000 0x1000 >;
        xlnx,family = "zynq";
        xlnx,fifo-exist = <0x0>;
        xlnx,num-ss-bits = <0x1>;
        xlnx,num-transfer-bits = <0x8>;
        xlnx,sck-ratio = <0x20>;
        #address-cells = <1>;
        #size-cells = <0>;
        spidev@0 {
              compatible = "spidev";
              reg = <0>;
              spi-max-frequency = <3125000>;
        };
        } ;

 

At first, I get the message "xlnx,num-ss-bits is deprecated".

It seems to go away if I add "num-cs = <1>;" in the device tree (looked at the driver source, it looks for a num-cs apparently). But even then, I can't see my device in /dev/, or /sys/bus/spi

 

Is Linux supporting this Core in Zynq?

 

Thank you!

 

 

 

Tags (3)
0 Kudos
2 Replies
Contributor
Contributor
6,849 Views
Registered: ‎08-09-2013

Re: Linux driver for (AXI Quad SPI v3.2) in Zynq

After some research, I found out the device failed loading because it was missing the <interrupt > resource in the DTS (it would be nice if the xilinx-spi.c driver had a warning when failing to load the interrupt).

 

A question: Is the interrupt a requirement for the device or can we do simple SPI operations (read,write - no FIFO) without caring about the interrupt? Ideally I'd like to leave this disconnected and not use one more interrupt resource..

 

thanks 

0 Kudos
Scholar milosoftware
Scholar
6,764 Views
Registered: ‎10-26-2012

Re: Linux driver for (AXI Quad SPI v3.2) in Zynq

IRQ resources shouldn't be a problem.

 

You can connect the interrupt to an EMIO GPIO pin, you don't have to use the PL/PS interrupt controller. And if you run out of those, you can write your own controller in logic...

 

The alternative is to adapt the driver to use a polling mode (and waste tons of cycles and power) or timer.

0 Kudos