Changeset 2428

Show
Ignore:
Timestamp:
04/09/04 20:50:43 (5 years ago)
Author:
khali
Message:

Drop PWM support for as99127f. Update AS99127F docs.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/doc/chips/SUMMARY

    r2427 r2428  
    183183 
    184184w83781d 
    185         as99127f        3       7       3       2 pwm?  yes   no 
     185        as99127f        3       7       3       -      yes    no 
    186186        w83781d         3       7       3       -       yes     yes 
    187187        w83782d         3       9       3       2-4 pwm yes     yes 
  • lm-sensors/trunk/doc/chips/w83781d

    r2313 r2428  
    189189----------------- 
    190190The as99127f support was developed without the benefit of a datasheet. 
    191 In most cases it is treated as a w83781d. 
     191In most cases it is treated as a w83781d (although revision 2 of the 
     192AS9917F looks more like a w83782d). 
    192193This support will be BETA until a datasheet is released. 
    193194One user has reported problems with fans stopping 
     
    200201Known problems: 
    201202        - Problems with diode/thermistor settings (supported?) 
    202         - fan_div register may not really be fan_div. 
    203203        - One user reports fans stopping under high server load. 
    204         - Some as99127f chips are misidentified as a w83781d or w83782d. 
    205           This is caused by the chip having the wrong WCHIPID register 
    206           value, so there is no fix. The workaround is to use the 
    207           force_as99127f parameter. 
    208           (modprobe w83781d force_as99127f=BUS,0x2d where BUS is your i2c bus number) 
     204        - Revision 2 seems to have 2 PWM registers but we don't know 
     205          how to handle them. More details below. 
    209206 
    210207These will not be fixed unless we get a datasheet. 
     
    525522Additional entries not in the lm78: 
    526523 
    527         pwm[1-4]: (not on w83781d
     524        pwm[1-4]: (not on w83781d nor as99127f
    528525          Controls the speed of the fans with PWM (Pulse Width Modulation) 
    529526          Valid values: 
     
    531528        Second value is PWM enable 0/1. 
    532529 
    533         sensor[1-3]: (not on w83781d
     530        sensor[1-3]: (not on w83781d nor as99127f
    534531          Controls the sensor type. To change to a different 
    535532          sensor type, for example, do 'echo 2 > sensor1'. 
     
    542539          after correspondence with Winbond. See below. 
    543540 
    544         rt[1-3]: (781d only) 
     541        rt[1-3]: (w83781d only) 
    545542          32-byte tables controlling the conversion from 
    546543          resistance to temperature for thermistors. 
     
    581578Data sheet updates: 
    582579------------------ 
    583         - Mask off lower bit of all ID registers. 
    584  
    585580        - PWM clock registers: 
    586581 
     
    740735in5=255 
    741736in6=255 
     737 
     738 
     739# PWM 
     740 
     741Additional info about PWM on the AS99127F (may apply to other Asus 
     742chips as well) by Jean Delvare as of 2004-04-09: 
     743 
     744AS99127F revision 2 seems to have two PWM registers at 0x59 and 0x5A, 
     745and a temperature sensor type selector at 0x5B (which basically means 
     746that they swapped registers 0x59 and 0x5B when you compare with Winbond 
     747chips). 
     748Revision 1 of the chip also has the temperature sensor type selector at 
     7490x5B, but PWM registers have no effect. 
     750 
     751We don't know exactly how the temperature sensor type selection works. 
     752Looks like bits 1-0 are for temp1, bits 3-2 for temp2 and bits 5-4 for 
     753temp3, although it is possible that only the most significant bit matters 
     754each time. So far, values other than 0 always broke the readings. 
     755 
     756PWM registers seem to be split in two parts: bit 7 is a mode selector, 
     757while the other bits seem to define a value or threshold. 
     758 
     759When bit 7 is clear, bits 6-0 seem to hold a threshold value. If the value 
     760is below a given limit, the fan runs at low speed. If the value is above 
     761the limit, the fan runs at full speed. We have no clue as to what the limit 
     762represents. Note that there seem to be some inertia in this mode, speed 
     763changes may need some time to trigger. Also, an hysteresis mechanism is 
     764suspected since walking through all the values increasingly and then 
     765decreasingly led to slighlty different limits. 
     766 
     767When bit 7 is set, bits 3-0 seem to hold a threshold value, while bits 6-4 
     768would not be significant. If the value is below a given limit, the fan runs 
     769at full speed, while if it is above the limit it runs at low speed (so this 
     770is the contrary of the other mode, in a way). Here again, we don't know 
     771what the limit is supposed to represent. 
     772 
     773One remarkable thing is that the fans would only have two or three 
     774different speeds (transitional states left apart), not a whole range as 
     775you usually get with PWM. 
     776 
     777As a conclusion, you can write 0x00 or 0x8F to the PWM registers to make 
     778fans run at low speed, and 0x7F or 0x80 to make them run at full speed. 
     779 
     780Please contact us if you can figure out how it is supposed to work. As 
     781long as we don't know more, the w83781d driver doesn't handle PWM on 
     782AS99127F chips at all. 
  • lm-sensors/trunk/kernel/chips/w83781d.c

    r2313 r2428  
    2525 
    2626    Chip        #vin    #fanin  #pwm    #temp   wchipid vendid  i2c     ISA 
    27     as99127f    7       3       1?    3       0x31    0x12c3  yes     no 
     27    as99127f    7       3       0     3       0x31    0x12c3  yes     no 
    2828    as99127f rev.2 (type name = as99127f)       0x31    0x5ca3  yes     no 
    2929    w83627hf    9       3       2       3       0x21    0x5ca3  yes     yes(LPC) 
     
    443443        {W83781D_SYSCTL_BEEP, "beep", NULL, 0, 0644, NULL, &i2c_proc_real, 
    444444         &i2c_sysctl_real, NULL, &w83781d_beep}, 
    445         {W83781D_SYSCTL_PWM1, "pwm1", NULL, 0, 0644, NULL, &i2c_proc_real, 
    446          &i2c_sysctl_real, NULL, &w83781d_pwm}, 
    447         {W83781D_SYSCTL_PWM2, "pwm2", NULL, 0, 0644, NULL, &i2c_proc_real, 
    448          &i2c_sysctl_real, NULL, &w83781d_pwm}, 
    449445        {0} 
    450446}; 
     
    10621058        } 
    10631059        data->sysctl_id = i; 
     1060 
     1061        /* Only PWM2 can be disabled */ 
     1062        for(i = 0; i < 4; i++) 
     1063                data->pwmenable[i] = 1; 
    10641064 
    10651065        /* Initialize the chip */ 
     
    13801380                                w83781d_write_value(client, W83781D_REG_IRQ, 
    13811381                                                    i | 0x40); 
    1382  
    1383                         for(i = 0; i < 3; i++) 
    1384                                 data->pwmenable[i] = 1; 
    13851382                } 
    13861383        } 
     
    14431440                       if (data->type != w83791d && i == 3) break; 
    14441441               } 
    1445                if (data->type != w83781d) { 
     1442               if (data->type != w83781d && data->type != as99127f) { 
    14461443                       for (i = 1; i <= 4; i++) { 
    14471444                               data->pwm[i - 1] = 
     
    14501447                               if (((data->type == w83783s) 
    14511448                                    || (data->type == w83627hf) 
    1452                                     || (data->type == as99127f) 
    14531449                                    || (data->type == w83697hf) 
    14541450                                    || ((data->type == w83782d) 
     
    14571453                                       break; 
    14581454                       } 
     1455                        /* Only PWM2 can be disabled */ 
     1456                        data->pwmenable[1] = (w83781d_read_value(client, 
     1457                                              W83781D_REG_PWMCLK12) & 0x08) >> 3; 
    14591458               } 
    14601459