All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] thermal: Add support for R-Car V3U (r8a779a0)
@ 2020-11-26 22:30 Niklas Söderlund
  2020-11-26 22:30 ` [PATCH 1/3] dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support Niklas Söderlund
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Niklas Söderlund @ 2020-11-26 22:30 UTC (permalink / raw)
  To: Geert Uytterhoeven, devicetree, linux-pm
  Cc: linux-renesas-soc, Niklas Söderlund

Hello,

This series enables support for the R-Car V3U r8a779a0 thermal IP. It 
needs to touch both the device tree schema and driver as the IP is a tad 
different then its siblings in the Gen3 family.

  - It have 4 TSC cells instead of 2-3 that is used in other SoCs.

  - The interrupts are no longer wired to the INTC-AP so the driver 
    can't make use of them directly and are therefor made optional for 
    the V3U bindings. For this reason this series depends on [1].

The driver is tested together with it's dependency [1] and [2] on V3U 
and all 4 thermal sensors behaves as expected. The driver has also been 
tested on other R-Car Gen3 SoC for regressions, none where found.

The additional THCODE tuning parameters used in 3/3 are taken from the 
datasheet example and may need to be updated. In future the tuning 
parameters shall be read from fused registers on the IP directly and the 
hardcoded values in the driver only used as fallback for IP where the 
values are not fused.

1. [PATCH] thermal: rcar_gen3_thermal: Do not use interrupts for normal operation
2. [PATCH 0/2] clk: renesas: r8a779a0: Add clocks to support thermal

Niklas Söderlund (3):
  dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support
  arm64: dts: renesas: r8a779a0: Add thermal support
  thermal: rcar_gen3_thermal: Add r8a779a0 support

 .../bindings/thermal/rcar-gen3-thermal.yaml   | 17 ++++-
 arch/arm64/boot/dts/renesas/r8a779a0.dtsi     | 70 +++++++++++++++++++
 drivers/thermal/rcar_gen3_thermal.c           |  7 +-
 3 files changed, 91 insertions(+), 3 deletions(-)

-- 
2.29.2


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

* [PATCH 1/3] dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support
  2020-11-26 22:30 [PATCH 0/3] thermal: Add support for R-Car V3U (r8a779a0) Niklas Söderlund
@ 2020-11-26 22:30 ` Niklas Söderlund
  2020-12-08 18:11   ` Rob Herring
                     ` (2 more replies)
  2020-11-26 22:30 ` [PATCH 2/3] arm64: dts: renesas: r8a779a0: Add thermal support Niklas Söderlund
  2020-11-26 22:30 ` [PATCH 3/3] thermal: rcar_gen3_thermal: Add r8a779a0 support Niklas Söderlund
  2 siblings, 3 replies; 10+ messages in thread
From: Niklas Söderlund @ 2020-11-26 22:30 UTC (permalink / raw)
  To: Geert Uytterhoeven, devicetree, linux-pm
  Cc: linux-renesas-soc, Niklas Söderlund

Add support for R-Car V3U. The V3U IP differs a bit from its siblings in
such way that it have 4 TSC nodes and the interrupts are not routed to
the INTC-AP but to the ECM.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 .../bindings/thermal/rcar-gen3-thermal.yaml     | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml b/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml
index f386f2a7c06c95c7..b33a76eeac4e4fed 100644
--- a/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml
@@ -26,13 +26,16 @@ properties:
       - renesas,r8a77961-thermal # R-Car M3-W+
       - renesas,r8a77965-thermal # R-Car M3-N
       - renesas,r8a77980-thermal # R-Car V3H
+      - renesas,r8a779a0-thermal # R-Car V3U
+
   reg:
     minItems: 2
-    maxItems: 3
+    maxItems: 4
     items:
       - description: TSC1 registers
       - description: TSC2 registers
       - description: TSC3 registers
+      - description: TSC4 registers
 
   interrupts:
     items:
@@ -55,12 +58,22 @@ properties:
 required:
   - compatible
   - reg
-  - interrupts
   - clocks
   - power-domains
   - resets
   - "#thermal-sensor-cells"
 
+if:
+  not:
+    properties:
+      compatible:
+        contains:
+          enum:
+            - renesas,r8a779a0-thermal
+then:
+  required:
+    - interrupts
+
 additionalProperties: false
 
 examples:
-- 
2.29.2


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

