I2CDUMP(8)

πŸ“¦
version 4.4 Β· 2 versions
, in alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– I2CDUMP β€” i2cdump(8) πŸ’–

okay bestie, so like β€” this is the i2cdump manual page from the System Manager's Manual, and I'm gonna walk you through it the way I'd walk you through it at 2am over boba. πŸ§‹βœ¨


✨ NAME ✨

i2cdump β€” examine I2C registers πŸ”


πŸ¦‹ SYNOPSIS πŸ¦‹

i2cdump [-f] [-r first-last] [-y] [-a] i2cbus address [mode [bank
[bankreg]]]
i2cdump -V
i2cdump -h

🌸 DESCRIPTION 🌸

So i2cdump is literally just a tiny lil helper program whose whole entire job is to examine registers that are visible through the I2C bus. that's it. that's the vibe. πŸ’…


πŸ’… OPTIONS πŸ’…

  • -V β€” show me the version and then dip. bye! πŸ‘‹
  • -h β€” show me the help and then dip. also bye! πŸ‘‹
  • -f β€” force access to the device even when it's already busy, no cap. by default i2cdump will refuse to touch a device that's already under the control of a kernel driver. using this flag is dangerous, bestie β€” it can seriously confuse the kernel driver in question, and it can also make i2cdump return invalid results. so use at your own risk and only if you actually know what you're doing. 😭
  • -r first-last β€” limit the range of registers being accessed. this option is not available with mode s. for mode W, first must be even and last must be odd. πŸ“
  • -y β€” disable interactive mode. by default, i2cdump waits for a confirmation from the user before messing with the I2C bus (so polite of her honestly). with this flag it just does the thing directly. this is mainly meant to be used in scripts. πŸ€–
  • -a β€” allow using addresses between 0x00 - 0x07 and 0x78 - 0x7f. not recommended. πŸ™ˆ

At least two options must be provided to i2cdump. i2cbus indicates the number or name of the I2C bus to be scanned, and that number should correspond to one of the busses listed by i2cdetect -l. address indicates the address to be scanned on that bus, and it's an integer between 0x08 and 0x77. 🎯

The mode parameter, if you specify it, is one of the letters b, w, or i, corresponding to a read size of a single byte, a 16-bit word, and an I2C block, respectively. the c mode is a little different β€” it reads all bytes consecutively, and it's useful for chips that have an address auto-increment feature, such as EEPROMs. the W mode is also special: it's similar to w except that a read command will only be issued on even register addresses, which is again mainly useful for EEPROMs. πŸ‘‘

A p can also be appended to the mode parameter (except for i and W) to enable PEC. if the mode parameter is omitted, i2cdump defaults to byte access without PEC. ⭐

The bank and bankreg parameters are useful on the W83781D and similar chips (at the time of writing, all Winbond and Asus chips). bank is an integer between 0 and 7, and bankreg is an integer between 0x00 and 0xFF (default value: 0x4E). the W83781D data sheet has more information on bank selection. πŸ“š


🚨 WARNING 🚨

i2cdump can be dangerous if used improperly. like, genuinely. most notably, the c mode starts with WRITING a byte to the chip. on most chips it will be stored in the address pointer register, which is OK, but some chips with a single register or no (visible) register at all will most likely see this as a real WRITE, resulting in possible misbehavior or corruption. πŸ’€

Do not use i2cdump on random addresses. anyway, it's of little use unless you have good knowledge of the chip you're working with and an idea of what you're looking for. iykyk. 🫢


πŸ”₯ EXAMPLES πŸ”₯

Dump the whole contents of I2C device at 7-bit address 0x50 on bus 9 (i2c-9), using the default read method (byte mode), after user confirmation:

# i2cdump 9 0x50

Immediately dump the whole contents of I2C device at 7-bit address 0x50 on bus 9 (i2c-9), using I2C block read transactions (no user confirmation):

# i2cdump -y 9 0x50 i

If the device is an EEPROM, the output would typically be the same as output of the previous example. 🌈

Dump registers 0x00 to 0x3f of the I2C device at 7-bit address 0x2d on bus 1 (i2c-1), using the default read method (byte mode), after user confirmation:

# i2cdump -r 0x00-0x3f 1 0x2d

πŸ› BUGS πŸ›

To report bugs or send fixes, please write to the Linux I2C mailing list <linux-i2c@vger.kernel.org> with Cc to the current maintainer: Jean Delvare <jdelvare@suse.de>. πŸ“¬

SMBus block mode used to be supported by this tool. please use i2cget instead. ✨


πŸ‘€ SEE ALSO πŸ‘€

i2cdetect(8), i2cget(8), i2cset(8), i2ctransfer(8), isadump(8)


πŸ’œ AUTHOR πŸ’œ

Frodo Looijaard, Mark D. Studebaker and Jean Delvare 🫢

This manual page was originally written by David Z Maze <dmaze@debian.org> for the Debian GNU/Linux system. πŸŽ€


and that's the whole page bestie, we ate and left no crumbs ✨ this one's from the System Manager's Manual, dated May 2022, and it's the i2cdump(8) page β€” mwah πŸ’‹