Changeset 2448
- Timestamp:
- 04/18/04 02:38:28 (9 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 3 modified
-
CHANGES (modified) (1 diff)
-
doc/chips/eeprom (modified) (4 diffs)
-
prog/detect/sensors-detect (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r2443 r2448 46 46 Scan all logical devices of PC87365 and PC87366 47 47 Detect LM92, LM76, MAX6633, MAX6634, MAX6635 48 Detect eeproms with software write protect 48 49 49 50 -
lm-sensors/trunk/doc/chips/eeprom
r1907 r2448 8 8 Prefix `eeprom' 9 9 Addresses scanned: I2C 0x50 - 0x57 (inclusive) 10 Datasheets: Publicly available from Atmel (www.atmel.com), 11 Fairchild (www.fairchildsemi.com), and 12 Microchip (www.microchip.com) 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) 13 19 14 20 Chip Size (bits) Address … … 22 28 24C16 16K 0x50 (additional data at 0x51 - 0x57) 23 29 Sony 2K 0x57 30 Microchip 24AA52 2K 0x50 - 0x57, SW write protect at 0x30-37 31 ST M34C02 2K 0x50 - 0x57, SW write protect at 0x30-37 24 32 25 33 … … 73 81 specification, so it is guess work and far from being complete. 74 82 83 The Microchip 24AA52/24LCS52 and the ST M34C02 support an additional 84 software write protect register at 0x30 - 0x37 (0x20 less than the 85 memory location). The chip responds to "write quick" detection at this 86 address but does not respond to byte reads. 87 If this register is present, the lower 128 bytes of the memory 88 array are not write protected. Any byte data write to this address 89 will write protect the memory array permanently, and the device 90 will no longer respond at the 0x30-37 address. 91 The eeprom driver does not support this register. 75 92 76 93 Lacking functionality: … … 85 102 * Enable Writing. Again, no technical reason why not, but making it easy 86 103 to change the contents of the EEPROMs (on DIMMs anyway) also makes it easy 87 to disable the DIMMs until the values are restored somehow. 104 to disable the DIMMs (potentially preventing the computer from booting) 105 until the values are restored somehow. 88 106 89 107 -
lm-sensors/trunk/prog/detect/sensors-detect
r2439 r2448 1245 1245 i2c_addrs => [0x57], 1246 1246 i2c_detect => sub { eeprom_detect 1, @_ }, 1247 }, 1248 { 1249 name => "SPD EEPROM with Software Write-Protect", 1250 driver => "eeprom", 1251 i2c_addrs => [0x50..0x57], 1252 i2c_detect => sub { eeprom_detect 2, @_ }, 1247 1253 }, 1248 1254 { … … 3673 3679 } 3674 3680 3675 # $_[0]: Chip to detect (0 = SPD EEPROM, 1 = Sony Vaio EEPROM) 3681 # $_[0]: Chip to detect (0 = SPD EEPROM, 1 = Sony Vaio EEPROM 3682 # 2 = SPD EEPROM with Software Write Protect) 3676 3683 # $_[1]: A reference to the file descriptor to access this chip 3677 3684 # $_[2]: Address … … 3688 3695 { 3689 3696 my ($chip,$file,$addr) = @_; 3697 my $checksum = 0; 3690 3698 3691 3699 # Check the checksum for validity (works for most DIMMs and RIMMs) 3692 my $checksum = 0; 3693 for (my $i = 0; $i <= 62; $i ++) { 3694 $checksum += i2c_smbus_read_byte_data($file,$i); 3695 } 3696 $checksum &= 255; 3697 return 8 3698 if $chip == 0 and i2c_smbus_read_byte_data($file,63) == $checksum; 3699 3700 # Look for a Sony Vaio EEPROM 3700 if ($chip != 1) { 3701 for (my $i = 0; $i <= 62; $i ++) { 3702 $checksum += i2c_smbus_read_byte_data($file,$i); 3703 } 3704 $checksum &= 255; 3705 $checksum -= i2c_smbus_read_byte_data($file,63); 3706 } 3707 if ($chip == 0) { 3708 if($checksum == 0) { 3709 return 8; 3710 } else { 3711 return 1; 3712 } 3713 } 3714 if ($chip == 2) { 3715 # check for 'shadow' write-protect register at 0x30-37 3716 i2c_set_slave_addr($file,$addr - 0x20); 3717 if(i2c_smbus_write_quick($file,$SMBUS_WRITE) >= 0 && 3718 i2c_smbus_read_byte_data($file,0x80) == -1) { 3719 if($checksum == 0) { 3720 return (9, $addr - 0x20); 3721 } else { 3722 return (2, $addr - 0x20); 3723 } 3724 } 3725 } 3726 3727 # Look for a Sony Vaio EEPROM ($chip == 1) 3701 3728 my $vaioconf = 1; 3702 3729 $vaioconf += 4 … … 3719 3746 3720 3747 if ($vaioconf > 1) { 3721 return if $chip != 1;3722 3748 return $vaioconf; 3723 3749 } 3724 3725 # Even if all tests fail, it still may be an eeprom 3726 return if $chip != 0; 3727 # Default to SPD EEPROM 3728 return 1; 3750 return; 3729 3751 } 3730 3752
