From patchwork Thu Jan 10 00:00:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 155110 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1281723jaa; Wed, 9 Jan 2019 16:01:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN5ZXAfxVXZtHWiU9g0wVqD7e/Kh1QQjnV9SjBP/VYTW+r3b3d8o8yKKXMObOxaQPvPNJDkC X-Received: by 2002:a17:902:1d4a:: with SMTP id u10mr7751526plu.122.1547078510197; Wed, 09 Jan 2019 16:01:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547078510; cv=none; d=google.com; s=arc-20160816; b=RxhuzZKxP48Pn7cMb6rB/s/g3kfDWrIIOff/Jmp+u5gYJLSodm/FE7hk67yuD12wWg avxw1McA8jziiPV9ijo8HV8q7tByGGgGU1YN1+lAW6G1IHaqXaPyb/9ShTbpBZhnLSgv bb+YtP0ck08TGTghkg2PtjKpdReYNXYSHC21JfSJNIIf/XcPAphGHF93Ldwju4L3vfGR ybT1w3fsGojz8Ame0X6O/zdTHRdv9HfdDHMtxLtuZ9lqvp6cJoDocOruwxXj4T8zq5ut lBJpgrloTgBghFn+xhA6lpjPyUJ5EQnLRJVEMR4GJN+QcIBlE3TXuJWf/qOcpCXa2tyH 5SZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=/ZE0qkZUqxgI4JnoiR2IYSBVxq7qTxELnI9TqLZdU2Y=; b=AO3RgZKALiqFl713OGVubOSZqzZIaB+NzRdrJeR/i83KgGwRGq2g5+7XVPp3ox3g9V a07KvetFTQGdz5yx1dBB+LXygkRE0jAoTbHDs1aQciVJoj7ffnugcFjwHWqWWiCWhN0f 6anosqIt3ks9DrRD8bZvDBbpjuxXwdP0ahZ3p1czmKhElME0Fd11qhkrCX95G2Wz6WQZ Z8wuCl5j+iczxF6zoJL4tVMU6AR0no/lIhuAzNPc6Gb4Dl/GVpbfdAcrl7DE1m+FbICf WTExNsugHlXN78/Usn4xw6fEZrtEUq787BYJapZtCdi8VoBpDfQ6HNE9vrq6jMmdMktZ gbTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="SEU3cD/l"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r18si37126091pfc.199.2019.01.09.16.01.49; Wed, 09 Jan 2019 16:01:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="SEU3cD/l"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726480AbfAJABt (ORCPT + 15 others); Wed, 9 Jan 2019 19:01:49 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37255 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726680AbfAJABt (ORCPT ); Wed, 9 Jan 2019 19:01:49 -0500 Received: by mail-wr1-f65.google.com with SMTP id s12so9474642wrt.4 for ; Wed, 09 Jan 2019 16:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=/ZE0qkZUqxgI4JnoiR2IYSBVxq7qTxELnI9TqLZdU2Y=; b=SEU3cD/l7LwiQdrMqY0xwiVIBYsLKKhJzQ0jQqZ3SYhK6b1+rJih9rAPWLpIWbW9QM s6lfKr/XhCmSBTPElE94yMb24QcBF+HZwm+vCZtFZNs5PVTSEHVxJE4+AUvDeLGYqGhM Pk/6aNxdOjH1IeGyVsbdurFHqPhpVe+40+Xvc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=/ZE0qkZUqxgI4JnoiR2IYSBVxq7qTxELnI9TqLZdU2Y=; b=Q8+iqIjTY8V+CRsJ+Db/cFZL7Gv1qkKQOhfixRWblnTB/61jsZjZ62PboCCMx11u11 4STlAmssQsTKYjdvgD0z3qRiKc+aAV6CM00kJgNDZRBuKm2IKyAEuBjv9r14kNkw/s7W /TAbCxFzdjWTRRt79cHl2Xr6JK/5M3XuAIbdYhrhedWh29Kl7ed/7Y3ImClWrucRmsgu jlDJw2hliFJ6EkpFSbh3FZnA0ivqYG/mx3wGdHDy4L9aVeFIdyKSy5sOi19tTTpBschm ZkLoVY9GwedTyb+VnKqseT8iaCvvB1fRBZHlvEYPSrq2HJ9IAl0sq2hbelO9Rpg1Agdq 7Slg== X-Gm-Message-State: AJcUukeeHGUp0Rzchd/44V69rfXdwbBayg5XYzAXLPbXYLdHVQ3Xl2G+ TlLHI+ie9K/tNZHVYcKLJu9gKg== X-Received: by 2002:adf:dfd1:: with SMTP id q17mr7150347wrn.27.1547078506825; Wed, 09 Jan 2019 16:01:46 -0800 (PST) Received: from localhost ([49.248.171.190]) by smtp.gmail.com with ESMTPSA id y13sm5251318wme.2.2019.01.09.16.01.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Jan 2019 16:01:46 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, David Brown , Rob Herring , Mark Rutland , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS) Subject: [PATCH v1 7/7] arm64: dts: sdm845: wireup the thermal trip points to cpufreq Date: Thu, 10 Jan 2019 05:30:56 +0530 Message-Id: <6c5b26e65be18222587724e066fc2e39b9f60397.1547078153.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Since the big and little cpus are in the same frequency domain, use all of them for mitigation in the cooling-map. At the lower trip points we restrict ourselves to throttling only a few OPPs. At higher trip temperatures, allow ourselves to be throttled to any extent. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 145 +++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 29e823b0caf4..cd6402a9aa64 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -13,6 +13,7 @@ #include #include #include +#include / { interrupt-parent = <&intc>; @@ -99,6 +100,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x0>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_0>; L2_0: l2-cache { compatible = "cache"; @@ -114,6 +116,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x100>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_100>; L2_100: l2-cache { compatible = "cache"; @@ -126,6 +129,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x200>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_200>; L2_200: l2-cache { compatible = "cache"; @@ -138,6 +142,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x300>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_300>; L2_300: l2-cache { compatible = "cache"; @@ -150,6 +155,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x400>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_400>; L2_400: l2-cache { compatible = "cache"; @@ -162,6 +168,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x500>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_500>; L2_500: l2-cache { compatible = "cache"; @@ -174,6 +181,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x600>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_600>; L2_600: l2-cache { compatible = "cache"; @@ -186,6 +194,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x700>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_700>; L2_700: l2-cache { compatible = "cache"; @@ -1703,6 +1712,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert0>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT 4>, + <&CPU1 THERMAL_NO_LIMIT 4>, + <&CPU2 THERMAL_NO_LIMIT 4>, + <&CPU3 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit0>; + 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>; + }; + }; }; cpu1-thermal { @@ -1724,6 +1750,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert1>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT 4>, + <&CPU1 THERMAL_NO_LIMIT 4>, + <&CPU2 THERMAL_NO_LIMIT 4>, + <&CPU3 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit1>; + 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>; + }; + }; }; cpu2-thermal { @@ -1745,6 +1788,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert2>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT 4>, + <&CPU1 THERMAL_NO_LIMIT 4>, + <&CPU2 THERMAL_NO_LIMIT 4>, + <&CPU3 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit2>; + 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>; + }; + }; }; cpu3-thermal { @@ -1766,6 +1826,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert3>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT 4>, + <&CPU1 THERMAL_NO_LIMIT 4>, + <&CPU2 THERMAL_NO_LIMIT 4>, + <&CPU3 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit3>; + 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>; + }; + }; }; cpu4-thermal { @@ -1787,6 +1864,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert4>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT 4>, + <&CPU5 THERMAL_NO_LIMIT 4>, + <&CPU6 THERMAL_NO_LIMIT 4>, + <&CPU7 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit4>; + 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>; + }; + }; }; cpu5-thermal { @@ -1808,6 +1902,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert5>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT 4>, + <&CPU5 THERMAL_NO_LIMIT 4>, + <&CPU6 THERMAL_NO_LIMIT 4>, + <&CPU7 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit5>; + 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>; + }; + }; }; cpu6-thermal { @@ -1829,6 +1940,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert6>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT 4>, + <&CPU5 THERMAL_NO_LIMIT 4>, + <&CPU6 THERMAL_NO_LIMIT 4>, + <&CPU7 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit6>; + 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>; + }; + }; }; cpu7-thermal { @@ -1850,6 +1978,23 @@ type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu_alert7>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT 4>, + <&CPU5 THERMAL_NO_LIMIT 4>, + <&CPU6 THERMAL_NO_LIMIT 4>, + <&CPU7 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu_crit7>; + 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>; + }; + }; }; }; };