by support »
Hello,
Unfortunately, the Zynq device's hardware SPI interface isn't enabled in Xillinux-1.3 by default, so it's quite a way to go in order to make it work (change the setting in Xilinx' tools, recompile the FSBL and U-boot and then set up the device tree to work with it).
On the other hand, Linux has an SPI bit-banging feature, which is enabled in Xillinux' Linux kernel. You may assign any GPIO pins for your SPI bus, and just add an entry to the device tree. An /dev/spidevXXX device file will be created by the driver.
See
http://lxr.free-electrons.com/source/Do ... txt?v=3.12and
http://xillybus.com/tutorials/device-tree-zynq-1And this may come handy for getting the GPIO numbering right:
http://billauer.co.il/blog/2014/07/bash-gpio-xillinux/The drawback of this method is that the CPU will be used for toggling the SPI pins. If you're not into heavy-duty communication on the SPI bus (or if you don't care about CPU consumptions while that's happening), this is definitely the easiest way to go.
Regards,
Eli
Hello,
Unfortunately, the Zynq device's hardware SPI interface isn't enabled in Xillinux-1.3 by default, so it's quite a way to go in order to make it work (change the setting in Xilinx' tools, recompile the FSBL and U-boot and then set up the device tree to work with it).
On the other hand, Linux has an SPI bit-banging feature, which is enabled in Xillinux' Linux kernel. You may assign any GPIO pins for your SPI bus, and just add an entry to the device tree. An /dev/spidevXXX device file will be created by the driver.
See http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/spi/spi-gpio.txt?v=3.12
and http://xillybus.com/tutorials/device-tree-zynq-1
And this may come handy for getting the GPIO numbering right:
http://billauer.co.il/blog/2014/07/bash-gpio-xillinux/
The drawback of this method is that the CPU will be used for toggling the SPI pins. If you're not into heavy-duty communication on the SPI bus (or if you don't care about CPU consumptions while that's happening), this is definitely the easiest way to go.
Regards,
Eli