Skip to contentSkip to conversation

thermal: broadcom: complete and extend to NSP

RFC In review Jon Mason 3 participants 6 messages Mar 23, 2017 1 message not in the archive

Subsystems (6)
lore
Share & tools
lore

Jon Mason

author
#0 lore raw

cover thermal: broadcom: complete and extend to NSP

This patch series is intended to complete the implementation submitted in http://www.spinics.net/lists/devicetree/msg168813.html
It lacked the Kconfig select options and DT bindings for BCM5301X. Also, it did not allow for NSP to be selected. This series addresses that.

I'm sending this as an RFC, as that series has not been included (or reviewed) yet. If Rafal wants to include these in a v2 of his series, then I am agreeable with that.

Jon Mason (3):
thermal: broadcom: Allow for NSP to use ns-thermal driver
ARM: dts: NSP: Add Thermal Support
ARM: dts: BCM5301X: Add Thermal Support

 arch/arm/boot/dts/bcm-nsp.dtsi   | 15 +++++++++++++++
 arch/arm/boot/dts/bcm5301x.dtsi  | 15 +++++++++++++++
 arch/arm/mach-bcm/Kconfig        |  2 ++
 drivers/thermal/broadcom/Kconfig |  2 +-
 4 files changed, 33 insertions(+), 1 deletion(-)
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1490296728-14733-1-git-send-email-jon.mason-dY08KVG/lbpWk0Htik3J/[email protected]

author
#2 lore raw

RFC 1/3 thermal: broadcom: Allow for NSP to use ns-thermal driver

Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows the ns-thermal driver to be selected via menuconfig. Also, change the ns-thermal driver to work on any iProc based SoC.

---
 arch/arm/mach-bcm/Kconfig        | 2 ++
 drivers/thermal/broadcom/Kconfig | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-bcm/Kconfig +2 -0
index f9389c5..b96840a 100644
@@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
 	select GPIOLIB
 	select ARM_AMBA
 	select PINCTRL
+	select THERMAL
+	select THERMAL_OF
 	help
 	  This enables support for systems based on Broadcom IPROC architected SoCs.
 	  The IPROC complex contains one or more ARM CPUs along with common
drivers/thermal/broadcom/Kconfig +1 -1
index 08457a4..39b92a1 100644
@@ -1,6 +1,6 @@
 config BCM_NS_THERMAL
 	tristate "Northstar thermal driver"
-	depends on ARCH_BCM_5301X || COMPILE_TEST
+	depends on ARCH_BCM_IPROC || COMPILE_TEST
 	help
 	  Northstar's DMU (Device Management Unit) block contains a thermal
 	  sensor that allows checking CPU temperature. This driver provides
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#3 lore raw

RFC 2/3 ARM: dts: NSP: Add Thermal Support

In reply to a message not in the archive

Add thermal support via the ns-thermal driver and create a single thermal zone for the entire SoC.

---
 arch/arm/boot/dts/bcm-nsp.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/boot/dts/bcm-nsp.dtsi +15 -0
index 37076a2..89eb470 100644
@@ -398,6 +398,12 @@
 			      <0x3f408 0x04>;
 		};
 
+		pvtmon: thermal@3f2c0 {
+			compatible = "brcm,ns-thermal";
+			reg = <0x3f2c0 0x10>;
+			#thermal-sensor-cells = <0>;
+		};
+
 		sata_phy: sata_phy@40100 {
 			compatible = "brcm,iproc-nsp-sata-phy";
 			reg = <0x40100 0x340>;
@@ -548,4 +554,13 @@
 			brcm,pcie-msi-inten;
 		};
 	};
+
+	thermal-zones {
+		soc {
+			polling-delay-passive = <100>; /* milliseconds */
+			polling-delay = <5000>; /* milliseconds */
+
+			thermal-sensors = <&pvtmon>;
+		};
+	};
 };
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw
In reply to a message not in the archive
Quoted 9 lines · Jon Mason

This patch series is intended to complete the implementation submitted in http://www.spinics.net/lists/devicetree/msg168813.html
It lacked the Kconfig select options and DT bindings for BCM5301X. Also, it did not allow for NSP to be selected. This series addresses that.

I'm sending this as an RFC, as that series has not been included (or reviewed) yet. If Rafal wants to include these in a v2 of his series, then I am agreeable with that.

This sounds great, but I think dts changes should go through separated (Florian's) tree. So my plan is to combine my patch with your 1/3.

Does it sound OK to you?
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw
Quoted 7 lines · Rafał Miłecki
Quoted 6 lines · Jon Mason

This patch series is intended to complete the implementation submitted in http://www.spinics.net/lists/devicetree/msg168813.html
It lacked the Kconfig select options and DT bindings for BCM5301X. Also, it did not allow for NSP to be selected. This series addresses that.

Quoted 8 lines
Quoted 3 lines

I'm sending this as an RFC, as that series has not been included (or reviewed) yet. If Rafal wants to include these in a v2 of his series, then I am agreeable with that.

This sounds great, but I think dts changes should go through separated (Florian's) tree. So my plan is to combine my patch with your 1/3.

Does it sound OK to you?

Sounds great. I can send that as a follow-on, after your patch series is accepted.

Thanks,
Jon

BTW, I mean to show the console output in my 0/3 email. For NSP, it is

# cat /sys/class/thermal/thermal_zone0/temp
46036
#6 lore raw

RFC 3/3 ARM: dts: BCM5301X: Add Thermal Support

In reply to Jon Mason

Add thermal support via the ns-thermal driver and create a single thermal zone for the entire SoC.

---
 arch/arm/boot/dts/bcm5301x.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/boot/dts/bcm5301x.dtsi +15 -0
index ceca664..ba4bcef 100644
@@ -351,6 +351,12 @@
 				     "sata2";
 	};
 
+	pvtmon: thermal@1800c2c0 {
+		compatible = "brcm,ns-thermal";
+		reg = <0x1800c2c0 0x10>;
+		#thermal-sensor-cells = <0>;
+	};
+
 	srab: srab@18007000 {
 		compatible = "brcm,bcm5301x-srab";
 		reg = <0x18007000 0x1000>;
@@ -414,4 +420,13 @@
 			status = "disabled";
 		};
 	};
+
+	thermal-zones {
+		soc {
+			polling-delay-passive = <100>; /* milliseconds */
+			polling-delay = <5000>; /* milliseconds */
+
+			thermal-sensors = <&pvtmon>;
+		};
+	};
 };
Signature · 1 line
2.7.4