mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 19:43:54 +07:00
1259f6ee15
New driver for INA219 and INA226, added support for IT8782F and IT8783E/F to it87 driver, plus cleanups in a couple of drivers. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAABAgAGBQJPu7QNAAoJEMsfJm/On5mB/roP/1l+TKHZiUcOfoBDXIqkX18d 8XlJywnidCtPPo4dDvssXy3MVFBb/OtIggh58ya2fmibVHdYgQMTaK+ryGYMPE6z 5iKb7PnkBV8BzP4NiEITHYciExpEJyarl4I0Pu1Z3zgef7AB4u0JHRD7j+c18GNX gQuFcu39qHQxw08EmsHTnR9jKwdfladiI3xNcVzKsC6ycUq8jMP/81vNkxTkkhbP yZDww+AtLUHzZfiF4t8beB7n9z+u/grMLtmvurW7UUor7A/VCt2JhzD1txvG+mOP YHWzkcBvrYbZocb5mP+ULH9ONny4nMErUY+cSxym+5G3CNsymZxD1RqWfTfMHF21 LVqaGOmU9PNj2GcAhV2karJQ3APVJZFocTaJpmzYtMFkGofoKdlyqV+/Hop4jqyV 44grojWL3uh5LtOdqKy68qn/BvFEi6gEMx9f094rTDdFRTycLNBXktcGXfubK0y8 +hUYzFWuSYjAmYHNMXrbUAH80F2/vu4cd4h3LviPfwi/BSWk78EhBfKujjhdTcDM /ramG3Z+2qbA6p6wZ6nwTSNSKiDkBfuf+G6dLGCaJHrPqhokAtVq8uQW5aYNTVe4 Ihe9uPqU/UF10SkFSWyqu2FytsFJ9BDxx8LL4Rsfugka2UgvIE6WPrhIJpvJUbFE kXcf0Xre4HBcNjQvuGOF =ZX6H -----END PGP SIGNATURE----- Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "New driver for INA219 and INA226, added support for IT8782F and IT8783E/F to it87 driver, plus cleanups in a couple of drivers." * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (it87) Make temp3 attribute conditional for IT8782F hwmon: (it87) Convert to use devm_kzalloc and devm_request_region hwmon: INA219 and INA226 support hwmon: (it87) Create voltage attributes only if voltage is enabled hwmon: (ntc_thermistor) Fix checkpatch warning hwmon: (ntc_thermistor) Optimize and fix build warning hwmon: (ntc_thermistor) Return error code from hwmon_device_register hwmon: (ntc_thermistor) Convert to devm_kzalloc hwmon: (ad7314) Remove unused defines, and rename OFFSET to SHIFT acpi_power_meter: clean up code around setup_attrs acpi_power_meter: drop meter_rw_attrs, use common meter_attrs acpi_power_meter: remove duplicate code between register_{ro,rw}_attrs acpi_power_meter: use a {RW,RO}_SENSOR_TEMPLATE macro to clean things up acpi_power_meter: use the same struct {rw,ro}_sensor_template for both hwmon: use module_pci_driver hwmon: (it87) Add support for IT8782F and IT8783E/F
212 lines
9.0 KiB
Plaintext
212 lines
9.0 KiB
Plaintext
Kernel driver it87
|
|
==================
|
|
|
|
Supported chips:
|
|
* IT8705F
|
|
Prefix: 'it87'
|
|
Addresses scanned: from Super I/O config space (8 I/O ports)
|
|
Datasheet: Once publicly available at the ITE website, but no longer
|
|
* IT8712F
|
|
Prefix: 'it8712'
|
|
Addresses scanned: from Super I/O config space (8 I/O ports)
|
|
Datasheet: Once publicly available at the ITE website, but no longer
|
|
* IT8716F/IT8726F
|
|
Prefix: 'it8716'
|
|
Addresses scanned: from Super I/O config space (8 I/O ports)
|
|
Datasheet: Once publicly available at the ITE website, but no longer
|
|
* IT8718F
|
|
Prefix: 'it8718'
|
|
Addresses scanned: from Super I/O config space (8 I/O ports)
|
|
Datasheet: Once publicly available at the ITE website, but no longer
|
|
* IT8720F
|
|
Prefix: 'it8720'
|
|
Addresses scanned: from Super I/O config space (8 I/O ports)
|
|
Datasheet: Not publicly available
|
|
* IT8721F/IT8758E
|
|
Prefix: 'it8721'
|
|
Addresses scanned: from Super I/O config space (8 I/O ports)
|
|
Datasheet: Not publicly available
|
|
* IT8728F
|
|
Prefix: 'it8728'
|
|
Addresses scanned: from Super I/O config space (8 I/O ports)
|
|
Datasheet: Not publicly available
|
|
* IT8782F
|
|
Prefix: 'it8782'
|
|
Addresses scanned: from Super I/O config space (8 I/O ports)
|
|
Datasheet: Not publicly available
|
|
* IT8783E/F
|
|
Prefix: 'it8783'
|
|
Addresses scanned: from Super I/O config space (8 I/O ports)
|
|
Datasheet: Not publicly available
|
|
* SiS950 [clone of IT8705F]
|
|
Prefix: 'it87'
|
|
Addresses scanned: from Super I/O config space (8 I/O ports)
|
|
Datasheet: No longer be available
|
|
|
|
Authors:
|
|
Christophe Gauthron
|
|
Jean Delvare <khali@linux-fr.org>
|
|
|
|
|
|
Module Parameters
|
|
-----------------
|
|
|
|
* update_vbat: int
|
|
|
|
0 if vbat should report power on value, 1 if vbat should be updated after
|
|
each read. Default is 0. On some boards the battery voltage is provided
|
|
by either the battery or the onboard power supply. Only the first reading
|
|
at power on will be the actual battery voltage (which the chip does
|
|
automatically). On other boards the battery voltage is always fed to
|
|
the chip so can be read at any time. Excessive reading may decrease
|
|
battery life but no information is given in the datasheet.
|
|
|
|
* fix_pwm_polarity int
|
|
|
|
Force PWM polarity to active high (DANGEROUS). Some chips are
|
|
misconfigured by BIOS - PWM values would be inverted. This option tries
|
|
to fix this. Please contact your BIOS manufacturer and ask him for fix.
|
|
|
|
|
|
Hardware Interfaces
|
|
-------------------
|
|
|
|
All the chips supported by this driver are LPC Super-I/O chips, accessed
|
|
through the LPC bus (ISA-like I/O ports). The IT8712F additionally has an
|
|
SMBus interface to the hardware monitoring functions. This driver no
|
|
longer supports this interface though, as it is slower and less reliable
|
|
than the ISA access, and was only available on a small number of
|
|
motherboard models.
|
|
|
|
|
|
Description
|
|
-----------
|
|
|
|
This driver implements support for the IT8705F, IT8712F, IT8716F,
|
|
IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, IT8781F, IT8782F,
|
|
IT8783E/F, and SiS950 chips.
|
|
|
|
These chips are 'Super I/O chips', supporting floppy disks, infrared ports,
|
|
joysticks and other miscellaneous stuff. For hardware monitoring, they
|
|
include an 'environment controller' with 3 temperature sensors, 3 fan
|
|
rotation speed sensors, 8 voltage sensors, associated alarms, and chassis
|
|
intrusion detection.
|
|
|
|
The IT8712F and IT8716F additionally feature VID inputs, used to report
|
|
the Vcore voltage of the processor. The early IT8712F have 5 VID pins,
|
|
the IT8716F and late IT8712F have 6. They are shared with other functions
|
|
though, so the functionality may not be available on a given system.
|
|
|
|
The IT8718F and IT8720F also features VID inputs (up to 8 pins) but the value
|
|
is stored in the Super-I/O configuration space. Due to technical limitations,
|
|
this value can currently only be read once at initialization time, so
|
|
the driver won't notice and report changes in the VID value. The two
|
|
upper VID bits share their pins with voltage inputs (in5 and in6) so you
|
|
can't have both on a given board.
|
|
|
|
The IT8716F, IT8718F, IT8720F, IT8721F/IT8758E and later IT8712F revisions
|
|
have support for 2 additional fans. The additional fans are supported by the
|
|
driver.
|
|
|
|
The IT8716F, IT8718F, IT8720F, IT8721F/IT8758E, IT8782F, IT8783E/F, and late
|
|
IT8712F and IT8705F also have optional 16-bit tachometer counters for fans 1 to
|
|
3. This is better (no more fan clock divider mess) but not compatible with the
|
|
older chips and revisions. The 16-bit tachometer mode is enabled by the driver
|
|
when one of the above chips is detected.
|
|
|
|
The IT8726F is just bit enhanced IT8716F with additional hardware
|
|
for AMD power sequencing. Therefore the chip will appear as IT8716F
|
|
to userspace applications.
|
|
|
|
The IT8728F is considered compatible with the IT8721F, until a datasheet
|
|
becomes available (hopefully.)
|
|
|
|
Temperatures are measured in degrees Celsius. An alarm is triggered once
|
|
when the Overtemperature Shutdown limit is crossed.
|
|
|
|
Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
|
|
triggered if the rotation speed has dropped below a programmable limit. When
|
|
16-bit tachometer counters aren't used, fan readings can be divided by
|
|
a programmable divider (1, 2, 4 or 8) to give the readings more range or
|
|
accuracy. With a divider of 2, the lowest representable value is around
|
|
2600 RPM. Not all RPM values can accurately be represented, so some rounding
|
|
is done.
|
|
|
|
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 (except IT8721F/IT8758E and IT8728F: 0.012 volt.) The battery
|
|
voltage in8 does not have limit registers.
|
|
|
|
On the IT8721F/IT8758E, IT8782F, and IT8783E/F, some voltage inputs are
|
|
internal and scaled inside the chip (in7 (optional for IT8782F and IT8783E/F),
|
|
in8 and optionally in3). The driver handles this transparently so user-space
|
|
doesn't have to care.
|
|
|
|
The VID lines (IT8712F/IT8716F/IT8718F/IT8720F) 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.
|
|
|
|
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.
|
|
|
|
Out-of-limit readings can also result in beeping, if the chip is properly
|
|
wired and configured. Beeping can be enabled or disabled per sensor type
|
|
(temperatures, voltages and fans.)
|
|
|
|
The IT87xx only updates its values each 1.5 seconds; reading it more often
|
|
will do no harm, but will return 'old' values.
|
|
|
|
To change sensor N to a thermistor, 'echo 4 > tempN_type' where N is 1, 2,
|
|
or 3. To change sensor N to a thermal diode, 'echo 3 > tempN_type'.
|
|
Give 0 for unused sensor. Any other value is invalid. To configure this at
|
|
startup, consult lm_sensors's /etc/sensors.conf. (4 = thermistor;
|
|
3 = thermal diode)
|
|
|
|
|
|
Fan speed control
|
|
-----------------
|
|
|
|
The fan speed control features are limited to manual PWM mode. Automatic
|
|
"Smart Guardian" mode control handling is only implemented for older chips
|
|
(see below.) However if you want to go for "manual mode" just write 1 to
|
|
pwmN_enable.
|
|
|
|
If you are only able to control the fan speed with very small PWM values,
|
|
try lowering the PWM base frequency (pwm1_freq). Depending on the fan,
|
|
it may give you a somewhat greater control range. The same frequency is
|
|
used to drive all fan outputs, which is why pwm2_freq and pwm3_freq are
|
|
read-only.
|
|
|
|
|
|
Automatic fan speed control (old interface)
|
|
-------------------------------------------
|
|
|
|
The driver supports the old interface to automatic fan speed control
|
|
which is implemented by IT8705F chips up to revision F and IT8712F
|
|
chips up to revision G.
|
|
|
|
This interface implements 4 temperature vs. PWM output trip points.
|
|
The PWM output of trip point 4 is always the maximum value (fan running
|
|
at full speed) while the PWM output of the other 3 trip points can be
|
|
freely chosen. The temperature of all 4 trip points can be freely chosen.
|
|
Additionally, trip point 1 has an hysteresis temperature attached, to
|
|
prevent fast switching between fan on and off.
|
|
|
|
The chip automatically computes the PWM output value based on the input
|
|
temperature, based on this simple rule: if the temperature value is
|
|
between trip point N and trip point N+1 then the PWM output value is
|
|
the one of trip point N. The automatic control mode is less flexible
|
|
than the manual control mode, but it reacts faster, is more robust and
|
|
doesn't use CPU cycles.
|
|
|
|
Trip points must be set properly before switching to automatic fan speed
|
|
control mode. The driver will perform basic integrity checks before
|
|
actually switching to automatic control mode.
|