From patchwork Mon Jul 29 02:25:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13744196 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10olkn2091.outbound.protection.outlook.com [40.92.42.91]) (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 6604A77F1B; Mon, 29 Jul 2024 02:26:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.42.91 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722219974; cv=fail; b=P8RlRf7v55EhwjSj8Al6ij1GXovOc+IS7MtwVkl+6AEIj1SJntM1p6RyKtPddDySvcSfArpojsqltbVBGBOKjGSVw2rs6r7POHr2H5taZ3KD+mGVhcAem731PxuQGZSvcIQLqMAugrzZzIGagYXCj1iqFhaa0mANajNwzd/M2LM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722219974; c=relaxed/simple; bh=4N1iAkDpHCFbF8MvS36PvOlEaxLbh9TgSbtPmN9vAYI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=hdzaR+U9qZ4VLBe1x75A3AbEw5VOJJwtNsbWXkpI2XsfnARwruIhq8m/44SFm8ehvuF39CZ76zOJK6XcNx+urixY1HbBWlS1Z6lBFZ6RMkMF+pLMsfolP5TzY5l1G3rBqnWzRgUi9HhXGF7utrUBV0ppuI8zlqNTDpP++JXZPRc= 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=fbW5rHK6; arc=fail smtp.client-ip=40.92.42.91 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="fbW5rHK6" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lNa8oXG0Ny/+y/sWev54ItUM11ylg5andKUnADA94VyOD1PbHAX3EYX1I9dsgZ69OOe5vEXH6vvjTAWu2p8sHIM8TvbfpgOxndHBXb722FrJ1QLHkcGsDPaI+3eG1mnTcndSFbboWVrP/fnkQdL04J40aAQYxvXFYldwF0eH0QzC8GSHj3bfNLYaDmAxMII9k5ohFtt6UgQMqQu/dr3HtO00GzBKMcE065+5xyP71gerT11LddCOYz2Fi2h1gErzo+jM7v+PYc0rZMPkJ9I/pedh5XJ5UC+N0wTS5oIY3QZbXhgLvp34EIRxUe/w8fF6yfcONYO6v+vjfDQmUjVU0A== 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=RvXW/6VXpkg6VmBxIScknGpfnppRysap6vLJzHkTrR+7YTO07brKSrUsSLtkmdLa04J1OFH/aCO57MEoTm2hwdY0PRy/coOC64RITYVdmyrhRQ0jMs/kA7dYdECAvde5D2AcDuv+3iZYB2vzxNDsqDJfWIA+/tcyPXPYLXQXloLVLMwxklVeDCdYG9iqy+b81eBIfnewk1AsHeWYi575DUZfToGO21sgIwFLfM0yUvcLKzthO9ZCh575A7MUSqkXdUxac1ylgOI1ZiLEWSdO0yvl2R4i00vQaHgb88ScOON21fLn0HEucczaxaZ4iCcG6ljOscz7qsHUIk3PsrWrfg== 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=fbW5rHK6TED+vcs6upbJHPZO9Gzs3jGXg1eao57NqgX/VeOGcoQ1RFQZmZeYq6+D79ndJyReAwWoanoumunQEGsSRBHwRbjkS7W987h26fvhvnmBm/FFduKg5NBReCUXkAxcmClS/Z641lE8BUSuGqHboDV4+TFfRA/UOsJv7V1/2McWu/kQtQR6Nbzd7BLQXr+xVxVZvFeUu2C4BD8tFrBynObpmlxdIsdDBBhORgSoiOhk88iX8o2qt2zUXf1FnP9HLsOroT0w6Q/SwXtfZcLI2ch69858T1sywi1zF2cLhJx/3eQL+ENzoloBrjz8P7Qu/sC5YkH0LTb8kOwgdQ== 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:09 +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:09 +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 Subject: [PATCH v7 3/4] riscv: dts: sophgo: Add mcu device for Milk-V Pioneer Date: Mon, 29 Jul 2024 10:25:32 +0800 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: X-TMN: [ENuIffTGGSPrQwvsilyPBA6BhmmSMZneyteFbCwSIv4=] X-ClientProxiedBy: TYCP286CA0077.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b3::9) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240729022534.842326-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_|PH8PR20MB5413:EE_ X-MS-Office365-Filtering-Correlation-Id: 236b072e-f723-49d1-7d26-08dcaf75ce7f X-Microsoft-Antispam: BCL:0;ARA:14566002|461199028|19110799003|5072599006|8060799006|3412199025|440099028|1710799026; X-Microsoft-Antispam-Message-Info: sumvLJbkEYWUxwLOu2oTbAVwhL3TiXbhm6vL8fG8bMge8sEcTy/epKD+3K9Vkc8zQNqnWrjfkjRkPXij/imsb7YczQrVd4utVsablw6hm7c3q095oCJ4vrpF1QyHCf9997DD30D5+Pf/cdDqVTs3Xmar1ubykcAFPc2z1UvVUVZmfXNV3eouHhoriC6DS7cCFslPXRttk/qUpXXEayiYveYP2zaxtbqp7NuwsGS6tkIiGCVlkQ9mjbqplEhmoU0oeyxfgc4ANRQnzYP9Xr3XIHO9OLmf3rfV+x3WKDZWA2d81l1AaiNiE5RtV+15tefrf83QVpqJeSxnfM1aLiDO+urCR7tMztS8pB9SYGgnSjBKC7Gsl7aEwkHJmrCBoJ44qj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MKmsCHPjG1/jUW3nwqLKdIdxex1K8CFAs2zoEqbrlDfzoJaGv20byPfl+p8nO1NX7ZGMOGd/xdEZI7/IH0BH6GzLCtcd6ryGt5YtXy6tiGJRxq/VVL8Cg0WIN6UKb6Sq0wAyqoVMvHHmWnu+wiiqxseNPL5TG2orFC1vsdoMrehAgBzSRfPOwmAjiBmjqvezxgQkoBPdldX9Df68rmJx70AZ/ZApsIHGvCq1ZDZZ9crJC6uZlowgY8HtvLYSDUmC5yHdkigyLyqPeKHfqgiGeJsEngO9RGgQwotoSiUZvscjq8LX4xVSUFEoxw+D4Gig92GDSOBm29RNsPBIquArGL+8GfwX4iPTDe0R04QvuHWBjLgpHIDSJBEubQSaeSHJnW9Y/SyUmWJimWVUI46mIp3ePg6+7W5YAh6NWucu4kY8rRR7grplfzvIUPAGVuk1fzqJYCSRKGkucXy4XSmNLYduPVIiPFb8Qh7L6Pu7f6jeLqFY/bjXq7Jx44Z7eKU+sVXZ/fVWSAq0wILkouKiIGTizqGe/RY6T09rOU9QHZhx18lL3lgoQNu2+w1En3z1dKG/f7dX9/EQ203yAUvUX9u865p3viUYkdK+ejupOWKekCAn X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 236b072e-f723-49d1-7d26-08dcaf75ce7f 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:09.1678 (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 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"; + }; + }; + }; + }; +};