cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
3,699 Views
Registered: ‎10-31-2018

How to enable SPI peripheral in zedboard using petalinux and vivado 2018.3

Hi All,

We have brought new zedboard(XC7020) for our new project and decided to work on linux platform.

We have installed latest vivado 2018.3 and petalinux tools for development.

We have followed few documents from Xilinx to create block diagram in Vivado and run the petalinux.

As a start, we have created block diagram with only SPIenabled and able to generate bitsteam. We have also created new project in petalinux using .hdf file which is generated using Vivado.

we have enabled SPI driver from "Device Driver -> SPI" and build the project using following commands.

"petalinux-build -c kernel", "petalinux-build -c rootfs" and "petalinux-build" 

After build, we have loaded BOOT.bin and uImage.ub files in SDcard and started booting.

After booting, I have verified in "/dev" folder for SPI peripherals but we haven't seen any SPI peripheral.

From the internet, someone has suggested to add SPI0 initalization in system-conf.dtsi file under the path "work/project_2/software/project-spec/meta-user/recipes-bsp/device-tree/files".

/include/ "system-conf.dtsi"
/ {
};
&spi0{
      spidev@0x00 {
                   compatible = "spidev";
                   spi-max-frequency = <50000000>;
                   reg = <0>;
                  };
      spidev@0x01 {
                   compatible = "spidev";
                   spi-max-frequency = <50000000>;
                   reg = <1>;
                  };
     };
 

After adding this also, it didn't worked. 

I have added boot log here with our SPI block diagram which is created using vivado.

Someone please have a look at my boot log and suggest us what to do to enable SPI pheripheral.

 

Regards,

Praveen Kumar. 

 

0 Kudos
3 Replies
Highlighted
Xilinx Employee
Xilinx Employee
3,605 Views
Registered: ‎07-12-2018

Re: How to enable SPI peripheral in zedboard using petalinux and vivado 2018.3

Hi praveen@veoneer 

Please refer the below wiki page

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842437/SPI+Zynq+driver

Best Regards
Abhinay PS
------------------------------------------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give kudos to a post which you think is helpful and reply oriented.
-------------------------------------------------------------------------------------------------------------------------------

0 Kudos
Highlighted
Moderator
Moderator
3,575 Views
Registered: ‎06-27-2017

Re: How to enable SPI peripheral in zedboard using petalinux and vivado 2018.3

praveen@veoneer ,

Are you able to see device tree changes for SPI after building petalinux? Check system.dtb(convert it to .dts)

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
3,569 Views
Registered: ‎10-31-2018

Re: How to enable SPI peripheral in zedboard using petalinux and vivado 2018.3

Hi Kranthi,

Thanks for your reply.

Currently we have stopped working on PetaLinux. So countnt test it.

Anyway thanks for your support and time.

 

Regards,

Praveen Kumar.

0 Kudos