From patchwork Fri Aug 2 12:38:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13751530 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10olkn2107.outbound.protection.outlook.com [40.92.42.107]) (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 CC4EE208D7; Fri, 2 Aug 2024 12:39:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.42.107 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722602357; cv=fail; b=cMnllRnBUL6osi9EB57bhwiTQSS/Vt3YMBV6PRjwB8JaihYuKJrKTmoJEb3i60yS4YgUNZZQa5F3675RMcCmf+ccSHPuC/IcdUlzbPuy0mfVmlAcyUqQtffMg9YK94IDBnpprY63yvU97vuzCoCqrDKsgn0IFVtxWWQ3jlFcIYI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722602357; c=relaxed/simple; bh=pUUlnEYQLKGFDYNNgM7qDiyyi9r4EzIJ9carsmiNCvM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=FdTxOhvFJxZ029rBIdFCj13s1sRBMUCjk8F3sTN7H/H+pO46OiQXgkAhwU9U5q32aPJPrynNnKH7EOwSBKRIpt1bpA2TEatPAKTeXQoKtIPR3C/KR1JHPPbDXnitaFBAn+JNoh8ClxfgjixkdTjqlyCkvgpjm7389WjcNjhCDhY= 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=mCoXO2sL; arc=fail smtp.client-ip=40.92.42.107 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="mCoXO2sL" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=glgdLocOXZ3eID9KMtX/Xaf/ZjMY9yqAxZ0cWpXItz1ZvhF9Bf1BFn2bC2wikQjdCyfcFUuLKgAMLkj9xc4zZNbpuS24Vwd36BnyH/rXqC/IiczgsAktLxobJHZ2CvvPVrV9O4wC3t7bJR3GqNBlV8pPjT3kJ3k0vHnEi/0YhQ1O/yhbUOoi8yHZtY4SHwDbfoL/8cqjz1+H2La1XVLsgmadr514xBshpVN/Fay3ETpGO7wu3+RRUAEuH+oEcIT14B/FB0g9wkt+vXVB/jSR9k/+IKrs4OfXaEp9gjrYT8Gb5snEbh0jb8YAD8Zqi4ysO0hB6X3S374lwwYIav6EBw== 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=Sbj+4yTFSUndfwHSCF71CnBFdWTSVSXYnX65mm+FGXePVcCRMtxjjMEWn2t78g1S13R2YWZyaLfqlikfKLBDvTLLZRwoOPkETI23WS7LYht1MegvdO2LuyOzTzps9s0vJiWT4W0awpHtpOFFUAt0t6goA89ph6lxh5T0qbaAlwbXRofPzPeGwBBFtCn1ErBCdbvw0ID5MAhnIH20Tv5G/ZOXEtSaBUiladF09cEWmlW1r5MfQtdve/E8bu5688HIKbEw7p+cdS5ZJm8MSpOuan0KD289USV2qrr3j956R2GnWHJVDSLILCOG1eaR8FOQFh67tMRRW0/ilgxG2xfz9Q== 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=mCoXO2sLlESRTx+/8gP0q5FvV3LgHG1ScxU93Gke+R1Qnsi0/2xZEU2tL99mXC74V+MZS9lOSf87sVktOUSJ+mhpWsjiPRve5EVDlbY+ROwjOFhbpAqUNjftqWPwoW9d/geBjSIsSfxJKC8N/2l0qpSTHy7flHpBU/WUwfJqDXjoUlfhlJkfiuQqAhfxWKrmIL6LU1tw1wniSFglBNqJYBNqO5o7mAKZ0amR+Xbf9LkqhB2vNewcC5iAW8uP2aXj22kX7UIC5f0iv5uR4e+Tt4xTpFHnJdMQQy9QIsKVRwW6pUC40E//4S+gjL4TVDJL9jHdQKuRXDAlfbylk0UFRg== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by CY8PR20MB5499.namprd20.prod.outlook.com (2603:10b6:930:55::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22; Fri, 2 Aug 2024 12:39:13 +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.7828.023; Fri, 2 Aug 2024 12:39:13 +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 , Hal Feng , Yangyu Chen , Lad Prabhakar 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 v9 1/4] dt-bindings: hwmon: Add Sophgo SG2042 external hardware monitor support Date: Fri, 2 Aug 2024 20:38:38 +0800 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: X-TMN: [z+H1SQR6E7bOTZOmBlJx/WjDuZGComY8OSJzcZoVEIw=] X-ClientProxiedBy: SGAP274CA0022.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::34) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240802123842.1492286-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_|CY8PR20MB5499:EE_ X-MS-Office365-Filtering-Correlation-Id: 9df565ba-6034-4288-fa26-08dcb2f01ced X-Microsoft-Antispam: BCL:0;ARA:14566002|19110799003|8060799006|5072599009|461199028|1602099012|3412199025|4302099013|440099028|1710799026; X-Microsoft-Antispam-Message-Info: Mg+RUfP6sPkO3DksIcn4TwpXUdEml5D1J25BBI1Cbz4ty1UuDBEHYpKY2JA1aZh3wsnXYVFESAuV57AJh90b30K4tqLLrCnbgbsXkIzPL2rPhO19du4uEX08PSP6wV+SQu8OD9Dgm5zn2NYVPKYIc+Lt5TvY8v2mmC0ejRsBHTWYccZehstdhcZDjNqvalC/gWYEp4BwXmHB4Km3VmithYBh8BLMxGA/FTrsWdH3NvKp0oiFnxcyKPKbjiCgA6CCkmRibdn8rFVPHUcuZftt1FK4ES6MSAYB1xPznQOAsFkb/P5AGtM9UE4oERCUCCOxaLd8hRhG8J78EOcQh0fcW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Rfy0Fq0nFAQbOUvYlaYuQPs1Sgo5v4Ivau2Ndh+3IZCjcknaRd0jN6YNHyvJL/gZBZfAVsHEUkA/JuupbwRdBMNzOR8TR9d4J4wrkVBRJr1sY45PMwSLoULww8ZP8STmww9wt8qIGbAKtaxWOVh7RXt60GW95iWjz3/gCV9DsX8oFjkh8txSrItsDYJJp0VGIB5ghjLeZ+Tbx9i1bhvGhjHwsHv3icZxHSHEWdtv9H8ktUM6w8Uvh5wx1urTHqqZq4driklOhaA0QsJZsbH43M+db/DYaOXZoxaEBNNcixE+uYQpsBJDsQToUPAr2dOqNi1B41uCo9Pd1mR9LafbIZ7h12Vez7FCjCxVk9DEzZ0g/zMjeauWSpzosX9u99yG3CVAXCGN9rbaEOa6uJR56zjs+h7xkmx1KoHQm0GuKDaGYw6hM9HUqnbVXOQB/2aaGt0QlV4awRsDGFcu5Jfs0lJ1K6AHikhtefW6FrPXgtqlDB5m67mSSk95q0jsiNQbU+7kU9txClLi8WlzBZpjvEMs14LBuTW1cJPEsaBk76wSTNfFMMFH06quy054OlIZxOB9yjpNBqe7gw40DxkWkf+q5kJlpctPeiBPNlGCML014ieKyXnXnCDThhxe5Ep82bmKrKVtLu2/g3LJ1u+PLGDQCHEbAUnzILsYPWhNw2OL1q7kQlWjXVx0+27a3q8SF7twHFQx3wA7q7Gx3RdotKcVDqzBR+vB6SXfJcgV29nPZKm X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9df565ba-6034-4288-fa26-08dcb2f01ced X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2024 12:39:13.1469 (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: CY8PR20MB5499 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>; + }; + };