From patchwork Thu Jun 28 21:09:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 10495267 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 302046022E for ; Thu, 28 Jun 2018 21:10:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AAA82A7F6 for ; Thu, 28 Jun 2018 21:10:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0ECAD2A835; Thu, 28 Jun 2018 21:10:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B0DEB2A82C for ; Thu, 28 Jun 2018 21:10:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=0jab4KssEnh856Nh70qY2aJSyaEsZSmcrqywT4CBczo=; b=BkTUSibDQg6CoQG1tC06kQK6N1 DwSzpsim5OQcx2k7R4flZGgJUHU2HlVahMaKNHgwQ1vGLuUQGSOPJbQwhWt1lVF+ghz+QRLPRUpqO AvfzaaO0BaGaYehl+UBTvy+oKqah/F8W3R1cQiU1DUTNkl6zDv4V2KY+LxBZzHmDgbvfTIMcyiXJa ptccvpJk/QH6WxKLq3htjmsZ30O6Uo/5utrUSru8O/CzQOPl8OoDGrL0v573bnLAVd8BALbz14Ni5 T8LrtCV0cRlTpJYYpLo9V6m8y1uji7/sX5X8iZM2u7+yUk3ZgcGu4HKujLFwuu588pbu0TWRqLIjp nV96320A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fYeBC-0005Ks-FK; Thu, 28 Jun 2018 21:10:14 +0000 Received: from mail-pf0-f195.google.com ([209.85.192.195]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fYeAf-0004ac-QO for linux-arm-kernel@lists.infradead.org; Thu, 28 Jun 2018 21:09:43 +0000 Received: by mail-pf0-f195.google.com with SMTP id j17-v6so3161125pfn.5 for ; Thu, 28 Jun 2018 14:09:31 -0700 (PDT) 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=CKfmZi7JXwI0meuLJKxvvAFnTdfBFv0OAY0IQctqTUI=; b=QPeqXUjoj90MDAlW6Ok+6t9hVVOQVXQywE8fTO7q/S2mteYkEOob35oaj0Z2ZRtcy9 Fct8QYLoBGFd+KErZD630SfmQf+MVPh/EJzkURilNQXPYnLv1fPPKC8DIXJZFDB1DzNB mcAwu2RwmtPtTt20JsfYOths5m1jVQSqA++BrlKKoWdO+kCe189ZL74jFsN5+IABFAMr 8tuKGhyyeaNQJtq27deIbcTl7FJFpdG4IECIOtpa8zipBnl/K4BaFuDNuVgaDjsy0Q5i ILd0vfuBeLT7H/l+an1XmvEQT2GkyaH8WXMfUpkyoTQFDTBBR70FB+Bn8Jan4pKuVSHp Oy2A== X-Gm-Message-State: APt69E2Z5ha4o2rJvy0b9xhmDzQZlN1Hu12pPRl0IfsUfQL7nVJOu3wK llRCzr1IUtPnk7rZ5OMl0gupWw== X-Google-Smtp-Source: ADUXVKITG7oHhEzyewUb4Px7/Er0Sh7lTddorOSTzD7INo1skAGgZKNp9cohQsWGSwcOEQFNNanUwQ== X-Received: by 2002:a63:6b86:: with SMTP id g128-v6mr10336889pgc.344.1530220170685; Thu, 28 Jun 2018 14:09:30 -0700 (PDT) Received: from mka.mtv.corp.google.com ([2620:0:1000:1501:8e2d:4727:1211:622]) by smtp.gmail.com with ESMTPSA id w18-v6sm9006838pgq.1.2018.06.28.14.09.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 14:09:29 -0700 (PDT) From: Matthias Kaehlcke To: Andy Gross , David Brown , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon Subject: [PATCH 3/3] arm64: dts: qcom: pm8998: Add thermal zone Date: Thu, 28 Jun 2018 14:09:15 -0700 Message-Id: <20180628210915.160893-3-mka@chromium.org> X-Mailer: git-send-email 2.18.0.rc2.346.g013aa6912e-goog In-Reply-To: <20180628210915.160893-1-mka@chromium.org> References: <20180628210915.160893-1-mka@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180628_140941_853267_241AD92E X-CRM114-Status: GOOD ( 12.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Collins , Stephen Boyd , linux-arm-msm@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org, Matthias Kaehlcke , linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add pm8998 thermal zone based on the examples in the spmi-temp-alarm bindings. Note: devices with the pm8998 need to have a 'thermal-zones' node (which may be empty) with a label 'thermal_zones'. Signed-off-by: Matthias Kaehlcke --- arch/arm64/boot/dts/qcom/pm8998.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pm8998.dtsi b/arch/arm64/boot/dts/qcom/pm8998.dtsi index f2d39074ed74..d85ceb4f976b 100644 --- a/arch/arm64/boot/dts/qcom/pm8998.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8998.dtsi @@ -3,6 +3,7 @@ #include #include +#include &spmi_bus { pm8998_lsid0: pmic@0 { @@ -59,3 +60,30 @@ #size-cells = <0>; }; }; + +&thermal_zones { + pm8998 { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&pm8998_temp>; + + trips { + passive { + temperature = <1050000>; + hysteresis = <2000>; + type = "passive"; + }; + alert { + temperature = <125000>; + hysteresis = <2000>; + type = "hot"; + }; + crit { + temperature = <145000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; +};