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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • 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 Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Software Application Development Spi dev as SLAVE
  • 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 Verified Answer
  • Replies 6 replies
  • Subscribers 312 subscribers
  • Views 1454 views
  • Users 0 members are here
Related

Spi dev as SLAVE

robert.burczyk94
robert.burczyk94 over 6 years ago

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

  • Sign in to reply
  • Cancel
  • bhfletcher
    0 bhfletcher over 6 years ago

    I think the following topics might be helpful.

    https://forums.xilinx.com/t5/Xcell-Daily-Blog-Archived/Adam-Taylor-s-MicroZed-Chronicles-Part-217-SPI-for-the-Zynq-SoC/ba-p/796622

    https://forums.xilinx.com/t5/Welcome-Join/Use-SPI-PS-and-I2C-PS-as-Slave-on-SDK-Zynq-7020/td-p/747477

    https://forums.xilinx.com/t5/Embedded-Linux/Support-for-interbyte-delay-in-SPI-transfers-in-Zynq/td-p/757955

    https://forums.xilinx.com/t5/Embedded-Linux/how-to-use-zynq-spi0-as-master-communicate-with-spi1-as-slave/td-p/802509

     

    Bryan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • robert.burczyk94
    0 robert.burczyk94 over 6 years ago

    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";
    };
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • robert.burczyk94
    0 robert.burczyk94 over 6 years ago

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

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • robert.burczyk94
    0 robert.burczyk94 over 6 years ago

    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

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • bhfletcher
    0 bhfletcher over 6 years ago in reply to robert.burczyk94

    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

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • robert.burczyk94
    0 robert.burczyk94 over 6 years ago

    There is no a SPI controler that support the slave mode

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject 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 © 2025 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