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: mt3kvQOennPGqdOQOEMGUP3UH61TuPcg+ka6I/fADcLYZ2LjELLCz+wngt3uRLCFBDOYt7zH5519ZsEDA/XXN09lcm/rw8L8PvTmnhHkQwxC6MNCQpenrWRWVp/c5iz27Saxig6OzMSSRnguh6JkK/xn7EReILi8SFsP1d0JwsrNPySPY6Fp5VxbACLRCkx5eGsHg3/IBRuK4K53bik2NB704Eq5Yw76e2T1HroBFwvi4e6+tPLDX00NXnMxa1C+a1+E3EtNQCqVO+6sqtFzlg0wsMqOydCALMArdQyh+aTApGFCwPfbG5gUxlmXMjRv86Wyt7/YrHyqRPn+5ZakbFt9BkA9CwBxOPBTexCdLhPZGgpHNyeJIzsJIcMPGEa9PYj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b/4RetsJXWeHLD/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 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"; + }; + }; + }; + }; +};