From patchwork Mon Jul 29 02:25:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13744194 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12olkn2049.outbound.protection.outlook.com [40.92.21.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 946E71B86D6; Mon, 29 Jul 2024 02:26:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.21.49 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722219967; cv=fail; b=k9S/2cdTnJ/6FSU9QzCNzh/PHnBae1r/nsVI4z8LVNRW/2Y2ysjMTuDzB6fYYC6Yq8bY23qYPK2NnZle5IRIP1obwl7xmyf/j/NESfsyRMvd2NfNm6E2i8DSVkv1RfcxCS87g5kPDdWpJgU6LIeUhSLqBvJwDu1LWUqGPRn1xso= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722219967; c=relaxed/simple; bh=CXePE26trm9gn0A0SDFpazLwJBufR4fFHb1hJgCoriU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=nMwsFpCGr4+sEHHV6OUM1QXlgrTszic5G72A7TfD6Cjg8ZSS1/Z6Lm0FxnpdeV8m7kaqx/h3Z1uGPlAhcEM1YdO2nI4StBRfr74h/2KAGhQaUsRF2xUssY070aW5GRqGuKNVQIuhRomtnOM6S0N5eRa+tse4snavC4YXZicXGrc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com; spf=pass smtp.mailfrom=outlook.com; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b=g8TbalLo; arc=fail smtp.client-ip=40.92.21.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=outlook.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b="g8TbalLo" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=g6PQ7DEKpoOd8kP9cXfBPhs9he+XWQUwVJxG8G1mU4HeQ48Ejk/Bo5F45SaazALmRfXIEhNP37s2xwM+z4DlHkIEOf3ySqMK9N7pgHHLO24bK+SyPrP/v7KTZBmwGfb7h9/dwBuL+SG+Dh4Ix8MWoLM8Xva97Xx1DwstL4iButA8pLcUtb08AEASYF6OJxXwjsrzFv1OhKdDroHvC1OLdS9IAiCz2a1CZm4Lr09Yhen5J2sFPlubCYRqyt0DvQhp2fnE29Moh1ND5v2dM5oHS9m7lG26zMouiM2Mvcif3OzWEz2ScgHcxNZCPAHf4fVeXQgiabeOPS5UPJewhpKCiQ== 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=NApx2ofCL/ZyIpaLFfQKUZ2T1qNdwWJgOd9Xy49aDag=; b=c22Q0APBTd59Z4uA255E4O0EEILMgpGdp+OrdIRW8g5cqWQ7+NR21pNJZPsFa6uaEtw9mTrqf6NkIIYIPVZnY81aN2cggVQwUANww4qhluc2MfNY1H5vh402Pby0cJ/a5kqPZFgWuEHB+j2z3Y7j5s0971e/zGKq7lARn2sZl8HsR8Xh4L7ytqd9f3Komd/nVV7zGunfOBWcPR6yTRkXldwtpcH1IrEJ/8SxInvk7L0BDbEoNZa6Q3BFXxZ7Mw3lEgwSMEdzZtQ9CgrmPOxoK8Bh3TxmdgVcl+iU9uLNtBbZP514K6tabNt8VOLiqa7MXfQYMck0+SBz5lsQyEUGwA== 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=NApx2ofCL/ZyIpaLFfQKUZ2T1qNdwWJgOd9Xy49aDag=; b=g8TbalLowpiEzIjRsSr0MdizMogyM11HUudD/NQ1C/U7Vm3QiHel/oaUnxvlvoQplc7cFaPCItT3mx6IdqzO+GduS/SDwdmMvlddG+BlylGmZKYg9lCi6prKLjsPrczHQHqudFsdNbyhLqa+foqhGPGdvGCDy8sjg9DIYLmevohXO33ANzKBzeNtuT+rdpoGtS4/cKBKBF7SWA3v1T5Hw9Tnq90akqXWLxWQwvw+lcD3oobP1KBgAOKYgj7AY+eL+UrdweBwlr53ntotnGtiMnpIsi1Ii2pndSts4cwdY2GK6Wqz6dVFM2zp4RArvyYUrV1MbsFHCUJX8tPDJQ4tPg== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by PH8PR20MB5413.namprd20.prod.outlook.com (2603:10b6:510:22b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.27; Mon, 29 Jul 2024 02:26:00 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::ab0b:c0d3:1f91:d149]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::ab0b:c0d3:1f91:d149%5]) with mapi id 15.20.7807.026; Mon, 29 Jul 2024 02:26:00 +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 , Jinyu Tang , Drew Fustini , Sunil V L , 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 v7 1/4] dt-bindings: hwmon: Add Sophgo SG2042 external hardware monitor support Date: Mon, 29 Jul 2024 10:25:30 +0800 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: X-TMN: [9Qp+zEbo4X3zSUQuRL4ng276c2qnJdFkuP6fyVPhJJ4=] X-ClientProxiedBy: TY2PR02CA0018.apcprd02.prod.outlook.com (2603:1096:404:56::30) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240729022534.842326-1-inochiama@outlook.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|PH8PR20MB5413:EE_ X-MS-Office365-Filtering-Correlation-Id: 3617874a-29bc-4508-de44-08dcaf75c90f X-Microsoft-Antispam: BCL:0;ARA:14566002|461199028|19110799003|5072599006|8060799006|3412199025|440099028|4302099013|1602099012|1710799026; X-Microsoft-Antispam-Message-Info: FjLaJ6Yt0N6u7HP5Bs04LYnn3mkMC9SpgZPiuKXMXH1erYzJuNc5Wm+ta+MZ0lzqf7XFa42A6BTzg01iTX3eL33ni9aZAWDJq3xXRnGWhwEJLWmXwe27FyYv34FYh4451HpHYf7D+D5F1z5XnE1wtKru6ZH8tOcgGzC6AptFYuNb+pw7RKJkD72s+UEDQuVTYBn69hazR3aG7HOgygH7DRez1xiL43W4jRh3/objHdu2yS3rvMjWDJZvG9XkLZnAB9rZZeK6jypcANpsjTzTqlOCYJrm7Dt5kurhbdM0WVgpJPANFh1DwmAtTHIK51g73vSvy0RShZ5xz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RX3G7ujhaOSUDldoeklClHQAHrdrPdsHT145QGkYlTOLq5AMxGLpJe57iuxZf5GVpLqiY8CZyyNuhF4N4z31j5BFzP94qimxsOT5tx5M1DVjBx2VdtdSLQz4v6IeHrpV0Zv/+rgsVq4aet7tHgywjh5FOe3/06QVNkAAPQ32wxXLAmfRq/Ny0EMx0MbfG2DdBDdDtfBVk9Fxvj/tSCWVqaDwgn5CG9Ky0FEI12y9NZEBO5V2p1U/go2A3iIOikmxeEYF4J5Yu605fT9Eitl578gAIkzwrJv+I8iU21fgWI/x58QXOj67NpmgLpX7P3zahMox8ZmlA55qrOjEt+6UrpgT3dmrfX5G9gJmDnYBgVXMJg/QOMcurFZRJJyu30sJt3UB598J7xgraDpIOwxEImk0HynVqadUTzPe7v6rMZSRaTg70nxPE5Mrv02mmTbPZ5sztKrLNmz7N1R7EB7DZLjC8ypBkfJ93biGF5bzaLj3XweeQ0CTq2lMNy6Uf4nIPC+TpK4bF36YXpE8gCTf5ZS9U8tgxYJHCvWyB+ne7lcq9iigx0DkJ4VXtvMFl6AAQzcMOLi8gZcNshq+OT65WyKNuSWsm2tk0qJrEo5J5zopQm2IQc6NJU7oeDrQzaCdd1ugcfofMYF0j0w2iRRb7dbyisRQQHzHKnlThh2DHvjsDTAtWzp4NJKXOx1druLK3DuiVuAAot4292XaI2rS0KxjSMdrX0qM/bk506zgpEqLrgU85qH29MsT5w X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3617874a-29bc-4508-de44-08dcaf75c90f X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2024 02:26:00.0358 (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: PH8PR20MB5413 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 --- .../hwmon/sophgo,sg2042-hwmon-mcu.yaml | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/sophgo,sg2042-hwmon-mcu.yaml -- 2.45.2 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>; + }; + };