]> www.infradead.org Git - linux.git/commitdiff
arm64: dts: ti: k3-am62: Enable CPU freq throttling on thermal alert
authorAlessandro Zini <alessandro.zini@siemens.com>
Wed, 14 Aug 2024 21:43:28 +0000 (23:43 +0200)
committerNishanth Menon <nm@ti.com>
Sat, 24 Aug 2024 19:41:42 +0000 (14:41 -0500)
Enable throttling down the CPU frequency when an alert temperature
threshold (lower than the critical threshold) is reached.

Signed-off-by: Alessandro Zini <alessandro.zini@siemens.com>
Link: https://lore.kernel.org/r/20240814214328.14155-1-alessandro.zini@siemens.com
Signed-off-by: Nishanth Menon <nm@ti.com>
arch/arm64/boot/dts/ti/k3-am62-thermal.dtsi
arch/arm64/boot/dts/ti/k3-am625.dtsi

index 12ba833002a11df3405753208f4166c742f84ea4..3c6a80aebd9f44ab1bd51386dbe6809043510aef 100644 (file)
@@ -12,12 +12,29 @@ thermal_zones: thermal-zones {
                thermal-sensors = <&wkup_vtm0 0>;
 
                trips {
+                       main0_alert: main0-alert {
+                               temperature = <95000>;
+                               hysteresis = <2000>;
+                               type = "passive";
+                       };
+
                        main0_crit: main0-crit {
                                temperature = <105000>; /* milliCelsius */
                                hysteresis = <2000>;    /* milliCelsius */
                                type = "critical";
                        };
                };
+
+               cooling-maps {
+                       map0 {
+                               trip = <&main0_alert>;
+                               cooling-device =
+                                       <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                       <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                       <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                       <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                       };
+               };
        };
 
        main1_thermal: main1-thermal {
@@ -26,11 +43,28 @@ thermal_zones: thermal-zones {
                thermal-sensors = <&wkup_vtm0 1>;
 
                trips {
+                       main1_alert: main1-alert {
+                               temperature = <95000>;
+                               hysteresis = <2000>;
+                               type = "passive";
+                       };
+
                        main1_crit: main1-crit {
                                temperature = <105000>; /* milliCelsius */
                                hysteresis = <2000>;    /* milliCelsius */
                                type = "critical";
                        };
                };
+
+               cooling-maps {
+                       map0 {
+                               trip = <&main1_alert>;
+                               cooling-device =
+                                       <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                       <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                       <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                       <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                       };
+               };
        };
 };
index 4014add6320d516b8bfb4a178d681e1979a1680c..c3d1db47dc9f351d217721c0b9e46a0c68995838 100644 (file)
@@ -50,6 +50,7 @@
                        next-level-cache = <&L2_0>;
                        operating-points-v2 = <&a53_opp_table>;
                        clocks = <&k3_clks 135 0>;
+                       #cooling-cells = <2>;
                };
 
                cpu1: cpu@1 {
@@ -66,6 +67,7 @@
                        next-level-cache = <&L2_0>;
                        operating-points-v2 = <&a53_opp_table>;
                        clocks = <&k3_clks 136 0>;
+                       #cooling-cells = <2>;
                };
 
                cpu2: cpu@2 {
@@ -82,6 +84,7 @@
                        next-level-cache = <&L2_0>;
                        operating-points-v2 = <&a53_opp_table>;
                        clocks = <&k3_clks 137 0>;
+                       #cooling-cells = <2>;
                };
 
                cpu3: cpu@3 {
                        next-level-cache = <&L2_0>;
                        operating-points-v2 = <&a53_opp_table>;
                        clocks = <&k3_clks 138 0>;
+                       #cooling-cells = <2>;
                };
        };