Skip to contentSkip to conversation

sensors-detect: Add detection of AMD family

PATCH In review Guenter Roeck 9 participants 61 messages Feb 17, 2011 – Aug 31, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sensors-detect: Add detection of AMD family

Index: CHANGES
=================================--- CHANGES (revision 5932)
+++ CHANGES (working copy)
@@ -27,6 +27,7 @@
EMC1072, EMC1073, EMC1074, EMC1402, and EMC1424
Fixed address ranges checked for SMSC EMC1403 and EMC1404. Fix detection of SPD EEPROM on DDR3 memory modules
+ Add detection of AMD family 12h and 14h thermal sensors

3.2.0 (2010-10-10)
libsensors: Increase MAX_SENSORS_PER_TYPE to 24
Index: prog/detect/sensors-detect
=================================--- prog/detect/sensors-detect (revision 5932)
+++ prog/detect/sensors-detect (working copy)
@@ -2128,6 +2128,10 @@
driver => "k10temp",
detect => \&fam11h_pci_detect,
}, {
+ name => "AMD Family 12h and 14h thermal sensors",
+ driver => "k10temp",
+ detect => \&fam12h_14h_pci_detect,
+ }, {
name => "Intel digital thermal sensor", driver => "coretemp",
detect => \&coretemp_detect,
@@ -6028,6 +6032,12 @@
return 9;
}

+sub fam12h_14h_pci_detect
+{
+ return unless exists $pci_list{'1022:1703'};
+ return 9;
+}
+
sub intel_amb_detect
{
if ((exists $pci_list{'8086:25f0'}) || # Intel 5000

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

#1 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of AMD

Hi Guenter,

Quoted 29 lines · Guenter Roeck

Index: CHANGES
=================================> --- CHANGES (revision 5932)
+++ CHANGES (working copy)

(quoted diff) +1 -0
@@ -27,6 +27,7 @@
                         EMC1072, EMC1073, EMC1074, EMC1402, and EMC1424
                   Fixed address ranges checked for SMSC EMC1403 and EMC1404.
                   Fix detection of SPD EEPROM on DDR3 memory modules
+                  Add detection of AMD family 12h and 14h thermal sensors
 
 3.2.0 (2010-10-10)
   libsensors: Increase MAX_SENSORS_PER_TYPE to 24

Index: prog/detect/sensors-detect
=================================> --- prog/detect/sensors-detect (revision 5932)
+++ prog/detect/sensors-detect (working copy)

(quoted diff) +4 -0
@@ -2128,6 +2128,10 @@
 		driver => "k10temp",
 		detect => \&fam11h_pci_detect,
 	}, {
+		name => "AMD Family 12h and 14h thermal sensors",
+		driver => "k10temp",
+		detect => \&fam12h_14h_pci_detect,
+	}, {
 		name => "Intel digital thermal sensor",
 		driver => "coretemp",
 		detect => \&coretemp_detect,
@@ -6028,6 +6032,12 @@
 	return 9;
 }

Review line 6043

Quoted 10 lines
(quoted diff) +6 -0
 
+sub fam12h_14h_pci_detect
+{
+	return unless exists $pci_list{'1022:1703'};
+	return 9;
+}
+
 sub intel_amb_detect
 {
 	if ((exists $pci_list{'8086:25f0'}) ||	# Intel 5000

The code looks good and the ID is in line with Clemens' patch. Please commit and update wiki/Devices accordingly [1].

That being said, I'm a little curious about a couple things. Why PCI_DEVICE_ID_AMD_CNB17H_F3 and PCI device ID 0x1703 if the supported CPUs are family 12h and 14h (and not 17h)?

What about PCI_DEVICE_ID_AMD_15H_NB_MISC (PCI device ID 0x1603)? No thermal sensors here?

How comes that PCI_DEVICE_ID_AMD_15H_NB_MISC is listed in arch/x86/kernel/amd_nb.c but PCI_DEVICE_ID_AMD_CNB17H_F3 is not? I suspect a couple more patches will be needed in the future to get it all to work.

[1] FYI, I have applied Clemens' patch to "my" standalone k10temp driver.

Signature · 6 lines
Jean Delvare

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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of AMD

In reply to Guenter Roeck
Quoted 4 lines · Jean Delvare

[...]
That being said, I'm a little curious about a couple things. Why PCI_DEVICE_ID_AMD_CNB17H_F3 and PCI device ID 0x1703 if the supported CPUs are family 12h and 14h (and not 17h)?

This is what AMD calls it: <http://git.kernel.org/linus/ca86828ccd31>.

There is no fixed relation between PCI IDs and family numbers. I'd guess this symbol is named differently because there is no single family; "CNB" probably stands for "common northbridge".

Quoted 2 lines

What about PCI_DEVICE_ID_AMD_15H_NB_MISC (PCI device ID 0x1603)? No thermal sensors here?

If I had to guess, I'd assume that it uses the same sensor. However, AMD hasn't yet published documentation for the Bulldozer family.

Quoted 2 lines

How comes that PCI_DEVICE_ID_AMD_15H_NB_MISC is listed in arch/x86/kernel/amd_nb.c but PCI_DEVICE_ID_AMD_CNB17H_F3 is not?

The file name seems to be misleading; that code actually manages only the L3 cache and the GART, and family 12h/14h CPUs have neither.

Regards,
Clemens

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

#3 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of AMD

In reply to Guenter Roeck
Quoted 46 lines · Jean Delvare

Hi Guenter,

Quoted 29 lines · Guenter Roeck

Index: CHANGES
=================================> > --- CHANGES (revision 5932)
+++ CHANGES (working copy)

(quoted diff) +1 -0
@@ -27,6 +27,7 @@
                         EMC1072, EMC1073, EMC1074, EMC1402, and EMC1424
                   Fixed address ranges checked for SMSC EMC1403 and EMC1404.
                   Fix detection of SPD EEPROM on DDR3 memory modules
+                  Add detection of AMD family 12h and 14h thermal sensors
 
 3.2.0 (2010-10-10)
   libsensors: Increase MAX_SENSORS_PER_TYPE to 24

Index: prog/detect/sensors-detect
=================================> > --- prog/detect/sensors-detect (revision 5932)
+++ prog/detect/sensors-detect (working copy)

(quoted diff) +4 -0
@@ -2128,6 +2128,10 @@
 		driver => "k10temp",
 		detect => \&fam11h_pci_detect,
 	}, {
+		name => "AMD Family 12h and 14h thermal sensors",
+		driver => "k10temp",
+		detect => \&fam12h_14h_pci_detect,
+	}, {
 		name => "Intel digital thermal sensor",
 		driver => "coretemp",
 		detect => \&coretemp_detect,
@@ -6028,6 +6032,12 @@
 	return 9;
 }

Review line 6043

Quoted 10 lines
(quoted diff) +6 -0
 
+sub fam12h_14h_pci_detect
+{
+	return unless exists $pci_list{'1022:1703'};
+	return 9;
+}
+
 sub intel_amb_detect
 {
 	if ((exists $pci_list{'8086:25f0'}) ||	# Intel 5000

The code looks good and the ID is in line with Clemens' patch. Please commit and update wiki/Devices accordingly [1].

Quoted 4 lines

That being said, I'm a little curious about a couple things. Why PCI_DEVICE_ID_AMD_CNB17H_F3 and PCI device ID 0x1703 if the supported CPUs are family 12h and 14h (and not 17h)?

I don't know. I wondered about it too, so I looked up the device ID
(http://pci-ids.ucw.cz/read/PC/1022) and confirmed that it applies to family 12h/14h. Per commit log this is the Northbridge on the respective CPUs.

0x1603 is for AMD CPU family 15h, as the define indicates. I have no idea about its capabilities, nor how to find out.

Guenter

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

#4 lore raw

PATCH 1/1 sensors-detect: Add detection of MAX6642

In reply to Guenter Roeck

This patch adds detection of MAX6642 to sensors-detect.

---

detect/sensors-detect (working copy) renamed from detect/sensors-detect (revision 5975) +3 -0
@@ -848,6 +848,11 @@
                i2c_addrs => [0x2c, 0x2e, 0x2f],
                i2c_detect => sub { max6639_detect(@_); },
        }, {
+               name => "Maxim MAX6642",
+               driver => "max6642",
+               i2c_addrs => [0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e,

0x4f],
+ i2c_detect => sub { max6642_detect(@_); },

+       }, {
                name => "Maxim MAX6655/MAX6656",
                driver => "max6655",
                i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
@@ -5779,6 +5784,36 @@
        return 6;

}

+# Chip to detect: MAX6642
+# Registers used:

+#   0x02: Status register
+#   0x03: Configuration register
+#   0xfe: Manufacturer ID
+#   0x04,0x06,0xff: No registers

+# We use the 0x04,0x06 and 0xff addresses (unused) to improve the reliability.
+# These are not real registers and will always return the last returned value.
+# This isn't documented.
+sub max6642_detect
+{
+ my ($file, $addr) = @_;
+ my ($man_id, $conf, $status);
+

+       $man_id = i2c_smbus_read_byte_data($file, 0xfe, NO_CACHE);
+       return if i2c_smbus_read_byte_data($file, 0x04, NO_CACHE) !$man_id;
+       $status = i2c_smbus_read_byte_data($file, 0x02, NO_CACHE);
+       return if i2c_smbus_read_byte_data($file, 0x06, NO_CACHE) !$status;
+       $conf = i2c_smbus_read_byte_data($file, 0x03, NO_CACHE);
+       return if i2c_smbus_read_byte_data($file, 0xff, NO_CACHE) != $conf;
+
+       return unless $man_id = 0x4d;  # Maxim
+       # Bit 5, 3, 1 and 0 should be zero
+       return unless ($status & 0x2b) = 0x00;
+       # The 4 lower bits should be zero
+       return unless ($conf & 0x0f) = 0x00;

+
+ return 6;
+}
+
sub max6655_detect

 {
        my ($file, $addr) = @_;

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

#5 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of MAX6642

In reply to Guenter Roeck

Hi Per,

Quoted 34 lines · Per Dalén

This patch adds detection of MAX6642 to sensors-detect.

---

detect/sensors-detect (working copy) renamed from detect/sensors-detect (revision 5975) +5 -0
@@ -848,6 +848,11 @@
                i2c_addrs => [0x2c, 0x2e, 0x2f],
                i2c_detect => sub { max6639_detect(@_); },
        }, {
+               name => "Maxim MAX6642",
+               driver => "max6642",
+               i2c_addrs => [0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e,
 0x4f],
+               i2c_detect => sub { max6642_detect(@_); },
+       }, {
                name => "Maxim MAX6655/MAX6656",
                driver => "max6655",
                i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
detect/sensors-detect (working copy) renamed from detect/sensors-detect (revision 5975) +7 -0
@@ -5779,6 +5784,36 @@
        return 6;
 }
 
+# Chip to detect: MAX6642
+# Registers used:
+#   0x02: Status register
+#   0x03: Configuration register
+#   0xfe: Manufacturer ID
+#   0x04,0x06,0xff: No registers
+# We use the 0x04,0x06 and 0xff addresses (unused) to improve the

reliability.
+# These are not real registers and will always return the last returned value.

detect/sensors-detect (working copy)

Quoted 7 lines
detect/sensors-detect (working copy) renamed from detect/sensors-detect (revision 5975) +7 -0
+# This isn't documented.
+sub max6642_detect
+{
+       my ($file, $addr) = @_;
+       my ($man_id, $conf, $status);
+
+       $man_id = i2c_smbus_read_byte_data($file, 0xfe, NO_CACHE);

You might want to more the check for $man_id = 0x4d to here, to avoid reading the other registers if you don't have to.

Quoted 1 line

+ return if i2c_smbus_read_byte_data($file, 0x04, NO_CACHE) !> $man_id;

I think it would be better to read the other non-existing registers here, because if those are real registers they are more unlikely to return 0x4d than to return the same value as the status and configuration registers.

Something like

	$man_id = i2c_smbus_read_byte_data($file, 0xfe, NO_CACHE);
	return unless $man_id = 0x4d;  # Maxim
	return if i2c_smbus_read_byte_data($file, 0xff, NO_CACHE) != $man_id;
	return if i2c_smbus_read_byte_data($file, 0x04, NO_CACHE) != $man_id;
	return if i2c_smbus_read_byte_data($file, 0x06, NO_CACHE) != $man_id;

	...

Thanks,
Guenter

Quoted 7 lines
detect/sensors-detect (working copy) renamed from detect/sensors-detect (revision 5975) +7 -0
+       $status = i2c_smbus_read_byte_data($file, 0x02, NO_CACHE);
+       return if i2c_smbus_read_byte_data($file, 0x06, NO_CACHE) !> $status;
+       $conf = i2c_smbus_read_byte_data($file, 0x03, NO_CACHE);
+       return if i2c_smbus_read_byte_data($file, 0xff, NO_CACHE) != $conf;
+
+       return unless $man_id = 0x4d;  # Maxim
+       # Bit 5, 3, 1 and 0 should be zero

detect/sensors-detect (working copy)

Quoted 10 lines
detect/sensors-detect (working copy) renamed from detect/sensors-detect (revision 5975) +7 -0
+       return unless ($status & 0x2b) = 0x00;
+       # The 4 lower bits should be zero
+       return unless ($conf & 0x0f) = 0x00;
+
+       return 6;
+}
+
 sub max6655_detect
 {
        my ($file, $addr) = @_;

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

#6 lore raw

PATCH 1/1 sensors-detect: Add detection of G781 and G781-1

In reply to Guenter Roeck

---
untested

 CHANGES                    |    1 +
 prog/detect/sensors-detect |   15 ++++++++++++++-
 2 files changed, 15 insertions(+), 1 deletions(-)
CHANGES +1 -0
index c776e84..f5fdb57 100644
@@ -15,6 +15,7 @@ SVN HEAD
                   Fix loading of the cpuid module
                   Make LM73 detection less problematic
                   Add detection of National Semiconductor LM96163
+                  Add detection of G781 and G781-1
 
 3.3.1 (2011-07-21)
   isadump: Add support for word (16-bit) and long (32-bit) reads
prog/detect/sensors-detect +14 -1
index 31a4619..e0db4a8 100755
@@ -818,6 +818,11 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
 		i2c_detect => sub { adm1021_detect(@_, 1); },
 	}, {
+		name => "Global Mixed-mode Technology G781/G781-1",
+		driver => "lm90",
+		i2c_addrs => [0x4c, 0x4d],
+		i2c_detect => sub { lm90_detect(@_, 15); },
+	}, {
 		name => "Maxim MAX1617",
 		driver => "adm1021",
 		i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
@@ -4364,7 +4369,8 @@ sub max6680_95_detect
 #		  6 = MAX6646/MAX6647/MAX6648/MAX6649/MAX6692,
 #		  8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
 #		  11 = W83L771AWG/ASG, 12 = MAX6690,
-#		  13 = ADT7461A/NCT1008, 14 = SA56004
+#		  13 = ADT7461A/NCT1008, 14 = SA56004,
+#		  15 = GMT G781/G781-1
 # Registers used:
 #   0x03: Configuration
 #   0x04: Conversion rate
@@ -4476,6 +4482,13 @@ sub lm90_detect
 		return if $mid != 0xa1;		# NXP Semiconductor/Philips
 		return 6 if $cid = 0x00;	# SA56004
 	}
+	if ($chip = 15) {
+		return if ($conf & 0x3f) != 0;
+		return if $rate > 0x08;
+		return if $mid != 0x47;		# GMT
+		return 8 if ($addr = 0x4c && $cid = 0x01);	# G781
+		return 8 if ($addr = 0x4d && $cid = 0x03);	# G781-1
+	}
 	return;
 }
 
Signature · 7 lines
1.7.5.4


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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of G781 and G781-1

In reply to Guenter Roeck

Hi Guenter,

Quoted 25 lines · Guenter Roeck

---
untested

 CHANGES                    |    1 +
 prog/detect/sensors-detect |   15 ++++++++++++++-
 2 files changed, 15 insertions(+), 1 deletions(-)
CHANGES +1 -0
index c776e84..f5fdb57 100644
@@ -15,6 +15,7 @@ SVN HEAD
                   Fix loading of the cpuid module
                   Make LM73 detection less problematic
                   Add detection of National Semiconductor LM96163
+                  Add detection of G781 and G781-1
 
 3.3.1 (2011-07-21)
   isadump: Add support for word (16-bit) and long (32-bit) reads
prog/detect/sensors-detect +0 -0
index 31a4619..e0db4a8 100755

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

Quoted 4 lines
prog/detect/sensors-detect +1 -0
@@ -818,6 +818,11 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
 		i2c_detect => sub { adm1021_detect(@_, 1); },
 	}, {
+		name => "Global Mixed-mode Technology G781/G781-1",

The -1 suffix is essentially a top marking variation, we usually don't document these in sensors-detect (at least we didn't for the LM89-1, LM99-1, ADM1021-1, etc.)

Quoted 8 lines
prog/detect/sensors-detect +4 -0
+		driver => "lm90",
+		i2c_addrs => [0x4c, 0x4d],
+		i2c_detect => sub { lm90_detect(@_, 15); },
+	}, {
 		name => "Maxim MAX1617",
 		driver => "adm1021",
 		i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],

prog/detect/sensors-detect sub max6680_95_detect · line 4373

Quoted 6 lines
prog/detect/sensors-detect +2 -1
@@ -4364,7 +4369,8 @@ sub max6680_95_detect
 #		  6 = MAX6646/MAX6647/MAX6648/MAX6649/MAX6692,
 #		  8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
 #		  11 = W83L771AWG/ASG, 12 = MAX6690,
-#		  13 = ADT7461A/NCT1008, 14 = SA56004
+#		  13 = ADT7461A/NCT1008, 14 = SA56004,
+#		  15 = GMT G781/G781-1

FWIW we don't mention the vendor name for other chips.

Quoted 4 lines
prog/detect/sensors-detect +0 -0
 # Registers used:
 #   0x03: Configuration
 #   0x04: Conversion rate

prog/detect/sensors-detect sub lm90_detect · line 4491

Quoted 10 lines
prog/detect/sensors-detect +7 -0
@@ -4476,6 +4482,13 @@ sub lm90_detect
 		return if $mid != 0xa1;		# NXP Semiconductor/Philips
 		return 6 if $cid = 0x00;	# SA56004
 	}
