code:
Kernel driver tps40422
======================

Supported chips:

  * TI TPS40422

    Prefix: 'tps40422'

    Addresses scanned: -

    Datasheet: https://www.ti.com/lit/gpn/tps40422

Author: Zhu Laiwen <richard.zhu@nsn.com>

Description
-----------

This driver supports TI TPS40422 Dual-Output or Two-Phase Synchronous Buck
Controller with PMBus

The driver is a client driver to the core PMBus driver.
Please see Documentation/hwmon/pmbus.rst for details on PMBus client drivers.

Usage Notes
-----------

This driver does not auto-detect devices. You will have to instantiate the
devices explicitly. Please see Documentation/i2c/instantiating-devices.rst for
details.

Platform data support
---------------------

The driver supports standard PMBus driver platform data.

Sysfs entries
-------------

The following attributes are supported.

======================= =======================================================
in[1-2]_label		"vout[1-2]"
in[1-2]_input		Measured voltage. From READ_VOUT register.
in[1-2]_alarm		voltage alarm.

curr[1-2]_input		Measured current. From READ_IOUT register.
curr[1-2]_label		"iout[1-2]"
curr1_max		Maximum current. From IOUT_OC_WARN_LIMIT register.
curr1_crit		Critical maximum current. From IOUT_OC_FAULT_LIMIT
			register.
curr1_max_alarm		Current high alarm. From IOUT_OC_WARN_LIMIT status.
curr1_crit_alarm	Current critical high alarm. From IOUT_OC_FAULT status.
curr2_alarm		Current high alarm. From IOUT_OC_WARNING status.

temp1_input		Measured temperature. From READ_TEMPERATURE_2 register
			on page 0.
temp1_max		Maximum temperature. From OT_WARN_LIMIT register.
temp1_crit		Critical high temperature. From OT_FAULT_LIMIT register.
temp1_max_alarm		Chip temperature high alarm. Set by comparing
			READ_TEMPERATURE_2 on page 0 with OT_WARN_LIMIT if
			TEMP_OT_WARNING status is set.
temp1_crit_alarm	Chip temperature critical high alarm. Set by comparing
			READ_TEMPERATURE_2 on page 0 with OT_FAULT_LIMIT if
			TEMP_OT_FAULT status is set.
temp2_input		Measured temperature. From READ_TEMPERATURE_2 register
			on page 1.
temp2_alarm		Chip temperature alarm on page 1.
======================= =======================================================


code:
Kernel driver tps53679
======================

Supported chips:

  * Texas Instruments TPS53647

    Prefix: 'tps53647'

    Addresses scanned: -

    Datasheet: https://www.ti.com/lit/gpn/tps53647

  * Texas Instruments TPS53667

    Prefix: 'tps53667'

    Addresses scanned: -

    Datasheet: https://www.ti.com/lit/gpn/TPS53667

  * Texas Instruments TPS53676

    Prefix: 'tps53676'

    Addresses scanned: -

    Datasheet: https://www.ti.com/lit/gpn/TPS53676

  * Texas Instruments TPS53679

    Prefix: 'tps53679'

    Addresses scanned: -

    Datasheet: https://www.ti.com/lit/gpn/TPS53679 (short version)

  * Texas Instruments TPS53681

    Prefix: 'tps53681'

    Addresses scanned: -

    Datasheet: https://www.ti.com/lit/gpn/TPS53681

  * Texas Instruments TPS53688

    Prefix: 'tps53688'

    Addresses scanned: -

    Datasheet: Available under NDA

Authors:
	Vadim Pasternak <vadimp@mellanox.com>
	Guenter Roeck <linux@roeck-us.net>

Description
-----------

Chips in this series are multi-phase step-down converters with one or two
output channels and up to 8 phases per channel.

Usage Notes
-----------

This driver does not probe for PMBus devices. You will have to instantiate
devices explicitly.

Example: the following commands will load the driver for an TPS53681 at address
0x60 on I2C bus #1::

	# modprobe tps53679
	# echo tps53681 0x60 > /sys/bus/i2c/devices/i2c-1/new_device

Sysfs attributes
----------------

======================= ========================================================
in1_label		"vin"

in1_input		Measured input voltage.

in1_lcrit		Critical minimum input voltage

			TPS53679, TPS53681, TPS53688 only.

in1_lcrit_alarm		Input voltage critical low alarm.

			TPS53679, TPS53681, TPS53688 only.

in1_crit		Critical maximum input voltage.

in1_crit_alarm		Input voltage critical high alarm.

in[N]_label		"vout[1-2]"

			- TPS53647, TPS53667: N=2
			- TPS53679, TPS53588: N=2,3

in[N]_input		Measured output voltage.

in[N]_lcrit		Critical minimum input voltage.

			TPS53679, TPS53681, TPS53688 only.

in[N]_lcrit_alarm	Critical minimum voltage alarm.

			TPS53679, TPS53681, TPS53688 only.

in[N]_alarm		Output voltage alarm.

			TPS53647, TPS53667 only.

in[N]_crit		Critical maximum output voltage.

			TPS53679, TPS53681, TPS53688 only.

in[N]_crit_alarm	Output voltage critical high alarm.

			TPS53679, TPS53681, TPS53688 only.

temp[N]_input		Measured temperature.

			- TPS53647, TPS53667: N=1
			- TPS53679, TPS53681, TPS53588: N=1,2

temp[N]_max		Maximum temperature.

temp[N]_crit		Critical high temperature.

temp[N]_max_alarm	Temperature high alarm.

temp[N]_crit_alarm	Temperature critical high alarm.

power1_label		"pin".

power1_input		Measured input power.

power[N]_label		"pout[1-2]".

			- TPS53647, TPS53667: N=2
			- TPS53676, TPS53679, TPS53681, TPS53588: N=2,3

power[N]_input		Measured output power.

curr1_label		"iin".

curr1_input		Measured input current.

curr1_max		Maximum input current.

curr1_max_alarm		Input current high alarm.

curr1_crit		Critical input current.

curr1_crit_alarm	Input current critical alarm.

curr[N]_label		"iout[1-2]" or "iout1.[0-5]".

			The first digit is the output channel, the second
			digit is the phase within the channel. Per-phase
			telemetry supported on TPS53676 and TPS53681 only.

			- TPS53647, TPS53667: N=2
			- TPS53679, TPS53588: N=2,3
			- TPS53676: N=2-8
			- TPS53681: N=2-9

curr[N]_input		Measured output current.

curr[N]_max		Maximum output current.

curr[N]_crit		Critical high output current.

curr[N]_max_alarm	Output current high alarm.

curr[N]_crit_alarm	Output current critical high alarm.

			Limit and alarm attributes are only available for
			non-phase telemetry (iout1, iout2).

======================= ========================================================

repo_name: angery/linux


code:
.. SPDX-License-Identifier: GPL-2.0-only

Kernel driver tps546d24
=======================

Supported chips:

  * TI TPS546D24

    Prefix: 'tps546d24'

    Addresses scanned: -

    Datasheet: https://www.ti.com/lit/gpn/tps546d24

Author: Duke Du <dukedu83@gmail.com>

Description
-----------

The TPS546D24A is a highly integrated, non-isolated DC/DC converter capable
of high frequency operation and 40-A current output from a 7-mm x 5-mm
package.

Two, three, and four TPS546D24A devices can be interconnected
to provide up to 160 A on a single output. The device has an option to
overdrive the internal 5-V LDO with an external 5-V supply via the VDD5
pin to improve efficiency and reduce power dissipation of the converter.

Platform data support
---------------------

The driver supports standard PMBus driver platform data.


code:
Kernel driver twl4030-madc
==========================

Supported chips:

	* Texas Instruments TWL4030

	Prefix: 'twl4030-madc'

Authors:
	J Keerthy <j-keerthy@ti.com>

Description
-----------

The Texas Instruments TWL4030 is a Power Management and Audio Circuit. Among
other things it contains a 10-bit A/D converter MADC. The converter has 16
channels which can be used in different modes.

See this table for the meaning of the different channels

======= ==========================================================
Channel Signal
======= ==========================================================
0	Battery type(BTYPE)
1	BCI: Battery temperature (BTEMP)
2	GP analog input
3	GP analog input
4	GP analog input
5	GP analog input
6	GP analog input
7	GP analog input
8	BCI: VBUS voltage(VBUS)
9	Backup Battery voltage (VBKP)
10	BCI: Battery charger current (ICHG)
11	BCI: Battery charger voltage (VCHG)
12	BCI: Main battery voltage (VBAT)
13	Reserved
14	Reserved
15	VRUSB Supply/Speaker left/Speaker right polarization level
======= ==========================================================

The Sysfs nodes will represent the voltage in the units of mV,
the temperature channel shows the converted temperature in
degree Celsius. The Battery charging current channel represents
battery charging current in mA.


code:
Kernel driver ucd9000
=====================

Supported chips:

  * TI UCD90120, UCD90124, UCD90160, UCD90320, UCD9090, and UCD90910

    Prefixes: 'ucd90120', 'ucd90124', 'ucd90160', 'ucd90320', 'ucd9090',
              'ucd90910'

    Addresses scanned: -

    Datasheets:

	- http://focus.ti.com/lit/ds/symlink/ucd90120.pdf
	- http://focus.ti.com/lit/ds/symlink/ucd90124.pdf
	- http://focus.ti.com/lit/ds/symlink/ucd90160.pdf
	- http://focus.ti.com/lit/ds/symlink/ucd90320.pdf
	- http://focus.ti.com/lit/ds/symlink/ucd9090.pdf
	- http://focus.ti.com/lit/ds/symlink/ucd90910.pdf

Author: Guenter Roeck <linux@roeck-us.net>

Description
-----------

From datasheets:

The UCD90120 Power Supply Sequencer and System Health Monitor monitors and
sequences up to 12 independent voltage rails. The device integrates a 12-bit
ADC with a 2.5V internal reference for monitoring up to 13 power supply voltage,
current, or temperature inputs.

The UCD90124 is a 12-rail PMBus/I2C addressable power-supply sequencer and
system-health monitor. The device integrates a 12-bit ADC for monitoring up to
13 power-supply voltage, current, or temperature inputs. Twenty-six GPIO pins
can be used for power supply enables, power-on reset signals, external
interrupts, cascading, or other system functions. Twelve of these pins offer PWM
functionality. Using these pins, the UCD90124 offers support for fan control,
margining, and general-purpose PWM functions.

The UCD90160 is a 16-rail PMBus/I2C addressable power-supply sequencer and
monitor. The device integrates a 12-bit ADC for monitoring up to 16 power-supply
voltage inputs. Twenty-six GPIO pins can be used for power supply enables,
power-on reset signals, external interrupts, cascading, or other system
functions. Twelve of these pins offer PWM functionality. Using these pins, the
UCD90160 offers support for margining, and general-purpose PWM functions.

The UCD90320 is a 32-rail PMBus/I2C addressable power-supply sequencer and
monitor. The 24 integrated ADC channels (AMONx) monitor the power supply
voltage, current, and temperature. Of the 84 GPIO pins, 8 can be used as
digital monitors (DMONx), 32 to enable the power supply (ENx), 24 for margining
(MARx), 16 for logical GPO, and 32 GPIs for cascading, and system function.

The UCD9090 is a 10-rail PMBus/I2C addressable power-supply sequencer and
monitor. The device integrates a 12-bit ADC for monitoring up to 10 power-supply
voltage inputs. Twenty-three GPIO pins can be used for power supply enables,
power-on reset signals, external interrupts, cascading, or other system
functions. Ten of these pins offer PWM functionality. Using these pins, the
UCD9090 offers support for margining, and general-purpose PWM functions.

The UCD90910 is a ten-rail I2C / PMBus addressable power-supply sequencer and
system-health monitor. The device integrates a 12-bit ADC for monitoring up to
13 power-supply voltage, current, or temperature inputs.

This driver is a client driver to the core PMBus driver. Please see
Documentation/hwmon/pmbus.rst for details on PMBus client drivers.

Usage Notes
-----------

This driver does not auto-detect devices. You will have to instantiate the
devices explicitly. Please see Documentation/i2c/instantiating-devices.rst for
details.

Platform data support
---------------------

The driver supports standard PMBus driver platform data. Please see
Documentation/hwmon/pmbus.rst for details.

