Using a 2nd I2C bus on iMX6 with Iris carrier

Our system uses an iMX6 Solo on an Iris carrier board, and we have been using the existing I2C bus off of Iris connector X16 (pins 5 & 6) successfully.

Circumstances require the use of a 2nd I2C bus, which is available on connector X16 (pins 8 & 11) with some re-configuration. The problem is that I cannot get this to work and I’m at my wits end. We are experimenting with the GPIO tool, and it seems pretty clear what I should do, however I must be missing something fundamental.

The GPIO tool shows this for the default I2C configuration:

  • GPIO3, AltFn name = i2c.I2C3_SCL, SODIMM # = 196
  • GPIO 6, AltFn name = i2c.I2C3_SDA, SODIMM # = 194

Section 3.9.3 of the iMX6 data sheet shows that SODIMM pins 194 and 196 are mapped to X16 pins 5 and 6 respectively, which we have been using successfully.

In my C# I2C test program, this all works as long as I open “I2C1” (not “I2C3”). I found that puzzling because it’s actually I2C3 according to the GPIO tool, but it works so I’m Ok with it.

Now, to use a 2nd I2C bus, the GPIO tools permits us this capability:

  • GPIO 85, AltFn name = i2c.I2C1_SCL, SODIMM # = 88
  • GPIO 92, AltFn name = i2c.I2C1_SDA, SODIMM # = 92

Section 3.9.3 of the iMX6 data sheet shows that SODIMM pins 88 and 92 are mapped to X16 pins 8 and 11 respectively.

So after changing the X16 connections, I finally determine that to use I2C1 (from the GPIO tool) my test code has to open “I2C3”. Somewhere the I2C1 and IcC3 wires get crossed, but that’s not an issue once you understand it.

Anyway, my test code does not work with the I2C re-configured as described. I ‘m using external 2.2K pullups, by the way. A ‘scope shows that an I2C read causes both SCL and SDA to go low for about ¼ second, but there is no evidence of a recognizable I2C signal.

Once this is all working we will be using the Toradex libraries to configure the 2nd I2C bus, but for now it would be nice to see it working as configured.

Any thoughts on what I might be missing?

I cited the iMX6 data sheet for connector X16, but it’s actually the Iris data sheet.

We use I2C1 for the I2C instance that is connected to the standard I2C pins of the colibri connector (194 and 196).
The matching between the I2C number in the libs and the physical I2C instance is documented inside the libraries documentation. I report the information here.
alt text
I know that this may sound confusing, but having I2C1 always on the default pins will allow your application to run on all our modules, without changing anything in the code.
Do you configure those pins using GPIOMux or you configure them in our library?
Some additional muxing bits must be set (SION bit) and also some other daisy chain registers need to be configured, and this should be done automatically by the libraries when you set the pin-related parameters that you can pass to I2C_SetConfigString.

We are now trying the solution using the Toradex libraries, but are still having issues. A follow-up question has been posted here:
https://www.toradex.com/community/questions/11959/using-a-2nd-i2c-bus-on-imx6-with-iris-carrier-part.html