From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C92A225A35 for ; Sat, 10 Jan 2026 01:26:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768008386; cv=none; b=NQSA9+c26/X7+tC6u+JwAOXRsvsWjgNiQjSzyWswAxTMaJm3g2PPeYAzfhfdICqaztGCql4LIjDAkHi1+I+U7cUJDo55c0AF9bH4coyrdaTmhohKWkEgQBlpyDKPWfsnZE1EYuBjgOP5UmiOGrfbXEcwqItkuZS0lmfWkL4sr0E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768008386; c=relaxed/simple; bh=TDDd9qRH30Jxzs7vVu8CkneY5/auV7dFiBK40vfflKY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BZ36Vdp8scoyijWzmbMj22bQBvP/knMIv6hezH5I6XlDbovdN7D9hUqB7HdpYCy6L0MIN1Oi8RlTHNsErskINIUQJvTfA18miISloZjTusdP4MVms6u+uSxxVPlQ671UOJRjbJgYOhiNm0ZydB4MM9zizNDHRR3qbzLO2BI5DwI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=perenite.com; spf=pass smtp.mailfrom=perenite.com; dkim=pass (2048-bit key) header.d=perenite-com.20230601.gappssmtp.com header.i=@perenite-com.20230601.gappssmtp.com header.b=cS+YuDRL; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=perenite.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=perenite.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=perenite-com.20230601.gappssmtp.com header.i=@perenite-com.20230601.gappssmtp.com header.b="cS+YuDRL" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4779ce2a624so39531015e9.2 for ; Fri, 09 Jan 2026 17:26:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perenite-com.20230601.gappssmtp.com; s=20230601; t=1768008378; x=1768613178; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hzxrMR5YefBOzP4Z2aTyL16iNYZgq3G71L4IYKxvjEo=; b=cS+YuDRLAhBSH486ekG2LblF4fMY2LzN8fCWij9tiKJb8PesgQxqnWthN1CMM1W6hB Nu0U4Ag0Q6wJ5cpf3f9M4d3bcUasB3rkY1jU0EDYONoG3QV51xfmLfjX04oEQTjWZZMo X3mSJTLK96O2bzBNJvf60N8zd6adk3yM+0oCNShE0V+YNP1zrAL3rFgCuG1puSzyD+Le 20Mo1Eixkykw0eLifaC4RpOSS8MLdQWacyAAlptgZd6BwaD1u6fx8eZc7SvQ2o6VaCYM PPbqPLBsWw5Asp183ZL9msGq5JUsOhUu7WT5ul4NrM7hLFOiYVp+bB5JV102VPZDfSa5 9w3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768008378; x=1768613178; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=hzxrMR5YefBOzP4Z2aTyL16iNYZgq3G71L4IYKxvjEo=; b=tFbiIM0JZsiZJlTCs2i+RU4X5p3APPH7mJiGiuE+Zdd1QHi5ph8YfxQDImt17gFktw zNKcgGiesdVyvnTrYnLSaKF9KiDq17DhwsdmYSLGTtNq2h+x053zpE2NP14/mnKXKFcy /v7kPbzE3scw97kWzQQNWz69JzB6ckvo3NafUeGzs2ntzHxQ5nGqL0lt1Gy232jhFTDx RrtPlT+ZnjuqyAD3Sfdi0hsSHQ200z934LtPvKJTa5YZY50loBS3oTgvv/ZWZAF5DB6L h6257J4NQUzRGqOA7gI7259Y2T/zIysK4ShFAWFP1I/gUAgbDkmVqNPIHfeDKepGJ3za Dujg== X-Forwarded-Encrypted: i=1; AJvYcCUk/WY1sAZK+VTMMz+p2nJ5hoqSYLuhC/BaD+uOB3e9LyHrxeUtdFNN4/mcziQWJUW8wRmWguYu2buOCLg=@vger.kernel.org X-Gm-Message-State: AOJu0YyUQ8qDyIXi6L5n4m99kPDyf3YS6ciNheCYaX+JfAvplNzR9o+E mht9XjAhLJIFSNm+IrnmgLPyqQa4IX0ybZ09S1+dqaG+1YZUPER8C1eJ/T/MMudT5g== X-Gm-Gg: AY/fxX7oZNqHxvOEZE6Bpro3iaVW0aDvLkVcY6+3L/9z7YNXJk1oZUHv1uS00R8JOUv xPMtyxIhv7FdEwMBMIncLcqN77Tg1ZtNGZ9bpUGRHArYfRzIny5jKHZc1hKpa6GuqdpWrYuXzPZ 6vXuc6nthzEoIRrI/z7cmmuR3BD6wNi2WGeSRt1+T8nUdbedlwbcSeWsX9YWWM6v2F5/2/Sqb/d FC8/Tf/EjGxSW6VRwBNojJMHkVSdemfOuGp75JziZfrzcFGEWm7d/6UTwNA4CGQp7XnYVHN9/Cf nTT6uV5CbMUtJbAGrKmD/jNxGnQ/wytL7ZNEGi7I7aw7CWIscSEtccyogKnnotkMj3h4qH5L5xO 1Kh69vaELuBriuBEAoIw0KO55RPiN1djppwMeH/0396iOu2URWyBw2WDJHCHdWU9qJp43HgmApx I2x/NLl5QdxT9Lk+02VGCqAOI77uSI0u0KXN1wbd0= X-Google-Smtp-Source: AGHT+IGCig68ibb0nVKyAmIqTKa948YwAGL8D6G1gzKzla18gKcyRGEwF2fYh8wV5ht7uEywSjMTmQ== X-Received: by 2002:a05:600c:474f:b0:475:e067:f23d with SMTP id 5b1f17b1804b1-47d84b41294mr125418375e9.25.1768008377117; Fri, 09 Jan 2026 17:26:17 -0800 (PST) Received: from mac.net ([2001:861:8b92:2c50:6cf2:f0aa:7bc6:15fc]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd0e1adbsm25859761f8f.17.2026.01.09.17.26.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 09 Jan 2026 17:26:16 -0800 (PST) From: "benoit.masson" To: Jean Delvare Cc: Guenter Roeck , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, "benoit.masson" Subject: [PATCH v3 5/5] hwmon: it87: add IT8613E configuration Date: Sat, 10 Jan 2026 02:26:13 +0100 Message-ID: <20260110012613.48150-5-yahoo@perenite.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260110012613.48150-1-yahoo@perenite.com> References: <20260110012613.48150-1-yahoo@perenite.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add IT8613E feature flags, resource counts, ADC scaling, and GPIO quirk handling, then document the chip in the hwmon guide. Signed-off-by: benoit.masson --- Documentation/hwmon/it87.rst | 8 ++++++ drivers/hwmon/it87.c | 52 +++++++++++++++++++++++++++++++++++- 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/Documentation/hwmon/it87.rst b/Documentation/hwmon/it87.rst index 5cef4f265000..fa968be84f7c 100644 --- a/Documentation/hwmon/it87.rst +++ b/Documentation/hwmon/it87.rst @@ -11,6 +11,14 @@ Supported chips: 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' diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 1f4936c0e746..746ea9279efc 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -336,6 +336,7 @@ struct it87_devices { #define FEAT_FOUR_TEMP BIT(22) #define FEAT_FANCTL_ONOFF BIT(23) /* chip has FAN_CTL ON/OFF */ #define FEAT_NEW_TEMPMAP BIT(24) /* PWM uses extended temp map */ +#define FEAT_11MV_ADC BIT(25) static const struct it87_devices it87_devices[] = { [it87] = { @@ -487,6 +488,14 @@ static const struct it87_devices it87_devices[] = { [it8613] = { .name = "it8613", .model = "IT8613E", + .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_NEW_TEMPMAP, + .num_temp_limit = 6, + .num_temp_offset = 6, + .num_temp_map = 6, + .peci_mask = 0x07, }, [it8620] = { .name = "it8620", @@ -531,6 +540,7 @@ static const struct it87_devices it87_devices[] = { #define has_16bit_fans(data) ((data)->features & FEAT_16BIT_FANS) #define has_12mv_adc(data) ((data)->features & FEAT_12MV_ADC) #define has_10_9mv_adc(data) ((data)->features & FEAT_10_9MV_ADC) +#define has_11mv_adc(data) ((data)->features & FEAT_11MV_ADC) #define has_newer_autopwm(data) ((data)->features & FEAT_NEWER_AUTOPWM) #define has_old_autopwm(data) ((data)->features & FEAT_OLD_AUTOPWM) #define has_temp_offset(data) ((data)->features & FEAT_TEMP_OFFSET) @@ -561,7 +571,8 @@ static const struct it87_devices it87_devices[] = { #define has_vin3_5v(data) ((data)->features & FEAT_VIN3_5V) #define has_noconf(data) ((data)->features & FEAT_NOCONF) #define has_scaling(data) ((data)->features & (FEAT_12MV_ADC | \ - FEAT_10_9MV_ADC)) + FEAT_10_9MV_ADC | \ + FEAT_11MV_ADC)) #define has_fanctl_onoff(data) ((data)->features & FEAT_FANCTL_ONOFF) #define has_new_tempmap(data) ((data)->features & FEAT_NEW_TEMPMAP) @@ -667,6 +678,8 @@ static int adc_lsb(const struct it87_data *data, int nr) lsb = 120; else if (has_10_9mv_adc(data)) lsb = 109; + else if (has_11mv_adc(data)) + lsb = 110; else lsb = 160; if (data->in_scaled & BIT(nr)) @@ -3095,6 +3108,43 @@ static int __init it87_find(int sioaddr, unsigned short *address, sio_data->skip_in |= BIT(5); /* No VIN5 */ sio_data->skip_in |= BIT(6); /* No VIN6 */ + sio_data->beep_pin = superio_inb(sioaddr, + IT87_SIO_BEEP_PIN_REG) & 0x3f; + } else if (sio_data->type == it8613) { + int reg27, reg29, reg2a; + + superio_select(sioaddr, GPIO); + + /* Check for pwm3, fan3, pwm5, fan5 */ + reg27 = superio_inb(sioaddr, IT87_SIO_GPIO3_REG); + if (!(reg27 & BIT(1))) + sio_data->skip_fan |= BIT(4); + if (reg27 & BIT(3)) + sio_data->skip_pwm |= BIT(4); + if (reg27 & BIT(6)) + sio_data->skip_pwm |= BIT(2); + if (reg27 & BIT(7)) + sio_data->skip_fan |= BIT(2); + + /* Check for pwm2, fan2 */ + reg29 = superio_inb(sioaddr, IT87_SIO_GPIO5_REG); + if (reg29 & BIT(1)) + sio_data->skip_pwm |= BIT(1); + if (reg29 & BIT(2)) + sio_data->skip_fan |= BIT(1); + + /* Check for pwm4, fan4 */ + reg2a = superio_inb(sioaddr, IT87_SIO_PINX1_REG); + if (!(reg2a & BIT(0)) || (reg29 & BIT(7))) { + sio_data->skip_fan |= BIT(3); + sio_data->skip_pwm |= BIT(3); + } + + sio_data->skip_pwm |= BIT(0); /* No pwm1 */ + sio_data->skip_fan |= BIT(0); /* No fan1 */ + sio_data->skip_in |= BIT(3); /* No VIN3 */ + sio_data->skip_in |= BIT(6); /* No VIN6 */ + sio_data->beep_pin = superio_inb(sioaddr, IT87_SIO_BEEP_PIN_REG) & 0x3f; } else if (sio_data->type == it8620 || sio_data->type == it8628) { -- 2.50.1 (Apple Git-155)