public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Francesco Dolcini <francesco@dolcini.it>
To: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>
Cc: Francesco Dolcini <francesco.dolcini@toradex.com>,
	devicetree@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 05/10] arm64: dts: colibri-imx8x: Add PMIC thermal zone
Date: Sun,  1 Sep 2024 17:57:16 +0200	[thread overview]
Message-ID: <20240901155721.7912-6-francesco@dolcini.it> (raw)
In-Reply-To: <20240901155721.7912-1-francesco@dolcini.it>

From: Francesco Dolcini <francesco.dolcini@toradex.com>

Add PMIC thermal zones.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
---
v2: no changes
---
 .../boot/dts/freescale/imx8dx-colibri.dtsi    | 11 ++++++
 .../boot/dts/freescale/imx8x-colibri.dtsi     | 34 +++++++++++++++++--
 2 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8dx-colibri.dtsi b/arch/arm64/boot/dts/freescale/imx8dx-colibri.dtsi
index 66b0fcc6687d..4d1ad052c5b6 100644
--- a/arch/arm64/boot/dts/freescale/imx8dx-colibri.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8dx-colibri.dtsi
@@ -9,3 +9,14 @@
 / {
 	model = "Toradex Colibri iMX8DX Module";
 };
+
+&thermal_zones {
+	pmic-thermal {
+		cooling-maps {
+			map0 {
+				cooling-device = <&A35_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+						 <&A35_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+			};
+		};
+	};
+};
diff --git a/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi b/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi
index 60cf4e400052..bc1577b5f1ea 100644
--- a/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi
@@ -88,8 +88,6 @@ &adc0 {
 	vref-supply = <&reg_module_vref_1v8>;
 };
 
-/* TODO Cooling maps for DX */
-
 &cpu_alert0 {
 	hysteresis = <2000>;
 	temperature = <90000>;
@@ -420,6 +418,38 @@ &sai0 {
 	status = "okay";
 };
 
+&thermal_zones {
+	pmic-thermal {
+		polling-delay-passive = <250>;
+		polling-delay = <2000>;
+		thermal-sensors = <&tsens IMX_SC_R_PMIC_0>;
+
+		trips {
+			pmic_alert0: trip0 {
+				temperature = <110000>;
+				hysteresis = <2000>;
+				type = "passive";
+			};
+
+			pmic_crit0: trip1 {
+				temperature = <125000>;
+				hysteresis = <2000>;
+				type = "critical";
+			};
+		};
+
+		cooling-maps {
+			pmic_cooling_map0: map0 {
+				trip = <&pmic_alert0>;
+				cooling-device = <&A35_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+						 <&A35_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+						 <&A35_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+						 <&A35_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+			};
+		};
+	};
+};
+
 &usbotg1 {
 	adp-disable;
 	disable-over-current;
-- 
2.39.2



  parent reply	other threads:[~2024-09-01 16:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-01 15:57 [PATCH v2 00/10] arm64: dts: colibri-imx8x: Various improvements and additions Francesco Dolcini
2024-09-01 15:57 ` [PATCH v2 01/10] arm64: dts: colibri-imx8x: Add usb support Francesco Dolcini
2024-09-01 15:57 ` [PATCH v2 02/10] arm64: dts: colibri-imx8x: Add analog inputs Francesco Dolcini
2024-09-01 15:57 ` [PATCH v2 03/10] arm64: dts: colibri-imx8x: Add fxl6408 gpio expander Francesco Dolcini
2024-09-01 15:57 ` [PATCH v2 04/10] arm64: dts: colibri-imx8x: Add sound card Francesco Dolcini
2024-09-01 15:57 ` Francesco Dolcini [this message]
2024-09-01 15:57 ` [PATCH v2 06/10] arm64: dts: colibri-imx8x: Add USB3803 HUB Francesco Dolcini
2024-09-01 15:57 ` [PATCH v2 07/10] arm64: dts: colibri-imx8x: Add vpu support Francesco Dolcini
2024-09-01 15:57 ` [PATCH v2 08/10] arm64: dts: colibri-imx8x: Add adma_pwm Francesco Dolcini
2024-09-01 15:57 ` [PATCH v2 09/10] arm64: dts: colibri-imx8x: Add 50mhz clock for eth Francesco Dolcini
2024-09-01 15:57 ` [PATCH v2 10/10] arm64: dts: colibri-imx8x: Cleanup comments Francesco Dolcini
2024-09-02  1:06 ` [PATCH v2 00/10] arm64: dts: colibri-imx8x: Various improvements and additions Shawn Guo

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=20240901155721.7912-6-francesco@dolcini.it \
    --to=francesco@dolcini.it \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=francesco.dolcini@toradex.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@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