I2C pins for i2c-0 and i2c-1

I noticed, even without the GB-I2C0.dtbo enabled in uEnv.txt, that there is a /dev/i2c-0 device on the Giantboard. The documentation is silent on the default I2C device. What pins does this connect to?

When I enable GB-I2C0.dtbo, I now see /dev/i2c-0 and /dev/i2c-1. What pins does i2c-1 connect to?

I’m especially interested in which one connects to PC0 / PB31, which are marked on the graphic of the board here https://groboards.com/wp-content/uploads/2019/01/giantboard.png as SCL and SDA.

BTW, nice job on the simple giantboard-tools project. After working with Buildroot and Yocto, this is a welcome simplicity.

Maybe I’ve answered my own question. I found the at91-sama5d27_giantboard.dts in giantboard-tools/patches/kernel, and by default, i2c0 is disabled while i2c1 is enabled. The pins for i2c0 are PB31 and PC0, while the pins for i2c1 are PD4 and PD5. Checking the schematic, these latter two go to the Qorvo PMIC, which makes sense. I don’t know if i2c1 gets automatically shifted to /dev/i2c-1 when both are enabled or not, but I guess I could experiment with i2c tools to find out.

Hello, sorry for the delayed response. You are correct that the i2c bus does shift when you enable the overlay. The reason being that technically i2c1 is connected to the PMIC, but Linux labels them as they come up. If you enable the overlay for i2c0 it shifts the PMIC is 1.

1 Like

Hi…Could you confirm you have the Pi B with the 26 pin header plus separate (unpopulated) 8 pin header?
I have one of those and I2C does work on both buses.