Kernel driver asc7621

Supported chips:

Andigilog aSC7621 and aSC7621a

Prefix: ‘asc7621’

Addresses scanned: I2C 0x2c, 0x2d, 0x2e

Datasheet:http://www.fairview5.com/linux/asc7621/asc7621.pdf

Author:
George Joseph

Description provided by Dave Pivin @ Andigilog:

Andigilog has both the PECI and pre-PECI versions of the Heceta-6, asIntel calls them. Heceta-6e has high frequency PWM and Heceta-6p hasadded PECI and a 4th thermal zone. The Andigilog aSC7611 is theHeceta-6e part and aSC7621 is the Heceta-6p part. They are both involume production, shipping to Intel and their subs.

We have enhanced both parts relative to the governing Intelspecification. First enhancement is temperature reading resolution. Wehave used registers below 20h for vendor-specific functions in additionto those in the Intel-specified vendor range.

Our conversion process produces a result that is reported as two bytes.The fan speed control uses this finer value to produce a “step-less” fanPWM output. These two bytes are “read-locked” to guarantee that once ahigh or low byte is read, the other byte is locked-in until after thenext read of any register. So to get an atomic reading, read high or lowbyte, then the very next read should be the opposite byte. Our datasheet says 10-bits of resolution, although you may find the lower bitsare active, they are not necessarily reliable or useful externally. Wechose not to mask them.

We employ significant filtering that is user tunable as described in thedata sheet. Our temperature reports and fan PWM outputs are very smoothwhen compared to the competition, in addition to the higher resolutiontemperature reports. The smoother PWM output does not require userintervention.

We offer GPIO features on the former VID pins. These are open-drainoutputs or inputs and may be used as general purpose I/O or as alarmoutputs that are based on temperature limits. These are in 19h and 1Ah.

We offer flexible mapping of temperature readings to thermal zones. Anytemperature may be mapped to any zone, which has a default assignmentthat follows Intel’s specs.

Since there is a fan to zone assignment that allows for the “hotter” ofa set of zones to control the PWM of an individual fan, but there is noindication to the user, we have added an indicator that shows which zoneis currently controlling the PWM for a given fan. This is in register00h.

Both remote diode temperature readings may be given an offset value suchthat the reported reading as well as the temperature used to determinePWM may be offset for system calibration purposes.

PECI Extended configuration allows for having more than two domains perPECI address and also provides an enabling function for each PECIaddress. One could use our flexible zone assignment to have a zoneassigned to up to 4 PECI addresses. This is not possible in the defaultIntel configuration. This would be useful in multi-CPU systems withindividual fans on each that would benefit from individual fan control.This is in register 0Eh.

The tachometer measurement system is flexible and able to adapt to manyfan types. We can also support pulse-stretched PWM so that 3-wire fansmay be used. These characteristics are in registers 04h to 07h.

Finally, we have added a tach disable function that turns off the tachmeasurement system for individual tachs in order to save power. That isin register 75h.


aSC7621 Product Description

The aSC7621 has a two wire digital interface compatible with SMBus 2.0.Using a 10-bit ADC, the aSC7621 measures the temperature of two remote diodeconnected transistors as well as its own die. Support for PlatformEnvironmental Control Interface (PECI) is included.

Using temperature information from these four zones, an automatic fan speedcontrol algorithm is employed to minimize acoustic impact while achievingrecommended CPU temperature under varying operational loads.

To set fan speed, the aSC7621 has three independent pulse width modulation(PWM) outputs that are controlled by one, or a combination of three,temperature zones. Both high- and low-frequency PWM ranges are supported.

The aSC7621 also includes a digital filter that can be invoked to smoothtemperature readings for better control of fan speed and minimum acousticimpact.

The aSC7621 has tachometer inputs to measure fan speed on up to four fans.Limit and status registers for all measured values are included to alertthe system host that any measurements are outside of programmed limitsvia status registers.

System voltages of VCCP, 2.5V, 3.3V, 5.0V, and 12V motherboard power aremonitored efficiently with internal scaling resistors.

Features

  • Supports PECI interface and monitors internal and remote thermal diodes
  • 2-wire, SMBus 2.0 compliant, serial interface
  • 10-bit ADC
  • Monitors VCCP, 2.5V, 3.3V, 5.0V, and 12V motherboard/processor supplies
  • Programmable autonomous fan control based on temperature readings
  • Noise filtering of temperature reading for fan speed control
  • 0.25C digital temperature sensor resolution
  • 3 PWM fan speed control outputs for 2-, 3- or 4-wire fans and up to 4 fantachometer inputs
  • Enhanced measured temperature to Temperature Zone assignment.
  • Provides high and low PWM frequency ranges
  • 3 GPIO pins for custom use
  • 24-Lead QSOP package

