Skip to content

Commit f02dccb

Browse files
JPSGoncalvesr-vignesh
authored andcommitted
arm64: dts: ti: k3-am62p-j722s: Enable freq throttling on thermal alert
Enable throttling down the CPU frequency when an alert temperature threshold is reached before the critical temperature for shutdown. Signed-off-by: João Paulo Gonçalves <[email protected]> Link: https://lore.kernel.org/r/20250623-b4-verdin-am62p-cooling-device-v1-1-cc185ba5843d@toradex.com Signed-off-by: Vignesh Raghavendra <[email protected]>
1 parent 387727d commit f02dccb

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

arch/arm64/boot/dts/ti/k3-am62p-j722s-common-thermal.dtsi

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,29 @@ thermal_zones: thermal-zones {
1212
thermal-sensors = <&wkup_vtm0 0>;
1313

1414
trips {
15+
main0_alert: main0-alert {
16+
temperature = <115000>;
17+
hysteresis = <2000>;
18+
type = "passive";
19+
};
20+
1521
main0_crit: main0-crit {
1622
temperature = <125000>; /* milliCelsius */
1723
hysteresis = <2000>; /* milliCelsius */
1824
type = "critical";
1925
};
2026
};
27+
28+
cooling-maps {
29+
map0 {
30+
trip = <&main0_alert>;
31+
cooling-device =
32+
<&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
33+
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
34+
<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
35+
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
36+
};
37+
};
2138
};
2239

2340
main1_thermal: main1-thermal {
@@ -26,12 +43,29 @@ thermal_zones: thermal-zones {
2643
thermal-sensors = <&wkup_vtm0 1>;
2744

2845
trips {
46+
main1_alert: main1-alert {
47+
temperature = <115000>;
48+
hysteresis = <2000>;
49+
type = "passive";
50+
};
51+
2952
main1_crit: main1-crit {
3053
temperature = <125000>; /* milliCelsius */
3154
hysteresis = <2000>; /* milliCelsius */
3255
type = "critical";
3356
};
3457
};
58+
59+
cooling-maps {
60+
map0 {
61+
trip = <&main1_alert>;
62+
cooling-device =
63+
<&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
64+
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
65+
<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
66+
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
67+
};
68+
};
3569
};
3670

3771
main2_thermal: main2-thermal {
@@ -40,11 +74,28 @@ thermal_zones: thermal-zones {
4074
thermal-sensors = <&wkup_vtm0 2>;
4175

4276
trips {
77+
main2_alert: main2-alert {
78+
temperature = <115000>;
79+
hysteresis = <2000>;
80+
type = "passive";
81+
};
82+
4383
main2_crit: main2-crit {
4484
temperature = <125000>; /* milliCelsius */
4585
hysteresis = <2000>; /* milliCelsius */
4686
type = "critical";
4787
};
4888
};
89+
90+
cooling-maps {
91+
map0 {
92+
trip = <&main2_alert>;
93+
cooling-device =
94+
<&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
95+
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
96+
<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
97+
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
98+
};
99+
};
49100
};
50101
};

arch/arm64/boot/dts/ti/k3-am62p5.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
next-level-cache = <&l2_0>;
5050
operating-points-v2 = <&a53_opp_table>;
5151
clocks = <&k3_clks 135 0>;
52+
#cooling-cells = <2>;
5253
};
5354

5455
cpu1: cpu@1 {
@@ -65,6 +66,7 @@
6566
next-level-cache = <&l2_0>;
6667
operating-points-v2 = <&a53_opp_table>;
6768
clocks = <&k3_clks 136 0>;
69+
#cooling-cells = <2>;
6870
};
6971

7072
cpu2: cpu@2 {
@@ -81,6 +83,7 @@
8183
next-level-cache = <&l2_0>;
8284
operating-points-v2 = <&a53_opp_table>;
8385
clocks = <&k3_clks 137 0>;
86+
#cooling-cells = <2>;
8487
};
8588

8689
cpu3: cpu@3 {
@@ -97,6 +100,7 @@
97100
next-level-cache = <&l2_0>;
98101
operating-points-v2 = <&a53_opp_table>;
99102
clocks = <&k3_clks 138 0>;
103+
#cooling-cells = <2>;
100104
};
101105
};
102106

arch/arm64/boot/dts/ti/k3-j722s.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
d-cache-sets = <128>;
5757
next-level-cache = <&l2_0>;
5858
clocks = <&k3_clks 135 0>;
59+
#cooling-cells = <2>;
5960
};
6061

6162
cpu1: cpu@1 {
@@ -71,6 +72,7 @@
7172
d-cache-sets = <128>;
7273
next-level-cache = <&l2_0>;
7374
clocks = <&k3_clks 136 0>;
75+
#cooling-cells = <2>;
7476
};
7577

7678
cpu2: cpu@2 {
@@ -86,6 +88,7 @@
8688
d-cache-sets = <128>;
8789
next-level-cache = <&l2_0>;
8890
clocks = <&k3_clks 137 0>;
91+
#cooling-cells = <2>;
8992
};
9093

9194
cpu3: cpu@3 {
@@ -101,6 +104,7 @@
101104
d-cache-sets = <128>;
102105
next-level-cache = <&l2_0>;
103106
clocks = <&k3_clks 138 0>;
107+
#cooling-cells = <2>;
104108
};
105109
};
106110

0 commit comments

Comments
 (0)