From patchwork Tue Jan 3 06:46:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Crawford X-Patchwork-Id: 13087252 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B493C53210 for ; Tue, 3 Jan 2023 06:51:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236815AbjACGv5 (ORCPT ); Tue, 3 Jan 2023 01:51:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236776AbjACGv4 (ORCPT ); Tue, 3 Jan 2023 01:51:56 -0500 Received: from ipmail06.adl3.internode.on.net (ipmail06.adl3.internode.on.net [150.101.137.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6D49AD2DF for ; Mon, 2 Jan 2023 22:51:55 -0800 (PST) IronPort-SDR: bdha5dCWZbevROJXZkyb/+PReRMFxRHUGLk2JHOjL7ov1RrJ692SkLUrQo7PrmjcGAW6vLQAkC kzv196p6RU0xmcSjmM6C2LuUD/UZ2UZqmpD/25rkM2LM8uzKl94NFhtUTAF2/ik88ELcJfXfvB GeoGpyT1mqQgBwJx3picnGn46Wqi6Yrijs7Vfw2MTZiAEvhOp/rt/b0ErSqXMPGxGC8lieOah/ JWkVw14+2WD7obb0Cw79+naxjAz0kjo75GL74jqizAdMtnKnx4ttzOWRZ3kHUbl8nnjqWaj0lR 7YCxMbyGBXGlZnQIvg9nmkVw X-SMTP-MATCH: 0 X-IPAS-Result: A2CqBgAozrNjjPQc8jxaHgEBCxIMSYE7C4Itgl+1Jw8BDwEBRAQBAYUFAoURJjcGDgECBAEBAQEDAgMBAQEBAQEDAQEGA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JIMhjS1CFQIecnMI4hx ut96sca5xbl0UggM8qdyCtO/nuCKWYMFagiq9cbDMnil1NzmF1FZJXdDA7w4Y2OMosTahBxf GPM26eS1a5BwkficmYoESaf1+RqhaMI5EJAwmgddgaAldfyj/Mq2AFcrGYsRQNPwxQZj+9+Z jpxO0tuKfnc9jtknpMZDT70XlsdXljDqgmrlwdPj3HQU0ijEHDVI2x7MuGIukkEqjoOcj9e9 bCe6WDkTTezIp6ph3BsBRY6pqyxV8F1+y3DhNujQ5aPEa48MGjsjaKZbGYVrwfqXJEqj0rdq Og0oOt9ZMUX78LLT3HX1mVC6YktdQ== IronPort-HdrOrdr: A9a23:aE4tj6ndtQm3v/+eBMPmSmP5CbTpDfL23DAbv31ZSRFFG/Fw9/ rFoB3U737JYVEqKQgdcbLpAsS9qBbnmaKdjrNhXotKMDOIhILsFvAH0WKA+UyHJ8SBzJ8+6U 4IScEXY+EYT2IK6voSizPZLz9P+re6GC/Ev5an854Ud3AOV0h51XYENu+EKDwKeOCYP+tDKH JMjvA33QadRQ== X-IronPort-Anti-Spam-Filtered: true Received: from 60-242-28-244.static.tpgi.com.au (HELO bits.crawford.emu.id.au) ([60.242.28.244]) by ipmail06.adl3.internode.on.net with ESMTP; 03 Jan 2023 17:16:47 +1030 Received: from agc.com.au (agc.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc07]) (authenticated bits=0) by bits.crawford.emu.id.au (8.17.1/8.17.1) with ESMTPSA id 3036kRlM2641329 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 3 Jan 2023 17:46:43 +1100 Authentication-Results: bits.crawford.emu.id.au; arc=none smtp.remote-ip=fdd2:7aad:d478:1::cb10:cc07 DKIM-Filter: OpenDKIM Filter v2.11.0 bits.crawford.emu.id.au 3036kRlM2641329 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crawford.emu.id.au; s=s1; t=1672728403; bh=4DBT79tjq1WVgv31x2pF9ZqTgnXCWwcLh3AzKWs39sU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TfTUbZnCILFesHV+hSJCaQJ17a9iCWV6OZvW2GsNKM7AacyQxoe0DUjL4OkZs1dk5 IHt9bQrMRLMlm2PjW+ax+BUhZF5UtP6Z0izab6ffBs0ySbsTJSDC/KMv8eOkv37u3T xriyGEWBBlaRGOHYkK5/sbvGZDmLSw5rCogO7bua48frNjppPC1NFs7Vbg1YdrJFwM F6dg1F5Vzl396yIxvyZrwuDwLfhj25MM14y/u059h/5qBzWRyXPSrd2XDYu58wJ4gQ jY3kzqGth6FcGUj8xYTANdcFeU5zqrAJppHt95pxTTqU+J1MWCmov1yjQ0JHqinHb9 ufmCmIvfVPFkg== From: Frank Crawford To: Jean Delvare , Guenter Roeck Cc: linux-hwmon@vger.kernel.org, Frank Crawford Subject: [PATCH v1 1/2] hwmon: (it87) Allow calling superio_enter outside mux Date: Tue, 3 Jan 2023 17:46:11 +1100 Message-Id: <20230103064612.404401-2-frank@crawford.emu.id.au> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230103064612.404401-1-frank@crawford.emu.id.au> References: <20230103064612.404401-1-frank@crawford.emu.id.au> MIME-Version: 1.0 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (bits.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc01]); Tue, 03 Jan 2023 17:46:43 +1100 (AEDT) X-Virus-Scanned: clamav-milter 0.103.7 at bits.crawford.emu.id.au X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Allow for superio_enter to be called outside mux, in particular for initialisation of the second chipset, which must be entered, but never exited. Signed-off-by: Frank Crawford --- drivers/hwmon/it87.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 9997f76b1f4a..4ebce2c661d7 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -87,6 +87,14 @@ static struct platform_device *it87_pdev[2]; #define DEVID 0x20 /* Register: Device ID */ #define DEVREV 0x22 /* Register: Device Revision */ +static inline void __superio_enter(int ioreg) +{ + outb(0x87, ioreg); + outb(0x01, ioreg); + outb(0x55, ioreg); + outb(ioreg == REG_4E ? 0xaa : 0x55, ioreg); +} + static inline int superio_inb(int ioreg, int reg) { outb(reg, ioreg); @@ -124,10 +132,7 @@ static inline int superio_enter(int ioreg) if (!request_muxed_region(ioreg, 2, DRVNAME)) return -EBUSY; - outb(0x87, ioreg); - outb(0x01, ioreg); - outb(0x55, ioreg); - outb(ioreg == REG_4E ? 0xaa : 0x55, ioreg); + __superio_enter(ioreg); return 0; } From patchwork Tue Jan 3 06:46:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Crawford X-Patchwork-Id: 13087253 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A62BBC54EBC for ; Tue, 3 Jan 2023 06:51:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236776AbjACGv6 (ORCPT ); Tue, 3 Jan 2023 01:51:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236805AbjACGv5 (ORCPT ); Tue, 3 Jan 2023 01:51:57 -0500 Received: from ipmail06.adl3.internode.on.net (ipmail06.adl3.internode.on.net [150.101.137.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E3C3FD2E2 for ; Mon, 2 Jan 2023 22:51:55 -0800 (PST) IronPort-SDR: SZJS8wveH6/EiECU606pWMMwh0kC5S/P6WU1n6vJZmQQl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nqJJm/3O8 23VZ6Or4ASXuJEzEi3TMioLVV8adconxZ7NFXB1YwrANrlKSdrH0ZrzgLNtJeZ+pLIynK4lJ xTHEu3Zaslypv3802x1RfHAQEZKLXxHXCqCYHioZiYRZZllS1Cb89PoZFK/piIUBzW5stEy5 bCly0XaTdwKWl06XsrRbfuuyXK3vGQcwbwtBxKTfIUKIUi8opJ3LyHRj+MsJ59eIxv0xgyci 1ScDyAH9LvErIIC+dXUgbyJ8tWyGOxkE0sEQ2TWtO7kNSTT8me575VHVeKEIWLUWG/uofXwb v9c0P/7KvFBkVNX9YtwVb92lPps69zqrr5c7wJlAHSSMQvzU+g+fiDf0JAW5KNXx7JftQ+nY W61+4FXaeeTJcfoMF8NPw57PO6N4vEjnGWA5/oCPxSo7SB6y7OLTEFOMkTekydaNrZ0bt8oz Op96s4b7wuz1kgjPtqc1HsG/WWQNToLSaw4uJYADMnmjxdty10EaIGFUn3655SGatNtNEg2I 2bK2/Kb3OoAnxPPIygpCHzA/etBnpBQ6hpE+181IQjbkNTyma5l1RJcxj07UwBJw0gVyOl0I GVqaRF4KPnc5Ttun8QfDWmgFxsaXk/HogmrlwFMzj2cFRX0EHfRJXE8MqCR5E8YtWlbe35S4 ejAmmriVD/reuD33zczABA686W4E4AorwCSytq6G8mlHoUhZWa3iKGZYztaohTqNso9mUnbq LQ45+13c6D6a3IdrqBT51N2DljMpM1o/FB/fMw= IronPort-HdrOrdr: A9a23:SmgGK6OZrd2jjcBcThujsMiBIKoaSvp037BK7SpMoNJuE/Bw8P re5cjyt3fP5Qr5PUtNpTnuAtjifZqxz/FICMwqTNOftWrdyQ2Vxf9ZnOnfKlTbckWUygce79 YGT0EUMr3N5DZB4/oTb2SDYq4dKaG8gcWVbP/lvgtQpB9RGtxdBthCe32m+pwffng9OaYE X-IronPort-Anti-Spam-Filtered: true Received: from 60-242-28-244.static.tpgi.com.au (HELO bits.crawford.emu.id.au) ([60.242.28.244]) by ipmail06.adl3.internode.on.net with ESMTP; 03 Jan 2023 17:16:51 +1030 Received: from agc.com.au (agc.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc07]) (authenticated bits=0) by bits.crawford.emu.id.au (8.17.1/8.17.1) with ESMTPSA id 3036kRlN2641329 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 3 Jan 2023 17:46:47 +1100 Authentication-Results: bits.crawford.emu.id.au; arc=none smtp.remote-ip=fdd2:7aad:d478:1::cb10:cc07 DKIM-Filter: OpenDKIM Filter v2.11.0 bits.crawford.emu.id.au 3036kRlN2641329 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crawford.emu.id.au; s=s1; t=1672728407; bh=iTvONrBDoBWEZbW7cFmRUhkmGPwZtaCj5pXblnMvgGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P88wRTj38zhQsX3DEliENOY7xtYKLvTEdFfqqH5JM8Xaspjc3tM9x844EmOzdQAxk fyXLHgTAVQY7SmzyspUGqn8Qzh01GXOGn87EG0O8KWjuzaat5IsqgEc1toH22Y/qJd 9HwvYUhMjI9AEIkpKMhJgPu8O2S8O9L9N5mTmOpWVkacwpDv3ErFzhOsYBnMNMmU6x MBrS+r/YnhEgbBkjCi5YxIyA2aAs8qKJM3QueLJHf7oQmiK6nmrUoEq0ioZ9pSRf5H yzJo6aZk67jEgT+69yFZVgtZwPE3kf+haqy3aycKZhCy+C4Wv+1mQUoMjR6ush3/Ta JLXZBmGfOzLRw== From: Frank Crawford To: Jean Delvare , Guenter Roeck Cc: linux-hwmon@vger.kernel.org, Frank Crawford Subject: [PATCH v1 2/2] hwmon: (it87) Add entries to dmi_table Date: Tue, 3 Jan 2023 17:46:12 +1100 Message-Id: <20230103064612.404401-3-frank@crawford.emu.id.au> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230103064612.404401-1-frank@crawford.emu.id.au> References: <20230103064612.404401-1-frank@crawford.emu.id.au> MIME-Version: 1.0 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (bits.crawford.emu.id.au [IPv6:fdd2:7aad:d478:1:0:0:cb10:cc01]); Tue, 03 Jan 2023 17:46:47 +1100 (AEDT) X-Virus-Scanned: clamav-milter 0.103.7 at bits.crawford.emu.id.au X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Call initialisation of second chipset. Update the dmi_table with mother boards that have been tested. Signed-off-by: Frank Crawford --- drivers/hwmon/it87.c | 58 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 4ebce2c661d7..2ecfa2c901f6 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -3315,6 +3315,27 @@ static int it87_dmi_cb(const struct dmi_system_id *dmi_entry) return 1; } +/* + * On various Gigabyte AM4 boards (AB350, AX370), the second Super-IO chip + * (IT8792E) needs to be in configuration mode before accessing the first + * due to a bug in IT8792E which otherwise results in LPC bus access errors. + * This needs to be done before accessing the first Super-IO chip since + * the second chip may have been accessed prior to loading this driver. + * + * The problem is also reported to affect IT8795E, which is used on X299 boards + * and has the same chip ID as IT8792E (0x8733). It also appears to affect + * systems with IT8790E, which is used on some Z97X-Gaming boards as well as + * Z87X-OC. + * DMI entries for those systems will be added as they become available and + * as the problem is confirmed to affect those boards. + */ +static int gigabyte_sio2_force(const struct dmi_system_id *dmi_entry) +{ + __superio_enter(REG_4E); + + return it87_dmi_cb(dmi_entry); +}; + /* * On the Shuttle SN68PT, FAN_CTL2 is apparently not * connected to a fan, but to something else. One user @@ -3337,7 +3358,44 @@ static struct it87_dmi_data nvidia_fn68pt = { .driver_data = data, \ } +#define IT87_DMI_MATCH_GBT(name, cb, data) \ + IT87_DMI_MATCH_VND("Gigabyte Technology Co., Ltd.", name, cb, data) + static const struct dmi_system_id it87_dmi_table[] __initconst = { + IT87_DMI_MATCH_GBT("AB350", gigabyte_sio2_force, NULL), + /* ? + IT8792E/IT8795E */ + IT87_DMI_MATCH_GBT("AX370", gigabyte_sio2_force, NULL), + /* ? + IT8792E/IT8795E */ + IT87_DMI_MATCH_GBT("Z97X-Gaming G1", gigabyte_sio2_force, NULL), + /* ? + IT8790E */ + IT87_DMI_MATCH_GBT("TRX40 AORUS XTREME", gigabyte_sio2_force, NULL), + /* IT8688E + IT8792E/IT8795E */ + IT87_DMI_MATCH_GBT("Z390 AORUS ULTRA-CF", gigabyte_sio2_force, NULL), + /* IT8688E + IT8792E/IT8795E */ + IT87_DMI_MATCH_GBT("Z490 AORUS ELITE AC", it87_dmi_cb, NULL), + /* IT8688E */ + IT87_DMI_MATCH_GBT("B550 AORUS PRO AC", gigabyte_sio2_force, NULL), + /* IT8688E + IT8792E/IT8795E */ + IT87_DMI_MATCH_GBT("B560I AORUS PRO AX", it87_dmi_cb, NULL), + /* IT8689E */ + IT87_DMI_MATCH_GBT("X570 AORUS ELITE WIFI", it87_dmi_cb, NULL), + /* IT8688E */ + IT87_DMI_MATCH_GBT("X570 AORUS MASTER", gigabyte_sio2_force, NULL), + /* IT8688E + IT8792E/IT8795E */ + IT87_DMI_MATCH_GBT("X570 AORUS PRO", gigabyte_sio2_force, NULL), + /* IT8688E + IT8792E/IT8795E */ + IT87_DMI_MATCH_GBT("X570 AORUS PRO WIFI", gigabyte_sio2_force, NULL), + /* IT8688E + IT8792E/IT8795E */ + IT87_DMI_MATCH_GBT("X570 I AORUS PRO WIFI", it87_dmi_cb, NULL), + /* IT8688E */ + IT87_DMI_MATCH_GBT("X570S AERO G", gigabyte_sio2_force, NULL), + /* IT8689E + IT87952E */ + IT87_DMI_MATCH_GBT("X670E AORUS MASTER", it87_dmi_cb, NULL), + /* IT8689E - Note there may also be a second chip */ + IT87_DMI_MATCH_GBT("Z690 AORUS PRO DDR4", gigabyte_sio2_force, NULL), + /* IT8689E + IT87952E */ + IT87_DMI_MATCH_GBT("Z690 AORUS PRO", gigabyte_sio2_force, NULL), + /* IT8689E + IT87952E */ IT87_DMI_MATCH_VND("nVIDIA", "FN68PT", it87_dmi_cb, &nvidia_fn68pt), { }