Skip to contentSkip to conversation

sensors-detect: Add detection of IT8752F

PATCH In review Guenter Roeck 3 participants 7 messages Jan 29, 2013 – Jun 26, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 sensors-detect: Add detection of IT8752F

IT8752F appears to be mostly compatible to IT8728F. Supported by HWSensors4 and derived code.

---
 CHANGES                    |    3 ++-
 prog/detect/sensors-detect |    6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
CHANGES +2 -1
index 7ef4c2b..465bd61 100644
@@ -4,7 +4,8 @@ lm-sensors CHANGES file
 SVN HEAD
   sensors.conf.5: Mention "sensors -u" to get the raw feature names
   sensors: Clarify what option -u is good for
-  sensors-detect: Add detection of AMD family 16h power sensors
+  sensors-detect: Add detection of IT8752F
+                  Add detection of AMD family 16h power sensors
                   Map IT8771E, IT8772E, IT8782F and IT8783F to it87
                   Use /sys/module instead of /proc/modules where available
                   Drop legacy sysconfig configuration file syntax
prog/detect/sensors-detect +6 -0
index a96a33e..59378c2 100755
@@ -2224,6 +2224,12 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x04,
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
 	}, {
+		name => "ITE IT8752F Super IO Sensors",
+		driver => "to-be-written",	# it87
+		devid => 0x8752,
+		logdev => 0x04,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+	}, {
 		name => "ITE IT8771E Super IO Sensors",
 		driver => "it87",
 		devid => 0x8771,
Signature · 7 lines
1.7.9.7


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#1 lore raw
Quoted 14 lines · Guenter Roeck

IT8752F appears to be mostly compatible to IT8728F. Supported by HWSensors4 and derived code.

---
 CHANGES                    |    3 ++-
 prog/detect/sensors-detect |    6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
CHANGES +0 -0
index 7ef4c2b..465bd61 100644

CHANGES lm-sensors CHANGES file · line 11

Quoted 9 lines
CHANGES +2 -1
@@ -4,7 +4,8 @@ lm-sensors CHANGES file
 SVN HEAD
   sensors.conf.5: Mention "sensors -u" to get the raw feature names
   sensors: Clarify what option -u is good for
-  sensors-detect: Add detection of AMD family 16h power sensors
+  sensors-detect: Add detection of IT8752F
+                  Add detection of AMD family 16h power sensors
                   Map IT8771E, IT8772E, IT8782F and IT8783F to it87
                   Use /sys/module instead of /proc/modules where available
                   Drop legacy sysconfig configuration file syntax

We don't keep this list sorted, you can simply append at the end.

Quoted 7 lines
prog/detect/sensors-detect +0 -0
index a96a33e..59378c2 100755
@@ -2224,6 +2224,12 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x04,
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,

prog/detect/sensors-detect use constant FEAT_SMBUS => (1 << 7); · line 2235

Quoted 10 lines
prog/detect/sensors-detect +6 -0
 	}, {
+		name => "ITE IT8752F Super IO Sensors",
+		driver => "to-be-written",	# it87
+		devid => 0x8752,
+		logdev => 0x04,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+	}, {
 		name => "ITE IT8771E Super IO Sensors",
 		driver => "it87",
 		devid => 0x8771,

Looks good, please commit and add an entry in wiki/Devices.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw

PATCH 1/2 sensors-detect: Add detection of LM95234

In reply to Guenter Roeck
---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |   17 ++++++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)
CHANGES +1 -0
index 72b7bfd..51ac3c8 100644
@@ -11,6 +11,7 @@ SVN HEAD
                   Stay alive when /dev/port is missing
                   Add detection of IT8752F
                   Add detection of MCP98244
+                  Add detection of LM95234
 
 3.3.3 "Happy Birthday Sophie" (2012-11-06)
   documentation: Update fan-divisors, fan divisors are optional
