Linux Documentation
 help / color / mirror / Atom feed
From: Rosen Penev <rosenp@gmail.com>
To: linux-hwmon@vger.kernel.org, Guenter Roeck <linux@roeck-us.net>
Cc: Jean Delvare <jdelvare@suse.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-doc@vger.kernel.org (open list:DOCUMENTATION)
Subject: [PATCH hwmon-next] hwmon: (it87) Add support for IT8686E
Date: Sun, 22 Nov 2026 23:48:13 -0800	[thread overview]
Message-ID: <20261123074813.18577-1-rosenp@gmail.com> (raw)

The IT8686E is the main Super I/O chip on many Gigabyte AM4 and LGA1151
boards, often paired with an IT8792E. Its hardware monitoring block
matches the IT8689E: 12 mV ADC, 16-bit fan counters, six fans, six PWM
channels, six temperature inputs and the newer autopwm. The fan and
PWM pin multiplexing is read from the same GPIO registers.

Unlike the IT8689E, where AVCC3 is always present on in9, the IT8686E
only measures AVCC3 when bit 0 of the PINX2 register is set. Hide in9
when it isn't.

Tested on a Gigabyte X470 AORUS ULTRA GAMING (IT8686E rev 2 at 0xa40,
IT8792E at 0xa60). All six temperatures, fan1/fan2 and pwm1-pwm4 report
sensible values; the CPU temperature tracks k10temp. in9 is hidden,
since the board's BIOS does not set PINX2 bit 0. The board's BIOS
claims the chip's I/O ports in an ACPI OpRegion, so testing used
ignore_resource_conflict=1.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 An AI coding assistant (Claude Code, Claude Opus 5.5) was used to port
 the chip description from the out-of-tree it87 driver, write this patch
 and run the hardware tests.

 Documentation/hwmon/it87.rst | 17 +++++++++++++----
 drivers/hwmon/Kconfig        |  4 ++--
 drivers/hwmon/it87.c         | 32 +++++++++++++++++++++++++++++---
 3 files changed, 44 insertions(+), 9 deletions(-)

diff --git a/Documentation/hwmon/it87.rst b/Documentation/hwmon/it87.rst
index 17bfffb5fb11..defbcff4d5b8 100644
--- a/Documentation/hwmon/it87.rst
+++ b/Documentation/hwmon/it87.rst
@@ -41,6 +41,14 @@ Supported chips:
 
     Datasheet: Not publicly available
 
+  * IT8686E
+
+    Prefix: 'it8686'
+
+    Addresses scanned: from Super I/O config space (8 I/O ports)
+
+    Datasheet: Not publicly available
+
   * IT8689E
 
     Prefix: 'it8689'
@@ -252,7 +260,7 @@ Description
 -----------
 
 This driver implements support for the IT8603E, IT8607E, IT8620E, IT8623E, IT8628E,
-IT8689E, IT8705F, IT8712F, IT8716F, IT8718F, IT8720F, IT8721F, IT8726F,
+IT8686E, IT8689E, IT8705F, IT8712F, IT8716F, IT8718F, IT8720F, IT8721F, IT8726F,
 IT8728F, IT8732F, IT8758E, IT8771E, IT8772E, IT8781F, IT8782F, IT8783E/F,
 IT8786E, IT8790E, IT8792E/IT8795E, IT87952E and SiS950 chips.
 
@@ -304,7 +312,7 @@ with ``ignore_resource_conflict=1``.
 The IT8620E and IT8628E are custom designs, hardware monitoring part is similar
 to IT8728F. It only supports 16-bit fan mode. Both chips support up to 6 fans.
 
-The IT8689E supports newer autopwm, 12mV ADC, 16-bit fans, six fans, six PWM
+The IT8686E and IT8689E support newer autopwm, 12mV ADC, 16-bit fans, six fans, six PWM
 channels, PWM frequency 2, six temperature inputs, and AVCC3 (in9).
 
 The IT8790E, IT8792E/IT8795E and IT87952E support up to 3 fans. 16-bit fan
@@ -334,14 +342,15 @@ of 0.016 volt.  IT8603E, IT8721F/IT8758E and IT8728F can measure between 0 and
 2.8 volts with a resolution of 0.0109 volt.  The battery voltage in8 does not
 have limit registers.
 
-On the IT8603E, IT8620E, IT8628E, IT8689E, IT8721F/IT8758E, IT8732F, IT8781F,
+On the IT8603E, IT8620E, IT8628E, IT8686E, IT8689E, IT8721F/IT8758E, IT8732F, IT8781F,
 IT8782F, and IT8783E/F, some voltage inputs are internal and scaled inside the
 chip:
 
 * in3 (optional)
 * in7 (optional for IT8781F, IT8782F, and IT8783E/F)
 * in8 (always)
