All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFT] arm64: dts: renesas: r8a77990: add thermal device support
@ 2018-10-15 14:12 ` Yoshihiro Kaneko
  0 siblings, 0 replies; 6+ messages in thread
From: Yoshihiro Kaneko @ 2018-10-15 14:12 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Simon Horman, Geert Uytterhoeven, Magnus Damm, linux-arm-kernel

This patch adds the thermal device node and the thermal-zone for
the R8A77990 SoC.

Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
---

This patch is based on the devel branch of Simon Horman's renesas tree.

 arch/arm64/boot/dts/renesas/r8a77990.dtsi | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a77990.dtsi b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
index 7278cd5..5381466 100644
--- a/arch/arm64/boot/dts/renesas/r8a77990.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
@@ -341,6 +341,18 @@
 			#power-domain-cells = <1>;
 		};
 
+		thermal: thermal@e6190000 {
+			compatible = "renesas,thermal-r8a77990";
+			reg = <0 0xe6190000 0 0x10>, <0 0xe6190100 0 0x38>;
+			interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 522>;
+			power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+			resets = <&cpg 522>;
+			#thermal-sensor-cells = <0>;
+		};
+
 		intc_ex: interrupt-controller@e61c0000 {
 			compatible = "renesas,intc-ex-r8a77990", "renesas,irqc";
 			#interrupt-cells = <2>;
@@ -1063,6 +1075,25 @@
 		};
 	};
 
+	thermal-zones {
+		cpu-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&thermal>;
+
+			trips {
+				cpu-crit {
+					temperature = <120000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+			};
+		};
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
-- 
1.9.1

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

* [PATCH/RFT] arm64: dts: renesas: r8a77990: add thermal device support
@ 2018-10-15 14:12 ` Yoshihiro Kaneko
  0 siblings, 0 replies; 6+ messages in thread
From: Yoshihiro Kaneko @ 2018-10-15 14:12 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds the thermal device node and the thermal-zone for
the R8A77990 SoC.

Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
---

This patch is based on the devel branch of Simon Horman's renesas tree.

 arch/arm64/boot/dts/renesas/r8a77990.dtsi | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a77990.dtsi b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
index 7278cd5..5381466 100644
--- a/arch/arm64/boot/dts/renesas/r8a77990.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
@@ -341,6 +341,18 @@
 			#power-domain-cells = <1>;
 		};
 
+		thermal: thermal at e6190000 {
+			compatible = "renesas,thermal-r8a77990";
+			reg = <0 0xe6190000 0 0x10>, <0 0xe6190100 0 0x38>;
+			interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 522>;
+			power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+			resets = <&cpg 522>;
+			#thermal-sensor-cells = <0>;
+		};
+
 		intc_ex: interrupt-controller at e61c0000 {
 			compatible = "renesas,intc-ex-r8a77990", "renesas,irqc";
 			#interrupt-cells = <2>;
@@ -1063,6 +1075,25 @@
 		};
 	};
 