+	if ($chip = 15) {
+		return if ($conf & 0x3f) != 0;
+		return if $rate > 0x08;
+		return if $mid != 0x47;		# GMT
+		return 8 if ($addr = 0x4c && $cid = 0x01);	# G781
+		return 8 if ($addr = 0x4d && $cid = 0x03);	# G781-1
+	}

From Mike's dumps it turns out that both variants have device ID 0x01.

Quoted 3 lines
prog/detect/sensors-detect +0 -0
 	return;
 }
 
Signature · 6 lines
Jean Delvare

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

PATCH 1/1 sensors-detect: Add detection of G781

In reply to Guenter Roeck

---
v2:
- Drop reference to G781-1; we don't usually mention chip variants
- Accept device ID 0x01 on address 0x4c as well as 0x4d
- Do not accept device ID 0x03, as its existence is not confirmed

 CHANGES                    |    1 +
 prog/detect/sensors-detect |   14 +++++++++++++-
 2 files changed, 14 insertions(+), 1 deletions(-)
CHANGES +1 -0
index c776e84..c41f489 100644
@@ -15,6 +15,7 @@ SVN HEAD
                   Fix loading of the cpuid module
                   Make LM73 detection less problematic
                   Add detection of National Semiconductor LM96163
+                  Add detection of GMT G781
 
 3.3.1 (2011-07-21)
   isadump: Add support for word (16-bit) and long (32-bit) reads
prog/detect/sensors-detect +13 -1
index 31a4619..60192b4 100755
@@ -818,6 +818,11 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
 		i2c_detect => sub { adm1021_detect(@_, 1); },
 	}, {
+		name => "Global Mixed-mode Technology G781",
+		driver => "lm90",
+		i2c_addrs => [0x4c, 0x4d],
+		i2c_detect => sub { lm90_detect(@_, 15); },
+	}, {
 		name => "Maxim MAX1617",
 		driver => "adm1021",
 		i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
@@ -4364,7 +4369,8 @@ sub max6680_95_detect
 #		  6 = MAX6646/MAX6647/MAX6648/MAX6649/MAX6692,
 #		  8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
 #		  11 = W83L771AWG/ASG, 12 = MAX6690,
-#		  13 = ADT7461A/NCT1008, 14 = SA56004
+#		  13 = ADT7461A/NCT1008, 14 = SA56004,
+#		  15 = G781
 # Registers used:
 #   0x03: Configuration
 #   0x04: Conversion rate
@@ -4476,6 +4482,12 @@ sub lm90_detect
 		return if $mid != 0xa1;		# NXP Semiconductor/Philips
 		return 6 if $cid = 0x00;	# SA56004
 	}
+	if ($chip = 15) {
+		return if ($conf & 0x3f) != 0;
+		return if $rate > 0x08;
+		return if $mid != 0x47;		# GMT
+		return 8 if $cid = 0x01;	# G781
+	}
 	return;
 }
 
Signature · 7 lines
1.7.5.4


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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of G781

In reply to Guenter Roeck
Quoted 53 lines · Guenter Roeck

---
v2:
- Drop reference to G781-1; we don't usually mention chip variants
- Accept device ID 0x01 on address 0x4c as well as 0x4d
- Do not accept device ID 0x03, as its existence is not confirmed

 CHANGES                    |    1 +
 prog/detect/sensors-detect |   14 +++++++++++++-
 2 files changed, 14 insertions(+), 1 deletions(-)
CHANGES +1 -0
index c776e84..c41f489 100644
@@ -15,6 +15,7 @@ SVN HEAD
                   Fix loading of the cpuid module
                   Make LM73 detection less problematic
                   Add detection of National Semiconductor LM96163
+                  Add detection of GMT G781
 
 3.3.1 (2011-07-21)
   isadump: Add support for word (16-bit) and long (32-bit) reads
prog/detect/sensors-detect +7 -1
index 31a4619..60192b4 100755
@@ -818,6 +818,11 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
 		i2c_detect => sub { adm1021_detect(@_, 1); },
 	}, {
+		name => "Global Mixed-mode Technology G781",
+		driver => "lm90",
+		i2c_addrs => [0x4c, 0x4d],
+		i2c_detect => sub { lm90_detect(@_, 15); },
+	}, {
 		name => "Maxim MAX1617",
 		driver => "adm1021",
 		i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e],
@@ -4364,7 +4369,8 @@ sub max6680_95_detect
 #		  6 = MAX6646/MAX6647/MAX6648/MAX6649/MAX6692,
 #		  8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
 #		  11 = W83L771AWG/ASG, 12 = MAX6690,
-#		  13 = ADT7461A/NCT1008, 14 = SA56004
+#		  13 = ADT7461A/NCT1008, 14 = SA56004,
+#		  15 = G781
 # Registers used:
 #   0x03: Configuration
 #   0x04: Conversion rate
@@ -4476,6 +4482,12 @@ sub lm90_detect
 		return if $mid != 0xa1;		# NXP Semiconductor/Philips
 		return 6 if $cid = 0x00;	# SA56004

prog/detect/sensors-detect sub lm90_detect · line 4493

Quoted 10 lines
prog/detect/sensors-detect +6 -0
 	}
+	if ($chip = 15) {
+		return if ($conf & 0x3f) != 0;
+		return if $rate > 0x08;
+		return if $mid != 0x47;		# GMT
+		return 8 if $cid = 0x01;	# G781
+	}
 	return;
 }
 

Looks very good now, please commit.

Signature · 6 lines
Jean Delvare

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

PATCH 1/1 sensors-detect: Add detection of LM96080

In reply to Guenter Roeck

Add detection of the National Semiconductor (now Texas Instruments) LM96080. It is functionally compatible with the LM80 but detection is completely different.
---
Frans, if you want to test this, a pre-patched version of sensors-detect is available at:
http://khali.linux-fr.org/devel/misc/sensors-detect

 prog/detect/sensors-detect |   76 ++++++++++++++++++++++++++------------------
 1 file changed, 46 insertions(+), 30 deletions(-)
prog/detect/sensors-detect +46 -30
@@ -540,7 +540,12 @@ use vars qw(@i2c_adapter_names);
 		name => "National Semiconductor LM80",
 		driver => "lm80",
 		i2c_addrs => [0x28..0x2f],
-		i2c_detect => sub { lm80_detect(@_); },
+		i2c_detect => sub { lm80_detect(@_, 0); },
+	}, {
+		name => "National Semiconductor LM96080",
+		driver => "lm80",
+		i2c_addrs => [0x28..0x2f],
+		i2c_detect => sub { lm80_detect(@_, 1); },
 	}, {
 		name => "National Semiconductor LM85",
 		driver => "lm85",
@@ -4259,11 +4264,15 @@ sub ds1621_detect
 	return ($slope = 0x10 && $counter <= $slope) ? 3 : 2;
 }
 
+# Chip to detect: 0 = LM80, 1 = LM96080
 # Registers used:
 #   0x00: Configuration register
 #   0x02: Interrupt state register
-#   0x2a-0x3d: Limits registers
-# This one is easily misdetected since it doesn't provide identification
+#   0x07: Converstion rate register (LM96080 only)
+#   0x2a-0x3d: Limits registers (LM80 only)
+#   0x3e: Manufacturer's ID register (LM96080 only)
+#   0x3f: Steppind/die revision ID register (LM96080 only)
+# The LM80 is easily misdetected since it doesn't provide identification
 # registers. So we have to use some tricks:
 #   - 6-bit addressing, so limits readings modulo 0x40 should be unchanged
 #   - positive temperature limits
@@ -4276,44 +4285,51 @@ sub ds1621_detect
 # to loose comparisons did not change the score.
 sub lm80_detect
 {
-	my ($file, $addr) = @_;
+	my ($file, $addr, $chip) = @_;
 	my ($i, $reg);
 
 	return if (i2c_smbus_read_byte_data($file, 0x00) & 0x80) != 0;
 	return if (i2c_smbus_read_byte_data($file, 0x02) & 0xc0) != 0;
 
-	for ($i = 0x2a; $i <= 0x3d; $i++) {
-		$reg = i2c_smbus_read_byte_data($file, $i);
-		return if i2c_smbus_read_byte_data($file, $i+0x40) != $reg;
-		return if i2c_smbus_read_byte_data($file, $i+0x80) != $reg;
-		return if i2c_smbus_read_byte_data($file, $i+0xc0) != $reg;
-	}
+	if ($chip = 0) {
+		for ($i = 0x2a; $i <= 0x3d; $i++) {
+			$reg = i2c_smbus_read_byte_data($file, $i);
+			return if i2c_smbus_read_byte_data($file, $i+0x40) != $reg;
+			return if i2c_smbus_read_byte_data($file, $i+0x80) != $reg;
+			return if i2c_smbus_read_byte_data($file, $i+0xc0) != $reg;
+		}
 
-	# Refine a bit by checking whether limits are in the correct order
-	# (min<max for voltages, hyst<max for temperature). Since it is still
-	# possible that the chip is an LM80 with limits not properly set,
-	# a few "errors" are tolerated.
-	my $confidence = 0;
-	for ($i = 0x2a; $i <= 0x3a; $i++) {
+		# Refine a bit by checking whether limits are in the correct order
+		# (min<max for voltages, hyst<max for temperature). Since it is still
+		# possible that the chip is an LM80 with limits not properly set,
+		# a few "errors" are tolerated.
+		my $confidence = 0;
+		for ($i = 0x2a; $i <= 0x3a; $i++) {
+			$confidence++
+				if i2c_smbus_read_byte_data($file, $i) < i2c_smbus_read_byte_data($file, $i+1);
+		}
+		# hot temp<OS temp
 		$confidence++
-			if i2c_smbus_read_byte_data($file, $i) < i2c_smbus_read_byte_data($file, $i+1);
-	}
-	# hot temp<OS temp
-	$confidence++
-		if i2c_smbus_read_byte_data($file, 0x38) < i2c_smbus_read_byte_data($file, 0x3a);
+			if i2c_smbus_read_byte_data($file, 0x38) < i2c_smbus_read_byte_data($file, 0x3a);
 
-	# Negative temperature limits are unlikely.
-	for ($i = 0x3a; $i <= 0x3d; $i++) {
-		$confidence++ if (i2c_smbus_read_byte_data($file, $i) & 0x80) = 0;
-	}
+		# Negative temperature limits are unlikely.
+		for ($i = 0x3a; $i <= 0x3d; $i++) {
+			$confidence++ if (i2c_smbus_read_byte_data($file, $i) & 0x80) = 0;
+		}
 
-	# $confidence is between 0 and 14
-	$confidence = ($confidence >> 1) - 4;
-	# $confidence is now between -4 and 3
+		# $confidence is between 0 and 14
+		$confidence = ($confidence >> 1) - 4;
+		# $confidence is now between -4 and 3
 
-	return unless $confidence > 0;
+		return unless $confidence > 0;
+		return $confidence;
+	} elsif ($chip = 1) {
+		return if (i2c_smbus_read_byte_data($file, 0x07) & 0xfe) != 0;
+		return if i2c_smbus_read_byte_data($file, 0x3e) != 0x01;
+		return if i2c_smbus_read_byte_data($file, 0x3f) != 0x08;
 
-	return $confidence;
+		return 6;
+	}
 }
 
 # Registers used:
Signature · 6 lines
Jean Delvare

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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of LM96080

In reply to Guenter Roeck
Quoted 8 lines · Jean Delvare

Add detection of the National Semiconductor (now Texas Instruments) LM96080. It is functionally compatible with the LM80 but detection is completely different.
---
Frans, if you want to test this, a pre-patched version of sensors-detect is available at:
http://khali.linux-fr.org/devel/misc/sensors-detect

Looks good. Should we do the same for drivers/hwmon/lm80.c ?

Thanks,
Guenter

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

#12 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of LM96080

In reply to Guenter Roeck
Quoted 10 lines · Guenter Roeck
Quoted 7 lines · Jean Delvare

Add detection of the National Semiconductor (now Texas Instruments) LM96080. It is functionally compatible with the LM80 but detection is completely different.
---
Frans, if you want to test this, a pre-patched version of sensors-detect is available at:
http://khali.linux-fr.org/devel/misc/sensors-detect

