Skip to contentSkip to conversation

sensors-detect: Nuvoton chip updates

PATCH Superseded Guenter Roeck 3 participants 6 messages Jun 30, 2014 – Mar 3, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sensors-detect: Nuvoton chip updates

Add reference to nct6883 driver
Add detection of NCT6792D
Show that NCT6102D/6104D/6106D are supported by nct6775 driver

---
 CHANGES                    |  3 +++
 prog/detect/sensors-detect | 11 +++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)
CHANGES +3 -0
index a16e7be..f8d96df 100644
@@ -14,6 +14,9 @@ SVN HEAD
                   Add detection of TMP441, TMP442, LM95233, LM95234,
                   and LM95235
                   Add detection of NCT7802Y
+                  Add reference to nct6883 driver
+                  Add detection of NCT6792D
+                  Show that NCT6102D/6104D/6106D are supported by nct6775 driver
 
 3.3.5 "Happy Birthday Beddy" (2014-01-22)
   libsensors: Improve documentation of two functions
prog/detect/sensors-detect +9 -2
index 9ce0cf2..1e6f140 100755
@@ -2111,7 +2111,7 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
 	}, {
 		name => "Nuvoton NCT6683D eSIO",
-		driver => "to-be-written",
+		driver => "nct6883",
 		devid => 0xC730,
 		devid_mask => 0xFFF0,
 		logdev => 0x0b,
@@ -2124,8 +2124,15 @@ use constant FEAT_SMBUS	=> (1 << 7);
 		logdev => 0x0b,
 		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
 	}, {
-		name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors",
+		name => "Nuvoton NCT6792D Super IO Sensors",
 		driver => "to-be-written",	# nct6775
+		devid => 0xC910,
+		devid_mask => 0xFFF0,
+		logdev => 0x0b,
+		features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
+	}, {
+		name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors",
+		driver => "nct6775",
 		devid => 0xC450,
 		devid_mask => 0xFFF0,
 		logdev => 0x0b,
Signature · 7 lines
1.9.1


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

PATCH 1/1 sensors-detect: Nuvoton chip updates

Document driver support for NCT7802Y.
Add detection of NCT7904D.

Cc Vadim V. Vlasov <[email protected]>
---
 CHANGES                    |  2 ++
 prog/detect/sensors-detect | 33 ++++++++++++++++++++++++++++++++-
 2 files changed, 34 insertions(+), 1 deletion(-)
CHANGES +2 -0
index 9237506..5db9fa1 100644
@@ -32,6 +32,8 @@ SVN HEAD
                   Add detection of Intel 5500/5520/X58
                   Loosen detection rules for TS3000/TSE2002
                   Add detection of TSE2004 and TS3001
+                  Document driver support for NCT7802Y
+                  Add detection of NCT7904D
 
 3.3.5 "Happy Birthday Beddy" (2014-01-22)
   libsensors: Improve documentation of two functions
prog/detect/sensors-detect +32 -1
index 8fb1ae3..436cf95 100755
@@ -734,10 +734,15 @@ use vars qw(@i2c_adapter_names);
 		i2c_detect => sub { w83795_detect(@_); },
 	}, {
 		name => "Nuvoton NCT7802Y",
-		driver => "to-be-written",
+		driver => "nct7802",
 		i2c_addrs => [0x28..0x2f],
 		i2c_detect => sub { nct7802_detect(@_); },
 	}, {
+		name => "Nuvoton NCT7904D",
+		driver => "nct7904",
+		i2c_addrs => [0x2d..0x2e],
+		i2c_detect => sub { nct7904_detect(@_); },
+	}, {
 		name => "Winbond W83627HF",
 		driver => "use-isa-instead",
 		i2c_addrs => [0x28..0x2f],
@@ -5635,6 +5640,32 @@ sub nct7802_detect
 }
 
 # Registers used:
+#   0x7a: Vendor ID
+#   0x7b: Chip ID
+#   0x7c: Device ID
+#   0xff: Bank Select
+#
+sub nct7904_detect
+{
+	my ($reg);
+	my ($file, $addr) = @_;
+
+	$reg = i2c_smbus_read_byte_data($file, 0x7a);
+	return unless $reg = 0x50;
+
+	$reg = i2c_smbus_read_byte_data($file, 0x7b);
+	return unless $reg = 0xc5;
+
+	$reg = i2c_smbus_read_byte_data($file, 0x7c);
+	return unless ($reg & 0xf0) = 0x50;
+
+	$reg = i2c_smbus_read_byte_data($file, 0xff);
+	return unless ($reg & 0xf8) = 0x00;
+
+	return 8;
+}
+
+# Registers used:
 #   0x48: Full I2C Address
 #   0x4e: Vendor ID byte selection
 #   0x4f: Vendor ID
Signature · 7 lines
2.1.0


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

Hi Guenter,

Quoted 10 lines · Guenter Roeck

Document driver support for NCT7802Y.
Add detection of NCT7904D.