prog/detect/sensors-detect +16 -1
index 2e6c4ef..f238802 100755
@@ -1033,6 +1033,11 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x2b, 0x19, 0x2a],
 		i2c_detect => sub { lm95231_detect(@_, 0); },
 	}, {
+		name => "National Semiconductor LM95234",
+		driver => "to-be-written",		# lm95234
+		i2c_addrs => [0x18, 0x4d, 0x4e],
+		i2c_detect => sub { lm95231_detect(@_, 3); },
+	}, {
 		name => "National Semiconductor LM95241",
 		driver => "lm95241",
 		i2c_addrs => [0x2b, 0x19, 0x2a],
@@ -4721,14 +4726,17 @@ sub max6657_detect
 	return 5;
 }
 
-# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245
+# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245, 3 = LM95234
 # Registers used:
 #   0x02: Status (3 unused bits)
 #   0x03: Configuration (3 unused bits)
+#   0x04: Conversion rate (6 unused bits, LM95234)
 #   0x06: Remote diode filter control (6 unused bits, LM95231 and LM95241)
 #   0x30: Remote diode model type select (6 unused bits, LM95231 and LM95241)
 #   0x30: Local Temperature LSB (5 unused bits, LM95245)
+#   0x30: Diode model (4 unused bits, LM95234)
 #   0x33: Status register 2 (6 unused bits, LM95245)
+#   0x38: Diode model status (4 unused bits, LM95234)
 #   0xfe: Manufacturer ID
 #   0xff: Revision ID
 sub lm95231_detect
@@ -4752,6 +4760,13 @@ sub lm95231_detect
 		return if i2c_smbus_read_byte_data($file, 0x03) & 0xa1;
 		return if i2c_smbus_read_byte_data($file, 0x30) & 0x1f;
 		return if i2c_smbus_read_byte_data($file, 0x33) & 0x3f;
+	} elsif ($chip = 3) {
+		return if $cid != 0x79;			# LM95234
+		return if i2c_smbus_read_byte_data($file, 0x02) & 0x30;
+		return if i2c_smbus_read_byte_data($file, 0x03) & 0xbc;
+		return if i2c_smbus_read_byte_data($file, 0x04) & 0xfc;
+		return if i2c_smbus_read_byte_data($file, 0x30) & 0xe1;
+		return if i2c_smbus_read_byte_data($file, 0x38) & 0xe1;
 	}
 
 	return 6;
Signature · 7 lines
1.7.9.7


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#3 lore raw

Re: [lm-sensors] [PATCH 1/2] sensors-detect: Add detection of LM95234

In reply to Guenter Roeck
Quoted 57 lines · Guenter Roeck
---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |   17 ++++++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)
CHANGES +1 -0
index 72b7bfd..51ac3c8 100644
@@ -11,6 +11,7 @@ SVN HEAD
                   Stay alive when /dev/port is missing
                   Add detection of IT8752F
                   Add detection of MCP98244
+                  Add detection of LM95234
 
 3.3.3 "Happy Birthday Sophie" (2012-11-06)
   documentation: Update fan-divisors, fan divisors are optional
prog/detect/sensors-detect +9 -1
index 2e6c4ef..f238802 100755
@@ -1033,6 +1033,11 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x2b, 0x19, 0x2a],
 		i2c_detect => sub { lm95231_detect(@_, 0); },
 	}, {
+		name => "National Semiconductor LM95234",
+		driver => "to-be-written",		# lm95234
+		i2c_addrs => [0x18, 0x4d, 0x4e],
+		i2c_detect => sub { lm95231_detect(@_, 3); },
+	}, {
 		name => "National Semiconductor LM95241",
 		driver => "lm95241",
 		i2c_addrs => [0x2b, 0x19, 0x2a],
@@ -4721,14 +4726,17 @@ sub max6657_detect
 	return 5;
 }
 
-# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245
+# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245, 3 = LM95234
 # Registers used:
 #   0x02: Status (3 unused bits)
 #   0x03: Configuration (3 unused bits)
+#   0x04: Conversion rate (6 unused bits, LM95234)
 #   0x06: Remote diode filter control (6 unused bits, LM95231 and LM95241)
 #   0x30: Remote diode model type select (6 unused bits, LM95231 and LM95241)
 #   0x30: Local Temperature LSB (5 unused bits, LM95245)
+#   0x30: Diode model (4 unused bits, LM95234)
 #   0x33: Status register 2 (6 unused bits, LM95245)