Looks good. Should we do the same for drivers/hwmon/lm80.c ?

I think so, yes. The LM96080 is different enough to have its own chip name IMHO. The detection in the driver worked for Frans by chance because the limit registers are all set to 0, but in the general case it would fail.

Signature · 6 lines
Jean Delvare

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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of LM96080

In reply to Guenter Roeck

2012/1/28 Jean Delvare <[email protected]>

Quoted 9 lines

Add detection of the National Semiconductor (now Texas Instruments) LM96080. It is functionally compatible with the LM80 but detection is completely different.
---
Frans, if you want to test this, a pre-patched version of sensors-detect is available at:
http://khali.linux-fr.org/devel/misc/sensors-detect

I'll try to give it a try early next week (at work where the hardware is).

Might be it ends up being forgotten as I'm quite busy closing all odds and ends for the product that has this sensor.
If so, feel free to remind me.

Frans

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

#14 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of LM96080

In reply to Guenter Roeck
Quoted 10 lines · Jean Delvare
Quoted 9 lines · Guenter Roeck
Quoted 7 lines · Jean Delvare

Add detection of the National Semiconductor (now Texas Instruments) LM96080. It is functionally compatible with the LM80 but detection is completely different.
---
Frans, if you want to test this, a pre-patched version of sensors-detect is available at:
http://khali.linux-fr.org/devel/misc/sensors-detect

Quoted 7 lines
Quoted 1 line

Looks good. Should we do the same for drivers/hwmon/lm80.c ?

I think so, yes. The LM96080 is different enough to have its own chip name IMHO. The detection in the driver worked for Frans by chance because the limit registers are all set to 0, but in the general case it would fail.

You or me or Frans ? Any takers ?

Thanks,
Guenter

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

#15 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of LM96080

In reply to Guenter Roeck
Quoted 37 lines · Frans Meulenbroeks

2012/1/30 Guenter Roeck <[email protected]>
On Sat, 2012-01-28 at 15:04 -0500, Jean Delvare wrote:
> On Sat, 28 Jan 2012 11:23:53 -0800, Guenter Roeck wrote:
> > On Sat, Jan 28, 2012 at 01:37:56PM -0500, Jean Delvare wrote:
> > > Add detection of the National Semiconductor (now Texas Instruments)
> > > LM96080. It is functionally compatible with the LM80 but detection is
> > > completely different.
> > > ---
> > > Frans, if you want to test this, a pre-patched version of
> > > sensors-detect is available at:
> > > http://khali.linux-fr.org/devel/misc/sensors-detect
> >
> > Looks good. Should we do the same for drivers/hwmon/lm80.c ?
>
> I think so, yes. The LM96080 is different enough to have its own chip
> name IMHO. The detection in the driver worked for Frans by chance
> because the limit registers are all set to 0, but in the general case
> it would fail.
>

You or me or Frans ? Any takers ?

I can test the sensors-detect (actually remembered it when it was about time to go home).
Wrt the lm80.c changes: not too sure what to do here (and actually I'm somewhat time-constrained at the moment)

Quoted 8 lines

Best regards, Frans.

PS: I probably need a prog to detect a single i2c chip and give a return code 1 if the chip is detected and 0 otherwise. Afaik something like this does not exist. Right?
If not the idea is to make a small prog i2ctest bus chip (probably inspired by i2cdetect) that does what I need.
Does this sound like a good plan?

Not that complicated. All we need to do is to add the detection code to lm80.c, into its _detect function. No problem, I can do that unless Jean has some spare time. Since Linus did not accept the changes into 3.3, we'll have some time anyway until the 3.4 commit window opens.

Thanks,
Guenter

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

#16 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of LM96080

In reply to Guenter Roeck
Quoted 11 lines · Guenter Roeck
Quoted 10 lines · Jean Delvare
Quoted 9 lines · Guenter Roeck
Quoted 7 lines · Jean Delvare

Add detection of the National Semiconductor (now Texas Instruments) LM96080. It is functionally compatible with the LM80 but detection is completely different.
---
Frans, if you want to test this, a pre-patched version of sensors-detect is available at:
http://khali.linux-fr.org/devel/misc/sensors-detect

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Looks good. Should we do the same for drivers/hwmon/lm80.c ?

I think so, yes. The LM96080 is different enough to have its own chip name IMHO. The detection in the driver worked for Frans by chance because the limit registers are all set to 0, but in the general case it would fail.

You or me or Frans ? Any takers ?

I'll do it, no problem. It's only a matter of getting to it, as I had a busy day.

Signature · 6 lines
Jean Delvare

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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of LM96080

In reply to Guenter Roeck
Quoted 19 lines · Jean Delvare
Quoted 18 lines · Guenter Roeck
Quoted 16 lines · Jean Delvare
Quoted 10 lines · Guenter Roeck
Quoted 7 lines · Jean Delvare

Add detection of the National Semiconductor (now Texas Instruments) LM96080. It is functionally compatible with the LM80 but detection is completely different.
---
Frans, if you want to test this, a pre-patched version of sensors-detect is available at:
http://khali.linux-fr.org/devel/misc/sensors-detect

Looks good. Should we do the same for drivers/hwmon/lm80.c ?

I think so, yes. The LM96080 is different enough to have its own chip name IMHO. The detection in the driver worked for Frans by chance because the limit registers are all set to 0, but in the general case it would fail.

Quoted 5 lines
Quoted 1 line

You or me or Frans ? Any takers ?

I'll do it, no problem. It's only a matter of getting to it, as I had a busy day.

Sounds good...

Thanks,
Guenter

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

#18 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of LM96080

In reply to Guenter Roeck

2012/1/28 Jean Delvare <[email protected]>

Quoted 8 lines

Add detection of the National Semiconductor (now Texas Instruments) LM96080. It is functionally compatible with the LM80 but detection is completely different.
---
Frans, if you want to test this, a pre-patched version of sensors-detect is available at:
http://khali.linux-fr.org/devel/misc/sensors-detect

Jean, all,

I wanted to give this a stab but then noticed this was a perl script, and the board on which the LM96080 lives is a small embedded system that does not have perl, so unfortunately I cannot test it.

Sorry! Frans

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

#19 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of LM96080

In reply to Guenter Roeck
Quoted 11 lines · Frans Meulenbroeks

2012/1/28 Jean Delvare <[email protected]>

Quoted 8 lines

Add detection of the National Semiconductor (now Texas Instruments) LM96080. It is functionally compatible with the LM80 but detection is completely different.
---
Frans, if you want to test this, a pre-patched version of sensors-detect is available at:
http://khali.linux-fr.org/devel/misc/sensors-detect

Quoted 7 lines

Jean, all,

I wanted to give this a stab but then noticed this was a perl script, and the board on which the LM96080 lives is a small embedded system that does not have perl, so unfortunately I cannot test it.

Sorry! Frans

No problem. I've tested on the dump you sent to me, and it works OK, so let's just claim this is good enough.

Signature · 6 lines
Jean Delvare

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

PATCH 1/1 sensors-detect: Add detection of ITE IT8510E, IT8511E, IT8513E, and IT8518E

In reply to Guenter Roeck

---
Trying again, this time more in line with detection of other IT85xx chips. IT8510 and IT8512 datasheets suggest that there is no special sequence to enable superio acccess, so let's just assume that this applies to all chips from the same series.

 CHANGES                    |    1 +
 prog/detect/sensors-detect |   20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)
CHANGES +1 -0
index 10e62f5..8981e69 100644
@@ -21,6 +21,7 @@ SVN HEAD
                   Add detection of National Semiconductor LM96080
                   Add detection of ITE IT8771E
                   Add detection of ITE IT8781F, IT8782F and IT8783F
+                  Add detection of ITE IT8510E/TE/G, IT8511E/TE/G, IT8513E/F/G, and IT8518E
 
 3.3.1 (2011-07-21)
   isadump: Add support for word (16-bit) and long (32-bit) reads
prog/detect/sensors-detect +20 -0
index bffd5c3..93621ad 100755
@@ -1595,15 +1595,35 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x14,
 		features => FEAT_IN | FEAT_TEMP,
 	}, {
+		name => "ITE IT8510E/TE/G Super IO",
+		driver => "to-be-written",
+		devid => 0x8510,
+		features => FEAT_IN | FEAT_FAN,
+	}, {
+		name => "ITE IT8511E/TE/G Super IO",
+		driver => "to-be-written",
+		devid => 0x8511,
+		features => FEAT_IN | FEAT_FAN,
+	}, {
 		name => "ITE IT8512E/F/G Super IO",
 		driver => "to-be-written",
 		devid => 0x8512,
 		features => FEAT_IN | FEAT_FAN,
 	}, {
+		name => "ITE IT8513E/F/G Super IO",
+		driver => "to-be-written",
+		devid => 0x8513,
+		features => FEAT_IN | FEAT_FAN,
+	}, {
 		name => "ITE IT8516E/F/G Super IO",
 		driver => "to-be-written",
 		devid => 0x8516,
 		features => FEAT_IN | FEAT_FAN,
+	}, {
+		name => "ITE IT8518E Super IO",
+		driver => "to-be-written",
+		devid => 0x8518,
+		features => FEAT_IN | FEAT_FAN,
 	}
 );
 
Signature · 7 lines
1.7.5.4


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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of ITE IT8510E, IT8511E, IT8513E, and IT8518E

In reply to Guenter Roeck
Quoted 53 lines · Guenter Roeck

---
Trying again, this time more in line with detection of other IT85xx chips. IT8510 and IT8512 datasheets suggest that there is no special sequence to enable superio acccess, so let's just assume that this applies to all chips from the same series.

 CHANGES                    |    1 +
 prog/detect/sensors-detect |   20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)
CHANGES +1 -0
index 10e62f5..8981e69 100644
@@ -21,6 +21,7 @@ SVN HEAD
                   Add detection of National Semiconductor LM96080
                   Add detection of ITE IT8771E
                   Add detection of ITE IT8781F, IT8782F and IT8783F
+                  Add detection of ITE IT8510E/TE/G, IT8511E/TE/G, IT8513E/F/G, and IT8518E
 
 3.3.1 (2011-07-21)
   isadump: Add support for word (16-bit) and long (32-bit) reads
prog/detect/sensors-detect +15 -0
index bffd5c3..93621ad 100755
@@ -1595,15 +1595,35 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x14,
 		features => FEAT_IN | FEAT_TEMP,
 	}, {
+		name => "ITE IT8510E/TE/G Super IO",
+		driver => "to-be-written",
+		devid => 0x8510,
+		features => FEAT_IN | FEAT_FAN,
+	}, {
+		name => "ITE IT8511E/TE/G Super IO",
+		driver => "to-be-written",
+		devid => 0x8511,
+		features => FEAT_IN | FEAT_FAN,
+	}, {
 		name => "ITE IT8512E/F/G Super IO",
 		driver => "to-be-written",
 		devid => 0x8512,
 		features => FEAT_IN | FEAT_FAN,
 	}, {
+		name => "ITE IT8513E/F/G Super IO",
+		driver => "to-be-written",
+		devid => 0x8513,
+		features => FEAT_IN | FEAT_FAN,
+	}, {
 		name => "ITE IT8516E/F/G Super IO",
 		driver => "to-be-written",

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

Quoted 10 lines
prog/detect/sensors-detect +5 -0
 		devid => 0x8516,
 		features => FEAT_IN | FEAT_FAN,
+	}, {
+		name => "ITE IT8518E Super IO",
+		driver => "to-be-written",
+		devid => 0x8518,
+		features => FEAT_IN | FEAT_FAN,
 	}
 );
 

No objection, just go ahead and commit.

Signature · 6 lines
Jean Delvare

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

PATCH 1/1 sensors-detect: Add detection of ST Mircoelectronics STTS2002 and STTS3000

In reply to Guenter Roeck

Add detection of ST Mircoelectronics STTS2002 and STTS3000.

---
 prog/detect/sensors-detect |   24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)
prog/detect/sensors-detect +23 -1
@@ -1350,6 +1350,16 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x18..0x1f],
 		i2c_detect => sub { jedec_JC42_4_detect(@_, 10); },
 	}, {
+		name => "ST STTS2002",
+		driver => "jc42",
+		i2c_addrs => [0x18..0x1f],
+		i2c_detect => sub { jedec_JC42_4_detect(@_, 11); },
+	}, {
+		name => "ST STTS3000",
+		driver => "jc42",
+		i2c_addrs => [0x18..0x1f],
+		i2c_detect => sub { jedec_JC42_4_detect(@_, 12); },
+	}, {
 		name => "NXP SE97/SE97B",
 		driver => "jc42",
 		i2c_addrs => [0x18..0x1f],
@@ -5965,7 +5975,7 @@ sub max6655_detect
 # Chip to detect: 0 = STTS424, 1 = SE97/SE97B, 2 = SE98, 3 = ADT7408,
 #                 4 = TS3000/TSE2002, 5 = MAX6604, 6 = MCP98242,
 #                 7 = MCP98243, 8 = MCP9843, 9 = CAT6095 / CAT34TS02,
-#                 10 = STTS424E
+#                 10 = STTS424E, 11 = STTS2002, 12 = STTS3000
 # Registers used:
 #   0x00: Capabilities
 #   0x01: Configuration
@@ -6022,6 +6032,12 @@ sub jedec_JC42_4_detect
 	} elsif ($chip = 10) {
 		return unless $manid = 0x10;		# STMicrolectronics
 		return unless $devid = 0x00;		# STTS424E02
+	} elsif ($chip = 11) {
+		return unless $manid = 0x10;		# STMicrolectronics
+		return unless $devid = 0x03;		# STTS2002
+	} elsif ($chip = 12) {
+		return unless $manid = 0x10;		# STMicrolectronics
+		return unless $devid = 0x02;		# STTS3000
 	}
 
 	# Now, do it all again with words. Note that we get
@@ -6067,6 +6083,12 @@ sub jedec_JC42_4_detect
 	} elsif ($chip = 10) {
 		return unless $manid = 0x4a10;		# STMicrolectronics
 		return unless ($devid & 0xfeff) = 0x0000; # STTS424E02
+	} elsif ($chip = 11) {
+		return unless $manid = 0x4a10;		# STMicrolectronics
+		return unless ($devid & 0xfeff) = 0x0003; # STTS2002
+	} elsif ($chip = 12) {
+		return unless $manid = 0x4a10;		# STMicrolectronics
+		return unless ($devid & 0xfeff) = 0x0002; # STTS3000
 	}
 
 	return 5;
Signature · 6 lines
Jean Delvare

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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of ST Mircoelectronics STTS2002 and STTS3000

In reply to Guenter Roeck
Quoted 48 lines · Jean Delvare

Add detection of ST Mircoelectronics STTS2002 and STTS3000.

---
 prog/detect/sensors-detect |   24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)
