From patchwork Fri Aug 2 12:38:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13751538 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 A6633C52D6F for ; Fri, 2 Aug 2024 12:39:38 +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=qoV6WTIUdnR2/9jt3kaAVSQ5Ws5CZq1V9sVl4iTZHJM=; b=dK5xJOOGr1P4x8 dNhJa2BhATVWtkkE23hWEOlIzHkQh0WAo51JkZaA6zeQO/XX5AUv32paT4eJnaaNf1M/TLt42UR47 nVPLWEv4Zvk+ul69J/UkGAqdE6GoD0dpn3uY3BA03mvGbCzcDG9lbBXWwMM7C/ObkYowDA6XGSyBZ f19RsfoQxdgwHhS+05hiZwSxyKPLJSveAOd6U1RSrtTvCrnTsmlFrgAM2Yv0fr7cG1RroY0aa5VkR JzEq5z5v1KJFF3wflvQmTAu0IhCk56u1gsZtiT4mimIB1gdOcnH78AblalWr279hH6aU7BrvyZYn0 kvyeXWstPex0IA5QXAzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZrZI-00000008pTX-0gQs; Fri, 02 Aug 2024 12:39:36 +0000 Received: from mail-dm6nam10olkn20811.outbound.protection.outlook.com ([2a01:111:f400:7e88::811] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZrZE-00000008pP1-2xvg for linux-riscv@lists.infradead.org; Fri, 02 Aug 2024 12:39:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=b+PF7dbwuZC/IWrHnR+SBSFZwr6BBO5MEes0XRasWG/3cIC0SttPNNBzCUhJY7mCltJrg0v/37Gy3KDivSXIMh+HJETLZEzS+snAYi4kkC56XjgeRXnD5xt80PqRdsh5nq3In6BK2CegNlwPLT0mymD5SDZ/yvbBSfd7mzI673hrXSAscJMFd7Gj5GSsir/hYY2NckYy0aDpZ28bJ7pNFkm2yt1jNxzoyxB5eaT4OlFDyYNbWRBIP0/2WshtpGHOoe3IRgAIAsotSTM9zboXNTN6XUX4knkxY87Le5VKSXu/3GxKEbLOVqY0a79/Zt+7bxEc70vrm4v+yc5eBlB/RA== 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=oKfJxZpv2S9cJDJFBoxogiufiOfYodWSGVaJ2yBznh4=; b=S/7VIL5ziKxUKgiQTxfp2jsZh8VF2+JDO0YXYbrugeBJ+u/VZBZKWFRFxBanjkgo5LtF/CnVQssJyCFzr3JIo53IX4e8FeYS6Rkpce05eFEhxtUo+UESDrx7FtOkE3vBlHR1AoYZ3/BM6+rl+ufHgTlBH3ShOFfv0fyKyxjXY5AnMWgCN7q+V8kp3fGQ6fAwZM2tMsTzoMIG6czz0avnHpBaDY9QnAHTaZ0FDLSH7n11lD46DhLenE1hdlc32iBVqAgDV2pDPPmiGLtrpu7O8i5xNyQUuweAc8Z3wSrDoGfaMEoIbrVxIs7C8bmesw3CJ6U5ghuDvP1dnFBSF9kCig== 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=oKfJxZpv2S9cJDJFBoxogiufiOfYodWSGVaJ2yBznh4=; b=PQTfS8djiRjT0PSCkkZWw79iG5SgPlbAHLPzbMyZ2UjwY9+cx5oMHJnf9oyjPDeLN8rlSQ0OWuIpQDAWjBm/QmSNEmQm041WalttbEe/eyd3MKLT9grtnNtMt6jYw9D0maB7oPjUX7j1xJj3puc3rsc9oDkCDVb3M6LsY1xX5wPuCNYWt9+qRqpMfKFNGhr9TOUoMOJiTruLHvxOkEYiWbPv/FjumrCBUZQG6yNVgBpA2M59y2MKuvlQ+DZ4wK8L6T/sILa4oOfOauz7B8V4SQPOuKY0THKVXBleGAOOrxUL0WlS0P0rm1iFgpoKRGHwG9HaxsN2tNSk026vZs822A== 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: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%4]) with mapi id 15.20.7828.023; Fri, 2 Aug 2024 12:39: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 , 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 Subject: [PATCH v9 4/4] riscv: defconfig: Enable MCU support for SG2042 Date: Fri, 2 Aug 2024 20:38:41 +0800 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: X-TMN: [ZyDaK4cupEPhm8YJys4baKMhB1R4Wvbih1W+t03Lk+0=] X-ClientProxiedBy: TYCP286CA0061.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:31a::13) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240802123842.1492286-4-inochiama@outlook.com> 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: 35132327-4aba-4d3b-8029-08dcb2f02688 X-Microsoft-Antispam: BCL:0;ARA:14566002|461199028|8060799006|5072599009|19110799003|3412199025|440099028|1710799026; X-Microsoft-Antispam-Message-Info: 7e4/caVhvzWU5O88+fmuwBXrW9H3KCguEDOrK6tzibEwM7Q/zVCBH3hxtLXez3ayWLgAtoObusN9nU0tMMm0tP2JAakT0jRHG/ks3vUWqtI4yjhQdmn57BjFUcfE6jeTqUsIRxHhN5vUKl2l4NH17SW8wq+WdTymHDjYLsv+N9tkW+I5jAtxDV/kFVH+JwdIZSiZeOU90tHbmGzFI6l8/yg4+e6vcbWPdVD/0YZoVCWNwyJbjrWdfh7HhD2lj0/v1rDKvvNTo13QEA3V1uE3at7+UeoeFp0LuXXyATaK3SRhFSi8kRm6XjuF5fsrey10WAUlcEXm/h3HjPbKJMUckAotqp8DJ+8JroGikrhDitAkM8w+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Sjt4m7hpuDSYl112bRPk6qTC5Cr9QpCYTHBT0HEb+qPQ7dTS1fSqZNDHJgMsPu9X2O7tpTOMuf481/knrqYWZx+HY3i3+7k5yO8KnSVUI0hj+6GnZmNBv4vnyO6oflAwW/a+pgY0irFiCzHz1CUPVSpkSz8p4XW6cIo8/puziaov1u9BPp3g2AZDGzAximxK35EydsZDMd8ff36an51q0GvleuThqEnW/t+Ono0ncJwSXIeM2LYioPDBlpbo9aQEwkR6OZF5f4PF1GrJ8w06dRHUFJETDS6ke0W52VzSPL8W3oo0oCxb0V+G7LaCXIyK0c4ofBFDSeVn4OGmDnFNi/p4coTYgvFXnJM0lXrzMqQJI3OxPfIn/7BhJlCcPjBuznVKnzUpEt6xLaeyrVW6qwX8ZWGeeYMs5dj6Vb4Gu+I/0Bhu5fXBlu6P1xMvPQ9pXrMm3jXAtjXpTchXLF85zXTZjFW+0Gr79LEBOKgx7wJH7FsMBc9QwYFAvG0IsUMY6iZU7io42JrmunrbLtif9ML6+Mi0Z0NizLx6xSSHSW0+CXwMC5AD5HWf014vXqTt9v+Csp6sH00Omq0HAWcwv1a7mILR2vbk X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 35132327-4aba-4d3b-8029-08dcb2f02688 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:29.0125 (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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240802_053932_821959_DAD7C173 X-CRM114-Status: GOOD ( 10.46 ) 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 Enable MCU driver for SG2042 to provide thermal and reboot support. Signed-off-by: Inochi Amaoto Tested-by: Chen Wang Reviewed-by: Chen Wang --- arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts | 2 +- arch/riscv/configs/defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts index 8b8fdf6243d4..76375e25a495 100644 --- a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts +++ b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts @@ -67,7 +67,7 @@ soc_active3: soc-active3 { }; soc_hot: soc-hot { - temperature = <85000>; + temperature = <80000>; hysteresis = <5000>; type = "hot"; }; 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