aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwmon/Kconfig2
-rw-r--r--drivers/hwmon/it87.c43
2 files changed, 43 insertions, 2 deletions
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 848ddfe30ef8..25d9e72627e9 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -601,7 +601,7 @@ config SENSORS_IT87
601 If you say yes here you get support for ITE IT8705F, IT8712F, 601 If you say yes here you get support for ITE IT8705F, IT8712F,
602 IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, 602 IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E,
603 IT8771E, IT8772E, IT8781F, IT8782F, IT8783E/F, IT8786E, IT8790E, 603 IT8771E, IT8772E, IT8781F, IT8782F, IT8783E/F, IT8786E, IT8790E,
604 IT8603E, and IT8623E sensor chips, and the SiS950 clone. 604 IT8603E, IT8620E, and IT8623E sensor chips, and the SiS950 clone.
605 605
606 This driver can also be built as a module. If so, the module 606 This driver can also be built as a module. If so, the module
607 will be called it87. 607 will be called it87.
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index 80580cdf9a15..4e4db72d38e8 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -11,6 +11,7 @@
11 * similar parts. The other devices are supported by different drivers. 11 * similar parts. The other devices are supported by different drivers.
12 * 12 *
13 * Supports: IT8603E Super I/O chip w/LPC interface 13 * Supports: IT8603E Super I/O chip w/LPC interface
14 * IT8620E Super I/O chip w/LPC interface
14 * IT8623E Super I/O chip w/LPC interface 15 * IT8623E Super I/O chip w/LPC interface
15 * IT8705F Super I/O chip w/LPC interface 16 * IT8705F Super I/O chip w/LPC interface
16 * IT8712F Super I/O chip w/LPC interface 17 * IT8712F Super I/O chip w/LPC interface
@@ -69,7 +70,7 @@
69#define DRVNAME "it87" 70#define DRVNAME "it87"
70 71
71enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8771, 72enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8771,
72 it8772, it8781, it8782, it8783, it8786, it8790, it8603 }; 73 it8772, it8781, it8782, it8783, it8786, it8790, it8603, it8620 };
73 74
74static unsigned short force_id; 75static unsigned short force_id;
75module_param(force_id, ushort, 0); 76module_param(force_id, ushort, 0);
@@ -155,12 +156,14 @@ static inline void superio_exit(void)
155#define IT8786E_DEVID 0x8786 156#define IT8786E_DEVID 0x8786
156#define IT8790E_DEVID 0x8790 157#define IT8790E_DEVID 0x8790
157#define IT8603E_DEVID 0x8603 158#define IT8603E_DEVID 0x8603
159#define IT8620E_DEVID 0x8620
158#define IT8623E_DEVID 0x8623 160#define IT8623E_DEVID 0x8623
159#define IT87_ACT_REG 0x30 161#define IT87_ACT_REG 0x30
160#define IT87_BASE_REG 0x60 162#define IT87_BASE_REG 0x60
161 163
162/* Logical device 7 registers (IT8712F and later) */ 164/* Logical device 7 registers (IT8712F and later) */
163#define IT87_SIO_GPIO1_REG 0x25 165#define IT87_SIO_GPIO1_REG 0x25
166#define IT87_SIO_GPIO2_REG 0x26
164#define IT87_SIO_GPIO3_REG 0x27 167#define IT87_SIO_GPIO3_REG 0x27
165#define IT87_SIO_GPIO5_REG 0x29 168#define IT87_SIO_GPIO5_REG 0x29
166#define IT87_SIO_PINX1_REG 0x2a /* Pin selection */ 169#define IT87_SIO_PINX1_REG 0x2a /* Pin selection */
@@ -375,6 +378,14 @@ static const struct it87_devices it87_devices[] = {
375 | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_IN7_INTERNAL, 378 | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_IN7_INTERNAL,
376 .peci_mask = 0x07, 379 .peci_mask = 0x07,
377 }, 380 },
381 [it8620] = {
382 .name = "it8620",
383 .suffix = "E",
384 .features = FEAT_NEWER_AUTOPWM | FEAT_12MV_ADC | FEAT_16BIT_FANS
385 | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_FIVE_FANS
386 | FEAT_IN7_INTERNAL,
387 .peci_mask = 0x07,
388 },
378}; 389};
379 390
380#define has_16bit_fans(data) ((data)->features & FEAT_16BIT_FANS) 391#define has_16bit_fans(data) ((data)->features & FEAT_16BIT_FANS)
@@ -1850,6 +1861,9 @@ static int __init it87_find(unsigned short *address,
1850 case IT8623E_DEVID: 1861 case IT8623E_DEVID:
1851 sio_data->type = it8603; 1862 sio_data->type = it8603;
1852 break; 1863 break;
1864 case IT8620E_DEVID:
1865 sio_data->type = it8620;
1866 break;
1853 case 0xffff: /* No device at all */ 1867 case 0xffff: /* No device at all */
1854 goto exit; 1868 goto exit;
1855 default: 1869 default:
@@ -1985,6 +1999,33 @@ static int __init it87_find(unsigned short *address,
1985 sio_data->internal |= (1 << 3); /* in9 is AVCC */ 1999 sio_data->internal |= (1 << 3); /* in9 is AVCC */
1986 2000
1987 sio_data->beep_pin = superio_inb(IT87_SIO_BEEP_PIN_REG) & 0x3f; 2001 sio_data->beep_pin = superio_inb(IT87_SIO_BEEP_PIN_REG) & 0x3f;
2002 } else if (sio_data->type == it8620) {
2003 int reg;
2004
2005 superio_select(GPIO);
2006
2007 /* Check for fan4, fan5 */
2008 reg = superio_inb(IT87_SIO_GPIO2_REG);
2009 if (!(reg & (1 << 5)))
2010 sio_data->skip_fan |= (1 << 3);
2011 if (!(reg & (1 << 4)))
2012 sio_data->skip_fan |= (1 << 4);
2013
2014 /* Check for pwm3, fan3 */
2015 reg = superio_inb(IT87_SIO_GPIO3_REG);
2016 if (reg & (1 << 6))
2017 sio_data->skip_pwm |= (1 << 2);
2018 if (reg & (1 << 7))
2019 sio_data->skip_fan |= (1 << 2);
2020
2021 /* Check for pwm2, fan2 */
2022 reg = superio_inb(IT87_SIO_GPIO5_REG);
2023 if (reg & (1 << 1))
2024 sio_data->skip_pwm |= (1 << 1);
2025 if (reg & (1 << 2))
2026 sio_data->skip_fan |= (1 << 1);
2027
2028 sio_data->beep_pin = superio_inb(IT87_SIO_BEEP_PIN_REG) & 0x3f;
1988 } else { 2029 } else {
1989 int reg; 2030 int reg;
1990 bool uart6; 2031 bool uart6;