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,
patches@linaro.org, linaro-kernel@lists.linaro.org
Subject: [PATCH 5/7] arm64: dts: qcom: pm8150x: add thermal alarms and thermal zones
Date: Thu, 4 Jun 2020 03:43:29 +0300 [thread overview]
Message-ID: <20200604004331.669936-5-dmitry.baryshkov@linaro.org> (raw)
In-Reply-To: <20200604004331.669936-1-dmitry.baryshkov@linaro.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 <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/pm8150.dtsi | 41 +++++++++++++++++++++++--
arch/arm64/boot/dts/qcom/pm8150b.dtsi | 43 +++++++++++++++++++++++++--
arch/arm64/boot/dts/qcom/pm8150l.dtsi | 43 +++++++++++++++++++++++++--
3 files changed, 119 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/pm8150.dtsi b/arch/arm64/boot/dts/qcom/pm8150.dtsi
index c0b197458665..fee2db42f4cb 100644
--- a/arch/arm64/boot/dts/qcom/pm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8150.dtsi
@@ -30,6 +30,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 +47,6 @@ pm8150_adc: adc@3100 {
#io-channel-cells = <1>;
interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
- status = "disabled";
-
ref-gnd@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
@@ -85,3 +92,33 @@ pmic@1 {
#size-cells = <0>;
};
};
+
+&thermal_zones {
+ pm8150_temp {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&pm8150_temp>;
+
+ trips {
+ trip0 {
+ temperature = <95000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ trip1 {
+ temperature = <115000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ trip2 {
+ temperature = <145000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+ };
+
+ };
+};
diff --git a/arch/arm64/boot/dts/qcom/pm8150b.dtsi b/arch/arm64/boot/dts/qcom/pm8150b.dtsi
index 40b5d75a4a1d..e93d16f2d1e0 100644
--- a/arch/arm64/boot/dts/qcom/pm8150b.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8150b.dtsi
@@ -22,7 +22,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 +39,6 @@ adc@3100 {
#io-channel-cells = <1>;
interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
- status = "disabled";
-
ref-gnd@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
@@ -74,3 +81,33 @@ pmic@3 {
#size-cells = <0>;
};
};
+
+&thermal_zones {
+ pm8150b_temp {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&pm8150b_temp>;
+
+ trips {
+ trip0 {
+ temperature = <95000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ trip1 {
+ temperature = <115000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ trip2 {
+ temperature = <145000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+ };
+
+ };
+};
diff --git a/arch/arm64/boot/dts/qcom/pm8150l.dtsi b/arch/arm64/boot/dts/qcom/pm8150l.dtsi
index cf05e0685d10..1edf87c95a27 100644
--- a/arch/arm64/boot/dts/qcom/pm8150l.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8150l.dtsi
@@ -22,7 +22,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 +39,6 @@ adc@3100 {
#io-channel-cells = <1>;
interrupts = <0x4 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
- status = "disabled";
-
ref-gnd@0 {
reg = <ADC5_REF_GND>;
qcom,pre-scaling = <1 1>;
@@ -68,3 +75,33 @@ pmic@5 {
#size-cells = <0>;
};
};
+
+&thermal_zones {
+ pm8150l_temp {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors = <&pm8150l_temp>;
+
+ trips {
+ trip0 {
+ temperature = <95000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ trip1 {
+ temperature = <115000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+
+ trip2 {
+ temperature = <145000>;
+ hysteresis = <0>;
+ type = "passive";
+ };
+ };
+
+ };
+};
--
2.26.2
next prev parent reply other threads:[~2020-06-04 0:43 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 0:43 [PATCH 1/7] arm64: dts: qcom: pm8009: Add base dts file Dmitry Baryshkov
2020-06-04 0:43 ` [PATCH 2/7] arm64: dts: qcom: sm8250: change spmi node label Dmitry Baryshkov
2020-06-04 6:01 ` Manivannan Sadhasivam
2020-06-04 0:43 ` [PATCH 3/7] arm64: dts: qcom: sm8250-mtp: include pmic files Dmitry Baryshkov
2020-06-04 0:43 ` [PATCH 4/7] arm64: dts: qcom: sm8x50: add empty thermal zone nodes Dmitry Baryshkov
2020-06-08 8:45 ` Amit Kucheria
2020-06-04 0:43 ` Dmitry Baryshkov [this message]
2020-06-04 10:47 ` [PATCH 5/7] arm64: dts: qcom: pm8150x: add thermal alarms and thermal zones Vinod Koul
2020-06-04 15:03 ` Dmitry Baryshkov
2020-06-05 4:39 ` Vinod Koul
2020-06-05 14:37 ` Dmitry Baryshkov
2020-06-08 8:44 ` Amit Kucheria
2020-06-04 0:43 ` [PATCH 6/7] arm64: dts: qcom: pm8150: enable rtc device Dmitry Baryshkov
2020-06-04 6:09 ` Manivannan Sadhasivam
2020-06-04 10:51 ` Vinod Koul
2020-06-04 0:43 ` [PATCH 7/7] arm64: dts: qcom: sm8250: add watchdog device Dmitry Baryshkov
2020-06-04 6:06 ` Manivannan Sadhasivam
2020-06-04 10:52 ` Vinod Koul
2020-06-04 11:07 ` Sai Prakash Ranjan
2020-06-04 11:35 ` Manivannan Sadhasivam
2020-06-04 11:51 ` Sai Prakash Ranjan
2020-06-04 12:22 ` Manivannan Sadhasivam
2020-06-04 12:52 ` Sai Prakash Ranjan
2020-06-04 6:08 ` [PATCH 1/7] arm64: dts: qcom: pm8009: Add base dts file Manivannan Sadhasivam
2020-06-04 9:10 ` Vinod Koul
2020-06-21 6:42 ` Bjorn Andersson
2020-06-21 18:56 ` 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=20200604004331.669936-5-dmitry.baryshkov@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=patches@linaro.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).