I have a "PicoZED SDR" development kit. We have heavily modified the demo project in order to prove that the AD9361 can do what we need. At this stage we need to control an external SPI device. I am trying to add an AXI SPI to the Xilinx project and get it to show up in Petalinux /dev. I believe that I have got the AXI QSPI added into Vivado project and bitstream and devicetree.dtb created, but I am getting errors on the Linux boot log telling me that it failed to register the port.
I have read MANY examples and posts, but I am still very unsure (and obviously something is wrong) about the devicetree file and I'm not even 100% sure that I have properly added the AXI SPI to the Vivado project. My SPI port should be at address 0x41e0000. I can stop teh boot at uboot and probe around and the port seems to be there.
Below is my entry in the dts file. I have so many questions about this I'm not even quite sure where to begin, but let me try:
Where should this entry be in the dts file? I currently have it within the fpga-axi@0 {} block. There are a bunch of other AXI devices listed there.
Many of the other AXI peripherals have "compatible="xlnx,axi..." but all of the examples I found for the SPI have "compatible="xlnx,xps-spi...". What is the correct compatible string?
How can I tell which is the correct interrupt?
Most examples have only 2 numbers in the interrupts <>, but some have 3. Which is correct?
What is the correct clocks=<>?
Most examples and many forum posts talk about the need to have the correct clock-names. How can I tell what are the correct clock names? I used what I found in a number of examples and what I found in other places in my existing dts file for things that seem to be working.
Thank you,
Steve
u-boot> md.l 41e00060 1
41e0060: 00000180 <== default value of SPICR
u-boot> md.l 41e00064
41e00064: 000000a5 <== default value of SPISR
Question
sbates
I have a "PicoZED SDR" development kit. We have heavily modified the demo project in order to prove that the AD9361 can do what we need. At this stage we need to control an external SPI device. I am trying to add an AXI SPI to the Xilinx project and get it to show up in Petalinux /dev. I believe that I have got the AXI QSPI added into Vivado project and bitstream and devicetree.dtb created, but I am getting errors on the Linux boot log telling me that it failed to register the port.
I have read MANY examples and posts, but I am still very unsure (and obviously something is wrong) about the devicetree file and I'm not even 100% sure that I have properly added the AXI SPI to the Vivado project. My SPI port should be at address 0x41e0000. I can stop teh boot at uboot and probe around and the port seems to be there.
Below is my entry in the dts file. I have so many questions about this I'm not even quite sure where to begin, but let me try:
Thank you,
Steve
u-boot> md.l 41e00060 1 41e0060: 00000180 <== default value of SPICR u-boot> md.l 41e00064 41e00064: 000000a5 <== default value of SPISR
axi_quad_spi_2@41e00000 { compatible = "xlnx,xps-spi-2.00.b","xlnx,xps-spi-2.00.a"; #address-cells=<1>; #size-cells=<0>; interrupt-parent = <0x1>; interrupts = <0x0 0x36 0x4>; clocks = <0x2 0xf 0xf>; clock-names = "axi", "ref"; reg = <0x41e00000 0x10000>; num-cs = <0x1>; fifo-size = <16>; bits-per-word = <8>; xlnx,family="zynq-7000"; xlnx,fifl-exist=<0x1>; xlnx,num_ss_bits=<0x1>; xlnx,num_transfer-bits=<0x8>; xlnx,sck-ratio=<0x20>; device@0 { compatible="spidev"; reg=<0>; //Chip Select 0 spi-max-frequency=<3125000>; };
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.