From: "Matti Lehtimäki" <matti.lehtimaki@gmail.com>
To: linux-arm-msm@vger.kernel.org
Cc: ~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org,
"Matti Lehtimäki" <matti.lehtimaki@gmail.com>,
"Andy Gross" <agross@kernel.org>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konrad.dybcio@linaro.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] ARM: dts: qcom: pm8226: Add thermal sensor and thermal zone config
Date: Tue, 30 May 2023 01:14:59 +0300 [thread overview]
Message-ID: <20230529221501.43455-2-matti.lehtimaki@gmail.com> (raw)
In-Reply-To: <20230529221501.43455-1-matti.lehtimaki@gmail.com>
Add thermal sensor, which is using on chip VADC channel to report PMIC
die temperature. Also add the corresponding thermal zone.
Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
---
arch/arm/boot/dts/qcom-pm8226.dtsi | 39 ++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-pm8226.dtsi b/arch/arm/boot/dts/qcom-pm8226.dtsi
index 46ba84f86c9f..3b8ad28cecb0 100644
--- a/arch/arm/boot/dts/qcom-pm8226.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8226.dtsi
@@ -4,6 +4,36 @@
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>
+/ {
+ thermal-zones {
+ pm8226-thermal {
+ polling-delay-passive = <100>;
+ polling-delay = <0>;
+ thermal-sensors = <&pm8226_temp>;
+
+ trips {
+ trip0 {
+ temperature = <105000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
+ trip1 {
+ temperature = <125000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ crit {
+ temperature = <145000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+ };
+ };
+};
+
&spmi_bus {
pm8226_0: pm8226@0 {
compatible = "qcom,pm8226", "qcom,spmi-pmic";
@@ -55,6 +85,15 @@ smbb: charger@1000 {
chg_otg: otg-vbus { };
};
+ pm8226_temp: temp-alarm@2400 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0x2400>;
+ interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
+ io-channels = <&pm8226_vadc VADC_DIE_TEMP>;
+ io-channel-names = "thermal";
+ #thermal-sensor-cells = <0>;
+ };
+
pm8226_vadc: adc@3100 {
compatible = "qcom,spmi-vadc";
reg = <0x3100>;
--
2.34.1
next prev parent reply other threads:[~2023-05-29 22:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-29 22:14 [PATCH 0/3] Thermal zones for pm8226, pm8841 and pm8941 Matti Lehtimäki
2023-05-29 22:14 ` Matti Lehtimäki [this message]
2023-05-29 22:15 ` [PATCH 2/3] ARM: dts: qcom: pm8841: Add thermal zone config Matti Lehtimäki
2023-05-29 22:15 ` [PATCH 3/3] ARM: dts: qcom: pm8941: " Matti Lehtimäki
2023-06-13 23:48 ` [PATCH 0/3] Thermal zones for pm8226, pm8841 and pm8941 Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230529221501.43455-2-matti.lehtimaki@gmail.com \
--to=matti.lehtimaki@gmail.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®