Skip to content

Commit

Permalink
hwmon: (nct6775) Add support for NCT6796D
Browse files Browse the repository at this point in the history
NCT6796D is mostly compatible to NCT6795D. It supports an additional
pwm control and fan speed channel.

While we are at it, update documentation for NCT6795D.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Guenter Roeck committed Mar 11, 2018
1 parent 1b20624 commit 8182005
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 76 deletions.
56 changes: 32 additions & 24 deletions Documentation/hwmon/nct6775
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ Supported chips:
Prefix: 'nct6793'
Addresses scanned: ISA address retrieved from Super I/O registers
Datasheet: Available from Nuvoton upon request
* Nuvoton NCT6795D
Prefix: 'nct6795'
Addresses scanned: ISA address retrieved from Super I/O registers
Datasheet: Available from Nuvoton upon request
* Nuvoton NCT6796D
Prefix: 'nct6796'
Addresses scanned: ISA address retrieved from Super I/O registers
Datasheet: Available from Nuvoton upon request

Authors:
Guenter Roeck <linux@roeck-us.net>
Expand Down Expand Up @@ -88,69 +96,69 @@ The mode works for fan1-fan5.
sysfs attributes
----------------

pwm[1-5] - this file stores PWM duty cycle or DC value (fan speed) in range:
pwm[1-7] - this file stores PWM duty cycle or DC value (fan speed) in range:
0 (lowest speed) to 255 (full)

pwm[1-5]_enable - this file controls mode of fan/temperature control:
pwm[1-7]_enable - this file controls mode of fan/temperature control:
* 0 Fan control disabled (fans set to maximum speed)
* 1 Manual mode, write to pwm[0-5] any value 0-255
* 2 "Thermal Cruise" mode
* 3 "Fan Speed Cruise" mode
* 4 "Smart Fan III" mode (NCT6775F only)
* 5 "Smart Fan IV" mode

pwm[1-5]_mode - controls if output is PWM or DC level
pwm[1-7]_mode - controls if output is PWM or DC level
* 0 DC output
* 1 PWM output

Common fan control attributes
-----------------------------

pwm[1-5]_temp_sel Temperature source. Value is temperature sensor index.
pwm[1-7]_temp_sel Temperature source. Value is temperature sensor index.
For example, select '1' for temp1_input.
pwm[1-5]_weight_temp_sel
pwm[1-7]_weight_temp_sel
Secondary temperature source. Value is temperature
sensor index. For example, select '1' for temp1_input.
Set to 0 to disable secondary temperature control.

If secondary temperature functionality is enabled, it is controlled with the
following attributes.

pwm[1-5]_weight_duty_step
pwm[1-7]_weight_duty_step
Duty step size.
pwm[1-5]_weight_temp_step
pwm[1-7]_weight_temp_step
Temperature step size. With each step over
temp_step_base, the value of weight_duty_step is added
to the current pwm value.
pwm[1-5]_weight_temp_step_base
pwm[1-7]_weight_temp_step_base
Temperature at which secondary temperature control kicks
in.
pwm[1-5]_weight_temp_step_tol
pwm[1-7]_weight_temp_step_tol
Temperature step tolerance.

Thermal Cruise mode (2)
-----------------------

If the temperature is in the range defined by:

pwm[1-5]_target_temp Target temperature, unit millidegree Celsius
pwm[1-7]_target_temp Target temperature, unit millidegree Celsius
(range 0 - 127000)
pwm[1-5]_temp_tolerance
pwm[1-7]_temp_tolerance
Target temperature tolerance, unit millidegree Celsius

there are no changes to fan speed. Once the temperature leaves the interval, fan
speed increases (if temperature is higher that desired) or decreases (if
temperature is lower than desired), using the following limits and time
intervals.

pwm[1-5]_start fan pwm start value (range 1 - 255), to start fan
pwm[1-7]_start fan pwm start value (range 1 - 255), to start fan
when the temperature is above defined range.
pwm[1-5]_floor lowest fan pwm (range 0 - 255) if temperature is below
pwm[1-7]_floor lowest fan pwm (range 0 - 255) if temperature is below
the defined range. If set to 0, the fan is expected to
stop if the temperature is below the defined range.
pwm[1-5]_step_up_time milliseconds before fan speed is increased
pwm[1-5]_step_down_time milliseconds before fan speed is decreased
pwm[1-5]_stop_time how many milliseconds must elapse to switch
pwm[1-7]_step_up_time milliseconds before fan speed is increased
pwm[1-7]_step_down_time milliseconds before fan speed is decreased
pwm[1-7]_stop_time how many milliseconds must elapse to switch
corresponding fan off (when the temperature was below
defined range).

Expand All @@ -159,8 +167,8 @@ Speed Cruise mode (3)

This modes tries to keep the fan speed constant.

fan[1-5]_target Target fan speed
fan[1-5]_tolerance
fan[1-7]_target Target fan speed
fan[1-7]_tolerance
Target speed tolerance


Expand All @@ -177,19 +185,19 @@ points should be set to higher temperatures and higher pwm values to achieve
higher fan speeds with increasing temperature. The last data point reflects
critical temperature mode, in which the fans should run at full speed.

pwm[1-5]_auto_point[1-7]_pwm
pwm[1-7]_auto_point[1-7]_pwm
pwm value to be set if temperature reaches matching
temperature range.
pwm[1-5]_auto_point[1-7]_temp
pwm[1-7]_auto_point[1-7]_temp
Temperature over which the matching pwm is enabled.
pwm[1-5]_temp_tolerance
pwm[1-7]_temp_tolerance
Temperature tolerance, unit millidegree Celsius
pwm[1-5]_crit_temp_tolerance
pwm[1-7]_crit_temp_tolerance
Temperature tolerance for critical temperature,
unit millidegree Celsius

pwm[1-5]_step_up_time milliseconds before fan speed is increased
pwm[1-5]_step_down_time milliseconds before fan speed is decreased
pwm[1-7]_step_up_time milliseconds before fan speed is increased
pwm[1-7]_step_down_time milliseconds before fan speed is decreased

Usage Notes
-----------
Expand Down
5 changes: 3 additions & 2 deletions drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1219,8 +1219,9 @@ config SENSORS_NCT6775
help
If you say yes here you get support for the hardware monitoring
functionality of the Nuvoton NCT6106D, NCT6775F, NCT6776F, NCT6779D,
NCT6791D, NCT6792D, NCT6793D, and compatible Super-I/O chips. This
driver replaces the w83627ehf driver for NCT6775F and NCT6776F.
NCT6791D, NCT6792D, NCT6793D, NCT6795D, NCT6796D, and compatible
Super-I/O chips. This driver replaces the w83627ehf driver for
NCT6775F and NCT6776F.

This driver can also be built as a module. If so, the module
will be called nct6775.
Expand Down
Loading

0 comments on commit 8182005

Please sign in to comment.