From patchwork Tue Mar 14 18:30:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 663150 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 739ABC7618D for ; Tue, 14 Mar 2023 18:31:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231179AbjCNSbq (ORCPT ); Tue, 14 Mar 2023 14:31:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230393AbjCNSbV (ORCPT ); Tue, 14 Mar 2023 14:31:21 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C21D161518 for ; Tue, 14 Mar 2023 11:31:05 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id k37so11056177wms.0 for ; Tue, 14 Mar 2023 11:31:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; t=1678818664; 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=IQCJ+X+YEuYse0CeSshHt8sWYxstXZuzTDTR56rfWH0=; b=wMx91kjMzpT4ihmd6YPGDQBW1ZtNyRDXuEqTIp6J/E8+b5atPQw8p64KjONZ7NneTO F3V2KVC/YZlMyP+AFqzwYnrdFFCnEHr5MpVGeURUGsSICg6WcE3xHBWL+ItA6igjDrFt hOdjKuhC9HdHBWPNwSl9rT7KzFSBOrPcQtX6vBYK5nAeEQzSYPpjYZ70H8CxeyVxUGSI nuiZKuxIsvdgrt97m2JHo8wUrhCc+DpY2F3D4U6NRlb7eTK2m38DC50kVlpjFXBx/Fiw vUM0aHoRel7WOPFK6Y3kIfWxMePr3k5UOXJpWFJvChZHZI4n1K7pEbgIGSdA2GSInZf8 hjoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678818664; 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=IQCJ+X+YEuYse0CeSshHt8sWYxstXZuzTDTR56rfWH0=; b=vmhCi/cvwui2q4PSul8xS7A7cI0fs2cxBTdGhhV+Lnaxu8WxzM4wzTu2yPdkFdDI5z Rao7Wi/M3mXIpR91LWt4JLBTl09qFYEa8PPv8z6HhIpKK+3vBASq+HgdHDXbiFhE2TKO qsrdZBt6Cc34sDDNv7YMc8gPiDM+zr90BjVwRKE2175jjPlyTQcPEKXRwL9ZXhARB+Wm fyxIK0VyzC5EePWC07lim0u08W5jj7kBDhixyzLJUtH+0nfXRAnP2nAgf3VNwQ7S/OT6 a9FmONudWpXBHZSwPpslKR/YSfmacy41vabQIUq8M/li1auI5Zb+1AQQH3iBwBGE2MjN Kgog== X-Gm-Message-State: AO0yUKXRVUQVRQc6CjLmbmMjvUYXnONiU6pGW1VtRbpR0fq6y7pY4joX tyCML9mUsP1hb7oiiD9PRdF/5g== X-Google-Smtp-Source: AK7set/qeIP/8mMepwcAWReZMB1wCc+hQ0lBM+LFouWcxDbfUe/Z3N0OOwLjfvtmbsdj9KUOBUW8fA== X-Received: by 2002:a05:600c:1910:b0:3ed:22fb:c87 with SMTP id j16-20020a05600c191000b003ed22fb0c87mr8921801wmq.5.1678818664176; Tue, 14 Mar 2023 11:31:04 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:fd14:bd52:b53b:d94c]) by smtp.gmail.com with ESMTPSA id k28-20020a05600c1c9c00b003e209b45f6bsm4083938wms.29.2023.03.14.11.31.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 11:31:03 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 11/14] arm64: dts: qcom: sa8775p: pmic: add thermal zones Date: Tue, 14 Mar 2023 19:30:40 +0100 Message-Id: <20230314183043.619997-12-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230314183043.619997-1-brgl@bgdev.pl> References: <20230314183043.619997-1-brgl@bgdev.pl> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Bartosz Golaszewski Add the thermal zones and associated alarm nodes for the PMICs that have them hooked up on sa8775p-ride. Signed-off-by: Bartosz Golaszewski --- arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 59 +++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi index d55fa5165864..437cfa8aee2f 100644 --- a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi @@ -6,6 +6,50 @@ #include #include +/ { + thermal-zones { + pm8775_1_thermal: pm8775-1-thermal { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-sensors = <&pm8775_1_temp_alarm>; + + trips { + trip0 { + temperature = <105000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <125000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + + pm8775_3_thermal: pm8775-3-thermal { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-sensors = <&pm8775_3_temp_alarm>; + + trips { + trip0 { + temperature = <105000>; + hysteresis = <0>; + type = "passive"; + }; + + trip1 { + temperature = <125000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + }; +}; + &spmi_bus { pmk8775_0: pmic@0 { compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; @@ -16,6 +60,7 @@ pmk8775_0: pmic@0 { pmk8775_0_pon: pon@1200 { compatible = "qcom,pmk8350-pon"; reg = <0x1200>, <0x800>; + mode-recovery = <0x1>; mode-bootloader = <0x2>; @@ -39,6 +84,13 @@ pmk8775_1: pmic@2 { reg = <0x2 SPMI_USID>; #address-cells = <1>; #size-cells = <0>; + + pm8775_1_temp_alarm: temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; }; pmk8775_2: pmic@4 { @@ -53,5 +105,12 @@ pmk8775_3: pmic@6 { reg = <0x6 SPMI_USID>; #address-cells = <1>; #size-cells = <0>; + + pm8775_3_temp_alarm: temp-alarm@a00 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0xa00>; + interrupts-extended = <&spmi_bus 0x6 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + #thermal-sensor-cells = <0>; + }; }; };