From patchwork Sun Oct 3 13:33:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Natalenko X-Patchwork-Id: 12532725 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34B2AC433F5 for ; Sun, 3 Oct 2021 13:33:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F6A461B26 for ; Sun, 3 Oct 2021 13:33:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230345AbhJCNfh (ORCPT ); Sun, 3 Oct 2021 09:35:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbhJCNfg (ORCPT ); Sun, 3 Oct 2021 09:35:36 -0400 Received: from vulcan.natalenko.name (vulcan.natalenko.name [IPv6:2001:19f0:6c00:8846:5400:ff:fe0c:dfa0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F836C0613EC; Sun, 3 Oct 2021 06:33:49 -0700 (PDT) Received: from localhost (unknown [151.237.229.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vulcan.natalenko.name (Postfix) with ESMTPSA id A7F1FC1D32F; Sun, 3 Oct 2021 15:33:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=natalenko.name; s=dkim-20170712; t=1633268027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CeNxvtd5M1WG392RQHi/zqPpeo7nSR1qDA2byq9wMl8=; b=f4KuiDAhUj+BkzpMCs+26DI3tdNSqLQZ/Lp3AVUIe5g1vFz1LY3nhvmtyHysiURggyumMk FbdtFZEXtwco0Sa0wmoJcecDvTdOJ6w4ANIcXx2GDhA0FD29xfcMby4XG+oLkKz4FTnXSz 5dT+TbdlsAnlAVvfxzl14cXL/fNHB1s= From: Oleksandr Natalenko To: linux-kernel@vger.kernel.org Cc: Eugene Shalygin , Denis Pauk , matt-testalltheway , Kamil Dudka , Robert Swiecki , Kamil Pietrzak , Igor , Tor Vic , Poezevara , Andy Shevchenko , Guenter Roeck , Jean Delvare , linux-hwmon@vger.kernel.org Subject: [PATCH 1/3] hwmon: (nct6775) add Pro WS X570-ACE Date: Sun, 3 Oct 2021 15:33:42 +0200 Message-Id: <20211003133344.9036-2-oleksandr@natalenko.name> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211003133344.9036-1-oleksandr@natalenko.name> References: <20211003133344.9036-1-oleksandr@natalenko.name> MIME-Version: 1.0 X-Spam: Yes Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org ASUS Pro WS X570-ACE board has got an nct6775 chip, but by default there's no use of it because of resource conflict: ``` ACPI Warning: SystemIO range 0x0000000000000295-0x0000000000000296 conflicts with OpRegion 0x0000000000000290-0x0000000000000299 (\AMW0.SHWM) (20210604/utaddress-204 ) ACPI: OSL: Resource conflict; ACPI support missing from driver? ACPI: OSL: Resource conflict: System may be unstable or behave erratically ``` A workaround is to use `acpi_enforce_resources=lax`, but a proper support needs to be added instead. This commit adds Pro WS X570-ACE to the list of boards that can be monitored using ASUS WMI. Tested by me on this hardware: ``` Base Board Information Manufacturer: ASUSTeK COMPUTER INC. Product Name: Pro WS X570-ACE BIOS Information Vendor: American Megatrends Inc. Version: 3801 Release Date: 07/30/2021 ``` Signed-off-by: Oleksandr Natalenko --- drivers/hwmon/nct6775.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c index ba18c1cbf572..ff28ba70a8b3 100644 --- a/drivers/hwmon/nct6775.c +++ b/drivers/hwmon/nct6775.c @@ -5000,6 +5000,7 @@ static int __init nct6775_find(int sioaddr, struct nct6775_sio_data *sio_data) static struct platform_device *pdev[2]; static const char * const asus_wmi_boards[] = { + "Pro WS X570-ACE", "PRIME B360-PLUS", "PRIME B460-PLUS", "PRIME X570-PRO", From patchwork Sun Oct 3 13:33:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Natalenko X-Patchwork-Id: 12532727 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 412DDC433FE for ; Sun, 3 Oct 2021 13:33:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 224F061350 for ; Sun, 3 Oct 2021 13:33:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230050AbhJCNfj (ORCPT ); Sun, 3 Oct 2021 09:35:39 -0400 Received: from vulcan.natalenko.name ([104.207.131.136]:58370 "EHLO vulcan.natalenko.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230344AbhJCNfi (ORCPT ); Sun, 3 Oct 2021 09:35:38 -0400 Received: from localhost (unknown [151.237.229.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vulcan.natalenko.name (Postfix) with ESMTPSA id B3138C1D330; Sun, 3 Oct 2021 15:33:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=natalenko.name; s=dkim-20170712; t=1633268029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OQKuABLR4Mn/ar6D6NiB5Z9dVycXSPE1KmvSEI66q50=; b=Mw9KgNn5HUX/OLo99e4/BnF6cHKlqjqxB8Ybh3/TOX8sGavjxjgHW00C1xqqT+na6fol6w tKUb28qq76cJeKwKKdur48pA9hi0rEmSgFteqy2yxp6fgd1CD2J2I71ubRUdObVjPW9wNE p8eA/tIqtEfCKSnD3Hn251mwgjE0AA4= From: Oleksandr Natalenko To: linux-kernel@vger.kernel.org Cc: Eugene Shalygin , Denis Pauk , matt-testalltheway , Kamil Dudka , Robert Swiecki , Kamil Pietrzak , Igor , Tor Vic , Poezevara , Andy Shevchenko , Guenter Roeck , Jean Delvare , linux-hwmon@vger.kernel.org Subject: [PATCH 2/3] hwmon: (asus_wmi_sensors) split out T_Sensor Date: Sun, 3 Oct 2021 15:33:43 +0200 Message-Id: <20211003133344.9036-3-oleksandr@natalenko.name> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211003133344.9036-1-oleksandr@natalenko.name> References: <20211003133344.9036-1-oleksandr@natalenko.name> MIME-Version: 1.0 X-Spam: Yes Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Move `T_Sensor` addition into a separate `case` statement in preparation for the next patch that introduces a board without it. No functional change. Signed-off-by: Oleksandr Natalenko --- drivers/hwmon/asus_wmi_sensors.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/hwmon/asus_wmi_sensors.c b/drivers/hwmon/asus_wmi_sensors.c index 6b04fad18891..98e761861601 100644 --- a/drivers/hwmon/asus_wmi_sensors.c +++ b/drivers/hwmon/asus_wmi_sensors.c @@ -144,14 +144,22 @@ static void asus_wmi_ec_fill_board_sensors(struct asus_wmi_ec_info *ec, int boar asus_wmi_ec_set_sensor_info(si++, "Motherboard", hwmon_temp, asus_wmi_ec_make_sensor_address(1, 0x00, 0x3C), &ec->nr_registers); - asus_wmi_ec_set_sensor_info(si++, "T_Sensor", hwmon_temp, - asus_wmi_ec_make_sensor_address(1, 0x00, 0x3D), - &ec->nr_registers); asus_wmi_ec_set_sensor_info(si++, "VRM", hwmon_temp, asus_wmi_ec_make_sensor_address(1, 0x00, 0x3E), &ec->nr_registers); } + switch (board) { + case BOARD_RS_B550_E_G: + case BOARD_RS_X570_E_G: + case BOARD_R_C8H: + case BOARD_R_C8DH: + case BOARD_R_C8F: + asus_wmi_ec_set_sensor_info(si++, "T_Sensor", hwmon_temp, + asus_wmi_ec_make_sensor_address(1, 0x00, 0x3D), + &ec->nr_registers); + } + switch (board) { case BOARD_RS_X570_E_G: case BOARD_R_C8H: From patchwork Sun Oct 3 13:33:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Natalenko X-Patchwork-Id: 12532729 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 146EAC433EF for ; Sun, 3 Oct 2021 13:33:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EF10D61B00 for ; Sun, 3 Oct 2021 13:33:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230381AbhJCNfk (ORCPT ); Sun, 3 Oct 2021 09:35:40 -0400 Received: from vulcan.natalenko.name ([104.207.131.136]:58370 "EHLO vulcan.natalenko.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230366AbhJCNfj (ORCPT ); Sun, 3 Oct 2021 09:35:39 -0400 Received: from localhost (unknown [151.237.229.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vulcan.natalenko.name (Postfix) with ESMTPSA id 3C059C1D331; Sun, 3 Oct 2021 15:33:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=natalenko.name; s=dkim-20170712; t=1633268031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Pvs0gicvaFyjP0hgJFa4i9LD8zRmZXhHgPSJ+metaAA=; b=qnlJoFp1jMQf9wtsbzgdJNsdwr4ft+1mmVuJBbcAVgj4g8ipd69gOVCqEOGbve2+0Isgzd 5Q1crBrU7yFgqpsSyYXNXUM3sx8T2mHEAgK9TioGuIAbrUwUzGYqUe/af97g50X5bt2XIe 3qrAH/UG71ajpOp89NxLS1zIxZfN8jA= From: Oleksandr Natalenko To: linux-kernel@vger.kernel.org Cc: Eugene Shalygin , Denis Pauk , matt-testalltheway , Kamil Dudka , Robert Swiecki , Kamil Pietrzak , Igor , Tor Vic , Poezevara , Andy Shevchenko , Guenter Roeck , Jean Delvare , linux-hwmon@vger.kernel.org Subject: [PATCH 3/3] hwmon: (asus_wmi_sensors) add Pro WS X570-ACE Date: Sun, 3 Oct 2021 15:33:44 +0200 Message-Id: <20211003133344.9036-4-oleksandr@natalenko.name> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211003133344.9036-1-oleksandr@natalenko.name> References: <20211003133344.9036-1-oleksandr@natalenko.name> MIME-Version: 1.0 X-Spam: Yes Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org ASUS Pro WS X570-ACE also supports accessing sensor information from the embedded controller via BREC WMI method. Hence, add it to the list. Note `T_Sensor` is not supported by this board. Tested by me on this hardware: ``` Base Board Information Manufacturer: ASUSTeK COMPUTER INC. Product Name: Pro WS X570-ACE BIOS Information Vendor: American Megatrends Inc. Version: 3801 Release Date: 07/30/2021 ``` Signed-off-by: Oleksandr Natalenko --- drivers/hwmon/asus_wmi_sensors.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/hwmon/asus_wmi_sensors.c b/drivers/hwmon/asus_wmi_sensors.c index 98e761861601..319c879624b2 100644 --- a/drivers/hwmon/asus_wmi_sensors.c +++ b/drivers/hwmon/asus_wmi_sensors.c @@ -35,6 +35,7 @@ #define ASUS_EC_KNOWN_EC_REGISTERS 14 enum asus_wmi_ec_board { + BOARD_PW_X570_A, // Pro WS X570-ACE BOARD_R_C8H, // ROG Crosshair VIII Hero BOARD_R_C8DH, // ROG Crosshair VIII Dark Hero BOARD_R_C8F, // ROG Crosshair VIII Formula @@ -44,6 +45,7 @@ enum asus_wmi_ec_board { /* boards with EC support */ static const char *const asus_wmi_ec_boards_names[] = { + [BOARD_PW_X570_A] = "Pro WS X570-ACE", [BOARD_R_C8H] = "ROG CROSSHAIR VIII HERO", [BOARD_R_C8DH] = "ROG CROSSHAIR VIII DARK HERO", [BOARD_R_C8F] = "ROG CROSSHAIR VIII FORMULA", @@ -130,6 +132,7 @@ static void asus_wmi_ec_fill_board_sensors(struct asus_wmi_ec_info *ec, int boar ec->nr_registers = 0; switch (board) { + case BOARD_PW_X570_A: case BOARD_RS_B550_E_G: case BOARD_RS_X570_E_G: case BOARD_R_C8H: @@ -161,6 +164,7 @@ static void asus_wmi_ec_fill_board_sensors(struct asus_wmi_ec_info *ec, int boar } switch (board) { + case BOARD_PW_X570_A: case BOARD_RS_X570_E_G: case BOARD_R_C8H: case BOARD_R_C8DH: @@ -174,6 +178,7 @@ static void asus_wmi_ec_fill_board_sensors(struct asus_wmi_ec_info *ec, int boar } switch (board) { + case BOARD_PW_X570_A: case BOARD_RS_X570_E_G: case BOARD_R_C8H: case BOARD_R_C8F: