Disabling default I2C mapping

45 views
Skip to first unread message

li.s...@gmail.com

unread,
Jun 3, 2016, 11:31:20 AM6/3/16
to BeagleBoard
Dear all, please could you describe how to disable defualt mapping of I2C0 and I2C1 interfaces of BBB, so their pins can be used as GPIO?  Thank you for detailed description!


Gerald Coley

unread,
Jun 3, 2016, 11:32:26 AM6/3/16
to beagl...@googlegroups.com
I2C0 is connects to the PMIC. Disabling that and making it a GPIO would not be a good thing to do.

Gerald


On Fri, Jun 3, 2016 at 10:20 AM, <li.s...@gmail.com> wrote:
Dear all, please could you describe how to disable defualt mapping of I2C0 and I2C1 interfaces of BBB, so their pins can be used as GPIO?  Thank you for detailed description!


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/bb1e41bf-f6e3-4723-a952-8b687d05b6a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Charles Steinkuehler

unread,
Jun 3, 2016, 4:16:49 PM6/3/16
to beagl...@googlegroups.com
As Gerald mentioned, I2C0 is used for on-board communication to things
like the PMIC, HDMI framer, and EEPROM. It doesn't even connect to
the expansion headers so I'm not sure why you need to turn it into GPIO.

I2C1 does connect to the expansion headers, but should be configured
as GPIO by default unless you specifically loaded an I2C overlay.

If you need more help, please provide specific details regarding
exactly what you need to do, which kernel you are using, and what you
have already tried that didn't work.

--
Charles Steinkuehler
cha...@steinkuehler.net

William Hermans

unread,
Jun 3, 2016, 4:28:24 PM6/3/16
to beagl...@googlegroups.com
william@beaglebone:~$ ls /dev | grep i2c
i2c-0
i2c-2


So I would imagine i2c-2 was meant instead of i2c-1.

But if i2c-0 is used for EEPROM also, what is i2c-2 used for ?

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Charles Steinkuehler

unread,
Jun 3, 2016, 5:30:37 PM6/3/16
to beagl...@googlegroups.com
On 6/3/2016 3:28 PM, William Hermans wrote:
> william@beaglebone:~$ ls /dev | grep i2c
> i2c-0
> i2c-2
>
> So I would imagine i2c-2 was meant instead of i2c-1.
>
> But if i2c-0 is used for EEPROM also, what is i2c-2 used for ?

I2C2 is used for cape EEPROMs (so the cape manager can auto-detect
capes and load the appropriate overlays). It may also be used for I2C
expansion depending on the cape(s) installed.

It is possible (although a bit tricky) to keep the boot-time cape
manager functionality and switch the I2C2 pins to GPIO at runtime by
migrating the pinmux control out of the I2C device-tree entry and into
something like my Universal Cape overlay, then setting the default
mode of the mux to I2C. That way the pins are I2C at startup, then
can be switched to GPIO (or any other supported function) at run-time.

--
Charles Steinkuehler
cha...@steinkuehler.net

William Hermans

unread,
Jun 3, 2016, 5:43:08 PM6/3/16
to beagl...@googlegroups.com
I2C2 is used for cape EEPROMs (so the cape manager can auto-detect
capes and load the appropriate overlays).  It may also be used for I2C
expansion depending on the cape(s) installed.

It is possible (although a bit tricky) to keep the boot-time cape
manager functionality and switch the I2C2 pins to GPIO at runtime by
migrating the pinmux control out of the I2C device-tree entry and into
something like my Universal Cape overlay, then setting the default
mode of the mux to I2C.  That way the pins are I2C at startup, then
can be switched to GPIO (or any other supported function) at run-time.

Thanks Charles, I suppose I already knew that, it just did not click. Granted, I had no idea that the HDMI framer was on the i2c-0 bus too. As far as re-purposing the already existing i2c buses . . . to me it would make more sense to put a GPIO extender on i2c-2, or maybe even i2c-1. *If* one really needs more GPIO . . .



--
Charles Steinkuehler
cha...@steinkuehler.net

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages