12-05-2014 03:51 PM
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:
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>;
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?
12-07-2014 05:42 PM
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..
12-15-2014 05:52 AM
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.