Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp318793imj; Thu, 7 Feb 2019 04:58:35 -0800 (PST) X-Google-Smtp-Source: AHgI3IaQuO+JBOHRSPPj3RD4C7sNEx1yx3O3FqK1/+nnFbKMw1u4iPP10+pRzMe2gfq3Nt+0EdL0 X-Received: by 2002:a17:902:9b87:: with SMTP id y7mr16431153plp.336.1549544315258; Thu, 07 Feb 2019 04:58:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549544315; cv=none; d=google.com; s=arc-20160816; b=fliHR127kJ27taTkuQ3gzS49osMuLp5XLnnCz/6LffuuR2tL4XA0MDkEUoc9+sztGx whXJivl4gZd9MROX7JMj2BN1F5uyYZbTBrOSm1BcIl/uI6pCIDhEOGwLnwzcHoSfDHyx dd+4BFvyHRQECINTLuOXaDs+rNBM4Jbdpi6DZideCvxhtSS8rz/iNbXJ3xpKsSX4FElZ Xxfpw9MHmve5BuKs780jqhKv5LEScWSo5SSi39DO1i1M03WaJ1q6rBK/hCw0/a2fckxG 9tQWSGFdrcqlAYEYCXm51kSjeqpG+OAwrO6mvwfvlgPxpXF8uJISuQAeTtMorRqv44Dw na5A== 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=sDPPm/waEecEug86icmX/cxa7OFehXQnephagfmF37+pOO2+nGzHkj3cOe2qNtfdwp R4oRAM8Pl8D0XzLMSmISCQr4v1l3SBL2C0hc8Y2G6WWsivyhQYI40fdLbW+vupc428Ii R0J6CABOLllNQJFT9PzvY+wiU6VHXQ715mCofutC68WQGGLkf5dqG3PnXUuxdc/AgdGy 4+ebbrXCwosCz8wyxR4123XwIL2VPSNbcFh1WlBrhztZXSiOHQVLMiHOL4S2gVQvRIpx nv5WzjTlp2qIQVtrza8WIEYzJ1jTgvFf4pKYvvM9WarFmgfNN/N+rOrkeOP/EBFEXQo0 xcow== 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 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 c131si8724937pga.358.2019.02.07.04.58.19; Thu, 07 Feb 2019 04:58:35 -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=DYOzexD4; 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 S1727489AbfBGM5h (ORCPT + 99 others); Thu, 7 Feb 2019 07:57:37 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:41124 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727475AbfBGM5g (ORCPT ); Thu, 7 Feb 2019 07:57:36 -0500 Received: by mail-pl1-f193.google.com with SMTP id k15so4738410pls.8 for ; Thu, 07 Feb 2019 04:57:36 -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=c92vEW0vTzRgvnaQJ/9Jh+9otbK71R8PATLJ0gw9KoJ1bMV6Sj6KhfEwWx+wg/IBk3 g/rmDpLgBJWgTfcbDso4Oi0iXvdrWHBCIUXjmgc6ASYn95rHnv6HVbJju9HQADMzAhLG iaUIT1ThOHK7E/xjV1C9fF7Ln4KQBUgz4MtOLOSsZvwY2WA/rWaWO67vSjawktnJRC/l rgJRLBbJ0wsKGXdG8KBOcSVnFY+GNgZz5OYLHwNeILFkYYrM3ASrW6Nliu5YcYJa0+SK YY8AbxKQ09B0pNhEsjZjTPFmu/wSWjIF7LH4bbrr+JwGwnn7rVrpaHLxQV/van2aGPS5 RC6w== X-Gm-Message-State: AHQUAubxfKStoEtTTeLybKtuzASXWKHdsDq2arE8D+CFpl8cxkiY8y3x AAZ3X//YlopHkQlhBSqGSEKfnlm/BFg= 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: 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 | 243 +++++++++++++++++++++++++++ 1 file changed, 243 insertions(+) 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"; + }; + }; + }; + }; }; -- 2.17.1