Difference between revisions of "UCM-iMX95 Yocto Linux: I2C"
(Created page with "<!-- The following I2C buses and devices are present: {| class="wikitable" style="text-align:center;" |- | '''Device''' || '''I2C bus in Linux''' || '''Address''' || '''HW por...") |
(No difference)
|
Latest revision as of 15:54, 9 January 2025
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