Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp570495img; Thu, 28 Feb 2019 04:29:51 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ8pf2hEVEr8pdgT6+JYNAjtGvCP0uG6RueZ9VcIPAAbP5innBM3U76X++pasNnD4ov3Otr X-Received: by 2002:a63:5f0f:: with SMTP id t15mr8259595pgb.272.1551356991336; Thu, 28 Feb 2019 04:29:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551356991; cv=none; d=google.com; s=arc-20160816; b=qxRfRl9LlhmQiRndg+r65B8kEkQNEpto2M0nf6Cml4hvB2DjSlYZGo0/hsm9hsGMDI aTQg9I2WjBPiQsmdMgUrtqDD2xk3sJROaTDI4rYtRKPdCuOO15xVBFE8zTCnjt8Aj5VD WS7EeE4pvPsUW7+KkbN1/eiljOKwSA+uE7D1lScTa38iMN5eCKnq3N9C1ORBtZgu0tN1 +qE6Xi/hnEDdIY8SuXLeor60/NR6oS9chqjX4W6p9FNpW3DcJuj8ypiJk274C+h2Ns/S n1Hc7W4aoxx4ASpKRAOb5/BmFCwA5y2zsql6TujuYW0UM1QU4S9tNDJX+sOCiUISlV3o Zywg== 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=C9KTcipBBMH7iKIKkQeECQsP2OoeAr07E1QgLTBcEng=; b=lL4D87zGnGJh2RORr/41fkI+nKF1PcXW51WVueW7uvXjWOWDF/Ww17IHYjyqm/Is94 FRNuM01F+a8Mk1EKKIkpBSJBU5G8JJ8x5cPmBRl6bzhPTvuH5bddXyyz06+zH9GxJAFu qWSWm/9K7ncJLRvNcujo9uvIFYazrUIn6DuqAn5/Sk8f02ycpGuDkT/ZP9tq37SyvgEp JLVrkQiJmQElUpSzcLHQ9Esa57DvttXhF1yf8B1skQiC4xjgtXwpQ4+PSynwLzyAhcDS ag86UchvsoYHZUb15Vag6dlm4sTlXMwQyQD2vs1mBPMDPcKB8HfsEdnIX17y4y+XrELY hlDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U4rNZOWP; 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 q19si16874259pgi.554.2019.02.28.04.29.35; Thu, 28 Feb 2019 04:29:51 -0800 (PST) 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=U4rNZOWP; 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 S1732379AbfB1M2U (ORCPT + 99 others); Thu, 28 Feb 2019 07:28:20 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:52864 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732069AbfB1M2T (ORCPT ); Thu, 28 Feb 2019 07:28:19 -0500 Received: by mail-wm1-f66.google.com with SMTP id m1so9088478wml.2 for ; Thu, 28 Feb 2019 04:28:17 -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=C9KTcipBBMH7iKIKkQeECQsP2OoeAr07E1QgLTBcEng=; b=U4rNZOWPYk3JdSh5EfKt+17n3fALS6FunIpr9HvS0GEuvgK28pPMANAdGYJWJWGOKy Q0b8lh9LFQrjIfGUNvrzsu/gaoJOanYgVGFJGNIUINuX1faSy3a4p2htrMnHxNxmtONK efQEjt6GRZWJLTqSRHHs528gzI/0m9aQDhdPT+jDKoNW7ST+yc0oGYrYfLdFlHOiR/xK vMqoyJJxIT44R+gBVmyI/fNo8Vx3DTjdUns3q/8VohR6MpG672FCGT0leSYMGIgVuc8k nWVLuCJoNDCoW7e5+3Ed8LSfTM5JTxzJme87HELZZ5BAOa8YNnZlXbWb10zcrfpLT+O1 rllA== 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=C9KTcipBBMH7iKIKkQeECQsP2OoeAr07E1QgLTBcEng=; b=VI7seJEMTfWNIO68vrg10vNWIWCcVdtsHIQAKqSxBkPieDgZzR9yC1h6j94B0qb2B5 mrx1UFNRelw/rl4MmEJ38HBQMj7KCKbL4qj6lEmGb0pDJBxFWhfPvMsKgsjKVygk8FDm JtB/5v6k//dJMEkd7iq5+Fam/jiR4T7Db0bxHFlzVfwK82geHMv9CmM14HfPp7QfN28K nOQPmbTzowpAp07jWqPRQLO6N6vlPg7FXsnk+aUSkw1y7w0R/BgoY+FqQpjj84UznlU8 a6MKS5Xg5BPwLaFYYmSwc4SAJN5k6IdRQBfUM+K196QpYFghvKnTeAltFhrx6G1fLejw EXrw== X-Gm-Message-State: APjAAAVO+1WZf5vRpTnxE9M5+TEbH4ayh3R3JQmugvVVwZDdKuPDTabG IroQx7jnLUR1B/TCJNOf8sfMon4xSs0= X-Received: by 2002:a1c:7d8c:: with SMTP id y134mr2914817wmc.102.1551356896073; Thu, 28 Feb 2019 04:28:16 -0800 (PST) Received: from localhost ([49.248.54.130]) by smtp.gmail.com with ESMTPSA id i16sm15119244wru.16.2019.02.28.04.28.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Feb 2019 04:28:15 -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 v2 23/24] arm64: dts: qcom: qcs404: Add thermal zones for each sensor Date: Thu, 28 Feb 2019 17:51:13 +0530 Message-Id: <63c4711ea258c557158ef9dd551a1b4eae4038da.1551355503.git.amit.kucheria@linaro.org> 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(+) diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index 57d14d8f0c90..8b3ac5f7f2a3 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,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 = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + aoss_crit: aoss_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + q6-hvx-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 1>; + + trips { + dsp_alert0: trip-point@0 { + temperature = <95000>; + hysteresis = <2000>; + type = "hot"; + }; + 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 = "hot"; + }; + 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 = "hot"; + }; + 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"; + }; + }; + cooling-maps { + map0 { + trip = <&cluster_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>; + }; + }; + }; + + 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 = "hot"; + }; + gpu_crit: gpu_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; }; -- 2.17.1