# Kernel driver amc6821

_Peios Kernel / Hardware and drivers / Hardware monitoring_

> Supported chips:

<a id="rst-kernel-driver-amc6821"></a>

Supported chips:

> Texas Instruments AMC6821
>
> Prefix: 'amc6821'
>
> Addresses scanned: 0x18, 0x19, 0x1a, 0x2c, 0x2d, 0x2e, 0x4c, 0x4d, 0x4e
>
> Datasheet: [http://focus.ti.com/docs/prod/folders/print/amc6821.html](<http://focus.ti.com/docs/prod/folders/print/amc6821.html>)

- **Authors:**

  Tomaz Mertelj &lt;[tomaz.mertelj@guest.arnes.si](<mailto:tomaz.mertelj@guest.arnes.si>)&gt;

<a id="rst-description"></a>

## Description

This driver implements support for the Texas Instruments amc6821 chip. The chip has one on-chip and one remote temperature sensor and one pwm fan regulator. The pwm can be controlled either from software or automatically.

The driver provides the following sensor accesses in sysfs:


<table>
<tbody>
<tr>
<td>


temp1_input

</td>
<td>


ro

</td>
<td>


on-chip temperature

</td>
</tr>
<tr>
<td>


temp1_min

</td>
<td>


rw

</td>
<td>


"

</td>
</tr>
<tr>
<td>


temp1_max

</td>
<td>


rw

</td>
<td>


"

</td>
</tr>
<tr>
<td>


temp1_crit

</td>
<td>


rw

</td>
<td>


"

</td>
</tr>
<tr>
<td>


temp1_min_alarm

</td>
<td>


ro

</td>
<td>


"

</td>
</tr>
<tr>
<td>


temp1_max_alarm

</td>
<td>


ro

</td>
<td>


"

</td>
</tr>
<tr>
<td>


temp1_crit_alarm

</td>
<td>


ro

</td>
<td>


"

</td>
</tr>
<tr>
<td>


temp2_input

</td>
<td>


ro

</td>
<td>


remote temperature

</td>
</tr>
<tr>
<td>


temp2_min

</td>
<td>


rw

</td>
<td>


"

</td>
</tr>
<tr>
<td>


temp2_max

</td>
<td>


rw

</td>
<td>


"

</td>
</tr>
<tr>
<td>


temp2_crit

</td>
<td>


rw

</td>
<td>


"

</td>
</tr>
<tr>
<td>


temp2_min_alarm

</td>
<td>


ro

</td>
<td>


"

</td>
</tr>
<tr>
<td>


temp2_max_alarm

</td>
<td>


ro

</td>
<td>


"

</td>
</tr>
<tr>
<td>


temp2_crit_alarm

</td>
<td>


ro

</td>
<td>


"

</td>
</tr>
<tr>
<td>


temp2_fault

</td>
<td>


ro

</td>
<td>


"

</td>
</tr>
<tr>
<td>


fan1_input

</td>
<td>


ro

</td>
<td>


tachometer speed

</td>
</tr>
<tr>
<td>


fan1_min

</td>
<td>


rw

</td>
<td>


"

</td>
</tr>
<tr>
<td>


fan1_max

</td>
<td>


rw

</td>
<td>


"

</td>
</tr>
<tr>
<td>


fan1_fault

</td>
<td>


ro

</td>
<td>


"

</td>
</tr>
<tr>
<td>


fan1_pulses

</td>
<td>


rw

</td>
<td>


Pulses per revolution can be either 2 or 4.

</td>
</tr>
<tr>
<td>


fan1_target

</td>
<td>


rw

</td>
<td>


Target fan speed, to be used with pwm1_enable mode 4.

</td>
</tr>
<tr>
<td>


pwm1

</td>
<td>


rw

</td>
<td>


pwm1

</td>
</tr>
<tr>
<td>


pwm1_enable

</td>
<td>


rw

</td>
<td>


regulator mode, 1=open loop, 2=fan controlled by remote temperature, 3=fan controlled by combination of the on-chip temperature and remote-sensor temperature, 4=fan controlled by target rpm set with fan1_target attribute.

</td>
</tr>
<tr>
<td>


pwm1_mode

</td>
<td>


rw

</td>
<td>


Fan duty control mode (0=DC, 1=PWM)

</td>
</tr>
<tr>
<td>


pwm1_auto_channels_temp

</td>
<td>


ro

</td>
<td>


1 if pwm_enable==2, 3 if pwm_enable==3

</td>
</tr>
<tr>
<td>


pwm1_auto_point1_pwm

</td>
<td>


ro

</td>
<td>


Hardwired to 0, shared for both temperature channels.

</td>
</tr>
<tr>
<td>


pwm1_auto_point2_pwm

</td>
<td>


rw

</td>
<td>


This value is shared for both temperature channels.

</td>
</tr>
<tr>
<td>


pwm1_auto_point3_pwm

</td>
<td>


rw

</td>
<td>


Hardwired to 255, shared for both temperature channels.

</td>
</tr>
<tr>
<td>


temp1_auto_point1_temp

</td>
<td>


ro

</td>
<td>


Hardwired to temp2_auto_point1_temp which is rw. Below this temperature fan stops.

</td>
</tr>
<tr>
<td>


temp1_auto_point2_temp

</td>
<td>


rw

</td>
<td>


The low-temperature limit of the proportional range. Below this temperature pwm1 = pwm1_auto_point2_pwm. It can go from 0 degree C to 124 degree C in steps of 4 degree C. Read it out after writing to get the actual value.

</td>
</tr>
<tr>
<td>


temp1_auto_point3_temp

</td>
<td>


rw

</td>
<td>


Above this temperature fan runs at maximum speed. It can go from temp1_auto_point2_temp. It can only have certain discrete values which depend on temp1_auto_point2_temp and pwm1_auto_point2_pwm. Read it out after writing to get the actual value.

</td>
</tr>
<tr>
<td>


temp2_auto_point1_temp

</td>
<td>


rw

</td>
<td>


Must be between 0 degree C and 63 degree C and it defines the passive cooling temperature. Below this temperature the fan stops in the closed loop mode.

</td>
</tr>
<tr>
<td>


temp2_auto_point2_temp

</td>
<td>


rw

</td>
<td>


The low-temperature limit of the proportional range. Below this temperature pwm1 = pwm1_auto_point2_pwm. It can go from 0 degree C to 124 degree C in steps of 4 degree C.

</td>
</tr>
<tr>
<td>


temp2_auto_point3_temp

</td>
<td>


rw

</td>
<td>


Above this temperature fan runs at maximum speed. It can only have certain discrete values which depend on temp2_auto_point2_temp and pwm1_auto_point2_pwm. Read it out after writing to get actual value.

</td>
</tr>
</tbody>
</table>

<a id="rst-module-parameters"></a>

## Module parameters

If your board has a BIOS that initializes the amc6821 correctly, you should load the module with: init=0.

If your board BIOS doesn't initialize the chip, or you want different settings, you can set the following parameters:

- init=1,

- pwminv: 0 default pwm output, 1 inverts pwm output.
