From 13a3394e9584e4df2cfa0daf0b21dea1ea2b29ec Mon Sep 17 00:00:00 2001 From: andreychernyshev Date: Sat, 15 Apr 2017 15:07:44 +0300 Subject: [PATCH] Add support for IT8613E [groeck: Fix README] Signed-off-by: Guenter Roeck --- README | 4 ++++ TODO | 1 + it87.c | 29 +++++++++++++++++++++++++++-- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/README b/README index 055702c..0019580 100644 --- a/README +++ b/README @@ -6,6 +6,10 @@ Supported chips: Prefix: 'it8603' Addresses scanned: from Super I/O config space (8 I/O ports) Datasheet: Not publicly available + * IT8613E + Prefix: 'it8613' + Addresses scanned: from Super I/O config space (8 I/O ports) + Datasheet: Not publicly available * IT8620E Prefix: 'it8620' Addresses scanned: from Super I/O config space (8 I/O ports) diff --git a/TODO b/TODO index 0a2a0be..c08b895 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,4 @@ - AMD CPU temperature sensor type is shown as Intel temperature sensor. - Add support for IT8655E (Asus Prime B350m-A) - Fix temperature sensor type for IT8665E and IT8686E +- Need to disable first fan for IT8613E diff --git a/it87.c b/it87.c index 538f6b6..4e01fd0 100644 --- a/it87.c +++ b/it87.c @@ -12,6 +12,7 @@ * * Supports: IT8603E Super I/O chip w/LPC interface * IT8607E Super I/O chip w/LPC interface + * IT8613E Super I/O chip w/LPC interface * IT8620E Super I/O chip w/LPC interface * IT8622E Super I/O chip w/LPC interface * IT8623E Super I/O chip w/LPC interface @@ -80,7 +81,7 @@ enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8732, it8771, it8772, it8781, it8782, it8783, it8786, it8790, - it8792, it8603, it8607, it8620, it8622, it8628, it8655, it8665, + it8792, it8603, it8607, it8613, it8620, it8622, it8628, it8655, it8665, it8686 }; static unsigned short force_id; @@ -210,6 +211,7 @@ static inline void superio_exit(int ioreg) #define IT8790E_DEVID 0x8790 #define IT8603E_DEVID 0x8603 #define IT8607E_DEVID 0x8607 +#define IT8613E_DEVID 0x8613 #define IT8620E_DEVID 0x8620 #define IT8622E_DEVID 0x8622 #define IT8623E_DEVID 0x8623 @@ -557,6 +559,16 @@ static const struct it87_devices it87_devices[] = { .num_temp_limit = 3, .peci_mask = 0x07, }, + [it8613] = { + .name = "it8613", + .suffix = "E", + .features = FEAT_NEWER_AUTOPWM | FEAT_11MV_ADC | FEAT_16BIT_FANS + | FEAT_TEMP_OFFSET | FEAT_TEMP_PECI | FEAT_FIVE_FANS + | FEAT_FIVE_PWM | FEAT_IN7_INTERNAL | FEAT_PWM_FREQ2 + | FEAT_AVCC3 | FEAT_VIN3_5V | FEAT_SCALING, + .num_temp_limit = 3, + .peci_mask = 0x07, + }, [it8620] = { .name = "it8620", .suffix = "E", @@ -2784,6 +2796,9 @@ static int __init it87_find(int sioaddr, unsigned short *address, case IT8607E_DEVID: sio_data->type = it8607; break; + case IT8613E_DEVID: + sio_data->type = it8613; + break; case IT8620E_DEVID: sio_data->type = it8620; break; @@ -3007,7 +3022,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 == it8622) { + } else if (sio_data->type == it8613 || sio_data->type == it8622) { int reg; superio_select(sioaddr, GPIO); @@ -3288,6 +3303,16 @@ static void it87_init_device(struct platform_device *pdev) data->REG_TEMP_LOW = IT87_REG_TEMP_LOW; data->REG_TEMP_HIGH = IT87_REG_TEMP_HIGH; break; + case it8613: + data->REG_FAN = IT87_REG_FAN; + data->REG_FANX = IT87_REG_FANX; + data->REG_FAN_MIN = IT87_REG_FAN_MIN; + data->REG_FANX_MIN = IT87_REG_FANX_MIN; + data->REG_PWM = IT87_REG_PWM_8665; + data->REG_TEMP_OFFSET = IT87_REG_TEMP_OFFSET; + data->REG_TEMP_LOW = IT87_REG_TEMP_LOW; + data->REG_TEMP_HIGH = IT87_REG_TEMP_HIGH; + break; default: data->REG_FAN = IT87_REG_FAN; data->REG_FANX = IT87_REG_FANX; -- 2.39.5