* [PATCH 2/3] arm64: dts: renesas: r8a779a0: Add thermal support
  2020-11-26 22:30 [PATCH 0/3] thermal: Add support for R-Car V3U (r8a779a0) Niklas Söderlund
  2020-11-26 22:30 ` [PATCH 1/3] dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support Niklas Söderlund
@ 2020-11-26 22:30 ` Niklas Söderlund
  2021-01-05 10:27   ` Geert Uytterhoeven
  2020-11-26 22:30 ` [PATCH 3/3] thermal: rcar_gen3_thermal: Add r8a779a0 support Niklas Söderlund
  2 siblings, 1 reply; 10+ messages in thread
From: Niklas Söderlund @ 2020-11-26 22:30 UTC (permalink / raw)
  To: Geert Uytterhoeven, devicetree, linux-pm
  Cc: linux-renesas-soc, Niklas Söderlund

Add support for thermal.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 70 +++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a779a0.dtsi b/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
index 6cf77ce9aa9372ce..5bcce5fcfbf5f43d 100644
--- a/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
@@ -91,6 +91,18 @@ sysc: system-controller@e6180000 {
 			#power-domain-cells = <1>;
 		};
 
+		tsc: thermal@e6190000 {
+			compatible = "renesas,r8a779a0-thermal";
+			reg = <0 0xe6190000 0 0x100>,
+			      <0 0xe6198000 0 0x100>,
+			      <0 0xe61a0000 0 0x100>,
+			      <0 0xe61a8000 0 0x100>;
+			clocks = <&cpg CPG_MOD 919>;
+			power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
+			resets = <&cpg 919>;
+			#thermal-sensor-cells = <1>;
+		};
+
 		scif0: serial@e6e60000 {
 			compatible = "renesas,scif-r8a779a0",
 				     "renesas,rcar-gen3-scif", "renesas,scif";
@@ -123,6 +135,64 @@ prr: chipid@fff00044 {
 		};
 	};
 