+	thermal-zones {
+		cpu-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&thermal>;
+
+			trips {
+				cpu-crit {
+					temperature = <120000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+			};
+		};
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
-- 
1.9.1

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

* Re: [PATCH/RFT] arm64: dts: renesas: r8a77990: add thermal device support
  2018-10-15 14:12 ` Yoshihiro Kaneko
@ 2018-10-17  9:58   ` Simon Horman
  -1 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2018-10-17  9:58 UTC (permalink / raw)
  To: Yoshihiro Kaneko
  Cc: linux-renesas-soc, Geert Uytterhoeven, Magnus Damm, linux-arm-kernel

On Mon, Oct 15, 2018 at 11:12:26PM +0900, Yoshihiro Kaneko wrote:
> This patch adds the thermal device node and the thermal-zone for
> the R8A77990 SoC.
> 
> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Thanks,

This looks fine to me but I will wait to see if there are other reviews
before applying.

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

Also tested on Ebisu/E3 in conjunction with "[PATCH/RFT 0/2] thermal: add
suport for R8A77990"

# X=1000000; while [ "$X" -gt 0 ]; do X=$(($X -1 )); done; cat
# /sys/devices/virtual/thermal/thermal_zone0/temp; sleep 1; cat
# /sys/devices/virtual/thermal/thermal_zone0/temp
30000
25000

Tested-by: Simon Horman <horms+renesas@verge.net.au>

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

* [PATCH/RFT] arm64: dts: renesas: r8a77990: add thermal device support
@ 2018-10-17  9:58   ` Simon Horman
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2018-10-17  9:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 15, 2018 at 11:12:26PM +0900, Yoshihiro Kaneko wrote:
> This patch adds the thermal device node and the thermal-zone for
> the R8A77990 SoC.
> 
> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Thanks,

This looks fine to me but I will wait to see if there are other reviews
before applying.

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

Also tested on Ebisu/E3 in conjunction with "[PATCH/RFT 0/2] thermal: add
suport for R8A77990"

# X=1000000; while [ "$X" -gt 0 ]; do X=$(($X -1 )); done; cat
# /sys/devices/virtual/thermal/thermal_zone0/temp; sleep 1; cat
# /sys/devices/virtual/thermal/thermal_zone0/temp
30000
25000

Tested-by: Simon Horman <horms+renesas@verge.net.au>

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

* Re: [PATCH/RFT] arm64: dts: renesas: r8a77990: add thermal device support
  2018-10-17  9:58   ` Simon Horman
@ 2018-11-23 12:38     ` Simon Horman
  -1 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2018-11-23 12:38 UTC (permalink / raw)
  To: Yoshihiro Kaneko
  Cc: linux-renesas-soc, Geert Uytterhoeven, Magnus Damm, linux-arm-kernel

On Wed, Oct 17, 2018 at 11:58:29AM +0200, Simon Horman wrote:
> On Mon, Oct 15, 2018 at 11:12:26PM +0900, Yoshihiro Kaneko wrote:
> > This patch adds the thermal device node and the thermal-zone for
> > the R8A77990 SoC.
> > 
> > Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
> Thanks,
> 
> This looks fine to me but I will wait to see if there are other reviews
> before applying.
> 
> Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
> 
> Also tested on Ebisu/E3 in conjunction with "[PATCH/RFT 0/2] thermal: add
> suport for R8A77990"
> 
> # X=1000000; while [ "$X" -gt 0 ]; do X=$(($X -1 )); done; cat
> # /sys/devices/virtual/thermal/thermal_zone0/temp; sleep 1; cat
> # /sys/devices/virtual/thermal/thermal_zone0/temp
> 30000
> 25000
> 
> Tested-by: Simon Horman <horms+renesas@verge.net.au>
> 

I was waiting for the bindings to be reviewed, that has now happened
and I have applied this patch for v4.21.

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

* [PATCH/RFT] arm64: dts: renesas: r8a77990: add thermal device support
@ 2018-11-23 12:38     ` Simon Horman
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2018-11-23 12:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 17, 2018 at 11:58:29AM +0200, Simon Horman wrote:
> On Mon, Oct 15, 2018 at 11:12:26PM +0900, Yoshihiro Kaneko wrote:
> > This patch adds the thermal device node and the thermal-zone for
> > the R8A77990 SoC.
> > 
> > Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
> Thanks,
> 
> This looks fine to me but I will wait to see if there are other reviews
> before applying.
> 
> Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
> 
> Also tested on Ebisu/E3 in conjunction with "[PATCH/RFT 0/2] thermal: add
> suport for R8A77990"
> 
> # X=1000000; while [ "$X" -gt 0 ]; do X=$(($X -1 )); done; cat
> # /sys/devices/virtual/thermal/thermal_zone0/temp; sleep 1; cat
> # /sys/devices/virtual/thermal/thermal_zone0/temp
> 30000
> 25000
> 
> Tested-by: Simon Horman <horms+renesas@verge.net.au>
> 

I was waiting for the bindings to be reviewed, that has now happened
and I have applied this patch for v4.21.

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

end of thread, other threads:[~2018-11-23 23:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15 14:12 [PATCH/RFT] arm64: dts: renesas: r8a77990: add thermal device support Yoshihiro Kaneko
2018-10-15 14:12 ` Yoshihiro Kaneko
2018-10-17  9:58 ` Simon Horman
2018-10-17  9:58   ` Simon Horman
2018-11-23 12:38   ` Simon Horman
2018-11-23 12:38     ` Simon Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.