diff mbox series

arm64: qcom: sc7180: trogdor: Add ADC nodes and thermal zone for charger thermistor

Message ID 20201030084840.1.If389f211a8532b83095ff8c66ec181424440f8d6@changeid
State New
Headers show
Series arm64: qcom: sc7180: trogdor: Add ADC nodes and thermal zone for charger thermistor | expand

Commit Message

Matthias Kaehlcke Oct. 30, 2020, 3:48 p.m. UTC
From: Antony Wang <antony_wang@compal.corp-partner.google.com>

Trogdor has a thermistor to monitor the temperature of the charger IC.
Add the ADC (monitor) nodes and a thermal zone for this thermistor.

Signed-off-by: Antony Wang <antony_wang@compal.corp-partner.google.com>
[ mka: tweaked commit message ]
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---

 arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 36 ++++++++++++++++++++
 1 file changed, 36 insertions(+)

Comments

patchwork-bot+linux-arm-msm@kernel.org Nov. 24, 2020, 11:10 p.m. UTC | #1
Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

On Fri, 30 Oct 2020 08:48:43 -0700 you wrote:
> From: Antony Wang <antony_wang@compal.corp-partner.google.com>

> 

> Trogdor has a thermistor to monitor the temperature of the charger IC.

> Add the ADC (monitor) nodes and a thermal zone for this thermistor.

> 

> Signed-off-by: Antony Wang <antony_wang@compal.corp-partner.google.com>

> [ mka: tweaked commit message ]

> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>

> 

> [...]


Here is the summary with links:
  - arm64: qcom: sc7180: trogdor: Add ADC nodes and thermal zone for charger thermistor
    https://git.kernel.org/qcom/c/bb06eb3607e9

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
index bf875589d364..f68305c35c74 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
@@ -13,6 +13,23 @@ 
 #include "pm6150.dtsi"
 #include "pm6150l.dtsi"
 
+/ {
+	thermal-zones {
+		charger-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&pm6150_adc_tm 1>;
+
+			trips {
+				temperature = <125000>;
+				hysteresis = <1000>;
+				type = "critical";
+			};
+		};
+	};
+};
+
 /*
  * Reserved memory changes
  *
@@ -733,6 +750,25 @@  &mdss {
 	status = "okay";
 };
 
+&pm6150_adc {
+	charger-thermistor@4f {
+		reg = <ADC5_AMUX_THM3_100K_PU>;
+		qcom,ratiometric;
+		qcom,hw-settle-time = <200>;
+	};
+};
+
+&pm6150_adc_tm {
+	status = "okay";
+
+	charger-thermistor@1 {
+		reg = <1>;
+		io-channels = <&pm6150_adc ADC5_AMUX_THM3_100K_PU>;
+		qcom,ratiometric;
+		qcom,hw-settle-time-us = <200>;
+	};
+};
+
 &pm6150_pwrkey {
 	status = "disabled";
 };