diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | configs/ASRock/X370-taichi.conf | 148 | ||||
-rw-r--r-- | configs/Gigabyte/GA-870A-USB3.conf | 8 | ||||
-rw-r--r-- | configs/Gigabyte/GA-880GA-UD3H.conf | 116 | ||||
-rw-r--r-- | configs/Gigabyte/GA-M56S-S3.conf | 81 | ||||
-rw-r--r-- | configs/Gigabyte/X470-AORUS-ULTRA-GAMING.conf | 90 | ||||
-rw-r--r-- | configs/MSI/X370-SLI-Plus.conf | 80 | ||||
-rw-r--r-- | configs/SuperMicro/X7DCL.conf | 6 | ||||
-rw-r--r-- | lib/init.c | 3 | ||||
-rwxr-xr-x | prog/detect/sensors-detect | 59 | ||||
-rw-r--r-- | prog/sensors/chips.c | 49 |
11 files changed, 599 insertions, 45 deletions
@@ -77,7 +77,7 @@ LIBINCLUDEDIR := $(INCLUDEDIR)/sensors # manual pages will be installed. MANDIR := $(PREFIX)/man -MACHINE := $(shell uname -m) +ARCH := $(firstword $(subst -, ,$(shell $(CC) -dumpmachine))) # Extra non-default programs to build; e.g., sensord #PROG_EXTRA := sensord @@ -109,7 +109,7 @@ BUILD_STATIC_LIB := 1 SRCDIRS := lib prog/detect prog/pwm \ prog/sensors ${PROG_EXTRA:%=prog/%} etc # Only build isadump and isaset on x86 machines. -ifneq (,$(findstring $(MACHINE), i386 i486 i586 i686 x86_64)) +ifneq (,$(findstring $(ARCH), i386 i486 i586 i686 x86_64)) SRCDIRS += prog/dump endif SRCDIRS += lib/test diff --git a/configs/ASRock/X370-taichi.conf b/configs/ASRock/X370-taichi.conf new file mode 100644 index 00000000..58d8e0c3 --- /dev/null +++ b/configs/ASRock/X370-taichi.conf @@ -0,0 +1,148 @@ +# Converted by sensors-conf-convert on Mon Jun 24 22:08:41 2019 +# ASRock X370 taichi +# 2018, contributed by bowman <fancycode@gmail.com> +# +# dmi: board_name: X370 Taichi +# dmi: board_vendor: ASRock +# dmi: bios_version: P5.10 +# cpu: AMD Ryzen 7 1800X Eight-Core Processor +chip "k10temp-pci-00c3" + label temp1 "CPU Core Temp" + label temp2 "CPU TCtrl Temp" +chip "iwlwifi-virtual-0" + label temp1 "Wifi Radio Temp" +chip "nct6779-isa-*" + + # Fans + label fan1 "Chassis Fan 3 Speed" + label fan2 "CPU Fan 1 Speed" + label fan3 "CPU Fan 2 Speed" + label fan4 "Chassis Fan 1 Speed" + label fan5 "Chassis Fan 2 Speed" + + # Temperatures + label temp1 "Motherboard" + label temp2 "CPU MB" + label temp3 "Auxillary" + label temp4 "VRM" + label temp5 "AUXTIN2" + + # temp6 is almost always at -25. Not certain what to do about this. + label temp6 "CPU (PECI)" + + # temp7 (CPU tCTL) A Thermal BIAS value generated by CPU + # it includes an offset it is usedto drive mainboard Fans to higher speeds. + + # temp7 value is rounded off to the nearest ~1C only reported if + # "Use Tctrl" has been selected in UEFI as the fan control sensor. + + # It will likely be offset by 20/10C on Ryzen X series CPU's + label temp7 "CPU tCTL" + + # Voltages + + # VCore is different to VDDCR_CPU + # VCore is a voltage measured somewhere by the Firmware. + # (Readings may appear low at times (0.54V) and fluctuate - this is normal) + label in0 "VCore" + label in1 "VPPM" #scalar + label in2 "AVCC" + label in3 "3VCC" + label in4 "+12V" #scalar + label in5 "VDDCR_SOC" #(Data Fabric) + label in6 "DRAM (VDDIO)" + label in7 "3VSB" + label in8 "VBat" + ignore in9 #Unused input that is always at 0. + label in10 "Mem_VTT" #(1/2 of VDDIO) + label in11 "Chipset 1.05V" + label in12 "+5V" + label in13 "VDDP" + label in14 "1.8V+" + + # CPU VCore limits set according to overclockers testing and AMD Max Safe + # voltage recommendations. + # Keep in mind Ryzen CPU's may boost to higher voltages for short times. + # This is entirely dependant on individual chip binning. + # If your chip indicates 1.55V continuously the sensors may not be treated + # correctly by your mainboard or you have buggy firmware. + # In that case It might be actually 1.55V which would correlates with + # high heat, or it may be just a bad readout. + + # Note: sustained 1.45 is also not safe. + # I am not sure about the low load voltage drops, they are normal + # (commonly occuring on many boards) and thus likely a measurement or + # sensor anomaly. + # There is a more accurate on-die voltage sensor with ryzen. + # but the documentation is covered by NDA. k10-temp would need to be + # adapated to read voltages in addition to temperatures like HWInfo64 on + # Windows already does. + set in0_min 0.40 #Possibly inaccurate at low voltages. + set in0_max 1.45 + + # VPPM Voltage 5% + set in1_min 2.50 * 0.95 + set in1_max 2.50 * 1.05 + + # Most PSU voltages set according to ATX v2.2 spec +/- 5% on the following: + # +3.3VDC ± 5% +3.135 VDC +3.465 VDC + # +5VDC ± 5% +4.750 VDC +5.250 VDC + # +5VSB ± 5% +4.750 VDC +5.250 VDC + # -5VDC ± 10% -4.500 VDC -5.500 VDC + # +12VDC ± 5% +11.400 VDC +12.600 VDC + # -12VDC ± 10% -10.800 VDC -13.200 VDC + + # +12VDC + set in4_min 12 * 0.95 + set in4_max 12 * 1.05 + + # VDDCR_SOC (fabric & peripheral) voltage levels + # This can vary largely from board to board and among CPU's + set in5_min 0.80 + set in5_max 1.20 + + # DDR 4 RAM Tolerances VDDIO (1.2V DDR4 JEDEC standard) + set in6_min 1.10 #Underclocking + set in6_max 1.50 #Intel XMP2.0 recommended max safe voltage + + # Memory VTT Voltages (this should correspond to approximately VDDIO/2) + set in10_min 1.20 * 0.5 #Stock Voltage + set in10_max 1.50 * 0.5 #Overclocked XMP Voltage + + # Uncertain tolerances for the Ryzen Chipset + set in11_min 0.90 #Undervolting + set in11_max 1.20 #Overvolting + + set in12_min 5 * 0.95 + set in12_max 5 * 1.05 + + # CLDO_VDDP Magic - helps to set to 1.0V when RAM overclocking or on XMP + set in13_min 0.95 * 0.96 + set in13_max 0.95 * 1.13 + + # PLL (Phase locked loop) voltage on the CPU. + set in14_min 1.8 * 0.98 + set in14_max 1.8 * 1.02 + + # Compute Inputs + # The nct6779D uses a 2.048V input range, all inputs above that are scaled + # using a voltage divider. + # Below inputs utilize an integrated voltage divider: + # ADC, AVCC, VBAT, 3VSB and 3VCC + # + # values as per nuvoton nct6779D datasheet + # Section 8.5 Analog Inputs (Page 54,55) + # # Vs R1,Rin R2,Rf Vin + # in4 +12.0 56 10 ~+1.84 + # in12 +5.0 20 10 ~+1.67 + # + compute in0 @*2, @/2 + compute in1 @*2, @/2 + compute in4 ((56/10)+1)*@, @/((56/10)+1) + compute in12 ((20/10)+1)*@, @/((20/10)+1) + + + # Potential things to filter + # These inputs are unused unless you have a case intrusion switch connected. + #ignore intrusion0 + #ignore intrusion1 diff --git a/configs/Gigabyte/GA-870A-USB3.conf b/configs/Gigabyte/GA-870A-USB3.conf index 39fcbdd6..b2cf3dd4 100644 --- a/configs/Gigabyte/GA-870A-USB3.conf +++ b/configs/Gigabyte/GA-870A-USB3.conf @@ -32,11 +32,11 @@ chip "it8720-isa-*" # "Vcore", "DDR3 1.5V", "+3.3V" and "Vbat" are connected directly, so no compute # line is needed for these. +5V and 5VSB are internal so we use the - # standard scaling factor. Scaling for +12V is apparently not standard, - # factor 3.963 is guessed from BIOS and EasyTune values (3.943 was - # another candidate.) + # standard scaling factor. Scaling for +12V is apparently being done with + # 8kOhm and 2.7kOhm resistors, this matches my BIOS reading. It's an improvement + # from the previous proposed scaling value of 3.963. compute in3 @ * (6.8/10+1), @ / (6.8/10+1) - compute in4 @ * 3.963, @ / 3.963 + compute in4 @ * (8/2.7+1),@ / (8/2.7+1) compute in7 @ * (6.8/10+1), @ / (6.8/10+1) # The BIOS will not set any limit for voltages. diff --git a/configs/Gigabyte/GA-880GA-UD3H.conf b/configs/Gigabyte/GA-880GA-UD3H.conf new file mode 100644 index 00000000..33977096 --- /dev/null +++ b/configs/Gigabyte/GA-880GA-UD3H.conf @@ -0,0 +1,116 @@ +# Configuration file for the Gigabyte GA-880GA-UD3H, +# contributed by Clipo. +# 2019-02-14 +# Updates welcome. +# +# Based on Gigabyte GA-870A-UD3.conf contributed by Gary Myers and Zeke Fast +# +# +# CPU sensor + +chip "k10temp-*" + + label temp1 "CPU Temp (K10)" + +# Motherboard sensors + +chip "it8720-isa-*" + +### Voltages + + label in0 "Vcore" + label in1 "DDR3 1.5V" # as labelled in the BIOS. + label in2 "+3.3V" + label in3 "+5V" # Not shown in BIOS. + label in4 "+12V" # Not shown in BIOS + ignore in5 # Ambiguous - ignoring. + ignore in6 # Ambiguous - ignoring. + label in7 "5VSB" # Not shown in BIOS. + label in8 "Vbat" # Not shown in BIOS. + ignore cpu0_vid + + # "Vcore", "DDR3 1.5V", "+3.3V" and "Vbat" are connected directly, so no compute + # line is needed for these. +5V and 5VSB are internal so we use the + # standard scaling factor. Scaling for +12V is apparently not standard + # this value was taken from the donor config file + # + compute in3 @ * (6.8/10+1), @ / (6.8/10+1) + compute in4 @ * 3.963, @ / 3.963 + compute in7 @ * (6.8/10+1), @ / (6.8/10+1) + + # The BIOS will not set any limit for voltages. + + set in0_min 0.825 * 0.95 + set in0_max 1.425 * 1.05 + set in1_min 1.5 * 0.95 + set in1_max 1.5 * 1.05 + set in2_min 3.3 * 0.95 + set in2_max 3.3 * 1.05 + set in3_min 5 * 0.95 + set in3_max 5 * 1.05 + set in4_min 12 * 0.95 + set in4_max 12 * 1.05 + set in7_min 5 * 0.95 + set in7_max 5 * 1.05 + +### Temperatures + + label temp1 "System Temp" + # This sensor appears to be around or inside the ITE8720F chip. + set temp1_min 0 + set temp1_max 40 + + label temp2 "CPU Temp" + # This sensor can show 2 degrees difference to the K10 sensor. + # The end user can choose which one they prefer. + set temp2_min 0 + set temp2_max 60 # Set to match your BIOS "CPU Warning Temperature" + + label temp3 "Second CPU Temp?" + #This sensors appears to follow the CPU temp but with a large termal lag and slightly lower value + # + #set temp3 # + +### Fans + + # Label based on motherboard connectors. + label fan1 "CPU Fan" # M/B label: CPU_FAN (4-pin) + label fan5 "Power Fan" # M/B label: PWR_FAN (3-pin) + label fan2 "System Fan 1" # M/B label: SYS_FAN1 (3-pin) + label fan3 "System Fan 2" # M/B label: SYS_FAN2 (3-pin) + + # Minimum fan speeds. + # Comment/un-comment fan headers you are using if you want alarms. + set fan1_min 300 # CPU Fan + set fan5_min 300 # Power Fan + set fan2_min 300 # System Fan 1 + set fan3_min 300 # System Fan 2 + +# Original Sensors output before configuration applied +# +## it8720-isa-0228 +#Adapter: ISA adapter +#in0: +1.46 V (min = +0.00 V, max = +4.08 V) +#in1: +1.49 V (min = +0.00 V, max = +4.08 V) +#in2: +3.38 V (min = +0.00 V, max = +4.08 V) +#+5V: +3.02 V (min = +0.00 V, max = +4.08 V) +#in4: +3.09 V (min = +0.00 V, max = +4.08 V) +#in5: +2.85 V (min = +0.00 V, max = +4.08 V) +#in6: +4.08 V (min = +0.00 V, max = +4.08 V) +#5VSB: +2.96 V (min = +0.00 V, max = +4.08 V) +#Vbat: +3.02 V +#fan1: 629 RPM (min = 10 RPM) +#fan2: 950 RPM (min = 10 RPM) +#fan3: 1315 RPM (min = 10 RPM) +#fan5: 1310 RPM (min = 10 RPM) +#temp1: +26.0°C (low = +127.0°C, high = +127.0°C) sensor = thermistor +#temp2: +32.0°C (low = +127.0°C, high = +60.0°C) sensor = thermal diode +#temp3: +34.0°C (low = +127.0°C, high = +127.0°C) sensor = thermistor +#cpu0_vid: +0.513 V +#intrusion0: ALARM +# +#k10temp-pci-00c3 +#Adapter: PCI adapter +#temp1: +32.9°C (high = +70.0°C) +# (crit = +79.0°C, hyst = +77.0°C) + diff --git a/configs/Gigabyte/GA-M56S-S3.conf b/configs/Gigabyte/GA-M56S-S3.conf new file mode 100644 index 00000000..1091a2eb --- /dev/null +++ b/configs/Gigabyte/GA-M56S-S3.conf @@ -0,0 +1,81 @@ +# Configuration file for the Gigabyte GA-M56S-S3 +# contributed by Clipo. +# 16-03-2019 +# Updates welcome. + +# CPU sensor + +chip "k8temp-*" + + label temp1 "Core0 Temp" + label temp2 "Core0 Temp" + label temp3 "Core1 Temp" + label temp4 "Core1 Temp" + +# Motherboard sensors + +chip "it8716-*" + +### Voltages + + label in0 "VCore" + label in1 "VDDR" + label in2 "+3.3V" # VCC3 + label in3 "+5V" # VCC + label in4 "+12V" + ignore in5 # "-12V" + ignore in6 # "-5V" + label in7 "5VSB" # VCCH + label in8 "VBat" + +# "Vcore", "DDR2 1.8V", "+3.3V" and "Vbat" are connected directly, so no compute +# line is needed for these. + + compute in3 ((6.8/10)+1)*@ , @/((6.8/10)+1) + compute in4 ((30/10)+1)*@ , @/((30/10)+1) +# compute in5 (1+232/56)*@ - 4.096*232/56 , (@ + 4.096*232/56)/(1+232/56) +# compute in6 (1+120/56)*@ - 4.096*120/56 , (@ + 4.096*120/56)/(1+120/56) + compute in7 ((6.8/10)+1)*@ , @/((6.8/10)+1) + +# + # The BIOS will not set any limit for voltages. + + set in0_min 0.825 * 0.95 + set in0_max 1.425 * 1.05 + set in1_min 1.8 * 0.95 + set in1_max 1.8 * 1.05 + set in2_min 3.3 * 0.95 + set in2_max 3.3 * 1.05 + set in3_min 5 * 0.95 + set in3_max 5 * 1.05 + set in4_min 12 * 0.95 + set in4_max 12 * 1.05 + set in7_min 5 * 0.95 + set in7_max 5 * 1.05 + +### Temperatures + + label temp1 "System Temp" + # This sensor appears to be around or inside the ITE8716F chip. + set temp1_min 0 + set temp1_max 40 + + label temp3 "CPU Temp (Thermal Diode)" + # This sensor can show 2 degrees difference to the K8 sensor. + # The end user can choose which one they prefer. + set temp3_min 0 + set temp3_max 60 # Set to match your BIOS "CPU Warning Temperature" + + ignore temp2 #"Second CPU Temp (Thermistor)" + #This sensors appears to follow the CPU temp but with a large termal lag so not very usable + +### Fans + + # Label based on motherboard connectors. + label fan1 "CPU Fan" # M/B label: CPU_FAN (4-pin) + label fan2 "System Fan" # M/B label: SYS_FAN (3-pin) + + # Minimum fan speeds. + # Comment/un-comment fan headers you are using if you want alarms. + set fan1_min 300 # CPU Fan + set fan2_min 300 # System Fan 1 diff --git a/configs/Gigabyte/X470-AORUS-ULTRA-GAMING.conf b/configs/Gigabyte/X470-AORUS-ULTRA-GAMING.conf new file mode 100644 index 00000000..1964faec --- /dev/null +++ b/configs/Gigabyte/X470-AORUS-ULTRA-GAMING.conf @@ -0,0 +1,90 @@ +# Experimental config for Gigabyte X470 AORUS ULTRA GAMING +# https://www.gigabyte.com/Motherboard/X470-AORUS-ULTRA-GAMING-rev-10 +# +# This config is based on: +# - GA-AB350-GAMING3.conf +# - GA-AX370-GAMING5.conf +# - output of HWiNFO64 Sensor Status program on Windows + +# The temp3 temperature offset depends on the CPU type and needs to be +# adjusted. Compare against the output of k10temp for the correct value. +# I've tested with my AMD Ryzen 5 2600 and a difference between temp3 and Tdie (from k10temp) +# is usually very small so I personally don't use any adjustment of that field. + +chip "it8686-isa-0a40" + label temp1 "System 1" + label temp2 "Chipset" + label temp3 "CPU Socket" + label temp4 "PCIEX16" + label temp5 "VRM MOS" + label temp6 "VSOC MOS" + label in0 "CPU Vcore" + label in1 "+3.3V" + label in2 "+12V" + label in3 "+5V" + label in4 "CPU Vcore SOC" + label in5 "CPU Vddp" + label in6 "DRAM A/B" +# label in7 "3VSB" +# label in8 "Battery" + label fan1 "CPU_FAN" + label fan2 "SYS_FAN1" + label fan3 "SYS_FAN2" + label fan4 "SYS_FAN3" + label fan5 "CPU_OPT" + +# compute temp3 @+0.5,@+0.5 + compute in1 @*1.65,@*1.65 + compute in2 @*6,@*6 + compute in3 @*2.5,@*2.5 + + set in0_min 0.35 + set in0_max 1.45 + set in1_min 3.3 * 0.97 + set in1_max 3.3 * 1.03 + set in2_min 12 * 0.97 + set in2_max 12 * 1.03 + set in3_min 5 * 0.97 + set in3_max 5 * 1.03 + set in4_min 0.9 + set in4_max 1.26 + set in5_min 0.9 * 0.95 + set in5_max 0.9 * 1.05 + set in6_min 1.1 + set in6_max 1.6 + +chip "it8792-isa-0a60" + label temp1 "PCIEX8" + label temp2 "EC_TEMP" + label temp3 "System 2" + label in0 "CPU Vcore" + label in1 "DDR VTT" + label in2 "Chipset Core" +# label in3 "VIN3" + label in4 "CPU Vdd18" + label in5 "DDR Vpp A/B" +# label in6 "3VSB" +# label in7 "Battery" + label fan1 "SYS_FAN5_PUMP" + label fan2 "SYS_FAN6_PUMP" + label fan3 "SYS_FAN4" + + compute in5 @ * (208/125), @ / (208/125) + + set in0_min 0.35 + set in0_max 1.45 + set in1_min 1.1 / 2 + set in1_max 1.6 / 2 + set in2_min 1.05 * 0.95 + set in2_max 1.05 * 1.05 + set in4_min 1.8 * 0.97 + set in4_max 1.8 * 1.03 + set in5_min 2.5 * 0.95 + set in5_max 2.5 * 1.05 + set in7_min 3.3 * 0.97 + set in7_max 3.3 * 1.03 + +# ignore fan1 +# ignore fan2 +# ignore fan3 +# ignore in8 diff --git a/configs/MSI/X370-SLI-Plus.conf b/configs/MSI/X370-SLI-Plus.conf new file mode 100644 index 00000000..2816bfbb --- /dev/null +++ b/configs/MSI/X370-SLI-Plus.conf @@ -0,0 +1,80 @@ +# Lmsensors configuration for MSI X370 SLI Plus + +chip "nct6795-*" + label fan1 "Pump" + set fan1_min 0 + + label fan2 "CPU Fan" + set fan2_min 255 + + label fan3 "System 1 Fan" + set fan3_min 0 + + label fan4 "System 2 Fan" + set fan4_min 0 + + label fan5 "System 3 Fan" + set fan5_min 0 + + label fan6 "System 4 Fan" + set fan6_min 0 + + label in0 "CPU Core" + set in0_min 0.40 + set in0_max 1.55 + + label in1 "CPU NB/SOC" + set in1_min 1.0 + set in1_max 1.3 + + label in3 "System 5V" + compute in3 @ * 1.5 , @ / 1.5 + set in3_min 5 * 0.95 + set in3_max 5 * 1.15 + + label in4 "System 12V" + compute in4 @ * 12 , @ / 12 + set in4_min 12 * 0.95 + set in4_max 12 * 1.05 + + label in5 "Unknown" + set in5_min 0.15 * 0.95 + set in5_max 0.15 * 1.15 + + label in6 "CLDO_VDDP" + set in6_min 0.6 * 0.95 + set in6_max 0.7 * 1.15 + + label in9 "VTT" + set in9_min 1.8 * 0.95 + set in9_max 1.8 * 1.15 + + label in10 "CPU VDDP" + + label in11 "DRAM VREF" + set in11_min 0.12 + set in11_max 1.235 + + label in12 "VDD" + set in12_min 1.0 + set in12_max 1.1 + + label in13 "DIMM" + compute in13 @ * 2 , @ / 2 + set in13_min 0.8 + set in13_max 1.5 + + label in14 "5VSB" + compute in14 ((768 / 330) + 1) * @, @ / ((768 / 330) + 1) + set in14_min 5 * 0.95 + set in14_max 5 * 1.05 + + set temp1_max 60 + set temp1_max_hyst 45 + + ignore temp4 + ignore temp6 + ignore temp7 + ignore temp8 + ignore temp9 + ignore temp10 diff --git a/configs/SuperMicro/X7DCL.conf b/configs/SuperMicro/X7DCL.conf index f22c9b87..b751afa9 100644 --- a/configs/SuperMicro/X7DCL.conf +++ b/configs/SuperMicro/X7DCL.conf @@ -5,10 +5,10 @@ chip "w83793-i2c-0-2f" label in0 "CPU Core 1" # 0x11, CPU Core 2 label in1 "CPU Core 2" -# 0x12 VTT=1.2V in BIOS ? +# 0x12 VTT=1.1V in BIOS label in2 "VTT" - set in2_min 1.2*0.95 - set in2_max 1.2*1.05 + set in2_min 1.1*0.95 + set in2_max 1.1*1.05 # 0x14, -12V label in3 "-12V" compute in3 (((@/8)*18500)/256)-16, (((@+16)*256)/18500)*8 @@ -20,7 +20,8 @@ */ /* Needed for scandir() and alphasort() */ -#define _BSD_SOURCE +#define _BSD_SOURCE 1 /* for glibc < 2.19 */ +#define _DEFAULT_SOURCE 1 /* for glibc >= 2.19 */ #include <sys/types.h> #include <sys/stat.h> diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 5c771485..c2cbe9b9 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -1441,7 +1441,7 @@ use vars qw(@i2c_adapter_names); i2c_detect => sub { fintek_detect(@_, 4); }, }, { name => "Fintek F75387SG/RG", - driver => "to-be-written", + driver => "f75375s", i2c_addrs => [0x2d..0x2e], i2c_detect => sub { fintek_detect(@_, 5); }, }, { @@ -2281,66 +2281,87 @@ use constant FEAT_SMBUS => (1 << 7); driver => "not-a-sensor", devid => 0x61, }, { + name => "Nuvoton NCT6683D eSIO", + driver => "nct6683", + devid => 0xC730, + devid_mask => 0xFFF0, + logdev => 0x0b, + features => FEAT_IN | FEAT_FAN | FEAT_TEMP, + }, { + name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors", + driver => "nct6775", + devid => 0xC450, + devid_mask => 0xFFF8, + logdev => 0x0b, + features => FEAT_IN | FEAT_FAN | FEAT_TEMP, + }, { + name => "Nuvoton NCT6112D/NCT6114D/NCT6116D Super IO Sensors", + driver => "nct6775", + devid => 0xD280, + devid_mask => 0xFFF8, + logdev => 0x0b, + features => FEAT_IN | FEAT_FAN | FEAT_TEMP, + }, { name => "Nuvoton NCT5573D/NCT5577D/NCT6776F Super IO Sensors", driver => "nct6775", devid => 0xC330, - devid_mask => 0xFFF0, + devid_mask => 0xFFF8, logdev => 0x0b, features => FEAT_IN | FEAT_FAN | FEAT_TEMP, }, { name => "Nuvoton NCT5532D/NCT6779D Super IO Sensors", driver => "nct6775", devid => 0xC560, - devid_mask => 0xFFF0, - logdev => 0x0b, - features => FEAT_IN | FEAT_FAN | FEAT_TEMP, - }, { - name => "Nuvoton NCT6683D eSIO", - driver => "nct6683", - devid => 0xC730, - devid_mask => 0xFFF0, + devid_mask => 0xFFF8, logdev => 0x0b, features => FEAT_IN | FEAT_FAN | FEAT_TEMP, }, { name => "Nuvoton NCT6791D Super IO Sensors", driver => "nct6775", devid => 0xC800, - devid_mask => 0xFFF0, + devid_mask => 0xFFF8, logdev => 0x0b, features => FEAT_IN | FEAT_FAN | FEAT_TEMP, }, { name => "Nuvoton NCT6792D Super IO Sensors", driver => "nct6775", devid => 0xC910, - devid_mask => 0xFFF0, + devid_mask => 0xFFF8, logdev => 0x0b, features => FEAT_IN | FEAT_FAN | FEAT_TEMP, }, { name => "Nuvoton NCT6793D Super IO Sensors", driver => "nct6775", devid => 0xD120, - devid_mask => 0xFFF0, + devid_mask => 0xFFF8, logdev => 0x0b, features => FEAT_IN | FEAT_FAN | FEAT_TEMP, }, { name => "Nuvoton NCT6795D Super IO Sensors", driver => "nct6775", devid => 0xD350, - devid_mask => 0xFFF0, + devid_mask => 0xFFF8, logdev => 0x0b, features => FEAT_IN | FEAT_FAN | FEAT_TEMP, }, { name => "Nuvoton NCT6796D Super IO Sensors", driver => "nct6775", devid => 0xD420, - devid_mask => 0xFFF0, + devid_mask => 0xFFF8, logdev => 0x0b, features => FEAT_IN | FEAT_FAN | FEAT_TEMP, }, { - name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors", + name => "Nuvoton NCT6797D Super IO Sensors", driver => "nct6775", - devid => 0xC450, - devid_mask => 0xFFF0, + devid => 0xD450, + devid_mask => 0xFFF8, + logdev => 0x0b, + features => FEAT_IN | FEAT_FAN | FEAT_TEMP, + }, { + name => "Nuvoton NCT6798D Super IO Sensors", + driver => "nct6775", + devid => 0xD428, + devid_mask => 0xFFF8, logdev => 0x0b, features => FEAT_IN | FEAT_FAN | FEAT_TEMP, }, { @@ -2773,7 +2794,7 @@ use vars qw(@cpu_ids); }, { name => "AMD Family 17h thermal sensors", driver => "k10temp", - detect => sub { amd_pci_detect('1463', '15d0', '1493') }, + detect => sub { amd_pci_detect('1463', '15d0', '1493', '1443') }, }, { name => "AMD Family 15h power sensors", driver => "fam15h_power", diff --git a/prog/sensors/chips.c b/prog/sensors/chips.c index 7ec74912..0eb07418 100644 --- a/prog/sensors/chips.c +++ b/prog/sensors/chips.c @@ -32,6 +32,13 @@ #define ARRAY_SIZE(arr) (int)(sizeof(arr) / sizeof((arr)[0])) +static void scale_value(double *value, const char **prefixstr); + +static inline double deg_ctof(double cel) +{ + return cel * (9.0F / 5.0F) + 32.0F; +} + void print_chip_raw(const sensors_chip_name *name) { int a, b, err; @@ -58,8 +65,11 @@ void print_chip_raw(const sensors_chip_name *name) "value of subfeature %s: %s\n", sub->name, sensors_strerror(err)); - else + else { + if (fahrenheit) + val = deg_ctof(val); printf(" %s: %.3f\n", sub->name, val); + } } else printf("(%s)\n", label); } @@ -100,28 +110,27 @@ void print_chip_json(const sensors_chip_name *name) } else { if (subCnt > 0) printf(",\n"); + if (fahrenheit) + val = deg_ctof(val); printf(" \"%s\": %.3f", sub->name, val); + subCnt++; } } else { printf("(%s)", label); + subCnt++; } - subCnt++; } free(label); printf("\n }"); cnt++; } - printf("\n"); + if (cnt > 0) + printf("\n"); } static const char hyst_str[] = "hyst"; -static inline double deg_ctof(double cel) -{ - return cel * (9.0F / 5.0F) + 32.0F; -} - static void print_label(const char *label, int space) { int len = strlen(label)+1; @@ -431,6 +440,7 @@ static void print_chip_in(const sensors_chip_name *name, { const sensors_subfeature *sf; char *label; + const char *unit; struct sensor_subfeature_data sensors[NUM_IN_SENSORS]; struct sensor_subfeature_data alarms[NUM_IN_ALARMS]; int sensor_count, alarm_count; @@ -446,10 +456,12 @@ static void print_chip_in(const sensors_chip_name *name, sf = sensors_get_subfeature(name, feature, SENSORS_SUBFEATURE_IN_INPUT); - if (sf && get_input_value(name, sf, &val) == 0) - printf("%+6.2f V ", val); - else + if (sf && get_input_value(name, sf, &val) == 0) { + scale_value(&val, &unit); + printf("%6.2f %sV%*s", val, unit, 2 - (int)strlen(unit), ""); + } else { printf(" N/A "); + } sensor_count = alarm_count = 0; get_sensor_limit_data(name, feature, voltage_sensors, @@ -644,8 +656,9 @@ static void print_chip_power(const sensors_chip_name *name, if (sf && get_input_value(name, sf, &val) == 0) { scale_value(&val, &unit); printf("%6.2f %sW%*s", val, unit, 2 - (int)strlen(unit), ""); - } else + } else { printf(" N/A "); + } for (i = 0; i < sensor_count; i++) { /* @@ -692,8 +705,9 @@ static void print_chip_energy(const sensors_chip_name *name, if (sf && get_input_value(name, sf, &val) == 0) { scale_value(&val, &unit); printf("%6.2f %sJ", val, unit); - } else + } else { printf(" N/A"); + } printf("\n"); } @@ -787,6 +801,7 @@ static void print_chip_curr(const sensors_chip_name *name, const sensors_subfeature *sf; double val; char *label; + const char *unit; struct sensor_subfeature_data sensors[NUM_CURR_SENSORS]; struct sensor_subfeature_data alarms[NUM_CURR_ALARMS]; int sensor_count, alarm_count; @@ -801,10 +816,12 @@ static void print_chip_curr(const sensors_chip_name *name, sf = sensors_get_subfeature(name, feature, SENSORS_SUBFEATURE_CURR_INPUT); - if (sf && get_input_value(name, sf, &val) == 0) - printf("%+6.2f A ", val); - else + if (sf && get_input_value(name, sf, &val) == 0) { + scale_value(&val, &unit); + printf("%6.2f %sA%*s", val, unit, 2 - (int)strlen(unit), ""); + } else { printf(" N/A "); + } sensor_count = alarm_count = 0; get_sensor_limit_data(name, feature, current_sensors, |