element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet & Tria Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
ZedBoard Hardware Design enable SPI
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 3 replies
  • Subscribers 354 subscribers
  • Views 492 views
  • Users 0 members are here
Related

enable SPI

ashahsana
ashahsana over 10 years ago

Hello everyone
I am new in this field, I try to find out how can I enable spidev. I already saw that in the SPI is active in the xilinx_zynq_defconfig file.
Can anyone guide me how can I enable Spidev ???
I am using 7z020 board.
regards
one update Now i know I have to change my dts file but how?

  • Sign in to reply
  • Cancel
  • zedhed
    0 zedhed over 10 years ago

    Hi Sana,

    Are you hooking up the PL AXI QSPI controller?  If so, take a look at this thread here:

    https://forums.xilinx.com/t5/Embedded-Linux/Linux-driver-for-AXI-Quad-SPI-v3-2-in-Zynq/td-p/551595

    If you are using the PS SPI controller here:

    https://forums.xilinx.com/t5/Embedded-Linux/Issues-with-PS-SPI-in-linux/m-p/471400#M9430

    When you get this working, would you please share back with our community what your solution is?

    Regards,

    -Kevin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ashahsana
    0 ashahsana over 10 years ago in reply to zedhed

    Thanks for your Reply
    Actually i want to connect spi through EMIO
    My dts is
    ps7_spi_1: ps7_spi@e0006000 {
    tttcompatible = "xlnx,ps7_spi_1-4.03.a";
    tttreg = <0xe0006000 0x1000>;
    ttt#address-cells=<1>;
    ttt#size-cells=<0>;
    tttcurrent-speed = <115200>;t
    tttclock-frequency = <10000000>;t
    tttxlnx,data-bits = <8>;
    tttxlnx,odd-parity = <0>;
    tttxlnx,use-parity = <0>;
    tttspidev@0{
    ttttcompatible="spidev";
    ttttreg =<0>; //chipselect 0
    ttttspi-max-frequency= <50000000>;
    ttt};
    tt};

    I am using 7z020 board and because this is my first attempt to make device tree i used the information from
    https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/xilinx.txt
    and then i made devicetree.dtb after that when i boot the board i got the following error


    U-Boot 2013.01 (Apr 18 2013 - 10:02:30)

    DRAM:  512 MiB
    WARNING: Caches not enabled
    MMC:   zynq_sdhci: 0
    SF: Unsupported manufacturer 00
    *** Warning - spi_flash_probe() failed, using default environment

    In:    serial
    Out:   serial
    Err:   serial
    Net:   Gem.e000b000
    Hit any key to stop autoboot:  0
    Copying Linux from SD to RAM...
    Device: zynq_sdhci
    Manufacturer ID: 1b
    OEM: 534d
    Name: SMI
    Tran Speed: 50000000
    Rd Block Len: 512
    SD version 2.0
    High Capacity: Yes
    Capacity: 3.7 GiB
    Bus Width: 4-bit
    reading uImage
    2883472 bytes read in 391 ms (7 MiB/s)
    reading devicetree.dtb
    7166 bytes read in 15 ms (465.8 KiB/s)
    reading uramdisk.image.gz
    3780885 bytes read in 507 ms (7.1 MiB/s)
    ## Booting kernel from Legacy Image at 03000000 ...
       Image Name:   Linux-3.8.0-xilinx
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    2883408 Bytes = 2.7 MiB
       Load Address: 00008000
       Entry Point:  00008000
       Verifying Checksum ... OK
    ## Loading init Ramdisk from Legacy Image at 02000000 ...
       Image Name:
       Image Type:   ARM Linux RAMDisk Image (gzip compressed)
       Data Size:    3780821 Bytes = 3.6 MiB
       Load Address: 00000000
       Entry Point:  00000000
       Verifying Checksum ... OK
    ## Flattened Device Tree blob at 02a00000
       Booting using the fdt blob at 0x02a00000
       Loading Kernel Image ... OK
    OK
       Loading Ramdisk to 1f7ba000, end 1fb550d5 ... OK
       Loading Device Tree to 1f7b5000, end 1f7b9bfd ... OK

    Starting kernel ...


    Error: unrecognized/unsupported device tree compatible list:
    [ 'xlnx,zynq-7000' ]

    Available machine support:

    ID (hex)        NAME
    ffffffff        ARM-Versatile Express
    000008e0        ARM-Versatile Express
    00000d32        Xilinx Zynq Platform

    Please check your kernel config and/or bootloader.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • zedhed
    0 zedhed over 10 years ago

    Hi Sana,

    My recommendation would be to start with a devicetree that is known to work, remove the things that you know will not be needed, and test it before adding in your SPI entry.

    Creating a devicetree by hand from scratch is a daunting task since the kernel does not offer you much feedback or guidance when something goes wrong.  It would be best to start with something that is known to work and make small changes to build up to what you want.

    A good place to start would be one of the Official releases from the Xilinx Wiki:

    http://www.wiki.xilinx.com/Zynq+2015.2+Release

    This comes with a devicetree that works on ZedBoard that you can decompile and see the inner workings of a known good starting point.

    Regards,

    -Kevin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube