From nobody Fri Nov 29 10:26:45 2024 Received: from mail.flokli.de (mail.flokli.de [116.203.226.116]) (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 274F63B7AC; Sun, 22 Sep 2024 11:21:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.226.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727004088; cv=none; b=ZiPakmtw7m6d53VGrShXMK7GXveGh8rBcmcYzAWDoJF67bMRiLSq767JUY2wcNLnFa4QpJ0k+Cp2Z4uiNIHmkawhdBdV+LE+M1MzaU2hH8wOzgBHMHTrKVCN4wTLkHPybqBTDGuOhbmS5itspflckaLL5MrhN0vpmX+YjWDKHu0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727004088; c=relaxed/simple; bh=9gW+dAUsSzMNbOy50TO99NdJ8ORNAysNtlIeDT5JpZ4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qh2Ar6KRT6OqMGCPenkCGDtlY3lybMq2Ptbt/BcZ3PzEQyNeHPJfla3oQvWTSc8uM9RM9daVaxPwUPmYDVJq5zoyHIT2gkyVB7PHzvlTtKknLtAhJ6Vev0BifwkKcZDMX9CBc2szJ+9mVRu4ZkQ1LWmtNrVbnGqbQnSEtptRQQM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=flokli.de; spf=pass smtp.mailfrom=flokli.de; dkim=pass (1024-bit key) header.d=flokli.de header.i=@flokli.de header.b=UtGneW1D; arc=none smtp.client-ip=116.203.226.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=flokli.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flokli.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=flokli.de header.i=@flokli.de header.b="UtGneW1D" 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?q?Tam=C3=A1s=20Sz=C5=B1cs?= , 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 =3D "okay"; }; =20 +&package_thermal { + polling-delay =3D <1000>; + + trips { + package_fan0: package-fan0 { + temperature =3D <55000>; + hysteresis =3D <2000>; + type =3D "active"; + }; + + package_fan1: package-fan1 { + temperature =3D <65000>; + hysteresis =3D <2000>; + type =3D "active"; + }; + }; + + cooling-maps { + map0 { + trip =3D <&package_fan0>; + cooling-device =3D <&fan THERMAL_NO_LIMIT 1>; + }; + + map1 { + trip =3D <&package_fan1>; + cooling-device =3D <&fan 2 THERMAL_NO_LIMIT>; + }; + }; +}; + /* phy1 - M.KEY socket */ &pcie2x1l0 { reset-gpios =3D <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>; --=20 2.46.0