From patchwork Sun Sep 22 11:21:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Klink X-Patchwork-Id: 13809034 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 1A80ECF9C6C for ; Sun, 22 Sep 2024 11:22:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=GuRo2k0T9oiOFVzmZlE5UWzPH3hTNSPfo+s1LYF8J38=; b=roQCyPusq7gTpF3/GuxEtg5Ncp 0P/XxhjHJq9xSWIxVrOQqrxFc3eInFZ+SIZO2Pma2eM+Mtkt6d3iJQOjyTe85kipjVowifddfzpaA LABocif+LVRZQBbq6nS1VlwrLmiBfPG2zLENka4zeEItLU7FEOxykZqRZ4cIBvRi7t7tGfCn+DBds D6YPAm+lTZ4CD61ZnKCPRLbzEuptOkbEjlfb3ALPiHHVwE+cUw+GS2YTYcB2xowqLatMim6RUYCwO +TBJWpNHo7eLGMMzZTv0HqCVf39Mr6PCFTa2LEDqVGXMTL7eMzD7Omp4JJZdd8LUAYPkmLY2JdhKS 5VIzZefQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1ssKfk-0000000F399-3RyJ; Sun, 22 Sep 2024 11:22:36 +0000 Received: from mail.flokli.de ([2a01:4f8:1c1e:e12f::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1ssKec-0000000F34h-28TG; Sun, 22 Sep 2024 11:21:28 +0000 From: Florian Klink DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flokli.de; s=mail; t=1727004081; bh=GuRo2k0T9oiOFVzmZlE5UWzPH3hTNSPfo+s1LYF8J38=; h=From:To:Cc:Subject:Date; b=UtGneW1D2ul2axDXdozrtFWvUGfQCDuiXu1h0PdFHUc+XZx/AfVMrfD9roNuP2JbQ sxWuFSYDM4Ars5fUvHd8D1no56FoFYcYYtQ+nnmMc9wX0EJDvSafukxTx5hU4R9ZkY dDJV1nNBAN662PTZDcXRI+oD1/B+OaUuiDogFDjQ= To: Cc: Florian Klink , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Sebastian Reichel , Dragan Simic , =?utf-8?b?VGFtw6FzIFN6xbFjcw==?= , Ondrej Jirman , Muhammed Efe Cetin , FUKAUMI Naoki , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm64: dts: rockchip: enable automatic fan control on Orange Pi 5+ Date: Sun, 22 Sep 2024 14:21:03 +0300 Message-ID: <20240922112113.251431-1-flokli@flokli.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240922_042126_820469_E730CEB2 X-CRM114-Status: UNSURE ( 8.16 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This links the PWM fan on Orange Pi 5+ as an active cooling device managed automatically by the thermal subsystem, with a target SoC temperature of 65C and a minimum-spin interval from 55C to 65C to ensure airflow when the system gets warm. This is pretty much the same as '4a152231b050 ("arm64: dts: rockchip: enable automatic fan control on Rock 5B")', except for the Orange Pi 5+ board. Signed-off-by: Florian Klink Reviewed-by: Dragan Simic --- .../dts/rockchip/rk3588-orangepi-5-plus.dts | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts index e74871491ef5..d91438752006 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts @@ -351,6 +351,36 @@ &i2s2m0_sdi status = "okay"; }; +&package_thermal { + polling-delay = <1000>; + + trips { + package_fan0: package-fan0 { + temperature = <55000>; + hysteresis = <2000>; + type = "active"; + }; + + package_fan1: package-fan1 { + temperature = <65000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + map0 { + trip = <&package_fan0>; + cooling-device = <&fan THERMAL_NO_LIMIT 1>; + }; + + map1 { + trip = <&package_fan1>; + cooling-device = <&fan 2 THERMAL_NO_LIMIT>; + }; + }; +}; + /* phy1 - M.KEY socket */ &pcie2x1l0 { reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;