Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1450206rdb; Tue, 30 Jan 2024 21:11:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IEV9QMOwcPzTyf4TBeQIRZapCbqhO3VO63aBmQjkSzGWnt7RWjfIWE0iMyCDgH6/3Ax6LLA X-Received: by 2002:a17:906:560b:b0:a2f:d73d:e99c with SMTP id f11-20020a170906560b00b00a2fd73de99cmr309855ejq.14.1706677917056; Tue, 30 Jan 2024 21:11:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706677917; cv=pass; d=google.com; s=arc-20160816; b=Dp6WRPnRQ8R9nItig+/2ChS2BpTTRU8+caycKy8xuGbh87Jz8wNdJ19XXnWbTqbAqX i+RQQ4RiTMa44HX0TIVjpL1nygGI221D1gwVTYuOdvNR6mHtFeDzajie8ZxJDYFmzcKM 0AXmP+Nr0/8SwDUf2pMESvkjGbnwRaQWr9o2mAFP+o2rBa3n8HSwgwDHX6cjuU5mwdLO lZ/Yrr8z4w/OyLS8MOj8EdvW06w3TsMLlUNHqnTcwNaW4y8zwfA2O4tcReglVLyZYb+W XrdQf2KYlgYhpRQ9arbna9k67HzB6MO6+J+z0JmA0mCYvAXmRSAfMgw6Vg1FKk0litCu 9Jsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:message-id:references:in-reply-to:subject :cc:to:from:date:dkim-signature:mime-version:list-unsubscribe :list-subscribe:list-id:precedence; bh=YS6JbNQ2jaewqZUbnCIKLMUYy9mmoZ8lFT9ULydhMQE=; fh=uMosGcdM7CAvBXz/pOENCp+9HGdAKOoI/OFnBmgCoZA=; b=GqviSjHd0dVSjJ/2oeWNc2O0WYSt72yR0cXNVHRjr1p33wJZC4xD4f/aBC41l0jI6Y Dw/SL2Ht2ks+WcmGL8tlzqJXjhimJKms8PwGEdVePlqW7RYt7GpPTEWSS6huxlo2YvuM DWU3/szKBmE5BlGcjBbPyKJQeWQYoIQHVNjdI+Br1EVCQ7Fm2a7bz/3o2ah/4xszqQHH U6iuoB4MtDV1S55Y6IOp3sFIqbwi2IswbnwXi8hIR8zSxdFH879Dpc9Iw3utYWgC386p 0HuHKIl34bZFT9hgeoI9ZZ9IL+OddugjLi7FCr/mOqKtmoY92L2r18fZKmtNggGSy7Lv UenA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@manjaro.org header.s=2021 header.b=eK1WUb4+; arc=pass (i=1 spf=pass spfdomain=manjaro.org dkim=pass dkdomain=manjaro.org dmarc=pass fromdomain=manjaro.org); spf=pass (google.com: domain of linux-kernel+bounces-45760-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45760-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=manjaro.org X-Forwarded-Encrypted: i=1; AJvYcCWCecw0axT/8X/VWlj4lJT66AxRurUvW90bibPVSjHRmMUsDi5bloq66Cu38Xn5sQgdbibwVUBESEJnefAqEPjAIC+zwDWvzuLefGDofQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id oy8-20020a170907104800b00a34a63b22b7si5150563ejb.1001.2024.01.30.21.11.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 21:11:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45760-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@manjaro.org header.s=2021 header.b=eK1WUb4+; arc=pass (i=1 spf=pass spfdomain=manjaro.org dkim=pass dkdomain=manjaro.org dmarc=pass fromdomain=manjaro.org); spf=pass (google.com: domain of linux-kernel+bounces-45760-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45760-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=manjaro.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id A50CD1F231FF for ; Wed, 31 Jan 2024 05:11:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 515253D572; Wed, 31 Jan 2024 05:11:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=manjaro.org header.i=@manjaro.org header.b="eK1WUb4+" Received: from mail.manjaro.org (mail.manjaro.org [116.203.91.91]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E8F83E462; Wed, 31 Jan 2024 05:11:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.91.91 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706677906; cv=none; b=Da3YOaE7G6aHUJK/6sDpl1hxtnjYqpUn6cfzn7ocCgSqqBGTt9ta7R3Q0DpgEK0XwB/r+Ep4F5cWBK+OcBzH4Z+jUPuerxJUa+KVDD9ru0ObfUgg0cmILhZzZnHB8vEBVocaC33URmrTacAODCkqA6hPrZn185kiWnkSfGV7foo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706677906; c=relaxed/simple; bh=pHldmmmXeB3bgwA/jDNWCRiXWea/YKy5KgDoDiSWmTw=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type; b=cqHPiWHErtPhHE4CLhT9/9/pL6kAAH1tqx43QS0fsyyyD25vOLxL2JKnlyraem6ysR9V9jmBFqn3dG5407Vij9E8hFKI91FdbavB9zmb3XYNbGOFJmrgZRTjJ8DZRSKkXO+2u5pHLXTCVQa5BkQpnTCe6cw16qB9tZwIgziUBw4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=manjaro.org; spf=pass smtp.mailfrom=manjaro.org; dkim=pass (2048-bit key) header.d=manjaro.org header.i=@manjaro.org header.b=eK1WUb4+; arc=none smtp.client-ip=116.203.91.91 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=manjaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=manjaro.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=manjaro.org; s=2021; t=1706677554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YS6JbNQ2jaewqZUbnCIKLMUYy9mmoZ8lFT9ULydhMQE=; b=eK1WUb4+QyGsy4bpZNRl2rbt2HABjdXw6syrhVwQFknOh2moxoPxEeYF4qC3jDZjGLH/7j M6YlkgoxF+UF05QRQ6w3GA4wb9Jl6LiO9Vjxu7ShGoVbOBaFCbGUanXIVHN89SMLvmuCWb t8upFOyV1gZULjm9QhkiTHEJBbbNqNqHCAqLWorHuQbprmx2jz54BkV9MhpslteYMC5weV 9TNfiiQmi9Dmf/TDi/lTUVFH692PhIArqpdjBraLpxn0Hc5BA9le4BIAVNlfWBuwJhE4f2 bVGh4bQ2bkO+3WdVIUABbERl9te+jIGmqK0voxCN+j6Zhuc+J9SsxuOgSInNdw== Date: Wed, 31 Jan 2024 06:05:53 +0100 From: Dragan Simic To: Alexey Charkov 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 Subject: Re: [PATCH v2 1/4] arm64: dts: rockchip: enable built-in thermal monitoring on rk3588 In-Reply-To: <20240130-rk-dts-additions-v2-1-c6222c4c78df@gmail.com> References: <20240130-rk-dts-additions-v2-0-c6222c4c78df@gmail.com> <20240130-rk-dts-additions-v2-1-c6222c4c78df@gmail.com> Message-ID: <0702542c8d7dc4139ba5da690fd98e67@manjaro.org> X-Sender: dsimic@manjaro.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Authentication-Results: ORIGINATING; auth=pass smtp.auth=dsimic@manjaro.org smtp.mailfrom=dsimic@manjaro.org Hello Alexey, Some small nitpicks below, please have a look. On 2024-01-30 19:21, Alexey Charkov wrote: > Include thermal zones information in device tree for rk3588 variants Please use "RK3588" instead of "rk3588", both here and in the patch subject. Looks much better. > Signed-off-by: Alexey Charkov > --- > arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 162 > ++++++++++++++++++++++++++++++ > 1 file changed, 162 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > index 36b1b7acfe6a..696cb72d75d0 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > @@ -10,6 +10,7 @@ > #include > #include > #include > +#include > > / { > compatible = "rockchip,rk3588"; > @@ -2228,6 +2229,167 @@ tsadc: tsadc@fec00000 { > status = "disabled"; > }; > > + thermal_zones: thermal-zones { > + /* sensor near the center of the whole chip */ It would be good to replace "whole chip" with "SoC". Simpler and IIRC closer to the official description of the sensor. > + package_thermal: package-thermal { > + polling-delay-passive = <0>; > + polling-delay = <0>; > + thermal-sensors = <&tsadc 0>; > + > + trips { > + package_crit: package-crit { > + temperature = <115000>; > + hysteresis = <0>; > + type = "critical"; > + }; > + }; > + }; > + > + /* sensor between A76 cores 0 and 1 */ > + bigcore0_thermal: bigcore0-thermal { > + polling-delay-passive = <100>; > + polling-delay = <0>; > + thermal-sensors = <&tsadc 1>; > + > + trips { Please add the following comment here, to make it clear what's the purpose of this thermal trip when the IPA thermal governor is used (more similar comments below): /* IPA threshold */ > + bigcore0_alert0: bigcore0-alert0 { > + temperature = <75000>; > + hysteresis = <2000>; > + type = "passive"; > + }; Please add the following comment here: /* IPA target */ > + bigcore0_alert1: bigcore0-alert1 { > + temperature = <85000>; > + hysteresis = <2000>; > + type = "passive"; > + }; > + bigcore0_crit: bigcore0-crit { > + temperature = <115000>; > + hysteresis = <0>; > + type = "critical"; > + }; > + }; > + cooling-maps { > + map0 { > + trip = <&bigcore0_alert1>; > + cooling-device = > + <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + }; > + }; > + > + /* sensor between A76 cores 2 and 3 */ > + bigcore2_thermal: bigcore2-thermal { > + polling-delay-passive = <100>; > + polling-delay = <0>; > + thermal-sensors = <&tsadc 2>; > + > + trips { Please add the following comment here: /* IPA threshold */ > + bigcore2_alert0: bigcore2-alert0 { > + temperature = <75000>; > + hysteresis = <2000>; > + type = "passive"; > + }; Please add the following comment here: /* IPA target */ > + bigcore2_alert1: bigcore2-alert1 { > + temperature = <85000>; > + hysteresis = <2000>; > + type = "passive"; > + }; > + bigcore2_crit: bigcore2-crit { > + temperature = <115000>; > + hysteresis = <0>; > + type = "critical"; > + }; > + }; > + cooling-maps { > + map0 { > + trip = <&bigcore2_alert1>; > + cooling-device = > + <&cpu_b2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu_b3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + }; > + }; > + > + /* sensor between the four A55 cores */ > + little_core_thermal: littlecore-thermal { > + polling-delay-passive = <100>; > + polling-delay = <0>; > + thermal-sensors = <&tsadc 3>; > + > + trips { Please add the following comment here: /* IPA threshold */ > + littlecore_alert0: littlecore-alert0 { > + temperature = <75000>; > + hysteresis = <2000>; > + type = "passive"; > + }; Please add the following comment here: /* IPA target */ > + littlecore_alert1: littlecore-alert1 { > + temperature = <85000>; > + hysteresis = <2000>; > + type = "passive"; > + }; > + littlecore_crit: littlecore-crit { > + temperature = <115000>; > + hysteresis = <0>; > + type = "critical"; > + }; > + }; > + cooling-maps { > + map0 { > + trip = <&littlecore_alert1>; > + cooling-device = > + <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu_l1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu_l2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&cpu_l3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + }; > + }; > + > + /* sensor near the PD_CENTER power domain */ > + center_thermal: center-thermal { > + polling-delay-passive = <0>; > + polling-delay = <0>; > + thermal-sensors = <&tsadc 4>; > + > + trips { > + center_crit: center-crit { > + temperature = <115000>; > + hysteresis = <0>; > + type = "critical"; > + }; > + }; > + }; > + > + gpu_thermal: gpu-thermal { > + polling-delay-passive = <0>; > + polling-delay = <0>; > + thermal-sensors = <&tsadc 5>; > + > + trips { > + gpu_crit: gpu-crit { > + temperature = <115000>; > + hysteresis = <0>; > + type = "critical"; > + }; > + }; > + }; > + > + npu_thermal: npu-thermal { > + polling-delay-passive = <0>; > + polling-delay = <0>; > + thermal-sensors = <&tsadc 6>; > + > + trips { > + npu_crit: npu-crit { > + temperature = <115000>; > + hysteresis = <0>; > + type = "critical"; > + }; > + }; > + }; > + }; > + > saradc: adc@fec10000 { > compatible = "rockchip,rk3588-saradc"; > reg = <0x0 0xfec10000 0x0 0x10000>;