Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2171426imm; Mon, 3 Sep 2018 22:02:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZE+IvPFKVS1HMoa3CGDUwbXaLU1OIKLcgr6RYt31pgCayvbVUh11q00L5g2OqX0lebNJb0 X-Received: by 2002:aa7:84c2:: with SMTP id x2-v6mr33154269pfn.220.1536037327281; Mon, 03 Sep 2018 22:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536037327; cv=none; d=google.com; s=arc-20160816; b=MDYDK/q/M1pViNEGE7kU7QV0uIiFgloOcL4rAI1Ki7QQoziQKewICfT+tJtgTxzlKq djyg9mTaHWEWo8Ejjtt2CaPuU9hBccZtf3HR2Ev/0Z52MUhWGkuNFKyd4BSp/pf0pTrh egaOoJt3sdj3u6YA05aSO+mgbOS4QoCeRjqm0/VwEQX4k/dkahXqt9p/Ewt4+OnSFZdo 0PaQFxxpJj1l34mLQwJZRrwupNTS1/cUmFDQi8XCpw7I+JZjhNi/XwLtoRpdNTpUEjjX MX4oViC1MPYu8QFOXANrEucu4HkgVkakqP7Xzxo9o5rd+C/6ibnM4njf5U+sdfWdZsmI V4vg== 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=ucLeCZ4iJ0Ys66FA3lmfXAr5Z4/Zz98o56GaLf206xN7dIDZ97bFOvB6Yq1c9UsLZ8 aaysP5dvGtls06yI+G42RYvUCbTJk+GLVHZzA0nQcwAkYryd9pY//wMej1BAPm7KelF2 G6hdioHjU99gjLsDW5nww0hz4vYgHcxCb/WnrlmuJd0iaC4GN24vbNSpA6buo0peaLf2 pbh2SkwnrWXL3Evuw532xknxSnUoUdNuv71hq7nLqOScvTUaxjioHKLvFwiiyE1KhX65 nZ7gU90/avH7DPNk4cInnSawXN+WtR84OEhx2w5rP6wp+cOJAaxQT1qST1HQtCmvE6B5 2FyQ== 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 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 7-v6si18515324pgq.637.2018.09.03.22.01.52; Mon, 03 Sep 2018 22:02:07 -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=fUoO9g+h; 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 S1727623AbeIDJXb (ORCPT + 99 others); Tue, 4 Sep 2018 05:23:31 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:39806 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727368AbeIDJXA (ORCPT ); Tue, 4 Sep 2018 05:23:00 -0400 Received: by mail-pf1-f194.google.com with SMTP id j8-v6so1061151pff.6 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=amd0eawlj07SsF1PW6n/K7/voPrJ0+K727y5yE8humByErhJg+TIU1X6OpPkf+Kn/s mtNos6NWLLWBpKhZN0x/fSbjCwMFNgkEFf5LH2rSWKjT8iBZmmOQMNVBSy5Dil0iEzuK jFlheGEXScy0TRwIJH/j7Q0FbcthisR5Jx6Eys6jUvzsAp22t/xIjVx5g1O2WwnAoXt+ +v71mWY1NpFP/59tOii9xDbJwasGDCaRv1yxzl/j7Q7sHhc/e+P4h0VVy/dk5IuQ1jo8 sAvHdaYzCajyj4jHae0xFKYN9ar8402N3kfoHoxslETRVm8ouZZPyPOTPiYAOPi09Dqo J7eA== X-Gm-Message-State: APzg51AH1VM2l1BYBuDtg0Cm93yB4m67eCsxUEoQDGEi6ArfCrqaTx1R xPcPeLY0QRwvKjrYZaaJzRZp9w== 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) 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>; -- 2.18.0