<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From f6233242d21bb4cb973a7dfc61dcfbf6d9a5d22b Mon Sep 17 00:00:00 2001
From: Yuantian Tang &lt;andy.tang@nxp.com&gt;
Date: Mon, 2 Sep 2019 17:45:19 +0800
Subject: [PATCH] arm64: dts: lx2160a: add tmu device node

Add the TMU (Thermal Monitoring Unit) device node to enable
TMU feature.

Signed-off-by: Yuantian Tang &lt;andy.tang@nxp.com&gt;
---
 arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 108 +++++++++++++++++++++----
 1 file changed, 92 insertions(+), 16 deletions(-)

--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
@@ -6,6 +6,7 @@
 
 #include &lt;dt-bindings/gpio/gpio.h&gt;
 #include &lt;dt-bindings/interrupt-controller/arm-gic.h&gt;
+#include &lt;dt-bindings/thermal/thermal.h&gt;
 
 /memreserve/ 0x80000000 0x00010000;
 
@@ -24,7 +25,7 @@
 		#size-cells = &lt;0&gt;;
 
 		// 8 clusters having 2 Cortex-A72 cores each
-		cpu@0 {
+		cpu0: cpu@0 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -38,9 +39,10 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster0_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
-		cpu@1 {
+		cpu1: cpu@1 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -54,9 +56,10 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster0_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
-		cpu@100 {
+		cpu100: cpu@100 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -70,9 +73,10 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster1_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
-		cpu@101 {
+		cpu101: cpu@101 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -86,9 +90,10 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster1_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
-		cpu@200 {
+		cpu200: cpu@200 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -102,9 +107,10 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster2_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
-		cpu@201 {
+		cpu201: cpu@201 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -118,9 +124,10 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster2_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
-		cpu@300 {
+		cpu300: cpu@300 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -134,9 +141,10 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster3_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
-		cpu@301 {
+		cpu301: cpu@301 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -150,9 +158,10 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster3_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
-		cpu@400 {
+		cpu400: cpu@400 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -166,9 +175,10 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster4_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
-		cpu@401 {
+		cpu401: cpu@401 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -182,9 +192,10 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster4_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
-		cpu@500 {
+		cpu500: cpu@500 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -198,9 +209,10 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster5_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
-		cpu@501 {
+		cpu501: cpu@501 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -214,9 +226,10 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster5_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
-		cpu@600 {
+		cpu600: cpu@600 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -230,9 +243,10 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster6_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
-		cpu@601 {
+		cpu601: cpu@601 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -246,9 +260,10 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster6_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
-		cpu@700 {
+		cpu700: cpu@700 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -262,9 +277,10 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster7_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
-		cpu@701 {
+		cpu701: cpu@701 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a72";
 			enable-method = "psci";
@@ -278,6 +294,7 @@
 			i-cache-sets = &lt;192&gt;;
 			next-level-cache = &lt;&amp;cluster7_l2&gt;;
 			cpu-idle-states = &lt;&amp;cpu_pw15&gt;;
+			#cooling-cells = &lt;2&gt;;
 		};
 
 		cluster0_l2: l2-cache0 {
@@ -422,6 +439,51 @@
 		clock-output-names = "sysclk";
 	};
 
+	thermal-zones {
+		core_thermal1: core-thermal1 {
+			polling-delay-passive = &lt;1000&gt;;
+			polling-delay = &lt;5000&gt;;
+			thermal-sensors = &lt;&amp;tmu 0&gt;;
+
+			trips {
+				core_cluster_alert: core-cluster-alert {
+					temperature = &lt;85000&gt;;
+					hysteresis = &lt;2000&gt;;
+					type = "passive";
+				};
+
+				core_cluster_crit: core-cluster-crit {
+					temperature = &lt;95000&gt;;
+					hysteresis = &lt;2000&gt;;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				map0 {
+					trip = &lt;&amp;core_cluster_alert&gt;;
+					cooling-device =
+						&lt;&amp;cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;,
+						&lt;&amp;cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;,
+						&lt;&amp;cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;,
+						&lt;&amp;cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;,
+						&lt;&amp;cpu200 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;,
+						&lt;&amp;cpu201 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;,
+						&lt;&amp;cpu300 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;,
+						&lt;&amp;cpu301 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;,
+						&lt;&amp;cpu400 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;,
+						&lt;&amp;cpu401 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;,
+						&lt;&amp;cpu500 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;,
+						&lt;&amp;cpu501 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;,
+						&lt;&amp;cpu600 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;,
+						&lt;&amp;cpu601 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;,
+						&lt;&amp;cpu700 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;,
+						&lt;&amp;cpu701 THERMAL_NO_LIMIT THERMAL_NO_LIMIT&gt;;
+				};
+			};
+		};
+	};
+
 	soc {
 		compatible = "simple-bus";
 		#address-cells = &lt;2&gt;;
@@ -689,6 +751,20 @@
 			status = "disabled";
 		};
 
+		tmu: tmu@1f80000 {
+			compatible = "fsl,qoriq-tmu";
+			reg = &lt;0x0 0x1f80000 0x0 0x10000&gt;;
+			interrupts = &lt;0 23 0x4&gt;;
+			fsl,tmu-range = &lt;0x800000E6 0x8001017D&gt;;
+			fsl,tmu-calibration =
+				/* Calibration data group 1 */
+				&lt;0x00000000 0x00000035
+				/* Calibration data group 2 */
+				0x00010001 0x00000154&gt;;
+			little-endian;
+			#thermal-sensor-cells = &lt;1&gt;;
+		};
+
 		uart0: serial@21c0000 {
 			compatible = "arm,sbsa-uart","arm,pl011";
 			reg = &lt;0x0 0x21c0000 0x0 0x1000&gt;;
</pre></body></html>