From patchwork Tue Jul 30 07:50:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13746885 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12olkn2047.outbound.protection.outlook.com [40.92.22.47]) (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 2D92A190666; Tue, 30 Jul 2024 07:51:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.22.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722325876; cv=fail; b=hemaJtg4TcKRTvZu+SZkLIoZmNqZxYV+o0M9uYwWxQeVjytQVOAajLz1vUaQHgh2BzAC30bU3hr8ApBA1FFfBoVkxIW92x8T4vBN2iFRNU0i1h/lc2YPQYfJ9qRTbLILLX2fP8ESH6i+6y6Bk9B4yqCtMpn/Nj1DP6Gtg/3cxZ4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722325876; c=relaxed/simple; bh=CXePE26trm9gn0A0SDFpazLwJBufR4fFHb1hJgCoriU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=qj4Cu8adc0qHcWKcMj/+7LdWEKV7z40+lkwch8i2KW1qRGWv3XBBxvwui1/JEDFY3ZLu1oORzBB1FF1KEQ3G1yGlfCrP4+f2CVQks0g7uKEdtimTBB89bHCwPlNKAZwkyKmMcPm7KbXunhZ0G9mQEDKLemKYz38/mFQuHkh9lbc= 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=sCcQOpnh; arc=fail smtp.client-ip=40.92.22.47 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="sCcQOpnh" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=N9XQGcTuuOO6bJvUpnuscIwXmZOiP5yH9pHlanRxtGetR0Wst6FNo+dTMin+9YdCD3jUbjYm9nRWmvlnprIWY/Fuln3buw29quTmifc9qPnHcErCBOLMvQo2JjtZQDRUtN1Wd7E5xxNviqg/t+FjqM/GOH/vGLgVOF3XKK69N3DZBJ9N0XLUxNb5Pzik2eVzRBJgffSWc+ToMVbAJvHklslxzMU8e2Vh204q0/3G8hJqqHsWHjgV8U4hRt0jQrxOseA5XY+C/K5L7aeyP7wclLv4+NDENLUV2s1l7xdKAUKLzQZsk0fDFC9uFJPzyEZZcQlIxRJfAdENUmB5EPo4EA== 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=nkhqEmkFqThi8qNiEkwyeouFbFgoRZZvPQpwl/1O3WuTTr9NpwwZ9NQxuOSwy/FzoLfx2ft8e70rrQFNVRHCy74JKcPbjeHcs1ArOHLdQ9fHK5L58YL93/BVKKyF2igbJhqhhXpnKzlM0l71URnP2V/NEF4JmNZZzu+PX1LZ7E8Vj4/sjIrP+SYpFBGvALuZbNc65v02RmgPkBmWtri888cn4gr+b3UTm7SPMaXtQ7H9uygTqwG6Dq0VpjNjfQhAW9Xn50ai0s5vdKkh6+jLF+/gUpGJUDU1ELRGd5z7C2V937P5fB/F3/1vDOWC3WKnsrPIzHeT2Wc/xPNsvrXF3A== 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=sCcQOpnhVvynZChvES6C3ovoB5zXhBjIeAzoMQYNDU7fKpLwR+8Z7Qx4TLs+85Mu36Js3rRvgMfYnXBQ5GW2DT5VglE/l1dZuPBl+GjZM7qhQixkwnhQnEbmf2Tr5NMxh3erOCklC/nNECawt3q3M7o6s4KD5HZOG1aW/2zPRvFZ3BpBle98REJOBshWN9qu4JEWMJTkm02BKfgqCyUIMXJW2wAuO89XdCUkqNz1UK7x/+mRjNWjcCdOivG/JXB1XxAak/d/XADJl17M0oeyi/c3yrqvyi7fA4hZN+NE4xqyGbe047DTozFnyCsTSfkXdmVRjRjhpb7nr30ZSsOPHQ== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by MN0PR20MB7552.namprd20.prod.outlook.com (2603:10b6:208:4c2::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.34; Tue, 30 Jul 2024 07:51:12 +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; Tue, 30 Jul 2024 07:51:12 +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 , Hal Feng , Jinyu Tang , 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 v8 1/4] dt-bindings: hwmon: Add Sophgo SG2042 external hardware monitor support Date: Tue, 30 Jul 2024 15:50:37 +0800 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: X-TMN: [Bhx0MQe1VKtdPGoV8p3rZRtnFgW9QxCOrOj+W5b9eEs=] X-ClientProxiedBy: SG2PR01CA0160.apcprd01.prod.exchangelabs.com (2603:1096:4:28::16) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240730075041.489815-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_|MN0PR20MB7552:EE_ X-MS-Office365-Filtering-Correlation-Id: 141fe9e4-f380-4745-3166-08dcb06c61de X-Microsoft-Antispam: BCL:0;ARA:14566002|461199028|5072599009|8060799006|19110799003|1602099012|3412199025|4302099013|440099028|1710799026; X-Microsoft-Antispam-Message-Info: XiDmWtVVfe3RMudIGP8s3jgAI1zTgJlOaLrbNsrOkPyZLxh0f4r6MgN4lpugh/XSXkK+z7No/PXFXSk4NPADI6AXVLCbNBD0BLM02TMF5Ofdm89yYodSSemLxORM4fyY6nPXFm/qsN+sSRpCmKgfomH7P4rn8HSzkPK+F508/ZZt2OrtuvjNyPUAS+Q7EP28IQPd/jn+0cKInsLzanWoZYMgsEzOHlGavljv04YcxDd96ITqc4YtVfC6DWIHj6RDjJAr6jojSEgdQCF7a1S7lBbO4sfOMSenvyH6eKwX9FgnrR/iJOozXeYRQk4UjQRAWE5zXmDCiDjZiHlxX2N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s58M+tcPdRhk3TBpMqVw5mtEDLbv06F3M8eKh77o9edFa25mOsHwY3uR7MKTy7q62J+1k7WJb+8aHtuzzoDUVCTJTrAtSEPOuBQ7c4ebpHJnsOwH4UKA4zydtwK9IlLL90biTvnwvs6I+xW8evZkQTc5ggaY7uBcX4tQsAYsd0uXHqWe7/V2DBnwat+GALUV84VUi4yEETF9xfkXTLzKXZB1U1yiSLtz0TANY/zeRxC9sP4A81JVxIrJuyIS4z0OYvmYYppsIDvqkD7LHWLE3fxDpayuvDWOj3o+TuXRhL5VsFSDTkNsvJVOAMj7UXfwTnT6rn2xcjNI8jbkrTXQd1C7SepooHFdYVS4CLE547cbphJ7/6buKvH0Ni8wOXV17oIVKlLy4kHfr3oS8kLlQ3KdoYcQl7+L/YVmwzVNPz0TZ08Q+BfcgB6trToIZK4qeeLQZI+APVocBsC6BlgCRjPHF6O9Wq0na0d1vA4VzpkCCWG04Mg2XOEE3dTBN8Ubj8BNV+2U54ZAPfXGgzrpeaEuW7h83rEcmeMGdKKL4v6fYIPamPfCaQKC5ATi+j4vn/1NZkvJoWK3cT5JAQ86Olt6FXPxMA2MRkX7d8BxweUySD+OZzx+G5M6G/orrSL3fFsEsFR0nVYOdCTAjmxsBHGFzWlP92bEQmFjJx5y1Ib1Y/kb0pNbw7HsQ052QuOR/IXI4Mubmb91EZwjFYX77lMZMtfcYSVvMa8QFwkZ877D91mD2VK1 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 141fe9e4-f380-4745-3166-08dcb06c61de X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 07:51:12.5977 (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: MN0PR20MB7552 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>; + }; + }; From patchwork Tue Jul 30 07:50: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: 13746886 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12olkn2030.outbound.protection.outlook.com [40.92.23.30]) (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 9CD36191F86; Tue, 30 Jul 2024 07:51:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.23.30 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722325882; cv=fail; b=c8QKEyTAx5AAMNy9+Qfm81h7qmC/JhgeV7aXAUaV5TU9mXhG7vD+Cj2jEbP1lab2DTQ9eqD+WX3UFw1VbbvPB/sZsV494ThTzeH/Be2tL+OrrTNJrsS+4DFlhxmLknuzBbHrx9tVbJAIEZXqg1foamzgYy3eTItfdfskJNbKHHU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722325882; c=relaxed/simple; bh=bp5FldTaOMK4oQtsiU3hPT+9raFFZZEgPPJfmq3dzCs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=UAUyp26AeHGvMNpAPczw+H3BQGBnKYzCwmiynjzJFFWCaY2ZcXZDuzU/vf6po8dMgmCAjcWbxuTEDJ5Kg8u0XmmqX5jaB7v9+Lp2drfQJYltKGWowzK4JscedafegVAEayDth+fHO0jL4uMeB2sQ84/YrVCuSCuufKjxdD8lu3U= 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=iBMN7l+W; arc=fail smtp.client-ip=40.92.23.30 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="iBMN7l+W" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uxGe/0ye3CSMOtqhBU+Zq6ZZlznaB+oh3zt/BkqlVxMac0+SjeDUobDUa7Ap1sVvbmo53IfiSSPxGTrAsW/69OXy4WluWsJMwRrxknFcCN1WjOULroBCzk9QPQ9o1m4vBFHwAwBqQ5bfSXI0mQOeXsq/QAOPY2kGkeZayiZfrWU4meCQQaJx4Fj1g09V2tbwsTeKfq3wGDEyErYjXH5FKiz5bpxn4wxBJq94Rc+G+vYr/8ZBz+IInAnVywWZ50hh0AAPR6oBVXG/jRL+nyYBvWnLn+BEjKm54M56u6+kqd39IoCtyssD75KrtRmm9m95HVQyxejB3JvGcpIvHJlf3Q== 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=/EstjeuHfQfO6z6cXhvZ4lH+ZqmhUOk8AW7L62uIBfs=; b=Llo84HjjPBvU8VNbd0hzmNZLfIl5Fihux+d179pBrItTH5kSn8Euva5FYf3HUvzm31lkFyX+JHrvhAkfUFpOn7UFLxbQlHsjSa6zfoXMf1n5ZuluDG5dqfVZ7Q0IvzyOYl20QTJtWChHqYYIx+OdcNqNHY6Uqx8cp5tWMY6gV7FSVDAO3AuewlU9jlDLWTkZz/87OLagBDfuW/vQTQuTYkaAoqwuIv5081lug0sPCPK1gxLVBMI8Y6XEvXUvjHU9LwdW/+tq9xmkmnAjIHc+cToiqBkPX3uWWHsmBm2ywGZ5NMmE1wRhAXnryLT4/LjhhXOjVm5NlXSMZKvliK5Jrw== 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=/EstjeuHfQfO6z6cXhvZ4lH+ZqmhUOk8AW7L62uIBfs=; b=iBMN7l+Wc/KEvhYjjr3jrT9Dw5ePaf4H0dppzonihg7DvuJphKMUrw3aME+OgreWcEjGJm1Nj88kuqQOcsMbdW8MNtJygmtGKLAx4ZGk9cCXH2Ed7/IS+oZcVRY3WfJ20S308oUAZBlESUfuviARKEpV7Oevt999Dg0HoUIkrLaTKqoPY8QxxJD0yacZXRwRQ+VSYCT9aRNn12ZQh3zT/LmwFa5dzj4QpNFmHfd6nsnx9S6Edmo1u4eN4d9DuMpFc8EGsXqhPW6p6LPuaDIcbvFaAQhFr64c+leFIk/JMZ1iKLTom0jMXAONIUH6Z1JY5EcIAL2E2bVj0Jwri7+2GA== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by MN0PR20MB7552.namprd20.prod.outlook.com (2603:10b6:208:4c2::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.34; Tue, 30 Jul 2024 07:51:18 +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; Tue, 30 Jul 2024 07:51:18 +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 , Hal Feng , Jinyu Tang , 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 Subject: [PATCH v8 2/4] drivers: hwmon: sophgo: Add SG2042 external hardware monitor support Date: Tue, 30 Jul 2024 15:50:38 +0800 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: X-TMN: [+sZc7L9YX7oQKPnpHTi6pL8W8QFdGjKtLRCJNHhBNeA=] X-ClientProxiedBy: SG2PR06CA0248.apcprd06.prod.outlook.com (2603:1096:4:ac::32) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240730075041.489815-2-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_|MN0PR20MB7552:EE_ X-MS-Office365-Filtering-Correlation-Id: bdd4fdf3-229c-44e7-c0c2-08dcb06c6519 X-Microsoft-Antispam: BCL:0;ARA:14566002|461199028|5072599009|8060799006|19110799003|3412199025|440099028|1710799026; X-Microsoft-Antispam-Message-Info: RGJwUQceGdtUEpD+F1VGK51uO3aJmq8MGjihPhazR4Rale7Q1uXOmH144BoMPUEVZ8NIRXcctdl5DYjHB7XXdbRRNcdhVqjfE617dmw/7r3pDfvtm4D8Q6deUZFHe2a1T73GdmJXxOjccrtPzhGKsOkmvCLvV54IQKbA3sRSIiux2dGetTop2c1BKJPOD71Ic67iPmYw8MFPgWxLYz9oTvnm8uyxVeWZRd9V6S7yioe4dfgV046GfqZAOtPNY4Tju1ouXvSBsvQS7mSHita4sz0w4/rUEtDVdq08JPhianKum2Jbc4cVd9Ugh6D70HomFkY0QQcZLV1cTrEECwQgXj5ZMlQ7CdIUoGdA3BCSIayyZPxON+s0y2tiudvirxp4m7KYCL5M8Qrk09D7QDkyPVce+KberYUwhDmk9OZBUsxF+5ceEn/rsZpygeXPxTQui50ln03Jd/kjQO6OL4N3wh7eUH5v/+/AukZ13Edfalf694EoOeN1vh8IueUSTgLVE14NlRBrsFeJpBavtrjXE7yOUlY6Rn5J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c8/Iq//P+pzgwUOpzm3BOAvQ0rEgQwsCs4qBde5ygU98c9tWz8E2I2aA3azT/oZoc+xRjL3pNC9f6+8VG4WeE9GbZtD/tGgHM3kPgrGCsQThPqlP4nSziwMOhDtLlqAKkQwiCGCpN71YQ2XlbwFfr7bAuOdXikqMlNwxyGDuQKObIG/MC9SjzR7avhZ4MAbjbr7yjxoBvSgio+n5/lZ/iGjF/qTYjlcNItkVhtJ80aVWZGNrWMe7hkNHxqQwQmVAdsjvXfa84tiqwLiqySrJCTwmj6oOLHGshALBimIyW1falr8d4pcIvdROVOEWU5o1KWeq+OBIYNbi0xKdOYVDmJ0mvZavfrWUm2s10z2STdRyIDS1S7y+nWdm/SkurYiaspBnO3yDxtRcj9vNDHvJ9myJmT0IC+wEfSLmIzzIvwT9va/1Sgp X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bdd4fdf3-229c-44e7-c0c2-08dcb06c6519 X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 07:51:18.2536 (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: MN0PR20MB7552 SG2042 use an external MCU to provide basic hardware information and thermal sensors. Add driver support for the onboard MCU of SG2042. Signed-off-by: Inochi Amaoto --- Documentation/hwmon/index.rst | 1 + Documentation/hwmon/sg2042-mcu.rst | 39 +++ drivers/hwmon/Kconfig | 11 + drivers/hwmon/Makefile | 1 + drivers/hwmon/sg2042-mcu.c | 406 +++++++++++++++++++++++++++++ 5 files changed, 458 insertions(+) create mode 100644 Documentation/hwmon/sg2042-mcu.rst create mode 100644 drivers/hwmon/sg2042-mcu.c -- 2.45.2 diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst index 913c11390a45..ea3b5be8fe4f 100644 --- a/Documentation/hwmon/index.rst +++ b/Documentation/hwmon/index.rst @@ -206,6 +206,7 @@ Hardware Monitoring Kernel Drivers sch5636 scpi-hwmon sfctemp + sg2042-mcu sht15 sht21 sht3x diff --git a/Documentation/hwmon/sg2042-mcu.rst b/Documentation/hwmon/sg2042-mcu.rst new file mode 100644 index 000000000000..250016b47dd1 --- /dev/null +++ b/Documentation/hwmon/sg2042-mcu.rst @@ -0,0 +1,39 @@ +.. SPDX-License-Identifier: GPL-2.0 + +Kernel driver sg2042-mcu +===================== + +Supported chips: + + * Onboard MCU for sg2042 + + Addresses scanned: - + + Prefix: 'sg2042-mcu' + +Authors: + + - Inochi Amaoto + +Description +----------- + +This driver supprts hardware monitoring for onboard MCU with +i2c interface. + +Usage Notes +----------- + +This driver does not auto-detect devices. You will have to instantiate +the devices explicitly. +Please see Documentation/i2c/instantiating-devices.rst for details. + +Sysfs Attributes +---------------- + +================= ============================================= +temp1_input Measured temperature of SoC +temp1_crit Critical high temperature +temp1_crit_hyst hysteresis temperature restore from Critical +temp2_input Measured temperature of the base board +================= ============================================= diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index b60fe2e58ad6..7aa6c3f322e5 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -2066,6 +2066,17 @@ config SENSORS_SFCTEMP This driver can also be built as a module. If so, the module will be called sfctemp. +config SENSORS_SG2042_MCU + tristate "Sophgo onboard MCU support" + depends on I2C + depends on ARCH_SOPHGO || COMPILE_TEST + help + Support for onboard MCU of Sophgo SG2042 SoCs. This mcu provides + power control and some basic information. + + This driver can be built as a module. If so, the module + will be called sg2042-mcu. + config SENSORS_SURFACE_FAN tristate "Surface Fan Driver" depends on SURFACE_AGGREGATOR diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile index b1c7056c37db..0bbe812a67ae 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile @@ -194,6 +194,7 @@ obj-$(CONFIG_SENSORS_SCH56XX_COMMON)+= sch56xx-common.o obj-$(CONFIG_SENSORS_SCH5627) += sch5627.o obj-$(CONFIG_SENSORS_SCH5636) += sch5636.o obj-$(CONFIG_SENSORS_SFCTEMP) += sfctemp.o +obj-$(CONFIG_SENSORS_SG2042_MCU) += sg2042-mcu.o obj-$(CONFIG_SENSORS_SL28CPLD) += sl28cpld-hwmon.o obj-$(CONFIG_SENSORS_SHT15) += sht15.o obj-$(CONFIG_SENSORS_SHT21) += sht21.o diff --git a/drivers/hwmon/sg2042-mcu.c b/drivers/hwmon/sg2042-mcu.c new file mode 100644 index 000000000000..37fac3e5f233 --- /dev/null +++ b/drivers/hwmon/sg2042-mcu.c @@ -0,0 +1,406 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2024 Inochi Amaoto + * + * Sophgo power control mcu for SG2042 + */ + +#include +#include +#include +#include +#include +#include +#include + +/* fixed MCU registers */ +#define REG_BOARD_TYPE 0x00 +#define REG_MCU_FIRMWARE_VERSION 0x01 +#define REG_PCB_VERSION 0x02 +#define REG_PWR_CTRL 0x03 +#define REG_SOC_TEMP 0x04 +#define REG_BOARD_TEMP 0x05 +#define REG_RST_COUNT 0x0a +#define REG_UPTIME 0x0b +#define REG_RESET_REASON 0x0d +#define REG_MCU_TYPE 0x18 +#define REG_CRITICAL_ACTIONS 0x65 +#define REG_CRITICAL_TEMP 0x66 +#define REG_REPOWER_TEMP 0x67 + +#define CRITICAL_ACTION_REBOOT 1 +#define CRITICAL_ACTION_POWEROFF 2 + +#define MCU_POWER_MAX 0xff + +#define DEFINE_MCU_DEBUG_ATTR(_name, _reg, _format) \ + static int _name##_show(struct seq_file *seqf, \ + void *unused) \ + { \ + struct sg2042_mcu_data *mcu = seqf->private; \ + int ret; \ + ret = i2c_smbus_read_byte_data(mcu->client, (_reg)); \ + if (ret < 0) \ + return ret; \ + seq_printf(seqf, _format "\n", ret); \ + return 0; \ + } \ + DEFINE_SHOW_ATTRIBUTE(_name) \ + +struct sg2042_mcu_data { + struct i2c_client *client; + struct dentry *debugfs; + struct mutex mutex; +}; + +static struct dentry *sgmcu_debugfs; + +static ssize_t reset_count_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + struct sg2042_mcu_data *mcu = dev_get_drvdata(dev); + int ret; + + ret = i2c_smbus_read_byte_data(mcu->client, REG_RST_COUNT); + if (ret < 0) + return ret; + + return sprintf(buf, "%d\n", ret); +} + +static ssize_t uptime_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + struct sg2042_mcu_data *mcu = dev_get_drvdata(dev); + u8 time_val[2]; + int ret; + + ret = i2c_smbus_read_i2c_block_data(mcu->client, REG_UPTIME, + sizeof(time_val), time_val); + if (ret < 0) + return ret; + + return sprintf(buf, "%d\n", + (int)(time_val[0]) + (int)(time_val[1] << 8)); +} + +static ssize_t reset_reason_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + struct sg2042_mcu_data *mcu = dev_get_drvdata(dev); + int ret; + + ret = i2c_smbus_read_byte_data(mcu->client, REG_RESET_REASON); + if (ret < 0) + return ret; + + return sprintf(buf, "0x%02x\n", ret); +} + +static ssize_t critical_action_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + struct sg2042_mcu_data *mcu = dev_get_drvdata(dev); + int ret; + const char *action; + + ret = i2c_smbus_read_byte_data(mcu->client, REG_CRITICAL_ACTIONS); + if (ret < 0) + return ret; + + if (ret == CRITICAL_ACTION_REBOOT) + action = "reboot"; + else if (ret == CRITICAL_ACTION_POWEROFF) + action = "poweroff"; + else + action = "unknown"; + + return sprintf(buf, "%s\n", action); +} + +static ssize_t critical_action_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct sg2042_mcu_data *mcu = dev_get_drvdata(dev); + u8 value; + int ret; + + if (sysfs_streq("reboot", buf)) + value = CRITICAL_ACTION_REBOOT; + else if (sysfs_streq("poweroff", buf)) + value = CRITICAL_ACTION_POWEROFF; + else + return -EINVAL; + + mutex_lock(&mcu->mutex); + ret = i2c_smbus_write_byte_data(mcu->client, + REG_CRITICAL_ACTIONS, value); + mutex_unlock(&mcu->mutex); + + if (ret < 0) + return ret; + return count; +} + +static DEVICE_ATTR_RO(reset_count); +static DEVICE_ATTR_RO(uptime); +static DEVICE_ATTR_RO(reset_reason); +static DEVICE_ATTR_RW(critical_action); + +DEFINE_MCU_DEBUG_ATTR(firmware_version, REG_MCU_FIRMWARE_VERSION, "0x%02x"); +DEFINE_MCU_DEBUG_ATTR(pcb_version, REG_PCB_VERSION, "0x%02x"); +DEFINE_MCU_DEBUG_ATTR(board_type, REG_BOARD_TYPE, "0x%02x"); +DEFINE_MCU_DEBUG_ATTR(mcu_type, REG_MCU_TYPE, "%d"); + +static struct attribute *sg2042_mcu_attrs[] = { + &dev_attr_reset_count.attr, + &dev_attr_uptime.attr, + &dev_attr_reset_reason.attr, + &dev_attr_critical_action.attr, + NULL +}; + +static const struct attribute_group sg2042_mcu_attr_group = { + .attrs = sg2042_mcu_attrs, +}; + +static const struct attribute_group *sg2042_mcu_groups[] = { + &sg2042_mcu_attr_group, + NULL +}; + +static const struct hwmon_channel_info * const sg2042_mcu_info[] = { + HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), + HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_CRIT | + HWMON_T_CRIT_HYST, + HWMON_T_INPUT), + NULL +}; + +static int sg2042_mcu_read_temp(struct device *dev, + u32 attr, int channel, + long *val) +{ + struct sg2042_mcu_data *mcu = dev_get_drvdata(dev); + int tmp; + u8 reg; + + switch (attr) { + case hwmon_temp_input: + reg = channel ? REG_BOARD_TEMP : REG_SOC_TEMP; + break; + case hwmon_temp_crit: + reg = REG_CRITICAL_TEMP; + break; + case hwmon_temp_crit_hyst: + reg = REG_REPOWER_TEMP; + break; + default: + return -EOPNOTSUPP; + } + + tmp = i2c_smbus_read_byte_data(mcu->client, reg); + if (tmp < 0) + return tmp; + *val = tmp * 1000; + + return 0; +} + +static int sg2042_mcu_read(struct device *dev, + enum hwmon_sensor_types type, + u32 attr, int channel, long *val) +{ + return sg2042_mcu_read_temp(dev, attr, channel, val); +} + +static int sg2042_mcu_write(struct device *dev, + enum hwmon_sensor_types type, + u32 attr, int channel, long val) +{ + struct sg2042_mcu_data *mcu = dev_get_drvdata(dev); + int temp = val / 1000; + int hyst_temp, crit_temp; + int ret; + u8 reg; + + if (temp > MCU_POWER_MAX) + temp = MCU_POWER_MAX; + + mutex_lock(&mcu->mutex); + + switch (attr) { + case hwmon_temp_crit: + hyst_temp = i2c_smbus_read_byte_data(mcu->client, + REG_REPOWER_TEMP); + if (hyst_temp < 0) { + ret = -ENODEV; + goto failed; + } + + crit_temp = temp; + reg = REG_CRITICAL_TEMP; + break; + case hwmon_temp_crit_hyst: + crit_temp = i2c_smbus_read_byte_data(mcu->client, + REG_CRITICAL_TEMP); + if (crit_temp < 0) { + ret = -ENODEV; + goto failed; + } + + hyst_temp = temp; + reg = REG_REPOWER_TEMP; + break; + default: + mutex_unlock(&mcu->mutex); + return -EOPNOTSUPP; + } + + if (crit_temp < hyst_temp) { + ret = -EINVAL; + goto failed; + } + + ret = i2c_smbus_write_byte_data(mcu->client, reg, temp); + +failed: + mutex_unlock(&mcu->mutex); + return ret; +} + +static umode_t sg2042_mcu_is_visible(const void *_data, + enum hwmon_sensor_types type, + u32 attr, int channel) +{ + switch (type) { + case hwmon_temp: + switch (attr) { + case hwmon_temp_input: + return 0444; + case hwmon_temp_crit: + case hwmon_temp_crit_hyst: + if (channel == 0) + return 0664; + break; + default: + return 0; + } + break; + default: + return 0; + } + return 0; +} + +static const struct hwmon_ops sg2042_mcu_ops = { + .is_visible = sg2042_mcu_is_visible, + .read = sg2042_mcu_read, + .write = sg2042_mcu_write, +}; + +static const struct hwmon_chip_info sg2042_mcu_chip_info = { + .ops = &sg2042_mcu_ops, + .info = sg2042_mcu_info, +}; + +static void sg2042_mcu_debugfs_init(struct sg2042_mcu_data *mcu, + struct device *dev) +{ + mcu->debugfs = debugfs_create_dir(dev_name(dev), sgmcu_debugfs); + if (mcu->debugfs) { + debugfs_create_file("firmware_version", 0444, mcu->debugfs, + mcu, &firmware_version_fops); + debugfs_create_file("pcb_version", 0444, mcu->debugfs, mcu, + &pcb_version_fops); + debugfs_create_file("mcu_type", 0444, mcu->debugfs, mcu, + &mcu_type_fops); + debugfs_create_file("board_type", 0444, mcu->debugfs, mcu, + &board_type_fops); + } +} + +static int sg2042_mcu_i2c_probe(struct i2c_client *client) +{ + struct device *dev = &client->dev; + struct sg2042_mcu_data *mcu; + struct device *hwmon_dev; + + if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA | + I2C_FUNC_SMBUS_BLOCK_DATA)) + return -EIO; + + mcu = devm_kmalloc(dev, sizeof(*mcu), GFP_KERNEL); + if (!mcu) + return -ENOMEM; + + mutex_init(&mcu->mutex); + mcu->client = client; + + i2c_set_clientdata(client, mcu); + + hwmon_dev = devm_hwmon_device_register_with_info(dev, "sg2042_mcu", + mcu, + &sg2042_mcu_chip_info, + NULL); + if (IS_ERR_OR_NULL(hwmon_dev)) + return -EFAULT; + + sg2042_mcu_debugfs_init(mcu, dev); + + return 0; +} + +static void sg2042_mcu_i2c_remove(struct i2c_client *client) +{ + struct sg2042_mcu_data *mcu = i2c_get_clientdata(client); + + debugfs_remove_recursive(mcu->debugfs); +} + +static const struct i2c_device_id sg2042_mcu_id[] = { + { "sg2042-hwmon-mcu", 0 }, + {}, +}; +MODULE_DEVICE_TABLE(i2c, sg2042_mcu_id); + +static const struct of_device_id sg2042_mcu_of_id[] = { + { .compatible = "sophgo,sg2042-hwmon-mcu" }, + {}, +}; +MODULE_DEVICE_TABLE(of, sg2042_mcu_of_id); + +static struct i2c_driver sg2042_mcu_driver = { + .driver = { + .name = "sg2042-mcu", + .of_match_table = sg2042_mcu_of_id, + .dev_groups = sg2042_mcu_groups, + }, + .probe = sg2042_mcu_i2c_probe, + .remove = sg2042_mcu_i2c_remove, + .id_table = sg2042_mcu_id, +}; + +static int __init sg2042_mcu_init(void) +{ + sgmcu_debugfs = debugfs_create_dir("sg2042-mcu", NULL); + return i2c_add_driver(&sg2042_mcu_driver); +} + +static void __exit sg2042_mcu_exit(void) +{ + debugfs_remove_recursive(sgmcu_debugfs); + i2c_del_driver(&sg2042_mcu_driver); +} + +module_init(sg2042_mcu_init); +module_exit(sg2042_mcu_exit); + +MODULE_AUTHOR("Inochi Amaoto "); +MODULE_DESCRIPTION("MCU I2C driver for SG2042 soc platform"); +MODULE_LICENSE("GPL"); From patchwork Tue Jul 30 07:50:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13746887 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12olkn2012.outbound.protection.outlook.com [40.92.21.12]) (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 C88E31922C4; Tue, 30 Jul 2024 07:51:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.21.12 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722325888; cv=fail; b=sf1j/GbtuGez0sJ5DkfsZv34jiJFmE6kxmMOzfVIOvVRpQJ7wIEdAnyCIPUotlj2xVqi4F9jkwYdTgSjvxIayg+cHpTY5xQGalK17XeBjxezArwsRWtIirdMH4gs26CUI7isqeqvKLXUNGYJpNj4cyiKSe2rngjQ+7VSixG6L/Y= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722325888; c=relaxed/simple; bh=4N1iAkDpHCFbF8MvS36PvOlEaxLbh9TgSbtPmN9vAYI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=hA1Z9vXAoGOhf0Ns/5DvsdLrND73VBke3OnmpwSrOhKtbNO/lo2BZQb/cF7iRA9NaiIgLr+MkAJ0yYDYj4wHvX6qugneRsUTBW4k04jvzSPS04lcYnkXj7FRFGTP2UEiiPCJ4V5NdJm9b3w9CNC8+gW9u9zM8qZy5RktYYxFcK8= 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=hy6emlfj; arc=fail smtp.client-ip=40.92.21.12 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="hy6emlfj" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fBnaYZLILghTFyTEhFl0d+0R+uxeaj/eUKn982QSd5rPB/8pc+ad+1BYocxrVVHdxwVpGxETSM9GBxI59DNdXo6K0eJhxovHwYYrsXZPQ4jsX/GZDy0199h6yGMXweLTfrUQ2ieT4TWcTrgRr8RX2lMwi4VqNERBodrzGWFWmK8vMLakgpvqs70dSVe2YCHF8b86thckhzImSblppDZ4ikMaxf+jDmfw5qTSYL1UlgfNKW8oizS3eal2Lhtqw2MEJCAtxboBw7qd5q3TW15cavM4ncr+1mUtykb0/DYHAVCxXYTEXp/AvBSrDdGd2bCJinb2p/LLmQlbbiOvtIdCZw== 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=T+Tfw1dxS0oeqMmzxgma1iDLTRKCmGYFX8bp+GsGX64=; b=Nv31Ac6jXm4RzK8Honef6jxbw4xZrGQOPHndLsE2Eosxrc0coI1XNK2cwJOQG3yhuein8UOcgEv9CA/D226cbtXTuLYoES0V5MDRrC2fNh3sHMr0m4UIlYbexHC8HI5/cm8/i55p1O2BYPSSUPM9xPCBa6dzGPMwtzYt6nvBQiKiqge3bDZ8x9iF/w6vppmgVazd9Y+Wu/rIrYqtnGA2R8ctpowKZLwpR82rLZ5dPOGyWtBSamf8eEJ48rE1L37FQQuRge1FatPmo97yR/eVQZTjAW93mal/XkpNOJRjaCrcXZ35OB3pjGPmr4vibgvl0kp5ObEdYeL6Yr/eT//q9A== 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=T+Tfw1dxS0oeqMmzxgma1iDLTRKCmGYFX8bp+GsGX64=; b=hy6emlfjERYHsIG9EpjsSqlBjfLhBArJfAbxpo9J212DJQlJCfqjq9cQ+Atn2Um27ygctkRoJTE3c6mPWeEXH/kGq0Bx04VKf5PpMZxqkou5mzsIKFESmXJX8WAx0YGJtZZtWRhhRUbbIg+3rVxNEr4LjljPdYRA2+Z1DrMrFLKz/32VysYXxJkbNheOD+0Bhn16i3CQapkrKzu7cKAl/PvSEwJK90bu5lBvDHwGMuwp+Yp+a8LFSendxoYlU6hyauGdnuU+mK9kXyesEsBGRVicLJdqt6gUV1nMr5SLsMrWe4imM07p+AF7t61qWvg0DrGv0Bb+5MlbHpdOZuge1w== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by MN0PR20MB7552.namprd20.prod.outlook.com (2603:10b6:208:4c2::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.34; Tue, 30 Jul 2024 07:51:23 +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; Tue, 30 Jul 2024 07:51:23 +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 , Hal Feng , Jinyu Tang , 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 Subject: [PATCH v8 3/4] riscv: dts: sophgo: Add mcu device for Milk-V Pioneer Date: Tue, 30 Jul 2024 15:50:39 +0800 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: X-TMN: [LKmAa7ANCEJWvC84jqUzMW371ZBNlHeE6MJdR4GF50s=] X-ClientProxiedBy: SG2PR06CA0241.apcprd06.prod.outlook.com (2603:1096:4:ac::25) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240730075041.489815-3-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_|MN0PR20MB7552:EE_ X-MS-Office365-Filtering-Correlation-Id: 0eb6e5fd-c61e-4d53-2832-08dcb06c6887 X-Microsoft-Antispam: BCL:0;ARA:14566002|461199028|5072599009|8060799006|19110799003|3412199025|440099028|1710799026; X-Microsoft-Antispam-Message-Info: m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rossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 07:51:23.7973 (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: MN0PR20MB7552 Add mcu device and thermal zones node for Milk-V Pioneer. Signed-off-by: Inochi Amaoto --- .../boot/dts/sophgo/sg2042-milkv-pioneer.dts | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) -- 2.45.2 diff --git a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts index 80cb017974d8..8b8fdf6243d4 100644 --- a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts +++ b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts @@ -26,6 +26,66 @@ &cgi_dpll1 { clock-frequency = <25000000>; }; +&i2c1 { + status = "okay"; + + mcu: syscon@17 { + compatible = "sophgo,sg2042-hwmon-mcu"; + reg = <0x17>; + #thermal-sensor-cells = <1>; + }; +}; + &uart0 { status = "okay"; }; + +/ { + thermal-zones { + soc-thermal { + polling-delay-passive = <1000>; + polling-delay = <1000>; + thermal-sensors = <&mcu 0>; + + trips { + soc_active1: soc-active1 { + temperature = <30000>; + hysteresis = <8000>; + type = "active"; + }; + + soc_active2: soc-active2 { + temperature = <58000>; + hysteresis = <12000>; + type = "active"; + }; + + soc_active3: soc-active3 { + temperature = <70000>; + hysteresis = <10000>; + type = "active"; + }; + + soc_hot: soc-hot { + temperature = <85000>; + hysteresis = <5000>; + type = "hot"; + }; + }; + }; + + board-thermal { + polling-delay-passive = <1000>; + polling-delay = <1000>; + thermal-sensors = <&mcu 1>; + + trips { + board_active: board-active { + temperature = <75000>; + hysteresis = <8000>; + type = "active"; + }; + }; + }; + }; +}; From patchwork Tue Jul 30 07:50:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13746888 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12olkn2072.outbound.protection.outlook.com [40.92.23.72]) (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 D7B36192B6F; Tue, 30 Jul 2024 07:51:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.23.72 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722325893; cv=fail; b=N17fpHQoXuKVrvOKESO9SF8oGa8rTmnUZN/GLq3BFn1QQtqO88i7Y1dMqWoIFRGz1r5GVpTLXdgs9YaXgqUOZQXyIzi67/IxHptYmwLGT/ugkGuWQaCR5+L0LI/IZ08PQ59GtbrAxXu27iFy4o9I0Vu1yBuFz8/y35a6/ClGFcw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722325893; c=relaxed/simple; bh=i5uJVpVqHzYneC8x74apUJpzwoJvkLMx3dMpKQs+vKM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=AR+NzZ5RFfFFNFnIUI9R4AhrhFQuushCPKbYR7PkQd8lFMXSfceXN65x+POqDvuR5xNsVQUye+EZ1vGhF0z5611Fk2iAX39VrYLSz0or6BWQSQXrkYzZg1eazn07ZuVTl8V8zbcAobBxSZ+a6PYfRG4qJg7EzNUNgwCp79IUgfE= 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=a7Q1rbjv; arc=fail smtp.client-ip=40.92.23.72 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="a7Q1rbjv" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XX1xF/xj+zrwLHYj5NeQCf6P/l1OnxeO6yEGGyPsaogMrjHimiB0xtoGczG7Cvu381WXbul2O+vCw0L5jGG9OUtxUkrDpv/g9Y9qZZEykkwIS8Z/zQtkdIRIQ+L6jVB2Pgz9z5k2wQSdEHiv6KiXYYvpR49WVqwOlv+L0w2jfTIeTH6v3xVzGY3NPw9BbaS8FzFEmjFaYPupngZuHEE5RQjooKVg0bsiQHMm9V4Y7YPltAFXeHxnv+IP++C9qGhFTSB+Eq5qKX75t8oFyfrl21a8s3bSt+o6hfCRlaTUeSeXAE0yxN3oqn73lHbBK1Mh1CWDj0MZZtC+ZrT2Ln7pfA== 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=i5uJVpVqHzYneC8x74apUJpzwoJvkLMx3dMpKQs+vKM=; b=BAx/ashHyc1/ocbcV+yJyFtFlH7Pge555iKu0Y08BQGk/3us0rfKDHGCkXM879cEcViAapkDPuaw48YORoTfuEiNHMg1ZFGvLGBtPoA57XE1qUr16sB7QrIf0cLr+yidrI8fJ0uv0Bu136zEFKm3kU5moamurJFMZ81oXV8xSWjKCpTislHq+GJOBivbzLX5fUgSMeXDOW7Ss1S6aQx87F+EfL3P+hl77UdDZO31+fMnA9THNtKp9URFE2hBV7jAGkyUoao64jpZRv/F9eosbECOwVxlSeZR3Kh6sLq9BbbXK7ej7GZG+n9DCy5zC3NyRUbdyUpuX6+V7UTy54tMkQ== 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=i5uJVpVqHzYneC8x74apUJpzwoJvkLMx3dMpKQs+vKM=; b=a7Q1rbjvrCOznKuxb2jgZAKBypREYkder+lI4QRA5tvN/MTb029K9y0GTVBjcWD+ZDaccKiEAgYcjQe9Q2wfCAV112Fj8UU2GsCvvxo94Sw9lpjjroRiEdSFEUifxrfsdhIcj1vPIq6lNr3FkACmyIMsJlLtesdt+/USTjou/8lXccHuQURZ7sIeUCLkDc1xe3zHM880oslaiHWvS5DSv0XGgECON6dH9k45pIB2ImwYuLqrhi9sBykVyaKmHNdRK11/AHiT84JlyF7Eiq+YEbQhDricbRs0hTZ/mkLMivNR8KL9WyHhPUUDRggNJ3+beWs+xWSh1amxSJCPgedSjA== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by MN0PR20MB7552.namprd20.prod.outlook.com (2603:10b6:208:4c2::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.34; Tue, 30 Jul 2024 07:51:29 +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; Tue, 30 Jul 2024 07:51:29 +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 , Hal Feng , Jinyu Tang , 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 Subject: [PATCH v8 4/4] riscv: defconfig: Enable MCU support for SG2042 Date: Tue, 30 Jul 2024 15:50:40 +0800 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: X-TMN: [fBdlE5LebptCIQaEyvxxV2hhzptwRRrlWqYKhfvb+vY=] X-ClientProxiedBy: SG2PR02CA0003.apcprd02.prod.outlook.com (2603:1096:3:17::15) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240730075041.489815-4-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_|MN0PR20MB7552:EE_ X-MS-Office365-Filtering-Correlation-Id: 3897302e-bace-486c-fbca-08dcb06c6bd5 X-Microsoft-Antispam: BCL:0;ARA:14566002|461199028|5072599009|8060799006|19110799003|3412199025|440099028|1710799026; X-Microsoft-Antispam-Message-Info: SUWv7cz0h/obRmXHC9mumnDi6+HHq+J3dvXYtgoJE62/47bb/IB7p4dcV6K1+8SQO//P0I90U09fqpIiUyTNoX9xNcTxqyQDU3+SQLTQaKgiptP5M+68cpC+fshWShn5scGL2gLufTXLJJ83sYPX1yTqoamSt+GQT+Ud5PsgJnhy2rCP9l3HZETkQxwqOw4gFAkipkV2E0zAwABsiNKukIS4QYYgn0YlYznYx5tgsV1K6JLybGg01ihjS07sCoM8h+OighJOG6t3GBCdRR4DpyVGRsGSPlnJq1/6XZzH4hCRDqm089wW6G9o2qjou6OIyTH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+4X3E44Z1VUji5NH0vQ9+/oQ5WjUZGB1a5Bq9FWTgdzR5MMJpA5ZvqL4//BPUX1EqztkjKRXCn8ux2qen3LDa/22YqTXfxrJ/gF3SwuzyfJa2pd6sOQUta9RxFoaSIme4jJKgFDDJIIjt/cywzfR37S7Le14JW5As+4YKMiy17+DX8eOMgKmSLS0Z8fWDMo8pw2PG3K549UzIi3lE0pzbYTtYqhuEdqekl2dKo18cgVkAhX2e92Kg3f0+4P+lmCEVr/oY5bPfG77lxP6ufbmTOFPr06BuDZU7CgTXtbK5mxKFjYm8/kRdcIznzjTQYjq0yg3X2M4NssjG/kfG+ZMWUySWfT65y/lgfySYAjpaCie3Q9l7sYQNQHdULuo/3WsjwLLzkDxf2/Y+mncemicycjhn8bOgpa4CsRYS1CgJTOSC5ZtYjovlqWoB4K9/dsCkQlGNzv9qkxeG2hHgLOY4hbTZgFgmcHAA+BV/dgfbsnUwyHClP6mdtdBugdJf9lxmp9fvi3dGEQhMmoAoDnn++G4hifXT9citrtvS/bNk6d9ZILeAa1bCXc7t4MCoRWA0yb+sWpYu42+b+b+RS6LJfl4C+8dxbzGLQdYDjAEhVCQcHr2wOO5TYmc3/h/y1Fl5mu5bB79HZAAv+AfSAS X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3897302e-bace-486c-fbca-08dcb06c6bd5 X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 07:51:29.7018 (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: MN0PR20MB7552 Enable MCU driver for SG2042 to provide thermal and reboot support. Signed-off-by: Inochi Amaoto --- arch/riscv/configs/defconfig | 1 + 1 file changed, 1 insertion(+) -- 2.45.2 diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig index 0d678325444f..a0f346301df6 100644 --- a/arch/riscv/configs/defconfig +++ b/arch/riscv/configs/defconfig @@ -170,6 +170,7 @@ CONFIG_SPI_SUN6I=y CONFIG_GPIO_SIFIVE=y CONFIG_POWER_RESET_GPIO_RESTART=y CONFIG_SENSORS_SFCTEMP=m +CONFIG_SENSORS_SG2042_MCU=y CONFIG_CPU_THERMAL=y CONFIG_DEVFREQ_THERMAL=y CONFIG_RZG2L_THERMAL=y