hwmon: (it87) Add support for IT8689E
Subsystems (3)
PATCH 1/1 hwmon: (it87) Add support for IT8689E
Add support for the ITE IT8689E Super I/O chip. The IT8689E supports newer autopwm, 12mV ADC, 16-bit fans, six fans, six PWM channels, PWM frequency 2, six temperature inputs, and AVCC3.
--- drivers/hwmon/it87.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
drivers/hwmon/it87.c +14 -1
@@ -16,6 +16,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 +* IT8689E Super I/O chip w/LPC interface * IT8705F Super I/O chip w/LPC interface * IT8712F Super I/O chip w/LPC interface * IT8716F Super I/O chip w/LPC interface
@@ -64,7 +65,7 @@enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8732, it8771, it8772, it8781, it8782, it8783, it8786, it8790, - it8792, it8603, it8620, it8622, it8628, it87952 }; + it8792, it8603, it8620, it8622, it8628, it8689, it87952 };static struct platform_device *it87_pdev[2 ];
@@ -162,6 +163,7 @@ static inline void superio_exit(int ioreg, bool noexit)#define IT8622E_DEVID 0x8622#define IT8623E_DEVID 0x8623#define IT8628E_DEVID 0x8628 +#define IT8689E_DEVID 0x8689#define IT87952E_DEVID 0x8695/* Logical device 4 (Environmental Monitor) registers */
@@ -502,6 +504,14 @@ static const struct it87_devices it87_devices[] = { | FEAT_SIX_TEMP | FEAT_VIN3_5V | FEAT_FANCTL_ONOFF, .peci_mask = 0x07, }, + [it8689] = { + .name = "it8689", + .model = "IT8689E", + .features =FEAT_NEWER_AUTOPWM |FEAT_12MV_ADC |FEAT_16BIT_FANS + |FEAT_SIX_FANS |FEAT_IN7_INTERNAL |FEAT_SIX_PWM + | FEAT_PWM_FREQ2 | FEAT_SIX_TEMP | FEAT_AVCC3, + .smbus_bitmap = BIT(1) | BIT(2), + }, [it87952] = { .name = "it87952", .model = "IT87952E",
@@ -2785,6 +2795,9 @@ static int __init it87_find(int sioaddr, unsigned short *address,case IT8628E_DEVID : sio_data->type = it8628;break ; +case IT8689E_DEVID : + sio_data->type = it8689; +break ;case IT87952E_DEVID : sio_data->type = it87952;break ;
Signature · 1 line
2.53.0
Guenter Roeck
maintainerQuoted 5 lines · Markus Hoffmann
Add support for the ITE IT8689E Super I/O chip. The IT8689E supports newer autopwm, 12mV ADC, 16-bit fans, six fans, six PWM channels, PWM frequency 2, six temperature inputs, and AVCC3.
Signed-off-by Markus Hoffmann <[email protected]>
Feedback from AI review (https://sashiko.dev/#/patchset/20260309223103.175443-1-markus%40thehoffs.at) inline.
Please address.
Thanks,
Guenter
Quoted 49 lines
--- drivers/hwmon/it87.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)drivers/hwmon/it87.c +11
-1@@ -16,6 +16,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 +* IT8689E Super I/O chip w/LPC interface * IT8705F Super I/O chip w/LPC interface * IT8712F Super I/O chip w/LPC interface * IT8716F Super I/O chip w/LPC interface @@ -64,7 +65,7 @@enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8732, it8771, it8772, it8781, it8782, it8783, it8786, it8790, - it8792, it8603, it8620, it8622, it8628, it87952 }; + it8792, it8603, it8620, it8622, it8628, it8689, it87952 };static struct platform_device *it87_pdev[2 ];@@ -162,6 +163,7 @@ static inline void superio_exit(int ioreg, bool noexit)#define IT8622E_DEVID 0x8622#define IT8623E_DEVID 0x8623#define IT8628E_DEVID 0x8628 +#define IT8689E_DEVID 0x8689#define IT87952E_DEVID 0x8695/* Logical device 4 (Environmental Monitor) registers */ @@ -502,6 +504,14 @@ static const struct it87_devices it87_devices[] = { | FEAT_SIX_TEMP | FEAT_VIN3_5V | FEAT_FANCTL_ONOFF, .peci_mask = 0x07, }, + [it8689] = { + .name = "it8689", + .model = "IT8689E", + .features =FEAT_NEWER_AUTOPWM |FEAT_12MV_ADC |FEAT_16BIT_FANS + |FEAT_SIX_FANS |FEAT_IN7_INTERNAL |FEAT_SIX_PWM + | FEAT_PWM_FREQ2 | FEAT_SIX_TEMP | FEAT_AVCC3, + .smbus_bitmap = BIT(1) | BIT(2), + }, [it87952] = { .name = "it87952", .model = "IT87952E",
drivers/hwmon/it87.c static int __init it87_find(int sioaddr, unsigned short *address, · line 2803
Quoted 9 lines
drivers/hwmon/it87.c +3
-0@@ -2785,6 +2795,9 @@ static int __init it87_find(int sioaddr, unsigned short *address,case IT8628E_DEVID : sio_data->type = it8628;break ; +case IT8689E_DEVID : + sio_data->type = it8689; +break ;case IT87952E_DEVID : sio_data->type = it87952;break ;
Does this patch introduce a regression by omitting it8689 from the GPIO pin multiplexing checks later in it87_find()?
Looking at the code, chips with 6 fans and AVCC like it8620 and it8628 have explicit checks to disable unrouted pins:
} else if (sio_data->type == it8620 || sio_data->type == it8628) {
int reg;
superio_select(sioaddr, GPIO);
/* Check for pwm5 */
reg = superio_inb(sioaddr, IT87_SIO_GPIO1_REG);
if (reg & BIT(6))
sio_data->skip_pwm |= BIT(4);Since it8689 is declared with FEAT_SIX_FANS, FEAT_SIX_PWM, and FEAT_AVCC3, falling into the default else block means it performs no checks for fans 4-6, PWMs 4-6, or AVCC.
Could this cause the driver to unconditionally expose 'ghost' fans, read garbage tachometer data, and expose non-functional PWM controls on motherboards where these pins are multiplexed as general-purpose I/O?
Guenter Roeck
maintainerQuoted 5 lines · Markus Hoffmann
Add support for the ITE IT8689E Super I/O chip. The IT8689E supports newer autopwm, 12mV ADC, 16-bit fans, six fans, six PWM channels, PWM frequency 2, six temperature inputs, and AVCC3.
Signed-off-by Markus Hoffmann <[email protected]>
This was sent twice, triggering a second AI review here:
https://sashiko.dev/#/patchset/20260309221602.167882-2-markus%40thehoffs.at
Please take a look.
Thanks,
Guenter
PATCH v2 1/1 hwmon: (it87) Add support for IT8689E
In reply to Markus HoffmannAdd support for the ITE IT8689E Super I/O chip. The IT8689E supports newer autopwm, 12mV ADC, 16-bit fans, six fans, six PWM channels, PWM frequency 2, six temperature inputs, and AVCC3.
---
Changes in v2:
- Add it8689 to the it8620/it8628 GPIO pin multiplexing checks in it87_find() to avoid exposing ghost fans, garbage tachometer data, and non-functional PWM controls on boards where those pins are multiplexed as general-purpose I/O.
drivers/hwmon/it87.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
drivers/hwmon/it87.c +16 -2
@@ -16,6 +16,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 +* IT8689E Super I/O chip w/LPC interface * IT8705F Super I/O chip w/LPC interface * IT8712F Super I/O chip w/LPC interface * IT8716F Super I/O chip w/LPC interface
@@ -64,7 +65,7 @@enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8732, it8771, it8772, it8781, it8782, it8783, it8786, it8790, - it8792, it8603, it8620, it8622, it8628, it87952 }; + it8792, it8603, it8620, it8622, it8628, it8689, it87952 };static struct platform_device *it87_pdev[2 ];
@@ -162,6 +163,7 @@ static inline void superio_exit(int ioreg, bool noexit)#define IT8622E_DEVID 0x8622#define IT8623E_DEVID 0x8623#define IT8628E_DEVID 0x8628 +#define IT8689E_DEVID 0x8689#define IT87952E_DEVID 0x8695/* Logical device 4 (Environmental Monitor) registers */
@@ -502,6 +504,14 @@ static const struct it87_devices it87_devices[] = { | FEAT_SIX_TEMP | FEAT_VIN3_5V | FEAT_FANCTL_ONOFF, .peci_mask = 0x07, }, + [it8689] = { + .name = "it8689", + .model = "IT8689E", + .features =FEAT_NEWER_AUTOPWM |FEAT_12MV_ADC |FEAT_16BIT_FANS + |FEAT_SIX_FANS |FEAT_IN7_INTERNAL |FEAT_SIX_PWM + | FEAT_PWM_FREQ2 | FEAT_SIX_TEMP | FEAT_AVCC3, + .smbus_bitmap = BIT(1) | BIT(2), + }, [it87952] = { .name = "it87952", .model = "IT87952E",
@@ -2785,6 +2795,9 @@ static int __init it87_find(int sioaddr, unsigned short *address,case IT8628E_DEVID : sio_data->type = it8628;break ; +case IT8689E_DEVID : + sio_data->type = it8689; +break ;case IT87952E_DEVID : sio_data->type = it87952;break ;
@@ -2952,7 +2965,8 @@ 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 == it8620 || sio_data->type == it8628) { + }else if (sio_data->type == it8620 || sio_data->type == it8628 || + sio_data->type == it8689) {int reg;superio_select (sioaddr,GPIO );
Signature · 1 line
2.53.0
Guenter Roeck
maintainerQuoted 4 lines · Markus Hoffmann
Add support for the ITE IT8689E Super I/O chip. The IT8689E supports newer autopwm, 12mV ADC, 16-bit fans, six fans, six PWM channels, PWM frequency 2, six temperature inputs, and AVCC3.
Quoted 8 lines
Signed-off-by Markus Hoffmann <[email protected]>---
Changes in v2:
- Add it8689 to the it8620/it8628 GPIO pin multiplexing checks init87_find()to avoid exposing ghost fans, garbage tachometer data, and non-functional PWM controls on boards where those pins are multiplexed as general-purpose I/O.
Sashiko still finds some problems:
https://sashiko.dev/#/patchset/20260320144323.4870-1-markus%40thehoffs.at
Thanks,
Guenter
Quoted 67 lines
drivers/hwmon/it87.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)drivers/hwmon/it87.c +16
-2@@ -16,6 +16,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 +* IT8689E Super I/O chip w/LPC interface * IT8705F Super I/O chip w/LPC interface * IT8712F Super I/O chip w/LPC interface * IT8716F Super I/O chip w/LPC interface @@ -64,7 +65,7 @@enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8732, it8771, it8772, it8781, it8782, it8783, it8786, it8790, - it8792, it8603, it8620, it8622, it8628, it87952 }; + it8792, it8603, it8620, it8622, it8628, it8689, it87952 };static struct platform_device *it87_pdev[2 ];@@ -162,6 +163,7 @@ static inline void superio_exit(int ioreg, bool noexit)#define IT8622E_DEVID 0x8622#define IT8623E_DEVID 0x8623#define IT8628E_DEVID 0x8628 +#define IT8689E_DEVID 0x8689#define IT87952E_DEVID 0x8695/* Logical device 4 (Environmental Monitor) registers */ @@ -502,6 +504,14 @@ static const struct it87_devices it87_devices[] = { | FEAT_SIX_TEMP | FEAT_VIN3_5V | FEAT_FANCTL_ONOFF, .peci_mask = 0x07, }, + [it8689] = { + .name = "it8689", + .model = "IT8689E", + .features =FEAT_NEWER_AUTOPWM |FEAT_12MV_ADC |FEAT_16BIT_FANS + |FEAT_SIX_FANS |FEAT_IN7_INTERNAL |FEAT_SIX_PWM + | FEAT_PWM_FREQ2 | FEAT_SIX_TEMP | FEAT_AVCC3, + .smbus_bitmap = BIT(1) | BIT(2), + }, [it87952] = { .name = "it87952", .model = "IT87952E",@@ -2785,6 +2795,9 @@ static int __init it87_find(int sioaddr, unsigned short *address,case IT8628E_DEVID : sio_data->type = it8628;break ; +case IT8689E_DEVID : + sio_data->type = it8689; +break ;case IT87952E_DEVID : sio_data->type = it87952;break ;@@ -2952,7 +2965,8 @@ 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 == it8620 || sio_data->type == it8628) { + }else if (sio_data->type == it8620 || sio_data->type == it8628 || + sio_data->type == it8689) {int reg;superio_select (sioaddr,GPIO );
PATCH v3 1/1 hwmon: (it87) Add support for IT8689E
In reply to Markus HoffmannAdd support for the ITE IT8689E Super I/O chip. The IT8689E supports newer autopwm, 12mV ADC, 16-bit fans, six fans, six PWM channels, PWM frequency 2, six temperature inputs, AVCC3, temperature offset, and fan on/off control.
Give it8689 its own GPIO configuration block in it87_find() rather than sharing the it8620/it8628 block. The shared block reads IT87_SIO_PINX2_REG and either marks IN3 as internal AVCC or skips IN9. Because it8689 declares FEAT_AVCC3, IN9 is already marked as always-internal before the GPIO block is reached; applying the PINX2 check would either create duplicate AVCC labels on IN3 and IN9 or incorrectly skip IN9.
Also update Documentation/hwmon/it87.rst and drivers/hwmon/Kconfig to document the newly supported chip.
---
Changes in v3:
- Fix AVCC/PINX2 conflict: give it8689 its own GPIO block instead of sharing the it8620/it8628 block. The shared block applies an IT87_SIO_PINX2_REG check that is incompatible with FEAT_AVCC3:
it either creates duplicate AVCC labels on IN3 and IN9, or skips IN9 while its label remains visible. it8622 (also FEAT_AVCC3) is handled the same way for the same reason.
- Add FEAT_TEMP_OFFSET: verified on hardware, temp[1-3]_offset sysfs attributes respond correctly.
- Add FEAT_FANCTL_ONOFF: verified on hardware, writing 0 to pwm1_enable is accepted.
- Add Documentation/hwmon/it87.rst entry for IT8689E, update the chip list in the Description section, add IT8689E description paragraph, and fix the in9 note to also list IT8622E (which also has FEAT_AVCC3).
- Add IT8689E to drivers/hwmon/Kconfig help text.
Changes in v2:
- Add it8689 to the GPIO pin multiplexing checks in it87_find() to avoid ghost fans and non-functional PWM controls.
Documentation/hwmon/it87.rst | 26 +++++++++++---- drivers/hwmon/Kconfig | 4 +-- drivers/hwmon/it87.c | 61 +++++++++++++++++++++++++++++++++++- 3 files changed, 82 insertions(+), 9 deletions(-)
Documentation/hwmon/it87.rst +20 -6
@@ -25,6 +25,14 @@ Supported chips: Datasheet: Not publicly available + * IT8689E + + Prefix: 'it8689' + + Addresses scanned: from Super I/O config space (8 I/O ports) + + Datasheet: Not publicly available + * IT8705F Prefix: 'it87'
@@ -228,9 +236,9 @@ Description ----------- This driver implements support for the IT8603E, IT8620E, IT8623E, IT8628E, -IT8705F, IT8712F, IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8732F, -IT8758E, IT8771E, IT8772E, IT8781F, IT8782F, IT8783E/F, IT8786E, IT8790E, -IT8792E/IT8795E, IT87952E and SiS950 chips. +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. These chips are 'Super I/O chips', supporting floppy disks, infrared ports, joysticks and other miscellaneous stuff. For hardware monitoring, they
@@ -274,6 +282,9 @@ of the fan is not supported (value 0 of pwmX_enable). 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 +channels, PWM frequency 2, six temperature inputs, and AVCC3 (in9). + The IT8790E, IT8792E/IT8795E and IT87952E support up to 3 fans. 16-bit fan mode is always enabled.
@@ -301,12 +312,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, IT8721F/IT8758E, IT8732F, IT8781F, IT8782F, -and IT8783E/F, some voltage inputs are internal and scaled inside the chip: +On the IT8603E, IT8620E, IT8628E, 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 (relevant for IT8603E only) +* in9 (IT8603E, IT8622E, and IT8689E: always AVCC3; others: optional) + The driver handles this transparently so user-space doesn't have to care. The VID lines (IT8712F/IT8716F/IT8718F/IT8720F) encode the core voltage value:
drivers/hwmon/Kconfig +2 -2
@@ -936,8 +936,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, IT8620E, IT8623E, and IT8628E sensor chips, and the SiS950 - clone. + IT8603E, IT8620E, IT8623E, IT8628E, 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.
drivers/hwmon/it87.c +60 -1
97 lines not on this page · raw message
Signature · 1 line
2.53.0
Quoted 13 lines · Markus Hoffmann
Add support for the ITE IT8689E Super I/O chip. The IT8689E supports newer autopwm, 12mV ADC, 16-bit fans, six fans, six PWM channels, PWM frequency 2, six temperature inputs, AVCC3, temperature offset, and fan on/off control.
Give it8689 its own GPIO configuration block in
it87_find()rather than sharing the it8620/it8628 block. The shared block readsIT87_SIO_PINX2_REGand either marks IN3 as internal AVCC or skips IN9. Because it8689 declaresFEAT_AVCC3, IN9 is already marked as always-internal before the GPIO block is reached; applying the PINX2 check would either create duplicate AVCC labels on IN3 and IN9 or incorrectly skip IN9.
Quoted 4 lines
Also update
Documentation/hwmon/it87.rstanddrivers/hwmon/Kconfigto document the newly supported chip.Signed-off-by Markus Hoffmann <[email protected]>
Applied.
Thanks,
Guenter
Markus,
Quoted 4 lines · Markus Hoffmann
Add support for the ITE IT8689E Super I/O chip. The IT8689E supports newer autopwm, 12mV ADC, 16-bit fans, six fans, six PWM channels, PWM frequency 2, six temperature inputs, AVCC3, temperature offset, and fan on/off control.
Sorry about leaving this until now, I only just noticed the small change within the patch set to add fan on/off control.
Quoted 12 lines
Give it8689 its own GPIO configuration block in
it87_find()rather than sharing the it8620/it8628 block. The shared block readsIT87_SIO_PINX2_REGand either marks IN3 as internal AVCC or skips IN9. Because it8689 declaresFEAT_AVCC3, IN9 is already marked as always-internal before the GPIO block is reached; applying the PINX2 check would either create duplicate AVCC labels on IN3 and IN9 or incorrectly skip IN9.Also update
Documentation/hwmon/it87.rstanddrivers/hwmon/Kconfigto document the newly supported chip.Signed-off-by Markus Hoffmann <[email protected]>
Quoted 12 lines
---
Changes in v3:
- Fix AVCC/PINX2 conflict: give it8689 its own GPIO block instead of sharing the it8620/it8628 block. The shared block applies anIT87_SIO_PINX2_REGcheck that is incompatible withFEAT_AVCC3:
it either creates duplicate AVCC labels on IN3 and IN9, or skips IN9 while its label remains visible. it8622 (alsoFEAT_AVCC3) is handled the same way for the same reason.
- AddFEAT_TEMP_OFFSET: verified on hardware, temp[1-3]_offset sysfs attributes respond correctly.
- AddFEAT_FANCTL_ONOFF: verified on hardware, writing 0 topwm1_enableis accepted.
While you say it is accepted, does it actually have any effect? I'm told by someone else playing with this chipset that this feature does not really do anything, although it also doesn't cause any operational issues.
Quoted 5 lines
- Add
Documentation/hwmon/it87.rstentry for IT8689E, update the chip list in the Description section, add IT8689E description paragraph, and fix the in9 note to also list IT8622E (which also hasFEAT_AVCC3).
- Add IT8689E todrivers/hwmon/Kconfighelp text.
Regards
Frank