prog/detect/sensors-detect +17 -1
@@ -1350,6 +1350,16 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x18..0x1f],
 		i2c_detect => sub { jedec_JC42_4_detect(@_, 10); },
 	}, {
+		name => "ST STTS2002",
+		driver => "jc42",
+		i2c_addrs => [0x18..0x1f],
+		i2c_detect => sub { jedec_JC42_4_detect(@_, 11); },
+	}, {
+		name => "ST STTS3000",
+		driver => "jc42",
+		i2c_addrs => [0x18..0x1f],
+		i2c_detect => sub { jedec_JC42_4_detect(@_, 12); },
+	}, {
 		name => "NXP SE97/SE97B",
 		driver => "jc42",
 		i2c_addrs => [0x18..0x1f],
@@ -5965,7 +5975,7 @@ sub max6655_detect
 # Chip to detect: 0 = STTS424, 1 = SE97/SE97B, 2 = SE98, 3 = ADT7408,
 #                 4 = TS3000/TSE2002, 5 = MAX6604, 6 = MCP98242,
 #                 7 = MCP98243, 8 = MCP9843, 9 = CAT6095 / CAT34TS02,
-#                 10 = STTS424E
+#                 10 = STTS424E, 11 = STTS2002, 12 = STTS3000
 # Registers used:
 #   0x00: Capabilities
 #   0x01: Configuration
@@ -6022,6 +6032,12 @@ sub jedec_JC42_4_detect
 	} elsif ($chip = 10) {
 		return unless $manid = 0x10;		# STMicrolectronics
 		return unless $devid = 0x00;		# STTS424E02
+	} elsif ($chip = 11) {
+		return unless $manid = 0x10;		# STMicrolectronics
+		return unless $devid = 0x03;		# STTS2002
+	} elsif ($chip = 12) {
+		return unless $manid = 0x10;		# STMicrolectronics
+		return unless $devid = 0x02;		# STTS3000
 	}
 
 	# Now, do it all again with words. Note that we get

prog/detect/sensors-detect sub jedec_JC42_4_detect · line 6092

Quoted 10 lines
prog/detect/sensors-detect +6 -0
@@ -6067,6 +6083,12 @@ sub jedec_JC42_4_detect
 	} elsif ($chip = 10) {
 		return unless $manid = 0x4a10;		# STMicrolectronics
 		return unless ($devid & 0xfeff) = 0x0000; # STTS424E02
+	} elsif ($chip = 11) {
+		return unless $manid = 0x4a10;		# STMicrolectronics
+		return unless ($devid & 0xfeff) = 0x0003; # STTS2002
+	} elsif ($chip = 12) {
+		return unless $manid = 0x4a10;		# STMicrolectronics
+		return unless ($devid & 0xfeff) = 0x0002; # STTS3000
 	}

Hi Jean,

you are masking the chip IDs against 0xfeff. That made sense for STTS424E02, which has two variants. Any special reason for doing it for STTS2002 and STTS3000 as well ? If so, shouldn't we do the same for the jc42 driver (or, alternatively, not mask it here either for consistency) ?

Thanks,
Guenter

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

#24 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of ST Mircoelectronics STTS2002 and STTS3000

In reply to Guenter Roeck
Quoted 62 lines · Guenter Roeck
Quoted 48 lines · Jean Delvare

Add detection of ST Mircoelectronics STTS2002 and STTS3000.

---
 prog/detect/sensors-detect |   24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)
prog/detect/sensors-detect +17 -1
@@ -1350,6 +1350,16 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x18..0x1f],
 		i2c_detect => sub { jedec_JC42_4_detect(@_, 10); },
 	}, {
+		name => "ST STTS2002",
+		driver => "jc42",
+		i2c_addrs => [0x18..0x1f],
+		i2c_detect => sub { jedec_JC42_4_detect(@_, 11); },
+	}, {
+		name => "ST STTS3000",
+		driver => "jc42",
+		i2c_addrs => [0x18..0x1f],
+		i2c_detect => sub { jedec_JC42_4_detect(@_, 12); },
+	}, {
 		name => "NXP SE97/SE97B",
 		driver => "jc42",
 		i2c_addrs => [0x18..0x1f],
@@ -5965,7 +5975,7 @@ sub max6655_detect
 # Chip to detect: 0 = STTS424, 1 = SE97/SE97B, 2 = SE98, 3 = ADT7408,
 #                 4 = TS3000/TSE2002, 5 = MAX6604, 6 = MCP98242,
 #                 7 = MCP98243, 8 = MCP9843, 9 = CAT6095 / CAT34TS02,
-#                 10 = STTS424E
+#                 10 = STTS424E, 11 = STTS2002, 12 = STTS3000
 # Registers used:
 #   0x00: Capabilities
 #   0x01: Configuration
@@ -6022,6 +6032,12 @@ sub jedec_JC42_4_detect
 	} elsif ($chip = 10) {
 		return unless $manid = 0x10;		# STMicrolectronics
 		return unless $devid = 0x00;		# STTS424E02
+	} elsif ($chip = 11) {
+		return unless $manid = 0x10;		# STMicrolectronics
+		return unless $devid = 0x03;		# STTS2002
+	} elsif ($chip = 12) {
+		return unless $manid = 0x10;		# STMicrolectronics
+		return unless $devid = 0x02;		# STTS3000
 	}
 
 	# Now, do it all again with words. Note that we get

prog/detect/sensors-detect sub jedec_JC42_4_detect · line 6092

Quoted 10 lines
prog/detect/sensors-detect +6 -0
@@ -6067,6 +6083,12 @@ sub jedec_JC42_4_detect
 	} elsif ($chip = 10) {
 		return unless $manid = 0x4a10;		# STMicrolectronics
 		return unless ($devid & 0xfeff) = 0x0000; # STTS424E02
+	} elsif ($chip = 11) {
+		return unless $manid = 0x4a10;		# STMicrolectronics
+		return unless ($devid & 0xfeff) = 0x0003; # STTS2002
+	} elsif ($chip = 12) {
+		return unless $manid = 0x4a10;		# STMicrolectronics
+		return unless ($devid & 0xfeff) = 0x0002; # STTS3000
 	}

Hi Jean,

Quoted 5 lines

you are masking the chip IDs against 0xfeff. That made sense for STTS424E02, which has two variants. Any special reason for doing it for STTS2002 and STTS3000 as well ? If so, shouldn't we do the same for the jc42 driver (or, alternatively, not mask it here either for consistency) ?

We do mask for the STTS424 in sensors-detect too, while we don't in the jc42 driver. I'm simply doing the same here for the STTS2002 and STTS3000. It surprised me too at first, but then I though it made sense to be slightly more permissive in sensors-detect, so that we can spot and add new IDs as/if they show up.

But I am fine aligning sensors-detect and jc42 to match exactly if you think it's preferable. Your call.

Signature · 6 lines
Jean Delvare

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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of ST Mircoelectronics STTS2002 and STTS3000

In reply to Guenter Roeck
Quoted 69 lines · Jean Delvare
Quoted 62 lines · Guenter Roeck
Quoted 48 lines · Jean Delvare

Add detection of ST Mircoelectronics STTS2002 and STTS3000.

---
 prog/detect/sensors-detect |   24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)
prog/detect/sensors-detect +17 -1
@@ -1350,6 +1350,16 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x18..0x1f],
 		i2c_detect => sub { jedec_JC42_4_detect(@_, 10); },
 	}, {
+		name => "ST STTS2002",
+		driver => "jc42",
+		i2c_addrs => [0x18..0x1f],
+		i2c_detect => sub { jedec_JC42_4_detect(@_, 11); },
+	}, {
+		name => "ST STTS3000",
+		driver => "jc42",
+		i2c_addrs => [0x18..0x1f],
+		i2c_detect => sub { jedec_JC42_4_detect(@_, 12); },
+	}, {
 		name => "NXP SE97/SE97B",
 		driver => "jc42",
 		i2c_addrs => [0x18..0x1f],
@@ -5965,7 +5975,7 @@ sub max6655_detect
 # Chip to detect: 0 = STTS424, 1 = SE97/SE97B, 2 = SE98, 3 = ADT7408,
 #                 4 = TS3000/TSE2002, 5 = MAX6604, 6 = MCP98242,
 #                 7 = MCP98243, 8 = MCP9843, 9 = CAT6095 / CAT34TS02,
-#                 10 = STTS424E
+#                 10 = STTS424E, 11 = STTS2002, 12 = STTS3000
 # Registers used:
 #   0x00: Capabilities
 #   0x01: Configuration
@@ -6022,6 +6032,12 @@ sub jedec_JC42_4_detect
 	} elsif ($chip = 10) {
 		return unless $manid = 0x10;		# STMicrolectronics
 		return unless $devid = 0x00;		# STTS424E02
+	} elsif ($chip = 11) {
+		return unless $manid = 0x10;		# STMicrolectronics
+		return unless $devid = 0x03;		# STTS2002
+	} elsif ($chip = 12) {
+		return unless $manid = 0x10;		# STMicrolectronics
+		return unless $devid = 0x02;		# STTS3000
 	}
 
 	# Now, do it all again with words. Note that we get

prog/detect/sensors-detect sub jedec_JC42_4_detect · line 6092

Quoted 10 lines
prog/detect/sensors-detect +6 -0
@@ -6067,6 +6083,12 @@ sub jedec_JC42_4_detect
 	} elsif ($chip = 10) {
 		return unless $manid = 0x4a10;		# STMicrolectronics
 		return unless ($devid & 0xfeff) = 0x0000; # STTS424E02
+	} elsif ($chip = 11) {
+		return unless $manid = 0x4a10;		# STMicrolectronics
+		return unless ($devid & 0xfeff) = 0x0003; # STTS2002
+	} elsif ($chip = 12) {
+		return unless $manid = 0x4a10;		# STMicrolectronics
+		return unless ($devid & 0xfeff) = 0x0002; # STTS3000
 	}

Hi Jean,

Quoted 5 lines

you are masking the chip IDs against 0xfeff. That made sense for STTS424E02, which has two variants. Any special reason for doing it for STTS2002 and STTS3000 as well ? If so, shouldn't we do the same for the jc42 driver (or, alternatively, not mask it here either for consistency) ?

Quoted 6 lines

We do mask for the STTS424 in sensors-detect too, while we don't in the jc42 driver. I'm simply doing the same here for the STTS2002 and STTS3000. It surprised me too at first, but then I though it made sense to be slightly more permissive in sensors-detect, so that we can spot and add new IDs as/if they show up.

I didn't realize that sensor-detect also uses a mask for STTS424. Oddly enough, that one's "official" devid/revision is 0x0101.

Quoted 3 lines

But I am fine aligning sensors-detect and jc42 to match exactly if you think it's preferable. Your call.

Never mind; your reasoning makes sense.

Thanks,
Guenter

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

#26 lore raw

PATCH 1/1 sensors-detect: Add detection of NCT6779D and NCT6102D/NCT6106D

In reply to Guenter Roeck
---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |   12 ++++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)
CHANGES +1 -0
index 615ed65..b08d205 100644
@@ -6,6 +6,7 @@ SVN HEAD
   sensors: Fix libiconv linkage need detection in rare corner case
   sensors-detect: Don't choke on systems without PCI
                   Avoid probing EDID addresses on graphics cards (#2386)
+		  Add detection of NCT6779D and NCT6102D/NCT6106D
 
 3.3.2 (2012-03-14)
   libsensors: Added support for new sysfs attributes
prog/detect/sensors-detect +12 -0
index 58f7fd0..6bfd1e2 100755
@@ -2034,6 +2034,18 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x0b,
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
 	}, {
+		name => "Nuvoton NCT6779D Super IO Sensors",
+		driver => "to-be-written",	# nct6775, new driver
+		devid => 0xC562,
+		logdev => 0x0b,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+	}, {
+		name => "Nuvoton NCT6102D/NCT6106D Super IO Sensors",
+		driver => "to-be-written",	# nct6775, new driver
+		devid => 0x1061,
+		logdev => 0x0b,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+	}, {
 		name => "Fintek F71805F/FG Super IO Sensors",
 		driver => "f71805f",
 		devid => 0x0406,
Signature · 7 lines
1.7.5.4


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

PATCH 1/1 sensors-detect: Add detection of SMSC LPC47N217 and SIO10N268

In reply to Guenter Roeck
---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
CHANGES +1 -0
index b08d205..8361883 100644
@@ -7,6 +7,7 @@ SVN HEAD
   sensors-detect: Don't choke on systems without PCI
                   Avoid probing EDID addresses on graphics cards (#2386)
 		  Add detection of NCT6779D and NCT6102D/NCT6106D
+		  Add detection of SMSC LPC47N217 and SIO10N268
 
 3.3.2 (2012-03-14)
   libsensors: Added support for new sysfs attributes
prog/detect/sensors-detect +8 -0
index 6bfd1e2..df0e301 100755
@@ -1904,6 +1904,10 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		driver => "not-a-sensor",
 		devid => 0x28,
 	}, {
+		name => "SMSC LPC47N217 Super IO",
+		driver => "not-a-sensor",
+		devid => 0x7a,
+	}, {
 		name => "SMSC LPC47N227 Super IO",
 		driver => "not-a-sensor",
 		devid => 0x5a,
@@ -1911,6 +1915,10 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		name => "SMSC LPC47N237 Super IO",
 		driver => "not-a-sensor",
 		devid => 0x13,
+	}, {
+		name => "SMSC SIO10N268 Notebook IO",
+		driver => "not-a-sensor",
+		devid => 0x5b,
 	}
 );
 
Signature · 7 lines
1.7.5.4


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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of SMSC LPC47N217 and SIO10N268

In reply to Guenter Roeck
Quoted 34 lines · Guenter Roeck
---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
CHANGES +1 -0
index b08d205..8361883 100644
@@ -7,6 +7,7 @@ SVN HEAD
   sensors-detect: Don't choke on systems without PCI
                   Avoid probing EDID addresses on graphics cards (#2386)
 		  Add detection of NCT6779D and NCT6102D/NCT6106D
+		  Add detection of SMSC LPC47N217 and SIO10N268
 
 3.3.2 (2012-03-14)
   libsensors: Added support for new sysfs attributes
prog/detect/sensors-detect +4 -0
index 6bfd1e2..df0e301 100755
@@ -1904,6 +1904,10 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		driver => "not-a-sensor",
 		devid => 0x28,
 	}, {
+		name => "SMSC LPC47N217 Super IO",
+		driver => "not-a-sensor",
+		devid => 0x7a,
+	}, {
 		name => "SMSC LPC47N227 Super IO",
 		driver => "not-a-sensor",
 		devid => 0x5a,

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

Quoted 10 lines
prog/detect/sensors-detect +4 -0
@@ -1911,6 +1915,10 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		name => "SMSC LPC47N237 Super IO",
 		driver => "not-a-sensor",
 		devid => 0x13,
+	}, {
+		name => "SMSC SIO10N268 Notebook IO",
+		driver => "not-a-sensor",
+		devid => 0x5b,
 	}
 );
 

I didn't check the IDs but the "code" itself looks OK, please commit.

Signature · 6 lines
Jean Delvare

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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of SMSC LPC47N217 and SIO10N268

