minix/commands/eepromread/eepromread.1
Thomas Cort 13054fd168 eepromread: support for reading from /dev/eeprom
eepromread could only read EEPROMs through the /dev/i2c interface.
Once the cat24c256 driver is started and claims/reserves the
device, it can no longer be read through the /dev/i2c interface.

This patch adds support for reading from EEPROMs through the
/dev/eeprom interface. For example, to read the on-board eeprom
on the BBB, one would do `eepromread -f /dev/eepromb1s50 -i`.

Change-Id: If08ce37231e593982eeb109bdd6d5458ad271108
2013-11-11 10:14:03 -05:00

59 lines
1.7 KiB
Groff

.TH EEPROMREAD 1
.SH NAME
eepromread \- read data from an EEPROM
.SH SYNOPSIS
\fBeepromread\fR [\fB\-i\fR] [\fB\-f\fR \fIdev\fR] [\fB\-a\fR \fIslave_addr\fR]
[\fB\-n\fR]
.br
.de FL
.TP
\\fB\\$1\\fR
\\$2
..
.de EX
.TP 20
\\fB\\$1\\fR
# \\$2
..
.SH OPTIONS
.TP 5
.B \-i
# interpret the data on the EEPROM and display it as a set of fields.
.TP 5
.B \-f
# Use \fIdevice\fR instead of \fI/dev/i2c-1\fR.
.TP 5
.B \-a
# Use \fIslave_address\fR instead of \fI0x50\fR.
.TP 5
.B \-n
# Do not send the page number when addressing the memory on the EEPROM. Some
smaller EEPROM chips aren't organized into pages and get confused if a page
number is sent with the memory address. Use this when reading EDID.
.SH EXAMPLES
.TP 20
.B eepromread -i
# display the contents of the EEPROM as a list of label:value pairs.
.TP 20
.B eepromread
# display the first 256 bytes of the EEPROM in HEX and ASCII.
.TP 20
.B eepromread -f /dev/i2c-3 -a 0x54
# display the first 256 bytes of the EEPROM on I2C bus 3, slave address 0x54.
.TP 20
.B eepromread -f /dev/i2c-3 -n
# read the EDID info from the display on I2C bus 3 on the BeagleBoard-xM.
.TP 20
.B eepromread -f /dev/eepromb1s50 -i
# access the EEPROM through the /dev/eeprom interface once the
cat24c256 driver has been started.
.SH DESCRIPTION
.PP
\fIeepromread\fR is a simple tool for viewing the contents of an EEPROM.
For EEPROM data that is in a specific format that this program knows how to
detect, \fIeepromread\fR can properly format each of the fields and display
the information via the \fI-i\fR command line option.
.SH NOTES
If the \fIcat24c256\fR driver has claimed the EEPROM device that this
program is attempting to read from, then you must access it through
the /dev/eeprom interface rather than the /dev/i2c interface.