Does someone has got a small example about howto communicate via SPI to a device? What is to do?
Does someone has got a small example about howto communicate via SPI to a device? What is to do?
Thank for this links - idea is good. But this is for ISE and rather complex stuff. I do have a MicroZed I/O Carrier board.
I think, the simpliest way is use a spidev driver, as there is already an example in kernel.
So I included SPIDEV into kernel configuration. Nevertheless there is no /dev/spi* device to see. I checked the devicetree. In the section
tps7_axi_interconnect_0: amba@0 {
there are two spi nodes:
ttps7_spi_0: ps7-spi@e0006000 {
tttclock-names = "ref_clk", "pclk", "aper_clk";
tttclocks = <&clkc 25>, <&clkc 34>, <&clkc 34>;
tttcompatible = "xlnx,zynq-spi-r1p6", "xlnx,ps7-spi-1.00.a";
tttinterrupt-parent = <&ps7_scugic_0>;
tttinterrupts = <0 26 4>;
tttnum-chip-select = <4>;
tttreg = <0xe0006000 0x1000>;
ttt#address-cells = <1>;
ttt#size-cells = <0>;
tt} ;
ttps7_spi_1: ps7-spi@e0007000 {
tttclock-names = "ref_clk", "pclk", "aper_clk";
tttclocks = <&clkc 26>, <&clkc 35>, <&clkc 35>;
tttcompatible = "xlnx,zynq-spi-r1p6", "xlnx,ps7-spi-1.00.a";
tttinterrupt-parent = <&ps7_scugic_0>;
tttinterrupts = <0 49 4>;
tttnum-chip-select = <4>;
tttreg = <0xe0007000 0x1000>;
ttt#address-cells = <1>;
ttt#size-cells = <0>;
tt} ;
But this seems to be not enough to get an spi device running.
Thank for this links - idea is good. But this is for ISE and rather complex stuff. I do have a MicroZed I/O Carrier board.
I think, the simpliest way is use a spidev driver, as there is already an example in kernel.
So I included SPIDEV into kernel configuration. Nevertheless there is no /dev/spi* device to see. I checked the devicetree. In the section
tps7_axi_interconnect_0: amba@0 {
there are two spi nodes:
ttps7_spi_0: ps7-spi@e0006000 {
tttclock-names = "ref_clk", "pclk", "aper_clk";
tttclocks = <&clkc 25>, <&clkc 34>, <&clkc 34>;
tttcompatible = "xlnx,zynq-spi-r1p6", "xlnx,ps7-spi-1.00.a";
tttinterrupt-parent = <&ps7_scugic_0>;
tttinterrupts = <0 26 4>;
tttnum-chip-select = <4>;
tttreg = <0xe0006000 0x1000>;
ttt#address-cells = <1>;
ttt#size-cells = <0>;
tt} ;
ttps7_spi_1: ps7-spi@e0007000 {
tttclock-names = "ref_clk", "pclk", "aper_clk";
tttclocks = <&clkc 26>, <&clkc 35>, <&clkc 35>;
tttcompatible = "xlnx,zynq-spi-r1p6", "xlnx,ps7-spi-1.00.a";
tttinterrupt-parent = <&ps7_scugic_0>;
tttinterrupts = <0 49 4>;
tttnum-chip-select = <4>;
tttreg = <0xe0007000 0x1000>;
ttt#address-cells = <1>;
ttt#size-cells = <0>;
tt} ;
But this seems to be not enough to get an spi device running.