Changeset 614

Show
Ignore:
Timestamp:
10/30/99 23:26:21 (9 years ago)
Author:
mds
Message:

(mds) Add support for the Asus AS99127F. Treat as an I2C-only W83782D for now.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/CONTRIBUTORS

    r609 r614  
    2626* Mark D. Studebaker <mds@eng.paradyne.com> 
    2727  Author of the i2c-ali15x3 bus driver and the i2c-i810 bus driver. 
    28   Added w83782d, w83783s, and w83627hf support to the w83781d driver. 
    29   Added max1617 and thmc10 support to the adm1021 driver. 
     28  Added w83782d, w83783s, w83627hf, and as99127f support to the w83781d driver. 
     29  Added max1617, thmc10, gl523sm, and lm84 support to the adm1021 driver. 
    3030  Added lm81 support to the adm9240 driver. 
    3131  Author of the decode-xeon.pl xeon EEPROM decoder. 
  • lm-sensors/trunk/README

    r610 r614  
    2828 
    2929At least the following SMBus adapters are supported: 
     30  Acer Labs M1541 and M1543C (used in the Aladdin IV, V and Pro 2 chipsets) 
     31  Apple Hydra (used on some PPC machines) 
     32  Intel ICH (used in the Intel 810 and 810E chipsets) 
    3033  Intel PIIX4 (used in most Intel chipsets) 
    31   Intel ICH (used in the Intel 810 and 810E chipsets) 
    32   Acer Labs M1541 and M1543C (used in the Aladdin IV, V and Pro 2 chipsets) 
    3334  VIA Technologies 82C586B (used in most VIA chipsets) 
    3435  VIA Technologies VT596A/B (used in some more modern VIA chipsets) 
    35   Apple Hydra (used on some PPC machines) 
    3636 
    3737At least the following hardware sensor chips are supported: 
     38  Analog Devices ADM1021, ADM1022, and ADM9240 
     39  Asus AS99127F 
     40  Dallas Semiconductor DS1780 
     41  Hewlett Packard Maxilife (several revisions) 
     42  Genesys Logic GL518SM (rev 00, 80), GL520SM, GL523SM 
     43  Intel Xeon processor embedded sensors 
     44  Maxim MAX1617 and MAX1617A 
    3845  National Semicoductor LM75, LM77, LM78, LM78-J, LM79. LM80, LM81, and LM84 
    39   Winbond W83781D, W83782D, W83783S, and W83627HF 
    40   Genesys Logic GL518SM (rev 00, 80), GL520SM, GL523SM 
    41   Analog Devices ADM1021, ADM1022, and ADM9240 
    4246  SiS Southbridge (integrated in the chipset; the I2C adapter will also be 
    4347    supported in the near future) 
    44   Maxim MAX1617 and MAX1617A 
    45   Dallas Semiconductor DS1780 
    46   Hewlett Packard Maxilife (several revisions) 
    47   Intel Xeon processor embedded sensors 
    4848  TI THMC10 and THMC50 
     49  Winbond W83781D, W83782D, W83783S, and W83627HF 
     50 
    4951 
    5052We also support some miscellaneous chips: 
  • lm-sensors/trunk/doc/chips/SUMMARY

    r610 r614  
    8686 
    8787w83781d 
     88        as99127f        3       9       3       2-4 pwm yes     no 
    8889        w83781d         3       7       3       -       yes     yes 
    8990        w83782d         3       9       3       2-4 pwm yes     yes 
  • lm-sensors/trunk/doc/chips/w83781d

    r610 r614  
    2121    Prefix 'w83627hf' 
    2222    Addresses scanned: I2C 0x20 - 0x2f (inclusive), ISA 0x290 (8 I/O ports) 
    23     Datasheet: Possibly available on request from Winbond 
     23    Datasheet: Unavailable from Winbond 
     24  * Asus AS99127F 
     25    Prefix 'as99127f' 
     26    Addresses scanned: I2C 0x20 - 0x2f (inclusive) 
     27    Datasheet: Unavailable from Asus 
    2428 
    2529 
     
    5660 
    5761This driver implements support for the Winbond W83781D, W83782D, 
    58 W8783S, and W83627HF chips
     62W8783S, and W83627HF chips, and the Asus AS99127F
    5963We will refer to them collectively as W8378* chips. 
    6064 
     
    6266enough that it was sensible to put them together in one driver.  
    6367The W83627HF chip is assumed to be identical to the W83782D. 
     68The AS99127F chip is assumed to be identical to an I2C-only W83782D. 
    6469 
    6570Detection of these chips can sometimes be foiled because they can be in 
  • lm-sensors/trunk/kernel/chips/w83781d.c

    r601 r614  
    2424    Supports following chips: 
    2525 
    26     Chip        #vin    #fanin  #pwm    #temp   wchipid i2c     ISA 
    27     w83781d     7       3       0       3       0x10    yes     yes 
    28     w83627hf    9       3       2-4     3       0x20    yes     yes (LPC) 
    29     w83782d     9       3       2-4     3       0x30    yes     yes 
    30     w83783s     5-6     3       2       1-2     0x40    yes     no 
     26    Chip        #vin    #fanin  #pwm    #temp   wchipid vendid  i2c     ISA 
     27    as99127f    9       3       2-4     3       0x20    0x12c3  yes     no 
     28    w83781d     7       3       0       3       0x10    0x5ca3  yes     yes 
     29    w83627hf    9       3       2-4     3       0x20    0x5ca3  yes     yes (LPC) 
     30    w83782d     9       3       2-4     3       0x30    0x5ca3  yes     yes 
     31    w83783s     5-6     3       2       1-2     0x40    0x5ca3  yes     no 
    3132 
    3233*/ 
     
    6364 
    6465/* Insmod parameters */ 
    65 SENSORS_INSMOD_4(w83781d,w83782d,w83783s,w83627hf); 
     66SENSORS_INSMOD_5(w83781d,w83782d,w83783s,w83627hf,as99127f); 
    6667 
    6768/* Many W83781D constants specified below */ 
     
    647648  const char *client_name = ""; 
    648649  int is_isa = i2c_is_isa_adapter(adapter); 
     650  enum vendor {winbond, asus} vendid; 
    649651 
    650652  if (!is_isa && ! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA)) 
     
    725727 
    726728  /* We have either had a force parameter, or we have already detected the 
    727      Winbond. Put it now into bank 0 */ 
     729     Winbond. Put it now into bank 0 and Vendor ID High Byte */ 
    728730  w83781d_write_value(new_client,W83781D_REG_BANK, 
    729                       w83781d_read_value(new_client,W83781D_REG_BANK) & 0xf8); 
     731                      (w83781d_read_value(new_client,W83781D_REG_BANK) & 0x78) | 0x80); 
    730732 
    731733  /* Determine the chip type. */ 
    732734  if (kind <= 0) { 
     735    /* get vendor ID */ 
     736    val2 = w83781d_read_value(new_client,W83781D_REG_CHIPMAN); 
     737    if (val2 == 0x5c) 
     738      vendid = winbond; 
     739    else if (val2 == 0x12) 
     740      vendid = asus; 
     741    else 
     742      goto ERROR1; 
    733743    /* mask off lower bit, not reliable */ 
    734744    val1 = w83781d_read_value(new_client,W83781D_REG_WCHIPID) & 0xfe; 
    735     if (val1 == 0x10
     745    if (val1 == 0x10 && vendid == winbond
    736746      kind = w83781d; 
    737     else if (val1 == 0x30
     747    else if (val1 == 0x30 && vendid == winbond
    738748      kind = w83782d; 
    739     else if (val1 == 0x40
     749    else if (val1 == 0x40 && vendid == winbond && !is_isa
    740750      kind = w83783s; 
    741     else if (val1 == 0x20
     751    else if (val1 == 0x20 && vendid == winbond
    742752      kind = w83627hf; 
     753    else if (val1 == 0x20 && vendid == asus && !is_isa) 
     754      kind = as99127f; 
    743755    else { 
    744756      if (kind == 0)  
     
    761773    type_name = "w83627hf"; 
    762774    client_name = "W83627HF chip"; 
     775  } else if (kind == as99127f) { 
     776    type_name = "as99127f"; 
     777    client_name = "AS99127F chip"; 
    763778  } else { 
    764779#ifdef DEBUG 
     
    10441059                        IN_TO_REG(W83782D_INIT_IN_MAX_6)); 
    10451060  } 
    1046   if ((type == w83782d) || (type == w83627hf)) { 
     1061  if ((type == w83782d) || (type == w83627hf) || (type == as99127f)) { 
    10471062    w83781d_write_value(client,W83781D_REG_IN_MIN(7), 
    10481063                        IN_TO_REG(W83781D_INIT_IN_MIN_7)); 
     
    11051120      data->in_min[i] = w83781d_read_value(client,W83781D_REG_IN_MIN(i)); 
    11061121      data->in_max[i] = w83781d_read_value(client,W83781D_REG_IN_MAX(i)); 
    1107       if((data->type != w83782d) && (data->type != w83627hf) && (i == 6)) 
     1122      if((data->type != w83782d) && (data->type != w83627hf) && 
     1123         (data->type != as99127f) && (i == 6)) 
    11081124        break; 
    11091125    } 
     
    11161132        data->pwm[i-1] = w83781d_read_value(client,W83781D_REG_PWM(i)); 
    11171133        if(((data->type == w83783s) || 
    1118            (((data->type == w83782d) || (data->type == w83627hf)) && 
    1119             i2c_is_isa_client(client))) 
     1134           (((data->type == w83782d) || (data->type == w83627hf) || 
     1135            data->type == as99127f) && i2c_is_isa_client(client))) 
    11201136          &&  i == 2) 
    11211137          break; 
     
    11471163    data->alarms = w83781d_read_value(client,W83781D_REG_ALARM1) + 
    11481164                   (w83781d_read_value(client,W83781D_REG_ALARM2) << 8); 
    1149     if ((data->type == w83782d) || (data->type == w83627hf)) { 
     1165    if ((data->type == w83782d) || (data->type == w83627hf) || data->type == as99127f) { 
    11501166      data->alarms |= w83781d_read_value(client,W83781D_REG_ALARM3) << 16; 
    11511167    } 
  • lm-sensors/trunk/lib/chips.c

    r526 r614  
    15371537                /* Cheat on 627HF for now - no separate #defines */ 
    15381538 { SENSORS_W83627HF_PREFIX, w83782d_features }, 
     1539                /* Cheat on1627HF for now - no separate #defines */ 
     1540 { SENSORS_AS99127F_PREFIX, w83782d_features }, 
    15391541 { SENSORS_ADM9240_PREFIX, adm9240_features }, 
    15401542 { SENSORS_DS1780_PREFIX, ds1780_features }, 
  • lm-sensors/trunk/lib/chips.h

    r526 r614  
    367367/* Winbond W83782D chips */ 
    368368/* Cheat on 627HF for now - no separate #defines */ 
     369/* Cheat on 127F for now - no separate #defines */ 
    369370 
    370371#define SENSORS_W83782D_PREFIX "w83782d" 
    371372#define SENSORS_W83627HF_PREFIX "w83627hf" 
     373#define SENSORS_AS99127F_PREFIX "as99127f" 
    372374 
    373375#define SENSORS_W83782D_IN0 1 /* R */ 
  • lm-sensors/trunk/prog/detect/sensors-detect

    r613 r614  
    232232     } , 
    233233     { 
     234       name => "Asus AS99127F", 
     235       driver => "w83781d", 
     236       i2c_addrs => [0x00..0x68,0x6a..0x7f],  
     237       i2c_driver_addrs => [0x20..0x2f],  
     238       i2c_detect => sub { w83781d_detect 4, @_}, 
     239     } , 
     240     { 
    234241       name => "Genesys Logic GL518SM Revision 0x00", 
    235242       driver => "gl518sm", 
     
    12651272} 
    12661273   
    1267 # $_[0]: Chip to detect (0 = W83781D, 1 = W83782D, 2 = W83783S, 3 = W83627HF) 
     1274# $_[0]: Chip to detect (0 = W83781D, 1 = W83782D, 2 = W83783S, 
     1275#                        3 = W83627HF, 4 = AS99127F) 
    12681276# $_[1]: A reference to the file descriptor to access this chip. 
    12691277#        We may assume an i2c_set_slave_addr was already done. 
     
    12761284#   0x4e: Vendor ID byte selection, and bank selection 
    12771285#   0x4f: Vendor ID 
    1278 #   0x58: Device ID (only when in bank 0); both 0x10 and 0x11 is seen for 
    1279 #         W83781D though Winbond documents 0x10 only. 
     1286#   0x58: Device ID (only when in bank 0); ignore LSB. 
    12801287# Note: Fails if the W8378xD is not in bank 0! 
    12811288# Note: Detection overrules a previous LM78 detection 
     
    12871294  $reg1 = i2c_smbus_read_byte_data($file,0x4e); 
    12881295  $reg2 = i2c_smbus_read_byte_data($file,0x4f); 
    1289   return unless (($reg1 & 0x80) == 0x00 and $reg2 == 0xa3) or  
    1290                 (($reg1 & 0x80) == 0x80 and $reg2 == 0x5c); 
     1296  if ($chip < 3) { 
     1297    return unless (($reg1 & 0x80) == 0x00 and $reg2 == 0xa3) or  
     1298                  (($reg1 & 0x80) == 0x80 and $reg2 == 0x5c); 
     1299  } 
     1300  if ($chip == 4) { 
     1301    return unless (($reg1 & 0x80) == 0x00 and $reg2 == 0xc3) or  
     1302                  (($reg1 & 0x80) == 0x80 and $reg2 == 0x12); 
     1303  } 
    12911304  return unless ($reg1 & 0x07) == 0x00; 
    12921305  $reg1 = i2c_smbus_read_byte_data($file,0x58) & 0xfe; 
     
    12951308  return if $chip == 2 and  $reg1 != 0x40; 
    12961309  return if $chip == 3 and  $reg1 != 0x20; 
     1310  return if $chip == 4 and  $reg1 != 0x20; 
    12971311  $reg1 = i2c_smbus_read_byte_data($file,0x4a); 
    12981312  @res = (8); 
  • lm-sensors/trunk/prog/sensors/chips.c

    r526 r614  
    812812 
    813813  is82d = (!strcmp(name->prefix,"w83782d")) || 
    814           (!strcmp(name->prefix,"w83627hf")); 
     814          (!strcmp(name->prefix,"w83627hf")) || 
     815          (!strcmp(name->prefix,"as99127f")); 
    815816  is83s = !strcmp(name->prefix,"w83782s"); 
    816817  if (!sensors_get_feature(*name,SENSORS_W83781D_ALARMS,&cur))  
  • lm-sensors/trunk/prog/sensors/main.c

    r533 r614  
    269269           (!strcmp(name.prefix,"w83782d")) || 
    270270           (!strcmp(name.prefix,"w83783s")) || 
    271            (!strcmp(name.prefix,"w83627hf"))) 
     271           (!strcmp(name.prefix,"w83627hf")) || 
     272           (!strcmp(name.prefix,"as99127f"))) 
    272273    print_w83781d(&name); 
    273274  else if (!strcmp(name.prefix,"maxilife-cg") ||