UCM-iMX95 Yocto Linux: I2C
To list all buses run:
i2cdetect -l
To inspect a bus run:
i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- UU -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: UU UU UU UU -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
UU marks a device that is used by a driver, while numbers mark unused devices
To inspect a device at i2c address 0x50 run:
cat /sys/bus/i2c/devices/1-0050/uevent
We see that this is an EEPROM.
An example of how to dump EEPROM contents:
hexdump -C /sys/bus/i2c/devices/1-0050/eeprom