Configuration Notes

Except where noted below, the sysfs entries created by this driver followthe standards defined in “sysfs-interface”.

temp1_source
0(default) peci_legacy = 0, Remote 1 Temperaturepeci_legacy = 1, PECI Processor Temperature 0
1Remote 1 Temperature
2Remote 2 Temperature
3Internal Temperature
4PECI Processor Temperature 0
5PECI Processor Temperature 1
6PECI Processor Temperature 2
7PECI Processor Temperature 3
temp2_source
0(default) Internal Temperature
1Remote 1 Temperature
2Remote 2 Temperature
3Internal Temperature
4PECI Processor Temperature 0
5PECI Processor Temperature 1
6PECI Processor Temperature 2
7PECI Processor Temperature 3
temp3_source
0(default) Remote 2 Temperature
1Remote 1 Temperature
2Remote 2 Temperature
3Internal Temperature
4PECI Processor Temperature 0
5PECI Processor Temperature 1
6PECI Processor Temperature 2
7PECI Processor Temperature 3
temp4_source
0(default) peci_legacy = 0, PECI Processor Temperature 0peci_legacy = 1, Remote 1 Temperature
1Remote 1 Temperature
2Remote 2 Temperature
3Internal Temperature
4PECI Processor Temperature 0
5PECI Processor Temperature 1
6PECI Processor Temperature 2
7PECI Processor Temperature 3
temp[1-4]_smoothing_enable / temp[1-4]_smoothing_time

Smooths spikes in temp readings caused by noise.Valid values in milliseconds are:

  • 35000
  • 17600
  • 11800
  • 7000
  • 4400
  • 3000
  • 1600
  • 800
temp[1-4]_crit
When the corresponding zone temperature reaches this value,ALL pwm outputs will got to 100%.
temp[5-8]_input / temp[5-8]_enable
The aSC7621 can also read temperatures provided by the processorvia the PECI bus. Usually these are “core” temps and are relativeto the point where the automatic thermal control circuit startsthrottling. This means that these are usually negative numbers.
pwm[1-3]_enable
0Fan off.
1Fan on manual control.
2Fan on automatic control and will run at the minimum pwmif the temperature for the zone is below the minimum.
3Fan on automatic control but will be off if thetemperature for the zone is below the minimum.
4-254Ignored.
255Fan on full.
pwm[1-3]_auto_channels

Bitmap as described in sysctl-interface with the followingexceptions…

Only the following combination of zones (and their corresponding masks)are valid:

  • 1

  • 2

  • 3

  • 2,3

  • 1,2,3

  • 4

  • 1,2,3,4

  • Special values:

    0Disabled.
    16Fan on manual control.
    31Fan on full.
pwm[1-3]_invert
When set, inverts the meaning of pwm[1-3].i.e. when pwm = 0, the fan will be on full andwhen pwm = 255 the fan will be off.
pwm[1-3]_freq

PWM frequency in HzValid values in Hz are:

  • 10
  • 15
  • 23
  • 30 (default)
  • 38
  • 47
  • 62
  • 94
  • 23000
  • 24000
  • 25000
  • 26000
  • 27000
  • 28000
  • 29000
  • 30000

Setting any other value will be ignored.

peci_enable
Enables or disables PECI
peci_avg

Input filter average time.

  • 0 0 Sec. (no Smoothing) (default)
  • 1 0.25 Sec.
  • 2 0.5 Sec.
  • 3 1.0 Sec.
  • 4 2.0 Sec.
  • 5 4.0 Sec.
  • 6 8.0 Sec.
  • 7 0.0 Sec.
peci_legacy
0Standard Mode (default)Remote Diode 1 reading is associated withTemperature Zone 1, PECI is associated withZone 4
1Legacy ModePECI is associated with Temperature Zone 1,Remote Diode 1 is associated with Zone 4
peci_diode

Diode filter

00.25 Sec.
11.1 Sec.
22.4 Sec. (default)
33.4 Sec.
45.0 Sec.
56.8 Sec.
610.2 Sec.
716.4 Sec.
peci_4domain

Four domain enable

01 or 2 Domains for enabled processors (default)
13 or 4 Domains for enabled processors
peci_domain

Domain

0Processor contains a single domain (0) (default)
1Processor contains two domains (0,1)