From patchwork Thu Feb 7 10:49:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 157742 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp611133jaa; Thu, 7 Feb 2019 04:57:37 -0800 (PST) X-Google-Smtp-Source: AHgI3IZsTWEBApWu8ae9AMJxxhzKWQIfJZtoQWFK+NfosWu5tIN/No8dysGQ+csLETjjxkuK8C8S X-Received: by 2002:a17:902:780a:: with SMTP id p10mr16680003pll.54.1549544257146; Thu, 07 Feb 2019 04:57:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549544257; cv=none; d=google.com; s=arc-20160816; b=TIwEMLSlNkcHhZXHblR7pNj4oLBHra+V03LV3qrhPL6Fd/aKkNv20y/wepCbQVaPcF 7UH8mgoDdJyLvjniDACL5mgvBRk0JkcCG0XI9A/kQ9/Rhi6QsLh5sNxPjRUpRj0u3iPU wCt78J9ziCISr2IeVcSO0nJdYhqbUoNFMm2XOHuYDfXi5TDojFNeOkwPueOYXJ+prkdE wZcektxlshRRaBPEHGR8IWgJHwx3frjXI5W3ngrAiAH4kQ+fUS+D1ZJjwVJt+C8CBM+W fl0sg7zoL4PR5qOl/aV/6gVqloDeNzVIs4qIxsjGRB/Kz4J8RSq6ObXgQeV27pH4rgF2 rgvA== 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=Fou3CPiZQH37wEY0owlz3oeUwIAQBrD/AvLRkXzz/b4=; b=TAeonlqpFIJH7oKmboBvpVefGUfDxLmYxzSAZwtP0Y4dwxUXxrMsX83aScOuaRP0Qs MzTBRdiPMkdka4G3KGCFIxreLhpt4wgzRGhoxunVjqi7XEwdmsUZieh68PR+kI922VsT eF938cs2GSs56evywdO0NVopWqrAM2ttdWt0w45MPkBoREp6+rFDPpUr06gqtQjtJ98W 8H1vL7xJcfcwi8qFXIBAqUbmp8BIGhJd6S/84gFG9SJNgJ2jYhdybNtH8hiBFfm174Vy D3pWQXnNIi5HG81Ms3rw/tNqN8q6QoPoHURUX2QCj2TSRkxHvdfoCGX0ancerMnXqzAJ DvvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DYOzexD4; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 k12si8269176pgg.382.2019.02.07.04.57.36; Thu, 07 Feb 2019 04:57:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=DYOzexD4; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1727478AbfBGM5g (ORCPT + 7 others); Thu, 7 Feb 2019 07:57:36 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:36932 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727447AbfBGM5g (ORCPT ); Thu, 7 Feb 2019 07:57:36 -0500 Received: by mail-pl1-f196.google.com with SMTP id b5so4743356plr.4 for ; Thu, 07 Feb 2019 04:57:35 -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=Fou3CPiZQH37wEY0owlz3oeUwIAQBrD/AvLRkXzz/b4=; b=DYOzexD4Un1um32ePdAVVy8EvB+v1lY1Ry4EmjEKf7yUUx5gkCd20+1skPYBObDsS4 9RAdNooGDnXnPf0robatUQVZH/ZExDiPZzN2thJSDIB2D0GXGjF5XEnXCN9a5FIFVnQr Z8kLbTuGh9rnDYSv8NFzypk9YzZev4Vjt0Pj2at9ud+OOlMDJfsT2gsS+cUVsC/X++OT 5hNUD7eZV2R1d6EepnX2AjiDUzwbT17woP9UTRb5Cwj+tU6U7ndNHdrh/btS47nJ4iBm 7tsCHajfX8cuJ7CGVfFYLJL4VB8FriCUWkYLZIyDwtngDmsUeCIze1jrj09od02TmiGH k3NA== 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=Fou3CPiZQH37wEY0owlz3oeUwIAQBrD/AvLRkXzz/b4=; b=OReiVbO+eI65rQBhMUZ39kWeh3BwQnURLjl+xYhyI+qK7RmgxKoIpaqWPuMrB66/fo ESI+VizJnvtz+yP0rDeOZG4iY0WADeVnZGM3mxHk+43wD+Ilma8wGPwDoUQIl32o8r+Z Sw0ATNMrnN38S32MIfDckVajYCSc16Fdcr3WKApJmFJmdAmY1zVnTYexVcbRwILHjQxl xEDq9Q1NG+zlBwp29+cEUGhCl5rSjHYuI4vcQxdSfR50j0WHTrvRo9TtHoa3p6j9C6Q2 ZVymOzx4McOzVAVPdObrfY40GfXpwElUXcymbTqtsO2S1/LITeWtZyg5Qrjp/LYYz0bE JoNw== X-Gm-Message-State: AHQUAub+TqcYO1iYBKFBu78BVPY8ejmUXwDm1u309+6juaqPdOJ9sd5K n3YIggSvztUojcCVHI+/HUxF0Q== X-Received: by 2002:a17:902:c85:: with SMTP id 5mr16496678plt.339.1549544255522; Thu, 07 Feb 2019 04:57:35 -0800 (PST) Received: from localhost ([2402:3a80:c80:4138:75dd:3900:1d90:762f]) by smtp.gmail.com with ESMTPSA id z15sm13439148pgc.77.2019.02.07.04.57.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Feb 2019 04:57:35 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, Daniel Lezcano , David Brown , Zhang Rui Cc: devicetree@vger.kernel.org Subject: [PATCH v1 23/24] arm64: dts: qcom: qcs404: Add thermal zones for each sensor Date: Thu, 7 Feb 2019 16:19:41 +0530 Message-Id: <42fd6c63c58db82088924c70d016e03a2b6fa9fe.1549525708.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org qcs404 has 10 sensors connected to the single TSENS IP. Define a thermal zone for each of those sensors to expose the temperature of each zone. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 243 +++++++++++++++++++++++++++ 1 file changed, 243 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index 57d14d8f0c90..ca99c45864df 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -3,6 +3,7 @@ #include #include +#include / { interrupt-parent = <&intc>; @@ -30,6 +31,7 @@ reg = <0x100>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; CPU1: cpu@101 { @@ -38,6 +40,7 @@ reg = <0x101>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; CPU2: cpu@102 { @@ -46,6 +49,7 @@ reg = <0x102>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; CPU3: cpu@103 { @@ -54,6 +58,7 @@ reg = <0x103>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; L2_0: l2-cache { @@ -507,4 +512,242 @@ #interrupt-cells = <2>; }; }; + + thermal-zones { + aoss-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 0>; + + trips { + aoss_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + aoss_crit: aoss_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + dsp-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 1>; + + trips { + dsp_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + dsp_crit: dsp_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + lpass-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 2>; + + trips { + lpass_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + lpass_crit: lpass_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + wlan-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 3>; + + trips { + wlan_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + wlan_crit: wlan_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cluster-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 4>; + + trips { + cluster_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + cluster_crit: cluster_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu0-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 5>; + + trips { + cpu0_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu0_crit: cpu_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + cooling-maps { + map0 { + trip = <&cpu0_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>; + }; + }; + }; + + cpu1-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 6>; + + trips { + cpu1_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu1_crit: cpu_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + cooling-maps { + map0 { + trip = <&cpu1_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>; + }; + }; + }; + + cpu2-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 7>; + + trips { + cpu2_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu2_crit: cpu_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + cooling-maps { + map0 { + trip = <&cpu2_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>; + }; + }; + }; + + cpu3-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 8>; + + trips { + cpu3_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu3_crit: cpu_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + cooling-maps { + map0 { + trip = <&cpu3_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>; + }; + }; + }; + + gpu-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 9>; + + trips { + gpu_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + gpu_crit: gpu_crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; };