Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5371613rwe; Tue, 18 Apr 2023 06:08:20 -0700 (PDT) X-Google-Smtp-Source: AKy350ZEtyFOR4kcYHl5kw1C/JIngXQlLrE7Y3stDxlxW+tvAD23DuMibcw/h7v58FQaFBXEq1w/ X-Received: by 2002:a05:6a00:1388:b0:63b:8e12:7075 with SMTP id t8-20020a056a00138800b0063b8e127075mr9216712pfg.31.1681823299927; Tue, 18 Apr 2023 06:08:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681823299; cv=none; d=google.com; s=arc-20160816; b=akLNEKDRHZI3+TkyIDVRp3Q5r235HYyxhsCEQeJQW8KHs34EBex5M9UW3onsh6JSNs P3H5rXAwoU7uiJPrmCdJF/kSCxj41dGGw8wqwGzA7fD8gFss1AXLgY3GR+Ivy1ze6YU1 krfUyplfrwITy7gSPk1H9V+/G7Ar83cPSzUFphn11OJ1s8NX02KkWW1APYbRbdM1k5Pk VlrXjdhzkvOtbjviXj3MAKeC8rMJq6WEcGRRBY4vTMQseNeA5ktduRxpr2sDalh/mPXL TO2DDo6xQpz6/gYsDNvyYyRgb0Ynb1VwRTbTa7VhWWdcU9QEMPp6BP1mqylrVPFE8v2D lRmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WxAgW6CxtNBCrgbbJHGbXJGrhvwobKARCsNq00r6Jh8=; b=w/JzYZWPqbnSvxKvCQnEApo16NKvX5uazRnmbA5aufsH6s7HRopUvwoxqCqtQaVmcN ZhzYRMzxg/k8/6pJDsk9Qt/C/pBK3fUYaPyWcw2bMzDo943I5dFARGmxMkkVZDr8Qy/c oqfQxwqBlnsXu5/eJ3vlzRjJuKT1KM5grorcWmcrdE3P916gO95cox8rQicE4k5VIE8B wHgaq8evxL5anF/C9gwR/MaTcBhfSl+JUOitp4BWLicBRugKvu8FiOiAgK5oRvuf5715 c20uJQuli2gabrUkqHXpCwFFfc/zKr4z/yGYvIeewemtJlyPyxCgTG6pb2PorTYX3I9U x2Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bsl7HkUO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r21-20020a63d915000000b00518c878b1dbsi13702321pgg.356.2023.04.18.06.08.07; Tue, 18 Apr 2023 06:08:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bsl7HkUO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232315AbjDRM6y (ORCPT + 99 others); Tue, 18 Apr 2023 08:58:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232263AbjDRM6x (ORCPT ); Tue, 18 Apr 2023 08:58:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E91841547C; Tue, 18 Apr 2023 05:58:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 840D062A27; Tue, 18 Apr 2023 12:58:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52698C433EF; Tue, 18 Apr 2023 12:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681822731; bh=R7CWZjk55oUNXLF9lfPZCnS8pDJS7yoewem0kyP4V6o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bsl7HkUONeYxyrX4gZxTGrtKyvRssXQBE9AYISqCcsPzdtFRp6eDq7IDbFMnHsBSk HzOhHxupxLxXTOVlJDvkXzAvBOQUzNLu/Rg40R4sH8PuaxmmBtZcgDnfElGnEFzaj3 SDagHvAAuzr0oNmXboCcsr2WftP8ja6mKhdZnIbZMrvL7krcOcC4xP5FcfuavOwnfz 5uDUOzJ6uXI1b2rBpwwWrMWsYinmKoaL8CrZTa+CMZpJQFD9F55Ybh5SGh2AO+9j2t 6PZJDG0kNumSFRb983I2QnTq1QUj7AqOvFKR1WgxLTi3jfW7Pzk+g8v216p9szZi+m GAFfFBwT2nXtw== Date: Tue, 18 Apr 2023 06:02:23 -0700 From: Bjorn Andersson To: Konrad Dybcio Cc: Andy Gross , Rob Herring , Krzysztof Kozlowski , Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: dts: qcom: sm6115: Set up CPU cooling maps Message-ID: <20230418130223.wvsu3bsm62i2gtpp@ripper> References: <20230418-topic-cool_bengal-v1-1-c5d53814dc74@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230418-topic-cool_bengal-v1-1-c5d53814dc74@linaro.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 18, 2023 at 01:56:56PM +0200, Konrad Dybcio wrote: > Set up CPU cooling maps to ensure the thermal framework is aware of > the connection between the CPUs and the TSENS sensors. > > All of the maps refer to all 4 CPUs within a given cluster at a time, > as that's what can be considered the smallest DVFS target unit - they > all share the same voltage line and clock source. > Generally software based CPU cooling is considered too slow to cope with CPU core temperature changes, and the limits hardware working together with OSM/EPSS will do a better job maintaining appropriate core temperature levels. Is there a reason why this can't be used/relied upon on this platform? PS. Amending this mechanism with software based cooling to keep the system at a reasonable/lower temperature is a good idea. Regards, Bjorn > Signed-off-by: Konrad Dybcio > --- > arch/arm64/boot/dts/qcom/sm6115.dtsi | 137 +++++++++++++++++++++++++++++++++++ > 1 file changed, 137 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi > index 631ca327e064..36ff913c1a60 100644 > --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi > +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi > @@ -12,6 +12,7 @@ > #include > #include > #include > +#include > > / { > interrupt-parent = <&intc>; > @@ -47,6 +48,8 @@ CPU0: cpu@0 { > enable-method = "psci"; > next-level-cache = <&L2_0>; > qcom,freq-domain = <&cpufreq_hw 0>; > + #cooling-cells = <2>; > + > L2_0: l2-cache { > compatible = "cache"; > cache-level = <2>; > @@ -63,6 +66,7 @@ CPU1: cpu@1 { > enable-method = "psci"; > next-level-cache = <&L2_0>; > qcom,freq-domain = <&cpufreq_hw 0>; > + #cooling-cells = <2>; > }; > > CPU2: cpu@2 { > @@ -75,6 +79,7 @@ CPU2: cpu@2 { > enable-method = "psci"; > next-level-cache = <&L2_0>; > qcom,freq-domain = <&cpufreq_hw 0>; > + #cooling-cells = <2>; > }; > > CPU3: cpu@3 { > @@ -87,6 +92,7 @@ CPU3: cpu@3 { > enable-method = "psci"; > next-level-cache = <&L2_0>; > qcom,freq-domain = <&cpufreq_hw 0>; > + #cooling-cells = <2>; > }; > > CPU4: cpu@100 { > @@ -99,6 +105,8 @@ CPU4: cpu@100 { > dynamic-power-coefficient = <282>; > next-level-cache = <&L2_1>; > qcom,freq-domain = <&cpufreq_hw 1>; > + #cooling-cells = <2>; > + > L2_1: l2-cache { > compatible = "cache"; > cache-level = <2>; > @@ -115,6 +123,7 @@ CPU5: cpu@101 { > enable-method = "psci"; > next-level-cache = <&L2_1>; > qcom,freq-domain = <&cpufreq_hw 1>; > + #cooling-cells = <2>; > }; > > CPU6: cpu@102 { > @@ -127,6 +136,7 @@ CPU6: cpu@102 { > enable-method = "psci"; > next-level-cache = <&L2_1>; > qcom,freq-domain = <&cpufreq_hw 1>; > + #cooling-cells = <2>; > }; > > CPU7: cpu@103 { > @@ -139,6 +149,7 @@ CPU7: cpu@103 { > enable-method = "psci"; > next-level-cache = <&L2_1>; > qcom,freq-domain = <&cpufreq_hw 1>; > + #cooling-cells = <2>; > }; > > cpu-map { > @@ -2471,6 +2482,24 @@ cpu4-thermal { > polling-delay = <0>; > thermal-sensors = <&tsens0 6>; > > + cooling-maps { > + map0 { > + trip = <&cpu4_alert0>; > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + > + map1 { > + trip = <&cpu4_alert1>; > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + }; > + > trips { > cpu4_alert0: trip-point0 { > temperature = <90000>; > @@ -2497,6 +2526,24 @@ cpu5-thermal { > polling-delay = <0>; > thermal-sensors = <&tsens0 7>; > > + cooling-maps { > + map0 { > + trip = <&cpu5_alert0>; > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + > + map1 { > + trip = <&cpu5_alert1>; > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + }; > + > trips { > cpu5_alert0: trip-point0 { > temperature = <90000>; > @@ -2523,6 +2570,24 @@ cpu6-thermal { > polling-delay = <0>; > thermal-sensors = <&tsens0 8>; > > + cooling-maps { > + map0 { > + trip = <&cpu6_alert0>; > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + > + map1 { > + trip = <&cpu6_alert1>; > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + }; > + > trips { > cpu6_alert0: trip-point0 { > temperature = <90000>; > @@ -2549,6 +2614,24 @@ cpu7-thermal { > polling-delay = <0>; > thermal-sensors = <&tsens0 9>; > > + cooling-maps { > + map0 { > + trip = <&cpu7_alert0>; > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + > + map1 { > + trip = <&cpu7_alert1>; > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + }; > + > trips { > cpu7_alert0: trip-point0 { > temperature = <90000>; > @@ -2575,6 +2658,24 @@ cpu45-thermal { > polling-delay = <0>; > thermal-sensors = <&tsens0 10>; > > + cooling-maps { > + map0 { > + trip = <&cpu45_alert0>; > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + > + map1 { > + trip = <&cpu45_alert1>; > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + }; > + > trips { > cpu45_alert0: trip-point0 { > temperature = <90000>; > @@ -2601,6 +2702,24 @@ cpu67-thermal { > polling-delay = <0>; > thermal-sensors = <&tsens0 11>; > > + cooling-maps { > + map0 { > + trip = <&cpu67_alert0>; > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + > + map1 { > + trip = <&cpu67_alert1>; > + cooling-device = <&CPU4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + }; > + > trips { > cpu67_alert0: trip-point0 { > temperature = <90000>; > @@ -2627,6 +2746,24 @@ cpu0123-thermal { > polling-delay = <0>; > thermal-sensors = <&tsens0 12>; > > + cooling-maps { > + map0 { > + trip = <&cpu0123_alert0>; > + cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + > + map1 { > + trip = <&cpu0123_alert1>; > + cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > + <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + }; > + > trips { > cpu0123_alert0: trip-point0 { > temperature = <90000>; > > --- > base-commit: 4aa1da8d99724f6c0b762b58a71cee7c5e2e109b > change-id: 20230418-topic-cool_bengal-2f5f3f47269c > > Best regards, > -- > Konrad Dybcio >