PinMuxing P9_21, P9_22 to I2C2?

As stated in the topic’s subject, I am currently trying to expose I2C2 (The I2C bus that’s normally connected to P9_19, P9_20) to pins P9_21 and P9_22. Since the documentation for the Beaglebone Black/Green show that pins 21 and 22 can be used for I2C2 it must be possible, I just can’t find a solid way to do it.

Background Info

Hardware: SeeedStudio BeagleGone Green
OS: debian
uname -a: Linux beaglebone 3.8.13-bone71.1 #1 SMP Wed May 20 20:13:27 PDT 2015 armv7l GNU/Linux
(Note that I am willing to flash whatever OS/kernel version it takes to get this working)

The requirement comes from an error I made not knowing about the default I2C device tree settings for the device. I have since then fixed the problem in my project schematic/board but I already have demo PCBs on the way from the fabhouse. So it’d be great to just expose those pins to the I2C bus rather than cut and rewire traces manually. Sadly due to the time constraints for the project (Deadline is on the 31st) I cannot send out for an updated PCB.

The software side of this project is based on the Adafruit_BBIO library which is, in turn, based on the python smbus library. There’s very little in terms of configuration when setting up I2C communication with those libraries so the magic switch is most likely not there.

Main Methods Attempted

For all cases, assume that the (conflicting) UART2 device tree overlay has been disabled via blacklisting in uEnv and a reboot.

  • bonescript pinMode() - Does nothing to the mode of the pin in this case although getPinMode() does show that I2C2_SDA/SCL (mode 2) is a possible mode option.

  • Enabling an official I2C2 device tree overlay from the repo that I edited to point to P9_21 and P9_22 instead of the normal I2C2 pins. This compiles and shows up in the cape manager after inclusion but nothing happens on pins P9_21 and P9_22 when I try to communicate to my PCA9685 devboard. Upon inspection with getPinMode() they are still in mode 7 (GPIO). Meanwhile pins P9_19, P9_20 work just fine so the bus is still functional.

  • Tried Bernhard Tittelbach’s lovely Device-Tree Overlay Generator to make a setting file for each pin. I mirrored the pin settings for P9_19,20 so I am absolutely sure the .dts was correct. Still did not work.

  • Mucked around with the Universal Cape overlay but it never really seemed to change any pin states in this case.


Given any possible (supported) OS, how can I get pins P9_21 and P9_22 into the correct pin mode to mux to the I2C2 device?
And is it possible to have I2C2 exposed on both P9_19,20 and P9_21,22?

Lastly, I have been flashing so many OS versions trying to fix this over the past two days, I apologize if there are any naming errors. I especially know that the I2C device buses have been recently renumbered which can cause confusion.

Thanks for your time!