linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: renesas: r8a779g0: Add thermal nodes
@ 2023-02-09 16:23 Geert Uytterhoeven
  2023-02-09 16:30 ` Wolfram Sang
  2023-02-09 21:37 ` Niklas Söderlund
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-02-09 16:23 UTC (permalink / raw)
  To: Magnus Damm, Niklas Söderlund
  Cc: linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven

Add device nodes for the Thermal Sensor/Chip Internal Voltage
Monitor/Core Voltage Monitor (THS/CIVM/CVM) and the various thermal
zones on the Renesas R-Car V4H (R8A779G0) SoC.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
To be queued in renesas-devel for v6.4.

For testing, this patch and its dependencies can be found at
https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/log/?h=topic/r8a779g0-thermal-v1

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

diff --git a/arch/arm64/boot/dts/renesas/r8a779g0.dtsi b/arch/arm64/boot/dts/renesas/r8a779g0.dtsi
index 70eaf79569258357..6d5ccc6f02a1173c 100644
--- a/arch/arm64/boot/dts/renesas/r8a779g0.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a779g0.dtsi
@@ -438,6 +438,18 @@ sysc: system-controller@e6180000 {
 			#power-domain-cells = <1>;
 		};
 
+		tsc: thermal@e6198000 {
+			compatible = "renesas,r8a779g0-thermal";
+			reg = <0 0xe6198000 0 0x200>,
+			      <0 0xe61a0000 0 0x200>,
+			      <0 0xe61a8000 0 0x200>,
+			      <0 0xe61b0000 0 0x200>;
+			clocks = <&cpg CPG_MOD 919>;
+			power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
+			resets = <&cpg 919>;
+			#thermal-sensor-cells = <1>;
+		};
+
 		intc_ex: interrupt-controller@e61c0000 {
 			compatible = "renesas,intc-ex-r8a779g0", "renesas,irqc";
 			#interrupt-cells = <2>;
@@ -1402,6 +1414,64 @@ prr: chipid@fff00044 {
 		};
 	};
 
