Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp101462lqc; Thu, 29 Feb 2024 11:28:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVpIBDqyNbQaSRTZbGocHno056eHtQ+F2kBMy5K3ODe01Fme9cJQJiHi5iamkdmYENwLFOULuf9B109oRPMPHFrH9A0VRJfi8OMQRmdzQ== X-Google-Smtp-Source: AGHT+IFe8LkhHYPCb2/rA7omFiWeWw2C0nfUWCd3fQ7Wrqv54hJWA13KmJooxoGNA7krqaYrRLTY X-Received: by 2002:ac8:668b:0:b0:42e:b87b:cb65 with SMTP id d11-20020ac8668b000000b0042eb87bcb65mr4144234qtp.24.1709234881061; Thu, 29 Feb 2024 11:28:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709234881; cv=pass; d=google.com; s=arc-20160816; b=bIN0aExQIPrJFMJoa/LljS0zk7OzHx5/La3syDNteMAitBwX4wwNaAuxnbgdjPil8D 0DQfyov4WZxKFyDWO0U3Z7YIzsR6wfwt7jRXOAWM+1xlGKFMxaDiewS17cErrQ+hb9SS 00rlIwvpH0vCwCXGwBCSgN4g85PRP4CEURH71MdwCKwGKl0W2bd4/Aea6ci7QRGJUuzd 43YYuz8/GCsvf+m8RGgjFl6HkPXhPfKU3isV9w+KF9r2OrBQDLarZ2tMNBPzR8rpmLHs YgZymqsYYzY9LXVkYWBUIR3EaDhJz9bTGecj2FLfM/BvUfG56nMCILmNlbyQ98/3syPB r/IQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=ZjF+Nm70GZV3EV5zT61+vVH9aCxdPSz8FYjQv588FDY=; fh=bCXp2Idrs8cgmOqdZbLUz6lbG8fIz/clbn0+nzAo64k=; b=gIXCaymo0Oc98jOeJK8YAgcBuitbSuXaqUk1Y+wt8x1Vye+RymSr9ZcT+qiFMZzXbI PdG0ZjmERVWwkyZw0ChQwcxJiGdtM678vcJfvcXOtUhGTjgdfBymy4DblD2+KMtcdWqN 3YjJzOTm8Y0onirScP3eVpdwZrYFspzDV+hd0XLGqirABm+TfWd6MZeVtnSjlol8oAZ2 bYkrNUFzo+y7HsYoLtZEd33N1571UpEwThCstSjCJEpElHv7Ke9Ox35XV/2tgOIllaj2 jboxR63WduRK8QGmyduiiAMd2IBIafcVlB3dckxMw/sqTICUEBq/clX2M1RL5enH/RgO It5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YINBMM7e; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-87348-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87348-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z6-20020a05622a060600b0042c5ef2d1b0si2160763qta.771.2024.02.29.11.28.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 11:28:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87348-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YINBMM7e; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-87348-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87348-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A4BB11C22095 for ; Thu, 29 Feb 2024 19:28:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A9901428E7; Thu, 29 Feb 2024 19:27:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YINBMM7e" Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFCC713F451; Thu, 29 Feb 2024 19:27:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709234830; cv=none; b=HTRALhdKe4XcKz0LKRFZDmSu5ijc+22YJXqItYmAImA+cQC71aC8nxN2NPGmn4yQuEgE2H+kXnbAzmVo6+WvvHNpeodb/ty+7yx6/W66uxYKVmjcUuTtmQ2Pd0//qrpSDJWkxGfbzn9xj6pjqYglJJM8Eiwerfzex0euCcR+UCw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709234830; c=relaxed/simple; bh=Ho/8fTxDDk0oY+T8PDaCqjRH1MRLd78jPjHkNM1Fiy8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Wy3HeXt6Q+sqOlWscjojgrFYL0qbylMs2yGhn0+MG3zkfy8ubq7hzd8rTnQu15PTElVy71IS5Umuf7n319ETZSVoJPj8eVDopQoEX3xlLXHzQqhovJiw/JqHCsAjLkzw6Xsk/63xMuAlMNL2ac1f0dDYG0VN2yMGHqMrsqS7gY0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YINBMM7e; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-412c3f4c6b9so1423435e9.0; Thu, 29 Feb 2024 11:27:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709234826; x=1709839626; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ZjF+Nm70GZV3EV5zT61+vVH9aCxdPSz8FYjQv588FDY=; b=YINBMM7ezcjghQnAl/Y+IfS+YuFLmsH/lnL0ox8SsqIKsHTdoaAQRFIHFJ+59Hqic3 jvPp5ujB6x18uLG9x15ysEIqkyTqjioogJDGlEoxEh0WZsxDJkuALvusDD1DFYpHd+iY uAYEKU7oXy50MfhkX3PEm4PCgLRUJneR0zJYST3InCy86S2hCjryk0WcjRcJLhmUFfYB P7VLnldzXuiept1bE8JYD77Sc1NNHSx88G0i2nk+yvpjVkvF1VCpWQwq1FOmSlCcIug2 A8lWExRyM+7+H8XDo0pp8Qm0MkgVKIQRAdd2P4qCkRDq1xaRSAPvPxVTIBCbNVr67vTv qirg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709234826; x=1709839626; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZjF+Nm70GZV3EV5zT61+vVH9aCxdPSz8FYjQv588FDY=; b=eSQYoeH4iMpdNKWCHE1qsIAnTu43VjZHyNMEIaTr5uVP/mi+rIeVt71yr3FFYxAL5Y dA4J3P50xQDkjMSBSU937jao9/XDmX1BfEtz1kd9BhJeQIJIhsRq63McSnBEy9tWwogF HZBjUxKoU02aOm+3veJw9I2/wUPhJHTCB1mIgUh5MlxQ2Lw05zppNpl7fvljY7zOILvw sazUXA+WSjiTWIXxUpIAV5OQRr3LuqSlHKeE4ZqOU4XaotIvxE1R1UNP33KIg8oTuqck lAtSB03SxmGPVVo4Na+w5jq00TIW4FLeDc3HO74y3C4eCCL0QPGXJxZKq93t7p1HIDeF FmjA== X-Forwarded-Encrypted: i=1; AJvYcCVc16DCt5ANt8vorY3zyWTQ54yrj09fda05nBbZMhBBGBYDzW/DgwyklxW0+a2t7T41NYKyvSK3RpOYukhAca3ozM4P+XfbLEZlajT9HDnx2qfhFjoMc45Ae20O3A3bUx++AKgGkwLdTA== X-Gm-Message-State: AOJu0Yy+2P2/uzDJnpwuprCycfjN3GzHsDThbajcDjAkp5omTBrFWZeP wDaNcT4QjTW2EzJzqpXe/a6LfbDznGG9sQW+eXEPSHbkx95E24S1Rhn59V0hpGZKYQ== X-Received: by 2002:a05:600c:4fcc:b0:412:c1d4:995f with SMTP id o12-20020a05600c4fcc00b00412c1d4995fmr622wmq.13.1709234826323; Thu, 29 Feb 2024 11:27:06 -0800 (PST) Received: from [172.30.32.188] ([2001:8f8:183b:6ebc::d35]) by smtp.gmail.com with ESMTPSA id j20-20020a05600c1c1400b00412bca49a5bsm2853944wms.42.2024.02.29.11.27.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 11:27:06 -0800 (PST) From: Alexey Charkov Date: Thu, 29 Feb 2024 23:26:33 +0400 Subject: [PATCH v3 2/5] arm64: dts: rockchip: enable automatic active cooling on Rock 5B Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240229-rk-dts-additions-v3-2-6afe8473a631@gmail.com> References: <20240229-rk-dts-additions-v3-0-6afe8473a631@gmail.com> In-Reply-To: <20240229-rk-dts-additions-v3-0-6afe8473a631@gmail.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: Daniel Lezcano , Dragan Simic , Viresh Kumar , Chen-Yu Tsai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Alexey Charkov X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709234816; l=1646; i=alchark@gmail.com; s=20240125; h=from:subject:message-id; bh=Ho/8fTxDDk0oY+T8PDaCqjRH1MRLd78jPjHkNM1Fiy8=; b=9He9zzAzOU9/Q78jwrKCrcpeg4Gshhw2MArhwDVEmmq1HYUzqs/CKJUbr0yRGn7xFOFd0mBCN JLwCXW4gkE3BpRCQQ0vWCiuoNuc0WT6D/kJPiQwMDD95/m5GOi347qA X-Developer-Key: i=alchark@gmail.com; a=ed25519; pk=xRO8VeD3J5jhwe0za0aHt2LDumQr8cm0Ls7Jz3YGimk= This links the PWM fan on Radxa Rock 5B 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 Signed-off-by: Alexey Charkov --- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 30 ++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts index a0e303c3a1dc..3f7fb055c4dc 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts @@ -52,7 +52,7 @@ led_rgb_b { fan: pwm-fan { compatible = "pwm-fan"; - cooling-levels = <0 95 145 195 255>; + cooling-levels = <0 120 150 180 210 240 255>; fan-supply = <&vcc5v0_sys>; pwms = <&pwm1 0 50000 0>; #cooling-cells = <2>; @@ -173,6 +173,34 @@ &cpu_l3 { cpu-supply = <&vdd_cpu_lit_s0>; }; +&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 { + map1 { + trip = <&package_fan0>; + cooling-device = <&fan THERMAL_NO_LIMIT 1>; + }; + map2 { + trip = <&package_fan1>; + cooling-device = <&fan 2 THERMAL_NO_LIMIT>; + }; + }; +}; + &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0m2_xfer>; -- 2.44.0