devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/3] thermal: broadcom: complete and extend to NSP
@ 2017-03-23 19:18 Jon Mason
       [not found] ` <1490296728-14733-1-git-send-email-jon.mason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
  2017-03-23 19:18 ` [RFC 3/3] ARM: dts: BCM5301X: Add Thermal Support Jon Mason
  0 siblings, 2 replies; 6+ messages in thread
From: Jon Mason @ 2017-03-23 19:18 UTC (permalink / raw)
  To: zajec5-Re5JQEeQqe8AvxtiuMwx3w
  Cc: Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland,
	linux-pm-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w

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(-)

-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RFC 1/3] thermal: broadcom: Allow for NSP to use ns-thermal driver
       [not found] ` <1490296728-14733-1-git-send-email-jon.mason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
@ 2017-03-23 19:18   ` Jon Mason
  2017-03-23 19:18   ` [RFC 2/3] ARM: dts: NSP: Add Thermal Support Jon Mason
  2017-03-23 19:21   ` [RFC 0/3] thermal: broadcom: complete and extend to NSP Rafał Miłecki
  2 siblings, 0 replies; 6+ messages in thread
From: Jon Mason @ 2017-03-23 19:18 UTC (permalink / raw)
  To: zajec5-Re5JQEeQqe8AvxtiuMwx3w
  Cc: Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland,
	linux-pm-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w

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.

Signed-off-by: Jon Mason <jon.mason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
---
 arch/arm/mach-bcm/Kconfig        | 2 ++
 drivers/thermal/broadcom/Kconfig | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
index f9389c5..b96840a 100644
--- a/arch/arm/mach-bcm/Kconfig
+++ b/arch/arm/mach-bcm/Kconfig
@@ -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
diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
index 08457a4..39b92a1 100644
--- a/drivers/thermal/broadcom/Kconfig
+++ b/drivers/thermal/broadcom/Kconfig
@@ -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
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [RFC 2/3] ARM: dts: NSP: Add Thermal Support
       [not found] ` <1490296728-14733-1-git-send-email-jon.mason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
  2017-03-23 19:18   ` [RFC 1/3] thermal: broadcom: Allow for NSP to use ns-thermal driver Jon Mason
@ 2017-03-23 19:18   ` Jon Mason
  2017-03-23 19:21   ` [RFC 0/3] thermal: broadcom: complete and extend to NSP Rafał Miłecki
  2 siblings, 0 replies; 6+ messages in thread
From: Jon Mason @ 2017-03-23 19:18 UTC (permalink / raw)
  To: zajec5-Re5JQEeQqe8AvxtiuMwx3w
  Cc: Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland,
	linux-pm-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w

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

Signed-off-by: Jon Mason <jon.mason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
---
 arch/arm/boot/dts/bcm-nsp.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
index 37076a2..89eb470 100644
--- a/arch/arm/boot/dts/bcm-nsp.dtsi
+++ b/arch/arm/boot/dts/bcm-nsp.dtsi
@@ -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>;
+		};
+	};
 };
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [RFC 3/3] ARM: dts: BCM5301X: Add Thermal Support
  2017-03-23 19:18 [RFC 0/3] thermal: broadcom: complete and extend to NSP Jon Mason
       [not found] ` <1490296728-14733-1-git-send-email-jon.mason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
@ 2017-03-23 19:18 ` Jon Mason
  1 sibling, 0 replies; 6+ messages in thread
From: Jon Mason @ 2017-03-23 19:18 UTC (permalink / raw)
  To: zajec5
  Cc: Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland, linux-pm,
	devicetree, bcm-kernel-feedback-list

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

Signed-off-by: Jon Mason <jon.mason@broadcom.com>
---
 arch/arm/boot/dts/bcm5301x.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index ceca664..ba4bcef 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -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>;
+		};
+	};
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [RFC 0/3] thermal: broadcom: complete and extend to NSP
       [not found] ` <1490296728-14733-1-git-send-email-jon.mason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
  2017-03-23 19:18   ` [RFC 1/3] thermal: broadcom: Allow for NSP to use ns-thermal driver Jon Mason
  2017-03-23 19:18   ` [RFC 2/3] ARM: dts: NSP: Add Thermal Support Jon Mason
@ 2017-03-23 19:21   ` Rafał Miłecki
  2017-03-23 19:29     ` Jon Mason
  2 siblings, 1 reply; 6+ messages in thread
From: Rafał Miłecki @ 2017-03-23 19:21 UTC (permalink / raw)
  To: Jon Mason
  Cc: Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland,
	linux-pm-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	bcm-kernel-feedback-list

On 23 March 2017 at 20:18, Jon Mason <jon.mason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> wrote:
> 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC 0/3] thermal: broadcom: complete and extend to NSP
  2017-03-23 19:21   ` [RFC 0/3] thermal: broadcom: complete and extend to NSP Rafał Miłecki
@ 2017-03-23 19:29     ` Jon Mason
  0 siblings, 0 replies; 6+ messages in thread
From: Jon Mason @ 2017-03-23 19:29 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland, linux-pm,
	devicetree@vger.kernel.org, bcm-kernel-feedback-list

On Thu, Mar 23, 2017 at 08:21:57PM +0100, Rafał Miłecki wrote:
> On 23 March 2017 at 20:18, Jon Mason <jon.mason@broadcom.com> wrote:
> > 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?

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-23 19:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-23 19:18 [RFC 0/3] thermal: broadcom: complete and extend to NSP Jon Mason
     [not found] ` <1490296728-14733-1-git-send-email-jon.mason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-03-23 19:18   ` [RFC 1/3] thermal: broadcom: Allow for NSP to use ns-thermal driver Jon Mason
2017-03-23 19:18   ` [RFC 2/3] ARM: dts: NSP: Add Thermal Support Jon Mason
2017-03-23 19:21   ` [RFC 0/3] thermal: broadcom: complete and extend to NSP Rafał Miłecki
2017-03-23 19:29     ` Jon Mason
2017-03-23 19:18 ` [RFC 3/3] ARM: dts: BCM5301X: Add Thermal Support Jon Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).