Skip to contentSkip to conversation

ARM: dts: BCM5301X: Add CPU thermal sensor and zone

PATCH New Rafał Miłecki 2 participants 4 messages Apr 14, 2017 – Apr 17, 2017 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: BCM5301X: Add CPU thermal sensor and zone

From: Rafa? Mi?ecki <[email protected]>

This uses CPU thermal sensor available on every Northstar chipset to monitor temperature. We don't have any cooling or throttling so only a critical trip was added.

---
 arch/arm/boot/dts/bcm5301x.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/bcm5301x.dtsi +26 -0
index 6a2afe7880ae..bbf39deb89f3 100644
@@ -356,6 +356,12 @@
 				     "sata2";
 	};
 
+	thermal: thermal at 1800c2c0 {
+		compatible = "brcm,ns-thermal";
+		reg = <0x1800c2c0 0x10>;
+		#thermal-sensor-cells = <0>;
+	};
+
 	srab: srab at 18007000 {
 		compatible = "brcm,bcm5301x-srab";
 		reg = <0x18007000 0x1000>;
@@ -419,4 +425,24 @@
 			status = "disabled";
 		};
 	};
+
+	thermal-zones {
+		cpu_thermal: cpu-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <1000>;
+			coefficients = <(-556) 418000>;
+			thermal-sensors = <&thermal>;
+
+			trips {
+				cpu-crit {
+					temperature	= <125000>;
+					hysteresis	= <0>;
+					type		= "critical";
+				};
+			};
+
+			cooling-maps {
+			};
+		};
+	};
 };
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 ARM: dts: BCM5301X: Add CPU thermal sensor and zone

Quoted 5 lines · Rafa? Mi?ecki

From: Rafa? Mi?ecki <[email protected]>

This uses CPU thermal sensor available on every Northstar chipset to monitor temperature. We don't have any cooling or throttling so only a critical trip was added.

Haha! You beat me to it (as I had a similar patch queued).

This looks good to me.

Quoted 51 lines
---
 arch/arm/boot/dts/bcm5301x.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/bcm5301x.dtsi +26 -1
index 6a2afe7880ae..bbf39deb89f3 100644
@@ -356,6 +356,12 @@
                                     "sata2";
        };
 
+       thermal: thermal at 1800c2c0 {
+               compatible = "brcm,ns-thermal";
+               reg = <0x1800c2c0 0x10>;
+               #thermal-sensor-cells = <0>;
+       };
+
        srab: srab at 18007000 {
                compatible = "brcm,bcm5301x-srab";
                reg = <0x18007000 0x1000>;
@@ -419,4 +425,24 @@
                        status = "disabled";
                };
        };
+
+       thermal-zones {
+               cpu_thermal: cpu-thermal {
+                       polling-delay-passive = <0>;
+                       polling-delay = <1000>;
+                       coefficients = <(-556) 418000>;
+                       thermal-sensors = <&thermal>;
+
+                       trips {
+                               cpu-crit {
+                                       temperature     = <125000>;
+                                       hysteresis      = <0>;
+                                       type            = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                       };
+               };
+       };
 };
--

2.11.0

#2 lore raw

PATCH 1/1 ARM: dts: BCM5301X: Add CPU thermal sensor and zone

Quoted 7 lines · Jon Mason
Quoted 5 lines · Rafa? Mi?ecki

From: Rafa? Mi?ecki <[email protected]>

This uses CPU thermal sensor available on every Northstar chipset to monitor temperature. We don't have any cooling or throttling so only a critical trip was added.

Quoted 5 lines

Haha! You beat me to it (as I had a similar patch queued).

This looks good to me.

:) Thanks

I'd appreciate adding thermal to NSP DT. I don't have any NSP unit to try it on my own.

#3 lore raw

PATCH 1/1 ARM: dts: BCM5301X: Add CPU thermal sensor and zone

Quoted 10 lines · Rafa? Mi?ecki
Quoted 9 lines · Jon Mason
Quoted 5 lines · Rafa? Mi?ecki

From: Rafa? Mi?ecki <[email protected]>

This uses CPU thermal sensor available on every Northstar chipset to monitor temperature. We don't have any cooling or throttling so only a critical trip was added.

Haha! You beat me to it (as I had a similar patch queued).

Quoted 8 lines
Quoted 3 lines

This looks good to me.

:) Thanks

I'd appreciate adding thermal to NSP DT. I don't have any NSP unit to try it on my own.

I'm doing so right now. I have it working, I just need to clean up the patches.