Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1558703rdb; Wed, 31 Jan 2024 02:15:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHv+ZjZ+BfqCvRGy3PmUQFnq8OzXqSdtzgO9lA7WzZnC1Xuzm2x7pS1JO24YKk7q5QN9oVA X-Received: by 2002:a05:6a20:ba7:b0:19c:a29c:16c7 with SMTP id i39-20020a056a200ba700b0019ca29c16c7mr1003098pzh.10.1706696126377; Wed, 31 Jan 2024 02:15:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706696126; cv=pass; d=google.com; s=arc-20160816; b=Tc9FHz5qPFa7bky2LG2yQKJvgBy4i9GnM6Qs6VPRYhOGjUToGjr0r41gr/fnsknCff +T+rXowC1x3EFxSBViEAJSdBBIQFGxKJ5thjx7J6JKRTpd+5KJPvhn4Zzny5L0L0GbZ6 /wVpyQmgOES2QLMptjM+4bFV1w2a7+87boO0ktBQJ4jps9MhQG2sbpf2bsrAd8MQM0yV 7A0EmhfkHuH15YOEd2yha7aObXeXaaQ5hZ2/MMmtpk4zo+tiRBsMseNwAY/CuqtSVw0c p/JBPCDZS9Hw4eWCnSMMVUG7BxogI6PT6TMdwd9MPJ8ZEoZSorw9d0OiSY/htNHPk7vt Oz0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=ITZ+rt9x0Q01XZlNJE668LMM3xiQ7k41PpzKoiIe8e0=; fh=UxREbSua1Id8EV5uvv82OgCZMD0zqwsf6nB+u9hFk8w=; b=kXmR5LubPG/+/97u/3ncL/WShFvrgKSQQBQ43v8utTjLkttGW4LiPMbaL+x8VKNWBK BYbyhcbeYUIysKSXIebpnxP2m8HT+qcVRn7FpRBDvXchvW+tzlEA9d7H2vwWwdlY3Iqr +RzXw4zZuQBrbE2HqOAuNEjeJ4y5PoVcRNZaXGDjM4XjNWCboSb8rGskfXci/RTkoB60 nXanxZDKed3VRbDn2M2FD+/JvOs2XSA0fZ2Nh7BfwaghWBQ/Dqn/nLNxJJk/Lw2PO6Ss 5Q+QggBytaIk8Fr5MAjt+9rHbA59Ha0xT39+C35sSEdZRNOHZ4Tv500fzSOGT0K5IeJ1 RFfg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Bhtn/ya8"; 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-46156-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46156-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=1; AJvYcCVAWasnUSd2jKHXYCLN9JvVtZvoXg9kMB1QhvxVEncVAwao6mjkSTR2gpO52iIQ3/IfxkKymz08BuOF8yT+4Sa8pwhXnPzXNBq5emLZLg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q1-20020a056a00084100b006dddc5e4e24si9491274pfk.138.2024.01.31.02.15.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 02:15:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46156-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Bhtn/ya8"; 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-46156-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46156-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 090F7B28A61 for ; Wed, 31 Jan 2024 09:43:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1AE6467A16; Wed, 31 Jan 2024 09:43:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Bhtn/ya8" Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 7BFBB6994B; Wed, 31 Jan 2024 09:43:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706694214; cv=none; b=nSRIgN5sz/2qGycxlnA1CkWhfimzVosbbE5a7543TZxZwHjPXbtQLHW6bQSqKkWO/tcGJtDym1KOJMUk7MhINAA2XZSJMNrZcMlGc/l127l1tStHyav+/T10cVAR7YDKWa3so6WRBW2j6lKzb/jyJehsxnONzJGjg//TtlZb5ac= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706694214; c=relaxed/simple; bh=AH+tCjMAx3QC27/6a3aHn8iEY3DhD8c3Sn0bBq9szvk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=tWvbo0uPe9fyJxwWg1Pd64hIwdcxDOsL/emCvGNpS/MqnY40leqnZ/HYj/A1jTD8KDZQ3A5v7IVflIhuq/eFEHNOZLztEEBr6QT3tpdvW06zDi4PlIdxfcTOF7XI28RbGpzJzOWRLVW5mCKHJ+IEvXpLeoNYUp9MXFCwJuQ72Yg= 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=Bhtn/ya8; arc=none smtp.client-ip=209.85.218.43 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-ej1-f43.google.com with SMTP id a640c23a62f3a-a26fa294e56so636935466b.0; Wed, 31 Jan 2024 01:43:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706694210; x=1707299010; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ITZ+rt9x0Q01XZlNJE668LMM3xiQ7k41PpzKoiIe8e0=; b=Bhtn/ya8fSTdLwkiWBtTnytPBzICnxv8nqR6kJuO2Q11Gd1QKVznIGFlY5kwac2Mlb EoS2KpC6pEq37MQ1m0gz37HGdsth83IY0xuJisrHZJrsr3PE0p1s6Fs6UBlI23Jx2JaW +v8Vupck4OTZNhTnorz0u6nuokB0+WCHXSJ3E/BQq5LHsgnxHmzMiGJDum4nAB7G6Pmk SiS18+JM9i0gYZAW1SXiiLNsQaEwp1uzEev2LbQwuJiGeyGSWJGhLRfRjWs6u5USYzKh hHnrALtcEuo00y4a25TS+bLAW32xnLEbMfcPZnVX4KkHIU+7ENGf/3CvoZx958DJV8z9 9tvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706694210; x=1707299010; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ITZ+rt9x0Q01XZlNJE668LMM3xiQ7k41PpzKoiIe8e0=; b=GkG9UwnbSwvFVxv5DqqxJb7PNPrCfIychJgfsJE3EYZYPBMgrCSiPTrUBxeoCFNf7h MVSQXWdpJ+Hclp87FT54+KJNzNgckdkyxXHk0JZBy2fJ11AFK2fiIYefea6OsV4uV4N9 DQj3eKg/5XvpGqH6f3EMlgueUztBwELIautuGJ+m4Jrku1JlHwI5NKfdxPxmUWQ0Z7fZ bfbBtp+ra7RCi2GGUOnN65v09wA5jXytGi2JOt2jf7Ap7UIMN88Yc/9s9dMpwjWFoxOQ AvR8PqVIiOOYrdHi1ZS1V9Bta9PBlPM7iWpuL/ts4hi55Y6VaHIT3W6nPCPkqlxIS7S4 JM0w== X-Gm-Message-State: AOJu0YyD1xFEtjWHMrtu9EP/jWDqiXfhLXbo7GQQ5nkdhqOHZbezq9g9 l4Y+EovlUnLmE+jJ5f6mi4fOtlqjqcwo3cOGTakL2HcvPaM95kE3T2iHmh6p1yiokds30c50cOg 20Elao+xjk/5M7+CJ+27WUeZbLVQ= X-Received: by 2002:a17:906:2c19:b0:a36:8711:ee35 with SMTP id e25-20020a1709062c1900b00a368711ee35mr415520ejh.40.1706694210472; Wed, 31 Jan 2024 01:43:30 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240130-rk-dts-additions-v2-0-c6222c4c78df@gmail.com> <20240130-rk-dts-additions-v2-2-c6222c4c78df@gmail.com> <8115ab382115f66aa01dd3d00aaae474@manjaro.org> In-Reply-To: <8115ab382115f66aa01dd3d00aaae474@manjaro.org> From: Alexey Charkov Date: Wed, 31 Jan 2024 13:43:19 +0400 Message-ID: Subject: Re: [PATCH v2 2/4] arm64: dts: rockchip: enable temperature driven fan control on Rock 5B To: Dragan Simic Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Daniel Lezcano , Viresh Kumar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 31, 2024 at 9:08=E2=80=AFAM Dragan Simic w= rote: > > Hello Alexey, > > Some notes below, please have a look. > > On 2024-01-30 19:21, Alexey Charkov wrote: > > This enables thermal monitoring on Radxa Rock 5B and links the PWM > > fan 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 > > I'd suggest that you replace "temperature driven fan control" with > "active cooling" in the patch subject. More concise and reads better. Agreed, thanks! > > Acked-by: Daniel Lezcano > > Signed-off-by: Alexey Charkov > > --- > > arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 34 > > ++++++++++++++++++++++++- > > 1 file changed, 33 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..b485edeef876 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 =3D "pwm-fan"; > > - cooling-levels =3D <0 95 145 195 255>; > > + cooling-levels =3D <0 120 150 180 210 240 255>; > > fan-supply =3D <&vcc5v0_sys>; > > pwms =3D <&pwm1 0 50000 0>; > > #cooling-cells =3D <2>; > > @@ -173,6 +173,34 @@ &cpu_l3 { > > cpu-supply =3D <&vdd_cpu_lit_s0>; > > }; > > > > +&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 { > > Should be "map1" instead of "map0". There's already "map0" > defined for "package_thermal" in the RK3588(s) dtsi file. Indeed. I got overzealous renaming everything to be zero-based. > > + trip =3D <&package_fan0>; > > + cooling-device =3D <&fan THERMAL_NO_LIMIT 1>; > > + }; > > + map1 { > > Should be "map2" instead of "map1". Noted, thanks! > > + trip =3D <&package_fan1>; > > + cooling-device =3D <&fan 1 THERMAL_NO_LIMIT>; > > Should be "cooling-device =3D <&fan 2 THERMAL_NO_LIMIT>;" > (i.e., "2 THERMAL_NO_LIMIT" instead of "1 THERMAL_NO_LIMIT"). > > The first fan speed is already covered by the first cooling map. > The second cooling map takes over from the second fan speed. Makes sense, will adjust, thank you! Best regards, Alexey