+#   0x38: Diode model status (4 unused bits, LM95234)
 #   0xfe: Manufacturer ID
 #   0xff: Revision ID
 sub lm95231_detect
@@ -4752,6 +4760,13 @@ sub lm95231_detect
 		return if i2c_smbus_read_byte_data($file, 0x03) & 0xa1;
 		return if i2c_smbus_read_byte_data($file, 0x30) & 0x1f;
 		return if i2c_smbus_read_byte_data($file, 0x33) & 0x3f;

prog/detect/sensors-detect sub lm95231_detect · line 4772

Quoted 10 lines
prog/detect/sensors-detect +7 -0
+	} elsif ($chip = 3) {
+		return if $cid != 0x79;			# LM95234
+		return if i2c_smbus_read_byte_data($file, 0x02) & 0x30;
+		return if i2c_smbus_read_byte_data($file, 0x03) & 0xbc;
+		return if i2c_smbus_read_byte_data($file, 0x04) & 0xfc;
+		return if i2c_smbus_read_byte_data($file, 0x30) & 0xe1;
+		return if i2c_smbus_read_byte_data($file, 0x38) & 0xe1;
 	}
 
 	return 6;

Looks good, please commit and update wiki/Devices accordingly.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#4 lore raw

PATCH 1/2 sensors-detect: Add detection of various TI chips

In reply to Guenter Roeck

Detect TMP441, TMP442, LM95233, LM95234, LM95235.
Strengthen detection of TMP421/TMP422/TMP423

---
 CHANGES                    |  2 ++
 prog/detect/sensors-detect | 49 ++++++++++++++++++++++++++++++++++++++++------
 2 files changed, 45 insertions(+), 6 deletions(-)
CHANGES +2 -0
index 240ba9f..3390942 100644
@@ -11,6 +11,8 @@ SVN HEAD
   sensors-detect: Add detection of ADC128D818
                   Add detection of AMD family 16h Kabini and Mullins
                   Add detection of ITE IT8620E and IT8623E
+                  Add detection of TMP441, TMP442, LM95233, LM95234,
+                  and LM95235
 
 3.3.5 "Happy Birthday Beddy" (2014-01-22)
   libsensors: Improve documentation of two functions
prog/detect/sensors-detect +43 -6

102 lines not on this page · raw message

Signature · 7 lines
1.9.1


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#5 lore raw

Re: [lm-sensors] [PATCH 1/2] sensors-detect: Add detection of various TI chips

In reply to Guenter Roeck

Hi Guenter,

You got my address wrong again ;-)

Quoted 30 lines · Guenter Roeck

Detect TMP441, TMP442, LM95233, LM95234, LM95235.
Strengthen detection of TMP421/TMP422/TMP423

---
 CHANGES                    |  2 ++
 prog/detect/sensors-detect | 49 ++++++++++++++++++++++++++++++++++++++++------
 2 files changed, 45 insertions(+), 6 deletions(-)
CHANGES +2 -0
index 240ba9f..3390942 100644
@@ -11,6 +11,8 @@ SVN HEAD
   sensors-detect: Add detection of ADC128D818
                   Add detection of AMD family 16h Kabini and Mullins
                   Add detection of ITE IT8620E and IT8623E
+                  Add detection of TMP441, TMP442, LM95233, LM95234,
+                  and LM95235
 
 3.3.5 "Happy Birthday Beddy" (2014-01-22)
   libsensors: Improve documentation of two functions
