SPI Driver in Xillinux

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: SPI Driver in Xillinux

Re: SPI Driver in Xillinux

Post by support »

Hello,

You may want to look on these two threads regarding integration of SPI in Xillinux:

viewtopic.php?f=4&t=455
viewtopic.php?f=4&t=456

Other than that, using SPI under Xillinux (and spidev in particular) is exactly like any Linux system.

Note the kernel's own documentation, in the kernel source tree: Documentation/spi/spidev
and an example user-space program: Documentation/spi/spidev_test.c

Regards,
Eli

SPI Driver in Xillinux

Post by gibinchacko90 »

I am trying to communicate to high-speed ADC through FMC connector in Zedboard, the control parameters are sent via SPI protocol. I have implemented SPI0 in PS and successfully ran tests on SDK. Now I want to port to Xillinux, is there any SPI driver to install and functions available to send data via SPI. I have edited the devicetree as following:
spi0: spi@e0006000 {
compatible = "xlnx,ps7-spi-1.00.a";
reg = <0xE0006000 0x1000>;
interrupts = <0 26 4>;
interrupt-parent =<&ps7_scugic_0>;
speed-hz = <50000000>;
bus-num = <0>;
num-chip-select = <4>;
#address-cells = <1>;
#size-cells = <0>;
spidev: spidev@0 {
compatible = "linux,spidev";
spi-max-frequency = <100000>;
reg = <0>;
};
spidev@1 {
compatible = "linux,spidev";
spi-max-frequency = <100000>;
reg = <1>;
};
spidev@2 {
compatible = "linux,spidev";
spi-max-frequency = <100000>;
reg = <2>;
};

Booting is successful and terminal command (ls -l /dev/spi*) shows SPI devices as following:
:# ls -l /dev/spi*
crw------- 1 root root 153, 0 Jan 1 00:00 /dev/spidev32766.0
crw------- 1 root root 153, 1 Jan 1 00:00 /dev/spidev32766.1
crw------- 1 root root 153, 2 Jan 1 00:00 /dev/spidev32766.2

How to go forward to write an application to send data through SPI protocol? Please Help.

Top

cron