From patchwork Sat Aug 10 08:03:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13759446 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 6A344C3DA7F for ; Sat, 10 Aug 2024 08:04:45 +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=CulejmVzAvQ/PM uwDXBtvxrRLR87r7vGNkY1GGS681rBYmkDDRxnD14GenKUC4zBUt2YiN0TQ14W2gxw6vVTr2Jgusn 96JU30rJVGn8lmQNOes9mMlcEVctSN2oxscZe/zhnMBpUnX6zKDa52HaCuHSx5SO27OAG1tAAF89+ OXObHFfyCyHRX+oS7PMr8JXYmSt2wpjehCTHE4kIieUgkn39w885y/hdeLmQQ+JctVCszn0yhHJCS 6Jojt7eYSM0WE1ZAXm2N1NVZJInN55oN3ZHORn1Ors6wHacILqdGDtacIR9F+Jv2RgNxNJIRFS1wA dHql3iYlHkX7YPOow8Mw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sch5e-0000000DW9n-0MNG; Sat, 10 Aug 2024 08:04:42 +0000 Received: from mail-bn8nam04olkn2080b.outbound.protection.outlook.com ([2a01:111:f403:2c08::80b] helo=NAM04-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sch5b-0000000DW8J-220u for linux-riscv@lists.infradead.org; Sat, 10 Aug 2024 08:04:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Tu5Ac5qiQ2JzUcGy3T5PlKAGJavgmdOqdMbNc6LK4oQAarTui+g6hsqZqoSPHWJ/Q9/DxzlZ6Gu93pFa12oqmmjagtsWuDN44CqH/VmlKNAc6Xw5zTUzSPc1wUG2anr9VMwq4jGKhG7fIGdY6/r0/Z1j/v7w69NLSGKNUr4bjurIcIzdxjBacMo7IYM14imwW4vuhxDrrJMRjfoWW2cxMmzEuE+X/46degImZeJM7pq4/9Rtli7vXkyqSoWyrqticMGevxwNqWNMX4raAcpF61ZkWEze6VjseMUmbBO3updFIPbzagc/OZsuSzkbbOUelZYDBrR1UcRPfHOuxXlD+w== 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=dhvC3la2cO/qWkx6PXqZ2uMeMvI05/CVBV1OjqDMDdLQ38yyLtN7Fq8q768mn4zlksLvbQb+vWeyg/wMOeZnoxIWDF/Ci65w6CBXPrcHct5jk27woCdzQ9cUBwbsqYVXhU6FSENK+FOHs0Wpq3yjZ7DPI/B1uWR7Wd74/j4TQN17MtbGXI8cwoAHj9f4kJPwUeHriHrqXnDZZxUr+85ueVbGOkeQaUDwPH1jC+7GPdd8Pv2O4Wb16x9OqnZxefqhEZH7EqDbalLnUUi1dPk4GjvivrPfIKqDCno2sSbsV2+j0DQvGRDpHmckMjmlrNd5uiWKKXobvWPWVFgVQNSqnA== 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=KjWiWT44L1Hy2l8egfwdScKWvWFEyXhrAv0Q97sTIBAtgzc5vvA0Tdd3pta4fff4vmZhbGKpmCr4idvwfRUKo9ATrYP9HuzislLA8ZdFUlwpJ06915LFS85qMa9l6DkvnBioBUxOhtMhp/MX/Vb+g9Jz6T7jounhwW5fH5GbpRVxxn43pRI8tLxpjaDxCJ8iSaIj4EhEYOdTgdhAUc+1M8prD+OkY66PLHZbfX+P3/MpGeV4Fwrc2ot9y3ZiyaqAxqsCRCq+RndLQ1GIoY1oAWR8hv8o2F6CJH3VSvf5ujt/JTw90eHzZ91Zqsra9FnejZ8alnnzUkUKhAi+Amq8PA== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by PH7PR20MB5117.namprd20.prod.outlook.com (2603:10b6:510:1b0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.24; Sat, 10 Aug 2024 08:04:32 +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.7849.015; Sat, 10 Aug 2024 08:04:32 +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 , Lad Prabhakar , Drew Fustini , Sunil V L , 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 v10 1/4] dt-bindings: hwmon: Add Sophgo SG2042 external hardware monitor support Date: Sat, 10 Aug 2024 16:03:50 +0800 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: X-TMN: [zQSdtavhWEVe/rGB2h4nInpjdIXI/+pYw4fmVa5YY5k=] X-ClientProxiedBy: TYAPR01CA0165.jpnprd01.prod.outlook.com (2603:1096:404:7e::33) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240810080354.387820-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|PH7PR20MB5117:EE_ X-MS-Office365-Filtering-Correlation-Id: 7e660935-11a2-4260-2001-08dcb9131169 X-Microsoft-Antispam: BCL:0;ARA:14566002|8060799006|19110799003|15080799003|5072599009|461199028|1602099012|440099028|4302099013|3412199025|1710799026; X-Microsoft-Antispam-Message-Info: 1HWW7h6PoYcPsyKmz5iZ2cdY8jKQrZ7LRVyOMdKU0IQZsPC2N3dsPoJJ6mOrYMuevjFJ8M2IkMVb2GQP06UL0Lgx6UzBWWAHS7nBGeCpIcznAv0YhxN9YhjK3bFJ73UgaklCP4rX/Oop6wh1wVt7p0sbnjWtmVoFDkEMJnAxNWKd9Q62vzfFsdzfhCS5Ap3WkWjG6cAxA7M7yEPlPS2nlWlizuO5Tb6f9wK8+CuST88hjIU0AGB0nEPjG/yjdr4nsugbd6Bdvm4er6AAiJC7k9YqdGnRzJaYKTJrYnto6rfLXcxRwimJ7oUF5/DawMxGgW8CluJE/qE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OzDg1a4KhpP84p0yS40CE9TasgXSvrmfOldhIDn2KzZPJwEIRCDARlluwg+UOjQ7sHLUu+QdgxQBM9k+dXjgwNsQwSNjbI22JpnuR+PydGwFDRfCWxqyzC0cPEMnii2pr3kEUpUhJREeJaw5pjWza1jkVGaed4aUgp1yNTEcHMJsa4pWuvYWnB9NLKo/fcw2EtFyebyRNvK8kWCs+wGq0ziL4eJXpPtrLKAHAeFeDEQnDgz4ap2Okr/b1CBsav4dnACUvbiEsMDyKPTi3zU6CQIDjJi1u+6Flrr0pZ6vh2T93AOtFnnckMgJobV1mL9AdUx0OgpaP1t8DQZA9S1WlgL77fEaEWAWmRYCXC6coRvf05xyouugHgPvhVfi93xGCwz2qDpmACbZlIEXJER/wwb3uZ5txM5DhtMueydWYKKGHV0UW5CefY4syO6HXZVO2hNxqpyubla4TKVJNa+q+4naFC70dVv/qGuYTZGqyVZ2DP5/Gxhr//ocT2CB3wkUl8y2jUoJX8SPFQOh8ZTsOqR84HLZf6KukQKpFYHEAbv6mQoSammv8+bm2iA66C/mTSi0zI5LYtJW1YTTMKIMdIe/yVE3oo7FvaHqPl050BafDI7rVvbd83R+drCQAw4np9dRCHtJO9mfUEfTZ/5VxBmmpm/tp3+ES9zuXBzKCNI8LetYexcUPmZVsqipbbpKPKh9FbCXFUEw6BGKsTEwSaridmb2Jpa311+ck5fVjbmGz+DH/jGA5iU2xwYorK4ROzT7LVjyTgf7bePtcULNWEDpkc8XtJ8 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7e660935-11a2-4260-2001-08dcb9131169 X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2024 08:04:32.8883 (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: PH7PR20MB5117 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240810_010439_551045_BE96B209 X-CRM114-Status: GOOD ( 10.50 ) 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>; + }; + };