prog/detect/sensors-detect +0 -0
index 51b4936..df9a408 100755
@@ -1033,6 +1033,16 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x4c, 0x4d],
 		i2c_detect => sub { lm90_detect(@_, 17); },
 	}, {

prog/detect/sensors-detect use vars qw(@i2c_adapter_names); · line 1045

Quoted 10 lines
prog/detect/sensors-detect +10 -0
+		name => "Texas Instruments TMP441",
+		driver => "tmp421",
+		i2c_addrs => [0x1c..0x1f, 0x2a, 0x4c..0x4f],
+		i2c_detect => sub { tmp42x_detect(@_, 3); },
+	}, {
+		name => "Texas Instruments TMP442",
+		driver => "tmp421",
+		i2c_addrs => [0x1c..0x1f, 0x2a, 0x4c..0x4f],
+		i2c_detect => sub { tmp42x_detect(@_, 4); },
+	}, {

According to the datasheet, the TMP442 has no address pins, so its slave address is fixed. The TMP442A has address 0x4c, and the TMP442B has address 0x4d, so these would be the only two possible addresses, much like for the TMP423.

Quoted 41 lines
prog/detect/sensors-detect +15 -3
 		name => "Texas Instruments TMP451",
 		driver => "lm90",
 		i2c_addrs => [0x4c],
@@ -1048,11 +1058,21 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x2b, 0x19, 0x2a],
 		i2c_detect => sub { lm95231_detect(@_, 0); },
 	}, {
+		name => "National Semiconductor LM95233",
+		driver => "lm95234",
+		i2c_addrs => [0x18, 0x2a, 0x2b],
+		i2c_detect => sub { lm95231_detect(@_, 5); },
+	}, {
 		name => "National Semiconductor LM95234",
-		driver => "to-be-written",		# lm95234
+		driver => "lm95234",
 		i2c_addrs => [0x18, 0x4d, 0x4e],
 		i2c_detect => sub { lm95231_detect(@_, 3); },
 	}, {
+		name => "National Semiconductor LM95235",
+		driver => "lm95245",
+		i2c_addrs => [0x18, 0x29, 0x4c],
+		i2c_detect => sub { lm95231_detect(@_, 4); },
+	}, {
 		name => "National Semiconductor LM95241",
 		driver => "lm95241",
 		i2c_addrs => [0x2b, 0x19, 0x2a],
@@ -4765,9 +4785,11 @@ sub lm90_detect
 	return;
 }
 
-# Chip to detect: 0 = TMP421, 1 = TMP422, 2 = TMP423
+# Chip to detect: 0 = TMP421, 1 = TMP422, 2 = TMP423, 3 = TMP441, 4 = TMP442
 # Registers used:
-#   0xfe: Manufactorer ID
+#   0x08: Status (7 unused bits)
+#   0x0b: Conversion rate (value 0x07 or lower)
+#   0xfe: Manufacturer ID
 #   0xff: Device ID
 sub tmp42x_detect()
 {

prog/detect/sensors-detect sub tmp42x_detect() · line 4805

Quoted 9 lines
prog/detect/sensors-detect +4 -0
@@ -4775,12 +4797,18 @@ sub tmp42x_detect()
 
 	my $mid = i2c_smbus_read_byte_data($file, 0xfe);
 	my $cid = i2c_smbus_read_byte_data($file, 0xff);
+	my $status = i2c_smbus_read_byte_data($file, 0x08);
+	my $rate = i2c_smbus_read_byte_data($file, 0x0b);
 
 	return if ($mid != 0x55);
+	return if ($status & 0x7f);
+	return if ($rate > 0x07);

These extra checks could be added to the tmp421 driver too.

All the rest looks good, feel free to commit.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#6 lore raw

Re: [lm-sensors] [PATCH 1/2] sensors-detect: Add detection of various TI chips

In reply to Guenter Roeck
Quoted 42 lines · Jean Delvare

Hi Guenter,

You got my address wrong again ;-)

Quoted 37 lines · Guenter Roeck

Detect TMP441, TMP442, LM95233, LM95234, LM95235.
Strengthen detection of TMP421/TMP422/TMP423

---
  CHANGES                    |  2 ++
  prog/detect/sensors-detect | 49 ++++++++++++++++++++++++++++++++++++++++------
  2 files changed, 45 insertions(+), 6 deletions(-)
CHANGES +2 -0
index 240ba9f..3390942 100644
@@ -11,6 +11,8 @@ SVN HEAD
    sensors-detect: Add detection of ADC128D818
                    Add detection of AMD family 16h Kabini and Mullins
                    Add detection of ITE IT8620E and IT8623E
+                  Add detection of TMP441, TMP442, LM95233, LM95234,
+                  and LM95235
 
  3.3.5 "Happy Birthday Beddy" (2014-01-22)
    libsensors: Improve documentation of two functions
