From patchwork Sun Jun 21 19:28:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 11616677 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D0C94912 for ; Sun, 21 Jun 2020 19:28:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B6FC125235 for ; Sun, 21 Jun 2020 19:28:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="n++c/NF/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729974AbgFUT23 (ORCPT ); Sun, 21 Jun 2020 15:28:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729810AbgFUT22 (ORCPT ); Sun, 21 Jun 2020 15:28:28 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A8C1C061795 for ; Sun, 21 Jun 2020 12:28:28 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id e4so16922011ljn.4 for ; Sun, 21 Jun 2020 12:28:28 -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:mime-version :content-transfer-encoding; bh=L9TQFVzt0zHBbW68TgkD9/2LYR7mWH10co/0ufY2ehU=; b=n++c/NF/Z6xfvP/Iz7CkJwiZGUaDTCQwxJ8qc/1KFTqM1ZNZbi7CgXg0lRsZy4skON lsO+t0GNd1OKfE4sWMep9SrSrxieTMmo1GRsgk1S9kfRJeJt6ArmKGeaAHT113WMdhAy 6oGN5mqV1ouATT7XIXmJW4ejIOKBchSM/wOmQHqFNdaCEbLknalJKaleAa/SqbAsjEPu 5LH1aNSeKouhxnL0KrK7gyqncIAi9clvdKw5shKuzXXLAm7o+66GsePXbq8tTIK2d6ot KjjuWYL3m7NJafw8jY6bYCOrsyrGbkIDfuLG/2ze/kBnn48sktTr9pxExPpER0bFrrcj bHoQ== 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=L9TQFVzt0zHBbW68TgkD9/2LYR7mWH10co/0ufY2ehU=; b=NPTQKyrSNAM+p3KxHsSga7CW35/83g/S0LRe5QyN+6RdUwrr7fCTOEUXe7AfLnkSN2 b1KQg30gve3o8gc2/KYjIZQ6Rdu21tgAZnimITBAVCA6ouYPLiF29cHWMELucr2UtDhV mJuE0wWYGGLbsFjqXT3WczKPoppsYyNopVU4pGMLcA5QRX+6FiaW7Jsr3VLJ3uba0LSq uNynPFBBfatHg9RVVJyAF4BAzh95ij9oBSVCAPo0XA9QgpUe9too2taNcGA7WC9gOzE3 haIneWPWpS9UIbPngvBY8FI/dUlGFhkwjnhFwzsw16G7Xi4ilaqHBz6666KW/Ddh9RMD k+oA== X-Gm-Message-State: AOAM533pwGr3eJu8SYiKZ3k9hMu5BuygBN0PnJ6zOvXYWOoIESQEL7zS YnbCCkxNAKXAxrKM3X1f46fWpr0kiVo= X-Google-Smtp-Source: ABdhPJwjXFpUeB2IOebJxfj3AE4fMZNgbwgEcO1wGFqhfp2TqUKJBAGG8TCth8ZfnQmKMsvoUL631A== X-Received: by 2002:a2e:b4b6:: with SMTP id q22mr6250647ljm.53.1592767706603; Sun, 21 Jun 2020 12:28:26 -0700 (PDT) Received: from eriador.lan ([188.162.65.109]) by smtp.gmail.com with ESMTPSA id o201sm2917205lff.8.2020.06.21.12.28.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jun 2020 12:28:26 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Vinod Koul Subject: [PATCH 1/3] arm64: dts: qcom: pm8009: Add base dts file Date: Sun, 21 Jun 2020 22:28:22 +0300 Message-Id: <20200621192824.2069145-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add base DTS file for pm8009 along with GPIOs and power-on nodes. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pm8009.dtsi | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/pm8009.dtsi diff --git a/arch/arm64/boot/dts/qcom/pm8009.dtsi b/arch/arm64/boot/dts/qcom/pm8009.dtsi new file mode 100644 index 000000000000..cb1a10e72474 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/pm8009.dtsi @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2020, Linaro Limited + */ + +#include + +&spmi_bus { + pmic@a { + compatible = "qcom,pm8009", "qcom,spmi-pmic"; + reg = <0xa SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pon@800 { + compatible = "qcom,pm8916-pon"; + reg = <0x0800>; + }; + + pm8009_gpios: gpio@c000 { + compatible = "qcom,pm8005-gpio"; + reg = <0xc000>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + + pmic@b { + compatible = "qcom,pm8009", "qcom,spmi-pmic"; + reg = <0xb SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + }; +}; From patchwork Sun Jun 21 19:28:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 11616679 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2EAAE90 for ; Sun, 21 Jun 2020 19:28:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 19B3725235 for ; Sun, 21 Jun 2020 19:28:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QoEj1Uu6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728016AbgFUT2b (ORCPT ); Sun, 21 Jun 2020 15:28:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729810AbgFUT2a (ORCPT ); Sun, 21 Jun 2020 15:28:30 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45995C061795 for ; Sun, 21 Jun 2020 12:28:30 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id i27so16876218ljb.12 for ; Sun, 21 Jun 2020 12:28:30 -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 :mime-version:content-transfer-encoding; bh=mL6HaqK6Q5R1aI2h++NtWnM5EslicmBEzVZCRl6DFdY=; b=QoEj1Uu6iFpPiKPPUb27lVO5CCZjVSvtUt6YF083zC6bmeYnCYFRk7Mu6Hq0nkjvJe 8P7XBcKuBvqXD9+sWf5/xxzSLWgeo2CX3zs36eF8AphibjgFJDozQRgwUH2Qx81TMaAu GOY/AqHRicpVKGPDRxhDfojlBAz8CL1rL6rncWO48i1x2vg7XTczBenc/8SrBVtrHort Ny7E+WS/QRrMiAnDJ6+eza7bSjzjQI4oGdhxPiIhTMh637xSB8G4VYhPNvfiBhzwc5uD 25g1aB/6iRpFDUoQBR5oWuPxQ9S6trgvryBmq7jAeXPOmTF+e2J83Jg/5+68bIxa8hQ3 F45w== 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:mime-version:content-transfer-encoding; bh=mL6HaqK6Q5R1aI2h++NtWnM5EslicmBEzVZCRl6DFdY=; b=Wl83yt+bRTKpgHudYHqWQvZ/TyYyQIiZjZ3d1qH6Ic9x3bRi801tqlDR55VUBsBxiw bDLYil0+OJ6/tgs37sLOjPlXki4W/lxHtNnLcLkczSfh8BkXwpvNzcqSI170AVNwz/Rx d+jnbYVB5Mj5o++h3yh1higJqx3j3vu/DdJg5V7VypPcWOl5aC7ArIKzuOJLjPhK5p2E jIEeb0ITDsfDVVbidiPlPGdwN78YUFD6lFxcxo7Ik++5DTRQZsgbUXApjX5ql92xDoN0 8i/YmhrDck0GrYLUFfil0ogAw2Ti+9VcqvFYMbywmxuRE1x2BXPei+Ikw6kY3ibr3JLu 5xgA== X-Gm-Message-State: AOAM533sT1XZWFL0N3LHt3tGaqpN4i8Nt8Aw1UPkIC1dbifPfEDYLDNe zQm/SsfNx2dq40RwDM1y6iPRfw== X-Google-Smtp-Source: ABdhPJwKn7av31wqUshPFtvWePCYVKEh44VfX32LX8ObANrHNpYEQjR/Z90Is57/ItSkYkN+Qnqrhg== X-Received: by 2002:a2e:9859:: with SMTP id e25mr6852919ljj.243.1592767707844; Sun, 21 Jun 2020 12:28:27 -0700 (PDT) Received: from eriador.lan ([188.162.65.109]) by smtp.gmail.com with ESMTPSA id o201sm2917205lff.8.2020.06.21.12.28.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jun 2020 12:28:27 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Vinod Koul Subject: [PATCH 2/3] arm64: dts: qcom: sm8250-mtp: include pmic files Date: Sun, 21 Jun 2020 22:28:23 +0300 Message-Id: <20200621192824.2069145-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200621192824.2069145-1-dmitry.baryshkov@linaro.org> References: <20200621192824.2069145-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Include files describing used PMIC chips, GPIOs, power on, etc nodes. Signed-off-by: Dmitry Baryshkov Reported-by: kernel test robot --- arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts index cff7a85890ee..aa37eb112d85 100644 --- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts @@ -7,6 +7,10 @@ #include #include "sm8250.dtsi" +#include "pm8150.dtsi" +#include "pm8150b.dtsi" +#include "pm8150l.dtsi" +#include "pm8009.dtsi" / { model = "Qualcomm Technologies, Inc. SM8250 MTP"; From patchwork Sun Jun 21 19:28:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 11616681 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 637AB912 for ; Sun, 21 Jun 2020 19:28:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4692425235 for ; Sun, 21 Jun 2020 19:28:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="WgxoW93h" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730049AbgFUT2d (ORCPT ); Sun, 21 Jun 2020 15:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730036AbgFUT2c (ORCPT ); Sun, 21 Jun 2020 15:28:32 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A864AC061796 for ; Sun, 21 Jun 2020 12:28:30 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id n24so16872523lji.10 for ; Sun, 21 Jun 2020 12:28:30 -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 :mime-version:content-transfer-encoding; bh=Rr0BOI8BzffYBcJ3FrPC0MKxNzbBaaA0ciNFW/6okKs=; b=WgxoW93hkrr52DkMnv53XZXZ/WRm4lRtO0An32UplYwfNbG97G89CBt/RhSS+yZ0bd 2zXwmAnGs9mCmwjD29AZ1CgmNXbSslJQyDE+hDVmY2D1rDsFdztX29NVrHBkqvpeM0vn xQVzqbGkX6PRfMscHhj7sOgL5Pmfu3bQZqeVzl6wHagiKa7WVDLu2lIFbUpbcjOdT7ko N84MLvuCXnoMEPzDm4T7QkhNOk0PgORc9dljfVKhd+5AO4fV8lbQxVBMQqZh0qo54W+f HbrHwYJ4xrfW6gDpGW4mM5ZTQzNjWmwjmF9ro33DcNkiUbvccgWzEZKm/Vjyx80lIDNN HRbg== 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:mime-version:content-transfer-encoding; bh=Rr0BOI8BzffYBcJ3FrPC0MKxNzbBaaA0ciNFW/6okKs=; b=HLPxR6mGGbmRrF3xia9vjYkgHKO5W8QUfAzaeT1UU/+JWbk9wuSCYPNKPBFu2imAaE fDW/NELojg4Y8WhJXk88oo7l/2lW+jET0CWniTjJIeRUykZfZYpG+uLXy6/mm8DjaEXe jYycXG7n4bXEQ1eChi9q3zmZNfx+8miGW9KbM3dvHYRoBSKdaR/vxVSAhpg4C5tVFSL6 ubQvLeap/25uzH+am8aFgDJppCK1N4fLqFULLmp1YkXFCLlV9FO8ssATHqube/coG+Om grq+/onFtSK/JuRc8yMi/lNRehRE8K6qsgau4Lz3yXXniTQpWhJnxdiBJUWWoBWXiMG6 AIuA== X-Gm-Message-State: AOAM53201fMH8LuInz/DDoE+xlg2BubBLTlE+6XjflwiG6miydy77fQU e63zhp49byBNTBGzsL+d17zh1A== X-Google-Smtp-Source: ABdhPJzXfgAQsOez41P5lPnddZ1hczYxxo5UrbDD/5fGrlZBR4UfjYdSt5yRQSA68UTaV/ec1QKRCw== X-Received: by 2002:a2e:970c:: with SMTP id r12mr6764967lji.145.1592767709125; Sun, 21 Jun 2020 12:28:29 -0700 (PDT) Received: from eriador.lan ([188.162.65.109]) by smtp.gmail.com with ESMTPSA id o201sm2917205lff.8.2020.06.21.12.28.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jun 2020 12:28:28 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Rob Herring Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Vinod Koul Subject: [PATCH 3/3] arm64: dts: qcom: pm8150x: add thermal alarms and thermal zones Date: Sun, 21 Jun 2020 22:28:24 +0300 Message-Id: <20200621192824.2069145-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200621192824.2069145-1-dmitry.baryshkov@linaro.org> References: <20200621192824.2069145-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add temperature alarm and thermal zone configuration to all three pm8150 instances. Configuration is largely based on the msm-4.19 tree. These alarms use main adc of the pmic. Separate temperature adc is not supported yet. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pm8150.dtsi | 42 +++++++++++++++++++++++-- arch/arm64/boot/dts/qcom/pm8150b.dtsi | 44 +++++++++++++++++++++++++-- arch/arm64/boot/dts/qcom/pm8150l.dtsi | 44 +++++++++++++++++++++++++-- 3 files changed, 122 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/pm8150.dtsi b/arch/arm64/boot/dts/qcom/pm8150.dtsi index c0b197458665..1b6406927509 100644 --- a/arch/arm64/boot/dts/qcom/pm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8150.dtsi @@ -9,6 +9,37 @@ #include #include +/ { + thermal-zones { + pm8150 { + polling-delay-passive = <100>; + polling-delay = <0>; + + thermal-sensors = <&pm8150_temp>; + + trips { + trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "hot"; + }; + + trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + }; +}; + &spmi_bus { pm8150_0: pmic@0 { compatible = "qcom,pm8150", "qcom,spmi-pmic"; @@ -30,6 +61,15 @@ pwrkey { }; }; + pm8150_temp: temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; + io-channels = <&pm8150_adc ADC5_DIE_TEMP>; + io-channel-names = "thermal"; + #thermal-sensor-cells = <0>; + }; + pm8150_adc: adc@3100 { compatible = "qcom,spmi-adc5"; reg = <0x3100>; @@ -38,8 +78,6 @@ pm8150_adc: adc@3100 { #io-channel-cells = <1>; interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; - status = "disabled"; - ref-gnd@0 { reg = ; qcom,pre-scaling = <1 1>; diff --git a/arch/arm64/boot/dts/qcom/pm8150b.dtsi b/arch/arm64/boot/dts/qcom/pm8150b.dtsi index 40b5d75a4a1d..e112e8876db6 100644 --- a/arch/arm64/boot/dts/qcom/pm8150b.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8150b.dtsi @@ -8,6 +8,37 @@ #include #include +/ { + thermal-zones { + pm8150b { + polling-delay-passive = <100>; + polling-delay = <0>; + + thermal-sensors = <&pm8150b_temp>; + + trips { + trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "hot"; + }; + + trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + }; +}; + &spmi_bus { pmic@2 { compatible = "qcom,pm8150b", "qcom,spmi-pmic"; @@ -22,7 +53,16 @@ power-on@800 { status = "disabled"; }; - adc@3100 { + pm8150b_temp: temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; + io-channels = <&pm8150b_adc ADC5_DIE_TEMP>; + io-channel-names = "thermal"; + #thermal-sensor-cells = <0>; + }; + + pm8150b_adc: adc@3100 { compatible = "qcom,spmi-adc5"; reg = <0x3100>; #address-cells = <1>; @@ -30,8 +70,6 @@ adc@3100 { #io-channel-cells = <1>; interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>; - status = "disabled"; - ref-gnd@0 { reg = ; qcom,pre-scaling = <1 1>; diff --git a/arch/arm64/boot/dts/qcom/pm8150l.dtsi b/arch/arm64/boot/dts/qcom/pm8150l.dtsi index cf05e0685d10..62139538b7d9 100644 --- a/arch/arm64/boot/dts/qcom/pm8150l.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8150l.dtsi @@ -8,6 +8,37 @@ #include #include +/ { + thermal-zones { + pm8150l { + polling-delay-passive = <100>; + polling-delay = <0>; + + thermal-sensors = <&pm8150l_temp>; + + trips { + trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <115000>; + hysteresis = <0>; + type = "hot"; + }; + + trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + }; +}; + &spmi_bus { pmic@4 { compatible = "qcom,pm8150l", "qcom,spmi-pmic"; @@ -22,7 +53,16 @@ power-on@800 { status = "disabled"; }; - adc@3100 { + pm8150l_temp: temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0x4 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; + io-channels = <&pm8150l_adc ADC5_DIE_TEMP>; + io-channel-names = "thermal"; + #thermal-sensor-cells = <0>; + }; + + pm8150l_adc: adc@3100 { compatible = "qcom,spmi-adc5"; reg = <0x3100>; #address-cells = <1>; @@ -30,8 +70,6 @@ adc@3100 { #io-channel-cells = <1>; interrupts = <0x4 0x31 0x0 IRQ_TYPE_EDGE_RISING>; - status = "disabled"; - ref-gnd@0 { reg = ; qcom,pre-scaling = <1 1>;