mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-30 13:57:41 +00:00
Drop PWM support for as99127f. Update AS99127F docs.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2428 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -182,7 +182,7 @@ w83627hf
|
||||
w83697hf 2 8 2 2 pwm no yes (LPC)
|
||||
|
||||
w83781d
|
||||
as99127f 3 7 3 2 pwm? yes no
|
||||
as99127f 3 7 3 - yes no
|
||||
w83781d 3 7 3 - yes yes
|
||||
w83782d 3 9 3 2-4 pwm yes yes
|
||||
w83783s 1-2 5-6 3 2 pwm yes no
|
||||
|
@@ -188,7 +188,8 @@ Known problems:
|
||||
AS99127F PROBLEMS
|
||||
-----------------
|
||||
The as99127f support was developed without the benefit of a datasheet.
|
||||
In most cases it is treated as a w83781d.
|
||||
In most cases it is treated as a w83781d (although revision 2 of the
|
||||
AS9917F looks more like a w83782d).
|
||||
This support will be BETA until a datasheet is released.
|
||||
One user has reported problems with fans stopping
|
||||
occasionally.
|
||||
@@ -199,13 +200,9 @@ disable, not enable. This may be changed in the future.
|
||||
|
||||
Known problems:
|
||||
- Problems with diode/thermistor settings (supported?)
|
||||
- fan_div register may not really be fan_div.
|
||||
- One user reports fans stopping under high server load.
|
||||
- Some as99127f chips are misidentified as a w83781d or w83782d.
|
||||
This is caused by the chip having the wrong WCHIPID register
|
||||
value, so there is no fix. The workaround is to use the
|
||||
force_as99127f parameter.
|
||||
(modprobe w83781d force_as99127f=BUS,0x2d where BUS is your i2c bus number)
|
||||
- Revision 2 seems to have 2 PWM registers but we don't know
|
||||
how to handle them. More details below.
|
||||
|
||||
These will not be fixed unless we get a datasheet.
|
||||
If you have problems, please lobby Asus to release a datasheet.
|
||||
@@ -524,13 +521,13 @@ See the lm78 documentation for details.
|
||||
|
||||
Additional entries not in the lm78:
|
||||
|
||||
pwm[1-4]: (not on w83781d)
|
||||
pwm[1-4]: (not on w83781d nor as99127f)
|
||||
Controls the speed of the fans with PWM (Pulse Width Modulation)
|
||||
Valid values:
|
||||
0 - 255. 255 = max speed.
|
||||
Second value is PWM enable 0/1.
|
||||
|
||||
sensor[1-3]: (not on w83781d)
|
||||
sensor[1-3]: (not on w83781d nor as99127f)
|
||||
Controls the sensor type. To change to a different
|
||||
sensor type, for example, do 'echo 2 > sensor1'.
|
||||
Valid values:
|
||||
@@ -541,7 +538,7 @@ Additional entries not in the lm78:
|
||||
Thermistors with other Betas could in theory be supported
|
||||
after correspondence with Winbond. See below.
|
||||
|
||||
rt[1-3]: (781d only)
|
||||
rt[1-3]: (w83781d only)
|
||||
32-byte tables controlling the conversion from
|
||||
resistance to temperature for thermistors.
|
||||
For the curious only. Writing to these entries will
|
||||
@@ -580,8 +577,6 @@ NOTES:
|
||||
|
||||
Data sheet updates:
|
||||
------------------
|
||||
- Mask off lower bit of all ID registers.
|
||||
|
||||
- PWM clock registers:
|
||||
|
||||
000: master / 512
|
||||
@@ -739,3 +734,49 @@ in3=r(0x23)*0.016*1.68
|
||||
in4=r(0x24)*0.016*4
|
||||
in5=255
|
||||
in6=255
|
||||
|
||||
|
||||
# PWM
|
||||
|
||||
Additional info about PWM on the AS99127F (may apply to other Asus
|
||||
chips as well) by Jean Delvare as of 2004-04-09:
|
||||
|
||||
AS99127F revision 2 seems to have two PWM registers at 0x59 and 0x5A,
|
||||
and a temperature sensor type selector at 0x5B (which basically means
|
||||
that they swapped registers 0x59 and 0x5B when you compare with Winbond
|
||||
chips).
|
||||
Revision 1 of the chip also has the temperature sensor type selector at
|
||||
0x5B, but PWM registers have no effect.
|
||||
|
||||
We don't know exactly how the temperature sensor type selection works.
|
||||
Looks like bits 1-0 are for temp1, bits 3-2 for temp2 and bits 5-4 for
|
||||
temp3, although it is possible that only the most significant bit matters
|
||||
each time. So far, values other than 0 always broke the readings.
|
||||
|
||||
PWM registers seem to be split in two parts: bit 7 is a mode selector,
|
||||
while the other bits seem to define a value or threshold.
|
||||
|
||||
When bit 7 is clear, bits 6-0 seem to hold a threshold value. If the value
|
||||
is below a given limit, the fan runs at low speed. If the value is above
|
||||
the limit, the fan runs at full speed. We have no clue as to what the limit
|
||||
represents. Note that there seem to be some inertia in this mode, speed
|
||||
changes may need some time to trigger. Also, an hysteresis mechanism is
|
||||
suspected since walking through all the values increasingly and then
|
||||
decreasingly led to slighlty different limits.
|
||||
|
||||
When bit 7 is set, bits 3-0 seem to hold a threshold value, while bits 6-4
|
||||
would not be significant. If the value is below a given limit, the fan runs
|
||||
at full speed, while if it is above the limit it runs at low speed (so this
|
||||
is the contrary of the other mode, in a way). Here again, we don't know
|
||||
what the limit is supposed to represent.
|
||||
|
||||
One remarkable thing is that the fans would only have two or three
|
||||
different speeds (transitional states left apart), not a whole range as
|
||||
you usually get with PWM.
|
||||
|
||||
As a conclusion, you can write 0x00 or 0x8F to the PWM registers to make
|
||||
fans run at low speed, and 0x7F or 0x80 to make them run at full speed.
|
||||
|
||||
Please contact us if you can figure out how it is supposed to work. As
|
||||
long as we don't know more, the w83781d driver doesn't handle PWM on
|
||||
AS99127F chips at all.
|
||||
|
@@ -24,7 +24,7 @@
|
||||
Supports following chips:
|
||||
|
||||
Chip #vin #fanin #pwm #temp wchipid vendid i2c ISA
|
||||
as99127f 7 3 1? 3 0x31 0x12c3 yes no
|
||||
as99127f 7 3 0 3 0x31 0x12c3 yes no
|
||||
as99127f rev.2 (type name = as99127f) 0x31 0x5ca3 yes no
|
||||
w83627hf 9 3 2 3 0x21 0x5ca3 yes yes(LPC)
|
||||
w83697hf 8 2 2 2 0x60 0x5ca3 no yes(LPC)
|
||||
@@ -442,10 +442,6 @@ static ctl_table as99127f_dir_table_template[] = {
|
||||
&i2c_sysctl_real, NULL, &w83781d_alarms},
|
||||
{W83781D_SYSCTL_BEEP, "beep", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_beep},
|
||||
{W83781D_SYSCTL_PWM1, "pwm1", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_pwm},
|
||||
{W83781D_SYSCTL_PWM2, "pwm2", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_pwm},
|
||||
{0}
|
||||
};
|
||||
|
||||
@@ -1062,6 +1058,10 @@ static int w83781d_detect(struct i2c_adapter *adapter, int address,
|
||||
}
|
||||
data->sysctl_id = i;
|
||||
|
||||
/* Only PWM2 can be disabled */
|
||||
for(i = 0; i < 4; i++)
|
||||
data->pwmenable[i] = 1;
|
||||
|
||||
/* Initialize the chip */
|
||||
w83781d_init_client(new_client);
|
||||
return 0;
|
||||
@@ -1379,9 +1379,6 @@ static void w83781d_init_client(struct i2c_client *client)
|
||||
if (!(i & 0x40))
|
||||
w83781d_write_value(client, W83781D_REG_IRQ,
|
||||
i | 0x40);
|
||||
|
||||
for(i = 0; i < 3; i++)
|
||||
data->pwmenable[i] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1442,20 +1439,22 @@ static void w83781d_update_client(struct i2c_client *client)
|
||||
W83781D_REG_FAN_MIN(i));
|
||||
if (data->type != w83791d && i == 3) break;
|
||||
}
|
||||
if (data->type != w83781d) {
|
||||
if (data->type != w83781d && data->type != as99127f) {
|
||||
for (i = 1; i <= 4; i++) {
|
||||
data->pwm[i - 1] =
|
||||
w83781d_read_value(client,
|
||||
W83781D_REG_PWM(data->type, i));
|
||||
if (((data->type == w83783s)
|
||||
|| (data->type == w83627hf)
|
||||
|| (data->type == as99127f)
|
||||
|| (data->type == w83697hf)
|
||||
|| ((data->type == w83782d)
|
||||
&& i2c_is_isa_client(client)))
|
||||
&& i == 2)
|
||||
break;
|
||||
}
|
||||
/* Only PWM2 can be disabled */
|
||||
data->pwmenable[1] = (w83781d_read_value(client,
|
||||
W83781D_REG_PWMCLK12) & 0x08) >> 3;
|
||||
}
|
||||
|
||||
data->temp = w83781d_read_value(client, W83781D_REG_TEMP);
|
||||
|
Reference in New Issue
Block a user