Search code examples
beagleboneblackdevice-tree

Where to find an up-to-date guide on configuring and using Beaglebone Black pins


I've been using a Beaglebone Black for a couple of years now and have always struggled to configure pins. There have been plenty of methods that have changed with kernel updates. As a result lots of information on the internet contradicts other posts and many of them are simply not working anymore.

I've seen pin manager, pin config, overlays, dtbo files loaded in slots, dtbo loaded in uboot and (it seems like) many others.

I can't get P9_41 to work as an output (it has two different "balls" going to it), and don't just want to get this working but would really like to understand what I'm doing (until it breaks again with a newer kernel?) Currently at kernel 4.14.71-ti-r80, but willing to update to newer if I can get everything working again.

Is there something like "a definitive guide on how to configure and control the pins on the current kernel version"?


Solution

  • config-pin p9.41 gpio
    

    or

    config-pin p9.41 gpio 1
    

    1 = HIGH 0 = LOW

    Also...you can use this script to figure out what pins are what:

    https://github.com/mvduin/bbb-pin-utils

    Follow the instructions to figure out what is HIGH, LOW, what is being used, and what is available.

    Also, using uboot-overlays now, we just add the .dtbo file in /boot/uEnv.txt.

    https://github.com/beagleboard/bb.org-overlays/tree/master/src/arm are the overlays one can use in the uboot-overlays section of the /boot/uEnv.txt file.

    Also, about setting up .dts files for your own board config. on the BBB, there are many ideas circulating online. I suggest you go to the source to learn: devicetree.org.