Skip to contentSkip to conversation

ARM: dts: omap3: Add cpu trips and cooling map for omap34/36 families

PATCH Superseded Adam Ford 4 participants 6 messages Aug 17, 2020 – Aug 21, 2020 Device tree bindings

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH v2 1/1 ARM: dts: omap3: Add cpu trips and cooling map for omap34/36 families

The OMAP3530, OMAP3630, and DM3730 all show thresholds of 90C and 105C depending on commercial or industrial temperature ratings.

This patch expands the thermal information to include the limits of 90 and 105C for alert and critical. It sets the coolings-cells for the 34xx and 36xx CPU's which both point to omap3-cpu-thermal.dtsi.

For boards who never use industrial temperatures, these can be changed on their respective device trees with something like:

&cpu_alert0 {
	temperature = <85000>; /* millicelsius */
};
&cpu_crit {
	temperature = <90000>; /* millicelsius */
};

OMAP3_THERMAL will need to be enabled. It is off by default.

---
V2: Rebase on Linux 5.9-rc1

arch/arm/boot/dts/omap3-cpu-thermal.dtsi +21 -0
index aee46fa8c055..99858eb0d7f6 100644
@@ -17,4 +17,25 @@ cpu_thermal: cpu_thermal {
 
 			/* sensor       ID */
 	thermal-sensors = <&bandgap     0>;
+
+	cpu_trips: trips {
+		cpu_alert0: cpu_alert {
+			temperature = <90000>; /* millicelsius */
+			hysteresis = <2000>; /* millicelsius */
+			type = "passive";
+		};
+		cpu_crit: cpu_crit {
+			temperature = <105000>; /* millicelsius */
+			hysteresis = <2000>; /* millicelsius */
+			type = "critical";
+		};
+	};
+
+	cpu_cooling_maps: cooling-maps {
+		map0 {
+			trip = <&cpu_alert0>;
+			cooling-device =
+				<&cpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+		};
+	};
 };
arch/arm/boot/dts/omap34xx.dtsi +1 -0
index 9c3ee4ac8165..c0dcc75833a8 100644
@@ -20,6 +20,7 @@
 			operating-points-v2 = <&cpu0_opp_table>;
 
 			clock-latency = <300000>; /* From legacy driver */
+			#cooling-cells = <2>;
 		};
 	};
 
arch/arm/boot/dts/omap36xx.dtsi +1 -0
index 9c3beefc0fe0..fadbf308feff 100644
@@ -25,6 +25,7 @@
 
 			vbb-supply = <&abb_mpu_iva>;
 			clock-latency = <300000>; /* From omap-cpufreq driver */
+			#cooling-cells = <2>;
 		};
 	};
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 14 lines · On Mon, 17 Aug 2020 08:39:31 -0500 Adam Ford <[email protected]> wrote:

The OMAP3530, OMAP3630, and DM3730 all show thresholds of 90C and 105C depending on commercial or industrial temperature ratings.

This patch expands the thermal information to include the limits of 90 and 105C for alert and critical. It sets the coolings-cells for the 34xx and 36xx CPU's which both point to omap3-cpu-thermal.dtsi.

For boards who never use industrial temperatures, these can be changed on their respective device trees with something like:

&cpu_alert0 {
	temperature = <85000>; /* millicelsius */
};
Quoted 6 lines
&cpu_crit {
	temperature = <90000>; /* millicelsius */
};

OMAP3_THERMAL will need to be enabled. It is off by default.

hmm, I think the patch for idling core when OMAP3_THERMAL is enabled got stuck somewhere. It still seems not to work. Shouldn't that patch be applied first?

Regards,
Andreas

author
#2 lore raw
Quoted 22 lines · Andreas Kemnade
Quoted 18 lines · On Mon, 17 Aug 2020 08:39:31 -0500 Adam Ford <[email protected]> wrote:

The OMAP3530, OMAP3630, and DM3730 all show thresholds of 90C and 105C depending on commercial or industrial temperature ratings.

This patch expands the thermal information to include the limits of 90 and 105C for alert and critical. It sets the coolings-cells for the 34xx and 36xx CPU's which both point to omap3-cpu-thermal.dtsi.

For boards who never use industrial temperatures, these can be changed on their respective device trees with something like:

&cpu_alert0 {
      temperature = <85000>; /* millicelsius */
};
&cpu_crit {
      temperature = <90000>; /* millicelsius */
};
Quoted 5 lines
Quoted 2 lines

OMAP3_THERMAL will need to be enabled. It is off by default.

hmm, I think the patch for idling core when OMAP3_THERMAL is enabled got stuck somewhere. It still seems not to work. Shouldn't that patch be applied first?

