From patchwork Mon Apr 29 12:03:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13646720 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 B4E9AC4345F for ; Mon, 29 Apr 2024 12:03:17 +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=XPsepmRRLBUJwGGFXmqruxU2UPPLK100t+GrNrbjuoI=; b=cjCDaDPxfq1BXv H9b081YEo2c7yucOE8JLgqfPCWcqwLTIrY+SwFreD7KYNoSDXRXhGSd5HAc0SdAYBOMOsW7q9PmTO epNxwFSm6tUaEt1BR8pLUocKz6WQnN58J1iLkZsJF7A9j6T+6AB+vzas+6WUqzaIUCPymx8vyMsDm PtPJ8o4kZbngyyYm3EsmnIN6DfhVNcApNIvngdGD2MBsrFEtNGPk3fUX3k62lcxvSKnIt5A9BknWw NwaPzdqcYjOJehvOLwfLnSAJj3dL8TVuDlRDP8naR+y5nAHqj3hyNtaYjJ1qiLcQIrCinjPMzqSC6 BzzVKaY9semJhq21iUOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1Piz-00000002aoh-3ggD; Mon, 29 Apr 2024 12:03:13 +0000 Received: from mail-dm6nam10olkn20826.outbound.protection.outlook.com ([2a01:111:f400:7e88::826] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1Piv-00000002am2-2CXj for linux-riscv@lists.infradead.org; Mon, 29 Apr 2024 12:03:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ta6Nc+WGgTHiMfgcmWyt+jFh/gAejnsAidYEHKrQklR7m8YL9phrkuH1kqI/6yn4i/8YEL+LYM0/6FbRjQ1GvUi+4ZQIdSJN609UDSNmqmDGnnsOSFisr4/oiYIRfRbRcDGhSVXZV6t/x49rPEx+AvbvJ+I1GuS9/S4zuD7JCik0zrbCW3Fs5ZbL2UBffoXUUU/LX+xucbET1Wd2GJZz6dSR2XSOhqT8g6UZ2X80Reu5qgdo6FGdzgYsI6lfQLRyw8206TpBvjjuZMVw6GXiMX5ZnR1dmiUuCiHqoPpZk8jhcjYfW2stbR9ZmO1PKIgNZ5BNrLmnUs5e0sKzEJFBcg== 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=4AJR09LijUvUETEouDVcTeBTTX166sP/0i9SmQ0HjcE=; b=I2t9vkUTXYAqnD+LUhwXA0MVvb+QmXUF3TiariJDgzoNhbIdaiK4TsUrJF5euqqneBYiVGO3OJxaw3q20G2uTJioBLYjR3W7qZSrGCCjvys5r9/Z365AEL6C1qDo7lRGaBvSqfF4YMNgC34g9hyn0950WIMbcO2Fh9Ufy4lX5bCs8dy5sDx2lL4PYcG2tSXQ8x9bu45gEds826VudM7aUR91MVcZKbZFKdOIB7tVONjhFkkwo0XZACYMWvSUSW7OsxMb6+EQE1g7dsUeOVA0OgseBpitdAcpbFhID9d2RQxSGbZWu4sMj+agCCwPT69ysg5DAa8fWx6ksrUTlhFiiQ== 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=4AJR09LijUvUETEouDVcTeBTTX166sP/0i9SmQ0HjcE=; b=gqv37RT5TcQYJDgdS0I8uBDr+19s/osTJ9mYo2L5qAPeSXu6K7bdIUn1ppc24sJz692dQDEj68IjYT5LGzGtNi70TpjtzMkXJLxy6/0IHTIk071jfeIoAO9+SJiuRe9DZw821Lo/6UVTlk2DbmB3BImwHfUPHhzGF4oP9JSaEgMvOiPEH+W1UewN7NRUHFlIGIvi5yTaor1Cw2y9kqzPhk6nQmT64QZDuo2kX8cB7Mx/d/56/YiGoCQ90fpyh6nIv37uRRTmYQQTT18pCnjIs1h4XO36Ei8TQA00ncmblb/dr9HsWT/07BBzPq3B7Bdi2D1U8zm0+ekXBXU0+2Bvng== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by BL3PR20MB4970.namprd20.prod.outlook.com (2603:10b6:208:3b5::15) 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:56 +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:55 +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 1/2] dt-bindings: hwmon: Add Sophgo SG2042 external hardware monitor support Date: Mon, 29 Apr 2024 20:03:24 +0800 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: X-TMN: [9V44dS7utp4xySV2uYKXctrM812D24fIM6xrmhsduDc=] X-ClientProxiedBy: SG2PR01CA0163.apcprd01.prod.exchangelabs.com (2603:1096:4:28::19) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240429120326.860160-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|BL3PR20MB4970:EE_ X-MS-Office365-Filtering-Correlation-Id: 197a3882-771e-453e-961b-08dc68444db9 X-Microsoft-Antispam: BCL:0;ARA:14566002|461199019|1602099003|3412199016|440099019|1710799017; X-Microsoft-Antispam-Message-Info: FG9weq/+WA1B3tedQfz0rN1VUlXjjMQotldDZ+w2VGSWqirTnundibNo5x9rmBNZxkMLA2Ul+FU/FTBMkNQFFn8fwxF7E0Agjcd1u2I9Dj84aIUu/BEL0O/ILR3wJLjutamRKw5ZtCH0T5y+ev14eTFCuxqixHLY+2VY0EPor1JyMQUUafPG7iMSkXpinXrC5wLx58ThPB0Sekl7ML18ThbqSE/iGDq2I8aTvbwgYKu0uPN0zdPjoN1XMAFl5WcSooqPcux/6WHZtORsppaNqYww19W5pzZmGBkbSTVODsatSl6lVaMgEKcBNS7iy1hcLe/HcRTFa9rBpPhB/8EyayT7m+M+4IU03j25+5jZroikDfqrslNnu5IFLqlkFjACilFoCwF4AY8Xvc5MLSsdKr9/aHLECnhOj6hh8uF3FfApxb9trfKm289GNT8Z3lrYBbuV5dGRV47vVPHPdY5HowZSxIVZcok/6vH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LWK6K6eeAlgSasoPNUMp4nUhzCp2BnlBMHMM0JPa/OiT7KqkKeGgod8OMEyoYQmafcQV20xUJrwQGuRND0fNCuMLsCbS0z2lDFckv7IF+JDZXve5+QyRBI6OALNwRyqBXu1cDin/e7yEku/oeM19p/ehZ2SwTjqAuMgB7hCEUd8PwWOMX5yhHGbPpO0AghwRtk248IGk/gjzjdCvlk/2otKx86IRRJYhP5lCT0pcVsN+h3Ro5dOsh7gTgZnVsVnCHhB0vwkQzwkeMwkok54gzJXMxlHJ28AV2qb5Yxoi5Uj1X4ysB/GTvhHXwVwqWFsqrjwcSOIeaQpBhqWHLwo5yhAqWqXxK7K0px+mslJgOfe67q7LLFXBbVgxFd9of6To8vGC5N+Phve8/F+6l6vJCrbCsSRAg4JfPt0fdcl48zzn7b6LY6oOysYryaR1TGwVSjrG3EFf+C2mNVl2AkxFmJqyA5Mx9a/TXk8zmc6iLTww6L4Xfj/M X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 197a3882-771e-453e-961b-08dc68444db9 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:55.2719 (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: BL3PR20MB4970 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240429_050309_597533_C06706F3 X-CRM114-Status: GOOD ( 10.67 ) 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 --- .../hwmon/sophgo,sg2042-hwmon-mcu.yaml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/sophgo,sg2042-hwmon-mcu.yaml -- 2.44.0 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..64a8403aaab8 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/sophgo,sg2042-hwmon-mcu.yaml @@ -0,0 +1,40 @@ +# 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" + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + syscon@17 { + compatible = "sophgo,sg2042-hwmon-mcu"; + reg = <0x17>; + #thermal-sensor-cells = <1>; + }; + };