Sysfs entries
-------------

The following attributes are supported. Limits are read-write; all other
attributes are read-only.

======================= ========================================================
in[1-12]_label		"vout[1-12]".
in[1-12]_input		Measured voltage. From READ_VOUT register.
in[1-12]_min		Minimum Voltage. From VOUT_UV_WARN_LIMIT register.
in[1-12]_max		Maximum voltage. From VOUT_OV_WARN_LIMIT register.
in[1-12]_lcrit		Critical minimum Voltage. VOUT_UV_FAULT_LIMIT register.
in[1-12]_crit		Critical maximum voltage. From VOUT_OV_FAULT_LIMIT
			register.
in[1-12]_min_alarm	Voltage low alarm. From VOLTAGE_UV_WARNING status.
in[1-12]_max_alarm	Voltage high alarm. From VOLTAGE_OV_WARNING status.
in[1-12]_lcrit_alarm	Voltage critical low alarm. From VOLTAGE_UV_FAULT
			status.
in[1-12]_crit_alarm	Voltage critical high alarm. From VOLTAGE_OV_FAULT
			status.

curr[1-12]_label	"iout[1-12]".
curr[1-12]_input	Measured current. From READ_IOUT register.
curr[1-12]_max		Maximum current. From IOUT_OC_WARN_LIMIT register.
curr[1-12]_lcrit	Critical minimum output current. From
			IOUT_UC_FAULT_LIMIT register.
curr[1-12]_crit		Critical maximum current. From IOUT_OC_FAULT_LIMIT
			register.
curr[1-12]_max_alarm	Current high alarm. From IOUT_OC_WARNING status.
curr[1-12]_crit_alarm	Current critical high alarm. From IOUT_OC_FAULT status.

			For each attribute index, either voltage or current is
			reported, but not both. If voltage or current is
			reported depends on the chip configuration.

temp[1-2]_input		Measured temperatures. From READ_TEMPERATURE_1 and
			READ_TEMPERATURE_2 registers.
temp[1-2]_max		Maximum temperature. From OT_WARN_LIMIT register.
temp[1-2]_crit		Critical high temperature. From OT_FAULT_LIMIT register.
temp[1-2]_max_alarm	Temperature high alarm.
temp[1-2]_crit_alarm	Temperature critical high alarm.

fan[1-4]_input		Fan RPM.
fan[1-4]_alarm		Fan alarm.
fan[1-4]_fault		Fan fault.

			Fan attributes are only available on chips supporting
			fan control (UCD90124, UCD90910). Attribute files are
			created only for enabled fans.
			Note that even though UCD90910 supports up to 10 fans,
			only up to four fans are currently supported.
======================= ========================================================


code:
Kernel driver ucd9200
=====================

Supported chips:

  * TI UCD9220, UCD9222, UCD9224, UCD9240, UCD9244, UCD9246, and UCD9248

    Prefixes: 'ucd9220', 'ucd9222', 'ucd9224', 'ucd9240', 'ucd9244', 'ucd9246',
    'ucd9248'

    Addresses scanned: -

    Datasheets:

	- http://focus.ti.com/lit/ds/symlink/ucd9220.pdf
	- http://focus.ti.com/lit/ds/symlink/ucd9222.pdf
	- http://focus.ti.com/lit/ds/symlink/ucd9224.pdf
	- http://focus.ti.com/lit/ds/symlink/ucd9240.pdf
	- http://focus.ti.com/lit/ds/symlink/ucd9244.pdf
	- http://focus.ti.com/lit/ds/symlink/ucd9246.pdf
	- http://focus.ti.com/lit/ds/symlink/ucd9248.pdf

Author: Guenter Roeck <linux@roeck-us.net>

Description
-----------

[From datasheets] UCD9220, UCD9222, UCD9224, UCD9240, UCD9244, UCD9246, and
UCD9248 are multi-rail, multi-phase synchronous buck digital PWM controllers
designed for non-isolated DC/DC power applications. The devices integrate
dedicated circuitry for DC/DC loop management with flash memory and a serial
interface to support configuration, monitoring and management.

This driver is a client driver to the core PMBus driver. Please see
Documentation/hwmon/pmbus.rst for details on PMBus client drivers.

Usage Notes
-----------

This driver does not auto-detect devices. You will have to instantiate the
devices explicitly. Please see Documentation/i2c/instantiating-devices.rst for
details.

Platform data support
---------------------

The driver supports standard PMBus driver platform data. Please see
Documentation/hwmon/pmbus.rst for details.

Sysfs entries
-------------

The following attributes are supported. Limits are read-write; all other
attributes are read-only.

======================= ========================================================
in1_label		"vin".
in1_input		Measured voltage. From READ_VIN register.
in1_min			Minimum Voltage. From VIN_UV_WARN_LIMIT register.
in1_max			Maximum voltage. From VIN_OV_WARN_LIMIT register.
in1_lcrit		Critical minimum Voltage. VIN_UV_FAULT_LIMIT register.
in1_crit		Critical maximum voltage. From VIN_OV_FAULT_LIMIT
			register.
in1_min_alarm		Voltage low alarm. From VIN_UV_WARNING status.
in1_max_alarm		Voltage high alarm. From VIN_OV_WARNING status.
in1_lcrit_alarm		Voltage critical low alarm. From VIN_UV_FAULT status.
in1_crit_alarm		Voltage critical high alarm. From VIN_OV_FAULT status.

in[2-5]_label		"vout[1-4]".
in[2-5]_input		Measured voltage. From READ_VOUT register.
in[2-5]_min		Minimum Voltage. From VOUT_UV_WARN_LIMIT register.
in[2-5]_max		Maximum voltage. From VOUT_OV_WARN_LIMIT register.
in[2-5]_lcrit		Critical minimum Voltage. VOUT_UV_FAULT_LIMIT register.
in[2-5]_crit		Critical maximum voltage. From VOUT_OV_FAULT_LIMIT
			register.
in[2-5]_min_alarm	Voltage low alarm. From VOLTAGE_UV_WARNING status.
in[2-5]_max_alarm	Voltage high alarm. From VOLTAGE_OV_WARNING status.
in[2-5]_lcrit_alarm	Voltage critical low alarm. From VOLTAGE_UV_FAULT
			status.
in[2-5]_crit_alarm	Voltage critical high alarm. From VOLTAGE_OV_FAULT
			status.

curr1_label		"iin".
curr1_input		Measured current. From READ_IIN register.

curr[2-5]_label		"iout[1-4]".
curr[2-5]_input		Measured current. From READ_IOUT register.
curr[2-5]_max		Maximum current. From IOUT_OC_WARN_LIMIT register.
curr[2-5]_lcrit		Critical minimum output current. From
			IOUT_UC_FAULT_LIMIT register.
curr[2-5]_crit		Critical maximum current. From IOUT_OC_FAULT_LIMIT
			register.
curr[2-5]_max_alarm	Current high alarm. From IOUT_OC_WARNING status.
curr[2-5]_crit_alarm	Current critical high alarm. From IOUT_OC_FAULT status.

power1_input		Measured input power. From READ_PIN register.
power1_label		"pin"

power[2-5]_input	Measured output power. From READ_POUT register.
power[2-5]_label	"pout[1-4]"

			The number of output voltage, current, and power
			attribute sets is determined by the number of enabled
			rails. See chip datasheets for details.

temp[1-5]_input		Measured temperatures. From READ_TEMPERATURE_1 and
			READ_TEMPERATURE_2 registers.
			temp1 is the chip internal temperature. temp[2-5] are
			rail temperatures.  temp[2-5] attributes are only
			created for enabled rails. See chip datasheets for
			details.
temp[1-5]_max		Maximum temperature. From OT_WARN_LIMIT register.
temp[1-5]_crit		Critical high temperature. From OT_FAULT_LIMIT register.
temp[1-5]_max_alarm	Temperature high alarm.
temp[1-5]_crit_alarm	Temperature critical high alarm.

fan1_input		Fan RPM. ucd9240 only.
fan1_alarm		Fan alarm. ucd9240 only.
fan1_fault		Fan fault. ucd9240 only.
======================= ========================================================


code:
Userspace tools
===============

Introduction
------------

Most mainboards have sensor chips to monitor system health (like temperatures,
voltages, fans speed). They are often connected through an I2C bus, but some
are also connected directly through the ISA bus.

The kernel drivers make the data from the sensor chips available in the /sys
virtual filesystem. Userspace tools are then used to display the measured
values or configure the chips in a more friendly manner.

Lm-sensors
----------

Core set of utilities that will allow you to obtain health information,
setup monitoring limits etc. You can get them on their homepage
http://www.lm-sensors.org/ or as a package from your Linux distribution.

If from website:
Get lm-sensors from project web site. Please note, you need only userspace
part, so compile with "make user" and install with "make user_install".

General hints to get things working:

0) get lm-sensors userspace utils
1) compile all drivers in I2C and Hardware Monitoring sections as modules
   in your kernel
2) run sensors-detect script, it will tell you what modules you need to load.
3) load them and run "sensors" command, you should see some results.
4) fix sensors.conf, labels, limits, fan divisors
5) if any more problems consult FAQ, or documentation

Other utilities
---------------

If you want some graphical indicators of system health look for applications
like: gkrellm, ksensors, xsensors, wmtemp, wmsensors, wmgtemp, ksysguardd,
hardware-monitor

If you are server administrator you can try snmpd or mrtgutils.


code:
Kernel driver vexpress
======================

Supported systems:

  * ARM Ltd. Versatile Express platform

    Prefix: 'vexpress'

    Datasheets:

      * "Hardware Description" sections of the Technical Reference Manuals
	for the Versatile Express boards:

	- http://infocenter.arm.com/help/topic/com.arm.doc.subset.boards.express/index.html

      * Section "4.4.14. System Configuration registers" of the V2M-P1 TRM:

	- http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0447-/index.html

Author: Pawel Moll

Description
-----------

