Skip to contentSkip to conversation

arm64: dts: rockchip: cleanup cpu_thermal node of rk3399-rock960.dts

PATCH Superseded Johan Jonker 1 participant 2 messages Jan 18, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: rockchip: cleanup cpu_thermal node of rk3399-rock960.dts

The cpu_thermal node in the rk3399-rock960.dts file does not reference &cpu_thermal directly to add the board-specific parts, but also repeats all the SoC default properties.
Clean the whole thing up and fix alignment.
Place node in the correct alphabetical order.

---
 arch/arm64/boot/dts/rockchip/rk3399-rock960.dts | 75 ++++++++++++-------------
 1 file changed, 36 insertions(+), 39 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-rock960.dts +36 -39
index b20774081..bff8a73d9 100644
@@ -63,6 +63,42 @@
 
 };
 
+&cpu_thermal {
+	polling-delay-passive = <100>;
+	polling-delay = <1000>;
+	thermal-sensors = <&tsadc 0>;
+	sustainable-power = <1550>;
+
+	trips {
+		cpu_alert0: cpu_alert0 {
+			temperature = <65000>;
+			hysteresis = <2000>;
+			type = "passive";
+		};
+
+		cpu_alert1: cpu_alert1 {
+			temperature = <75000>;
+			hysteresis = <2000>;
+			type = "passive";
+		};
+
+		cpu_crit: cpu_crit {
+			temperature = <95000>;
+			hysteresis = <2000>;
+			type = "critical";
+		};
+	};
+
+	cooling-maps {
+		map0 {
+			trip = <&cpu_alert1>;
+			cooling-device =
+				<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+				<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+		};
+	};
+};
+
 &pcie0 {
 	ep-gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_HIGH>;
 };
@@ -125,45 +161,6 @@
 	status = "okay";
 };
 
-&thermal_zones {
-	cpu_thermal: cpu-thermal {
-		polling-delay-passive = <100>;
-		polling-delay = <1000>;
-		thermal-sensors = <&tsadc 0>;
-		sustainable-power = <1550>;
-
-		trips {
-			cpu_alert0: cpu_alert0 {
-				    temperature = <65000>;
-				    hysteresis = <2000>;
-				    type = "passive";
-			};
-
-			cpu_alert1: cpu_alert1 {
-				    temperature = <75000>;
-				    hysteresis = <2000>;
-				    type = "passive";
-			};
-
-			cpu_crit: cpu_crit {
-				  temperature = <95000>;
-				  hysteresis = <2000>;
-				  type = "critical";
-			};
-		};
-
-		cooling-maps {
-			     map0 {
-
-			     trip = <&cpu_alert1>;
-			     cooling-device =
-					<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-					<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
-			};
-		};
-	};
-};
-
 &usbdrd_dwc3_0 {
 	dr_mode = "otg";
 };
Signature · 7 lines
2.11.0


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
#1 lore raw

Hi,

Sorry.
This can go in the bin...
It needs more cleanup...
See question below.

Quoted 85 lines · Johan Jonker

The cpu_thermal node in the rk3399-rock960.dts file does not reference &cpu_thermal directly to add the board-specific parts, but also repeats all the SoC default properties.
Clean the whole thing up and fix alignment.
Place node in the correct alphabetical order.

---
 arch/arm64/boot/dts/rockchip/rk3399-rock960.dts | 75 ++++++++++++-------------
 1 file changed, 36 insertions(+), 39 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-rock960.dts +36 -22
index b20774081..bff8a73d9 100644
@@ -63,6 +63,42 @@
 
 };
 
+&cpu_thermal {
+	polling-delay-passive = <100>;
+	polling-delay = <1000>;
+	thermal-sensors = <&tsadc 0>;
+	sustainable-power = <1550>;
+
+	trips {
+		cpu_alert0: cpu_alert0 {
+			temperature = <65000>;
+			hysteresis = <2000>;
+			type = "passive";
+		};
+
+		cpu_alert1: cpu_alert1 {
+			temperature = <75000>;
+			hysteresis = <2000>;
+			type = "passive";
+		};
+
+		cpu_crit: cpu_crit {
+			temperature = <95000>;
+			hysteresis = <2000>;
+			type = "critical";
+		};
+	};
+
+	cooling-maps {
+		map0 {
+			trip = <&cpu_alert1>;
+			cooling-device =
+				<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+				<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+		};
+	};
+};
+
 &pcie0 {
 	ep-gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_HIGH>;
 };
@@ -125,45 +161,6 @@
 	status = "okay";
 };
 
-&thermal_zones {
-	cpu_thermal: cpu-thermal {
-		polling-delay-passive = <100>;
-		polling-delay = <1000>;
-		thermal-sensors = <&tsadc 0>;
-		sustainable-power = <1550>;
-
-		trips {
-			cpu_alert0: cpu_alert0 {
-				    temperature = <65000>;
-				    hysteresis = <2000>;
-				    type = "passive";
-			};
-
-			cpu_alert1: cpu_alert1 {
-				    temperature = <75000>;
-				    hysteresis = <2000>;
-				    type = "passive";
-			};
-
-			cpu_crit: cpu_crit {
-				  temperature = <95000>;

arch/arm64/boot/dts/rockchip/rk3399-rock960.dts line 159

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3399-rock960.dts +0 -9
-				  hysteresis = <2000>;
-				  type = "critical";
-			};
-		};
-
-		cooling-maps {
 
-			     map0 {
-
-			     trip = <&cpu_alert1>;

The trip property points to "cpu_alert1", while in rk3399.dtsi that is "&cpu_alert0"
What is correct here?

Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3399-rock960.dts +0 -8
-			     cooling-device =
-					<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-					<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
-			};
-		};
-	};
-};
-
 &usbdrd_dwc3_0 {
 	dr_mode = "otg";
Quoted 2 lines

};

				map0 {
					trip = <&cpu_alert0>;
					cooling-device =
						<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
						<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
				};

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