From patchwork Thu Jun 3 15:12:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 454310 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D2ECC47097 for ; Thu, 3 Jun 2021 15:12:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F1043613AC for ; Thu, 3 Jun 2021 15:12:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231827AbhFCPOf (ORCPT ); Thu, 3 Jun 2021 11:14:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231639AbhFCPOe (ORCPT ); Thu, 3 Jun 2021 11:14:34 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38505C06174A for ; Thu, 3 Jun 2021 08:12:41 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id u18so5079055pfk.11 for ; Thu, 03 Jun 2021 08:12:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SOz7E89GO3Tlt1UETlglRkdF1+fg4j4ELIuMgr0ZBk8=; b=DioCg1gEzdC+P2iIV7lBStmKSH55GVSy3MLea9WvF2E88cXD21eBObuZ/qfR0TZRfr 8c1HR+/lmhgpqzX1ruzsPtSW/6n+4fXI+dJiGmNSV2KQSpU+Bohp1ouHJ6m3d8GhIuom QlYDnSDRR35guvbkLtNwit1BoWqDvTQmrQ1p8= 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:mime-version :content-transfer-encoding; bh=SOz7E89GO3Tlt1UETlglRkdF1+fg4j4ELIuMgr0ZBk8=; b=jXggqSJU6CrquErW5mSJAapq0ppno10XgDS3kE6cbIQjbIEr9nCgWjikAYB7Q9sJip aE2Y9vbyU2kJQ0jGyt/ZhE1acmMprwKtp0yGJsZHmZXNNUrZDN82pq+iAKoobfo3g7cY Yk/Zqvevn4UGw2KH5DUAcGgjq5CAspWnRmdmNLqgxs4JMLR63NvFaK60q5czlantMJo6 1LYK8k0aXyFEs0ZSdkei0Z9iqptKiazyaRXu23Ee90opMMOjd3BHfd1xIYpCetdCwRZW d4sV2UJ3m6aomu6reINwShj0q2Bx6nrr/1b1aGXMOXeSTdysdeTmhxLar4LELgRZm4hx fH7Q== X-Gm-Message-State: AOAM5318mIHzqTrOX93WjB5KCP7UIKkhW3gT7ukothpyN28aMviOuk63 2NYBKkDz20U2xwqFD7/SKPekew== X-Google-Smtp-Source: ABdhPJyRIxzMB1dJJuGzR1hBSkiU18tcbJAKhuTSAqWm14EGEUPmzHPxxVPOf7TGbNbVrE6swQxSoQ== X-Received: by 2002:a05:6a00:856:b029:28e:e5d2:9a62 with SMTP id q22-20020a056a000856b029028ee5d29a62mr234677pfk.17.1622733160794; Thu, 03 Jun 2021 08:12:40 -0700 (PDT) Received: from localhost ([2620:15c:202:201:d737:2805:1403:7c09]) by smtp.gmail.com with UTF8SMTPSA id r10sm3190416pga.48.2021.06.03.08.12.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Jun 2021 08:12:40 -0700 (PDT) From: Matthias Kaehlcke To: Andy Gross , Bjorn Andersson , Rob Herring Cc: Douglas Anderson , devicetree@vger.kernel.org, Stephen Boyd , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Matthias Kaehlcke Subject: [PATCH v2] arm64: dts: qcom: pm6150: Add thermal zone for PMIC on-die temperature Date: Thu, 3 Jun 2021 08:12:34 -0700 Message-Id: <20210603081215.v2.1.Id4510e9e4baaa3f6c9fdd5cdf4d8606e63c262e3@changeid> X-Mailer: git-send-email 2.32.0.rc0.204.g9fa02ecfa5-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a thermal zone for the pm6150 on-die temperature. The system should try to shut down orderly when the temperature reaches the critical trip point at 115°C, otherwise the PMIC will perform a HW power off at 145°C. Signed-off-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd --- Changes in v2: - remove 'pm6150-' prefix from critical trip point - updated commit message arch/arm64/boot/dts/qcom/pm6150.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pm6150.dtsi b/arch/arm64/boot/dts/qcom/pm6150.dtsi index 8ab4f1f78bbf..8a4972e6a24c 100644 --- a/arch/arm64/boot/dts/qcom/pm6150.dtsi +++ b/arch/arm64/boot/dts/qcom/pm6150.dtsi @@ -7,6 +7,30 @@ #include #include +/ { + thermal-zones { + pm6150_thermal: pm6150-thermal { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-sensors = <&pm6150_temp>; + + trips { + pm6150_trip0: trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + pm6150_crit: crit { + temperature = <115000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + }; +}; + &spmi_bus { pm6150_lsid0: pmic@0 { compatible = "qcom,pm6150", "qcom,spmi-pmic";