+	thermal-zones {
+		sensor_thermal_cr52: sensor1-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&tsc 0>;
+
+			trips {
+				sensor1_crit: sensor1-crit {
+					temperature = <120000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		sensor_thermal_cnn: sensor2-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&tsc 1>;
+
+			trips {
+				sensor2_crit: sensor2-crit {
+					temperature = <120000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		sensor_thermal_ca76: sensor3-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&tsc 2>;
+
+			trips {
+				sensor3_crit: sensor3-crit {
+					temperature = <120000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		sensor_thermal_ddr1: sensor4-thermal {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&tsc 3>;
+
+			trips {
+				sensor4_crit: sensor4-crit {
+					temperature = <120000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: dts: renesas: r8a779g0: Add thermal nodes
  2023-02-09 16:23 [PATCH] arm64: dts: renesas: r8a779g0: Add thermal nodes Geert Uytterhoeven
@ 2023-02-09 16:30 ` Wolfram Sang
  2023-02-09 21:37 ` Niklas Söderlund
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2023-02-09 16:30 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Magnus Damm, Niklas Söderlund, linux-renesas-soc,
	linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 388 bytes --]

On Thu, Feb 09, 2023 at 05:23:30PM +0100, Geert Uytterhoeven wrote:
> Add device nodes for the Thermal Sensor/Chip Internal Voltage
> Monitor/Core Voltage Monitor (THS/CIVM/CVM) and the various thermal
> zones on the Renesas R-Car V4H (R8A779G0) SoC.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: dts: renesas: r8a779g0: Add thermal nodes
  2023-02-09 16:23 [PATCH] arm64: dts: renesas: r8a779g0: Add thermal nodes Geert Uytterhoeven
  2023-02-09 16:30 ` Wolfram Sang
@ 2023-02-09 21:37 ` Niklas Söderlund
  1 sibling, 0 replies; 3+ messages in thread
From: Niklas Söderlund @ 2023-02-09 21:37 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-renesas-soc, linux-arm-kernel

Hello Geert,

Thanks for your work.

On 2023-02-09 17:23:30 +0100, Geert Uytterhoeven wrote:
> Add device nodes for the Thermal Sensor/Chip Internal Voltage
> Monitor/Core Voltage Monitor (THS/CIVM/CVM) and the various thermal
> zones on the Renesas R-Car V4H (R8A779G0) SoC.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
> To be queued in renesas-devel for v6.4.
> 
> For testing, this patch and its dependencies can be found at
> https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/log/?h=topic/r8a779g0-thermal-v1
> 
>  arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 70 +++++++++++++++++++++++
>  1 file changed, 70 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a779g0.dtsi b/arch/arm64/boot/dts/renesas/r8a779g0.dtsi
> index 70eaf79569258357..6d5ccc6f02a1173c 100644
> --- a/arch/arm64/boot/dts/renesas/r8a779g0.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a779g0.dtsi
> @@ -438,6 +438,18 @@ sysc: system-controller@e6180000 {
>  			#power-domain-cells = <1>;
>  		};
>  
> +		tsc: thermal@e6198000 {
> +			compatible = "renesas,r8a779g0-thermal";
> +			reg = <0 0xe6198000 0 0x200>,
> +			      <0 0xe61a0000 0 0x200>,
> +			      <0 0xe61a8000 0 0x200>,
> +			      <0 0xe61b0000 0 0x200>;
> +			clocks = <&cpg CPG_MOD 919>;
> +			power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
> +			resets = <&cpg 919>;
> +			#thermal-sensor-cells = <1>;
> +		};
> +
>  		intc_ex: interrupt-controller@e61c0000 {
>  			compatible = "renesas,intc-ex-r8a779g0", "renesas,irqc";
>  			#interrupt-cells = <2>;
> @@ -1402,6 +1414,64 @@ prr: chipid@fff00044 {
>  		};
>  	};
>  
> +	thermal-zones {
> +		sensor_thermal_cr52: sensor1-thermal {
> +			polling-delay-passive = <250>;
> +			polling-delay = <1000>;
> +			thermal-sensors = <&tsc 0>;
> +
> +			trips {
> +				sensor1_crit: sensor1-crit {
> +					temperature = <120000>;
> +					hysteresis = <1000>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +
> +		sensor_thermal_cnn: sensor2-thermal {
> +			polling-delay-passive = <250>;
> +			polling-delay = <1000>;
> +			thermal-sensors = <&tsc 1>;
> +
> +			trips {
> +				sensor2_crit: sensor2-crit {
> +					temperature = <120000>;
> +					hysteresis = <1000>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +
> +		sensor_thermal_ca76: sensor3-thermal {
> +			polling-delay-passive = <250>;
> +			polling-delay = <1000>;
> +			thermal-sensors = <&tsc 2>;
> +
> +			trips {
> +				sensor3_crit: sensor3-crit {
> +					temperature = <120000>;
> +					hysteresis = <1000>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +
> +		sensor_thermal_ddr1: sensor4-thermal {
> +			polling-delay-passive = <250>;
> +			polling-delay = <1000>;
> +			thermal-sensors = <&tsc 3>;
> +
> +			trips {
> +				sensor4_crit: sensor4-crit {
> +					temperature = <120000>;
> +					hysteresis = <1000>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +	};
> +
>  	timer {
>  		compatible = "arm,armv8-timer";
>  		interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
> -- 
> 2.34.1
> 

-- 
Kind Regards,
Niklas Söderlund

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-02-09 21:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-09 16:23 [PATCH] arm64: dts: renesas: r8a779g0: Add thermal nodes Geert Uytterhoeven
2023-02-09 16:30 ` Wolfram Sang
2023-02-09 21:37 ` Niklas Söderlund

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