In reply to Guenter Roeck
Quoted 39 lines · Jean Delvare
Quoted 38 lines · Guenter Roeck
---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
CHANGES +1 -0
index b08d205..8361883 100644
@@ -7,6 +7,7 @@ SVN HEAD
   sensors-detect: Don't choke on systems without PCI
                   Avoid probing EDID addresses on graphics cards (#2386)
 		  Add detection of NCT6779D and NCT6102D/NCT6106D
+		  Add detection of SMSC LPC47N217 and SIO10N268
 
 3.3.2 (2012-03-14)
   libsensors: Added support for new sysfs attributes
prog/detect/sensors-detect +5 -0
index 6bfd1e2..df0e301 100755
@@ -1904,6 +1904,10 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		driver => "not-a-sensor",
 		devid => 0x28,
 	}, {
+		name => "SMSC LPC47N217 Super IO",
+		driver => "not-a-sensor",
+		devid => 0x7a,
+	}, {
 		name => "SMSC LPC47N227 Super IO",
 		driver => "not-a-sensor",
 		devid => 0x5a,
@@ -1911,6 +1915,10 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		name => "SMSC LPC47N237 Super IO",
 		driver => "not-a-sensor",
 		devid => 0x13,
+	}, {
Quoted 9 lines

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

Quoted 6 lines
prog/detect/sensors-detect +3 -0
+		name => "SMSC SIO10N268 Notebook IO",
+		driver => "not-a-sensor",
+		devid => 0x5b,
 	}
 );
 

I didn't check the IDs but the "code" itself looks OK, please commit.

Jean,

did you see the earlier patch I sent out a couple of weeks ago, adding support to detect the new Nuvoton chips ? I would like to commit that patch as well if it is ok with you.

Thanks,
Guenter

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

#30 lore raw

PATCH 1/1 sensors-detect: Add detection of NCT6791D

In reply to Guenter Roeck

New superio chip, found on recent ASUS boards.

---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |    7 +++++++
 2 files changed, 8 insertions(+)
CHANGES +1 -0
index 7036afe..b264f41 100644
@@ -6,6 +6,7 @@ SVN HEAD
   sensors-detect: Report built-in drivers as such
                   Use modules.builtin instead of /sys/module
                   Handle built-in modules properly
+                  Add detection of NCT6791D
 
 3.3.4 (2013-05-27)
   sensors.conf.5: Mention "sensors -u" to get the raw feature names
