I2C Controller(Device Node) Information

In ODROID-C4/N2/M1, there are two I2C controllers, I2C0 and I2C1.

Here is the I2C controller information for our Ubuntu image.


Pin Number SDA(#GPIO) SCL(#GPIO) Default Speed Max Speed Device Node
3(SDA), 5(SCL) GPIOX.17(#493) GPIOX.18(#494) 400 KHz 2 MHz /dev/i2c-0
27(SDA), 28(SCL) GPIOA.14(#474) GPIOA.15(#475) 100 KHz 2 MHz /dev/i2c-1


Pin Number SDA(#GPIO) SCL(#GPIO) Device Node
3(SDA), 5(SCL) GPIO3B.6(#110) GPIO3B.5(#109) /dev/i2c-0
27(SDA), 28(SCL) GPIO0B.4(#12) GPIO0B.3(#11) /dev/i2c-1

By default, the two I2C buses are enabled without any edits.
Check your DT Overlays file in “/boot/config.ini”

$ sudo vi /boot/config.ini
overlays="i2c0 i2c1 spi0 uart0"

Add the “i2c0” or “i2c1” you want in “overlays=” if they are absent.
After reboot, you can find the I2C node with this command.

$ ls /dev/i2c*
/dev/i2c-0  /dev/i2c-1

If you want to use Pin #3, #5, #27, #28 in 40Pin as GPIO, you have to disable the I2C function first.
Open the “config.ini” file in “/media/boot”.

$ sudo vi /boot/config.ini

And then, remove the i2c you want to disable.
This config.ini means that the i2c0 is disabled.

overlays="spi0 i2c1 uart0"

After reboot, you can check the “/dev/” node.

$ ls /dev/i2c*
  • odroid-m1/application_note/gpio/i2c.txt
  • Last modified: 2022/05/10 09:51
  • by luke.go