Browse Source

hwmon: (it87) Add support for IT8771E and IT8772E

Assume that IT8771E and IT8772E are fully compatible with IT8728F.

IT8771E support contributed by Kelly Anderson.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
Guenter Roeck 13 years ago
parent
commit
b06367070d
3 changed files with 49 additions and 9 deletions
  1. 12 4
      Documentation/hwmon/it87
  2. 2 1
      drivers/hwmon/Kconfig
  3. 35 4
      drivers/hwmon/it87.c

+ 12 - 4
Documentation/hwmon/it87

@@ -30,6 +30,14 @@ Supported chips:
     Prefix: 'it8728'
     Prefix: 'it8728'
     Addresses scanned: from Super I/O config space (8 I/O ports)
     Addresses scanned: from Super I/O config space (8 I/O ports)
     Datasheet: Not publicly available
     Datasheet: Not publicly available
+  * IT8771E
+    Prefix: 'it8771'
+    Addresses scanned: from Super I/O config space (8 I/O ports)
+    Datasheet: Not publicly available
+  * IT8772E
+    Prefix: 'it8772'
+    Addresses scanned: from Super I/O config space (8 I/O ports)
+    Datasheet: Not publicly available
   * IT8782F
   * IT8782F
     Prefix: 'it8782'
     Prefix: 'it8782'
     Addresses scanned: from Super I/O config space (8 I/O ports)
     Addresses scanned: from Super I/O config space (8 I/O ports)
@@ -83,8 +91,8 @@ Description
 -----------
 -----------
 
 
 This driver implements support for the IT8705F, IT8712F, IT8716F,
 This driver implements support for the IT8705F, IT8712F, IT8716F,
-IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, IT8781F, IT8782F,
-IT8783E/F, and SiS950 chips.
+IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, IT8771E, IT8772E,
+IT8782F, IT8783E/F, and SiS950 chips.
 
 
 These chips are 'Super I/O chips', supporting floppy disks, infrared ports,
 These chips are 'Super I/O chips', supporting floppy disks, infrared ports,
 joysticks and other miscellaneous stuff. For hardware monitoring, they
 joysticks and other miscellaneous stuff. For hardware monitoring, they
@@ -118,8 +126,8 @@ The IT8726F is just bit enhanced IT8716F with additional hardware
 for AMD power sequencing. Therefore the chip will appear as IT8716F
 for AMD power sequencing. Therefore the chip will appear as IT8716F
 to userspace applications.
 to userspace applications.
 
 
-The IT8728F is considered compatible with the IT8721F, until a datasheet
-becomes available (hopefully.)
+The IT8728F, IT8771E, and IT8772E are considered compatible with the IT8721F,
+until a datasheet becomes available (hopefully.)
 
 
 Temperatures are measured in degrees Celsius. An alarm is triggered once
 Temperatures are measured in degrees Celsius. An alarm is triggered once
 when the Overtemperature Shutdown limit is crossed.
 when the Overtemperature Shutdown limit is crossed.

+ 2 - 1
drivers/hwmon/Kconfig

@@ -506,7 +506,8 @@ config SENSORS_IT87
 	help
 	help
 	  If you say yes here you get support for ITE IT8705F, IT8712F,
 	  If you say yes here you get support for ITE IT8705F, IT8712F,
 	  IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E,
 	  IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E,
-	  IT8782F, and IT8783E/F sensor chips, and the SiS950 clone.
+	  IT8771E, IT8772E, IT8782F, and IT8783E/F sensor chips, and the
+	  SiS950 clone.
 
 
 	  This driver can also be built as a module.  If so, the module
 	  This driver can also be built as a module.  If so, the module
 	  will be called it87.
 	  will be called it87.

+ 35 - 4
drivers/hwmon/it87.c

@@ -19,6 +19,8 @@
  *            IT8726F  Super I/O chip w/LPC interface
  *            IT8726F  Super I/O chip w/LPC interface
  *            IT8728F  Super I/O chip w/LPC interface
  *            IT8728F  Super I/O chip w/LPC interface
  *            IT8758E  Super I/O chip w/LPC interface
  *            IT8758E  Super I/O chip w/LPC interface
+ *            IT8771E  Super I/O chip w/LPC interface
+ *            IT8772E  Super I/O chip w/LPC interface
  *            IT8782F  Super I/O chip w/LPC interface
  *            IT8782F  Super I/O chip w/LPC interface
  *            IT8783E/F Super I/O chip w/LPC interface
  *            IT8783E/F Super I/O chip w/LPC interface
  *            Sis950   A clone of the IT8705F
  *            Sis950   A clone of the IT8705F