prog/detect/sensors-detect +7 -0
index 51b4936..df9a408 100755
@@ -1033,6 +1033,16 @@ use vars qw(@i2c_adapter_names);
  		i2c_addrs => [0x4c, 0x4d],
  		i2c_detect => sub { lm90_detect(@_, 17); },
  	}, {
+		name => "Texas Instruments TMP441",
+		driver => "tmp421",
+		i2c_addrs => [0x1c..0x1f, 0x2a, 0x4c..0x4f],
+		i2c_detect => sub { tmp42x_detect(@_, 3); },
+	}, {
+		name => "Texas Instruments TMP442",
+		driver => "tmp421",
Quoted 9 lines

prog/detect/sensors-detect use vars qw(@i2c_adapter_names); · line 1045

Quoted 3 lines
prog/detect/sensors-detect +3 -0
+		i2c_addrs => [0x1c..0x1f, 0x2a, 0x4c..0x4f],
+		i2c_detect => sub { tmp42x_detect(@_, 4); },
+	}, {

According to the datasheet, the TMP442 has no address pins, so its slave address is fixed. The TMP442A has address 0x4c, and the TMP442B has address 0x4d, so these would be the only two possible addresses, much like for the TMP423.

Ok.

Quoted 47 lines
Quoted 47 lines
prog/detect/sensors-detect +17 -3
  		name => "Texas Instruments TMP451",
  		driver => "lm90",
  		i2c_addrs => [0x4c],
@@ -1048,11 +1058,21 @@ use vars qw(@i2c_adapter_names);
  		i2c_addrs => [0x2b, 0x19, 0x2a],
  		i2c_detect => sub { lm95231_detect(@_, 0); },
  	}, {
+		name => "National Semiconductor LM95233",
+		driver => "lm95234",
+		i2c_addrs => [0x18, 0x2a, 0x2b],
+		i2c_detect => sub { lm95231_detect(@_, 5); },
+	}, {
  		name => "National Semiconductor LM95234",
-		driver => "to-be-written",		# lm95234
+		driver => "lm95234",
  		i2c_addrs => [0x18, 0x4d, 0x4e],
  		i2c_detect => sub { lm95231_detect(@_, 3); },
  	}, {
+		name => "National Semiconductor LM95235",
+		driver => "lm95245",
+		i2c_addrs => [0x18, 0x29, 0x4c],
+		i2c_detect => sub { lm95231_detect(@_, 4); },
+	}, {
  		name => "National Semiconductor LM95241",
  		driver => "lm95241",
  		i2c_addrs => [0x2b, 0x19, 0x2a],
@@ -4765,9 +4785,11 @@ sub lm90_detect
  	return;
  }
 
-# Chip to detect: 0 = TMP421, 1 = TMP422, 2 = TMP423
+# Chip to detect: 0 = TMP421, 1 = TMP422, 2 = TMP423, 3 = TMP441, 4 = TMP442
  # Registers used:
-#   0xfe: Manufactorer ID
+#   0x08: Status (7 unused bits)
+#   0x0b: Conversion rate (value 0x07 or lower)
+#   0xfe: Manufacturer ID
  #   0xff: Device ID
  sub tmp42x_detect()
  {
@@ -4775,12 +4797,18 @@ sub tmp42x_detect()
 
  	my $mid = i2c_smbus_read_byte_data($file, 0xfe);
  	my $cid = i2c_smbus_read_byte_data($file, 0xff);
+	my $status = i2c_smbus_read_byte_data($file, 0x08);
+	my $rate = i2c_smbus_read_byte_data($file, 0x0b);
 
Quoted 6 lines

prog/detect/sensors-detect sub tmp42x_detect() · line 4805

Quoted 3 lines
prog/detect/sensors-detect +2 -0
  	return if ($mid != 0x55);
+	return if ($status & 0x7f);
+	return if ($rate > 0x07);

These extra checks could be added to the tmp421 driver too.

I actually have a patch ready to do just that (since April ;-), I only didn't have time to send it out.

Quoted 2 lines

All the rest looks good, feel free to commit.

Will do. Thanks a lot for the review.

Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors