element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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
RIoTboard
  • Products
  • Dev Tools
  • Single-Board Computers
  • RIoTboard
  • More
  • Cancel
RIoTboard
Forum How to enable SPI on Expansion Port
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RIoTboard to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 0 replies
  • Subscribers 21 subscribers
  • Views 208 views
  • Users 0 members are here
Related

How to enable SPI on Expansion Port

Former Member
Former Member over 10 years ago

I am trying to enable SPI2 and/or SPI3 on the expansion port but not sure how to go about it.

 

In looking at the riotboard dts file I see SPI1 enabled like this:

&ecspi1 {

        fsl,spi-num-chipselects = <1>;

        cs-gpios = <&gpio4 9 0>;

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_ecspi1_2 &pinctrl_ecspi1_cs_2>;

        status = "okay";

 

    touch: ads7846@0 {

        #address-cells = <1>;

        #size-cells = <1>;

        compatible = "ti,ads7846";

        interrupt-parent = <&gpio3>;

        interrupts = <24 2>;

        spi-max-frequency = <1500000>;

        reg = <0>;

 

        ti,settle-delay-usec = /bits/ 16 <150>;

        ti,keep-vref-on = /bits/ 16 <1>;

        ti,swap-xy = /bits/ 16 <1>;

                ti,x-min = /bits/ 16 <0>;

                ti,x-max = /bits/ 16 <4095>;

                ti,y-min = /bits/ 16 <0>;

                ti,y-max = /bits/ 16 <4095>;

                ti,debounce-rep = /bits/ 16 <1>;

                ti,debounce-tol = /bits/ 16 <5>;

                ti,debounce-max = /bits/ 16 <10>;

                linux,wakeup;

                pendown-gpio = <&gpio3 24 GPIO_ACTIVE_LOW>;

    };

};

 

The "touch:" stuff I assume is being used to enable the touch screen controller so I can skip that part and I assume all I need to replicate is the initial part with something along these lines:

&ecspi2 {

        fsl,spi-num-chipselects = <1>;

        cs-gpios = <&gpioXX ?? ??>;

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_ecspi2_1 &pinctrl_ecspi2_CS_??>;

        status = "okay";

}

 

However I am not sure what to use for the cs-gpios nor for the chip select group in the pinctrl-0.  The imx6qdl.dtsi file does not define the chip select pins for ecspi2 or 3.

 

This is all fairly new to me so please be gentle image.

 

thanks.

  • Sign in to reply
  • 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