@@ -61,8 +63,8 @@
 
 
 #define DRVNAME "it87"
 #define DRVNAME "it87"
 
 
-enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8782,
-	     it8783 };
+enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8771,
+	     it8772, it8782, it8783 };
 
 
 static unsigned short force_id;
 static unsigned short force_id;
 module_param(force_id, ushort, 0);
 module_param(force_id, ushort, 0);
@@ -140,6 +142,8 @@ static inline void superio_exit(void)
 #define IT8721F_DEVID 0x8721
 #define IT8721F_DEVID 0x8721
 #define IT8726F_DEVID 0x8726
 #define IT8726F_DEVID 0x8726
 #define IT8728F_DEVID 0x8728
 #define IT8728F_DEVID 0x8728
+#define IT8771E_DEVID 0x8771
+#define IT8772E_DEVID 0x8772
 #define IT8782F_DEVID 0x8782
 #define IT8782F_DEVID 0x8782
 #define IT8783E_DEVID 0x8783
 #define IT8783E_DEVID 0x8783
 #define IT87_ACT_REG  0x30
 #define IT87_ACT_REG  0x30
@@ -281,6 +285,24 @@ static const struct it87_devices it87_devices[] = {
 		  | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI,
 		  | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI,
 		.peci_mask = 0x07,
 		.peci_mask = 0x07,
 	},
 	},
+	[it8771] = {
+		.name = "it8771",
+		.features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS
+		  | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI,
+					/* PECI: guesswork */
+					/* 12mV ADC (OHM) */
+					/* 16 bit fans (OHM) */
+		.peci_mask = 0x07,
+	},
+	[it8772] = {
+		.name = "it8772",
+		.features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS
+		  | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI,
+					/* PECI (coreboot) */
+					/* 12mV ADC (HWSensors4, OHM) */
+					/* 16 bit fans (HWSensors4, OHM) */
+		.peci_mask = 0x07,
+	},
 	[it8782] = {
 	[it8782] = {
 		.name = "it8782",
 		.name = "it8782",
 		.features = FEAT_16BIT_FANS | FEAT_TEMP_OFFSET
 		.features = FEAT_16BIT_FANS | FEAT_TEMP_OFFSET
@@ -1708,6 +1730,12 @@ static int __init it87_find(unsigned short *address,
 	case IT8728F_DEVID:
 	case IT8728F_DEVID:
 		sio_data->type = it8728;
 		sio_data->type = it8728;
 		break;
 		break;
+	case IT8771E_DEVID:
+		sio_data->type = it8771;
+		break;
+	case IT8772E_DEVID:
+		sio_data->type = it8772;
+		break;
 	case IT8782F_DEVID:
 	case IT8782F_DEVID:
 		sio_data->type = it8782;
 		sio_data->type = it8782;
 		break;
 		break;
@@ -1825,10 +1853,11 @@ static int __init it87_find(unsigned short *address,
 
 
 		reg = superio_inb(IT87_SIO_GPIO3_REG);
 		reg = superio_inb(IT87_SIO_GPIO3_REG);
 		if (sio_data->type == it8721 || sio_data->type == it8728 ||
 		if (sio_data->type == it8721 || sio_data->type == it8728 ||
+		    sio_data->type == it8771 || sio_data->type == it8772 ||
 		    sio_data->type == it8782) {
 		    sio_data->type == it8782) {
 			/*
 			/*
 			 * IT8721F/IT8758E, and IT8782F don't have VID pins
 			 * IT8721F/IT8758E, and IT8782F don't have VID pins
-			 * at all, not sure about the IT8728F.
+			 * at all, not sure about the IT8728F and compatibles.
 			 */
 			 */
 			sio_data->skip_vid = 1;
 			sio_data->skip_vid = 1;
 		} else {
 		} else {
@@ -1882,7 +1911,9 @@ static int __init it87_find(unsigned short *address,
 		if (reg & (1 << 0))
 		if (reg & (1 << 0))
 			sio_data->internal |= (1 << 0);
 			sio_data->internal |= (1 << 0);
 		if ((reg & (1 << 1)) || sio_data->type == it8721 ||
 		if ((reg & (1 << 1)) || sio_data->type == it8721 ||
-		    sio_data->type == it8728)
+		    sio_data->type == it8728 ||
+		    sio_data->type == it8771 ||
+		    sio_data->type == it8772)
 			sio_data->internal |= (1 << 1);
 			sio_data->internal |= (1 << 1);
 
 
 		/*
 		/*