Versatile Express platform (http://www.arm.com/versatileexpress/) is a
reference & prototyping system for ARM Ltd. processors. It can be set up
from a wide range of boards, each of them containing (apart of the main
chip/FPGA) a number of microcontrollers responsible for platform
configuration and control. Theses microcontrollers can also monitor the
board and its environment by a number of internal and external sensors,
providing information about power lines voltages and currents, board
temperature and power usage. Some of them also calculate consumed energy
and provide a cumulative use counter.

The configuration devices are _not_ memory mapped and must be accessed
via a custom interface, abstracted by the "vexpress_config" API.

As these devices are non-discoverable, they must be described in a Device
Tree passed to the kernel. Details of the DT binding for them can be found
in Documentation/devicetree/bindings/hwmon/vexpress.txt.


code:
Kernel driver via686a
=====================

Supported chips:

  * Via VT82C686A, VT82C686B  Southbridge Integrated Hardware Monitor

    Prefix: 'via686a'

    Addresses scanned: ISA in PCI-space encoded address

    Datasheet: On request through web form (http://www.via.com.tw/en/resources/download-center/)

Authors:
	- Kyösti Mälkki <kmalkki@cc.hut.fi>,
	- Mark D. Studebaker <mdsxyz123@yahoo.com>
	- Bob Dougherty <bobd@stanford.edu>
	- (Some conversion-factor data were contributed by
	- Jonathan Teh Soon Yew <j.teh@iname.com>
	- and Alex van Kaam <darkside@chello.nl>.)

Module Parameters
-----------------

======================= =======================================================
force_addr=0xaddr       Set the I/O base address. Useful for boards that
			don't set the address in the BIOS. Look for a BIOS
			upgrade before resorting to this. Does not do a
			PCI force; the via686a must still be present in lspci.
			Don't use this unless the driver complains that the
			base address is not set.
			Example: 'modprobe via686a force_addr=0x6000'
======================= =======================================================

Description
-----------

The driver does not distinguish between the chips and reports
all as a 686A.

The Via 686a southbridge has integrated hardware monitor functionality.
It also has an I2C bus, but this driver only supports the hardware monitor.
For the I2C bus driver, see <file:Documentation/i2c/busses/i2c-viapro.rst>

The Via 686a implements three temperature sensors, two fan rotation speed
sensors, five voltage sensors and alarms.

Temperatures are measured in degrees Celsius. An alarm is triggered once
when the Overtemperature Shutdown limit is crossed; it is triggered again
as soon as it drops below the hysteresis value.

Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
triggered if the rotation speed has dropped below a programmable limit. Fan
readings can be divided by a programmable divider (1, 2, 4 or 8) to give
the readings more range or accuracy. Not all RPM values can accurately be
represented, so some rounding is done. With a divider of 2, the lowest
representable value is around 2600 RPM.

Voltage sensors (also known as IN sensors) report their values in volts.
An alarm is triggered if the voltage has crossed a programmable minimum
or maximum limit. Voltages are internally scalled, so each voltage channel
has a different resolution and range.

If an alarm triggers, it will remain triggered until the hardware register
is read at least once. This means that the cause for the alarm may
already have disappeared! Note that in the current implementation, all
hardware registers are read whenever any data is read (unless it is less
than 1.5 seconds since the last update). This means that you can easily
miss once-only alarms.

The driver only updates its values each 1.5 seconds; reading it more often
will do no harm, but will return 'old' values.

Known Issues
------------

This driver handles sensors integrated in some VIA south bridges. It is
possible that a motherboard maker used a VT82C686A/B chip as part of a
product design but was not interested in its hardware monitoring features,
in which case the sensor inputs will not be wired. This is the case of
the Asus K7V, A7V and A7V133 motherboards, to name only a few of them.
So, if you need the force_addr parameter, and end up with values which
don't seem to make any sense, don't look any further: your chip is simply
not wired for hardware monitoring.


code:
Kernel driver vt1211
====================

Supported chips:

  * VIA VT1211

    Prefix: 'vt1211'

    Addresses scanned: none, address read from Super-I/O config space

    Datasheet: Provided by VIA upon request and under NDA

Authors: Juerg Haefliger <juergh@gmail.com>

This driver is based on the driver for kernel 2.4 by Mark D. Studebaker and
its port to kernel 2.6 by Lars Ekman.

Thanks to Joseph Chan and Fiona Gatt from VIA for providing documentation and
technical support.

Module Parameters
-----------------

* uch_config: int
			Override the BIOS default universal channel (UCH)
			configuration for channels 1-5.
			Legal values are in the range of 0-31. Bit 0 maps to
			UCH1, bit 1 maps to UCH2 and so on. Setting a bit to 1
			enables the thermal input of that particular UCH and
			setting a bit to 0 enables the voltage input.

* int_mode: int
			Override the BIOS default temperature interrupt mode.
			The only possible value is 0 which forces interrupt
			mode 0. In this mode, any pending interrupt is cleared
			when the status register is read but is regenerated as
			long as the temperature stays above the hysteresis
			limit.

Be aware that overriding BIOS defaults might cause some unwanted side effects!

Description
-----------

The VIA VT1211 Super-I/O chip includes complete hardware monitoring
capabilities. It monitors 2 dedicated temperature sensor inputs (temp1 and
temp2), 1 dedicated voltage (in5) and 2 fans. Additionally, the chip
implements 5 universal input channels (UCH1-5) that can be individually
programmed to either monitor a voltage or a temperature.

This chip also provides manual and automatic control of fan speeds (according
to the datasheet). The driver only supports automatic control since the manual
mode doesn't seem to work as advertised in the datasheet. In fact I couldn't
get manual mode to work at all! Be aware that automatic mode hasn't been
tested very well (due to the fact that my EPIA M10000 doesn't have the fans
connected to the PWM outputs of the VT1211 :-().

The following table shows the relationship between the vt1211 inputs and the
sysfs nodes.

=============== ============== =========== ================================
Sensor          Voltage Mode   Temp Mode   Default Use (from the datasheet)
=============== ============== =========== ================================
Reading 1                      temp1       Intel thermal diode
Reading 3                      temp2       Internal thermal diode
UCH1/Reading2   in0            temp3       NTC type thermistor
UCH2            in1            temp4       +2.5V
UCH3            in2            temp5       VccP (processor core)
UCH4            in3            temp6       +5V
UCH5            in4            temp7       +12V
+3.3V           in5                        Internal VCC (+3.3V)
=============== ============== =========== ================================

Voltage Monitoring
------------------

Voltages are sampled by an 8-bit ADC with a LSB of ~10mV. The supported input
range is thus from 0 to 2.60V. Voltage values outside of this range need
external scaling resistors. This external scaling needs to be compensated for
via compute lines in sensors.conf, like:

compute inx @*(1+R1/R2), @/(1+R1/R2)

The board level scaling resistors according to VIA's recommendation are as
follows. And this is of course totally dependent on the actual board
implementation :-) You will have to find documentation for your own
motherboard and edit sensors.conf accordingly.

============= ====== ====== ========= ============
				      Expected
Voltage       R1     R2     Divider   Raw Value
============= ====== ====== ========= ============
+2.5V         2K     10K    1.2       2083 mV
VccP          ---    ---    1.0       1400 mV [1]_
+5V           14K    10K    2.4       2083 mV
+12V          47K    10K    5.7       2105 mV
+3.3V (int)   2K     3.4K   1.588     3300 mV [2]_
+3.3V (ext)   6.8K   10K    1.68      1964 mV
============= ====== ====== ========= ============

.. [1] Depending on the CPU (1.4V is for a VIA C3 Nehemiah).

.. [2] R1 and R2 for 3.3V (int) are internal to the VT1211 chip and the driver
       performs the scaling and returns the properly scaled voltage value.

Each measured voltage has an associated low and high limit which triggers an
alarm when crossed.

Temperature Monitoring
----------------------

Temperatures are reported in millidegree Celsius. Each measured temperature
has a high limit which triggers an alarm if crossed. There is an associated
hysteresis value with each temperature below which the temperature has to drop
before the alarm is cleared (this is only true for interrupt mode 0). The
interrupt mode can be forced to 0 in case the BIOS doesn't do it
automatically. See the 'Module Parameters' section for details.

All temperature channels except temp2 are external. Temp2 is the VT1211
internal thermal diode and the driver does all the scaling for temp2 and
returns the temperature in millidegree Celsius. For the external channels
temp1 and temp3-temp7, scaling depends on the board implementation and needs
to be performed in userspace via sensors.conf.

Temp1 is an Intel-type thermal diode which requires the following formula to
convert between sysfs readings and real temperatures:

compute temp1 (@-Offset)/Gain, (@*Gain)+Offset

According to the VIA VT1211 BIOS porting guide, the following gain and offset
values should be used:

=============== ======== ===========
Diode Type      Offset   Gain
=============== ======== ===========
Intel CPU       88.638   0.9528
		65.000   0.9686 [3]_
VIA C3 Ezra     83.869   0.9528
VIA C3 Ezra-T   73.869   0.9528
=============== ======== ===========

.. [3] This is the formula from the lm_sensors 2.10.0 sensors.conf file. I don't
       know where it comes from or how it was derived, it's just listed here for
       completeness.

Temp3-temp7 support NTC thermistors. For these channels, the driver returns
the voltages as seen at the individual pins of UCH1-UCH5. The voltage at the
pin (Vpin) is formed by a voltage divider made of the thermistor (Rth) and a
scaling resistor (Rs)::

  Vpin = 2200 * Rth / (Rs + Rth)   (2200 is the ADC max limit of 2200 mV)

The equation for the thermistor is as follows (google it if you want to know
more about it)::

  Rth = Ro * exp(B * (1 / T - 1 / To))   (To is 298.15K (25C) and Ro is the
					  nominal resistance at 25C)

Mingling the above two equations and assuming Rs = Ro and B = 3435 yields the
following formula for sensors.conf::

  compute tempx 1 / (1 / 298.15 - (` (2200 / @ - 1)) / 3435) - 273.15,
		2200 / (1 + (^ (3435 / 298.15 - 3435 / (273.15 + @))))

Fan Speed Control
-----------------

The VT1211 provides 2 programmable PWM outputs to control the speeds of 2
fans. Writing a 2 to any of the two pwm[1-2]_enable sysfs nodes will put the
PWM controller in automatic mode. There is only a single controller that
controls both PWM outputs but each PWM output can be individually enabled and
disabled.

Each PWM has 4 associated distinct output duty-cycles: full, high, low and
off. Full and off are internally hard-wired to 255 (100%) and 0 (0%),
respectively. High and low can be programmed via
pwm[1-2]_auto_point[2-3]_pwm. Each PWM output can be associated with a
different thermal input but - and here's the weird part - only one set of
thermal thresholds exist that controls both PWMs output duty-cycles. The
thermal thresholds are accessible via pwm[1-2]_auto_point[1-4]_temp. Note
that even though there are 2 sets of 4 auto points each, they map to the same
registers in the VT1211 and programming one set is sufficient (actually only
the first set pwm1_auto_point[1-4]_temp is writable, the second set is
read-only).

========================== =========================================
PWM Auto Point             PWM Output Duty-Cycle
========================== =========================================
pwm[1-2]_auto_point4_pwm   full speed duty-cycle (hard-wired to 255)
pwm[1-2]_auto_point3_pwm   high speed duty-cycle
pwm[1-2]_auto_point2_pwm   low speed duty-cycle
pwm[1-2]_auto_point1_pwm   off duty-cycle (hard-wired to 0)
========================== =========================================

==========================  =================
Temp Auto Point             Thermal Threshold
==========================  =================
pwm[1-2]_auto_point4_temp   full speed temp
pwm[1-2]_auto_point3_temp   high speed temp
pwm[1-2]_auto_point2_temp   low speed temp
pwm[1-2]_auto_point1_temp   off temp
==========================  =================

Long story short, the controller implements the following algorithm to set the
PWM output duty-cycle based on the input temperature:

=================== ======================= ========================
Thermal Threshold   Output Duty-Cycle       Output Duty-Cycle
		    (Rising Temp)           (Falling Temp)
=================== ======================= ========================
-                   full speed duty-cycle   full speed duty-cycle
full speed temp
-		    high speed duty-cycle   full speed duty-cycle
high speed temp
-		    low speed duty-cycle    high speed duty-cycle
low speed temp
-		    off duty-cycle          low speed duty-cycle
off temp
=================== ======================= ========================


code:
Kernel driver w83627ehf
=======================

Supported chips:

  * Winbond W83627EHF/EHG (ISA access ONLY)

    Prefix: 'w83627ehf'

    Addresses scanned: ISA address retrieved from Super I/O registers

    Datasheet: not available

  * Winbond W83627DHG

    Prefix: 'w83627dhg'

    Addresses scanned: ISA address retrieved from Super I/O registers

    Datasheet: not available

  * Winbond W83627DHG-P

    Prefix: 'w83627dhg'

    Addresses scanned: ISA address retrieved from Super I/O registers

    Datasheet: not available

  * Winbond W83627UHG

    Prefix: 'w83627uhg'

    Addresses scanned: ISA address retrieved from Super I/O registers

    Datasheet: available from www.nuvoton.com

  * Winbond W83667HG

    Prefix: 'w83667hg'

    Addresses scanned: ISA address retrieved from Super I/O registers

    Datasheet: not available

  * Winbond W83667HG-B

    Prefix: 'w83667hg'

    Addresses scanned: ISA address retrieved from Super I/O registers

    Datasheet: Available from Nuvoton upon request

  * Nuvoton NCT6775F/W83667HG-I

    Prefix: 'nct6775'

    Addresses scanned: ISA address retrieved from Super I/O registers

    Datasheet: Available from Nuvoton upon request

  * Nuvoton NCT6776F

    Prefix: 'nct6776'

    Addresses scanned: ISA address retrieved from Super I/O registers

    Datasheet: Available from Nuvoton upon request

Authors:

	- Jean Delvare <jdelvare@suse.de>
	- Yuan Mu (Winbond)
	- Rudolf Marek <r.marek@assembler.cz>
	- David Hubbard <david.c.hubbard@gmail.com>
	- Gong Jun <JGong@nuvoton.com>

Description
-----------

This driver implements support for the Winbond W83627EHF, W83627EHG,
W83627DHG, W83627DHG-P, W83627UHG, W83667HG, W83667HG-B, W83667HG-I
(NCT6775F), and NCT6776F super I/O chips. We will refer to them collectively
as Winbond chips.

The chips implement 3 to 4 temperature sensors (9 for NCT6775F and NCT6776F),
2 to 5 fan rotation speed sensors, 8 to 10 analog voltage sensors, one VID
(except for 627UHG), alarms with beep warnings (control unimplemented),
and some automatic fan regulation strategies (plus manual fan control mode).

The temperature sensor sources on W82677HG-B, NCT6775F, and NCT6776F are
configurable. temp4 and higher attributes are only reported if its temperature
source differs from the temperature sources of the already reported temperature
sensors. The configured source for each of the temperature sensors is provided
in tempX_label.

Temperatures are measured in degrees Celsius and measurement resolution is 1
degC for temp1 and 0.5 degC for temp2 and temp3. For temp4 and higher,
resolution is 1 degC for W83667HG-B and 0.0 degC for NCT6775F and NCT6776F.
An alarm is triggered when the temperature gets higher than high limit;
it stays on until the temperature falls below the hysteresis value.
Alarms are only supported for temp1, temp2, and temp3.

Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
triggered if the rotation speed has dropped below a programmable limit. Fan
readings can be divided by a programmable divider (1, 2, 4, 8, 16, 32, 64 or
128) to give the readings more range or accuracy. The driver sets the most
suitable fan divisor itself. Some fans might not be present because they
share pins with other functions.

Voltage sensors (also known as IN sensors) report their values in millivolts.
An alarm is triggered if the voltage has crossed a programmable minimum
or maximum limit.

The driver supports automatic fan control mode known as Thermal Cruise.
In this mode, the chip attempts to keep the measured temperature in a
predefined temperature range. If the temperature goes out of range, fan
is driven slower/faster to reach the predefined range again.

The mode works for fan1-fan4. Mapping of temperatures to pwm outputs is as
follows::

  temp1 -> pwm1
  temp2 -> pwm2
  temp3 -> pwm3 (not on 627UHG)
  prog  -> pwm4 (not on 667HG and 667HG-B; the programmable setting is not
		 supported by the driver)

/sys files
----------

name
	this is a standard hwmon device entry, it contains the name of
	the device (see the prefix in the list of supported devices at
	the top of this file)

pwm[1-4]
	this file stores PWM duty cycle or DC value (fan speed) in range:

	   0 (stop) to 255 (full)

pwm[1-4]_enable
	this file controls mode of fan/temperature control:

	* 1 Manual mode, write to pwm file any value 0-255 (full speed)
	* 2 "Thermal Cruise" mode
	* 3 "Fan Speed Cruise" mode
	* 4 "Smart Fan III" mode
	* 5 "Smart Fan IV" mode

	SmartFan III mode is not supported on NCT6776F.

	SmartFan IV mode is configurable only if it was configured at system
	startup, and is only supported for W83677HG-B, NCT6775F, and NCT6776F.
	SmartFan IV operational parameters can not be configured at this time,
	and the various pwm attributes are not used in SmartFan IV mode.
	The attributes can be written to, which is useful if you plan to
	configure the system for a different pwm mode. However, the information
	returned when reading pwm attributes is unrelated to SmartFan IV
	operation.

pwm[1-4]_mode
	controls if output is PWM or DC level

	* 0 DC output (0 - 12v)
	* 1 PWM output

Thermal Cruise mode
-------------------

If the temperature is in the range defined by:

pwm[1-4]_target
		   set target temperature, unit millidegree Celsius
		   (range 0 - 127000)
pwm[1-4]_tolerance
		   tolerance, unit millidegree Celsius (range 0 - 15000)

there are no changes to fan speed. Once the temperature leaves the interval,
fan speed increases (temp is higher) or decreases if lower than desired.
There are defined steps and times, but not exported by the driver yet.

pwm[1-4]_min_output
		   minimum fan speed (range 1 - 255), when the temperature
		   is below defined range.
pwm[1-4]_stop_time
		   how many milliseconds [ms] must elapse to switch
		   corresponding fan off. (when the temperature was below
		   defined range).
pwm[1-4]_start_output
		   minimum fan speed (range 1 - 255) when spinning up
pwm[1-4]_step_output
		   rate of fan speed change (1 - 255)
pwm[1-4]_stop_output
		   minimum fan speed (range 1 - 255) when spinning down
pwm[1-4]_max_output
		   maximum fan speed (range 1 - 255), when the temperature
		   is above defined range.

Note: last six functions are influenced by other control bits, not yet exported
      by the driver, so a change might not have any effect.

Implementation Details
----------------------

Future driver development should bear in mind that the following registers have
different functions on the 627EHF and the 627DHG. Some registers also have
different power-on default values, but BIOS should already be loading
appropriate defaults. Note that bank selection must be performed as is currently
done in the driver for all register addresses.

========================= =====================================================
Register(s)		  Meaning
========================= =====================================================
0x49                      only on DHG, selects temperature source for AUX fan,
			  CPU fan0
0x4a                      not completely documented for the EHF and the DHG
			  documentation assigns different behavior to bits 7
			  and 6, including extending the temperature input
			  selection to SmartFan I, not just SmartFan III.
			  Testing on the EHF will reveal whether they are
			  compatible or not.
0x58                      Chip ID: 0xa1=EHF 0xc1=DHG
0x5e                      only on DHG, has bits to enable "current mode"
			  temperature detection and critical temperature
			  protection
0x45b                     only on EHF, bit 3, vin4 alarm (EHF supports 10
			  inputs, only 9 on DHG)
0x552                     only on EHF, vin4
0x558                     only on EHF, vin4 high limit
0x559                     only on EHF, vin4 low limit
0x6b                      only on DHG, SYS fan critical temperature
0x6c                      only on DHG, CPU fan0 critical temperature
0x6d                      only on DHG, AUX fan critical temperature
0x6e                      only on DHG, CPU fan1 critical temperature
0x50-0x55 and 0x650-0x657 marked as:

			    - "Test Register" for the EHF
			    - "Reserved Register" for the DHG
========================= =====================================================

The DHG also supports PECI, where the DHG queries Intel CPU temperatures, and
the ICH8 southbridge gets that data via PECI from the DHG, so that the
southbridge drives the fans. And the DHG supports SST, a one-wire serial bus.

The DHG-P has an additional automatic fan speed control mode named Smart Fan
(TM) III+. This mode is not yet supported by the driver.


code:
Kernel driver w83627hf
======================

Supported chips:
  * Winbond W83627HF (ISA accesses ONLY)
    Prefix: 'w83627hf'
    Addresses scanned: ISA address retrieved from Super I/O registers
  * Winbond W83627THF
    Prefix: 'w83627thf'
    Addresses scanned: ISA address retrieved from Super I/O registers
  * Winbond W83697HF
    Prefix: 'w83697hf'
    Addresses scanned: ISA address retrieved from Super I/O registers
  * Winbond W83637HF
    Prefix: 'w83637hf'
    Addresses scanned: ISA address retrieved from Super I/O registers
  * Winbond W83687THF
    Prefix: 'w83687thf'
    Addresses scanned: ISA address retrieved from Super I/O registers
    Datasheet: Provided by Winbond on request(http://www.winbond.com/hq/enu)

Authors:
	Frodo Looijaard <frodol@dds.nl>,
	Philip Edelbrock <phil@netroedge.com>,
	Mark Studebaker <mdsxyz123@yahoo.com>,
	Bernhard C. Schrenk <clemy@clemy.org>

Module Parameters
-----------------

* force_i2c: int
  Initialize the I2C address of the sensors
* init: int
  (default is 1)
  Use 'init=0' to bypass initializing the chip.
  Try this if your computer crashes when you load the module.

Description
-----------

This driver implements support for ISA accesses *only* for
the Winbond W83627HF, W83627THF, W83697HF and W83637HF Super I/O chips.
We will refer to them collectively as Winbond chips.

This driver supports ISA accesses, which should be more reliable
than i2c accesses. Also, for Tyan boards which contain both a
Super I/O chip and a second i2c-only Winbond chip (often a W83782D),
using this driver will avoid i2c address conflicts and complex
initialization that were required in the w83781d driver.

If you really want i2c accesses for these Super I/O chips,
use the w83781d driver. However this is not the preferred method
now that this ISA driver has been developed.

The `w83627_HF_` uses pins 110-106 as VID0-VID4. The `w83627_THF_` uses the
same pins as GPIO[0:4]. Technically, the `w83627_THF_` does not support a
VID reading. However the two chips have the identical 128 pin package. So,
it is possible or even likely for a w83627thf to have the VID signals routed
to these pins despite their not being labeled for that purpose. Therefore,
the w83627thf driver interprets these as VID. If the VID on your board
doesn't work, first see doc/vid in the lm_sensors package[1]. If that still
doesn't help, you may just ignore the bogus VID reading with no harm done.

For further information on this driver see the w83781d driver documentation.

[1] http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/vid

Forcing the address
-------------------

The driver used to have a module parameter named force_addr, which could
be used to force the base I/O address of the hardware monitoring block.
This was meant as a workaround for mainboards with a broken BIOS. This
module parameter is gone for technical reasons. If you need this feature,
you can obtain the same result by using the isaset tool (part of
lm-sensors) before loading the driver:

# Enter the Super I/O config space::

	isaset -y -f 0x2e 0x87
	isaset -y -f 0x2e 0x87

# Select the hwmon logical device::

	isaset -y 0x2e 0x2f 0x07 0x0b

# Set the base I/O address (to 0x290 in this example)::

	isaset -y 0x2e 0x2f 0x60 0x02
	isaset -y 0x2e 0x2f 0x61 0x90

# Exit the Super-I/O config space::

	isaset -y -f 0x2e 0xaa

The above sequence assumes a Super-I/O config space at 0x2e/0x2f, but
0x4e/0x4f is also possible.

Voltage pin mapping
-------------------

Here is a summary of the voltage pin mapping for the W83627THF. This
can be useful to convert data provided by board manufacturers into
working libsensors configuration statements:

- W83627THF

  ======== =============== =============== ===============
  Pin	   Name		   Register	   Sysfs attribute
  ======== =============== =============== ===============
    100	   CPUVCORE	   20h		   in0
     99	   VIN0		   21h		   in1
     98	   VIN1		   22h		   in2
     97	   VIN2		   24h		   in4
    114	   AVCC		   23h		   in3
     61	   5VSB		   50h (bank 5)	   in7
     74	   VBAT		   51h (bank 5)	   in8
  ======== =============== =============== ===============

For other supported devices, you'll have to take the hard path and
look up the information in the datasheet yourself (and then add it
to this document please.)


code:
Kernel driver w83773g
=====================

Supported chips:

  * Nuvoton W83773G

    Prefix: 'w83773g'

    Addresses scanned: I2C 0x4c and 0x4d

    Datasheet: https://www.nuvoton.com/resource-files/W83773G_SG_DatasheetV1_2.pdf

Authors:

	Lei YU <mine260309@gmail.com>

Description
-----------

This driver implements support for Nuvoton W83773G temperature sensor
chip. This chip implements one local and two remote sensors.
The chip also features offsets for the two remote sensors which get added to
the input readings. The chip does all the scaling by itself and the driver
therefore reports true temperatures that don't need any user-space adjustments.
Temperature is measured in degrees Celsius.
The chip is wired over I2C/SMBus and specified over a temperature
range of -40 to +125 degrees Celsius (for local sensor) and -40 to +127
degrees Celsius (for remote sensors).
Resolution for both the local and remote channels is 0.125 degree C.

The chip supports only temperature measurement. The driver exports
the temperature values via the following sysfs files:

**temp[1-3]_input, temp[2-3]_fault, temp[2-3]_offset, update_interval**


code:
Kernel driver w83781d
=====================

Supported chips:

  * Winbond W83781D

    Prefix: 'w83781d'

    Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports)

    Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/w83781d.pdf

  * Winbond W83782D

    Prefix: 'w83782d'

    Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports)

    Datasheet: https://www.winbond.com

  * Winbond W83783S

    Prefix: 'w83783s'

    Addresses scanned: I2C 0x2d

    Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/w83783s.pdf

  * Asus AS99127F

    Prefix: 'as99127f'

    Addresses scanned: I2C 0x28 - 0x2f

    Datasheet: Unavailable from Asus

Authors:

      - Frodo Looijaard <frodol@dds.nl>,
      - Philip Edelbrock <phil@netroedge.com>,
      - Mark Studebaker <mdsxyz123@yahoo.com>

Module parameters
-----------------

* init int
    (default 1)

    Use 'init=0' to bypass initializing the chip.
    Try this if your computer crashes when you load the module.

* reset int
    (default 0)
    The driver used to reset the chip on load, but does no more. Use
    'reset=1' to restore the old behavior. Report if you need to do this.

force_subclients=bus,caddr,saddr,saddr
  This is used to force the i2c addresses for subclients of
  a certain chip. Typical usage is `force_subclients=0,0x2d,0x4a,0x4b`
  to force the subclients of chip 0x2d on bus 0 to i2c addresses
  0x4a and 0x4b. This parameter is useful for certain Tyan boards.

Description
-----------

This driver implements support for the Winbond W83781D, W83782D, W83783S
chips, and the Asus AS99127F chips. We will refer to them collectively as
W8378* chips.

There is quite some difference between these chips, but they are similar
enough that it was sensible to put them together in one driver.
The Asus chips are similar to an I2C-only W83782D.

+----------+---------+--------+-------+-------+---------+--------+------+-----+
| Chip     | #vin    | #fanin | #pwm  | #temp | wchipid | vendid | i2c  | ISA |
+----------+---------+--------+-------+-------+---------+--------+------+-----+
| as99127f | 7       | 3      | 0     | 3     | 0x31    | 0x12c3 | yes  |  no |
+----------+---------+--------+-------+-------+---------+--------+------+-----+
| as99127f rev.2 (type_name = as99127f)       | 0x31    | 0x5ca3 | yes  |  no |
+----------+---------+--------+-------+-------+---------+--------+------+-----+
| w83781d  | 7       | 3      | 0     | 3     | 0x10-1  | 0x5ca3 | yes  | yes |
+----------+---------+--------+-------+-------+---------+--------+------+-----+
| w83782d  | 9       | 3      | 2-4   | 3     | 0x30    | 0x5ca3 | yes  | yes |
+----------+---------+--------+-------+-------+---------+--------+------+-----+
| w83783s  | 5-6     | 3      | 2     |  1-2  | 0x40    | 0x5ca3 | yes  |  no |
+----------+---------+--------+-------+-------+---------+--------+------+-----+

Detection of these chips can sometimes be foiled because they can be in
an internal state that allows no clean access. If you know the address
of the chip, use a 'force' parameter; this will put them into a more
well-behaved state first.

The W8378* implements temperature sensors (three on the W83781D and W83782D,
two on the W83783S), three fan rotation speed sensors, voltage sensors
(seven on the W83781D, nine on the W83782D and six on the W83783S), VID
lines, alarms with beep warnings, and some miscellaneous stuff.

Temperatures are measured in degrees Celsius. There is always one main
temperature sensor, and one (W83783S) or two (W83781D and W83782D) other
sensors. An alarm is triggered for the main sensor once when the
Overtemperature Shutdown limit is crossed; it is triggered again as soon as
it drops below the Hysteresis value. A more useful behavior
can be found by setting the Hysteresis value to +127 degrees Celsius; in
this case, alarms are issued during all the time when the actual temperature
is above the Overtemperature Shutdown value. The driver sets the
hysteresis value for temp1 to 127 at initialization.

For the other temperature sensor(s), an alarm is triggered when the
temperature gets higher then the Overtemperature Shutdown value; it stays
on until the temperature falls below the Hysteresis value. But on the
W83781D, there is only one alarm that functions for both other sensors!
Temperatures are guaranteed within a range of -55 to +125 degrees. The
main temperature sensors has a resolution of 1 degree; the other sensor(s)
of 0.5 degree.

Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
triggered if the rotation speed has dropped below a programmable limit. Fan
readings can be divided by a programmable divider (1, 2, 4 or 8 for the
W83781D; 1, 2, 4, 8, 16, 32, 64 or 128 for the others) to give
the readings more range or accuracy. Not all RPM values can accurately
be represented, so some rounding is done. With a divider of 2, the lowest
representable value is around 2600 RPM.

Voltage sensors (also known as IN sensors) report their values in volts.
An alarm is triggered if the voltage has crossed a programmable minimum
or maximum limit. Note that minimum in this case always means 'closest to
zero'; this is important for negative voltage measurements. All voltage
inputs can measure voltages between 0 and 4.08 volts, with a resolution
of 0.016 volt.

The VID lines encode the core voltage value: the voltage level your processor
should work with. This is hardcoded by the mainboard and/or processor itself.
It is a value in volts. When it is unconnected, you will often find the
value 3.50 V here.

The W83782D and W83783S temperature conversion machine understands about
several kinds of temperature probes. You can program the so-called
beta value in the sensor files. '1' is the PII/Celeron diode, '2' is the
TN3904 transistor, and 3435 the default thermistor value. Other values
are (not yet) supported.

In addition to the alarms described above, there is a CHAS alarm on the
chips which triggers if your computer case is open.

When an alarm goes off, you can be warned by a beeping signal through
your computer speaker. It is possible to enable all beeping globally,
or only the beeping for some alarms.

Individual alarm and beep bits:

======== ==========================
0x000001 in0
0x000002 in1
0x000004 in2
0x000008 in3
0x000010 temp1
0x000020 temp2 (+temp3 on W83781D)
0x000040 fan1
0x000080 fan2
0x000100 in4
0x000200 in5
0x000400 in6
0x000800 fan3
0x001000 chassis
0x002000 temp3 (W83782D only)
0x010000 in7 (W83782D only)
0x020000 in8 (W83782D only)
======== ==========================

If an alarm triggers, it will remain triggered until the hardware register
is read at least once. This means that the cause for the alarm may
already have disappeared! Note that in the current implementation, all
hardware registers are read whenever any data is read (unless it is less
than 1.5 seconds since the last update). This means that you can easily
miss once-only alarms.

The chips only update values each 1.5 seconds; reading them more often
will do no harm, but will return 'old' values.

AS99127F PROBLEMS
-----------------
The as99127f support was developed without the benefit of a datasheet.
In most cases it is treated as a w83781d (although revision 2 of the
AS99127F looks more like a w83782d).
This support will be BETA until a datasheet is released.
One user has reported problems with fans stopping
occasionally.

Note that the individual beep bits are inverted from the other chips.
The driver now takes care of this so that user-space applications
don't have to know about it.

Known problems:
	- Problems with diode/thermistor settings (supported?)
	- One user reports fans stopping under high server load.
	- 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.
Unfortunately several others have without success.
Please do not send mail to us asking for better as99127f support.
We have done the best we can without a datasheet.
Please do not send mail to the author or the sensors group asking for
a datasheet or ideas on how to convince Asus. We can't help.

NOTES
-----
  783s has no in1 so that in[2-6] are compatible with the 781d/782d.

  783s pin is programmable for -5V or temp1; defaults to -5V,
  no control in driver so temp1 doesn't work.

  782d and 783s datasheets differ on which is pwm1 and which is pwm2.
  We chose to follow 782d.

  782d and 783s pin is programmable for fan3 input or pwm2 output;
  defaults to fan3 input.
  If pwm2 is enabled (with echo 255 1 > pwm2), then
  fan3 will report 0.

  782d has pwm1-2 for ISA, pwm1-4 for i2c. (pwm3-4 share pins with
  the ISA pins)

Data sheet updates
------------------
	- PWM clock registers:
		* 000: master /  512
		* 001: master / 1024
		* 010: master / 2048
		* 011: master / 4096
		* 100: master / 8192

Answers from Winbond tech support
---------------------------------

::

  >
  > 1) In the W83781D data sheet section 7.2 last paragraph, it talks about
  >    reprogramming the R-T table if the Beta of the thermistor is not
  >    3435K. The R-T table is described briefly in section 8.20.
  >    What formulas do I use to program a new R-T table for a given Beta?
  >

  We are sorry that the calculation for R-T table value is
  confidential. If you have another Beta value of thermistor, we can help
  to calculate the R-T table for you. But you should give us real R-T
  Table which can be gotten by thermistor vendor. Therefore we will calculate
  them and obtain 32-byte data, and you can fill the 32-byte data to the
  register in Bank0.CR51 of W83781D.

  > 2) In the W83782D data sheet, it mentions that pins 38, 39, and 40 are
  >    programmable to be either thermistor or Pentium II diode inputs.
  >    How do I program them for diode inputs? I can't find any register
  >    to program these to be diode inputs.

  You may program Bank0 CR[5Dh] and CR[59h] registers.

  =============================== =============== ============== ============
	CR[5Dh]    		bit 1(VTIN1)    bit 2(VTIN2)   bit 3(VTIN3)

		thermistor                0		 0		0
	diode 			  1		 1		1

  (error) CR[59h] 		bit 4(VTIN1)	bit 2(VTIN2)   bit 3(VTIN3)
  (right) CR[59h] 		bit 4(VTIN1)	bit 5(VTIN2)   bit 6(VTIN3)

	PII thermal diode         1		 1		1
	2N3904	diode		  0		 0		0
  =============================== =============== ============== ============

Asus Clones
-----------

We have no datasheets for the Asus clones (AS99127F and ASB100 Bach).
Here are some very useful information that were given to us by Alex Van
Kaam about how to detect these chips, and how to read their values. He
also gives advice for another Asus chipset, the Mozart-2 (which we
don't support yet). Thanks Alex!

I reworded some parts and added personal comments.

Detection
^^^^^^^^^

AS99127F rev.1, AS99127F rev.2 and ASB100:
- I2C address range: 0x29 - 0x2F
- If register 0x58 holds 0x31 then we have an Asus (either ASB100 or AS99127F)
- Which one depends on register 0x4F (manufacturer ID):

  - 0x06 or 0x94: ASB100
  - 0x12 or 0xC3: AS99127F rev.1
  - 0x5C or 0xA3: AS99127F rev.2

  Note that 0x5CA3 is Winbond's ID (WEC), which let us think Asus get their
  AS99127F rev.2 direct from Winbond. The other codes mean ATT and DVC,
  respectively. ATT could stand for Asustek something (although it would be
  very badly chosen IMHO), I don't know what DVC could stand for. Maybe
  these codes simply aren't meant to be decoded that way.

Mozart-2:
- I2C address: 0x77
- If register 0x58 holds 0x56 or 0x10 then we have a Mozart-2
- Of the Mozart there are 3 types:

  - 0x58=0x56, 0x4E=0x94, 0x4F=0x36: Asus ASM58 Mozart-2
  - 0x58=0x56, 0x4E=0x94, 0x4F=0x06: Asus AS2K129R Mozart-2
  - 0x58=0x10, 0x4E=0x5C, 0x4F=0xA3: Asus ??? Mozart-2

  You can handle all 3 the exact same way :)

Temperature sensors
^^^^^^^^^^^^^^^^^^^

ASB100:
  - sensor 1: register 0x27
  - sensor 2 & 3 are the 2 LM75's on the SMBus
  - sensor 4: register 0x17

Remark:

  I noticed that on Intel boards sensor 2 is used for the CPU
  and 4 is ignored/stuck, on AMD boards sensor 4 is the CPU and sensor 2 is
  either ignored or a socket temperature.

AS99127F (rev.1 and 2 alike):
  - sensor 1: register 0x27
  - sensor 2 & 3 are the 2 LM75's on the SMBus

Remark:

  Register 0x5b is suspected to be temperature type selector. Bit 1
  would control temp1, bit 3 temp2 and bit 5 temp3.

Mozart-2:
  - sensor 1: register 0x27
  - sensor 2: register 0x13

Fan sensors
^^^^^^^^^^^

ASB100, AS99127F (rev.1 and 2 alike):
  - 3 fans, identical to the W83781D

Mozart-2:
  - 2 fans only, 1350000/RPM/div
  - fan 1: register 0x28,  divisor on register 0xA1 (bits 4-5)
  - fan 2: register 0x29,  divisor on register 0xA1 (bits 6-7)

Voltages
^^^^^^^^

This is where there is a difference between AS99127F rev.1 and 2.

Remark:

  The difference is similar to the difference between
  W83781D and W83782D.

ASB100:
  - in0=r(0x20)*0.016
  - in1=r(0x21)*0.016
  - in2=r(0x22)*0.016
  - in3=r(0x23)*0.016*1.68
  - in4=r(0x24)*0.016*3.8
  - in5=r(0x25)*(-0.016)*3.97
  - in6=r(0x26)*(-0.016)*1.666

AS99127F rev.1:
  - in0=r(0x20)*0.016
  - in1=r(0x21)*0.016
  - in2=r(0x22)*0.016
  - in3=r(0x23)*0.016*1.68
  - in4=r(0x24)*0.016*3.8
  - in5=r(0x25)*(-0.016)*3.97
  - in6=r(0x26)*(-0.016)*1.503

AS99127F rev.2:
  - in0=r(0x20)*0.016
  - in1=r(0x21)*0.016
  - in2=r(0x22)*0.016
  - in3=r(0x23)*0.016*1.68
  - in4=r(0x24)*0.016*3.8
  - in5=(r(0x25)*0.016-3.6)*5.14+3.6
  - in6=(r(0x26)*0.016-3.6)*3.14+3.6

Mozart-2:
  - in0=r(0x20)*0.016
  - in1=255
  - in2=r(0x22)*0.016
  - 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 slightly 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.

* Additional info about PWM on the AS99127F rev.1 by Hector Martin:

I've been fiddling around with the (in)famous 0x59 register and
found out the following values do work as a form of coarse pwm:

0x80
 - seems to turn fans off after some time(1-2 minutes)... might be
   some form of auto-fan-control based on temp? hmm (Qfan? this mobo is an
   old ASUS, it isn't marketed as Qfan. Maybe some beta pre-attempt at Qfan
   that was dropped at the BIOS)
0x81
 - off
0x82
 - slightly "on-ner" than off, but my fans do not get to move. I can
   hear the high-pitched PWM sound that motors give off at too-low-pwm.
0x83
 - now they do move. Estimate about 70% speed or so.
0x84-0x8f
 - full on

Changing the high nibble doesn't seem to do much except the high bit
(0x80) must be set for PWM to work, else the current pwm doesn't seem to
change.

My mobo is an ASUS A7V266-E. This behavior is similar to what I got
with speedfan under Windows, where 0-15% would be off, 15-2x% (can't
remember the exact value) would be 70% and higher would be full on.

* Additional info about PWM on the AS99127F rev.1 from lm-sensors
  ticket #2350:

I conducted some experiment on Asus P3B-F motherboard with AS99127F
(Ver. 1).

I confirm that 0x59 register control the CPU_Fan Header on this
motherboard, and 0x5a register control PWR_Fan.

In order to reduce the dependency of specific fan, the measurement is
conducted with a digital scope without fan connected. I found out that
P3B-F actually output variable DC voltage on fan header center pin,
looks like PWM is filtered on this motherboard.

Here are some of measurements:

==== =========
0x80     20 mV
0x81     20 mV
0x82    232 mV
0x83   1.2  V
0x84   2.31 V
0x85   3.44 V
0x86   4.62 V
0x87   5.81 V
0x88   7.01 V
9x89   8.22 V
0x8a   9.42 V
0x8b  10.6  V
0x8c  11.9  V
0x8d  12.4  V
0x8e  12.4  V
0x8f  12.4  V
==== =========


code:
Kernel driver w83791d
=====================

Supported chips:

  * Winbond W83791D

    Prefix: 'w83791d'

    Addresses scanned: I2C 0x2c - 0x2f

    Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83791D_W83791Gb.pdf

Author: Charles Spirakis <bezaur@gmail.com>

This driver was derived from the w83781d.c and w83792d.c source files.

Credits:

  w83781d.c:

    - Frodo Looijaard <frodol@dds.nl>,
    - Philip Edelbrock <phil@netroedge.com>,
    - Mark Studebaker <mdsxyz123@yahoo.com>

  w83792d.c:

    - Shane Huang (Winbond),
    - Rudolf Marek <r.marek@assembler.cz>

Additional contributors:

    - Sven Anders <anders@anduras.de>
    - Marc Hulsman <m.hulsman@tudelft.nl>

Module Parameters
-----------------

* init boolean
    (default 0)

    Use 'init=1' to have the driver do extra software initializations.
    The default behavior is to do the minimum initialization possible
    and depend on the BIOS to properly setup the chip. If you know you
    have a w83791d and you're having problems, try init=1 before trying
    reset=1.

* reset boolean
    (default 0)

    Use 'reset=1' to reset the chip (via index 0x40, bit 7). The default
    behavior is no chip reset to preserve BIOS settings.

* force_subclients=bus,caddr,saddr,saddr
    This is used to force the i2c addresses for subclients of
    a certain chip. Example usage is `force_subclients=0,0x2f,0x4a,0x4b`
    to force the subclients of chip 0x2f on bus 0 to i2c addresses
    0x4a and 0x4b.

Description
-----------

This driver implements support for the Winbond W83791D chip. The W83791G
chip appears to be the same as the W83791D but is lead free.

Detection of the chip can sometimes be foiled because it can be in an
internal state that allows no clean access (Bank with ID register is not
currently selected). If you know the address of the chip, use a 'force'
parameter; this will put it into a more well-behaved state first.

The driver implements three temperature sensors, ten voltage sensors,
five fan rotation speed sensors and manual PWM control of each fan.

Temperatures are measured in degrees Celsius and measurement resolution is 1
degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
the temperature gets higher than the Overtemperature Shutdown value; it stays
on until the temperature falls below the Hysteresis value.

Voltage sensors (also known as IN sensors) report their values in millivolts.
An alarm is triggered if the voltage has crossed a programmable minimum
or maximum limit.

Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
triggered if the rotation speed has dropped below a programmable limit. Fan
readings can be divided by a programmable divider (1, 2, 4, 8, 16,
32, 64 or 128 for all fans) to give the readings more range or accuracy.

Each fan controlled is controlled by PWM. The PWM duty cycle can be read and
set for each fan separately. Valid values range from 0 (stop) to 255 (full).
PWM 1-3 support Thermal Cruise mode, in which the PWMs are automatically
regulated to keep respectively temp 1-3 at a certain target temperature.
See below for the description of the sysfs-interface.

The w83791d has a global bit used to enable beeping from the speaker when an
alarm is triggered as well as a bitmask to enable or disable the beep for
specific alarms. You need both the global beep enable bit and the
corresponding beep bit to be on for a triggered alarm to sound a beep.

The sysfs interface to the global enable is via the sysfs beep_enable file.
This file is used for both legacy and new code.

The sysfs interface to the beep bitmask has migrated from the original legacy
method of a single sysfs beep_mask file to a newer method using multiple
`*_beep` files as described in `Documentation/hwmon/sysfs-interface.rst`.

A similar change has occurred for the bitmap corresponding to the alarms. The
original legacy method used a single sysfs alarms file containing a bitmap
of triggered alarms. The newer method uses multiple sysfs `*_alarm` files
(again following the pattern described in sysfs-interface).

Since both methods read and write the underlying hardware, they can be used
interchangeably and changes in one will automatically be reflected by
the other. If you use the legacy bitmask method, your user-space code is
responsible for handling the fact that the alarms and beep_mask bitmaps
are not the same (see the table below).

NOTE: All new code should be written to use the newer sysfs-interface
specification as that avoids bitmap problems and is the preferred interface
going forward.

The driver reads the hardware chip values at most once every three seconds.
User mode code requesting values more often will receive cached values.

/sys files
----------
The sysfs-interface is documented in the 'sysfs-interface' file. Only
chip-specific options are documented here.

======================= =======================================================
pwm[1-3]_enable		this file controls mode of fan/temperature control for
			fan 1-3. Fan/PWM 4-5 only support manual mode.

			    * 1 Manual mode
			    * 2 Thermal Cruise mode
			    * 3 Fan Speed Cruise mode (no further support)

temp[1-3]_target	defines the target temperature for Thermal Cruise mode.
			Unit: millidegree Celsius
			RW

temp[1-3]_tolerance	temperature tolerance for Thermal Cruise mode.
			Specifies an interval around the target temperature
			in which the fan speed is not changed.
			Unit: millidegree Celsius
			RW
======================= =======================================================

Alarms bitmap vs. beep_mask bitmask
-----------------------------------

For legacy code using the alarms and beep_mask files:

=============  ========  ========= ==========================
Signal         Alarms    beep_mask Obs
=============  ========  ========= ==========================
in0 (VCORE)    0x000001  0x000001
in1 (VINR0)    0x000002  0x002000  <== mismatch
in2 (+3.3VIN)  0x000004  0x000004
in3 (5VDD)     0x000008  0x000008
in4 (+12VIN)   0x000100  0x000100
in5 (-12VIN)   0x000200  0x000200
in6 (-5VIN)    0x000400  0x000400
in7 (VSB)      0x080000  0x010000  <== mismatch
in8 (VBAT)     0x100000  0x020000  <== mismatch
in9 (VINR1)    0x004000  0x004000
temp1          0x000010  0x000010
temp2          0x000020  0x000020
temp3          0x002000  0x000002  <== mismatch
fan1           0x000040  0x000040
fan2           0x000080  0x000080
fan3           0x000800  0x000800
fan4           0x200000  0x200000
fan5           0x400000  0x400000
tart1          0x010000  0x040000  <== mismatch
tart2          0x020000  0x080000  <== mismatch
tart3          0x040000  0x100000  <== mismatch
case_open      0x001000  0x001000
global_enable  -         0x800000  (modified via beep_enable)
=============  ========  ========= ==========================


code:
Kernel driver w83792d
=====================

Supported chips:

  * Winbond W83792D

    Prefix: 'w83792d'

    Addresses scanned: I2C 0x2c - 0x2f

    Datasheet: http://www.winbond.com.tw

Author: Shane Huang (Winbond)
Updated: Roger Lucas

Module Parameters
-----------------

* init int
    (default 1)

    Use 'init=0' to bypass initializing the chip.
    Try this if your computer crashes when you load the module.

* force_subclients=bus,caddr,saddr,saddr
    This is used to force the i2c addresses for subclients of
    a certain chip. Example usage is `force_subclients=0,0x2f,0x4a,0x4b`
    to force the subclients of chip 0x2f on bus 0 to i2c addresses
    0x4a and 0x4b.

Description
-----------

This driver implements support for the Winbond W83792AD/D.

Detection of the chip can sometimes be foiled because it can be in an
internal state that allows no clean access (Bank with ID register is not
currently selected). If you know the address of the chip, use a 'force'
parameter; this will put it into a more well-behaved state first.

The driver implements three temperature sensors, seven fan rotation speed
sensors, nine voltage sensors, and two automatic fan regulation
strategies called: Smart Fan I (Thermal Cruise mode) and Smart Fan II.

The driver also implements up to seven fan control outputs: pwm1-7.  Pwm1-7
can be configured to PWM output or Analogue DC output via their associated
pwmX_mode. Outputs pwm4 through pwm7 may or may not be present depending on
how the W83792AD/D was configured by the BIOS.

Automatic fan control mode is possible only for fan1-fan3.

For all pwmX outputs, a value of 0 means minimum fan speed and a value of
255 means maximum fan speed.

Temperatures are measured in degrees Celsius and measurement resolution is 1
degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
the temperature gets higher than the Overtemperature Shutdown value; it stays
on until the temperature falls below the Hysteresis value.

Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
triggered if the rotation speed has dropped below a programmable limit. Fan
readings can be divided by a programmable divider (1, 2, 4, 8, 16, 32, 64 or
128) to give the readings more range or accuracy.

Voltage sensors (also known as IN sensors) report their values in millivolts.
An alarm is triggered if the voltage has crossed a programmable minimum
or maximum limit.

Alarms are provided as output from "realtime status register". Following bits
are defined:

==== ==========
bit   alarm on
==== ==========
0    in0
1    in1
2    temp1
3    temp2
4    temp3
5    fan1
6    fan2
7    fan3
8    in2
9    in3
10   in4
11   in5
12   in6
13   VID change
14   chassis
15   fan7
16   tart1
17   tart2
18   tart3
19   in7
20   in8
21   fan4
22   fan5
23   fan6
==== ==========

Tart will be asserted while target temperature cannot be achieved after 3 minutes
of full speed rotation of corresponding fan.

In addition to the alarms described above, there is a CHAS alarm on the chips
which triggers if your computer case is open (This one is latched, contrary
to realtime alarms).

The chips only update values each 3 seconds; reading them more often will
do no harm, but will return 'old' values.

W83792D PROBLEMS
----------------
Known problems:
	- This driver is only for Winbond W83792D C version device, there
	  are also some motherboards with B version W83792D device. The
	  calculation method to in6-in7(measured value, limits) is a little
	  different between C and B version. C or B version can be identified
	  by CR[0x49h].
	- The function of vid and vrm has not been finished, because I'm NOT
	  very familiar with them. Adding support is welcome.
	- The function of chassis open detection needs more tests.
	- If you have ASUS server board and chip was not found: Then you will
	  need to upgrade to latest (or beta) BIOS. If it does not help please
	  contact us.

Fan control
-----------

Manual mode
-----------

Works as expected. You just need to specify desired PWM/DC value (fan speed)
in appropriate pwm# file.

Thermal cruise
--------------

In this mode, W83792D provides the Smart Fan system to automatically control
fan speed to keep the temperatures of CPU and the system within specific
range. At first a wanted temperature and interval must be set. This is done
via thermal_cruise# file. The tolerance# file serves to create T +- tolerance
interval. The fan speed will be lowered as long as the current temperature
remains below the thermal_cruise# +- tolerance# value. Once the temperature
exceeds the high limit (T+tolerance), the fan will be turned on with a
specific speed set by pwm# and automatically controlled its PWM duty cycle
with the temperature varying. Three conditions may occur:

(1) If the temperature still exceeds the high limit, PWM duty
cycle will increase slowly.

(2) If the temperature goes below the high limit, but still above the low
limit (T-tolerance), the fan speed will be fixed at the current speed because
the temperature is in the target range.

(3) If the temperature goes below the low limit, PWM duty cycle will decrease
slowly to 0 or a preset stop value until the temperature exceeds the low
limit. (The preset stop value handling is not yet implemented in driver)

Smart Fan II
------------

W83792D also provides a special mode for fan. Four temperature points are
available. When related temperature sensors detects the temperature in preset
temperature region (sf2_point@_fan# +- tolerance#) it will cause fans to run
on programmed value from sf2_level@_fan#. You need to set four temperatures
for each fan.

/sys files
----------

pwm[1-7]
	- this file stores PWM duty cycle or DC value (fan speed) in range:

	    0 (stop) to 255 (full)
pwm[1-3]_enable
	- this file controls mode of fan/temperature control:

	    * 0 Disabled
	    * 1 Manual mode
	    * 2 Smart Fan II
	    * 3 Thermal Cruise
pwm[1-7]_mode
	- Select PWM or DC mode

	    * 0 DC
	    * 1 PWM
thermal_cruise[1-3]
	- Selects the desired temperature for cruise (degC)
tolerance[1-3]
	- Value in degrees of Celsius (degC) for +- T
sf2_point[1-4]_fan[1-3]
	- four temperature points for each fan for Smart Fan II
sf2_level[1-3]_fan[1-3]
	- three PWM/DC levels for each fan for Smart Fan II


code:
Kernel driver w83793
====================

Supported chips:

  * Winbond W83793G/W83793R

    Prefix: 'w83793'

    Addresses scanned: I2C 0x2c - 0x2f

    Datasheet: Still not published

Authors:
    - Yuan Mu (Winbond Electronics)
    - Rudolf Marek <r.marek@assembler.cz>

Module parameters
-----------------

* reset int
    (default 0)

    This parameter is not recommended, it will lose motherboard specific
    settings. Use 'reset=1' to reset the chip when loading this module.

* force_subclients=bus,caddr,saddr1,saddr2
    This is used to force the i2c addresses for subclients of
    a certain chip. Typical usage is `force_subclients=0,0x2f,0x4a,0x4b`
    to force the subclients of chip 0x2f on bus 0 to i2c addresses
    0x4a and 0x4b.

Description
-----------

This driver implements support for Winbond W83793G/W83793R chips.

* Exported features
    This driver exports 10 voltage sensors, up to 12 fan tachometer inputs,
    6 remote temperatures, up to 8 sets of PWM fan controls, SmartFan
    (automatic fan speed control) on all temperature/PWM combinations, 2
    sets of 6-pin CPU VID input.

* Sensor resolutions
    If your motherboard maker used the reference design, the resolution of
    voltage0-2 is 2mV, resolution of voltage3/4/5 is 16mV, 8mV for voltage6,
    24mV for voltage7/8. Temp1-4 have a 0.25 degree Celsius resolution,
    temp5-6 have a 1 degree Celsiis resolution.

* Temperature sensor types
    Temp1-4 have 2 possible types. It can be read from (and written to)
    temp[1-4]_type.

    - If the value is 3, it starts monitoring using a remote termal diode
      (default).
    - If the value is 6, it starts monitoring using the temperature sensor
      in Intel CPU and get result by PECI.

    Temp5-6 can be connected to external thermistors (value of
    temp[5-6]_type is 4).

* Alarm mechanism
    For voltage sensors, an alarm triggers if the measured value is below
    the low voltage limit or over the high voltage limit.
    For temperature sensors, an alarm triggers if the measured value goes
    above the high temperature limit, and wears off only after the measured
    value drops below the hysteresis value.
    For fan sensors, an alarm triggers if the measured value is below the
    low speed limit.

* SmartFan/PWM control
    If you want to set a pwm fan to manual mode, you just need to make sure it
    is not controlled by any temp channel, for example, you want to set fan1
    to manual mode, you need to check the value of temp[1-6]_fan_map, make
    sure bit 0 is cleared in the 6 values. And then set the pwm1 value to
    control the fan.

    Each temperature channel can control all the 8 PWM outputs (by setting the
    corresponding bit in tempX_fan_map), you can set the temperature channel
    mode using temp[1-6]_pwm_enable, 2 is Thermal Cruise mode and 3
    is the SmartFanII mode. Temperature channels will try to speed up or
    slow down all controlled fans, this means one fan can receive different
    PWM value requests from different temperature channels, but the chip
    will always pick the safest (max) PWM value for each fan.

    In Thermal Cruise mode, the chip attempts to keep the temperature at a
    predefined value, within a tolerance margin. So if tempX_input >
    thermal_cruiseX + toleranceX, the chip will increase the PWM value,
    if tempX_input < thermal_cruiseX - toleranceX, the chip will decrease
    the PWM value. If the temperature is within the tolerance range, the PWM
    value is left unchanged.

    SmartFanII works differently, you have to define up to 7 PWM, temperature
    trip points, defining a PWM/temperature curve which the chip will follow.
    While not fundamentally different from the Thermal Cruise mode, the
    implementation is quite different, giving you a finer-grained control.

* Chassis
    If the case open alarm triggers, it will stay in this state unless cleared
    by writing 0 to the sysfs file "intrusion0_alarm".

* VID and VRM
    The VRM version is detected automatically, don't modify the it unless you
    *do* know the cpu VRM version and it's not properly detected.

Notes
-----

  Only Fan1-5 and PWM1-3 are guaranteed to always exist, other fan inputs and
  PWM outputs may or may not exist depending on the chip pin configuration.


code:
Kernel driver w83795
====================

Supported chips:

  * Winbond/Nuvoton W83795G

    Prefix: 'w83795g'

    Addresses scanned: I2C 0x2c - 0x2f

    Datasheet: Available for download on nuvoton.com

  * Winbond/Nuvoton W83795ADG

    Prefix: 'w83795adg'

    Addresses scanned: I2C 0x2c - 0x2f

    Datasheet: Available for download on nuvoton.com

Authors:
    - Wei Song (Nuvoton)
    - Jean Delvare <jdelvare@suse.de>

Pin mapping
-----------

Here is a summary of the pin mapping for the W83795G and W83795ADG.
This can be useful to convert data provided by board manufacturers
into working libsensors configuration statements.

- W83795G

========= ======================= =============== ================
Pin	  Name			  Register	  Sysfs attribute
========= ======================= =============== ================
   13	  VSEN1 (VCORE1)	  10h		  in0
   14	  VSEN2 (VCORE2)	  11h		  in1
   15	  VSEN3 (VCORE3)	  12h		  in2
   16	  VSEN4			  13h		  in3
   17	  VSEN5			  14h		  in4
   18	  VSEN6			  15h		  in5
   19	  VSEN7			  16h		  in6
   20	  VSEN8			  17h		  in7
   21	  VSEN9			  18h		  in8
   22	  VSEN10		  19h		  in9
   23	  VSEN11		  1Ah		  in10
   28	  VTT			  1Bh		  in11
   24	  3VDD			  1Ch		  in12
   25	  3VSB			  1Dh		  in13
   26	  VBAT			  1Eh		  in14
    3	  VSEN12/TR5		  1Fh		  in15/temp5
    4	  VSEN13/TR5		  20h		  in16/temp6
  5/  6	  VDSEN14/TR1/TD1	  21h		  in17/temp1
  7/  8	  VDSEN15/TR2/TD2	  22h		  in18/temp2
  9/ 10	  VDSEN16/TR3/TD3	  23h		  in19/temp3
 11/ 12	  VDSEN17/TR4/TD4	  24h		  in20/temp4
   40	  FANIN1		  2Eh		  fan1
   42	  FANIN2		  2Fh		  fan2
   44	  FANIN3		  30h		  fan3
   46	  FANIN4		  31h		  fan4
   48	  FANIN5		  32h		  fan5
   50	  FANIN6		  33h		  fan6
   52	  FANIN7		  34h		  fan7
   54	  FANIN8		  35h		  fan8
   57	  FANIN9		  36h		  fan9
   58	  FANIN10		  37h		  fan10
   59	  FANIN11		  38h		  fan11
   60	  FANIN12		  39h		  fan12
   31	  FANIN13		  3Ah		  fan13
   35	  FANIN14		  3Bh		  fan14
   41	  FANCTL1		  10h (bank 2)	  pwm1
   43	  FANCTL2		  11h (bank 2)	  pwm2
   45	  FANCTL3		  12h (bank 2)	  pwm3
   47	  FANCTL4		  13h (bank 2)	  pwm4
   49	  FANCTL5		  14h (bank 2)	  pwm5
   51	  FANCTL6		  15h (bank 2)	  pwm6
   53	  FANCTL7		  16h (bank 2)	  pwm7
   55	  FANCTL8		  17h (bank 2)	  pwm8
 29/ 30	  PECI/TSI (DTS1)	  26h		  temp7
 29/ 30	  PECI/TSI (DTS2)	  27h		  temp8
 29/ 30	  PECI/TSI (DTS3)	  28h		  temp9
 29/ 30	  PECI/TSI (DTS4)	  29h		  temp10
 29/ 30	  PECI/TSI (DTS5)	  2Ah		  temp11
 29/ 30	  PECI/TSI (DTS6)	  2Bh		  temp12
 29/ 30	  PECI/TSI (DTS7)	  2Ch		  temp13
 29/ 30	  PECI/TSI (DTS8)	  2Dh		  temp14
   27	  CASEOPEN#		  46h		  intrusion0
========= ======================= =============== ================

- W83795ADG

========= ======================= =============== ================
Pin	  Name			  Register	  Sysfs attribute
========= ======================= =============== ================
   10	  VSEN1 (VCORE1)	  10h		  in0
   11	  VSEN2 (VCORE2)	  11h		  in1
   12	  VSEN3 (VCORE3)	  12h		  in2
   13	  VSEN4			  13h		  in3
   14	  VSEN5			  14h		  in4
   15	  VSEN6			  15h		  in5
   16	  VSEN7			  16h		  in6
   17	  VSEN8			  17h		  in7
   22	  VTT			  1Bh		  in11
   18	  3VDD			  1Ch		  in12
   19	  3VSB			  1Dh		  in13
   20	  VBAT			  1Eh		  in14
   48	  VSEN12/TR5		  1Fh		  in15/temp5
    1	  VSEN13/TR5		  20h		  in16/temp6
  2/  3	  VDSEN14/TR1/TD1	  21h		  in17/temp1
  4/  5	  VDSEN15/TR2/TD2	  22h		  in18/temp2
  6/  7	  VDSEN16/TR3/TD3	  23h		  in19/temp3
  8/  9	  VDSEN17/TR4/TD4	  24h		  in20/temp4
   32	  FANIN1		  2Eh		  fan1
   34	  FANIN2		  2Fh		  fan2
   36	  FANIN3		  30h		  fan3
   37	  FANIN4		  31h		  fan4
   38	  FANIN5		  32h		  fan5
   39	  FANIN6		  33h		  fan6
   40	  FANIN7		  34h		  fan7
   41	  FANIN8		  35h		  fan8
   43	  FANIN9		  36h		  fan9
   44	  FANIN10		  37h		  fan10
   45	  FANIN11		  38h		  fan11
   46	  FANIN12		  39h		  fan12
   24	  FANIN13		  3Ah		  fan13
   28	  FANIN14		  3Bh		  fan14
   33	  FANCTL1		  10h (bank 2)	  pwm1
   35	  FANCTL2		  11h (bank 2)	  pwm2
   23	  PECI (DTS1)		  26h		  temp7
   23	  PECI (DTS2)		  27h		  temp8
   23	  PECI (DTS3)		  28h		  temp9
   23	  PECI (DTS4)		  29h		  temp10
   23	  PECI (DTS5)		  2Ah		  temp11
   23	  PECI (DTS6)		  2Bh		  temp12
   23	  PECI (DTS7)		  2Ch		  temp13
   23	  PECI (DTS8)		  2Dh		  temp14
   21	  CASEOPEN#		  46h		  intrusion0
========= ======================= =============== ================


code:
Kernel driver w83l785ts
=======================

Supported chips:

  * Winbond W83L785TS-S

    Prefix: 'w83l785ts'

    Addresses scanned: I2C 0x2e

    Datasheet: Publicly available at the Winbond USA website

	       http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83L785TS-S.pdf

Authors:
	Jean Delvare <jdelvare@suse.de>

Description
-----------

The W83L785TS-S is a digital temperature sensor. It senses the
temperature of a single external diode. The high limit is
theoretically defined as 85 or 100 degrees C through a combination
of external resistors, so the user cannot change it. Values seen so
far suggest that the two possible limits are actually 95 and 110
degrees C. The datasheet is rather poor and obviously inaccurate
on several points including this one.

All temperature values are given in degrees Celsius. Resolution
is 1.0 degree. See the datasheet for details.

The w83l785ts driver will not update its values more frequently than
every other second; reading them more often will do no harm, but will
return 'old' values.

Known Issues
------------

On some systems (Asus), the BIOS is known to interfere with the driver
and cause read errors. Or maybe the W83L785TS-S chip is simply unreliable,
we don't really know. The driver will retry a given number of times
(5 by default) and then give up, returning the old value (or 0 if
there is no old value). It seems to work well enough so that you should
not notice anything. Thanks to James Bolt for helping test this feature.


code:
Kernel driver w83l786ng
=======================

Supported chips:

  * Winbond W83L786NG/W83L786NR

    Prefix: 'w83l786ng'

    Addresses scanned: I2C 0x2e - 0x2f

    Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83L786NRNG09.pdf

Author: Kevin Lo <kevlo@kevlo.org>

Module Parameters
-----------------

* reset boolean
    (default 0)

    Use 'reset=1' to reset the chip (via index 0x40, bit 7). The default
    behavior is no chip reset to preserve BIOS settings

Description
-----------

This driver implements support for Winbond W83L786NG/W83L786NR chips.

The driver implements two temperature sensors, two fan rotation speed
sensors, and three voltage sensors.

Temperatures are measured in degrees Celsius and measurement resolution is 1
degC for temp1 and temp2.

Fan rotation speeds are reported in RPM (rotations per minute). Fan readings
can be divided by a programmable divider (1, 2, 4, 8, 16, 32, 64
or 128 for fan 1/2) to give the readings more range or accuracy.

Voltage sensors (also known as IN sensors) report their values in millivolts.
An alarm is triggered if the voltage has crossed a programmable minimum
or maximum limit.

/sys files
----------

pwm[1-2]
	    - this file stores PWM duty cycle or DC value (fan speed) in range:

	      0 (stop) to 255 (full)
pwm[1-2]_enable
	    - this file controls mode of fan/temperature control:

	    * 0 Manual Mode
	    * 1 Thermal Cruise
	    * 2 Smart Fan II
	    * 4 FAN_SET
pwm[1-2]_mode
	    - Select PWM of DC mode

	    * 0 DC
	    * 1 PWM
tolerance[1-2]
	    - Value in degrees of Celsius (degC) for +- T


code:
Kernel driver wm831x-hwmon
==========================

Supported chips:
  * Wolfson Microelectronics WM831x PMICs

    Prefix: 'wm831x'

    Datasheet:

	- http://www.wolfsonmicro.com/products/WM8310
	- http://www.wolfsonmicro.com/products/WM8311
	- http://www.wolfsonmicro.com/products/WM8312

Authors: Mark Brown <broonie@opensource.wolfsonmicro.com>

Description
-----------

The WM831x series of PMICs include an AUXADC which can be used to
monitor a range of system operating parameters, including the voltages
of the major supplies within the system.  Currently the driver provides
reporting of all the input values but does not provide any alarms.

Voltage Monitoring
------------------

Voltages are sampled by a 12 bit ADC.  Voltages in millivolts are 1.465
times the ADC value.

Temperature Monitoring
----------------------

Temperatures are sampled by a 12 bit ADC.  Chip and battery temperatures
are available.  The chip temperature is calculated as:

	Degrees celsius = (512.18 - data) / 1.0983

while the battery temperature calculation will depend on the NTC
thermistor component.


code:
Kernel driver wm8350-hwmon
==========================

Supported chips:

  * Wolfson Microelectronics WM835x PMICs

    Prefix: 'wm8350'

    Datasheet:

	- http://www.wolfsonmicro.com/products/WM8350
	- http://www.wolfsonmicro.com/products/WM8351
	- http://www.wolfsonmicro.com/products/WM8352

Authors: Mark Brown <broonie@opensource.wolfsonmicro.com>

Description
-----------

The WM835x series of PMICs include an AUXADC which can be used to
monitor a range of system operating parameters, including the voltages
of the major supplies within the system.  Currently the driver provides
simple access to these major supplies.

Voltage Monitoring
------------------

Voltages are sampled by a 12 bit ADC.  For the internal supplies the ADC
is referenced to the system VRTC.


code:
.. SPDX-License-Identifier: GPL-2.0

Kernel driver xdpe122
=====================

Supported chips:

  * Infineon XDPE11280

    Prefix: 'xdpe11280'

  * Infineon XDPE12254

    Prefix: 'xdpe12254'

  * Infineon XDPE12284

    Prefix: 'xdpe12284'

Authors:

	Vadim Pasternak <vadimp@mellanox.com>

Description
-----------

This driver implements support for Infineon Multi-phase XDPE112 and XDPE122
family dual loop voltage regulators.
These families include XDPE11280, XDPE12284 and XDPE12254 devices.
The devices from this family compliant with:

- Intel VR13 and VR13HC rev 1.3, IMVP8 rev 1.2 and IMPVP9 rev 1.3 DC-DC
  converter specification.
- Intel SVID rev 1.9. protocol.
- PMBus rev 1.3 interface.

Devices support linear format for reading input voltage, input and output current,
input and output power and temperature.
Device supports VID format for reading output voltage. The below modes are
supported:
- VR12.0 mode, 5-mV DAC - 0x01.
- VR12.5 mode, 10-mV DAC - 0x02.
- IMVP9 mode, 5-mV DAC - 0x03.
- AMD mode 6.25mV - 0x10.

Devices support two pages for telemetry.

The driver provides for current: input, maximum and critical thresholds
and maximum and critical alarms. Critical thresholds and critical alarm are
supported only for current output.
The driver exports the following attributes for via the sysfs files, where
indexes 1, 2 are for "iin" and 3, 4 for "iout":

**curr[3-4]_crit**

**curr[3-4]_crit_alarm**

**curr[1-4]_input**

**curr[1-4]_label**

**curr[1-4]_max**

**curr[1-4]_max_alarm**

The driver provides for voltage: input, critical and low critical thresholds
and critical and low critical alarms.
The driver exports the following attributes for via the sysfs files, where
indexes 1, 2 are for "vin" and 3, 4 for "vout":

**in[1-4]_crit**

**in[1-4_crit_alarm**

**in[1-4]_input**

**in[1-4_label**

**in[1-4]_lcrit**

**in[1-41_lcrit_alarm**

The driver provides for power: input and alarms. Power alarm is supported only
for power input.
The driver exports the following attributes for via the sysfs files, where
indexes 1, 2 are for "pin" and 3, 4 for "pout":

**power[1-2]_alarm**

**power[1-4]_input**

**power[1-4]_label**

The driver provides for temperature: input, maximum and critical thresholds
and maximum and critical alarms.
The driver exports the following attributes for via the sysfs files:

**temp[1-2]_crit**

**temp[1-2]_crit_alarm**

**temp[1-2]_input**

**temp[1-2]_max**

**temp[1-2]_max_alarm**


code:
.. SPDX-License-Identifier: GPL-2.0

Kernel driver xdpe152
=====================

Supported chips:

  * Infineon XDPE152C4

    Prefix: 'xdpe152c4'

  * Infineon XDPE15284

    Prefix: 'xdpe15284'

Authors:

    Greg Schwendimann <greg.schwendimann@infineon.com>

Description
-----------

This driver implements support for Infineon Digital Multi-phase Controller
XDPE152C4 and XDPE15284 dual loop voltage regulators.
The devices are compliant with:

- Intel VR13, VR13HC and VR14 rev 1.86
  converter specification.
- Intel SVID rev 1.93. protocol.
- PMBus rev 1.3.1 interface.

Devices support linear format for reading input and output voltage, input
and output current, input and output power and temperature.

Devices support two pages for telemetry.

The driver provides for current: input, maximum and critical thresholds
and maximum and critical alarms. Low Critical thresholds and Low critical alarm are
supported only for current output.
The driver exports the following attributes for via the sysfs files, where
indexes 1, 2 are for "iin" and 3, 4 for "iout":

**curr[1-4]_crit**

**curr[1-4]_crit_alarm**

**curr[1-4]_input**

**curr[1-4]_label**

**curr[1-4]_max**

**curr[1-4]_max_alarm**

**curr[3-4]_lcrit**

**curr[3-4]_lcrit_alarm**

**curr[3-4]_rated_max**

The driver provides for voltage: input, critical and low critical thresholds
and critical and low critical alarms.
The driver exports the following attributes for via the sysfs files, where
indexes 1, 2 are for "vin" and 3, 4 for "vout":

**in[1-4]_min**

**in[1-4]_crit**

**in[1-4_crit_alarm**

**in[1-4]_input**

**in[1-4]_label**

**in[1-4]_max**

**in[1-4]_max_alarm**

**in[1-4]_min**

**in[1-4]_min_alarm**

**in[3-4]_lcrit**

**in[3-4]_lcrit_alarm**

**in[3-4]_rated_max**

**in[3-4]_rated_min**

The driver provides for power: input and alarms.
The driver exports the following attributes for via the sysfs files, where
indexes 1, 2 are for "pin" and 3, 4 for "pout":

**power[1-2]_alarm**

**power[1-4]_input**

**power[1-4]_label**

**power[1-4]_max**

**power[1-4]_rated_max**

The driver provides for temperature: input, maximum and critical thresholds
and maximum and critical alarms.
The driver exports the following attributes for via the sysfs files:

**temp[1-2]_crit**

**temp[1-2]_crit_alarm**

**temp[1-2]_input**

**temp[1-2]_max**

**temp[1-2]_max_alarm**


code:
Kernel driver xgene-hwmon
=========================

Supported chips:

 * APM X-Gene SoC

Description
-----------

This driver adds hardware temperature and power reading support for
APM X-Gene SoC using the mailbox communication interface.
For device tree, it is the standard DT mailbox.
For ACPI, it is the PCC mailbox.

The following sensors are supported

  * Temperature
      - SoC on-die temperature in milli-degree C
      - Alarm when high/over temperature occurs

  * Power
      - CPU power in uW
      - IO power in uW

sysfs-Interface
---------------

temp0_input
	- SoC on-die temperature (milli-degree C)
temp0_critical_alarm
	- An 1 would indicates on-die temperature exceeded threshold
power0_input
	- CPU power in (uW)
power1_input
	- IO power in (uW)