Use I2C2 on Apalis iMX6

The datasheet of the Apalix iMX6 states that while the processor has 3 I2C controllers, I2C2 is not available for general use. I see that there are several I2C devices on the SoM itself (analog touch controller, voltage regulator and audio codec) that connect to I2C2, and it is also used on the Ixora board for the HDMI DDC interface.

Now we have a custom baseboard that does not include the HDMI connection. Provided I disable everything HDMI related in the device tree, will this mean I2C2 is available for other devices after all, or is there another reason it cannot be used?

Is it possible at all to use the I2C2 bus for other purposes, provided I do not care about strict adherence to the Apalis specification?

Thanks in advance,

Jeroen

The real imx6 I2C2 is not available outside of the module. Apalis standard I2C2 that is used for DDC on Apalis imx6 is not a “real” i2c, it’s a linux kernel GPIO bitbanging implementation. Yes it can be used for something else, but it comes with severely limited bandwidth, high latency, and increased IO load. That’s why we’re recommending against using it for anything other then DDC.

More information about i2c on our modules:

Ah, I see, I didn’t realize those are two different I2C2 buses. But I’m still confused: in imx6qdl-apalis.dtsi is the i2cddc node that eventually maps to i2c0 in Linux, and which is used for the HDMI DDC. That bus uses GPIO3_IO16 and GPIO2_IO30 pins.

I also see the on-module I2C2, which has the voltage regulator etc in it, and which uses the I2C2_SCL and I2C2_SDA pins.

However, looking at the functions list in the Apalis iMX6 datasheet, GPIO3_IO16 is the same physical pin as I2C2_SDA (and the same GPIO2_IO30 and I2C2_SCL). So how does it work that I2C2 is not exposed on the Apalis connector, but I2C0 (a.k.a. i2cddc) is?

We’re using I2C2 on the module using alternate set of pins, that’s why we cant’t mux I2C2 on GPIO3_IO16 and GPIO2_IO30 pair and have to use the software emulated one.