xref: /netbsd-src/share/man/man4/seeprom.4 (revision d27a2166454662c0e0c161b9262cebb4a899060f)
1.\"	$NetBSD: seeprom.4,v 1.6 2013/10/25 22:15:02 wiz Exp $
2.\"
3.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25.\" POSSIBILITY OF SUCH DAMAGE.
26.\"
27.Dd October 25, 2013
28.Dt SEEPROM 4
29.Os
30.Sh NAME
31.Nm seeprom
32.Nd 24-series I2C EEPROM driver
33.Sh SYNOPSIS
34.Cd "seeprom0 at iic0 addr 0x51: AT24Cxx or compatible EEPROM: size 256"
35.Cd "seeprom16 at iic1 addr 0x57: power-supply: size 8192"
36.Sh DESCRIPTION
37The
38.Nm
39driver provides support for the ATMEL 24-series of I2C EEPROMs, and
40compatibles, available from a variety of vendors.
41The Philips PCF8582 is also supported, as compatible with the
42AT24C02.
43.Pp
44Access to the contents of the memory is through a character device.
45.Pp
46The size of the EEPROM is either read from the firmware, or can be set
47using the flags keyword in the kernel configuration.
48The value of the flag represents the EEPROM size in Kbit.
49.Bl -column -offset indent "flags" "EEPROM size in bytes"
50.It Sy flags Ta Sy EEPROM size in bytes
51.It Li 1 Ta 128
52.It Li 2 Ta 256
53.It Li 4 Ta 512
54.It Li 8 Ta 1024
55.It Li 16 Ta 2048
56.It Li 32 Ta 4096
57.It Li 64 Ta 8192
58.It Li 128 Ta 16384
59.It Li 256 Ta 32768
60.It Li 512 Ta 65536
61.El
62.Sh EXAMPLES
63Indirect configuration:
64.Dl seeprom* at iic? addr 0x51 flags 0x2
65Direct configuration:
66.Dl seeprom* at iic? addr?
67.Sh SEE ALSO
68.Xr iic 4
69.Sh HISTORY
70The
71.Nm
72device appeared in
73.Nx 2.0 .
74.Sh BUGS
75AT24C1024 EEPROM's are not supported.
76.Pp
77Software write protection on the AT34Cxx EEPROMs is not supported.
78.Pp
79The
80.Nm
81driver reads and writes one byte at a time to be compatible with all
82controllers.
83