Cc Vadim V. Vlasov <[email protected]>
---
 CHANGES                    |  2 ++
 prog/detect/sensors-detect | 33 ++++++++++++++++++++++++++++++++-
 2 files changed, 34 insertions(+), 1 deletion(-)

(...)

Looks good to me, please commit.

Do you have a full register dump of the NCT7904D that you could share with me? Or maybe Vadim does?

Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#3 lore raw
In reply to Guenter Roeck
Quoted 14 lines · Jean Delvare

Hi Guenter,

Quoted 10 lines · Guenter Roeck

Document driver support for NCT7802Y.
Add detection of NCT7904D.

Cc Vadim V. Vlasov <[email protected]>
---
  CHANGES                    |  2 ++
  prog/detect/sensors-detect | 33 ++++++++++++++++++++++++++++++++-
  2 files changed, 34 insertions(+), 1 deletion(-)

(...)

Quoted 5 lines

Looks good to me, please commit.

Do you have a full register dump of the NCT7904D that you could share with me? Or maybe Vadim does?

Not me, sorry.

Guenter

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

#4 lore raw
In reply to Guenter Roeck

Hi Jean!

Quoted 3 lines · Jean Delvare

Do you have a full register dump of the NCT7904D that you could share with me? Or maybe Vadim does?

Please find the dump below.
The rest of the banks are the same as bank 5 (except for the bank number at 0xff).

Thanks.
Vadim.

