| 1 | Kernel driver `eeprom.o' |
|---|
| 2 | ======================== |
|---|
| 3 | |
|---|
| 4 | Status: Complete and well-tested |
|---|
| 5 | |
|---|
| 6 | Supported chips: |
|---|
| 7 | * Any EEPROM chip in the designated address range |
|---|
| 8 | Prefix: 'eeprom' |
|---|
| 9 | Addresses scanned: I2C 0x50 - 0x57 |
|---|
| 10 | Datasheets: Publicly available from: |
|---|
| 11 | Atmel (www.atmel.com), |
|---|
| 12 | Catalyst (www.catsemi.com), |
|---|
| 13 | Fairchild (www.fairchildsemi.com), |
|---|
| 14 | Microchip (www.microchip.com), |
|---|
| 15 | Philips (www.semiconductor.philips.com), |
|---|
| 16 | Rohm (www.rohm.com), |
|---|
| 17 | ST (www.st.com), |
|---|
| 18 | Xicor (www.xicor.com), |
|---|
| 19 | and others. |
|---|
| 20 | |
|---|
| 21 | Chip Size (bits) Address |
|---|
| 22 | 24C01 1K 0x50 (shadows at 0x51 - 0x57) |
|---|
| 23 | 24C01A 1K 0x50 - 0x57 (Typical device on DIMMs) |
|---|
| 24 | 24C02 2K 0x50 - 0x57 |
|---|
| 25 | 24C04 4K 0x50, 0x52, 0x54, 0x56 |
|---|
| 26 | (additional data at 0x51, 0x53, 0x55, 0x57) |
|---|
| 27 | 24C08 8K 0x50, 0x54 (additional data at 0x51, 0x52, |
|---|
| 28 | 0x53, 0x55, 0x56, 0x57) |
|---|
| 29 | 24C16 16K 0x50 (additional data at 0x51 - 0x57) |
|---|
| 30 | Sony 2K 0x57 |
|---|
| 31 | |
|---|
| 32 | Atmel 34C02B 2K 0x50 - 0x57, SW write protect at 0x30-37 |
|---|
| 33 | Catalyst 34FC02 2K 0x50 - 0x57, SW write protect at 0x30-37 |
|---|
| 34 | Catalyst 34RC02 2K 0x50 - 0x57, SW write protect at 0x30-37 |
|---|
| 35 | Fairchild 34W02 2K 0x50 - 0x57, SW write protect at 0x30-37 |
|---|
| 36 | Microchip 24AA52 2K 0x50 - 0x57, SW write protect at 0x30-37 |
|---|
| 37 | ST M34C02 2K 0x50 - 0x57, SW write protect at 0x30-37 |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | Author: Frodo Looijaard <frodol@dds.nl> and Philip Edelbrock |
|---|
| 41 | <phil@netroedge.com> |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | Module Parameters |
|---|
| 45 | ----------------- |
|---|
| 46 | |
|---|
| 47 | * checksum: int |
|---|
| 48 | Only accept eeproms whose checksum is correct |
|---|
| 49 | * force: short array (min = 1, max = 48) |
|---|
| 50 | List of adapter,address pairs to boldly assume to be present |
|---|
| 51 | * force_eeprom: short array (min = 1, max = 48) |
|---|
| 52 | List of adapter,address pairs which are unquestionably assumed to contain |
|---|
| 53 | a `eeprom' chip |
|---|
| 54 | * ignore: short array (min = 1, max = 48) |
|---|
| 55 | List of adapter,address pairs not to scan |
|---|
| 56 | * ignore_range: short array (min = 1, max = 48) |
|---|
| 57 | List of adapter,start-addr,end-addr triples not to scan |
|---|
| 58 | * probe: short array (min = 1, max = 48) |
|---|
| 59 | List of adapter,address pairs to scan additionally |
|---|
| 60 | * probe_range: short array (min = 1, max = 48) |
|---|
| 61 | List of adapter,start-addr,end-addr triples to scan additionally |
|---|
| 62 | |
|---|
| 63 | |
|---|
| 64 | Description |
|---|
| 65 | ----------- |
|---|
| 66 | |
|---|
| 67 | This is a simple EEPROM module meant to enable reading the first 256 bytes |
|---|
| 68 | of an EEPROM (on a SDRAM DIMM for example). However, it will access serial |
|---|
| 69 | EEPROMs on any I2C adapter. The supported devices are generically |
|---|
| 70 | called 24Cxx, and are listed above; however the numbering |
|---|
| 71 | for these industry-standard devices may vary by manufacturer. |
|---|
| 72 | |
|---|
| 73 | This module was a programming exercise to get used to the new project |
|---|
| 74 | organization laid out by Frodo, but it should be at least completely |
|---|
| 75 | effective for decoding the contents of EEPROMs on DIMMs. |
|---|
| 76 | |
|---|
| 77 | DIMMS will typically contain a 24C01A or 24C02, or the 34C02 variants. |
|---|
| 78 | The other devices will not be found on a DIMM because |
|---|
| 79 | they respond to more than one address. |
|---|
| 80 | |
|---|
| 81 | DDC Monitors may contain any device. Often a 24C01, which responds |
|---|
| 82 | to all 8 addresses, is found. See the 'ddcmon' driver which has |
|---|
| 83 | specialized /proc entries for DDC monitors. If the eeprom driver is |
|---|
| 84 | loaded before the ddcmon driver and there is no 'ignore' line in the |
|---|
| 85 | /etc/sensors.conf file, the eeprom driver will latch onto the DDC monitor |
|---|
| 86 | eeprom. |
|---|
| 87 | |
|---|
| 88 | Recent Sony Vaio laptops have an EEPROM at 0x57. We couldn't get the |
|---|
| 89 | specification, so it is guess work and far from being complete. |
|---|
| 90 | |
|---|
| 91 | The Microchip 24AA52/24LCS52, ST M34C02, and others support an additional |
|---|
| 92 | software write protect register at 0x30 - 0x37 (0x20 less than the |
|---|
| 93 | memory location). The chip responds to "write quick" detection at this |
|---|
| 94 | address but does not respond to byte reads. |
|---|
| 95 | If this register is present, the lower 128 bytes of the memory |
|---|
| 96 | array are not write protected. Any byte data write to this address |
|---|
| 97 | will write protect the memory array permanently, and the device |
|---|
| 98 | will no longer respond at the 0x30-37 address. |
|---|
| 99 | The eeprom driver does not support this register. |
|---|
| 100 | |
|---|
| 101 | Lacking functionality: |
|---|
| 102 | |
|---|
| 103 | * Full support for larger devices (24C04, 24C08, 24C16). These are |
|---|
| 104 | not typically found on a PC. These devices will appear as separate |
|---|
| 105 | devices at multiple addresses. |
|---|
| 106 | |
|---|
| 107 | * Support for really large devices (24C32, 24C64, 24C128, 24C256, 24C512). |
|---|
| 108 | These devices require two-byte address fields and are not supported. |
|---|
| 109 | |
|---|
| 110 | * Enable Writing. Again, no technical reason why not, but making it easy |
|---|
| 111 | to change the contents of the EEPROMs (on DIMMs anyway) also makes it easy |
|---|
| 112 | to disable the DIMMs (potentially preventing the computer from booting) |
|---|
| 113 | until the values are restored somehow. |
|---|
| 114 | |
|---|
| 115 | |
|---|
| 116 | Use: |
|---|
| 117 | |
|---|
| 118 | After inserting the module (and any other required smbus/i2c modules), you |
|---|
| 119 | should have some EEPROM directories in /proc/sys/dev/sensors/ of names such |
|---|
| 120 | as "eeprom-i2c-0-50". Inside each of these is a series of files which |
|---|
| 121 | represent 16 bytes blocks from the EEPROM. The data is in decimal (base |
|---|
| 122 | 10) delimited by spaces. |
|---|
| 123 | |
|---|
| 124 | Note: |
|---|
| 125 | |
|---|
| 126 | EEPROMs reported are not nessesarily all from DIMMs. Xeon processors, for |
|---|
| 127 | example, have serial EEPROMs in them connected to the SMBus which will be |
|---|
| 128 | found by the module. Take care to ignore the output of decode-dimms.pl for |
|---|
| 129 | these EEPROMs. There is decode-xeon.pl for them. Same applies to Vaio |
|---|
| 130 | EEPROMs, which have decode-vaio.pl. |
|---|
| 131 | |
|---|
| 132 | The driver caches the data from the monitor and only rereads it |
|---|
| 133 | from the eeprom if the cache is more than 5 minutes old. |
|---|
| 134 | |
|---|
| 135 | |
|---|
| 136 | Decode-dimms.pl |
|---|
| 137 | --------------- |
|---|
| 138 | |
|---|
| 139 | This Perl script attempts to make sense of the first 128 bytes of a SDRAM |
|---|
| 140 | PC-100 DIMM. Using the 'Serial Presence Detect (SPD)' Spec (Rev1.2a)** from |
|---|
| 141 | Intel. When finished, it will decode and report all the values defined in |
|---|
| 142 | the spec. Much of the information is technical timing and interfacing info |
|---|
| 143 | (probably not all used by the BIOS or clocking IC). |
|---|
| 144 | |
|---|
| 145 | Note: During testing, we noticed that many DIMMs have trucated SPD records. |
|---|
| 146 | I'm not sure if these conform to an old spec, or if the manufacturers are |
|---|
| 147 | simply just taking shortcuts. But, many DIMMs have all zeros stored past |
|---|
| 148 | byte 21. I asked an Intel SDRAM tester, Sat Kolli (skolli@smartm.com), |
|---|
| 149 | about this and this is what he had to say: |
|---|
| 150 | |
|---|
| 151 | "[...] Now in terms of SPD contents, you are right that people do all kinds |
|---|
| 152 | of things. The way to insure that any module works is to look for the most |
|---|
| 153 | basic information, such as module bank density, number of banks, and device |
|---|
| 154 | addresses. That will give you the module size and what devices are used. It |
|---|
| 155 | is very difficult to verify if the module is PC-100, because of |
|---|
| 156 | inconsistencies between spd data from different manufacturers. You could |
|---|
| 157 | read the timing information or the special Intel bytes (126 & 127) but I do |
|---|
| 158 | not know how many program that information. These inconsistencies may be |
|---|
| 159 | minimized if you or your customers stay with some of the better known |
|---|
| 160 | manufacturers." (Thanks goes to Sat Kolli for his comments and help.) |
|---|
| 161 | |
|---|
| 162 | Use: |
|---|
| 163 | |
|---|
| 164 | After inserting the necessary modules, run the script! |
|---|
| 165 | |
|---|
| 166 | Notes: |
|---|
| 167 | |
|---|
| 168 | The script assumes that Perl can be found at /usr/bin/perl. If different, |
|---|
| 169 | you will need to adjust the first line of the file accordingly, or else |
|---|
| 170 | you will get a strange "decode-dimms.pl: no such file or directory" error. |
|---|
| 171 | |
|---|
| 172 | Also note that the script assumes that _all_ the eeproms belong to DIMMs, |
|---|
| 173 | which may not be the case. |
|---|
| 174 | |
|---|
| 175 | |
|---|
| 176 | Decode-vaio.pl |
|---|
| 177 | -------------- |
|---|
| 178 | |
|---|
| 179 | This Perl script looks for a Sony Vaio EEPROM at 0x57. If your system is not |
|---|
| 180 | a Sony Vaio laptop, you just don't care. If your system is an old Vaio, you |
|---|
| 181 | probably don't have an EEPROM on it and this script will be useless to you |
|---|
| 182 | as well. |
|---|
| 183 | |
|---|
| 184 | Use: |
|---|
| 185 | |
|---|
| 186 | After inserting the necessary modules, run the script! |
|---|
| 187 | |
|---|
| 188 | Notes: |
|---|
| 189 | |
|---|
| 190 | The script assumes that Perl can be found at /usr/bin/perl. If different, |
|---|
| 191 | you will need to adjust the first line of the file accordingly, or else |
|---|
| 192 | you will get a strange "decode-vaio.pl: no such file or directory" error. |
|---|
| 193 | |
|---|
| 194 | |
|---|
| 195 | Decode-edid.pl |
|---|
| 196 | |
|---|
| 197 | This Perl script acts as an interface between the eeprom module and |
|---|
| 198 | parse-edid, which is part of read-edid. Read-edid is a tool for gathering |
|---|
| 199 | information on VESA PNP monitors. It is somewhat similar to what our |
|---|
| 200 | ddcmon driver does, except that ddcmon outputs user-oriented data while |
|---|
| 201 | read-edid generates a a computer oriented configuration file (primarily |
|---|
| 202 | for XFree86). |
|---|
| 203 | |
|---|
| 204 | Read-edid is made of two components, get-edid which retrieves binary data |
|---|
| 205 | from the monitor, and parse-edid which decodes the data into useful |
|---|
| 206 | information. Get-edid uses low level functions, and relies on compliance |
|---|
| 207 | of both the video card and the monitor to some standard (DCC as it is |
|---|
| 208 | called). It may not work for everyone. On the other hand, some video |
|---|
| 209 | cards make this information available on an I2C bus and we are able to |
|---|
| 210 | get it using our eeprom module. That's why we wrote this script that |
|---|
| 211 | converts the data as exported by our eeprom module into what parse-edid |
|---|
| 212 | expects from get-edid. That way, users who can't get get-edid to work |
|---|
| 213 | still have a chance to be able to retrieve the wanted information thanks |
|---|
| 214 | to the lm_sensors modules and tools. |
|---|
| 215 | |
|---|
| 216 | Use: |
|---|
| 217 | |
|---|
| 218 | Unload the ddcmon if it was loaded, load the eeprom module instead. Then, |
|---|
| 219 | run the script. The script will try to figure out on which I2C bus and at |
|---|
| 220 | which address is the eeprom, but it may fail. In this case, you can pass |
|---|
| 221 | the parameters to the script. Examples: |
|---|
| 222 | |
|---|
| 223 | decode-edid.pl 1 |
|---|
| 224 | decode-edid.pl 2 0x50 |
|---|
| 225 | |
|---|
| 226 | You will find additional details in the script itself. Read-edid is avilable |
|---|
| 227 | there: |
|---|
| 228 | http://john.fremlin.de/programs/linux/read-edid/ |
|---|