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: 13746891 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 31FA5C3DA61 for ; Tue, 30 Jul 2024 07:51:36 +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=B+b0nCWqKu1jNtNpZFck0U8mQKppe98STr5FmC6klkY=; b=RGyK7XDAEoNThh FZbDkBxtnamBBuyF7lAWiuz6N323YDotbKOhCqArBx6sVnvLLW11Myn57NjqGT9YOzZo+QZQcZSu6 F/7iVXlH0IEIbfCKSCBwW0FglpWSSV7aT1KOyWl9NjwdnEKA9eS50uhZX9wffCOe8CaT1HfH2eRHf BvBsjIl/5fYJbHA1NClueLrsG4guulTshVQd0/ctptSjcsyRos7RILuzaHf4foSjAkQg4kq+6vytt 98Um1X5PN3q6pz3HYkQ6/AEqU+5sH7e3ZWlLIE0mk44otqp3CMI0gsuFibZFVXZ8uZML9dJl6JRSa +dxAgqHuMUeC6DB8sQwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYhds-0000000E6PO-2zhd; Tue, 30 Jul 2024 07:51:32 +0000 Received: from mail-mw2nam12olkn20821.outbound.protection.outlook.com ([2a01:111:f403:2805::821] helo=NAM12-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYhdp-0000000E6N4-3CNR for linux-riscv@lists.infradead.org; Tue, 30 Jul 2024 07:51:31 +0000 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> 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: mt3kvQOennPGqdOQOEMGUP3UH61TuPcg+ka6I/fADcLYZ2LjELLCz+wngt3uRLCFBDOYt7zH5519ZsEDA/XXN09lcm/rw8L8PvTmnhHkQwxC6MNCQpenrWRWVp/c5iz27Saxig6OzMSSRnguh6JkK/xn7EReILi8SFsP1d0JwsrNPySPY6Fp5VxbACLRCkx5eGsHg3/IBRuK4K53bik2NB704Eq5Yw76e2T1HroBFwvi4e6+tPLDX00NXnMxa1C+a1+E3EtNQCqVO+6sqtFzlg0wsMqOydCALMArdQyh+aTApGFCwPfbG5gUxlmXMjRv86Wyt7/YrHyqRPn+5ZakbFt9BkA9CwBxOPBTexCdLhPZGgpHNyeJIzsJIcMPGEa9PYjcHApJwKnfQ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HLD/IDWePhnua5wO2DipYKAs4vL/QXuKc/T/kfX4A91e0UHrtVTGl85z26j0SePsg8989Tw0MKWCQ679yiaF1BAoVtP4wntsg4NBsNnO+RdfwAg+2OLBM1DoG2TLZlunUjmuN3lzxKUopGK8sKmUaJKUzPaFda3nB26ZXyKWN5TimTh1JZf2mLLRLeSB9s036mCRKQFB55ikLZhEOf/cbyBUtaJLS9D2daZXwtkF/pPQ3HwbeAaJoKDgr/XVof/IBIYA/2YbC21zioKsPa6wOQd3GiS6tYIN4SI80tjC939Ynd5SASSkj9lNRWQHXxkOoxCT9Xgeyav5Z1qyuRsG/HMArCQ99eLIvT6+Cw3XycRjXqBR0Itbgx9lwnwDE4LE+yLWdCPgM6jj0twYYPGVEn1ELPATPCGoOKHMbWPnVcx1qHGjqrBoQxHX1P14jnXUkOIqeBR2vmUVce+jGCzMXnfKVljgHHSQ/gmCIIZAUfngq/pjMX1A9aRLXt64ib9B2igXmFTl/zO99SbapuLuwh+aI+P9FPbt8v/7E8lxRQTlO96XW+zM5mTjaEpe8rg+zXHMKI27txgrp2qVHLRTqWmizdi/v X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0eb6e5fd-c61e-4d53-2832-08dcb06c6887 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: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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_005129_860493_7BA9EF18 X-CRM114-Status: UNSURE ( 8.35 ) X-CRM114-Notice: Please train this message. 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 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"; + }; + }; + }; + }; +};