-* in9 (IT8603E, IT8622E, and IT8689E: always AVCC3; others: optional)
+* in9 (IT8603E, IT8622E, and IT8689E: always AVCC3;
+  IT8686E: AVCC3 if enabled; others: optional)
 
 The driver handles this transparently so user-space doesn't have to care.
 
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index bd408fc6f876..a99c8a127f4a 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -976,8 +976,8 @@ config SENSORS_IT87
 	  If you say yes here you get support for ITE IT8705F, IT8712F, IT8716F,
 	  IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8732F, IT8758E,
 	  IT8771E, IT8772E, IT8781F, IT8782F, IT8783E/F, IT8786E, IT8790E,
-	  IT8603E, IT8607E, IT8620E, IT8623E, IT8628E, and IT8689E sensor chips,
-	  and the SiS950 clone.
+	  IT8603E, IT8607E, IT8620E, IT8623E, IT8628E, IT8686E, and IT8689E
+	  sensor chips, and the SiS950 clone.
 
 	  This driver can also be built as a module. If so, the module
 	  will be called it87.
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index c6cdb04add1a..fa4fcd5f685f 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -17,6 +17,7 @@
  *            IT8622E  Super I/O chip w/LPC interface
  *            IT8623E  Super I/O chip w/LPC interface
  *            IT8628E  Super I/O chip w/LPC interface
+ *            IT8686E  Super I/O chip w/LPC interface
  *            IT8689E  Super I/O chip w/LPC interface
  *            IT8705F  Super I/O chip w/LPC interface
  *            IT8712F  Super I/O chip w/LPC interface
@@ -67,7 +68,7 @@
 
 enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8732,
 	     it8771, it8772, it8781, it8782, it8783, it8786, it8790,
-	     it8792, it8603, it8607, it8613, it8620, it8622, it8628, it8689, it87952 };
+	     it8792, it8603, it8607, it8613, it8620, it8622, it8628, it8686, it8689, it87952 };
 
 static struct platform_device *it87_pdev[2];
 
@@ -167,6 +168,7 @@ static inline void superio_exit(int ioreg, bool noexit)
 #define IT8622E_DEVID 0x8622
 #define IT8623E_DEVID 0x8623
 #define IT8628E_DEVID 0x8628
+#define IT8686E_DEVID 0x8686
 #define IT8689E_DEVID 0x8689
 #define IT87952E_DEVID 0x8695
 
@@ -576,6 +578,17 @@ static const struct it87_devices it87_devices[] = {
 		.num_temp_map = 3,
 		.peci_mask = 0x07,
 	},
+	[it8686] = {
+		.name = "it8686",
+		.model = "IT8686E",
+		.features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS
+		  | FEAT_TEMP_OFFSET | FEAT_SIX_FANS | FEAT_IN7_INTERNAL
+		  | FEAT_SIX_PWM | FEAT_PWM_FREQ2 | FEAT_SIX_TEMP | FEAT_AVCC3
+		  | FEAT_FANCTL_ONOFF,
+		.reg_pwm = IT87_REG_PWM,
+		.num_temp_map = 3,
+		.smbus_bitmap = BIT(1) | BIT(2),
+	},
 	[it8689] = {
 		.name = "it8689",
 		.model = "IT8689E",
@@ -2965,6 +2978,9 @@ static int __init it87_find(int sioaddr, unsigned short *address,
 	case IT8628E_DEVID:
 		sio_data->type = it8628;
 		break;
+	case IT8686E_DEVID:
+		sio_data->type = it8686;
+		break;
 	case IT8689E_DEVID:
 		sio_data->type = it8689;
 		break;
@@ -3222,7 +3238,7 @@ static int __init it87_find(int sioaddr, unsigned short *address,
 
 		sio_data->beep_pin = superio_inb(sioaddr,
 						 IT87_SIO_BEEP_PIN_REG) & 0x3f;
-	} else if (sio_data->type == it8689) {
+	} else if (sio_data->type == it8686 || sio_data->type == it8689) {
 		int reg;
 
 		superio_select(sioaddr, GPIO);
@@ -3263,7 +3279,17 @@ static int __init it87_find(int sioaddr, unsigned short *address,
 			sio_data->skip_fan |= BIT(5);
 		}
 
-		/* in9 (AVCC3) is always internal, no PINX2 check needed */
+		/*
+		 * in9 (AVCC3) is always internal on the IT8689E. On the
+		 * IT8686E, PINX2 bit 0 enables AVCC3 monitoring on in9.
+		 */
+		if (sio_data->type == it8686) {
+			reg = superio_inb(sioaddr, IT87_SIO_PINX2_REG);
+			if (!(reg & BIT(0))) {
+				sio_data->internal &= ~BIT(3);
+				sio_data->skip_in |= BIT(9);
+			}
+		}
 
 		sio_data->beep_pin = superio_inb(sioaddr,
 						 IT87_SIO_BEEP_PIN_REG) & 0x3f;
-- 
2.56.1


                 reply	other threads:[~2026-11-23  7:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261123074813.18577-1-rosenp@gmail.com \
    --to=rosenp@gmail.com \
    --cc=corbet@lwn.net \
    --cc=jdelvare@suse.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox