devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David HERNANDEZ SANCHEZ <david.hernandezsanchez@st.com>
To: Zhang Rui <rui.zhang@intel.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre TORGUE <alexandre.torgue@st.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-stm32@st-md-mailman.stormreply.com"
	<linux-stm32@st-md-mailman.stormreply.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: [PATCH 3/3] ARM: dts: stm32: add thermal sensor support on STM32MP157c
Date: Fri, 5 Oct 2018 10:08:46 +0000	[thread overview]
Message-ID: <1538734081-26585-4-git-send-email-david.hernandezsanchez@st.com> (raw)
In-Reply-To: <1538734081-26585-1-git-send-email-david.hernandezsanchez@st.com>

Add configuration on DT for thermal sensor driver

Signed-off-by: David Hernandez Sanchez <david.hernandezsanchez@st.com>

diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi b/arch/arm/boot/dts/stm32mp157c.dtsi
index 661be94..e90b9f6 100644
--- a/arch/arm/boot/dts/stm32mp157c.dtsi
+++ b/arch/arm/boot/dts/stm32mp157c.dtsi
@@ -84,6 +84,31 @@
 		};
 	};

+	thermal-zones {
+		cpu_thermal: cpu-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&dts>;
+
+			trips {
+				cpu_alert1: cpu-alert1 {
+					temperature = <85000>;
+					hysteresis = <0>;
+					type = "passive";
+				};
+
+				cpu-crit {
+					temperature = <120000>;
+					hysteresis = <0>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+			};
+		};
+	};
+
 	soc {
 		compatible = "simple-bus";
 		#address-cells = <1>;
@@ -908,6 +933,16 @@
 			status = "disabled";
 		};

+		dts: thermal@50028000 {
+			compatible = "st,stm32-thermal";
+			reg = <0x50028000 0x100>;
+			interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&rcc TMPSENS>;
+			clock-names = "pclk";
+			#thermal-sensor-cells = <0>;
+			status = "disabled";
+		};
+
 		cryp1: cryp@54001000 {
 			compatible = "st,stm32mp1-cryp";
 			reg = <0x54001000 0x400>;
--
2.7.4

  parent reply	other threads:[~2018-10-05 10:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-05 10:08 [PATCH 0/3] Introduce STM32 thermal driver David HERNANDEZ SANCHEZ
2018-10-05 10:08 ` [PATCH 1/3] dt-bindings: stm32-thermal: add binding documentation David HERNANDEZ SANCHEZ
2018-10-16 22:38   ` Rob Herring
2018-10-05 10:08 ` David HERNANDEZ SANCHEZ [this message]
2018-10-16 22:40   ` [PATCH 3/3] ARM: dts: stm32: add thermal sensor support on STM32MP157c Rob Herring
2018-10-17 14:22     ` Rob Herring
2018-12-03  9:47   ` Alexandre Torgue
2018-10-05 10:08 ` [PATCH 2/3] thermal: add stm32 thermal driver David HERNANDEZ SANCHEZ

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=1538734081-26585-4-git-send-email-david.hernandezsanchez@st.com \
    --to=david.hernandezsanchez@st.com \
    --cc=alexandre.torgue@st.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=edubezval@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mark.rutland@arm.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    /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).