+	thermal-zones {
+		sensor_thermal1: sensor-thermal1 {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&tsc 0>;
+
+			trips {
+				sensor1_crit: sensor1-crit {
+					temperature = <120000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		sensor_thermal2: sensor-thermal2 {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&tsc 1>;
+
+			trips {
+				sensor2_crit: sensor2-crit {
+					temperature = <120000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		sensor_thermal3: sensor-thermal3 {
+			polling-delay-passive = <250>;
+			polling-delay = <1000>;
+			thermal-sensors = <&tsc 2>;
+
+			trips {
+				sensor3_crit: sensor3-crit {
+					temperature = <120000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		sensor_thermal4: sensor-thermal4 {
+			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(1) | IRQ_TYPE_LEVEL_LOW)>,
-- 
2.29.2


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

* [PATCH 3/3] thermal: rcar_gen3_thermal: Add r8a779a0 support
  2020-11-26 22:30 [PATCH 0/3] thermal: Add support for R-Car V3U (r8a779a0) Niklas Söderlund
  2020-11-26 22:30 ` [PATCH 1/3] dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support Niklas Söderlund
  2020-11-26 22:30 ` [PATCH 2/3] arm64: dts: renesas: r8a779a0: Add thermal support Niklas Söderlund
@ 2020-11-26 22:30 ` Niklas Söderlund
  2020-12-11 13:09   ` [thermal: thermal/next] " thermal-bot for Niklas Söderlund
  2021-01-05 10:29   ` [PATCH 3/3] " Geert Uytterhoeven
  2 siblings, 2 replies; 10+ messages in thread
From: Niklas Söderlund @ 2020-11-26 22:30 UTC (permalink / raw)
  To: Geert Uytterhoeven, devicetree, linux-pm
  Cc: linux-renesas-soc, Niklas Söderlund

Add support for R-Car V3U. The new THCODE values are taken from the
example in the datasheet.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 drivers/thermal/rcar_gen3_thermal.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
index 94f2c133a47f66b6..75c69fe6e9553f25 100644
--- a/drivers/thermal/rcar_gen3_thermal.c
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -60,13 +60,14 @@
 #define MCELSIUS(temp)	((temp) * 1000)
 #define GEN3_FUSE_MASK	0xFFF
 
-#define TSC_MAX_NUM	3
+#define TSC_MAX_NUM	4
 
 /* default THCODE values if FUSEs are missing */
 static const int thcodes[TSC_MAX_NUM][3] = {
 	{ 3397, 2800, 2221 },
 	{ 3393, 2795, 2216 },
 	{ 3389, 2805, 2237 },
+	{ 3415, 2694, 2195 },
 };
 
 /* Structure for thermal temperature calculation */
@@ -276,6 +277,10 @@ static const struct of_device_id rcar_gen3_thermal_dt_ids[] = {
 		.compatible = "renesas,r8a77980-thermal",
 		.data = &rcar_gen3_ths_tj_1,
 	},
+	{
+		.compatible = "renesas,r8a779a0-thermal",
+		.data = &rcar_gen3_ths_tj_1,
+	},
 	{},
 };
 MODULE_DEVICE_TABLE(of, rcar_gen3_thermal_dt_ids);
-- 
2.29.2


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

* Re: [PATCH 1/3] dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support
  2020-11-26 22:30 ` [PATCH 1/3] dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support Niklas Söderlund
@ 2020-12-08 18:11   ` Rob Herring
  2020-12-11 13:09   ` [thermal: thermal/next] " thermal-bot for Niklas Söderlund
  2020-12-16  2:52   ` [PATCH 1/3] " Yoshihiro Shimoda
  2 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2020-12-08 18:11 UTC (permalink / raw)
  To: Niklas Söderlund
  Cc: devicetree, linux-pm, linux-renesas-soc, Geert Uytterhoeven

On Thu, 26 Nov 2020 23:30:26 +0100, Niklas Söderlund wrote:
> Add support for R-Car V3U. The V3U IP differs a bit from its siblings in
> such way that it have 4 TSC nodes and the interrupts are not routed to
> the INTC-AP but to the ECM.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
>  .../bindings/thermal/rcar-gen3-thermal.yaml     | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* [thermal: thermal/next] thermal: rcar_gen3_thermal: Add r8a779a0 support
  2020-11-26 22:30 ` [PATCH 3/3] thermal: rcar_gen3_thermal: Add r8a779a0 support Niklas Söderlund
@ 2020-12-11 13:09   ` thermal-bot for Niklas Söderlund
  2021-01-05 10:29   ` [PATCH 3/3] " Geert Uytterhoeven
  1 sibling, 0 replies; 10+ messages in thread
From: thermal-bot for Niklas Söderlund @ 2020-12-11 13:09 UTC (permalink / raw)
  To: linux-pm; +Cc: niklas.soderlund+renesas, Daniel Lezcano, rui.zhang, amitk

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     e854da4f51117d7340ec621face92e775bcd4d22
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//e854da4f51117d7340ec621face92e775bcd4d22
Author:        Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
AuthorDate:    Thu, 26 Nov 2020 23:30:28 +01:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Tue, 08 Dec 2020 21:18:01 +01:00

thermal: rcar_gen3_thermal: Add r8a779a0 support

Add support for R-Car V3U. The new THCODE values are taken from the
example in the datasheet.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201126223028.3119044-4-niklas.soderlund+renesas@ragnatech.se
---
 drivers/thermal/rcar_gen3_thermal.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
index 94f2c13..75c69fe 100644
--- a/drivers/thermal/rcar_gen3_thermal.c
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -60,13 +60,14 @@
 #define MCELSIUS(temp)	((temp) * 1000)
 #define GEN3_FUSE_MASK	0xFFF
 
-#define TSC_MAX_NUM	3
+#define TSC_MAX_NUM	4
 
 /* default THCODE values if FUSEs are missing */
 static const int thcodes[TSC_MAX_NUM][3] = {
 	{ 3397, 2800, 2221 },
 	{ 3393, 2795, 2216 },
 	{ 3389, 2805, 2237 },
+	{ 3415, 2694, 2195 },
 };
 
 /* Structure for thermal temperature calculation */
@@ -276,6 +277,10 @@ static const struct of_device_id rcar_gen3_thermal_dt_ids[] = {
 		.compatible = "renesas,r8a77980-thermal",
 		.data = &rcar_gen3_ths_tj_1,
 	},
+	{
+		.compatible = "renesas,r8a779a0-thermal",
+		.data = &rcar_gen3_ths_tj_1,
+	},
 	{},
 };
 MODULE_DEVICE_TABLE(of, rcar_gen3_thermal_dt_ids);

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

* [thermal: thermal/next] dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support
  2020-11-26 22:30 ` [PATCH 1/3] dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support Niklas Söderlund
  2020-12-08 18:11   ` Rob Herring
@ 2020-12-11 13:09   ` thermal-bot for Niklas Söderlund
  2020-12-16  2:52   ` [PATCH 1/3] " Yoshihiro Shimoda
  2 siblings, 0 replies; 10+ messages in thread
From: thermal-bot for Niklas Söderlund @ 2020-12-11 13:09 UTC (permalink / raw)
  To: linux-pm
  Cc: niklas.soderlund+renesas, Rob Herring, Daniel Lezcano, rui.zhang, amitk

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     d7fdfb6541f3be88d7b4d5ad0aeba7c14548eee8
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//d7fdfb6541f3be88d7b4d5ad0aeba7c14548eee8
Author:        Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
AuthorDate:    Thu, 26 Nov 2020 23:30:26 +01:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Tue, 08 Dec 2020 21:16:35 +01:00

dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support

Add support for R-Car V3U. The V3U IP differs a bit from its siblings in
such way that it have 4 TSC nodes and the interrupts are not routed to
the INTC-AP but to the ECM.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201126223028.3119044-2-niklas.soderlund+renesas@ragnatech.se
---
 Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml b/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml
index f386f2a..b33a76e 100644
--- a/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.yaml
@@ -26,13 +26,16 @@ properties:
       - renesas,r8a77961-thermal # R-Car M3-W+
       - renesas,r8a77965-thermal # R-Car M3-N
       - renesas,r8a77980-thermal # R-Car V3H
+      - renesas,r8a779a0-thermal # R-Car V3U
+
   reg:
     minItems: 2
-    maxItems: 3
+    maxItems: 4
     items:
       - description: TSC1 registers
       - description: TSC2 registers
       - description: TSC3 registers
+      - description: TSC4 registers
 
   interrupts:
     items:
@@ -55,12 +58,22 @@ properties:
 required:
   - compatible
   - reg
-  - interrupts
   - clocks
   - power-domains
   - resets
   - "#thermal-sensor-cells"
 
+if:
+  not:
+    properties:
+      compatible:
+        contains:
+          enum:
+            - renesas,r8a779a0-thermal
+then:
+  required:
+    - interrupts
+
 additionalProperties: false
 
 examples:

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

* RE: [PATCH 1/3] dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support
  2020-11-26 22:30 ` [PATCH 1/3] dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support Niklas Söderlund
  2020-12-08 18:11   ` Rob Herring
  2020-12-11 13:09   ` [thermal: thermal/next] " thermal-bot for Niklas Söderlund
@ 2020-12-16  2:52   ` Yoshihiro Shimoda
  2 siblings, 0 replies; 10+ messages in thread
From: Yoshihiro Shimoda @ 2020-12-16  2:52 UTC (permalink / raw)
  To: Niklas Söderlund, Geert Uytterhoeven, devicetree, linux-pm
  Cc: linux-renesas-soc

Hi Niklas-san,

Thank you for the patch!

> From: Niklas Söderlund, Sent: Friday, November 27, 2020 7:30 AM
> 
> Add support for R-Car V3U. The V3U IP differs a bit from its siblings in
> such way that it have 4 TSC nodes and the interrupts are not routed to

According to the datasheet, V3U has 5 TSC nodes. And, naming order differs
between V3U and other SoCs.
 - V3U: TSC0 to TSC4
 - other SoCs: TSC1 to TSC2 or 3

So, perhaps, we need to modify "items" of "reg" somehow.

Best regards,
Yoshihiro Shimoda


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

* Re: [PATCH 2/3] arm64: dts: renesas: r8a779a0: Add thermal support
  2020-11-26 22:30 ` [PATCH 2/3] arm64: dts: renesas: r8a779a0: Add thermal support Niklas Söderlund
@ 2021-01-05 10:27   ` Geert Uytterhoeven
  0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2021-01-05 10:27 UTC (permalink / raw)
  To: Niklas Söderlund
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux PM list, Linux-Renesas

Hi Niklas,

On Thu, Nov 26, 2020 at 11:30 PM Niklas Söderlund
<niklas.soderlund+renesas@ragnatech.se> wrote:
> Add support for thermal.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Thanks for your patch!

> --- a/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a779a0.dtsi
> @@ -91,6 +91,18 @@ sysc: system-controller@e6180000 {
>                         #power-domain-cells = <1>;
>                 };
>
> +               tsc: thermal@e6190000 {
> +                       compatible = "renesas,r8a779a0-thermal";
> +                       reg = <0 0xe6190000 0 0x100>,
> +                             <0 0xe6198000 0 0x100>,
> +                             <0 0xe61a0000 0 0x100>,
> +                             <0 0xe61a8000 0 0x100>;

The fifth region at 0x161b0000 is missing.

> +                       clocks = <&cpg CPG_MOD 919>;
> +                       power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>;
> +                       resets = <&cpg 919>;
> +                       #thermal-sensor-cells = <1>;
> +               };
> +
>                 scif0: serial@e6e60000 {
>                         compatible = "renesas,scif-r8a779a0",
>                                      "renesas,rcar-gen3-scif", "renesas,scif";
> @@ -123,6 +135,64 @@ prr: chipid@fff00044 {
>                 };
>         };
>
> +       thermal-zones {
> +               sensor_thermal1: sensor-thermal1 {
> +                       polling-delay-passive = <250>;
> +                       polling-delay = <1000>;
> +                       thermal-sensors = <&tsc 0>;
> +
> +                       trips {
> +                               sensor1_crit: sensor1-crit {
> +                                       temperature = <120000>;
> +                                       hysteresis = <1000>;
> +                                       type = "critical";
> +                               };
> +                       };
> +               };
> +
> +               sensor_thermal2: sensor-thermal2 {
> +                       polling-delay-passive = <250>;
> +                       polling-delay = <1000>;
> +                       thermal-sensors = <&tsc 1>;
> +
> +                       trips {
> +                               sensor2_crit: sensor2-crit {
> +                                       temperature = <120000>;
> +                                       hysteresis = <1000>;
> +                                       type = "critical";
> +                               };
> +                       };
> +               };
> +
> +               sensor_thermal3: sensor-thermal3 {
> +                       polling-delay-passive = <250>;
> +                       polling-delay = <1000>;
> +                       thermal-sensors = <&tsc 2>;
> +
> +                       trips {
> +                               sensor3_crit: sensor3-crit {
> +                                       temperature = <120000>;
> +                                       hysteresis = <1000>;
> +                                       type = "critical";
> +                               };
> +                       };
> +               };
> +
> +               sensor_thermal4: sensor-thermal4 {
> +                       polling-delay-passive = <250>;
> +                       polling-delay = <1000>;
> +                       thermal-sensors = <&tsc 3>;
> +
> +                       trips {
> +                               sensor4_crit: sensor4-crit {
> +                                       temperature = <120000>;
> +                                       hysteresis = <1000>;
> +                                       type = "critical";
> +                               };
> +                       };
> +               };

Missing fifth entry.

> +       };
> +
>         timer {
>                 compatible = "arm,armv8-timer";
>                 interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>,

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 3/3] thermal: rcar_gen3_thermal: Add r8a779a0 support
  2020-11-26 22:30 ` [PATCH 3/3] thermal: rcar_gen3_thermal: Add r8a779a0 support Niklas Söderlund
  2020-12-11 13:09   ` [thermal: thermal/next] " thermal-bot for Niklas Söderlund
@ 2021-01-05 10:29   ` Geert Uytterhoeven
  1 sibling, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2021-01-05 10:29 UTC (permalink / raw)
  To: Niklas Söderlund
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux PM list, Linux-Renesas

Hi Niklas,

On Thu, Nov 26, 2020 at 11:30 PM Niklas Söderlund
<niklas.soderlund+renesas@ragnatech.se> wrote:
> Add support for R-Car V3U. The new THCODE values are taken from the
> example in the datasheet.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Thanks for your patch!

> --- a/drivers/thermal/rcar_gen3_thermal.c
> +++ b/drivers/thermal/rcar_gen3_thermal.c
> @@ -60,13 +60,14 @@
>  #define MCELSIUS(temp) ((temp) * 1000)
>  #define GEN3_FUSE_MASK 0xFFF
>
> -#define TSC_MAX_NUM    3
> +#define TSC_MAX_NUM    4

As pointed out by Shimoda-san in response to the DT binding update,
R-Car V3U has 5 sensors.

>
>  /* default THCODE values if FUSEs are missing */
>  static const int thcodes[TSC_MAX_NUM][3] = {
>         { 3397, 2800, 2221 },
>         { 3393, 2795, 2216 },
>         { 3389, 2805, 2237 },
> +       { 3415, 2694, 2195 },

No idea what the missing fifth entry should be...

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2021-01-05 10:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26 22:30 [PATCH 0/3] thermal: Add support for R-Car V3U (r8a779a0) Niklas Söderlund
2020-11-26 22:30 ` [PATCH 1/3] dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support Niklas Söderlund
2020-12-08 18:11   ` Rob Herring
2020-12-11 13:09   ` [thermal: thermal/next] " thermal-bot for Niklas Söderlund
2020-12-16  2:52   ` [PATCH 1/3] " Yoshihiro Shimoda
2020-11-26 22:30 ` [PATCH 2/3] arm64: dts: renesas: r8a779a0: Add thermal support Niklas Söderlund
2021-01-05 10:27   ` Geert Uytterhoeven
2020-11-26 22:30 ` [PATCH 3/3] thermal: rcar_gen3_thermal: Add r8a779a0 support Niklas Söderlund
2020-12-11 13:09   ` [thermal: thermal/next] " thermal-bot for Niklas Söderlund
2021-01-05 10:29   ` [PATCH 3/3] " Geert Uytterhoeven

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.