arm64: dts: ti: k3-am64-main: add VTM node
authorBryan Brattlof <bb@ti.com>
Wed, 5 Apr 2023 21:53:22 +0000 (16:53 -0500)
committerVignesh Raghavendra <vigneshr@ti.com>
Wed, 14 Jun 2023 16:11:32 +0000 (21:41 +0530)
The am64x supports a single VTM module which is located in the main
domain with two associated temperature monitors located at different hot
spots on the die.

Tested-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Link: https://lore.kernel.org/r/20230405215328.3755561-2-bb@ti.com
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
arch/arm64/boot/dts/ti/k3-am64-main.dtsi
arch/arm64/boot/dts/ti/k3-am64-thermal.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/ti/k3-am64.dtsi

index f5e25d6c3c28be647c7ed94a2ff8f44a0d61e71a..9dea128893db1f94a230a6b93daa4b0b8e946f24 100644 (file)
                clock-names = "fck";
                status = "disabled";
        };
+
+       main_vtm0: temperature-sensor@b00000 {
+               compatible = "ti,j7200-vtm";
+               reg = <0x00 0xb00000 0x00 0x400>,
+                     <0x00 0xb01000 0x00 0x400>;
+               power-domains = <&k3_pds 95 TI_SCI_PD_EXCLUSIVE>;
+               #thermal-sensor-cells = <1>;
+       };
 };
diff --git a/arch/arm64/boot/dts/ti/k3-am64-thermal.dtsi b/arch/arm64/boot/dts/ti/k3-am64-thermal.dtsi
new file mode 100644 (file)
index 0000000..036db56
--- /dev/null
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <dt-bindings/thermal/thermal.h>
+
+thermal_zones: thermal-zones {
+       main0_thermal: main0-thermal {
+               polling-delay-passive = <250>;  /* milliSeconds */
+               polling-delay = <500>;          /* milliSeconds */
+               thermal-sensors = <&main_vtm0 0>;
+
+               trips {
+                       main0_crit: main0-crit {
+                               temperature = <105000>; /* milliCelsius */
+                               hysteresis = <2000>;    /* milliCelsius */
+                               type = "critical";
+                       };
+               };
+       };
+
+       main1_thermal: main1-thermal {
+               polling-delay-passive = <250>;  /* milliSeconds */
+               polling-delay = <500>;          /* milliSeconds */
+               thermal-sensors = <&main_vtm0 1>;
+
+               trips {
+                       main1_crit: main1-crit {
+                               temperature = <105000>; /* milliCelsius */
+                               hysteresis = <2000>;    /* milliCelsius */
+                               type = "critical";
+                       };
+               };
+       };
+};
index d6262b5a0a1040daba112fd6a14282c5e65b18ea..8e9c2bc70f4d7ed87ad3f87f2915e73ee1dfb641 100644 (file)
@@ -54,6 +54,7 @@
                         <0x00 0x00420000 0x00 0x00420000 0x00 0x00001000>, /* ESM0 */
                         <0x00 0x00600000 0x00 0x00600000 0x00 0x00001100>, /* GPIO */
                         <0x00 0x00a40000 0x00 0x00a40000 0x00 0x00000800>, /* Timesync router */
+                        <0x00 0x00b00000 0x00 0x00b00000 0x00 0x00002400>, /* VTM */
                         <0x00 0x01000000 0x00 0x01000000 0x00 0x02330400>, /* First peripheral window */
                         <0x00 0x08000000 0x00 0x08000000 0x00 0x00200000>, /* Main CPSW */
                         <0x00 0x0d000000 0x00 0x0d000000 0x00 0x00800000>, /* PCIE_CORE */
@@ -90,6 +91,8 @@
                        ranges = <0x00 0x04000000 0x00 0x04000000 0x00 0x01ff1400>; /* Peripheral window */
                };
        };
+
+       #include "k3-am64-thermal.dtsi"
 };
 
 /* Now include the peripherals for each bus segments */