diff options
| author | imp <imp@NetBSD.org> | 2007-01-12 08:47:43 +0000 |
|---|---|---|
| committer | imp <imp@NetBSD.org> | 2007-01-12 08:47:43 +0000 |
| commit | d6b291ee71a8ca58fb3e609cc2924c0519ecd516 (patch) | |
| tree | 6ffaeb8e88fe73cf401da95b264f4b69e915fba7 /sys/dev/i2c | |
| parent | e142548f7b95d8917f7f46176a4c5c8150126366 (diff) | |
Update a few comments based on newer members of the at24xx family.
Add support for the 128kbit, 256kbit and 512kbit parts. Note issues
with the 1024kbit and larger parts, but don't add support for them at
this time. I've not updated with the explosion of part numbers in
this family.
Diffstat (limited to 'sys/dev/i2c')
| -rw-r--r-- | sys/dev/i2c/at24cxx.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/dev/i2c/at24cxx.c b/sys/dev/i2c/at24cxx.c index e83f43f841c..74907a0bfb1 100644 --- a/sys/dev/i2c/at24cxx.c +++ b/sys/dev/i2c/at24cxx.c @@ -1,4 +1,4 @@ -/* $NetBSD: at24cxx.c,v 1.6 2007/01/10 18:53:31 cube Exp $ */ +/* $NetBSD: at24cxx.c,v 1.7 2007/01/12 08:47:43 imp Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -52,8 +52,11 @@ /* * AT24Cxx EEPROM I2C address: - * * 101 0xxx + * (and others depending on the exact model) The bigger 8-bit parts + * decode multiple addresses. The bigger 16-bit parts do too (those + * larger than 512kb). Be sure to check the datasheet of your EEPROM + * because there's much variation between models. */ #define AT24CXX_ADDRMASK 0x78 #define AT24CXX_ADDR 0x50 @@ -125,8 +128,12 @@ seeprom_attach(struct device *parent, struct device *self, void *aux) * using the bottom 1, 2, or 3 to select the 256-byte * super-page. * - * The AT24C32/64 EEPROMs use a 2 byte command word and - * decode all of the i2c address bits. + * The AT24C32/64/128/256/512 EEPROMs use a 2 byte command + * word and decode all of the i2c address bits. + * + * The AT24C1024 EEPROMs use a 2 byte command and also do bank + * switching to select the proper super-page. This isn't + * supported by this driver. */ sc->sc_size = ia->ia_size; switch (sc->sc_size) { @@ -140,6 +147,9 @@ seeprom_attach(struct device *parent, struct device *self, void *aux) case 4096: /* 32Kbit */ case 8192: /* 64Kbit */ + case 16384: /* 128Kbit */ + case 32768: /* 256Kbit */ + case 65536: /* 512Kbit */ sc->sc_cmdlen = 2; break; |