prog/detect/sensors-detect +7 -0
index 94645dc..9c213b6 100755
@@ -2063,6 +2063,13 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x0b,
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
 	}, {
+		name => "Nuvoton NCT6791D Super IO Sensors",
+		driver => "nct6775",
+		devid => 0xC800,
+		devid_mask => 0xFFF0,
+		logdev => 0x0b,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+	}, {
 		name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors",
 		driver => "to-be-written",	# nct6775
 		devid => 0xC450,
Signature · 7 lines
1.7.9.7


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

PATCH 1/1 sensors-detect: Add detection of NCT6681D, NCT6682D, and NCT6683D

In reply to Guenter Roeck

NCT6683D is found on recent Intel mainboards (eg DH87MC, DH87RL). NCT6681D is mentioned on the Nuvoton web site. NCT6682D is similar to NCT6681D with added support for current monitoring.

---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |   14 ++++++++++++++
 2 files changed, 15 insertions(+)
CHANGES +1 -0
index b264f41..59ea06a 100644
@@ -7,6 +7,7 @@ SVN HEAD
                   Use modules.builtin instead of /sys/module
                   Handle built-in modules properly
                   Add detection of NCT6791D
+                  Add detection of NCT6681D, NCT6682D, and NCT6683D
 
 3.3.4 (2013-05-27)
   sensors.conf.5: Mention "sensors -u" to get the raw feature names
prog/detect/sensors-detect +14 -0
index 9c213b6..14c092a 100755
@@ -2031,6 +2031,13 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x0b,
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
 	}, {
+		name => "Nuvoton NCT6681D/NCT6682D eSIO",
+		driver => "to-be-written",
+		devid => 0xB270,
+		devid_mask => 0xFFF0,
+		logdev => 0x0b,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+	}, {
 		name => "Nuvoton W83667HG-B (NCT5571D) Super IO Sensors",
 		driver => "w83627ehf",
 		devid => 0xB350,
@@ -2063,6 +2070,13 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x0b,
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
 	}, {
+		name => "Nuvoton NCT6683D eSIO",
+		driver => "to-be-written",
+		devid => 0xC730,
+		devid_mask => 0xFFF0,
+		logdev => 0x0b,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+	}, {
 		name => "Nuvoton NCT6791D Super IO Sensors",
 		driver => "nct6775",
 		devid => 0xC800,
Signature · 7 lines
1.7.9.7


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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

In reply to Guenter Roeck

Hi Guenter,

Quoted 25 lines · Guenter Roeck

New superio chip, found on recent ASUS boards.

---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |    7 +++++++
 2 files changed, 8 insertions(+)
CHANGES +1 -0
index 7036afe..b264f41 100644
@@ -6,6 +6,7 @@ SVN HEAD
   sensors-detect: Report built-in drivers as such
                   Use modules.builtin instead of /sys/module
                   Handle built-in modules properly
+                  Add detection of NCT6791D
 
 3.3.4 (2013-05-27)
   sensors.conf.5: Mention "sensors -u" to get the raw feature names
prog/detect/sensors-detect +0 -0
index 94645dc..9c213b6 100755

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

Quoted 6 lines
prog/detect/sensors-detect +3 -0
@@ -2063,6 +2063,13 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x0b,
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
 	}, {
+		name => "Nuvoton NCT6791D Super IO Sensors",
+		driver => "nct6775",
+		devid => 0xC800,

The datasheet says 0xC560. Who is right?

Quoted 7 lines
prog/detect/sensors-detect +4 -0
+		devid_mask => 0xFFF0,
+		logdev => 0x0b,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+	}, {
 		name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors",
 		driver => "to-be-written",	# nct6775
 		devid => 0xC450,
Signature · 6 lines
Jean Delvare

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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6681D, NCT6682D, and NCT6683D

In reply to Guenter Roeck
Quoted 9 lines · Guenter Roeck

NCT6683D is found on recent Intel mainboards (eg DH87MC, DH87RL). NCT6681D is mentioned on the Nuvoton web site. NCT6682D is similar to NCT6681D with added support for current monitoring.

---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |   14 ++++++++++++++
 2 files changed, 15 insertions(+)

Looks good, please commit.

These chips look completely different from the other Nuvoton chips. It will be a lot of work to support them, right?

Signature · 6 lines
Jean Delvare

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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

In reply to Guenter Roeck
Quoted 21 lines · Jean Delvare

Hi Guenter,

Quoted 18 lines · Guenter Roeck

New superio chip, found on recent ASUS boards.

---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |    7 +++++++
 2 files changed, 8 insertions(+)
CHANGES +1 -0
index 7036afe..b264f41 100644
@@ -6,6 +6,7 @@ SVN HEAD
   sensors-detect: Report built-in drivers as such
                   Use modules.builtin instead of /sys/module
                   Handle built-in modules properly
+                  Add detection of NCT6791D
 
Quoted 16 lines

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

Quoted 13 lines
CHANGES +0 -0
 3.3.4 (2013-05-27)
   sensors.conf.5: Mention "sensors -u" to get the raw feature names
prog/detect/sensors-detect +3 -0
index 94645dc..9c213b6 100755
@@ -2063,6 +2063,13 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x0b,
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
 	}, {
+		name => "Nuvoton NCT6791D Super IO Sensors",
+		driver => "nct6775",
+		devid => 0xC800,

The datasheet says 0xC560. Who is right?

That would be the same as nct6779d, which seems unlikely. Driver code is from David Bartley, who I am sure tested it with his board.

David, can you comment ?

Once we know for sure I'll get in touch with Nuvoton and ask for clarification.

Thanks,
Guenter

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

#35 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6681D, NCT6682D, and NCT6683D

In reply to Guenter Roeck
Quoted 11 lines · Jean Delvare
Quoted 9 lines · Guenter Roeck

NCT6683D is found on recent Intel mainboards (eg DH87MC, DH87RL). NCT6681D is mentioned on the Nuvoton web site. NCT6682D is similar to NCT6681D with added support for current monitoring.

---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |   14 ++++++++++++++
 2 files changed, 15 insertions(+)
Quoted 5 lines

Looks good, please commit.

These chips look completely different from the other Nuvoton chips. It will be a lot of work to support them, right?

Yes, it will require new driver.

Guenter

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

#36 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

In reply to Guenter Roeck

The value of CR[20]/CR[21] on my board is 0xc8/0x03, and the physical chip itself has "NCT6791D" printed on it.

Quoted 41 lines · Guenter Roeck
Quoted 21 lines · Jean Delvare

Hi Guenter,

Quoted 18 lines · Guenter Roeck

New superio chip, found on recent ASUS boards.

---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |    7 +++++++
 2 files changed, 8 insertions(+)
CHANGES +1 -0
index 7036afe..b264f41 100644
@@ -6,6 +6,7 @@ SVN HEAD
   sensors-detect: Report built-in drivers as such
                   Use modules.builtin instead of /sys/module
                   Handle built-in modules properly
+                  Add detection of NCT6791D
 
Quoted 16 lines

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

Quoted 13 lines
CHANGES +0 -0
 3.3.4 (2013-05-27)
   sensors.conf.5: Mention "sensors -u" to get the raw feature names
prog/detect/sensors-detect +3 -0
index 94645dc..9c213b6 100755
@@ -2063,6 +2063,13 @@ use constant FEAT_SMBUS      => (1 << 7);
            logdev => 0x0b,
            features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
    }, {
+           name => "Nuvoton NCT6791D Super IO Sensors",
+           driver => "nct6775",
+           devid => 0xC800,

The datasheet says 0xC560. Who is right?

That would be the same as nct6779d, which seems unlikely. Driver code is from David Bartley, who I am sure tested it with his board.

Quoted 8 lines

David, can you comment ?

Once we know for sure I'll get in touch with Nuvoton and ask for clarification.

Thanks,
Guenter

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

#37 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

In reply to Guenter Roeck
Quoted 3 lines · David Bartley

The value of CR[20]/CR[21] on my board is 0xc8/0x03, and the physical chip itself has "NCT6791D" printed on it.

Hi Jean and David,

Nuvoton confirms that 0xc803 is the correct chip ID.

Thanks,
Guenter

Quoted 44 lines · Guenter Roeck
Quoted 42 lines · Jean Delvare
Quoted 21 lines

Hi Guenter,

Quoted 18 lines · Guenter Roeck

New superio chip, found on recent ASUS boards.

---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |    7 +++++++
 2 files changed, 8 insertions(+)
CHANGES +1 -0
index 7036afe..b264f41 100644
@@ -6,6 +6,7 @@ SVN HEAD
   sensors-detect: Report built-in drivers as such
                   Use modules.builtin instead of /sys/module
                   Handle built-in modules properly
+                  Add detection of NCT6791D
 
Quoted 16 lines

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

Quoted 13 lines
CHANGES +0 -0
 3.3.4 (2013-05-27)
   sensors.conf.5: Mention "sensors -u" to get the raw feature names
prog/detect/sensors-detect +3 -0
index 94645dc..9c213b6 100755
@@ -2063,6 +2063,13 @@ use constant FEAT_SMBUS      => (1 << 7);
            logdev => 0x0b,
            features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
    }, {
+           name => "Nuvoton NCT6791D Super IO Sensors",
+           driver => "nct6775",
+           devid => 0xC800,

The datasheet says 0xC560. Who is right?

That would be the same as nct6779d, which seems unlikely. Driver code is from David Bartley, who I am sure tested it with his board.

Quoted 8 lines
Quoted 8 lines

David, can you comment ?

Once we know for sure I'll get in touch with Nuvoton and ask for clarification.

Thanks,
Guenter

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

#38 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

In reply to Guenter Roeck

maybe chip id is 0xc802

Quoted 67 lines

Date: Tue, 2 Jul 2013 19:52:30 -0700
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

Quoted 3 lines · David Bartley

The value of CR[20]/CR[21] on my board is 0xc8/0x03, and the physical chip itself has "NCT6791D" printed on it.

Hi Jean and David,

Nuvoton confirms that 0xc803 is the correct chip ID.

Thanks,
Guenter

Quoted 49 lines · Guenter Roeck
Quoted 47 lines · Jean Delvare
Quoted 21 lines

Hi Guenter,

Quoted 18 lines · Guenter Roeck

New superio chip, found on recent ASUS boards.

---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |    7 +++++++
 2 files changed, 8 insertions(+)
CHANGES +1 -0
index 7036afe..b264f41 100644
@@ -6,6 +6,7 @@ SVN HEAD
   sensors-detect: Report built-in drivers as such
                   Use modules.builtin instead of /sys/module
                   Handle built-in modules properly
+                  Add detection of NCT6791D
 
Quoted 16 lines

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

Quoted 13 lines
CHANGES +0 -0
 3.3.4 (2013-05-27)
   sensors.conf.5: Mention "sensors -u" to get the raw feature names
prog/detect/sensors-detect +3 -0
index 94645dc..9c213b6 100755
@@ -2063,6 +2063,13 @@ use constant FEAT_SMBUS      => (1 << 7);
            logdev => 0x0b,
            features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
    }, {
+           name => "Nuvoton NCT6791D Super IO Sensors",
+           driver => "nct6775",
+           devid => 0xC800,

The datasheet says 0xC560. Who is right?

That would be the same as nct6779d, which seems unlikely. Driver code is from David Bartley, who I am sure tested it with his board.

David, can you comment ?

Once we know for sure I'll get in touch with Nuvoton and ask for clarification.

Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

Thanks,
Guenter

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

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

#39 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

In reply to Guenter Roeck
Quoted 2 lines · killghost

maybe chip id is 0xc802

[ please don't top-post on the mailing list ]

The last nibble is the version number, so both is possible and accepted.

Guenter

Quoted 67 lines
Quoted 67 lines

Date: Tue, 2 Jul 2013 19:52:30 -0700
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

Quoted 3 lines · David Bartley

The value of CR[20]/CR[21] on my board is 0xc8/0x03, and the physical chip itself has "NCT6791D" printed on it.

Hi Jean and David,

Nuvoton confirms that 0xc803 is the correct chip ID.

Thanks,
Guenter

Quoted 49 lines · Guenter Roeck
Quoted 47 lines · Jean Delvare
Quoted 21 lines

Hi Guenter,

Quoted 18 lines · Guenter Roeck

New superio chip, found on recent ASUS boards.

---
 CHANGES                    |    1 +
 prog/detect/sensors-detect |    7 +++++++
 2 files changed, 8 insertions(+)
CHANGES +1 -0
index 7036afe..b264f41 100644
@@ -6,6 +6,7 @@ SVN HEAD
   sensors-detect: Report built-in drivers as such
                   Use modules.builtin instead of /sys/module
                   Handle built-in modules properly
+                  Add detection of NCT6791D
 
Quoted 16 lines

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

Quoted 13 lines
CHANGES +0 -0
 3.3.4 (2013-05-27)
   sensors.conf.5: Mention "sensors -u" to get the raw feature names
prog/detect/sensors-detect +3 -0
index 94645dc..9c213b6 100755
@@ -2063,6 +2063,13 @@ use constant FEAT_SMBUS      => (1 << 7);
            logdev => 0x0b,
            features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
    }, {
+           name => "Nuvoton NCT6791D Super IO Sensors",
+           driver => "nct6775",
+           devid => 0xC800,

The datasheet says 0xC560. Who is right?

That would be the same as nct6779d, which seems unlikely. Driver code is from David Bartley, who I am sure tested it with his board.

David, can you comment ?

Once we know for sure I'll get in touch with Nuvoton and ask for clarification.

Quoted 9 lines
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

Thanks,
Guenter

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

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

#40 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

In reply to Guenter Roeck
Quoted 7 lines · Guenter Roeck
Quoted 2 lines · David Bartley

The value of CR[20]/CR[21] on my board is 0xc8/0x03, and the physical chip itself has "NCT6791D" printed on it.

Hi Jean and David,

Nuvoton confirms that 0xc803 is the correct chip ID.

OK, I suppose they will fix it in the next version of the datasheet. Meanwhile you can commit your patch.

Thanks,

Signature · 6 lines
Jean Delvare

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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

In reply to Guenter Roeck

NCT6791 added 122byte read-only registers for Hardware Monitor. The base address is specified in registersCR[64h] and CR[65h] of Logical Device B, the hardware monitor device. CR[64h] is the high byte, and CR[65h] isthe low byte. The least byte of the base address recommend to be zero. For example, {CR[64h], CR[65h]} ={XX00h}.

who know that how to read this data?

Quoted 11 lines

Date: Wed, 3 Jul 2013 08:23:52 +0200
From: [email protected]
To: [email protected]
CC: [email protected]; [email protected]
Subject: Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

Quoted 4 lines · Guenter Roeck
Quoted 2 lines · David Bartley

The value of CR[20]/CR[21] on my board is 0xc8/0x03, and the physical chip itself has "NCT6791D" printed on it.

Quoted 15 lines
Quoted 3 lines

Hi Jean and David,

Nuvoton confirms that 0xc803 is the correct chip ID.

OK, I suppose they will fix it in the next version of the datasheet. Meanwhile you can commit your patch.

Thanks,

Signature · 6 lines
Jean Delvare

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

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

#42 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

In reply to Guenter Roeck

I can provide register dumps if there's interest, but it seemed like these read-only registers were mostly just copies of parts of bank 4.

Quoted 17 lines · killghost

NCT6791 added 122byte read-only registers for Hardware Monitor. The base address is specified in registers
CR[64h] and CR[65h] of Logical Device B, the hardware monitor device. CR[64h] is the high byte, and CR[65h] is
the low byte. The least byte of the base address recommend to be zero. For example, {CR[64h], CR[65h]} =
{XX00h}.

who know that how to read this data?

Quoted 4 lines

Date: Wed, 3 Jul 2013 08:23:52 +0200
From: [email protected]
To: [email protected]
CC: [email protected]; [email protected]

Quoted 25 lines
Quoted 1 line

Subject: Re: [lm-sensors] [PATCH] sensors-detect: Add detection of

NCT6791D

Quoted 4 lines · Guenter Roeck
Quoted 2 lines · David Bartley
Quoted 1 line

The value of CR[20]/CR[21] on my board is 0xc8/0x03, and the

physical chip

Quoted 17 lines
Quoted 5 lines
Quoted 1 line

itself has "NCT6791D" printed on it.

Hi Jean and David,

Nuvoton confirms that 0xc803 is the correct chip ID.

OK, I suppose they will fix it in the next version of the datasheet. Meanwhile you can commit your patch.

Thanks,
--
Jean Delvare

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

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

#43 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

In reply to Guenter Roeck

I need this,and How to read ?
From: [email protected]
Date: Tue, 2 Jul 2013 23:42:13 -0700
Subject: Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D
To: [email protected]
CC: [email protected]; [email protected]; [email protected]

I can provide register dumps if there's interest, but it seemed like these read-only registers were mostly just copies of parts of bank 4.

On Tue, Jul 2, 2013 at 11:32 PM, killghost <[email protected]> wrote:

NCT6791 added 122byte read-only registers for Hardware Monitor. The base address is specified in registersCR[64h] and CR[65h] of Logical Device B, the hardware monitor device. CR[64h] is the high byte, and CR[65h] is

the low byte. The least byte of the base address recommend to be zero. For example, {CR[64h], CR[65h]} ={XX00h}.

who know that how to read this data?

Quoted 19 lines

Date: Wed, 3 Jul 2013 08:23:52 +0200

From: [email protected]
To: [email protected]
CC: [email protected]; [email protected]

Subject: Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

Quoted 8 lines · Guenter Roeck
Quoted 2 lines · David Bartley

The value of CR[20]/CR[21] on my board is 0xc8/0x03, and the physical chip itself has "NCT6791D" printed on it.

Hi Jean and David,

Quoted 17 lines
Quoted 1 line

Nuvoton confirms that 0xc803 is the correct chip ID.

OK, I suppose they will fix it in the next version of the datasheet. Meanwhile you can commit your patch.

Thanks,

Signature · 8 lines
Jean Delvare



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

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

#44 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

In reply to Guenter Roeck
Quoted 2 lines · killghost

I need this,and How to read ?

http://csclub.uwaterloo.ca/~dtbartle/nct6791d/

Quoted 32 lines

------------------------------
From: [email protected]
Date: Tue, 2 Jul 2013 23:42:13 -0700

Subject: Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D
To: [email protected]
CC: [email protected]; [email protected]; [email protected]

I can provide register dumps if there's interest, but it seemed like these read-only registers were mostly just copies of parts of bank 4.

On Tue, Jul 2, 2013 at 11:32 PM, killghost <[email protected]> wrote:

NCT6791 added 122byte read-only registers for Hardware Monitor. The base address is specified in registers
CR[64h] and CR[65h] of Logical Device B, the hardware monitor device. CR[64h] is the high byte, and CR[65h] is
the low byte. The least byte of the base address recommend to be zero. For example, {CR[64h], CR[65h]} =
{XX00h}.

who know that how to read this data?

Quoted 4 lines

Date: Wed, 3 Jul 2013 08:23:52 +0200
From: [email protected]
To: [email protected]
CC: [email protected]; [email protected]

Quoted 27 lines
Quoted 1 line

Subject: Re: [lm-sensors] [PATCH] sensors-detect: Add detection of

NCT6791D

Quoted 4 lines · Guenter Roeck
Quoted 2 lines · David Bartley
Quoted 1 line

The value of CR[20]/CR[21] on my board is 0xc8/0x03, and the

physical chip

Quoted 17 lines
Quoted 5 lines
Quoted 1 line

itself has "NCT6791D" printed on it.

Hi Jean and David,

Nuvoton confirms that 0xc803 is the correct chip ID.

OK, I suppose they will fix it in the next version of the datasheet. Meanwhile you can commit your patch.

Thanks,
--
Jean Delvare

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

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

#45 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

In reply to Guenter Roeck

Thank you!

From: [email protected]
Date: Fri, 5 Jul 2013 00:16:43 -0700
Subject: Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D
To: [email protected]
CC: [email protected]; [email protected]; [email protected]

On Wed, Jul 3, 2013 at 1:26 AM, killghost <[email protected]> wrote:

I need this,and How to read ?

http://csclub.uwaterloo.ca/~dtbartle/nct6791d/

From: [email protected]
Date: Tue, 2 Jul 2013 23:42:13 -0700
Subject: Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

To: [email protected]
CC: [email protected]; [email protected]; [email protected]

I can provide register dumps if there's interest, but it seemed like these read-only registers were mostly just copies of parts of bank 4.

On Tue, Jul 2, 2013 at 11:32 PM, killghost <[email protected]> wrote:

NCT6791 added 122byte read-only registers for Hardware Monitor. The base address is specified in registersCR[64h] and CR[65h] of Logical Device B, the hardware monitor device. CR[64h] is the high byte, and CR[65h] is

the low byte. The least byte of the base address recommend to be zero. For example, {CR[64h], CR[65h]} ={XX00h}.

who know that how to read this data?

Quoted 35 lines

Date: Wed, 3 Jul 2013 08:23:52 +0200

From: [email protected]
To: [email protected]
CC: [email protected]; [email protected]

Subject: Re: [lm-sensors] [PATCH] sensors-detect: Add detection of NCT6791D

Quoted 6 lines · Guenter Roeck

On Tue, Jul 02, 2013 at 09:10:52AM -0700, David Bartley wrote:

Quoted 6 lines
Quoted 2 lines

The value of CR[20]/CR[21] on my board is 0xc8/0x03, and the physical chip itself has "NCT6791D" printed on it.

Hi Jean and David,

Nuvoton confirms that 0xc803 is the correct chip ID.

Quoted 13 lines

OK, I suppose they will fix it in the next version of the datasheet. Meanwhile you can commit your patch.

Thanks,

Signature · 8 lines
Jean Delvare



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

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

#46 lore raw

PATCH 1/1 sensors-detect: Add detection of TI ADC128D818

In reply to Guenter Roeck
---
 CHANGES                    |    3 +++
 prog/detect/sensors-detect |   26 +++++++++++++++++++++-----
 2 files changed, 24 insertions(+), 5 deletions(-)
CHANGES +3 -0
index e1347a6..970dd67 100644
@@ -1,6 +1,9 @@
 lm-sensors CHANGES file
 -----------------------
 
+SVN HEAD
+  sensors-detect: Add detection of ADC128D818
+
 3.3.5 "Happy Birthday Beddy" (2014-01-22)
   libsensors: Improve documentation of two functions
               Increase MAX_SENSORS_PER_TYPE to 33
prog/detect/sensors-detect +21 -5
index a2093f3..2136b76 100755
@@ -547,6 +547,11 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x28..0x2f],
 		i2c_detect => sub { lm80_detect(@_, 1); },
 	}, {
+		name => "TI / National Semiconductor ADC128D818",
+		driver => "adc128d818",
+		i2c_addrs => [0x1d, 0x1e, 0x1f, 0x2d, 0x2e, 0x2f, 0x35, 0x36, 0x37],
+		i2c_detect => sub { lm80_detect(@_, 2); },
+	}, {
 		name => "National Semiconductor LM85",
 		driver => "lm85",
 		i2c_addrs => [0x2c..0x2e],
@@ -4436,11 +4441,13 @@ sub lm92_detect
 # Chip to detect: 0 = LM80, 1 = LM96080
 # Registers used:
 #   0x00: Configuration register
-#   0x02: Interrupt state register
-#   0x07: Converstion rate register (LM96080 only)
+#   0x02: Interrupt state register (LM80, LM96080 only)
+#   0x07: Converstion rate register (LM96080, ADC128D818 only)
+#   0x08: Oneshot register (ADC128D818 only)
+#   0x09: Shutdown register (ADC128D818 only)
 #   0x2a-0x3d: Limits registers (LM80 only)
-#   0x3e: Manufacturer's ID register (LM96080 only)
-#   0x3f: Stepping/die revision ID register (LM96080 only)
+#   0x3e: Manufacturer's ID register (LM96080, ADC128D818 only)
+#   0x3f: Stepping/die revision ID register (LM96080, ADC128D818 only)
 # The LM80 is easily misdetected since it doesn't provide identification
 # registers. So we have to use some tricks:
 #   - 6-bit addressing, so limits readings modulo 0x40 should be unchanged
@@ -4458,9 +4465,9 @@ sub lm80_detect
 	my ($i, $reg);
 
 	return if (i2c_smbus_read_byte_data($file, 0x00) & 0x80) != 0;
-	return if (i2c_smbus_read_byte_data($file, 0x02) & 0xc0) != 0;
 
 	if ($chip = 0) {
+		return if (i2c_smbus_read_byte_data($file, 0x02) & 0xc0) != 0;
 		for ($i = 0x2a; $i <= 0x3d; $i++) {
 			$reg = i2c_smbus_read_byte_data($file, $i);
 			return if i2c_smbus_read_byte_data($file, $i+0x40) != $reg;
@@ -4493,11 +4500,20 @@ sub lm80_detect
 		return unless $confidence > 0;
 		return $confidence;
 	} elsif ($chip = 1) {
+		return if (i2c_smbus_read_byte_data($file, 0x02) & 0xc0) != 0;
 		return if (i2c_smbus_read_byte_data($file, 0x07) & 0xfe) != 0;
 		return if i2c_smbus_read_byte_data($file, 0x3e) != 0x01;
 		return if i2c_smbus_read_byte_data($file, 0x3f) != 0x08;
 
 		return 6;
+	} elsif ($chip = 2) {
+		return if (i2c_smbus_read_byte_data($file, 0x07) & 0xfe) != 0;
+		return if (i2c_smbus_read_byte_data($file, 0x08) & 0xfe) != 0;
+		return if (i2c_smbus_read_byte_data($file, 0x09) & 0xfe) != 0;
+		return if i2c_smbus_read_byte_data($file, 0x3e) != 0x01;
+		return if i2c_smbus_read_byte_data($file, 0x3f) != 0x09;
+
+		return 6;
 	}
 }
 
Signature · 7 lines
1.7.9.7


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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of TI ADC128D818

In reply to Guenter Roeck

Hi Guenter,

Quoted 25 lines · Guenter Roeck
---
 CHANGES                    |    3 +++
 prog/detect/sensors-detect |   26 +++++++++++++++++++++-----
 2 files changed, 24 insertions(+), 5 deletions(-)
CHANGES +3 -0
index e1347a6..970dd67 100644
@@ -1,6 +1,9 @@
 lm-sensors CHANGES file
 -----------------------
 
+SVN HEAD
+  sensors-detect: Add detection of ADC128D818
+
 3.3.5 "Happy Birthday Beddy" (2014-01-22)
   libsensors: Improve documentation of two functions
               Increase MAX_SENSORS_PER_TYPE to 33
prog/detect/sensors-detect +0 -0
index a2093f3..2136b76 100755

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

Quoted 7 lines
prog/detect/sensors-detect +4 -0
@@ -547,6 +547,11 @@ use vars qw(@i2c_adapter_names);
 		i2c_addrs => [0x28..0x2f],
 		i2c_detect => sub { lm80_detect(@_, 1); },
 	}, {
+		name => "TI / National Semiconductor ADC128D818",
+		driver => "adc128d818",
+		i2c_addrs => [0x1d, 0x1e, 0x1f, 0x2d, 0x2e, 0x2f, 0x35, 0x36, 0x37],
+		i2c_detect => sub { lm80_detect(@_, 2); },

How does this relate to the LM80?

Is this chip really something people will need sensors-detect for (i.e. it is found in PC-like computers) or something which will be always declared in DT-like declarations anyway?

I'm asking because I am worried about the address list. I'm fine with 0x1d..0x1f and 0x2d..0x2f (you can declare them that way in perl BTW, it's more compact) but addresses 0x35..0x37 we don't currently scan. Adding a new address to the scan list is always a risk, as you may start probing a whole new class of devices and the effects can be very bad.

Actually we used to scan address 0x37 until r3233 / 2006-01-16. Commit message was:

"Lower the confidence of ITE overclocking chips. Do not scan address 0x37 for these chips, as it may cause problem with some eeproms."

Addresses 0x35 and 0x36 I don't think we ever scanned, but EEPROMs can reply to these as well so I'd rather not add them.

Signature · 6 lines
Jean Delvare

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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of TI ADC128D818

In reply to Guenter Roeck

Hi Jean,

Quoted 38 lines · Jean Delvare

Hi Guenter,

Quoted 25 lines · Guenter Roeck
---
  CHANGES                    |    3 +++
  prog/detect/sensors-detect |   26 +++++++++++++++++++++-----
  2 files changed, 24 insertions(+), 5 deletions(-)
CHANGES +3 -0
index e1347a6..970dd67 100644
@@ -1,6 +1,9 @@
  lm-sensors CHANGES file
  -----------------------
 
+SVN HEAD
+  sensors-detect: Add detection of ADC128D818
+
  3.3.5 "Happy Birthday Beddy" (2014-01-22)
    libsensors: Improve documentation of two functions
                Increase MAX_SENSORS_PER_TYPE to 33
prog/detect/sensors-detect +0 -0
index a2093f3..2136b76 100755

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

Quoted 7 lines
prog/detect/sensors-detect +4 -0
@@ -547,6 +547,11 @@ use vars qw(@i2c_adapter_names);
  		i2c_addrs => [0x28..0x2f],
  		i2c_detect => sub { lm80_detect(@_, 1); },
  	}, {
+		name => "TI / National Semiconductor ADC128D818",
+		driver => "adc128d818",
+		i2c_addrs => [0x1d, 0x1e, 0x1f, 0x2d, 0x2e, 0x2f, 0x35, 0x36, 0x37],
+		i2c_detect => sub { lm80_detect(@_, 2); },

How does this relate to the LM80?

Quoted 4 lines

Is this chip really something people will need sensors-detect for (i.e. it is found in PC-like computers) or something which will be always declared in DT-like declarations anyway?

No idea, really. I was asked by someone from TI to write a driver some time ago, and finally found the time to actually do it. I recall they had a request from a customer, but I did not ask for the use case.

The chip is a close relative to LM80 and LM96080. Register addresses are almost the same, but the sensor registers are 16 bit wide instead of 8, and there are no fan registers. I didn't use the lm80 driver because of the 16 bit registers, but decided to write a new one.

Quoted 9 lines

I'm asking because I am worried about the address list. I'm fine with 0x1d..0x1f and 0x2d..0x2f (you can declare them that way in perl BTW, it's more compact) but addresses 0x35..0x37 we don't currently scan. Adding a new address to the scan list is always a risk, as you may start probing a whole new class of devices and the effects can be very bad.

Actually we used to scan address 0x37 until r3233 / 2006-01-16. Commit message was:

Quoted 7 lines

"Lower the confidence of ITE overclocking chips. Do not scan address 0x37 for these chips, as it may cause problem with some eeproms."

Addresses 0x35 and 0x36 I don't think we ever scanned, but EEPROMs can reply to these as well so I'd rather not add them.

Ok with me to take out those three addresses ... or drop the entire detection if you think it isn't worth it.

Question is what I should do in the driver. Any thoughts on that ? For my part I am fine with dropping the detect function entirely from it; I suspect you are right and it will mostly be used from DT type systems, and from what you said it sounds a bit risky to scan the 0x35..0x37 address range.

Thanks,
Guenter

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

#49 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of TI ADC128D818

In reply to Guenter Roeck

Hi Guenter,

Quoted 41 lines · Guenter Roeck
Quoted 36 lines · Jean Delvare
Quoted 25 lines · Guenter Roeck
---
  CHANGES                    |    3 +++
  prog/detect/sensors-detect |   26 +++++++++++++++++++++-----
  2 files changed, 24 insertions(+), 5 deletions(-)
CHANGES +3 -0
index e1347a6..970dd67 100644
@@ -1,6 +1,9 @@
  lm-sensors CHANGES file
  -----------------------
 
+SVN HEAD
+  sensors-detect: Add detection of ADC128D818
+
  3.3.5 "Happy Birthday Beddy" (2014-01-22)
    libsensors: Improve documentation of two functions
                Increase MAX_SENSORS_PER_TYPE to 33
prog/detect/sensors-detect +0 -0
index a2093f3..2136b76 100755

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

Quoted 7 lines
prog/detect/sensors-detect +4 -0
@@ -547,6 +547,11 @@ use vars qw(@i2c_adapter_names);
  		i2c_addrs => [0x28..0x2f],
  		i2c_detect => sub { lm80_detect(@_, 1); },
  	}, {
+		name => "TI / National Semiconductor ADC128D818",
+		driver => "adc128d818",
+		i2c_addrs => [0x1d, 0x1e, 0x1f, 0x2d, 0x2e, 0x2f, 0x35, 0x36, 0x37],
+		i2c_detect => sub { lm80_detect(@_, 2); },

How does this relate to the LM80?

Quoted 3 lines

Is this chip really something people will need sensors-detect for (i.e. it is found in PC-like computers) or something which will be always declared in DT-like declarations anyway?

Quoted 8 lines

No idea, really. I was asked by someone from TI to write a driver some time ago, and finally found the time to actually do it. I recall they had a request from a customer, but I did not ask for the use case.

The chip is a close relative to LM80 and LM96080. Register addresses are almost the same, but the sensor registers are 16 bit wide instead of 8, and there are no fan registers. I didn't use the lm80 driver because of the 16 bit registers, but decided to write a new one.

Then I suggest using a different detect function in sensors-detect. There isn't enough in common with detect_lm80 to reuse it, and having a 1:1 mapping between sensors-detect functions and drivers has advantages.

Quoted 13 lines
Quoted 13 lines

I'm asking because I am worried about the address list. I'm fine with 0x1d..0x1f and 0x2d..0x2f (you can declare them that way in perl BTW, it's more compact) but addresses 0x35..0x37 we don't currently scan. Adding a new address to the scan list is always a risk, as you may start probing a whole new class of devices and the effects can be very bad.

Actually we used to scan address 0x37 until r3233 / 2006-01-16. Commit message was:

"Lower the confidence of ITE overclocking chips. Do not scan address 0x37 for these chips, as it may cause problem with some eeproms."

Quoted 5 lines
Quoted 2 lines

Addresses 0x35 and 0x36 I don't think we ever scanned, but EEPROMs can reply to these as well so I'd rather not add them.

Ok with me to take out those three addresses ... or drop the entire detection if you think it isn't worth it.

I am fine with the detection function. Please just drop the 3 addresses in the 0x30-0x37 range.

Quoted 5 lines

Question is what I should do in the driver. Any thoughts on that ? For my part I am fine with dropping the detect function entirely from it; I suspect you are right and it will mostly be used from DT type systems, and from what you said it sounds a bit risky to scan the 0x35..0x37 address range.

You can keep the detect function in the driver as long as you remove the 0x35..0x37 addresses from the scan list. Just document it properly and that should be fine.

About the code itself:

Review sub lm92_detect · line 4447

Quoted 10 lines
(quoted diff) +4 -2
@@ -4436,11 +4441,13 @@ sub lm92_detect
 # Chip to detect: 0 = LM80, 1 = LM96080
 # Registers used:
 #   0x00: Configuration register
-#   0x02: Interrupt state register
-#   0x07: Converstion rate register (LM96080 only)
+#   0x02: Interrupt state register (LM80, LM96080 only)
+#   0x07: Converstion rate register (LM96080, ADC128D818 only)
+#   0x08: Oneshot register (ADC128D818 only)
+#   0x09: Shutdown register (ADC128D818 only)

The datasheet I have states that 0x09 is the One-Shot register and 0x0a is the Deep Shutdown register.

Review sub lm80_detect · line 4467

Quoted 12 lines
(quoted diff) +2 -2
 #   0x2a-0x3d: Limits registers (LM80 only)
-#   0x3e: Manufacturer's ID register (LM96080 only)
-#   0x3f: Stepping/die revision ID register (LM96080 only)
+#   0x3e: Manufacturer's ID register (LM96080, ADC128D818 only)
+#   0x3f: Stepping/die revision ID register (LM96080, ADC128D818 only)
 # The LM80 is easily misdetected since it doesn't provide identification
 # registers. So we have to use some tricks:
 #   - 6-bit addressing, so limits readings modulo 0x40 should be unchanged
@@ -4458,9 +4465,9 @@ sub lm80_detect
 	my ($i, $reg);
 
 	return if (i2c_smbus_read_byte_data($file, 0x00) & 0x80) != 0;

For the ADC128D818 you can even mask with 0xf4, slightly improving the reliability.

Quoted 11 lines
(quoted diff) +1 -1
-	return if (i2c_smbus_read_byte_data($file, 0x02) & 0xc0) != 0;
 
 	if ($chip = 0) {
+		return if (i2c_smbus_read_byte_data($file, 0x02) & 0xc0) != 0;
 		for ($i = 0x2a; $i <= 0x3d; $i++) {
 			$reg = i2c_smbus_read_byte_data($file, $i);
 			return if i2c_smbus_read_byte_data($file, $i+0x40) != $reg;
@@ -4493,11 +4500,20 @@ sub lm80_detect
 		return unless $confidence > 0;
 		return $confidence;
 	} elsif ($chip = 1) {

Review sub lm80_detect · line 4512

Quoted 10 lines
(quoted diff) +5 -0
+		return if (i2c_smbus_read_byte_data($file, 0x02) & 0xc0) != 0;
 		return if (i2c_smbus_read_byte_data($file, 0x07) & 0xfe) != 0;
 		return if i2c_smbus_read_byte_data($file, 0x3e) != 0x01;
 		return if i2c_smbus_read_byte_data($file, 0x3f) != 0x08;
 
 		return 6;
+	} elsif ($chip = 2) {
+		return if (i2c_smbus_read_byte_data($file, 0x07) & 0xfe) != 0;
+		return if (i2c_smbus_read_byte_data($file, 0x08) & 0xfe) != 0;
+		return if (i2c_smbus_read_byte_data($file, 0x09) & 0xfe) != 0;

You could also check register 0x0c, which as 6 unused bits.

Quoted 7 lines
(quoted diff) +4 -0
+		return if i2c_smbus_read_byte_data($file, 0x3e) != 0x01;
+		return if i2c_smbus_read_byte_data($file, 0x3f) != 0x09;
+
+		return 6;
 	}
 }
 
Signature · 6 lines
Jean Delvare

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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of TI ADC128D818

In reply to Guenter Roeck
Quoted 48 lines · Jean Delvare

Hi Guenter,

Quoted 45 lines · Guenter Roeck
Quoted 36 lines · Jean Delvare
Quoted 25 lines · Guenter Roeck
---
   CHANGES                    |    3 +++
   prog/detect/sensors-detect |   26 +++++++++++++++++++++-----
   2 files changed, 24 insertions(+), 5 deletions(-)
CHANGES +3 -0
index e1347a6..970dd67 100644
@@ -1,6 +1,9 @@
   lm-sensors CHANGES file
   -----------------------
 
+SVN HEAD
+  sensors-detect: Add detection of ADC128D818
+
   3.3.5 "Happy Birthday Beddy" (2014-01-22)
     libsensors: Improve documentation of two functions
                 Increase MAX_SENSORS_PER_TYPE to 33
prog/detect/sensors-detect +0 -0
index a2093f3..2136b76 100755

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

Quoted 7 lines
prog/detect/sensors-detect +4 -0
@@ -547,6 +547,11 @@ use vars qw(@i2c_adapter_names);
   		i2c_addrs => [0x28..0x2f],
   		i2c_detect => sub { lm80_detect(@_, 1); },
   	}, {
+		name => "TI / National Semiconductor ADC128D818",
+		driver => "adc128d818",
+		i2c_addrs => [0x1d, 0x1e, 0x1f, 0x2d, 0x2e, 0x2f, 0x35, 0x36, 0x37],
+		i2c_detect => sub { lm80_detect(@_, 2); },

How does this relate to the LM80?

Quoted 3 lines

Is this chip really something people will need sensors-detect for (i.e. it is found in PC-like computers) or something which will be always declared in DT-like declarations anyway?

No idea, really. I was asked by someone from TI to write a driver some time ago, and finally found the time to actually do it. I recall they had a request from a customer, but I did not ask for the use case.

Quoted 9 lines
Quoted 4 lines

The chip is a close relative to LM80 and LM96080. Register addresses are almost the same, but the sensor registers are 16 bit wide instead of 8, and there are no fan registers. I didn't use the lm80 driver because of the 16 bit registers, but decided to write a new one.

Then I suggest using a different detect function in sensors-detect. There isn't enough in common with detect_lm80 to reuse it, and having a 1:1 mapping between sensors-detect functions and drivers has advantages.

Ok.

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines

I'm asking because I am worried about the address list. I'm fine with 0x1d..0x1f and 0x2d..0x2f (you can declare them that way in perl BTW, it's more compact) but addresses 0x35..0x37 we don't currently scan. Adding a new address to the scan list is always a risk, as you may start probing a whole new class of devices and the effects can be very bad.

Actually we used to scan address 0x37 until r3233 / 2006-01-16. Commit message was:

"Lower the confidence of ITE overclocking chips. Do not scan address 0x37 for these chips, as it may cause problem with some eeproms."

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

Addresses 0x35 and 0x36 I don't think we ever scanned, but EEPROMs can reply to these as well so I'd rather not add them.

Ok with me to take out those three addresses ... or drop the entire detection if you think it isn't worth it.

I am fine with the detection function. Please just drop the 3 addresses in the 0x30-0x37 range.

Ok.

Quoted 12 lines
Quoted 5 lines

Question is what I should do in the driver. Any thoughts on that ? For my part I am fine with dropping the detect function entirely from it; I suspect you are right and it will mostly be used from DT type systems, and from what you said it sounds a bit risky to scan the 0x35..0x37 address range.

You can keep the detect function in the driver as long as you remove the 0x35..0x37 addresses from the scan list. Just document it properly and that should be fine.

About the code itself:

Quoted 14 lines

Review sub lm92_detect · line 4447

Quoted 10 lines
(quoted diff) +4 -2
@@ -4436,11 +4441,13 @@ sub lm92_detect
  # Chip to detect: 0 = LM80, 1 = LM96080
  # Registers used:
  #   0x00: Configuration register
-#   0x02: Interrupt state register
-#   0x07: Converstion rate register (LM96080 only)
+#   0x02: Interrupt state register (LM80, LM96080 only)
+#   0x07: Converstion rate register (LM96080, ADC128D818 only)
+#   0x08: Oneshot register (ADC128D818 only)
+#   0x09: Shutdown register (ADC128D818 only)

The datasheet I have states that 0x09 is the One-Shot register and 0x0a is the Deep Shutdown register.

Funny, in the driver I got that right :-)

Quoted 11 lines
Quoted 11 lines
(quoted diff) +2 -2
  #   0x2a-0x3d: Limits registers (LM80 only)
-#   0x3e: Manufacturer's ID register (LM96080 only)
-#   0x3f: Stepping/die revision ID register (LM96080 only)
+#   0x3e: Manufacturer's ID register (LM96080, ADC128D818 only)
+#   0x3f: Stepping/die revision ID register (LM96080, ADC128D818 only)
  # The LM80 is easily misdetected since it doesn't provide identification
  # registers. So we have to use some tricks:
  #   - 6-bit addressing, so limits readings modulo 0x40 should be unchanged
@@ -4458,9 +4465,9 @@ sub lm80_detect
  	my ($i, $reg);
 
Quoted 5 lines

Review sub lm80_detect · line 4467

Quoted 1 line
(quoted diff) +0 -0
  	return if (i2c_smbus_read_byte_data($file, 0x00) & 0x80) != 0;

For the ADC128D818 you can even mask with 0xf4, slightly improving the reliability.

Ok.

Quoted 16 lines
Quoted 16 lines
(quoted diff) +2 -1
-	return if (i2c_smbus_read_byte_data($file, 0x02) & 0xc0) != 0;
 
  	if ($chip = 0) {
+		return if (i2c_smbus_read_byte_data($file, 0x02) & 0xc0) != 0;
  		for ($i = 0x2a; $i <= 0x3d; $i++) {
  			$reg = i2c_smbus_read_byte_data($file, $i);
  			return if i2c_smbus_read_byte_data($file, $i+0x40) != $reg;
@@ -4493,11 +4500,20 @@ sub lm80_detect
  		return unless $confidence > 0;
  		return $confidence;
  	} elsif ($chip = 1) {
+		return if (i2c_smbus_read_byte_data($file, 0x02) & 0xc0) != 0;
  		return if (i2c_smbus_read_byte_data($file, 0x07) & 0xfe) != 0;
  		return if i2c_smbus_read_byte_data($file, 0x3e) != 0x01;
  		return if i2c_smbus_read_byte_data($file, 0x3f) != 0x08;
 
Quoted 8 lines

Review sub lm80_detect · line 4512

Quoted 5 lines
(quoted diff) +4 -0
  		return 6;
+	} elsif ($chip = 2) {
+		return if (i2c_smbus_read_byte_data($file, 0x07) & 0xfe) != 0;
+		return if (i2c_smbus_read_byte_data($file, 0x08) & 0xfe) != 0;
+		return if (i2c_smbus_read_byte_data($file, 0x09) & 0xfe) != 0;

You could also check register 0x0c, which as 6 unused bits.

As well as 0x0b.

Quoted 4 lines

Review sub lm80_detect · line 4516

Quoted 4 lines
(quoted diff) +4 -0
+		return if i2c_smbus_read_byte_data($file, 0x3e) != 0x01;
+		return if i2c_smbus_read_byte_data($file, 0x3f) != 0x09;
+
+		return 6;

If I do all that, is that worth a higher rating ?

Thanks,
Guenter

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

#51 lore raw

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of TI ADC128D818

In reply to Guenter Roeck
Quoted 61 lines · Guenter Roeck
Quoted 16 lines · Jean Delvare

About the code itself:

Review sub lm92_detect · line 4447

Quoted 10 lines
(quoted diff) +4 -2
@@ -4436,11 +4441,13 @@ sub lm92_detect
  # Chip to detect: 0 = LM80, 1 = LM96080
  # Registers used:
  #   0x00: Configuration register
-#   0x02: Interrupt state register
-#   0x07: Converstion rate register (LM96080 only)
+#   0x02: Interrupt state register (LM80, LM96080 only)
+#   0x07: Converstion rate register (LM96080, ADC128D818 only)
+#   0x08: Oneshot register (ADC128D818 only)
+#   0x09: Shutdown register (ADC128D818 only)

The datasheet I have states that 0x09 is the One-Shot register and 0x0a is the Deep Shutdown register.

Funny, in the driver I got that right :-)

Quoted 11 lines
Quoted 11 lines
(quoted diff) +2 -2
  #   0x2a-0x3d: Limits registers (LM80 only)
-#   0x3e: Manufacturer's ID register (LM96080 only)
-#   0x3f: Stepping/die revision ID register (LM96080 only)
+#   0x3e: Manufacturer's ID register (LM96080, ADC128D818 only)
+#   0x3f: Stepping/die revision ID register (LM96080, ADC128D818 only)
  # The LM80 is easily misdetected since it doesn't provide identification
  # registers. So we have to use some tricks:
  #   - 6-bit addressing, so limits readings modulo 0x40 should be unchanged
@@ -4458,9 +4465,9 @@ sub lm80_detect
  	my ($i, $reg);
 
Quoted 5 lines

Review sub lm80_detect · line 4467

Quoted 1 line
(quoted diff) +0 -0
  	return if (i2c_smbus_read_byte_data($file, 0x00) & 0x80) != 0;

For the ADC128D818 you can even mask with 0xf4, slightly improving the reliability.

Ok.

Quoted 16 lines
Quoted 16 lines
(quoted diff) +2 -1
-	return if (i2c_smbus_read_byte_data($file, 0x02) & 0xc0) != 0;
 
  	if ($chip = 0) {
+		return if (i2c_smbus_read_byte_data($file, 0x02) & 0xc0) != 0;
  		for ($i = 0x2a; $i <= 0x3d; $i++) {
  			$reg = i2c_smbus_read_byte_data($file, $i);
  			return if i2c_smbus_read_byte_data($file, $i+0x40) != $reg;
@@ -4493,11 +4500,20 @@ sub lm80_detect
  		return unless $confidence > 0;
  		return $confidence;
  	} elsif ($chip = 1) {
+		return if (i2c_smbus_read_byte_data($file, 0x02) & 0xc0) != 0;
  		return if (i2c_smbus_read_byte_data($file, 0x07) & 0xfe) != 0;
  		return if i2c_smbus_read_byte_data($file, 0x3e) != 0x01;
  		return if i2c_smbus_read_byte_data($file, 0x3f) != 0x08;
 
Quoted 8 lines

Review sub lm80_detect · line 4512

Quoted 5 lines
(quoted diff) +4 -0
  		return 6;
+	} elsif ($chip = 2) {
+		return if (i2c_smbus_read_byte_data($file, 0x07) & 0xfe) != 0;
+		return if (i2c_smbus_read_byte_data($file, 0x08) & 0xfe) != 0;
+		return if (i2c_smbus_read_byte_data($file, 0x09) & 0xfe) != 0;

You could also check register 0x0c, which as 6 unused bits.

Quoted 8 lines

As well as 0x0b.

Quoted 4 lines

Review sub lm80_detect · line 4516

Quoted 4 lines
(quoted diff) +4 -0
+		return if i2c_smbus_read_byte_data($file, 0x3e) != 0x01;
+		return if i2c_smbus_read_byte_data($file, 0x3f) != 0x09;
+
+		return 6;

If I do all that, is that worth a higher rating ?

It could be a 7, yes.

Signature · 6 lines
Jean Delvare

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

PATCH 1/1 sensors-detect: Add detection of IT8786E

In reply to Guenter Roeck
---
 CHANGES                    | 1 +
 prog/detect/sensors-detect | 6 ++++++
 2 files changed, 7 insertions(+)
CHANGES +1 -0
index e462aea..03eb7fb 100644
@@ -26,6 +26,7 @@ SVN HEAD
                   Add detection of EMC1422
                   Document driver support for TMP431 and TMP432
                   Add detection of TMP400 and TMP435
+                  Add detection of IT8786E
 
 3.3.5 "Happy Birthday Beddy" (2014-01-22)
   libsensors: Improve documentation of two functions
prog/detect/sensors-detect +6 -0
index ebdc439..9b7ba8f 100755
@@ -2388,6 +2388,12 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		devid => 0x8783,
 		logdev => 0x04,
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+	}, {
+		name => "ITE IT8786E Super IO Sensors",
+		driver => "to-be-written",	# it87
+		devid => 0x8786,
+		logdev => 0x04,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
 	}
 );
 
Signature · 7 lines
2.1.0


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

PATCH 1/1 sensors-detect: Add detection of IT8780F

In reply to Guenter Roeck

The chip does not seem to be widely used, but its datasheet is available, and superiotool has basic support for it, so it makes sense to detect it.

---
 CHANGES                    | 1 +
 prog/detect/sensors-detect | 6 ++++++
 2 files changed, 7 insertions(+)
CHANGES +1 -0
index 03eb7fb..9304ce2 100644
@@ -27,6 +27,7 @@ SVN HEAD
                   Document driver support for TMP431 and TMP432
                   Add detection of TMP400 and TMP435
                   Add detection of IT8786E
+                  Add detection of IT8780F
 
 3.3.5 "Happy Birthday Beddy" (2014-01-22)
   libsensors: Improve documentation of two functions
prog/detect/sensors-detect +6 -0
index 9b7ba8f..c5a49f5 100755
@@ -2371,6 +2371,12 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x04,
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
 	}, {
+		name => "ITE IT8780F Super IO Sensors",
+		driver => "to-be-written",	# it87
+		devid => 0x8780,
+		logdev => 0x04,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+	}, {
 		name => "ITE IT8781F Super IO Sensors",
 		driver => "to-be-written",	# it87
 		devid => 0x8781,
Signature · 7 lines
2.1.0


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

PATCH 1/1 sensors-detect: Add detection of IT8731F and IT8732F

In reply to Guenter Roeck

IT8731F is found on Lenovo M92p-2988.
IT8732F is found on Gigabyte GA-6LXSL.

---
 CHANGES                    |  1 +
 prog/detect/sensors-detect | 12 ++++++++++++
 2 files changed, 13 insertions(+)
CHANGES +1 -0
index 9304ce2..128699b 100644
@@ -28,6 +28,7 @@ SVN HEAD
                   Add detection of TMP400 and TMP435
                   Add detection of IT8786E
                   Add detection of IT8780F
+                  Add detection of IT8731F and IT8732F
 
 3.3.5 "Happy Birthday Beddy" (2014-01-22)
   libsensors: Improve documentation of two functions
prog/detect/sensors-detect +12 -0
index c5a49f5..6fb9218 100755
@@ -2353,6 +2353,18 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x04,
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
 	}, {
+		name => "ITE IT8731F Super IO Sensors",
+		driver => "to-be-written",	# it87
+		devid => 0x8731,
+		logdev => 0x04,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+	}, {
+		name => "ITE IT8732F Super IO Sensors",
+		driver => "to-be-written",	# it87
+		devid => 0x8732,
+		logdev => 0x04,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+	}, {
 		name => "ITE IT8752F Super IO Sensors",
 		driver => "to-be-written",	# it87
 		devid => 0x8752,
Signature · 7 lines
2.1.0


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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of IT8786E

In reply to Guenter Roeck

Hi Guenter,

Quoted 25 lines · Guenter Roeck
---
 CHANGES                    | 1 +
 prog/detect/sensors-detect | 6 ++++++
 2 files changed, 7 insertions(+)
CHANGES +1 -0
index e462aea..03eb7fb 100644
@@ -26,6 +26,7 @@ SVN HEAD
                   Add detection of EMC1422
                   Document driver support for TMP431 and TMP432
                   Add detection of TMP400 and TMP435
+                  Add detection of IT8786E
 
 3.3.5 "Happy Birthday Beddy" (2014-01-22)
   libsensors: Improve documentation of two functions
prog/detect/sensors-detect +0 -0
index ebdc439..9b7ba8f 100755
@@ -2388,6 +2388,12 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		devid => 0x8783,
 		logdev => 0x04,

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

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

Looks good, please commit.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of IT8780F

In reply to Guenter Roeck

Hi Guenter,

Quoted 28 lines · Guenter Roeck

The chip does not seem to be widely used, but its datasheet is available, and superiotool has basic support for it, so it makes sense to detect it.

---
 CHANGES                    | 1 +
 prog/detect/sensors-detect | 6 ++++++
 2 files changed, 7 insertions(+)
CHANGES +1 -0
index 03eb7fb..9304ce2 100644
@@ -27,6 +27,7 @@ SVN HEAD
                   Document driver support for TMP431 and TMP432
                   Add detection of TMP400 and TMP435
                   Add detection of IT8786E
+                  Add detection of IT8780F
 
 3.3.5 "Happy Birthday Beddy" (2014-01-22)
   libsensors: Improve documentation of two functions
prog/detect/sensors-detect +0 -0
index 9b7ba8f..c5a49f5 100755
@@ -2371,6 +2371,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 2382

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

Looks good, please commit.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of IT8731F and IT8732F

In reply to Guenter Roeck

Hi Guenter,

Quoted 34 lines · Guenter Roeck

IT8731F is found on Lenovo M92p-2988.
IT8732F is found on Gigabyte GA-6LXSL.

---
 CHANGES                    |  1 +
 prog/detect/sensors-detect | 12 ++++++++++++
 2 files changed, 13 insertions(+)
CHANGES +1 -0
index 9304ce2..128699b 100644
@@ -28,6 +28,7 @@ SVN HEAD
                   Add detection of TMP400 and TMP435
                   Add detection of IT8786E
                   Add detection of IT8780F
+                  Add detection of IT8731F and IT8732F
 
 3.3.5 "Happy Birthday Beddy" (2014-01-22)
   libsensors: Improve documentation of two functions
prog/detect/sensors-detect +5 -0
index c5a49f5..6fb9218 100755
@@ -2353,6 +2353,18 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x04,
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
 	}, {
+		name => "ITE IT8731F Super IO Sensors",
+		driver => "to-be-written",	# it87
+		devid => 0x8731,
+		logdev => 0x04,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,

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

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

Looks good, please commit.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

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

PATCH 1/1 sensors-detect: Add detection of Novoton NCT6793D

In reply to Guenter Roeck
---
 CHANGES                    | 1 +
 prog/detect/sensors-detect | 7 +++++++
 2 files changed, 8 insertions(+)
CHANGES +1 -0
index af4ee59..95fed99 100644
@@ -6,6 +6,7 @@ SVN HEAD
   sensors-detect: Fix systemd paths
                   Add detection of Fintek F81768
                   Only probe I/O ports on x86
+                  Add detection of Nuvoton NCT6793D
 
 3.4.0 (2015-06-25)
   documentation: Update the note about libsensors license
prog/detect/sensors-detect +7 -0
index 3a44141..234dc39 100755
@@ -2171,6 +2171,13 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x0b,
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
 	}, {
+		name => "Nuvoton NCT6793D Super IO Sensors",
+		driver => "nct6775",
+		devid => 0xD110,
+		devid_mask => 0xFFF0,
+		logdev => 0x0b,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+	}, {
 		name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors",
 		driver => "nct6775",
 		devid => 0xC450,
Signature · 7 lines
2.1.4


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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of Novoton NCT6793D

In reply to Guenter Roeck

Hi Guenter,

Quoted 26 lines · Guenter Roeck
---
 CHANGES                    | 1 +
 prog/detect/sensors-detect | 7 +++++++
 2 files changed, 8 insertions(+)
CHANGES +1 -0
index af4ee59..95fed99 100644
@@ -6,6 +6,7 @@ SVN HEAD
   sensors-detect: Fix systemd paths
                   Add detection of Fintek F81768
                   Only probe I/O ports on x86
+                  Add detection of Nuvoton NCT6793D
 
 3.4.0 (2015-06-25)
   documentation: Update the note about libsensors license
prog/detect/sensors-detect +0 -0
index 3a44141..234dc39 100755
@@ -2171,6 +2171,13 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x0b,
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
 	}, {

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

Quoted 10 lines
prog/detect/sensors-detect +7 -0
+		name => "Nuvoton NCT6793D Super IO Sensors",
+		driver => "nct6775",
+		devid => 0xD110,
+		devid_mask => 0xFFF0,
+		logdev => 0x0b,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+	}, {
 		name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors",
 		driver => "nct6775",
 		devid => 0xC450,

I can't check the device ID as I do not have the datasheet, but this looks good, please commit.

Please also add an entry for the NCT6793D to wiki/Devices.

Thanks,

Signature · 7 lines
Jean Delvare
SUSE L3 Support

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

Re: [lm-sensors] [PATCH] sensors-detect: Add detection of Novoton NCT6793D

In reply to Guenter Roeck
Quoted 1 line · Jean Delvare

Please also add an entry for the NCT6793D to wiki/Devices.

Now I see you did that already. Apparently I was looking at an outdated cached copy of the wiki page, sorry for the noise.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

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