---
[root@localhost ~]# i2cdump 11 0x2e
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-11, address 0x2e, mode byte Continue? [Y/n]

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 31 43 ff ff ff ff ff ff 00 01 00 ff 5c 50 c5 51    1C.......?..\P?Q
10: ff ff ff ff ff ff ff ff 00 00 ff ff ff ff ff ff    ................
20: 40 d5 03 00 fb 00 0f 0f 0f ff 02 0a 00 02 00 00    @??.?.???.??.?..
30: 00 00 00 a0 00 00 68 2a ef 50 00 44 00 db 09 73    ...?..h*?P.D.??s
40: 29 07 00 00 00 00 00 00 00 00 00 00 44 03 00 00    )?..........D?..
50: 73 01 00 00 32 03 00 00 38 03 00 00 46 00 46 00    s?..2?..8?..F.F.
60: 46 01 23 02 00 00 00 00 00 00 ff ff ff ff ff ff    F?#?............
70: ff ff ff ff ff ff ff ff ff ff 50 c5 51 ff ff ff    ..........P?Q...
80: ff 1f ff 1f ff 1f ff 1f ff 1f ff 1f ff 1f ff 1f    .?.?.?.?.?.?.?.?
90: ff 1f ff 1f 00 00 00 00 ff ff ff ff ff ff ff ff    .?.?............
a0: 2c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ,...............
b0: 00 00 00 00 ff ff ff ff 00 00 00 00 00 00 00 00    ................
c0: 10 ff ff 1d 00 ff 03 00 00 00 40 ff ff 1f 01 ff    ?..?..?...@..??.
d0: 0f 0f 0f 0f 4f ff 00 00 00 00 00 00 00 00 00 00    ????O...........
e0: 00 00 00 00 00 00 ff ff 60 7f 00 00 00 0f 00 00    ........`?...?..
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00    ................
[root@localhost ~]# i2cset -y 11 0x2e 0xff 1
[root@localhost ~]# i2cdump -y 11 0x2e
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: ff 07 00 00 ff 07 00 00 ff 07 00 00 ff 07 00 00    .?...?...?...?..
10: ff 07 00 00 ff 07 00 00 ff 07 00 00 ff 07 00 00    .?...?...?...?..
20: ff 07 00 00 ff 07 00 00 ff 07 00 00 ff 07 00 00    .?...?...?...?..
30: ff 07 00 00 ff 07 00 00 ff 07 00 00 ff 07 00 00    .?...?...?...?..
40: ff 07 00 00 64 5f 55 50 ff ff ff ff ff ff ff ff    .?..d_UP........
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
60: ff 1f ff 1f ff 1e ff 1e ff 1e ff 1e ff 1e ff 1e    .?.?.?.?.?.?.?.?
70: ff 1e ff 1e ff 1e ff 1e ff ff 50 c5 51 ff ff ff    .?.?.?.?..P?Q...
80: ff 07 00 00 ff 07 00 00 ff 07 00 00 ff ff ff ff    .?...?...?......
90: 64 5f 55 50 64 5f 55 50 64 5f 55 50 64 5f 55 50    d_UPd_UPd_UPd_UP
a0: 64 5f 55 50 64 5f 55 50 64 5f 55 50 64 5f 55 50    d_UPd_UPd_UPd_UP
b0: 78 73 64 5f 78 73 64 5f 78 73 64 5f 78 73 64 5f    xsd_xsd_xsd_xsd_
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
d0: 4f 00 00 00 00 ff ff ff 00 00 00 00 00 00 00 ff    O...............
e0: 00 00 00 00 ff ff ff ff 01 ff ff ff ff ff ff ff    ........?.......
f0: ff ff ff ff 40 01 00 ff 00 00 00 00 00 ff 02 01    ....@?........??
[root@localhost ~]# i2cset -y 11 0x2e 0xff 2
[root@localhost ~]# i2cdump -y 11 0x2e
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 18 01 00 40 01 00 01 01 00 00 00 00 03 ff 12 62    ??.@?.??....?.?b
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
20: 00 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff    ................
30: f8 80 f8 80 f8 80 f8 80 f8 80 f8 80 f8 80 f8 80    ????????????????
40: 00 a0 00 00 00 00 00 00 00 00 00 ff 00 00 00 00    .?..............
50: 90 01 08 00 00 00 00 00 ff ff ff ff ff ff ff ff    ???.............
60: 20 00 00 00 08 00 00 00 00 ff 00 ff 00 00 00 00     ...?...........
70: 00 00 00 00 ff ff ff ff ff ff 50 c5 51 ff ff ff    ..........P?Q...
80: 03 10 ff ff 00 00 00 00 00 00 00 00 00 00 00 00    ??..............
90: 00 00 00 00 00 00 00 00 00 00 00 00 f3 f3 f3 f3    ............????
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
c0: ff 07 ff ff 00 00 00 00 00 00 00 00 00 00 00 ff    .?..............
d0: 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07    ...?...?...?...?
e0: 00 00 00 07 00 00 00 07 00 00 00 07 00 00 00 07    ...?...?...?...?
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 02    ...............?
[root@localhost ~]# i2cset -y 11 0x2e 0xff 3
[root@localhost ~]# i2cdump -y 11 0x2e
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 01 02 00 00 7f 0a 0a 00 02 04 05 00 00 00 00 00    ??..???.???.....
10: 8e 2c 7f 7f 08 08 84 84 00 ff ff 10 00 ff ff ff    ?,??????...?....
20: 47 3c 5a 5a 53 53 53 53 00 00 00 00 14 14 14 14    G<ZZSSSS....????
30: 19 1e 28 32 2f 6f af ff 26 2b 30 35 00 20 40 60    ??(2/o?.&+05. @`
40: 19 23 2d 37 8c aa c8 e6 19 23 2d 37 8c aa c8 e6    ?#-7?????#-7????
50: 00 80 00 ff ff ff ff ff 8e 2c 8c 8c 00 00 00 00    .?......?,??....
60: ff ff ff ff 00 00 00 00 00 00 00 00 ff ff ff ff    ................
70: 00 00 00 00 ff ff ff ff ff ff 50 c5 51 ff ff ff    ..........P?Q...
80: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff    ................
90: 00 00 80 00 00 07 ff ff ff ff ff ff ff ff ff ff    ..?..?..........
a0: 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 03    ...............?
[root@localhost ~]# i2cset -y 11 0x2e 0xff 4
[root@localhost ~]# i2cdump -y 11 0x2e
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 ff ff    ................
10: 5a 5a 5a 5a 5a 5a ff ff ff ff ff ff ff ff ff ff    ZZZZZZ..........
20: 53 53 53 53 53 53 ff ff ff ff ff ff ff ff ff ff    SSSSSS..........
30: 19 23 2d 37 8c aa c8 e6 19 23 2d 37 8c aa c8 e6    ?#-7?????#-7????
40: 19 23 2d 37 8c aa c8 e6 19 23 2d 37 8c aa c8 e6    ?#-7?????#-7????
50: 19 23 2d 37 8c aa c8 e6 19 23 2d 37 8c aa c8 e6    ?#-7?????#-7????
60: ff ff ff ff 8c 8c 8c 8c 8c 8c ff ff ff ff ff ff    ....??????......
70: ff ff ff ff ff ff ff ff ff ff 50 c5 51 ff ff ff    ..........P?Q...
80: ff ff ff ff ff ff ff ff 3c 50 3c 50 3c 50 3c 50    ........<P<P<P<P
90: 3c 50 3c 50 3c 50 3c 50 33 33 33 33 33 33 33 33    <P<P<P<P33333333
a0: 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 00 00    ................
b0: 8e 2c 7f 7f 00 00 00 00 00 00 00 00 ff ff ff ff    ?,??............
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 04    ...............?
[root@localhost ~]# i2cset -y 11 0x2e 0xff 5
[root@localhost ~]# i2cdump -y 11 0x2e
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
70: ff ff ff ff ff ff ff ff ff ff 50 c5 51 ff ff ff    ..........P?Q...
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 05    ...............?

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

#5 lore raw
In reply to Guenter Roeck
Quoted 11 lines · Vadim V. Vlasov

Hi Jean!

Quoted 3 lines · Jean Delvare

Do you have a full register dump of the NCT7904D that you could share with me? Or maybe Vadim does?

Please find the dump below.
The rest of the banks are the same as bank 5 (except for the bank number at 0xff).

Thanks Vadim. FYI you can pass the bank register and value to i2cdump so you don't need to call i2cset beforehand.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

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