Sorry, you need to enable JavaScript to visit this website.

Spi dev as SLAVE

Zedboard forums is currently read-only while it under goes maintenance.

Solved
7 posts / 0 new
Spi dev as SLAVE

Hi,
How can I configure SPI DEV in Zedboard (PS side) as a SLAVE mode? Do I have to add some entries to dts file (devicetree) to configure it as a slave or have to add some entries in kernel configuration (defconfig)? How can I do it? Do you have some exaple device tree files where is SPI configured as SLAVE?
Thanks for help, Robert

fletch
Moderator(23)
I think the following topics
Thanks for help. In my kerler

Thanks for help. In my kerler configuration i added some entries: 
CONFIG_SPI_SLAVE=y
CONFIG_SPI_SLAVE_TIME=y
CONFIG_SPI_SLAVE_SYSTEM_CONTROL=y
that enabled spi_slave class in /sys/class. Now, I have to edit device tree, but in /dev/ isn't exist apriopirate device and /sys/class/spi_slave is empty. This is my device tree configuration:
zynq-7000.dtsi :

spi1: spi@e0007000 {
compatible = "xlnx,zynq-spi-r1p6";
reg = <0xe0007000 0x1000>;
status = "disabled";
interrupt-parent = <&intc>;
interrupts = <0 49 4>;
clocks = <&clkc 26>, <&clkc 35>;
clock-names = "ref_clk", "pclk";
#address-cells = <1>;
#size-cells = <0>;
};
zynq.dtsi :

&spi1 {
spi-slave;
status = "okay";
};

Could you tell me what I did

Could you tell me what I did wrong? :) Thanks, Robert

 

 
Hello, I know why it doesn't work properly. Entry: compatible = "xlnx,zynq-spi-r1p6"; applies to the controler spi-cadence.c. This controller support onlu SPI MASTER mode, not SPI slave mode. I was looking for a long time, but I didn't find the controller that support SPI SLAVE mode too. Maybe one of you knows a controler with slave mode support? Thanks for help! Robert

fletch
Moderator(23)
I am not sure. Since you are

I am not sure. Since you are referencing a piece of Xilinx IP, will you please try putting your question on the Xilinx Forum?

https://forums.xilinx.com/

 

Bryan

There is no a SPI controler

There is no a SPI controler that support the slave mode