diff --git a/CONTRIBUTORS b/CONTRIBUTORS index c0752df2..f3c81729 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -23,7 +23,11 @@ problems. * Kyösti Mälkki Author of the i2c-via and sis5595 drivers. * Mark D. Studebaker - Author of the i2c-ali15x3 driver, as well as other drivers. + Author of the i2c-ali15x3 bus driver and the i2c-i810 bus driver. + Added w83782d, w83783s, and w83627hf support to the w83781d driver. + Added max1617 support to the adm1021 driver. + Added lm81 support to the adm9240 driver. + Author of the decode-xeon.pl xeon EEPROM decoder. * Geert Uytterhoeven Author of the i2c-hydra driver. * Adrian Baugh diff --git a/README b/README index a24ce8d5..2a58602a 100644 --- a/README +++ b/README @@ -23,12 +23,12 @@ and module bit-mb is renamed i2c-via. You have been warned. At least the following SMBus adapters are supported: Intel PIIX4 (used in most Intel chipsets) - Intel ICH (used Intel 810 chipsets for Celeron processors) + Intel ICH (used in Intel 810 chipsets for Celeron processors) Acer Labs M1541 and M1543C (used in the Aladdin IV, V and Pro 2 chipsets) VIA Technologies 82C586B (used in most VIA chipsets) At least the following hardware sensor chips are supported: - National Semicoductor LM75, LM78, LM78-J, LM79 and LM80 + National Semicoductor LM75, LM78, LM78-J, LM79. LM80, and LM81 Winbond W83781D, W83782D, W83783S, and W83627HF Genesys Logic GL518SM (several revisions) Analog Devices ADM1021 and ADM9240 @@ -42,6 +42,7 @@ At least the following hardware sensor chips are supported: We also support some miscellaneous chips: Linear Technologies LTC1710 Dimms with EEPROMs + Intel Xeon processor embedded EEPROMs We could use some testers of hardware. If you own a specific monitoring chip or I2C bus, and are willing to help us out, please contact us - even diff --git a/doc/chips/SUMMARY b/doc/chips/SUMMARY index f990238f..a2166c98 100644 --- a/doc/chips/SUMMARY +++ b/doc/chips/SUMMARY @@ -4,13 +4,17 @@ This is a summary of the sensor and non-sensor chips supported by this package. It summarizes the features of each supported chip. For further information on a particular chip, see the documentation -in this directory. +in this directory. Data sheets are generally available on the +manufacturer's web site. -To determine what chips you have on your system, +To determine what chips you have in your system, run prog/detect/sensors-detect. +If your sensor chip is not detected or supported by this package, +please send mail to lm78@stimpy.netroedge.com. - +--------------------------------------------------------------------- +--------------------------------------------------------------------- SENSOR CHIPS ------------- @@ -26,8 +30,9 @@ adm1021 xeon 1 - - - yes no adm9240 - adm9240 1 6 5 1 dac yes no - ds1780 1 6 5 1 dac yes no + adm9240 1 6 2 1 dac yes no + ds1780 1 6 2 1 dac yes no + lm81 1 6 2 1 dac yes no gl518sm gl518sm (r00) 1 1/4 2 - yes no @@ -48,7 +53,9 @@ lm80 lm80 1 7 2 - yes no maxilife - maxilife 5 4 3 - yes no + maxilife-as 5 4 3 - yes no + maxilife-co 5 4 3 - yes no + maxilife-cg 5 4 3 - yes no sis5595 sis5595 1 7 3 - no yes diff --git a/doc/chips/adm9240 b/doc/chips/adm9240 index c0647dc8..17509702 100644 --- a/doc/chips/adm9240 +++ b/doc/chips/adm9240 @@ -12,6 +12,10 @@ Supported chips: Prefix `ds1780' Addresses scanned: I2C 0x2c - 0x2f (inclusive) Datasheet: Publicly available at the Dallas Semiconductor website + * National Semiconductor LM81 + Prefix `lm81' + Addresses scanned: I2C 0x2c - 0x2f (inclusive) + Datasheet: Publicly available at the National Semiconductor website Author: Frodo Looijaard and Philip Edelbrock @@ -29,6 +33,9 @@ Module Parameters * force_ds1780: short array (min = 1, max = 48) List of adapter,address pairs which are unquestionably assumed to contain a `ds1780' chip +* force_lm81: short array (min = 1, max = 48) + List of adapter,address pairs which are unquestionably assumed to contain + a `lm81' chip * ignore: short array (min = 1, max = 48) List of adapter,address pairs not to scan * ignore_range: short array (min = 1, max = 48) @@ -42,12 +49,13 @@ Module Parameters Description ----------- -This driver implements support for the Analog Devices ADM9240 and -Dallas Semiconductor DS1780 chips. These chips appear to be completely +This driver implements support for the Analog Devices ADM9240, +Dallas Semiconductor DS1780, and National Semiconductor LM81 chips. +These chips appear to be completely identical, except for the manufacturer IDs encoded in two registers, and the speed with which they update their sensor readings. -The ADM9240 and DS1780 implement six voltage sensors, a temperature sensor, +The chips implement six voltage sensors, a temperature sensor, two FAN rotation speed sensors, VID lines and some miscellaneous stuff. Temperatures are measured in degrees Celcius. An alarm is triggered whenever @@ -92,8 +100,9 @@ hardware registers are read whenever any data is read (unless it is less than 1.5 seconds since the last update). This means that you can easily miss once-only alarms. -Thes ADM9240 only updates its values every 0.5 seconds; the DS1760 one -every 2 seconds; reading them more often will do no harm, but will return +Thes ADM9240 only updates its values every 0.5 seconds; the DS1780 one +every 2 seconds; and the LM81 every 0.4 seconds. +Reading them more often will do no harm, but will return 'old' values. (NB: theoretically, this could be done much faster for the ADM9240, but there is no real reason to do so, and this way the SMBus use is kept within reasonable limits) @@ -234,6 +243,73 @@ Chip `ds1780' analog_out SENSORS_DS1780_ANALOG_OUT analog_out:1 +Chip `lm81' + LABEL LABEL CLASS COMPUTE CLASS ACCESS MAGNITUDE + 2.5V NONE NONE R 2 + Vccp1 NONE NONE R 2 + 3.3V NONE NONE R 2 + 5V NONE NONE R 2 + 12V NONE NONE R 2 + Vccp2 NONE NONE R 2 + 2.5V_min 2.5V 2.5V RW 2 + Vccp1_min Vccp1 Vccp1 RW 2 + 3.3V_min 3.3V 3.3V RW 2 + 5V_min 5V 5V RW 2 + 12V_min 12V 12V RW 2 + Vccp2_min Vccp2 Vccp2 RW 2 + 2.5V_max 2.5V 2.5V RW 2 + Vccp1_max Vccp1 Vccp1 RW 2 + 3.3V_max 3.3V 3.3V RW 2 + 5V_max 5V 5V RW 2 + 12V_max 12V 12V RW 2 + Vccp2_max Vccp2 Vccp2 RW 2 + fan1 NONE NONE R 0 + fan2 NONE NONE R 0 + fan1_min fan1 fan1 RW 0 + fan2_min fan2 fan2 RW 0 + temp NONE NONE R 1 + temp_hyst temp temp RW 1 + temp_over temp temp RW 1 + vid NONE NONE R 2 + fan1_div fan1 NONE RW 0 + fan2_div fan2 NONE RW 0 + alarms NONE NONE R 0 + analog_out NONE NONE RW 0 + + LABEL FEATURE SYMBOL SYSCTL FILE:NR + 2.5V SENSORS_ADM9240_IN0 2.5V:3 + Vccp1 SENSORS_ADM9240_IN1 Vccp1:3 + 3.3V SENSORS_ADM9240_IN2 3.3V:3 + 5V SENSORS_ADM9240_IN3 5V:3 + 12V SENSORS_ADM9240_IN4 12V:3 + Vccp2 SENSORS_ADM9240_IN5 Vccp2:3 + 2.5V_min SENSORS_ADM9240_IN0_MIN 2.5V:1 + Vccp1_min SENSORS_ADM9240_IN1_MIN Vccp1:1 + 3.3V_min SENSORS_ADM9240_IN2_MIN 3.3V:1 + 5V_min SENSORS_ADM9240_IN3_MIN 5V:1 + 12V_min SENSORS_ADM9240_IN4_MIN 12V:1 + Vccp2_min SENSORS_ADM9240_IN5_MIN Vccp2:1 + 2.5V_max SENSORS_ADM9240_IN0_MAX 2.5V:2 + Vccp1_max SENSORS_ADM9240_IN1_MAX Vccp1:2 + 3.3V_max SENSORS_ADM9240_IN2_MAX 3.3V:2 + 5V_max SENSORS_ADM9240_IN3_MAX 5V:2 + 12V_max SENSORS_ADM9240_IN4_MAX 12V:2 + Vccp2_max SENSORS_ADM9240_IN5_MAX Vccp2:2 + fan1 SENSORS_ADM9240_FAN1 fan1:2 + fan2 SENSORS_ADM9240_FAN2 fan2:2 + fan1_min SENSORS_ADM9240_FAN1_MIN fan1:1 + fan2_min SENSORS_ADM9240_FAN2_MIN fan2:1 + temp SENSORS_ADM9240_TEMP temp:3 + temp_hyst SENSORS_ADM9240_TEMP_HYST temp:2 + temp_over SENSORS_ADM9240_TEMP_OVER temp:1 + vid SENSORS_ADM9240_VID vid:1 + fan1_div SENSORS_ADM9240_FAN1_DIV fan_div:1 + fan2_div SENSORS_ADM9240_FAN2_DIV fan_div:2 + alarms SENSORS_ADM9240_ALARMS alarms:1 + analog_out SENSORS_ADM9240_ANALOG_OUT analog_out:1 + + + Old Documentation ----------------- diff --git a/kernel/chips/adm9240.c b/kernel/chips/adm9240.c index 884fd086..82e28b63 100644 --- a/kernel/chips/adm9240.c +++ b/kernel/chips/adm9240.c @@ -19,6 +19,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* Supports ADM9240, DS1780, and LM81. See doc/chips/adm9240 for details */ + /* A couple notes about the ADM9240: @@ -74,7 +76,7 @@ static unsigned int normal_isa[] = {SENSORS_ISA_END}; static unsigned int normal_isa_range[] = {SENSORS_ISA_END}; /* Insmod parameters */ -SENSORS_INSMOD_2(adm9240,ds1780); +SENSORS_INSMOD_3(adm9240,ds1780,lm81); /* Many ADM9240 constants specified below */ @@ -96,6 +98,7 @@ SENSORS_INSMOD_2(adm9240,ds1780); #define ADM9240_REG_FAN1 0x28 #define ADM9240_REG_FAN2 0x29 #define ADM9240_REG_COMPANY_ID 0x3E /* 0x23 for ADM9240; 0xDA for DS1780 */ + /* 0x01 for LM81 */ #define ADM9240_REG_DIE_REV 0x3F /* These are read/write */ #define ADM9240_REG_2_5V_HIGH 0x2B @@ -110,6 +113,8 @@ SENSORS_INSMOD_2(adm9240,ds1780); #define ADM9240_REG_12V_LOW 0x34 #define ADM9240_REG_VCCP2_HIGH 0x35 #define ADM9240_REG_VCCP2_LOW 0x36 +#define ADM9240_REG_TCRIT_LIMIT 0x37 /* LM81 only - not supported */ +#define ADM9240_REG_LOW_LIMIT 0x38 /* LM81 only - not supported */ #define ADM9240_REG_TOS 0x39 #define ADM9240_REG_THYST 0x3A #define ADM9240_REG_FAN1_MIN 0x3B @@ -127,6 +132,8 @@ SENSORS_INSMOD_2(adm9240,ds1780); #define ADM9240_REG_I2C_ADDR 0x48 #define ADM9240_REG_VID4 0x49 #define ADM9240_REG_TEMP_CONFIG 0x4B +#define ADM9240_REG_EXTMODE1 0x4C /* LM81 only - not supported */ +#define ADM9240_REG_EXTMODE2 0x4D /* LM81 only - not supported */ /* Conversions. Rounding and limit checking is only done on the TO_REG variants. Note that you should be a bit careful with which arguments @@ -390,6 +397,8 @@ static int adm9240_detect(struct i2c_adapter *adapter, int address, int kind) kind = adm9240; else if (i == 0xda) kind = ds1780; + else if (i == 0x01) + kind = lm81; else { if (kind == 0) printk("adm9240.o: Ignoring 'force' parameter for unknown chip at " @@ -404,6 +413,9 @@ static int adm9240_detect(struct i2c_adapter *adapter, int address, int kind) } else if (kind == ds1780) { type_name = "ds1780"; client_name = "DS1780 chip"; + } else if (kind == lm81) { + type_name = "lm81"; + client_name = "LM81 chip"; } else { #ifdef DEBUG printk("adm9240.o: Internal error: unknown kind (%d)?!?",kind); diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 14a3c05f..bf8ad1ad 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -150,7 +150,7 @@ use subs qw(lm78_detect lm78_isa_detect lm78_alias_detect lm75_detect # I2C bus number, and the I2C address. @chip_ids = ( { - name => "National Semiconductors LM78", + name => "National Semiconductor LM78", driver => "lm78", i2c_addrs => [0x00..0x7f], i2c_driver_addrs => [0x20..0x2f], @@ -160,7 +160,7 @@ use subs qw(lm78_detect lm78_isa_detect lm78_alias_detect lm75_detect alias_detect => sub { lm78_alias_detect 0, @_ }, } , { - name => "National Semiconductors LM78-J", + name => "National Semiconductor LM78-J", driver => "lm78", i2c_addrs => [0x00..0x7f], i2c_driver_addrs => [0x20..0x2f], @@ -170,7 +170,7 @@ use subs qw(lm78_detect lm78_isa_detect lm78_alias_detect lm75_detect alias_detect => sub { lm78_alias_detect 1, @_ }, } , { - name => "National Semiconductors LM79", + name => "National Semiconductor LM79", driver => "lm78", i2c_addrs => [0x00..0x7f], i2c_driver_addrs => [0x20..0x2f], @@ -180,13 +180,13 @@ use subs qw(lm78_detect lm78_isa_detect lm78_alias_detect lm75_detect alias_detect => sub { lm78_alias_detect 2, @_ }, } , { - name => "National Semiconductors LM75", + name => "National Semiconductor LM75", driver => "lm75", i2c_addrs => [0x48..0x4f], i2c_detect => sub { lm75_detect @_}, } , { - name => "National Semiconductors LM80", + name => "National Semiconductor LM80", driver => "lm80", i2c_addrs => [0x28..0x2f], i2c_detect => sub { lm80_detect @_} , @@ -258,6 +258,12 @@ use subs qw(lm78_detect lm78_isa_detect lm78_alias_detect lm75_detect i2c_addrs => [0x2c..0x2f], i2c_detect => sub { adm9240_detect 1, @_ } }, + { + name => "National Semiconductor LM81", + driver => "adm9240", + i2c_addrs => [0x2c..0x2f], + i2c_detect => sub { adm9240_detect 2, @_ } + }, { name => "Analog Devices ADM1021", driver => "adm1021", @@ -1346,7 +1352,7 @@ sub gl520sm_detect return (5); } -# $_[0]: Chip to detect (0 = ADM9240, 1 = DS1780) +# $_[0]: Chip to detect (0 = ADM9240, 1 = DS1780, 2 = LM81) # $_[1]: A reference to the file descriptor to access this chip. # We may assume an i2c_set_slave_addr was already done. # $_[2]: Address @@ -1362,7 +1368,8 @@ sub adm9240_detect my ($chip, $file,$addr) = @_; $reg = i2c_smbus_read_byte_data($file,0x3e); return unless ($chip == 0 and $reg == 0x23) or - ($chip == 1 and $reg == 0xda); + ($chip == 1 and $reg == 0xda) or + ($chip == 2 and $reg == 0x01); return unless (i2c_smbus_read_byte_data($file,0x40) & 0x80) == 0x00; return unless i2c_smbus_read_byte_data($file,0x48) == $addr; diff --git a/prog/sensors/main.c b/prog/sensors/main.c index 6a6a9553..f7c501f3 100644 --- a/prog/sensors/main.c +++ b/prog/sensors/main.c @@ -252,7 +252,9 @@ void do_a_print(sensors_chip_name name) else if (!strcmp(name.prefix,"adm1021") || !strcmp(name.prefix,"max1617") || !strcmp(name.prefix,"max1617a")) print_adm1021(&name); - else if (!strcmp(name.prefix,"adm9240") || !strcmp(name.prefix,"ds1780")) + else if (!strcmp(name.prefix,"adm9240") || + !strcmp(name.prefix,"ds1780") || + !strcmp(name.prefix,"lm81")) print_adm9240(&name); else if (!strcmp(name.prefix,"lm78") || !strcmp(name.prefix,"lm78-j") || !strcmp(name.prefix,"lm79") || !strcmp(name.prefix,"sis5595"))