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
Single-Board Computers
  • Products
  • Dev Tools
  • Single-Board Computers
  • More
  • Cancel
Single-Board Computers
Forum Pinmux - enabling SPI
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Single-Board Computers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 26 replies
  • Subscribers 57 subscribers
  • Views 5794 views
  • Users 0 members are here
  • beagle
  • bbb
  • BeagleBone
  • bb_black
  • beagle_bone_black
Related

Pinmux - enabling SPI

Former Member
Former Member over 12 years ago

As the Black has a new 3.8.x generation kernel, omap_mux has gone and we're in the realms of using pinctrl for setting up the pins on the expansion headers.

 

Looking through the bonescript library it appears to try omap_mux and if that fails it just reverts to treating the pin as a gpio. That's all very well until you want to enable a PWM, UART, SPI etc.

 

So does anyone know what magic is needed on the black ?   I'm suffering here from plenty of information on enabling SPI on the original beaglebone with a 3.2.x kernel, but basically zero info on the current state for the Black.

 

/proc/config.gz says CONFIG_SPI_OMAP24XX=y and I've loaded spi-dev, still no /dev entries for spi and the pinmux settings look wrong.  I'm missing something or doing something wrong I'm sure, but right now it seems as if going through /dev/mem, behind pinctrl's back, might be the only way ?

  • Sign in to reply
  • Cancel

Top Replies

  • Former Member
    Former Member over 12 years ago +1
    I have been playing with dtbo to enable spi0 on the BeagleBone Black. You can read about it on inbedded.net . Hope that will help, Christophe
  • morgaine
    morgaine over 12 years ago in reply to Former Member +1
    Hi Christophe, and welcome to Element 14's BBB community! That's a nice set of BBB articles at your site. My discarded Nokia Communicator 9210 has been looking at me with some anxiety since I began reading…
  • morgaine
    morgaine over 12 years ago in reply to Former Member

    LOL, don't worry about them.  (I'm sure you're not.)

     

    The only response to give language fanboys is "Engineers have more than one tool in their toolkit".

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett over 12 years ago in reply to morgaine

    And more than one OS on their computer image

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 12 years ago in reply to Former Member

    I just tried decompiling the entire dtb to make a couple of mods (I wanted to go to 400kHz I2C and enable pruss) and then recompiling and sticking it back into /boot, but now it hangs on boot, so I'll have to re-flash it.

    It was a drastic step but I thought I'd take the risk! The compiler was here.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to shabaz

    I used the version of dtc supplied with angstrom and it worked ok. There's a log showing what I did over in one of the other threads about killing off the heartbeat led.

     

    For all the talk of being able to have it show up as a storage device on a USB connected computer, that's problematic for two reasons - you can't see your dtb files from there and you need the kernel to boot and load the usb gadget driver before it works.

     

    You'll still be able to get into u-boot over the serial console, perhaps there's something you can do from there to replace a working dtb?

     

    For all the advantages of the onboard eMMC, if it becomes easy to brick the board (albeit not permanently), then I'm not so sure it's worth it.

     

    As a last thought, you can probably get debian or some such like on a microSD, hold the button to boot from it, then access the eMMC to repair the dtb that way..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 12 years ago in reply to Former Member

    Hi Selsinork,

     

    I used the actual dts source files this time (instead of extracting from the .dtb) and this time it worked ok (the clock is now 400kHz). Maybe I made a typo the first time. I'll check out the heartbeat thread to learn more about this dts stuff (and I may unsolder the blue LEDs to replace with green ones,

    I too was wondering if I could do something at the u-boot stage, but in the end I just left it for 45 mins to reload the flash, but I may investigate that later.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 12 years ago in reply to Former Member

    Hi Selsinork,

     

    A quick question, do you see /dev/uio0...7 files on your board?

    At the same time as enabling the 400kHz I2C, I have enabled the PRU in the dts, but before when I messed up, I was using the older image (now I'm on the 8th May image), so I'n not sure if the /dev/uio0..7 which I see now is a result of the new image(it wasn't in the old image), or because of the PRU enablement that I changed in the dts.

     

    image

    I've tried building up one of the PRU examples, and finally it appears to run, so now I may spend some time learning the bare minimum assembler.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to shabaz

    I'm still using the original image with the 3.8.6 kernel. There seems to be a fair number of differences, no uio* ircomm* for me, but I do have dri & fb0 which you don't. presumably there's other differences in the newer image as well.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago

    I have been playing with dtbo to enable spi0 on the BeagleBone Black. You can read about it on inbedded.net. Hope that will help,

     

    Christophe

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • morgaine
    morgaine over 12 years ago in reply to Former Member

    Hi Christophe, and welcome to Element 14's BBB community!

     

    That's a  nice set of BBB articles at your site.  My discarded Nokia Communicator 9210 has been looking at me with some anxiety since I began reading your experiences interfacing the Nokia 3330's LCD. image  The  9210 is a completely different beast of course, but I'll take a look on the net for info on its nice colour LCD, as it might well have an SPI or I2C interface like yours.

     

    It's great to have more examples to help demystify Device Tree Overlays.  What's next on your BBB project plan?

     

    Morgaine.

     

    Addendum.  Scratch that for an idea, the 9210 schematics show that the display has a parallel interface driven by a bespoke chip.  Oh well, I'll find some other display to recycle, there's no shortage of old gear here.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to shabaz

    t

    • Cancel
    • Vote Up 0 Vote Down
    • 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