From patchwork Sat Aug 17 02:22:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13766900 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 0FCC4C3DA4A for ; Sat, 17 Aug 2024 02:23:58 +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:References:In-Reply-To: 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: List-Owner; bh=6l4V+tPetYj0vJDDBngn17kSfyj2OAEf8EECS1kLVeE=; b=CyzHj/p3oiL8Tn yc1bsFiJxtjv2nLM2R5AZN3HoEMENXmvtPWpsDEtyuvZGIzzpzzKlyVPRqqGkcAJMU+CIZicCjwJF ETFmSztj4yw29IlQd3TpZwdmQWLTvefInbwXBxeUwAjvk/3dZxVnZa9FqLRZl56QYMe24jKLGti0F +hi/yVvKofM8M351X3kzkCCzUPCsMNsiexqghFxLWH/tIAO7iG+SaDmdsXusiEYuguNnZSyuXIFYx 4yfogWxbvKHQlexzHV7vxiTQtX/lDQBPYJOPBKNqVbF7EbhT5nHP/q1k8e/II3kBl9o15Zlg0GeF/ S2jhIi9GsHsWPJRAU3bw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sf96h-0000000EV1n-1Qt8; Sat, 17 Aug 2024 02:23:55 +0000 Received: from mail-mw2nam10olkn20812.outbound.protection.outlook.com ([2a01:111:f403:2c12::812] helo=NAM10-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sf96e-0000000EV11-1C2c for linux-riscv@lists.infradead.org; Sat, 17 Aug 2024 02:23:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CGtxLzJ+n6RWa+rhkwyFTc/Nh4pYeU/JR350NzU0APEB1wKZfcaSyUm7v2zqnoAE9+vR1EDqoFIQy3p4LFryd63gKKVdBAKlt0SOAjAv9GO/O5nX14lElFjse+dpOtlv6NEw5OmB3M8nxYjnfBPSVbAb/EvnqA6kCdysabQQlxjUqv+XxXbwC2CSk7Lmn8kfGGK3Iz8RUhsgKblz4EzyYxDWwcqvVMhNQJkNTb6uAOWXMsPqJ9mE7IGU16/AZ5JVKA+4+1COyBxtXmG8zOmH1zJgPgHqxYpyQ8DholI9L4WP9VC3PTlLWpTTCe8PZcoKzHXdAvhBJbce+7CkO6f10Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=pYrG99WMMaEn/7nhZeUcYwO99UpIRAGGmfiQygB+tpI=; b=KvRLuX/aLzBkOrX7N5wEXqliBRvu8gw7m1g/P6Pl9d+YI4XSTGaWz6P+gnpuENOF6DNphCePEyCXdgtwsnyJIehL2S+RCGMrhHyZGmrv8/3XKkagyCNLh74OQP7DOqtptPF7H6+VbitvcHV9nZJbIMvwuIyYSmPkr37fQgxAQjonZTkG0/t5enEoOxKyhkSDdhFr+Pt4SLDLET3QeNLImgqzEv/xO9FsQXOai4J7hh2QDAEHzA1aOoecviQKO+SKOmefYgdI9g2SUadfzXC0R5YErnBXKaS7SQG7ZQBY/Fb9iWebBgTfs9RLgOqq7FMIX/DH4z8cGz2EqMYX5HNgHA== 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=pYrG99WMMaEn/7nhZeUcYwO99UpIRAGGmfiQygB+tpI=; b=avymZNI7D5drUYSrkuQ0eyN9/TPg5jlD1fU2ogB2hkE2Wj3ePebqhQ1+EuMmOjjq3YGLgMU1WO8rvD8kLC6dY2HM1fYlhaoyhE5XVDEWty/2KJssDPvofp2my1ydLIUls78uNVoWla2LGOG8xsxdWwv5udp93ZWX3gk6CNiEua5FpPppmSXB89EO/QvDEh0u9rku9fQxBRz2opmn1jV8QgZ6Ro9l8lYioPeSmXfEMkwsrjbW57uuRQBdOQLGteRK8zo6gMabh+77DFk/ULLHEG92T9remI0buMZ+FpklViU/HHTB/EQSuD2eKwE5sSFYipd1uBxBH71rfN1F4VKOIQ== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by PH8PR20MB5337.namprd20.prod.outlook.com (2603:10b6:510:1bc::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.19; Sat, 17 Aug 2024 02:23:44 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::ab0b:c0d3:1f91:d149]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::ab0b:c0d3:1f91:d149%4]) with mapi id 15.20.7875.019; Sat, 17 Aug 2024 02:23:44 +0000 From: Inochi Amaoto To: Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen Wang , Inochi Amaoto , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Chao Wei , Yangyu Chen , Sunil V L , Anup Patel , Lad Prabhakar , Hal Feng Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, Conor Dooley Subject: [PATCH v11 1/4] dt-bindings: hwmon: Add Sophgo SG2042 external hardware monitor support Date: Sat, 17 Aug 2024 10:22:56 +0800 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: X-TMN: [sZgOx4LY90fm1NeoKmv5GcfHXPm0LFlHq0x1cZhTlbA=] X-ClientProxiedBy: TYCP286CA0212.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c5::16) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240817022300.360949-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|PH8PR20MB5337:EE_ X-MS-Office365-Filtering-Correlation-Id: 5cd3e26a-db5e-4f6a-dbe1-08dcbe639de3 X-Microsoft-Antispam: BCL:0;ARA:14566002|461199028|19110799003|15080799003|8060799006|5072599009|1602099012|3412199025|4302099013|440099028|1710799026; X-Microsoft-Antispam-Message-Info: xa1vZG1VvzLvT3ubBmiUpDC7ed3lRpLgTeUeY53uPcdGOEYVb0NouWNDoioNuYkJOyEOY4z5QXjSkLbWKwMpd2uyLbzWnR0oqmiZqkbzAZgKLKfLvgO2Col2h8iu8r5+R6pxXh53JwGAUrDhYnzr3BR6weDmsIUl0icVaWGIyS2ZxnP0QPZKNZ4G0R2J9p2VjRQxoqKKWFJIiR3XUwLRKjEDOlR4XjVZV0BVWP8pN1zR9pRN5k0CZaZwrNepwVep7+5A1GIRExkSmG5duKyhgHgK8xGha553utseuCYSCONovd2rSm7Eo6oMVCsQZh7bED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1TUpfiXGCB8eEBO3hftLfmhXoCVtxbD3y0iwsHMXSPfhvCIXb8THrkdfU8Ji2+PjMJwoaUlMR1IlAJeqljOVAf+iScO2SxnzjuyHoc9h+EBT3S+Y97jPmAtP7jhdT21HMeaNYrZQ6B1CjNpPFoMOtfdXhwombNoBt5+ETqp/mgO3iWNW27Dq0RzA+tqrcGPKlQLub9FsTeLF4UHp6t3ZkaxTykj/8MWUqFAJ0gjHR7P07uwYNDfKggldl2XWo1fRs4IYlZ1LbjOxZLDOk7mvyUD/N3YXvEozAEsynxyrTPzx5B97w3xuUWyr6pbHRNNfr/17T/3/jpuJsMguyrJnXyKK04aByI+184GjNMgGDzktsQufu9Xlpg2z2DKXTUaAUIM1OuxCYuLL9Ji061igjlhI3TTHukfHjehDhhJQ3DeDyATnjAXzEmM9Lb8Wk+fYGfYMyUSCLUVIxuvG/Jzdf8UOGMBHsdE0AAM/nO3SWx5QZeN9YD7R4h2P70Evq65g0NvI4Efa6PLPyU6KynHSX0paEOmhOZPopVpCT0K2AT+o3fJizRsinA8WBYSU3O/AAeF2ucVAqmH9jNMGohRMYrM74msJJQxiHjn4RAceyDabX4njPpQWG+HCDvS+TkHYSrCiPiBS+HxTbPOoJVoVKpIkGGp9Sn518ChPHN1kCsbwbUhwKD/e/+ayy7NBlgXJd3MYM4e31HFpbXBFU5D5T4rdnj+5pUxOqO3x+dx++nx+EbpK//XcHFA6Md8/adRqkRhPFR210vEXVxvrYh1AmAEgW5o+17k1dHgZ7 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5cd3e26a-db5e-4f6a-dbe1-08dcbe639de3 X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2024 02:23:44.2702 (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: PH8PR20MB5337 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240816_192352_352209_AC39A207 X-CRM114-Status: GOOD ( 10.17 ) 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 Due to the design, Sophgo SG2042 use an external MCU to provide hardware information, thermal information and reset control. Add bindings for this monitor device. Signed-off-by: Inochi Amaoto Reviewed-by: Conor Dooley Tested-by: Chen Wang Reviewed-by: Chen Wang --- .../hwmon/sophgo,sg2042-hwmon-mcu.yaml | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/sophgo,sg2042-hwmon-mcu.yaml diff --git a/Documentation/devicetree/bindings/hwmon/sophgo,sg2042-hwmon-mcu.yaml b/Documentation/devicetree/bindings/hwmon/sophgo,sg2042-hwmon-mcu.yaml new file mode 100644 index 000000000000..f0667ac41d75 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/sophgo,sg2042-hwmon-mcu.yaml @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/sophgo,sg2042-hwmon-mcu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sophgo SG2042 onboard MCU support + +maintainers: + - Inochi Amaoto + +properties: + compatible: + const: sophgo,sg2042-hwmon-mcu + + reg: + maxItems: 1 + + "#thermal-sensor-cells": + const: 1 + +required: + - compatible + - reg + - "#thermal-sensor-cells" + +allOf: + - $ref: /schemas/thermal/thermal-sensor.yaml# + +unevaluatedProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + hwmon@17 { + compatible = "sophgo,sg2042-hwmon-mcu"; + reg = <0x17>; + #thermal-sensor-cells = <1>; + }; + };