From patchwork Tue Sep 4 05:01:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 145840 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3237159ljw; Mon, 3 Sep 2018 21:59:40 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbhZpEE5pefkrvLzL6m+UB5O8GzjypwoTubT39T3jC+wzWYPulXvn7NRxZEtbkCAgRNHCN2 X-Received: by 2002:a62:642:: with SMTP id 63-v6mr33326418pfg.42.1536037180640; Mon, 03 Sep 2018 21:59:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536037180; cv=none; d=google.com; s=arc-20160816; b=HQ8v/A58AxKgnCxCqgPdVX0lnMMc3b1QCGAbXW7SuImreNIr9Z+Tdt706ERMPH1gj9 fDVUNpFZtaMjewI3nRFskxtObvH/U9LHBcuAQqrMjoZJntjgfmR+6QJT3W0+jEzR8soF VgKZeNISOeRDWsyuUhkSEzB5ThtOCd6vzzWfXZQozHgQTv/lYYovPqjg9142WQfM3Zn8 bC+Ea6PhTBBLvTFv2lDKRa8XCa9dEIGRmP8+ICLIUPYA+jAelULFNqCal/tLemoPtaJl Q4r42J9pr0P4k3M7/DTIeqmPyfX8YE/HxmQhzVSDd8SkhDsZSKVETPKaIPL0k+hicb+S WNRQ== 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:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=RXfkMTSorUd9KkM+kFME4VcK8NMhtBWi9R/RmvM1GYU=; b=0ezXpsy7ZC3oDMIHjc6NbhRkQVXjzVEv/GRuVfT0s1CB6rBbYwwD5texkwgy7LERuj qt2WyBFQcJLxF26ddn4nTgvayt9xvAZxxwB5Rks/CapGq0c+1YrtkcwhxIflktX0Izs0 OqNgYzVpd108Iag6pTRe6IYYERDIVD1zXqEBPN8RrF6U24t0fBpBGHLHXDH0rM8llXJV tcbPhqaUJamAjphnX+TW5oM9gJKTpKGBwxFBxNE7uhaadc0pS6Ww8ST6vhi1Cwo6c2fY 4+92mcjPv6K5i9S0HANSYSsK7IVGcu3NFSFo2sDNZ5iv2Pgv6wMWdAJYc0pb/3YZQX0/ PKuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fUoO9g+h; 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 w135-v6si21662416pff.8.2018.09.03.21.59.40; Mon, 03 Sep 2018 21:59:40 -0700 (PDT) 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=fUoO9g+h; 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 S1727255AbeIDJXA (ORCPT + 6 others); Tue, 4 Sep 2018 05:23:00 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:34630 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727308AbeIDJXA (ORCPT ); Tue, 4 Sep 2018 05:23:00 -0400 Received: by mail-pg1-f196.google.com with SMTP id d19-v6so1045675pgv.1 for ; Mon, 03 Sep 2018 21:59:38 -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; bh=RXfkMTSorUd9KkM+kFME4VcK8NMhtBWi9R/RmvM1GYU=; b=fUoO9g+h60zIENRnRtephm3kzGHePXmSTvlPE9GruP/4Q7SIgS6vK8928lDHAVGtz4 IgQrcnxILjVJBXUWGisb2Oa5wXdlDO3hHyAZhKCEGFV3DqPYTKJO8opScoI8RxVDyO+I /3Y2hhH2oMNNKr9gtGNwLQKH06NdyITVUohhI= 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; bh=RXfkMTSorUd9KkM+kFME4VcK8NMhtBWi9R/RmvM1GYU=; b=qsSShkro0CF2MHfEgYk4mh0DhXVc/Lir9QDIrUhPTxqJMzswM4YNDZlUTzW4+F7ksk OFPEczb+oJJNNhA7xUtdovm4ziaSrzYwQnfwzI/iD4yNyXX088Q4aCrxAFHUYzjMM9KB oM97Vp3xLSX60JYuCFlFBCdg/xYl4UilNia4dYDpe3VWIxFdzS5g+wvbYdMQRTrKWwzb VydAp5iZwPcK/yKhmRWyM1aeWIaJ3zptvNl+HPAUHg9AvAEQOzEWYkkMIPAj36bG+ams J4ub9T0W4BGuEgQQjILZ3FgNm5oYN1MzPhRXZADXlTQZJnyO+8xLEkqNSdu/t65ZhdUy cS8w== X-Gm-Message-State: APzg51AHZUrZD85dSrfIP2dSL5FDi7VkqDsKgkbWFSO1+hdMU6JBTQaf 5nxc35i1c1ic+b+s3UgSe6gMKw== X-Received: by 2002:a63:fd06:: with SMTP id d6-v6mr28995994pgh.348.1536037177685; Mon, 03 Sep 2018 21:59:37 -0700 (PDT) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id v72-v6sm41180378pfj.22.2018.09.03.21.59.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Sep 2018 21:59:37 -0700 (PDT) From: Bjorn Andersson To: Andy Gross , David Brown Cc: Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/8] arm64: dts: qcom: msm8998: Add tsens and thermal-zones Date: Mon, 3 Sep 2018 22:01:18 -0700 Message-Id: <20180904050123.26601-4-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180904050123.26601-1-bjorn.andersson@linaro.org> References: <20180904050123.26601-1-bjorn.andersson@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add the two tsens instances and the thermal zones for CPUs, GPUs, battery and skin sensors. Signed-off-by: Bjorn Andersson --- Changes since v2: - New patch arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 38 +++++ arch/arm64/boot/dts/qcom/msm8998.dtsi | 193 ++++++++++++++++++++++ 2 files changed, 231 insertions(+) -- 2.18.0 diff --git a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi index 09b46c54e413..202aa1a5cf27 100644 --- a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi @@ -12,6 +12,44 @@ stdout-path = "serial0:115200n8"; }; + thermal-zones { + battery-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 0>; + + trips { + battery_crit: trip0 { + temperature = <60000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + skin-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens1 5>; + + trips { + skin_alert: trip0 { + temperature = <44000>; + hysteresis = <2000>; + type = "passive"; + }; + + skip_crit: trip1 { + temperature = <70000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; + vph_pwr: vph-pwr-regulator { compatible = "regulator-fixed"; regulator-name = "vph_pwr"; diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi index 98b9edb89424..f92f04f9ed6d 100644 --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi @@ -225,6 +225,183 @@ }; }; + thermal-zones { + cpu-thermal0 { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 6>; + + trips { + cpu_alert0: trip0 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit0: trip1 { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu-thermal1 { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 7>; + + 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 = <&tsens0 8>; + + 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 = <&tsens0 9>; + + trips { + cpu_alert3: trip0 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit3: trip1 { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu-thermal4 { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 10>; + + trips { + cpu_alert4: trip0 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit4: trip1 { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu-thermal5 { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 11>; + + trips { + cpu_alert5: trip0 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit5: trip1 { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu-thermal6 { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens1 0>; + + trips { + cpu_alert6: trip0 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit6: trip1 { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu-thermal7 { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens1 1>; + + trips { + cpu_alert7: trip0 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit7: trip1 { + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + gpu-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens1 3>; + }; + }; + timer { compatible = "arm,armv8-timer"; interrupts = , @@ -281,6 +458,22 @@ cell-index = <0>; }; + tsens0: thermal@10aa000 { + compatible = "qcom,msm8998-tsens", "qcom,tsens-v2"; + reg = <0x10aa000 0x2000>; + + #qcom,sensors = <12>; + #thermal-sensor-cells = <1>; + }; + + tsens1: thermal@10ad000 { + compatible = "qcom,msm8998-tsens", "qcom,tsens-v2"; + reg = <0x10ad000 0x2000>; + + #qcom,sensors = <8>; + #thermal-sensor-cells = <1>; + }; + apcs_glb: mailbox@9820000 { compatible = "qcom,msm8998-apcs-hmss-global"; reg = <0x17911000 0x1000>;