From patchwork Mon Apr 29 12:02:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13646719 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1B1B4C4345F for ; Mon, 29 Apr 2024 12:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=rN4SzxNxN/3jexEEkdF+vrZw/8mqc82hI+3uLZ3uC74=; b=2J46knlSCjd1/J X32TKcdCRWcyvbADZe7YPK46m71VPsDFlsM/6bIdtjUaiH3HTOYu7vTNC7YRMbKh8ccMcOKgCYRss pRhTrj4sYdl4Bg8SFZgRd+ehyPyCjHOfLrFHqX1iMDlMKjYCaOOoJvBa8vZCwDgs24eKofxAbnWC1 +nknirga88JI4G9KJA67ZFHIYycJ4Zc6vhRR6jykRpJ7lfzGxXIy71gdBGurqYeH/3I/mCupcZk0f KL9ydkDnyOlnJqIi6D0PZH/9ZnWyL/gxrC1El6WKzeVLTAo6SC8HAyNw3UbfdOklDJQsYYrWpzf6b 7EwestOGbFWZaM3Dnshg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1Pi6-00000002aco-0bOB; Mon, 29 Apr 2024 12:02:18 +0000 Received: from mail-mw2nam04olkn20800.outbound.protection.outlook.com ([2a01:111:f403:2c0a::800] helo=NAM04-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1Pi2-00000002aae-298j for linux-riscv@lists.infradead.org; Mon, 29 Apr 2024 12:02:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G2CPp2SqwJ9OP9t/WBfU+kQiSasXULimQhNV1jpUl1iMsyHRKExGN8ykfws0HkVIgssJXLXW5aEE41xlzcZRQ1ThZ48qfGwlXFgvdr5c7efmHzWzX1wy2cJ36lgVi7icmPHj9wWMLtBEZzMOE38qt9BCWVuydRwua/C1vDQLpykrGr0SaAlIX1qQ4XoTvMTBB6xNkKWTbrQFfwQasssE96KSSQyIpgDo+GVbnEEU9Li/Rwn9KpFCfHc7sBnbdiexhMjMykg4EO20bNcflzI/o5yi80sakwrA7vch9DNh/gH+HhLVO8SX8JhkMbD0LEyWzBVh/hEYPpmDAWI9FdZRpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qMmIiNT4JeFmaRpD+/fumuSYavXjz7QLk1/BI5/wU+c=; b=g5McVnUbxNA71WVpCKGckEwAeUud610IJQz4A+8gR9c8QZKdF3RGOs8IXWlw+u6amVYo4scud/cY9V0wJr37ajSyny5wsx7VAMgeL1JnaqqB4L1eeMnguuYmMBZdiGIebDd7CDoPV8HfCAo0cBb6539oEOX3aX5kqyLE/LF7H4Zj9lNPhl7GiSsm0gWlnLFehLfcLEt2L3cu3Pfq4Ncb2dGXpYmcON4whtPvuXuEEG0kSKE1u8wYtDS1v0ZuB0c16sa6OpoIVG2tzAU3rBOZgy0BBJeI7NLYHf5XYcJ4PdZvpmBjxcXymG5gpaRZQ76oeQS3zklDPtD+2pyJ8y04gQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qMmIiNT4JeFmaRpD+/fumuSYavXjz7QLk1/BI5/wU+c=; b=HTh7Yj1iX6Wy5MXNHdWgQWfNFRY2M6hLzFDB5k+ISC0gi5NFBtpvQvUcUUkmVRGDyn3GdCR/vjt4Y38cuj1UusK/tNgyMXepfuVmVt0q5PKmPKvxVxovfj3j2vL0MsqkSUdhjeEGbo1Y1nVw9gBXHmB/HRLinzW1djZ/qTFTGY9vY9c2aeY0EE24iXnJIZUVpweZJktlnHxzOwacwO71rQLMudoGdG1KzAnq2h9R8GsEdjuF43GEaHwrlNHb6p5nP5tNDbV1aEYiuB2gpqwaaWfthwd2kE8Zuz7qPrqX7nt5aC30TcCiBdfrDPl3kmqrA+aCRZgCfBR5L0FH/49WjQ== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by LV8PR20MB7474.namprd20.prod.outlook.com (2603:10b6:408:222::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Mon, 29 Apr 2024 12:02:01 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::182f:841b:6e76:b819]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::182f:841b:6e76:b819%2]) with mapi id 15.20.7519.031; Mon, 29 Apr 2024 12:02:01 +0000 From: Inochi Amaoto To: Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen Wang , Inochi Amaoto , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v3 0/2] riscv: sophgo: Add SG2042 external hardware monitor support Date: Mon, 29 Apr 2024 20:02:27 +0800 Message-ID: X-Mailer: git-send-email 2.44.0 X-TMN: [sykP7YURQ61I+OrrzXNHKwk5htWbf/WRIfOEZniSYaE=] X-ClientProxiedBy: TY2PR0101CA0017.apcprd01.prod.exchangelabs.com (2603:1096:404:92::29) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240429120229.858167-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|LV8PR20MB7474:EE_ X-MS-Office365-Filtering-Correlation-Id: a8c0590e-6692-4b16-2abc-08dc68442d5a X-Microsoft-Antispam: BCL:0;ARA:14566002|461199019|1602099003|3412199016|440099019|1710799017; X-Microsoft-Antispam-Message-Info: zhYBmxOvTpSFrdc9s9SVMA4er3YQo0EIAWKh8B5++QjSc8us8S3e9j//szS0dDy6UHxda5SxLmRfOLl7VXGMjLYZzDtwQHRmR99SGmt4ZTwvgXXEMD1RNmz4y3bhX+wNnspSQSccXXG2lm5EKaPoO2tUwzRl1/xOEU8xo61vDrMS58uGlyzudVucjmrs4wwBKu3ptzpE7R7MzlNngaRvUXHfJlGjCOgOvnNm0+2KTdibBTiEYsrITwmGK3HnJN5x68ETOlfNGv3hggPFRvLWQAcQxKqbh4aoz/vixaSJR6M+Iq/zVjnRANi6LANoHXoOdEREocATcFWmHJFXqVHIow6MFDD1FjnYk9xbB+UoESVjIMgQ7j1v7J9fwwTyQfnjtVxDG/fORTJzM/zrUGx/S6hu8mvVgo8LslUO8aYRBsDutPIspe94STwQllWcgVeMhO7kx5wAj1CCJBl1gHfAGQj54rNM+hqDP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/9J4dC4WiklSJPQYTql0atC+BHumN8GEeDNgOjqANz9F18FQyYcdfa6O32mgkNBMxBn+AbEMvQvF23ZJHJhD4fmqYz8o4shCRc+5FL5q5s0WFgXxPsWzG4uJpC5Uml4pz/2H15LUCcLiWWKnLvfh27QlbfU4exAci5wePEZ5ZDEu7rBKattOIvoZsI7IXem3uS7tVUudR7mM9YybngQSLAEL4oTPlusttgzZGq8yrWClWWETmq2VuTi5O/8vOhH/yPcEj61q0kwklcxwyerLyxnEmYnF96bOjZHP0wxv/ULjXWr1H5loHsKWGZYQkc+SZ5RlIGkrE9sbRoZKou622rE/kAn8h8WtEQaIWeCoNzhoDJGbtDZOS2AbSQ6kvab+FxmmjKymGLafvZYlvhtE5e6TlVHXA4rmS8Yz7La6GEpFoRNO1zJ4i4b3oKhdiNwzTwZLyMh2vagN1ndx6FzVOUMrV9fWUytPrgn8fJxEhwkKcxMHA+byv6hiPcmnoDmY0d6AkTN/KC3H3lT+MLpqcmIGtYvW0zGB X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8c0590e-6692-4b16-2abc-08dc68442d5a X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2024 12:02:01.0275 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR20MB7474 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240429_050214_570758_FE643198 X-CRM114-Status: UNSURE ( 7.78 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add support for the onboard hardware monitor for SG2042. Related SBI patch: https://lists.infradead.org/pipermail/opensbi/2024-April/006849.html Changed from v2: 1. fix bindings id path. Changed from v1: 1. Move patch from soc to hwmon. 2. Fix typo. Inochi Amaoto (2): dt-bindings: hwmon: Add Sophgo SG2042 external hardware monitor support drivers: hwmon: sophgo: Add SG2042 external hardware monitor support .../hwmon/sophgo,sg2042-hwmon-mcu.yaml | 40 ++ drivers/hwmon/Kconfig | 11 + drivers/hwmon/Makefile | 1 + drivers/hwmon/sg2042-hwmon-mcu.c | 531 ++++++++++++++++++ 4 files changed, 583 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/sophgo,sg2042-hwmon-mcu.yaml create mode 100644 drivers/hwmon/sg2042-hwmon-mcu.c --- 2.44.0