diff options
author | chris-est <c1_github@teamchris.info> | 2019-10-24 19:42:34 +0200 |
---|---|---|
committer | chris-est <c1_github@teamchris.info> | 2019-10-29 19:32:04 +0100 |
commit | d5365edf2033ae4cf1eb9564a28244de570a51f1 (patch) | |
tree | 15015487d52515237fbd47bddfb6d04c43a8497f | |
parent | 207e426d0176766a01dd77a6386efd71c7ccadc0 (diff) | |
download | lm-sensors-git-d5365edf2033ae4cf1eb9564a28244de570a51f1.tar.gz |
sensors-detect: add support for FTS Teutates Chip
This patch adds support for the FTS Teutates Chip,
used on Fujitsu Mainboards for Intel Skylake and later Chipsets.
It is based on a patch from Fujitsu and was tested on a D-3446-S Mainboard.
The corresponding kernel module can be found here [1].
This is a revised version of an earlier pull request [2].
[1]: https://github.com/torvalds/linux/blob/master/drivers/hwmon/ftsteutates.c#L711
[2]: https://github.com/lm-sensors/lm-sensors/pull/9
-rwxr-xr-x | prog/detect/sensors-detect | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 709a469f..6fc441aa 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -1392,6 +1392,11 @@ use vars qw(@i2c_adapter_names); i2c_addrs => [0x73], i2c_detect => sub { fsc_detect(@_, 7); }, }, { + name => "FTS Teutates", + driver => "ftsteutates", + i2c_addrs => [0x73], + i2c_detect => sub { fts_detect(@_); }, + }, { name => "ALi M5879", driver => "to-be-written", i2c_addrs => [0x2c..0x2d], @@ -6364,6 +6369,33 @@ sub fsc_detect return 8; } +# Chip to detect: FTS Teutates +# Registers used: +# 0x00: Device ID +# 0x01: Revision +# 0x0C: Device Detection Register 1 +# 0x0D: Device Detection Register 2 +# 0x0E: Device Detection Register 3 +sub fts_detect +{ + my ($file) = @_; + + # Device ID must be 0x11 + # 0x10 == Baseboard Management Controller + # 0x01 == Teutates + return unless i2c_smbus_read_byte_data($file, 0x00) == 0x11; + + # Revision must be greater or equal 0x2b to use device detection + return unless i2c_smbus_read_byte_data($file, 0x01) >= 0x2b; + + # Device Detection Registers must be 0x17, 0x34, 0x54 + return unless i2c_smbus_read_byte_data($file, 0x0C) == 0x17 + and i2c_smbus_read_byte_data($file, 0x0D) == 0x34 + and i2c_smbus_read_byte_data($file, 0x0E) == 0x54; + + return 8; +} + # Chip to detect: 0 = LM93, 1 = LM94 # Registers used: # 0x3E: Manufacturer ID |