coreboot/src/drivers/i2c
Maxim Polyakov fb623a02c5 drivers/i2c/nct7802y: Configure remote diodes and local sensor
The patch allows to configure sensors with a remote diode connected
and a on-chip local temperature sensor from the devicetree for the
board that uses this HWM. According to the documentation [1], this is
done by setting the corresponding bits in the Mode Selection Register
(22h). It is necessary for some Intel processors (Apollo Lake SoC)
that do not support PECI and the CPU temperature is taken from the
thermistor.

TEST = After loading the nct7802 module on the Kontron mAL-10 [2] with
       Linux OS, we can see configuration of the HWM with one sensor in
       the thermistor mode:

user@user-apl:~$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +41.0°C  (high = +110.0°C, crit = +110.0°C)
Core 0:        +40.0°C  (high = +110.0°C, crit = +110.0°C)
Core 1:        +40.0°C  (high = +110.0°C, crit = +110.0°C)
Core 2:        +41.0°C  (high = +110.0°C, crit = +110.0°C)
Core 3:        +41.0°C  (high = +110.0°C, crit = +110.0°C)

nct7802-i2c-0-2e
Adapter: SMBus CMI adapter cmi
in0:          +3.35 V  (min =  +0.00 V, max =  +4.09 V)
in1:          +1.92 V
in3:          +1.21 V  (min =  +0.00 V, max =  +2.05 V)
in4:          +1.68 V  (min =  +0.00 V, max =  +2.05 V)
fan1:           0 RPM  (min =    0 RPM)
fan2:         868 RPM  (min =    0 RPM)
fan3:           0 RPM  (min =    0 RPM)
temp1:        +42.5°C  (low  =  +0.0°C, high = +85.0°C)
                       (crit = +100.0°C)  sensor = thermistor
temp4:        +44.0°C  (low  =  +0.0°C, high = +85.0°C)
                       (crit = +100.0°C)
temp6:         +0.0°C

[1] page 30, section 7.2.32, Nuvoton Hardware Monitoring IC NCT7802Y
    with PECI 3.0 interface, datasheet, revision 1.2, february 2012
[2] https://review.coreboot.org/c/coreboot/+/39133

Change-Id: I28cc4e5cae76cf0bcdad26a50ee6cd43a201d31e
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39766
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-11 11:24:19 +00:00
..
at24rf08c src/drivers: Drop unneeded empty lines 2020-09-21 15:51:52 +00:00
ck505 src/drivers: Drop unneeded empty lines 2020-09-21 15:51:52 +00:00
da7219 src: Remove unused '#include <stdint.h>' 2020-05-13 08:48:17 +00:00
designware src/drivers: Drop unneeded empty lines 2020-09-21 15:51:52 +00:00
generic acpi_device: Replace polarity with active_low in acpi_gpio for GpioIo 2020-07-02 19:12:46 +00:00
hid src: Remove unused '#include <stdint.h>' 2020-05-13 08:48:17 +00:00
lm96000 treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
max98373 drivers/i2c/max98373: fix error message formatting 2020-07-28 19:18:28 +00:00
max98390 driver/i2c/max98390: Fix build error related to max98390 driver 2020-05-20 09:11:23 +00:00
max98927 src: Remove unused '#include <stdint.h>' 2020-05-13 08:48:17 +00:00
nau8825 treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
nct7802y drivers/i2c/nct7802y: Configure remote diodes and local sensor 2020-10-11 11:24:19 +00:00
pca9538 src/drivers: Drop unneeded empty lines 2020-09-21 15:51:52 +00:00
pcf8523 src: Remove leading blank lines from SPDX header 2020-05-18 07:00:27 +00:00
ptn3460 src/drivers: Drop unneeded empty lines 2020-09-21 15:51:52 +00:00
rt1011 src/drivers: Drop unneeded empty lines 2020-09-21 15:51:52 +00:00
rt5663 acpi_device: Replace polarity with active_low in acpi_gpio for GpioIo 2020-07-02 19:12:46 +00:00
rtd2132 treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
rx6110sa treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
sx9310 src: Remove unused '#include <stdint.h>' 2020-05-13 08:48:17 +00:00
tpm src/drivers: Drop unneeded empty lines 2020-09-21 15:51:52 +00:00
ww_ring src/drivers: Drop unneeded empty lines 2020-09-21 15:51:52 +00:00