I rebased the idle stuff, and now I get errors, so I haven't pushed it yet. I put a note that OMAP3_THERMAL is off by default, but this patch would at least get the framing in there. I know at least two of us that use 1GHZ processors which are not supposed to run at that speed above 90MHz, so the idea was to tolerate the higher current for now, and when the idle stuff works, we'll enable the OMAP3_THERMAL by default.

adam

Quoted 3 lines

Regards,
Andreas

#3 lore raw
Quoted 29 lines · On Mon, 17 Aug 2020 15:02:27 -0500 Adam Ford <[email protected]> wrote:
Quoted 22 lines · Andreas Kemnade
Quoted 18 lines · On Mon, 17 Aug 2020 08:39:31 -0500 Adam Ford <[email protected]> wrote:

The OMAP3530, OMAP3630, and DM3730 all show thresholds of 90C and 105C depending on commercial or industrial temperature ratings.

This patch expands the thermal information to include the limits of 90 and 105C for alert and critical. It sets the coolings-cells for the 34xx and 36xx CPU's which both point to omap3-cpu-thermal.dtsi.

For boards who never use industrial temperatures, these can be changed on their respective device trees with something like:

&cpu_alert0 {
      temperature = <85000>; /* millicelsius */
};
&cpu_crit {
      temperature = <90000>; /* millicelsius */
};
Quoted 5 lines
Quoted 2 lines

OMAP3_THERMAL will need to be enabled. It is off by default.

hmm, I think the patch for idling core when OMAP3_THERMAL is enabled got stuck somewhere. It still seems not to work. Shouldn't that patch be applied first?

Quoted 8 lines

I rebased the idle stuff, and now I get errors, so I haven't pushed it yet. I put a note that OMAP3_THERMAL is off by default, but this patch would at least get the framing in there. I know at least two of us that use 1GHZ processors which are not supposed to run at that speed above 90MHz, so the idea was to tolerate the higher current for now, and when the idle stuff works, we'll enable the OMAP3_THERMAL by default.

yes, makes sense, so with this patch we have the choice to either optimize for low speeds and currents (by disabling OMAP3_THERMAL and 1GHz) or high speeds (by enabling OMAP3_THERMAL and 1 Ghz).

Regards,
Andreas

#4 lore raw
Quoted 18 lines · Andreas Kemnade
Quoted 15 lines · On Mon, 17 Aug 2020 15:02:27 -0500 Adam Ford <[email protected]> wrote:
Quoted 14 lines · Andreas Kemnade
Quoted 10 lines · On Mon, 17 Aug 2020 08:39:31 -0500 Adam Ford <[email protected]> wrote:

The OMAP3530, OMAP3630, and DM3730 all show thresholds of 90C and 105C depending on commercial or industrial temperature ratings.

This patch expands the thermal information to include the limits of 90 and 105C for alert and critical. It sets the coolings-cells for the 34xx and 36xx CPU's which both point to omap3-cpu-thermal.dtsi.

For boards who never use industrial temperatures, these can be changed on their respective device trees with something like:

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
&cpu_alert0 {
      temperature = <85000>; /* millicelsius */
};
&cpu_crit {
      temperature = <90000>; /* millicelsius */
};

I think you should set the lower temperatures by default and have only the boards known to work with higher values configure them as needed.

Quoted 14 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

OMAP3_THERMAL will need to be enabled. It is off by default.

hmm, I think the patch for idling core when OMAP3_THERMAL is enabled got stuck somewhere. It still seems not to work. Shouldn't that patch be applied first?

Quoted 8 lines

I rebased the idle stuff, and now I get errors, so I haven't pushed it yet. I put a note that OMAP3_THERMAL is off by default, but this patch would at least get the framing in there. I know at least two of us that use 1GHZ processors which are not supposed to run at that speed above 90MHz, so the idea was to tolerate the higher current for now, and when the idle stuff works, we'll enable the OMAP3_THERMAL by default.

Quoted 3 lines

yes, makes sense, so with this patch we have the choice to either optimize for low speeds and currents (by disabling OMAP3_THERMAL and 1GHz) or high speeds (by enabling OMAP3_THERMAL and 1 Ghz).

Maybe add something like that to the patch description too?

Regards,

Tony

#5 lore raw
In reply to Adam Ford
Quoted 10 lines · Adam Ford

The OMAP3530, OMAP3630, and DM3730 all show thresholds of 90C and 105C depending on commercial or industrial temperature ratings.

This patch expands the thermal information to include the limits of 90 and 105C for alert and critical. It sets the coolings-cells for the 34xx and 36xx CPU's which both point to omap3-cpu-thermal.dtsi.

For boards who never use industrial temperatures, these can be changed on their respective device trees with something like:

Quoted 7 lines
&cpu_alert0 {
	temperature = <85000>; /* millicelsius */
};
&cpu_crit {
	temperature = <90000>; /* millicelsius */
};

That should be the other way around. Provide safe values by default.

Pavel