From patchwork Mon May 29 22:15:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matti_Lehtim=C3=A4ki?= X-Patchwork-Id: 100439 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1801270vqr; Mon, 29 May 2023 15:34:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5/F2qsNAbXQSAn7woOHYhIMFesF/7qGZEaXsSVGNoM9bKxhia5lfVFztrd5xw9pZbAch9l X-Received: by 2002:a05:6a00:1786:b0:627:6328:79f1 with SMTP id s6-20020a056a00178600b00627632879f1mr31001pfg.34.1685399652444; Mon, 29 May 2023 15:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685399652; cv=none; d=google.com; s=arc-20160816; b=MJQ05EzaDWJ8E8fKv/YyKfn6muxFx3Yrt/qh9grfeR4hkweha+MTrXoUxpU9RaHKll /mGLdb+H7zGX/KNefSwIxvFH3co4/MbIXhaiJi7qurdvbYmC1+/j8+mbNVFFR6mHA8lw lMgPx4VNEvssS6buAr9lYPNHtqBdx879ll2s+mpSYcbzRDrNVzj/74QdM87ldbnnPUcz NTxdDzyW+qK6Rs8Iq1kSki93ExYTbZHsbiQbxVf+yLshYLJtKZZgFTIUhAPQHCFh6Sg4 Lc12U7ptQJDT0z+tUmRMaPwFiCnjTEWn3I/VWbqJ0z2hNMF8ux6vXyW4FHHV3cm5nJ9i Y5kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tmlJr9255kWhzt9IbTlRjHFJizJ8Idr5O0YOfzVhjSk=; b=vNw00kjpUl/Sc+dz3JMS+7bmo9190FLzCCqU70nXfHv+3Z3sl9znT+v9icpte/cwaR dygtTxcdqOLKZ7MoOuRURGAoU8EN5JR+VZ9blEbNK561BCO4Q/RiIW8nReELl8K9X2zX dkgeQQaZRCO7Akfo1p17Jbo5DjFMl3M850UlBoaH0O9jOqSHGBFBZGDmxti0WhfSGPZn OBD49ulkMMBX7hxbGYckrZq5SJQsXL/453XgheOtkv7zJuqZ4lXWYLuGe4tmhxUXR1bY igYCTxsMtIlrTYD8Fo9XgMh0Scle1wi2FVUZZAKXg0st2V6DzyC7d1vUXhyCnecxgCPY H3Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=sYITLYmG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y29-20020aa79e1d000000b006438e35303csi575754pfq.260.2023.05.29.15.33.58; Mon, 29 May 2023 15:34:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=sYITLYmG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229595AbjE2WQF (ORCPT + 99 others); Mon, 29 May 2023 18:16:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229833AbjE2WP6 (ORCPT ); Mon, 29 May 2023 18:15:58 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E744FF; Mon, 29 May 2023 15:15:40 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-4eed764a10cso3922965e87.0; Mon, 29 May 2023 15:15:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685398538; x=1687990538; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tmlJr9255kWhzt9IbTlRjHFJizJ8Idr5O0YOfzVhjSk=; b=sYITLYmGSawdm8kiiiMjyvlHX0qvVL9z8uaz7kFbWzQwrsLLdzVME2YZIDbgvh05Xv 1Kp/dCGIaxve32gBHeIhpkEgnS/8b9EBY+ksB61vQ++QI9FVT2RbPHthDqx4CJFQPY0q ELmy0iqFQi1Dg9CERW1AWlU+BfBTeYU1IPPo16Llobrz+4Qqm2MyrQRuy+eVVM81KuZk TzNbXT6EK2yE1ID1FAFL55v0v+tR2jM4pq/KhHorxitGOW6q79YebnB6lUenqwYJtSWL C4WK8FqziqMSA/5rS6vpolEJCvCFc+dhaoYtiDdVb8mcJzwX1XZLOUCFNBMzF+OLErVh NjIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685398538; x=1687990538; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tmlJr9255kWhzt9IbTlRjHFJizJ8Idr5O0YOfzVhjSk=; b=CIaHYeDAAvIKaQA0ETFdzYcZvsseHvgJ3ro3IKUlmF7yuPdjnWuKjRIsHX2c6dR6VE xlJfMZBlnof45aRddczqsBE6AsYFycgqHVVodXiyNmLedr4hbqbd8dPTvMr2vNH0nPVN f1uxWXJzsqlSyZ6eZGMIXx0i/avobRG1Za2MUcHLw7U2lIRMSqWYmU2m2oSfYQQfAtxH cla+SBP+t2q1HcldtpIHdB9ySPStd76oGSMA7f3tY++WgpZJOE8CCV/ows0zo8P20WQr E0SbOV57wrQzBBofGT5x/pUcyFQitkyy7la63A+8IF2QjNyrCP9qPUAtBIIPnzQfCLDq BMdQ== X-Gm-Message-State: AC+VfDx8ejWTE41xQ1EtZznzA7jOH11t8h344VTINC2JjxqOI7XinHni AE7MdkyxGVSzfwUNHWkL1usOiDGXKhJbqg== X-Received: by 2002:a19:7516:0:b0:4f3:bb84:a775 with SMTP id y22-20020a197516000000b004f3bb84a775mr15499lfe.47.1685398538339; Mon, 29 May 2023 15:15:38 -0700 (PDT) Received: from i-vetokaappi.home.lan (dsl-hkibng42-56733b-36.dhcp.inet.fi. [86.115.59.36]) by smtp.gmail.com with ESMTPSA id c20-20020ac24154000000b004eb12850c40sm132993lfi.14.2023.05.29.15.15.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 15:15:37 -0700 (PDT) From: =?utf-8?q?Matti_Lehtim=C3=A4ki?= To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, =?utf-8?q?Matti_Lehtim=C3=A4ki?= , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] ARM: dts: qcom: pm8841: Add thermal zone config Date: Tue, 30 May 2023 01:15:00 +0300 Message-Id: <20230529221501.43455-3-matti.lehtimaki@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230529221501.43455-1-matti.lehtimaki@gmail.com> References: <20230529221501.43455-1-matti.lehtimaki@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767269626398862567?= X-GMAIL-MSGID: =?utf-8?q?1767269626398862567?= Add thermal zone for the PMIC thermal sensor. Temperatures are based on downstream values, except for critical trip point where 140°C is used instead of 145°C due to limitations without a configured ADC. Signed-off-by: Matti Lehtimäki --- arch/arm/boot/dts/qcom-pm8841.dtsi | 33 +++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/qcom-pm8841.dtsi b/arch/arm/boot/dts/qcom-pm8841.dtsi index b5cdde034d18..3bf2ce5c86a6 100644 --- a/arch/arm/boot/dts/qcom-pm8841.dtsi +++ b/arch/arm/boot/dts/qcom-pm8841.dtsi @@ -2,6 +2,37 @@ #include #include + +/ { + thermal-zones { + pm8841-thermal { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-sensors = <&pm8841_temp>; + + trips { + trip0 { + temperature = <105000>; + hysteresis = <2000>; + type = "passive"; + }; + + trip1 { + temperature = <125000>; + hysteresis = <2000>; + type = "hot"; + }; + + crit { + temperature = <140000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; +}; + &spmi_bus { pm8841_0: pm8841@4 { @@ -20,7 +51,7 @@ pm8841_mpps: mpps@a000 { #interrupt-cells = <2>; }; - temp-alarm@2400 { + pm8841_temp: temp-alarm@2400 { compatible = "qcom,spmi-temp-alarm"; reg = <0x2400>; interrupts = <4 0x24 0 IRQ_TYPE_EDGE_RISING>;