Skip to contentSkip to conversation

arm64: dts: meson-sm1: add thermal nodes

PATCH Applied Neil Armstrong 3 participants 5 messages May 12, 2020 – May 20, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover arm64: dts: meson-sm1: add thermal nodes

SM1 Thermal is missing and broken since the G12A/G12B thermal enablement, fix this here by moving the g12b thermal nodes to meson-g12b.dtsi and adding the proper sm1 thermal nodes.

Neil Armstrong (2):
arm64: dts: meson-g12b: move G12B thermal nodes to meson-g12b.dtsi
arm64: dts: meson-sm1: add cpu thermal nodes

 arch/arm64/boot/dts/amlogic/meson-g12.dtsi  | 23 --------------------
 arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 22 +++++++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-sm1.dtsi  | 24 +++++++++++++++++++++
 3 files changed, 46 insertions(+), 23 deletions(-)
Signature · 1 line
2.22.0
#1 lore raw

PATCH 1/2 arm64: dts: meson-g12b: move G12B thermal nodes to meson-g12b.dtsi

The G12B thermal nodes should be in the meson-g12b.dtsi file.

Fixes 195f140318a9 ("arm64: dts: meson: g12b: add cooling properties")
---
 arch/arm64/boot/dts/amlogic/meson-g12.dtsi  | 23 ---------------------
 arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 22 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 23 deletions(-)
arch/arm64/boot/dts/amlogic/meson-g12.dtsi +0 -23
index 783e5a397f86..e932205badea 100644
@@ -355,29 +355,6 @@
 	};
 };
 
-&cpu_thermal {
-	cooling-maps {
-		map0 {
-			trip = <&cpu_passive>;
-			cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-					 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-					 <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-					 <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-					 <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-					 <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
-		};
-		map1 {
-			trip = <&cpu_hot>;
-			cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-					 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-					 <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-					 <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-					 <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-					 <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
-		};
-	};
-};
-
 &ethmac {
 	power-domains = <&pwrc PWRC_G12A_ETH_ID>;
 };
arch/arm64/boot/dts/amlogic/meson-g12b.dtsi +22 -0
index 6dbc3968045b..9b8548e5f6e5 100644
@@ -113,3 +113,25 @@
 	compatible = "amlogic,g12b-clkc";
 };
 
+&cpu_thermal {
+	cooling-maps {
+		map0 {
+			trip = <&cpu_passive>;
+			cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+					 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+					 <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+					 <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+					 <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+					 <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+		};
+		map1 {
+			trip = <&cpu_hot>;
+			cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+					 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+					 <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+					 <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+					 <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+					 <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+		};
+	};
+};
Signature · 1 line
2.22.0
#2 lore raw

PATCH 2/2 arm64: dts: meson-sm1: add cpu thermal nodes

In reply to Neil Armstrong

Add thermal nodes for the Amlogic SM1 SoCs based on the G12A and G12B thermal nodes.

---
 arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/amlogic/meson-sm1.dtsi +24 -0
index d4ec735fb1a5..71317f5aada1 100644
@@ -56,6 +56,7 @@
 			reg = <0x0 0x0>;
 			enable-method = "psci";
 			next-level-cache = <&l2>;
+			#cooling-cells = <2>;
 		};
 
 		cpu1: cpu@1 {
@@ -64,6 +65,7 @@
 			reg = <0x0 0x1>;
 			enable-method = "psci";
 			next-level-cache = <&l2>;
+			#cooling-cells = <2>;
 		};
 
 		cpu2: cpu@2 {
@@ -72,6 +74,7 @@
 			reg = <0x0 0x2>;
 			enable-method = "psci";
 			next-level-cache = <&l2>;
+			#cooling-cells = <2>;
 		};
 
 		cpu3: cpu@3 {
@@ -80,6 +83,7 @@
 			reg = <0x0 0x3>;
 			enable-method = "psci";
 			next-level-cache = <&l2>;
+			#cooling-cells = <2>;
 		};
 
 		l2: l2-cache0 {
@@ -466,6 +470,26 @@
 	compatible = "amlogic,sm1-clkc";
 };
 
+&cpu_thermal {
+	cooling-maps {
+		map0 {
+			trip = <&cpu_passive>;
+			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>;
+		};
+
+		map1 {
+			trip = <&cpu_hot>;
+			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>;
+		};
+	};
+};
+
 &ethmac {
 	power-domains = <&pwrc PWRC_SM1_ETH_ID>;
 };
Signature · 1 line
2.22.0
maintainer Applied
#3 lore raw
In reply to Neil Armstrong
Quoted 9 lines · Neil Armstrong

SM1 Thermal is missing and broken since the G12A/G12B thermal enablement, fix this here by moving the g12b thermal nodes to meson-g12b.dtsi and adding the proper sm1 thermal nodes.

Neil Armstrong (2):
arm64: dts: meson-g12b: move G12B thermal nodes to meson-g12b.dtsi
arm64: dts: meson-sm1: add cpu thermal nodes

[...]

Applied, thanks!

[1/2] arm64: dts: meson-g12b: move G12B thermal nodes to meson-g12b.dtsi

      commit: fef8ddfeaef8b7c91175e76bda7e4bd207b2d179
[2/2] arm64: dts: meson-sm1: add cpu thermal nodes
      commit: 410763ffbf629eee72f0257501dd448f861e3693

Best regards,

Signature · 1 line
Kevin Hilman <[email protected]>
#4 lore raw
In reply to Neil Armstrong
This series was applied to khilman/linux-amlogic.git (refs/heads/for-next).

Hello:

This series was applied to khilman/linux-amlogic.git (refs/heads/for-next).

Quoted 9 lines · On Tue, 12 May 2020 11:39:14 +0200 you wrote:

SM1 Thermal is missing and broken since the G12A/G12B thermal enablement, fix this here by moving the g12b thermal nodes to meson-g12b.dtsi and adding the proper sm1 thermal nodes.

Neil Armstrong (2):
arm64: dts: meson-g12b: move G12B thermal nodes to meson-g12b.dtsi
arm64: dts: meson-sm1: add cpu thermal nodes

[...]

Here is a summary with links:
- [1/2] arm64: dts: meson-g12b: move G12B thermal nodes to meson-g12b.dtsi

    https://git.kernel.org/khilman/linux-amlogic/c/fc9eab4b4276481ab1625d56bde57a87d73987bb
  - [2/2] arm64: dts: meson-sm1: add cpu thermal nodes
    https://git.kernel.org/khilman/linux-amlogic/c/c30dd9270197d060dae9e6d8f0b7f7864341cb2c

You are awesome, thank you!

Signature · 7 lines
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/pwbot

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic