From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Rob Herring <robh+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org
Subject: [PATCH 2/7] arm64: dts: qcom: pm8350b: add temp sensor and thermal zone config
Date: Sat, 26 Feb 2022 23:50:30 +0300 [thread overview]
Message-ID: <20220226205035.1826360-3-dmitry.baryshkov@linaro.org> (raw)
In-Reply-To: <20220226205035.1826360-1-dmitry.baryshkov@linaro.org>
Add temp-alarm device tree node and a default configuration for the
corresponding thermal zone for this PMIC. Temperatures are based on
downstream values.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/pm8350b.dtsi | 31 +++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/pm8350b.dtsi b/arch/arm64/boot/dts/qcom/pm8350b.dtsi
index b23bb1d49a4d..f1d1d4c8edf8 100644
--- a/arch/arm64/boot/dts/qcom/pm8350b.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8350b.dtsi
@@ -6,6 +6,30 @@
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>
+/ {
+ thermal-zones {
+ pm8350b_thermal: pm8350c-thermal {
+ polling-delay-passive = <100>;
+ polling-delay = <0>;
+ thermal-sensors = <&pm8350b_temp_alarm>;
+
+ trips {
+ pm8350b_trip0: trip0 {
+ temperature = <95000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ pm8350b_crit: pm8350c-crit {
+ temperature = <115000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+ };
+ };
+};
+
&spmi_bus {
pm8350b: pmic@3 {
compatible = "qcom,pm8350b", "qcom,spmi-pmic";
@@ -13,6 +37,13 @@ pm8350b: pmic@3 {
#address-cells = <1>;
#size-cells = <0>;
+ pm8350b_temp_alarm: temp-alarm@a00 {
+ compatible = "qcom,spmi-temp-alarm";
+ reg = <0xa00>;
+ interrupts = <0x3 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+ #thermal-sensor-cells = <0>;
+ };
+
pm8350b_gpios: gpio@8800 {
compatible = "qcom,pm8350b-gpio";
reg = <0x8800>;
--
2.30.2
next prev parent reply other threads:[~2022-02-26 20:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-26 20:50 [PATCH 0/7] arm64: dts: qcom: fix PMICs for SM8350/SM8450 platforms Dmitry Baryshkov
2022-02-26 20:50 ` [PATCH 1/7] arm64: dts: qcom: pm8350: add temp sensor and thermal zone config Dmitry Baryshkov
2022-02-26 20:50 ` Dmitry Baryshkov [this message]
2022-02-26 20:50 ` [PATCH 3/7] arm64: dts: qcom: pmr735b: " Dmitry Baryshkov
2022-02-26 20:50 ` [PATCH 4/7] arm64: dts: qcom: pm8350c: stop depending on thermal_zones label Dmitry Baryshkov
2022-02-26 20:50 ` [PATCH 5/7] arm64: dts: qcom: pmr735a: " Dmitry Baryshkov
2022-02-26 20:50 ` [PATCH 6/7] dt-bindings: mfd: qcom-spmi-pmic: add pm8450 entry Dmitry Baryshkov
2022-03-04 23:14 ` Rob Herring
2022-02-26 20:50 ` [PATCH 7/7] arm64: dts: qcom: add pm8450 support Dmitry Baryshkov
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=20220226205035.1826360-3-dmitry.baryshkov@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=robh+dt@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).