summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Paulo Gonçalves <joao.goncalves@toradex.com>2025-06-02 16:48:50 -0300
committerJoão Paulo Gonçalves <joao.goncalves@toradex.com>2025-06-11 09:19:23 -0300
commitd906885bee49d1b6f80510ce2b64776cf4ba5257 (patch)
treef0bf431e6f6a4a7fb75cbe06db74cb58d1357638
parent711095647e616573450157b92509a6dd20d0ca5f (diff)
arm64: dts: ti: k3-am69-aquila: Add active cooling supporttoradex_ti-linux-6.6.y
Add the necessary SoM temperature trip points and fan configuration for the supported carrier boards. Below is a description of the active cooling behavior and how the implementation was tested. At room temperature, with the system idle, the fan speed duty cycle is 40%, with no audible noise from the fan, and the T-junction is maintained around 55 ºC. Running GPU and CPU stress tests to raise the SoC temperature, the fan speed increases to a 70% duty cycle when the T-junction reaches approximately 70 ºC. At this point, with a 70% duty cycle, the temperature is maintained at ~70 ºC. The fan runs at 100% duty cycle when the T-junction exceeds 85 ºC, but it was not possible to raise the SoC temperature above ~80 ºC at room temperature with active cooling enabled. Testing of the various active trip points was performed using the thermal emulation mode provided by Linux (Kconfig: CONFIG_THERMAL_EMULATION). The thermal governor used during implementation and testing was the Step governor. Worth mentioning that around the trip points temperature, the fan speed can keep switching between the configured speed for each trip point until the trip point crossing is complete. This behavior is related to the implementation of thermal governors in the kernel, where the governors are not handling hysteresis correctly. The issue seems to be fixed after v6.10, see [1] and [2]. [1] https://lore.kernel.org/lkml/12346243.O9o76ZdvQC@kreacher/ [2] https://lore.kernel.org/lkml/13515747.uLZWGnKmhe@kreacher/ Upstream-Status: Pending Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
-rw-r--r--arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts102
-rw-r--r--arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts103
-rw-r--r--arch/arm64/boot/dts/ti/k3-am69-aquila.dtsi112
3 files changed, 314 insertions, 3 deletions
diff --git a/arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts b/arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts
index b422b0772953..0f5343275e6d 100644
--- a/arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts
+++ b/arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts
@@ -71,6 +71,76 @@
status = "okay";
};
+&main0_thermal {
+ cooling-maps {
+ map0 {
+ cooling-device = <&fan 1 1>;
+ trip = <&main0_alert0>;
+ };
+
+ map1 {
+ cooling-device = <&fan 2 2>;
+ trip = <&main0_alert1>;
+ };
+ };
+};
+
+&main1_thermal {
+ cooling-maps {
+ map0 {
+ cooling-device = <&fan 1 1>;
+ trip = <&main1_alert0>;
+ };
+
+ map1 {
+ cooling-device = <&fan 2 2>;
+ trip = <&main1_alert1>;
+ };
+ };
+};
+
+&main2_thermal {
+ cooling-maps {
+ map0 {
+ cooling-device = <&fan 1 1>;
+ trip = <&main2_alert0>;
+ };
+
+ map1 {
+ cooling-device = <&fan 2 2>;
+ trip = <&main2_alert1>;
+ };
+ };
+};
+
+&main3_thermal {
+ cooling-maps {
+ map0 {
+ cooling-device = <&fan 1 1>;
+ trip = <&main3_alert0>;
+ };
+
+ map1 {
+ cooling-device = <&fan 2 2>;
+ trip = <&main3_alert1>;
+ };
+ };
+};
+
+&main4_thermal {
+ cooling-maps {
+ map0 {
+ cooling-device = <&fan 1 1>;
+ trip = <&main4_alert0>;
+ };
+
+ map1 {
+ cooling-device = <&fan 2 2>;
+ trip = <&main4_alert1>;
+ };
+ };
+};
+
/* Aquila ETH_2 */
&main_cpsw0 {
status = "okay";
@@ -186,7 +256,9 @@
reg = <0x18>;
#pwm-cells = <2>;
- fan {
+ fan: fan {
+ cooling-levels = <102 179 255>;
+ #cooling-cells = <2>;
pwms = <&fan_controller 40000 PWM_POLARITY_INVERTED>;
};
};
@@ -345,6 +417,34 @@
};
};
+&wkup0_thermal {
+ cooling-maps {
+ map0 {
+ cooling-device = <&fan 1 1>;
+ trip = <&wkup0_alert0>;
+ };
+
+ map1 {
+ cooling-device = <&fan 2 2>;
+ trip = <&wkup0_alert1>;
+ };
+ };
+};
+
+&wkup1_thermal {
+ cooling-maps {
+ map0 {
+ cooling-device = <&fan 1 1>;
+ trip = <&wkup1_alert0>;
+ };
+
+ map1 {
+ cooling-device = <&fan 2 2>;
+ trip = <&wkup1_alert1>;
+ };
+ };
+};
+
&wkup_gpio0 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_04>; /* Aquila GPIO_04 */
diff --git a/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts b/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts
index ed0b63f915c7..31b28ea3c7cf 100644
--- a/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts
+++ b/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts
@@ -79,7 +79,6 @@
"Headphone", "Headphone Jack",
"Line", "Line In Jack";
-
codec_dai: simple-audio-card,codec {
sound-dai = <&wm8904_1a>;
};
@@ -118,6 +117,76 @@
status = "okay";
};
+&main0_thermal {
+ cooling-maps {
+ map0 {
+ cooling-device = <&fan 1 1>;
+ trip = <&main0_alert0>;
+ };
+
+ map1 {
+ cooling-device = <&fan 2 2>;
+ trip = <&main0_alert1>;
+ };
+ };
+};
+
+&main1_thermal {
+ cooling-maps {
+ map0 {
+ cooling-device = <&fan 1 1>;
+ trip = <&main1_alert0>;
+ };
+
+ map1 {
+ cooling-device = <&fan 2 2>;
+ trip = <&main1_alert1>;
+ };
+ };
+};
+
+&main2_thermal {
+ cooling-maps {
+ map0 {
+ cooling-device = <&fan 1 1>;
+ trip = <&main2_alert0>;
+ };
+
+ map1 {
+ cooling-device = <&fan 2 2>;
+ trip = <&main2_alert1>;
+ };
+ };
+};
+
+&main3_thermal {
+ cooling-maps {
+ map0 {
+ cooling-device = <&fan 1 1>;
+ trip = <&main3_alert0>;
+ };
+
+ map1 {
+ cooling-device = <&fan 2 2>;
+ trip = <&main3_alert1>;
+ };
+ };
+};
+
+&main4_thermal {
+ cooling-maps {
+ map0 {
+ cooling-device = <&fan 1 1>;
+ trip = <&main4_alert0>;
+ };
+
+ map1 {
+ cooling-device = <&fan 2 2>;
+ trip = <&main4_alert1>;
+ };
+ };
+};
+
/* Aquila ETH_2 */
&main_cpsw0 {
status = "okay";
@@ -279,7 +348,9 @@
reg = <0x18>;
#pwm-cells = <2>;
- fan {
+ fan: fan {
+ cooling-levels = <102 179 255>;
+ #cooling-cells = <2>;
pwms = <&fan_controller 40000 PWM_POLARITY_INVERTED>;
};
};
@@ -477,6 +548,34 @@
};
};
+&wkup0_thermal {
+ cooling-maps {
+ map0 {
+ cooling-device = <&fan 1 1>;
+ trip = <&wkup0_alert0>;
+ };
+
+ map1 {
+ cooling-device = <&fan 2 2>;
+ trip = <&wkup0_alert1>;
+ };
+ };
+};
+
+&wkup1_thermal {
+ cooling-maps {
+ map0 {
+ cooling-device = <&fan 1 1>;
+ trip = <&wkup1_alert0>;
+ };
+
+ map1 {
+ cooling-device = <&fan 2 2>;
+ trip = <&wkup1_alert1>;
+ };
+ };
+};
+
&wkup_gpio0 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_04>, /* Aquila GPIO_04 */
diff --git a/arch/arm64/boot/dts/ti/k3-am69-aquila.dtsi b/arch/arm64/boot/dts/ti/k3-am69-aquila.dtsi
index b96505025304..0a0156990e7b 100644
--- a/arch/arm64/boot/dts/ti/k3-am69-aquila.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am69-aquila.dtsi
@@ -1104,22 +1104,102 @@
temperature = <105000>;
};
+&main0_thermal {
+ trips {
+ main0_alert0: trip-point0 {
+ temperature = <70000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+
+ main0_alert1: trip-point1 {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+ };
+};
+
&main1_crit {
temperature = <105000>;
};
+&main1_thermal {
+ trips {
+ main1_alert0: trip-point0 {
+ temperature = <70000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+
+ main1_alert1: trip-point1 {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+ };
+};
+
&main2_crit {
temperature = <105000>;
};
+&main2_thermal {
+ trips {
+ main2_alert0: trip-point0 {
+ temperature = <70000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+
+ main2_alert1: trip-point1 {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+ };
+};
+
&main3_crit {
temperature = <105000>;
};
+&main3_thermal {
+ trips {
+ main3_alert0: trip-point0 {
+ temperature = <70000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+
+ main3_alert1: trip-point1 {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+ };
+};
+
&main4_crit {
temperature = <105000>;
};
+&main4_thermal {
+ trips {
+ main4_alert0: trip-point0 {
+ temperature = <70000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+
+ main4_alert1: trip-point1 {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+ };
+};
+
/* Aquila ETH_2 SGMII PHY */
&main_cpsw0_port8 {
phy-mode = "sgmii";
@@ -2012,10 +2092,42 @@
temperature = <105000>;
};
+&wkup0_thermal {
+ trips {
+ wkup0_alert0: trip-point0 {
+ temperature = <70000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+
+ wkup0_alert1: trip-point1 {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+ };
+};
+
&wkup1_crit {
temperature = <105000>;
};
+&wkup1_thermal {
+ trips {
+ wkup1_alert0: trip-point0 {
+ temperature = <70000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+
+ wkup1_alert1: trip-point1 {
+ temperature = <85000>;
+ hysteresis = <2000>;
+ type = "active";
+ };
+ };
+};
+
&wkup_gpio_intr {
status = "okay";
};