From patchwork Wed Mar 20 13:18:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 160689 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp283489jan; Wed, 20 Mar 2019 06:20:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPysLTHrxQJ2e79FskKgwdkg7AXC/qTxj0J5R9ZXY0HWFxRyBPcJmS/wR++/0ZOntHlnZB X-Received: by 2002:a17:902:9a43:: with SMTP id x3mr8418952plv.173.1553088003417; Wed, 20 Mar 2019 06:20:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553088003; cv=none; d=google.com; s=arc-20160816; b=M4A8xeSPj9wL2hxZDs6T7dU/rAPxPc3fVcPYHRlPT1iC5X2LkgWxTYVDV7x7MbnsqI rpK8PlZvvVLL1JEbwBz7amADQrcP3u3ZKa/AtcFFAgRi/1UskdaOEupLN1u52qxFMhTd GQcQtbWtA4uUUooWZfUsOJMwrcrycaayKmscfS7O4fTnj3mR0JiI8eLjEBJevS1FBZFu cCabyvjqepvsQC7fzVCWdDSzKV9k9MJ/GkCXI+jqghw7N+Bajoqyi0J9WeHt37F4MkEE S3fExQDuAUVAxlrGcXJB8tnt060XOEvZnXjkMgF7RpZLIGeXoH6KwPk1ononur8Lcfip WVtw== 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=dPQlQtT/j9T5YpFHSehlrM49UmBNUmuq32Pii701NPg=; b=yKLI3mEhHCbBGAiNcnzSXS2g6FX6vWHpPRWukIe34EnmxOTfpNZLCouqDvX+sHnPup YiNTmvSmnn1igEr7U7892bnzWtl2FRwMo8OrLtI71INOJMoENJ4Qg6mcQgjiMG3fBeAw LPXj67kn4ImpKOOISI8XIbqJrs8z9MO8cDTetqtDEwAfzy8vcCWKm7nwSaDTXUjEsyTx jZcBtFpHuQ3gGJxZr6mzA03xW2a1mCJ8AMRNWIjjINA/7BCkYcsHca10sisM+AJYJ5bo G6OaQI6fzigaPuNBiyKhtF1vriDom8fnSJyE7i9CwfyvlaEUi047b9Dubna75WBBXlaT OoiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QLZYDg58; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 38si1709949pgn.121.2019.03.20.06.20.03; Wed, 20 Mar 2019 06:20:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=QLZYDg58; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1728401AbfCTNUC (ORCPT + 31 others); Wed, 20 Mar 2019 09:20:02 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:46877 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728389AbfCTNUA (ORCPT ); Wed, 20 Mar 2019 09:20:00 -0400 Received: by mail-pg1-f193.google.com with SMTP id a22so1768596pgg.13 for ; Wed, 20 Mar 2019 06:19:59 -0700 (PDT) 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=dPQlQtT/j9T5YpFHSehlrM49UmBNUmuq32Pii701NPg=; b=QLZYDg58UjHZ0TEs7Ha3AABd3N5NZGf9nxLdbW+xX7DM/B31QBg2gLWmhJX7JImtCg NGKsnoGoRWj6pk2Li4qxQzy4K8jeg+OsMXQ2On3oBHnf89lWk0iHauEWWMZAavukXJKq 5aJUd1DSm2x4MKvo8VSWiWaCelcnMOGN4BAWi5t16PlJs0iTE4kFetNBmrXBax5BF9l2 Uw0i56inAvVi/Xs4Shj54ej2DR02OjXiS6DsDUm/R8Ln3+qQmyehwaRg0EzF2zlRXWw5 bwKeL9U7xNtZMxzd13TwYhTXWf1aIG1dflZayIndJxcmfoNpQQKCo4WJ37jIqEWbxlhR zBtw== 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=dPQlQtT/j9T5YpFHSehlrM49UmBNUmuq32Pii701NPg=; b=bV5Z7aikv6j7HDSVUtOfkgQwbnhwnFxQT6D9P4X7eSvGyNc5KhsCs2VV1HwSUakbs+ R8nvuASVXxCbgKAye0um4Isd62NiNZDXIWqXLGDx8peDISgxBireWmsJS2istz4M535z 7BMQ7AAhLY82sFv4fg2PzE5Wh81waC7cMq0isxDq85lQsqYtZW1S08KB5rJi0pNDGM3R Q0EbWLgfCN3L6d2tUvgiz7r7A1/lcCyQL971dnNlp+J950CB14UC6ZudsnBH8pbA1Qi7 LZglnAjxgO2PFZlli+SeCNxV6f/TPLnqBoB03lF+Noa4mgowjDrw9OaMO8Aoj/QBfidR ia1Q== X-Gm-Message-State: APjAAAXy4njZ03SDJxLDeXi34JYSV5bz8crwbrQCaWSgnAR+ZuU7xuWP ufbsCJ9uj1sDwMFoXyqt73hIIYiWILU= X-Received: by 2002:a17:902:266:: with SMTP id 93mr8087338plc.161.1553087999258; Wed, 20 Mar 2019 06:19:59 -0700 (PDT) Received: from localhost ([114.143.122.221]) by smtp.gmail.com with ESMTPSA id k72sm6012896pfb.122.2019.03.20.06.19.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Mar 2019 06:19:58 -0700 (PDT) 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: [PATCHv3 22/23] arm64: dts: qcom: qcs404: Add thermal zones for each sensor Date: Wed, 20 Mar 2019 18:48:02 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 | 252 +++++++++++++++++++++++++++ 1 file changed, 252 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index 7881792980b8..2423c816b98d 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -4,6 +4,7 @@ #include #include #include +#include / { interrupt-parent = <&intc>; @@ -31,6 +32,7 @@ reg = <0x100>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; CPU1: cpu@101 { @@ -39,6 +41,7 @@ reg = <0x101>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; CPU2: cpu@102 { @@ -47,6 +50,7 @@ reg = <0x102>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; CPU3: cpu@103 { @@ -55,6 +59,7 @@ reg = <0x103>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; L2_0: l2-cache { @@ -866,4 +871,251 @@ #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 = <105000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + q6-hvx-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 1>; + + trips { + q6_hvx_alert0: trip-point@0 { + temperature = <105000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + lpass-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 2>; + + trips { + lpass_alert0: trip-point@0 { + temperature = <105000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + wlan-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 3>; + + trips { + wlan_alert0: trip-point@0 { + temperature = <105000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + + cluster-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 4>; + + trips { + cluster_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + cluster_alert1: trip-point@1 { + temperature = <105000>; + hysteresis = <2000>; + type = "passive"; + }; + cluster_crit: cluster_crit { + temperature = <120000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + cooling-maps { + map0 { + trip = <&cluster_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>; + }; + }; + }; + + cpu0-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 5>; + + trips { + cpu0_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + cpu0_alert1: trip-point@1 { + temperature = <105000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu0_crit: cpu_crit { + temperature = <120000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + cooling-maps { + map0 { + trip = <&cpu0_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>; + }; + }; + }; + + cpu1-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 6>; + + trips { + cpu1_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + cpu1_alert1: trip-point@1 { + temperature = <105000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu1_crit: cpu_crit { + temperature = <120000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + cooling-maps { + map0 { + trip = <&cpu1_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>; + }; + }; + }; + + cpu2-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 7>; + + trips { + cpu2_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + cpu2_alert1: trip-point@1 { + temperature = <105000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu2_crit: cpu_crit { + temperature = <120000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + cooling-maps { + map0 { + trip = <&cpu2_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>; + }; + }; + }; + + cpu3-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 8>; + + trips { + cpu3_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + cpu3_alert1: trip-point@1 { + temperature = <105000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu3_crit: cpu_crit { + temperature = <120000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + cooling-maps { + map0 { + trip = <&cpu3_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>; + }; + }; + }; + + gpu-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 9>; + + trips { + gpu_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + }; + }; + }; };