From patchwork Mon Nov 19 12:25:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 151486 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2598535ljp; Mon, 19 Nov 2018 04:26:17 -0800 (PST) X-Google-Smtp-Source: AJdET5d7smrSKDWlCIKC+CUCdLe8ppgjtueG+FueZQrJcEIurt+Zg5FM3NxXo3+MjT6kfalVM3po X-Received: by 2002:a63:a41:: with SMTP id z1mr19871924pgk.117.1542630376997; Mon, 19 Nov 2018 04:26:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542630376; cv=none; d=google.com; s=arc-20160816; b=ZOaERxWo3YNE6fnPx+0/WS6Wca9jmvRxFUthF2VRELtncp6BQs1MrqAnzLtaeO2gEl 23RJXoLwCcXAe8v3HFZLc40xnxhkkL+BEPTKOspHPyFXDku1TjgHACrkNzpGBZcIItgu ePKno8G5ODMh3wvljkJWEUUHcTh8abjaGn8iKOSjQ46fjEzTOYN47VpmbN9m4fkSPYXr 4ovJv5fbDI8WFX2SsvqLhHNXSJ4Eu+/M/q9YMzs8CkcRwO2VhWi94+2He/KCVAkAQRep QW7gIM0iJluo/DEgVUnWEeS90ybGidYKv//f/87eMfqYPo+qNBTxUTWYlWFUFlVHr/Do A3jQ== 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=RWlU1LSwFAx6oov/bJmjYlsstO2SymtzOQNbuVyVIRA=; b=qpcobA3rGJsmySXUCezz51GhLQUQUmlWg+4osswsiSWvJwOdcBa4IwDciPc90bwUF0 wW5ioEvu04vEXWl5tHiyzriOXfSiUMRNEEbtQY8QcQ6d0lpP04DK/8dxl/srcLm/93ZL JNYdSOkqaghmqQZ31BOX4yrFbRECFQ3HJPE+0DVUS24rMkDQ43EDG4l9icpo1RH/JaJR yZNjSve4zs9S/jezEd/u6BTOoJN8tDOwNPfJmZ0UvY8GKe8+av08z/06ivj2iL6bFK1+ jrhPK7jO85r+XfbZoXouusclllsdnLogK5YXy2jirV6nzfgckOwoehGv0Cj5uVShnlOh Lw5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WKSXXSG+; 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 cb1si17532949plb.37.2018.11.19.04.26.16; Mon, 19 Nov 2018 04:26:16 -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=WKSXXSG+; 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 S1728877AbeKSWto (ORCPT + 15 others); Mon, 19 Nov 2018 17:49:44 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:52028 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728829AbeKSWto (ORCPT ); Mon, 19 Nov 2018 17:49:44 -0500 Received: by mail-wm1-f67.google.com with SMTP id w7-v6so5116360wmc.1 for ; Mon, 19 Nov 2018 04:26:14 -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=RWlU1LSwFAx6oov/bJmjYlsstO2SymtzOQNbuVyVIRA=; b=WKSXXSG+em8s0+pLK1Y9+pBR6bqDlIlElS09l0Y8J67kJa55X0C6kUKW/3mLQJeIy9 52tbFT5/+fzxq/xerKyo3KLt2EvBMmFc3wKfuCz9VjL1KBIRT5lrtsvRznITCWchcHTE u81HPdUeNo6LKBfm6FvzAEc1amCjIQr9jU8G0= 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=RWlU1LSwFAx6oov/bJmjYlsstO2SymtzOQNbuVyVIRA=; b=AFtvZLSmpjpl52kcCOyt1+uESSqJs2cd1GduDJ8GrFxgarqj8cLhojymuLVr57LMOn fYn2zY6mjUh8cUfJQribnU/BOS4zRqSIfdUTfiTvx+GpcFIdkA7exhaXCeEtuTWUdCu3 YZh/ko6C6rHQEgfAMW2JnLe3C0GLpl+S1f2sdqonI0VNUwvzIvjYNlRnVzanjUF8vn6g M8V++hEPIcoLa8EpWznZymzzhvkzc0iebe1Yu1htUwMlv8yzJ7PWKRmQRxDVTEpvdtKt ad8tA1IoYFf1gwM5VHjkGauUF6mq8AIekaJRi70OE+0C24PxbkSAguKPHZwyhSVNcWis 2H1Q== X-Gm-Message-State: AGRZ1gKMKvGd2ZsgqvlmRTzZaMn5QHmgjicO4HOWBEUMtqtFMejo3Vzy zTm4yD/yWYyhu6Jkcw0PXoo2GQ== X-Received: by 2002:a1c:7d54:: with SMTP id y81mr6913645wmc.106.1542630373963; Mon, 19 Nov 2018 04:26:13 -0800 (PST) Received: from localhost ([49.248.195.80]) by smtp.gmail.com with ESMTPSA id a18-v6sm35058384wrt.79.2018.11.19.04.26.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Nov 2018 04:26:13 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, vkoul@kernel.org, David Brown , Rob Herring , Mark Rutland Subject: [PATCH v2 4/4] arm64: dts: qcom: qcs404: Add thermal zones for each sensor Date: Mon, 19 Nov 2018 17:55:22 +0530 Message-Id: <4c95177d5454421fb789cb67da94181af2a0370d.1542629810.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 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 Reviewed-by: Vinod Koul Tested-by: Vinod Koul --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 206 +++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index 57d14d8f0c901..cbc3fd3788938 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -30,6 +30,7 @@ reg = <0x100>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; CPU1: cpu@101 { @@ -38,6 +39,7 @@ reg = <0x101>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; CPU2: cpu@102 { @@ -46,6 +48,7 @@ reg = <0x102>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; CPU3: cpu@103 { @@ -54,6 +57,7 @@ reg = <0x103>; enable-method = "psci"; next-level-cache = <&L2_0>; + #cooling-cells= <2>; }; L2_0: l2-cache { @@ -507,4 +511,206 @@ #interrupt-cells = <2>; }; }; + + thermal-zones { + aoss-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 0>; + + trips { + aoss_alert: trip0 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + aoss_crit: trip1 { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + dsp-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 1>; + + trips { + dsp_alert: trip0 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + dsp_crit: trip1 { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + lpass-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 2>; + + trips { + lpass_alert: trip0 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + lpass_crit: trip1 { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + wlan-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 3>; + + trips { + wlan_alert: trip0 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + wlan_crit: trip1 { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cluster-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 4>; + + trips { + cluster_alert: cluster_alert { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + cluster_crit: cluster_crit { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu-thermal0 { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 5>; + + trips { + cpu_alert0: cpu_alert0 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu_crit0: cpu_crit0 { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu-thermal1 { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 6>; + + trips { + cpu_alert1: trip0 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu_crit1: trip1 { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu-thermal2 { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 7>; + + trips { + cpu_alert2: trip0 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu_crit2: trip1 { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu-thermal3 { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 8>; + + trips { + cpu_alert3: trip0 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu_crit3: trip1 { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + gpu-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens 9>; + + trips { + gpu_alert: trip0 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + gpu_crit: trip1 { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; };