All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] thermal: tegra: soctherm bugfixes
@ 2020-09-27 15:09 Nicolas Chauvet
  2020-09-27 15:09 ` [PATCH v2 1/6] ARM: tegra: Add missing gpu-throt-level to tegra124 soctherm Nicolas Chauvet
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Nicolas Chauvet @ 2020-09-27 15:09 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Zhang Rui, Daniel Lezcano
  Cc: linux-tegra, linux-pm, Nicolas Chauvet

When using tegra_soctherm driver on jetson-tk1, the following messages
can be seen:
from kernel: tegra_soctherm 700e2000.thermal-sensor:
 throttle-cfg: heavy: no throt prop or invalid prop
 soctherm: trip temperature -2147483647 forced to -127000
 thermtrip: will shut down when cpu reaches 101000 mC
 soctherm: trip temperature -2147483647 forced to -127000
 thermtrip: will shut down when gpu reaches 101000 mC
 soctherm: trip temperature -2147483647 forced to -127000
 thermtrip: will shut down when pll reaches 103000 mC
 throttrip: pll: missing hot temperature
 soctherm: trip temperature -2147483647 forced to -127000
 thermtrip: will shut down when mem reaches 101000 mC
 throttrip: mem: missing hot temperature
 IRQ index 1 not found

This serie fixes two errors and two warnings that are reported in dmesg
It was compiled and tested at runtime on jetson-tk1 only.


v2:
 * Add missing tegra210 device-tree properties
 * Add the appropriate prefix for tegra soctherm
 * Use SoCs condition over of_compatible


Nicolas Chauvet (6):
  ARM: tegra: Add missing gpu-throt-level to tegra124 soctherm
  ARM: tegra: Add missing hot temperatures to tegra124 thermal-zones
  arm64: tegra: Add missing hot temperatures to tegra132 thermal-zones
  arm64: tegra: Add missing gpu-throt-level to tegra210 soctherm
  arm64: tegra: Add missing hot temperatures to tegra210 thermal-zones
  thermal: tegra: Avoid setting edp_irq when not relevant

 arch/arm/boot/dts/tegra124.dtsi           | 11 +++++++
 arch/arm64/boot/dts/nvidia/tegra132.dtsi  | 10 ++++++
 arch/arm64/boot/dts/nvidia/tegra210.dtsi  | 13 ++++++++
 drivers/thermal/tegra/soctherm.c          | 38 +++++++++++++----------
 drivers/thermal/tegra/soctherm.h          |  1 +
 drivers/thermal/tegra/tegra124-soctherm.c |  1 +
 drivers/thermal/tegra/tegra132-soctherm.c |  1 +
 drivers/thermal/tegra/tegra210-soctherm.c |  1 +
 8 files changed, 60 insertions(+), 16 deletions(-)

-- 
2.25.4


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

* [PATCH v2 1/6] ARM: tegra: Add missing gpu-throt-level to tegra124 soctherm
  2020-09-27 15:09 [PATCH v2 0/6] thermal: tegra: soctherm bugfixes Nicolas Chauvet
@ 2020-09-27 15:09 ` Nicolas Chauvet
  2020-09-27 15:09 ` [PATCH v2 2/6] ARM: tegra: Add missing hot temperatures to tegra124 thermal-zones Nicolas Chauvet
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Nicolas Chauvet @ 2020-09-27 15:09 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Zhang Rui, Daniel Lezcano
  Cc: linux-tegra, linux-pm, Nicolas Chauvet

On jetson-tk1 the following message can be seen:
 tegra_soctherm 700e2000.thermal-sensor: throttle-cfg: heavy: no throt prop or invalid prop

This patch will fix the invalid prop issue according to the binding.

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
---
 arch/arm/boot/dts/tegra124.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi
index 64f488ba1e72..a0fa5821a232 100644
--- a/arch/arm/boot/dts/tegra124.dtsi
+++ b/arch/arm/boot/dts/tegra124.dtsi
@@ -910,6 +910,7 @@ throttle-cfgs {
 			throttle_heavy: heavy {
 				nvidia,priority = <100>;
 				nvidia,cpu-throt-percent = <85>;
+				nvidia,gpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_HIGH>;
 
 				#cooling-cells = <2>;
 			};
-- 
2.25.4


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

* [PATCH v2 2/6] ARM: tegra: Add missing hot temperatures to tegra124 thermal-zones
  2020-09-27 15:09 [PATCH v2 0/6] thermal: tegra: soctherm bugfixes Nicolas Chauvet
  2020-09-27 15:09 ` [PATCH v2 1/6] ARM: tegra: Add missing gpu-throt-level to tegra124 soctherm Nicolas Chauvet
@ 2020-09-27 15:09 ` Nicolas Chauvet
  2020-09-27 15:09 ` [PATCH v2 3/6] arm64: tegra: Add missing hot temperatures to tegra132 thermal-zones Nicolas Chauvet
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Nicolas Chauvet @ 2020-09-27 15:09 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Zhang Rui, Daniel Lezcano
  Cc: linux-tegra, linux-pm, Nicolas Chauvet

According to dmesg, thermal-zones for mem and cpu are missing hot
temperatures properties.

  throttrip: pll: missing hot temperature
...
  throttrip: mem: missing hot temperature
...

Adding them will clear the messages.

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
---
 arch/arm/boot/dts/tegra124.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi
index a0fa5821a232..c71d597ace01 100644
--- a/arch/arm/boot/dts/tegra124.dtsi
+++ b/arch/arm/boot/dts/tegra124.dtsi
@@ -1248,6 +1248,11 @@ mem-shutdown-trip {
 					hysteresis = <0>;
 					type = "critical";
 				};
+				mem-throttle-trip {
+					temperature = <99000>;
+					hysteresis = <1000>;
+					type = "hot";
+				};
 			};
 
 			cooling-maps {
@@ -1299,6 +1304,11 @@ pllx-shutdown-trip {
 					hysteresis = <0>;
 					type = "critical";
 				};
+				pllx-throttle-trip {
+					temperature = <99000>;
+					hysteresis = <1000>;
+					type = "hot";
+				};
 			};
 
 			cooling-maps {
-- 
2.25.4


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

* [PATCH v2 3/6] arm64: tegra: Add missing hot temperatures to tegra132 thermal-zones
  2020-09-27 15:09 [PATCH v2 0/6] thermal: tegra: soctherm bugfixes Nicolas Chauvet
  2020-09-27 15:09 ` [PATCH v2 1/6] ARM: tegra: Add missing gpu-throt-level to tegra124 soctherm Nicolas Chauvet
  2020-09-27 15:09 ` [PATCH v2 2/6] ARM: tegra: Add missing hot temperatures to tegra124 thermal-zones Nicolas Chauvet
@ 2020-09-27 15:09 ` Nicolas Chauvet
  2020-09-27 15:09 ` [PATCH v2 4/6] arm64: tegra: Add missing gpu-throt-level to tegra210 soctherm Nicolas Chauvet
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Nicolas Chauvet @ 2020-09-27 15:09 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Zhang Rui, Daniel Lezcano
  Cc: linux-tegra, linux-pm, Nicolas Chauvet

According to dmesg, thermal-zones for mem and cpu are missing hot
temperatures properties.

  throttrip: pll: missing hot temperature
...
  throttrip: mem: missing hot temperature
...

Adding them will clear the messages.

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
---
 arch/arm64/boot/dts/nvidia/tegra132.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra132.dtsi b/arch/arm64/boot/dts/nvidia/tegra132.dtsi
index e40281510c0c..cd913e59ba26 100644
--- a/arch/arm64/boot/dts/nvidia/tegra132.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra132.dtsi
@@ -925,6 +925,11 @@ mem_shutdown_trip {
 					hysteresis = <1000>;
 					type = "critical";
 				};
+				mem_throttle_trip {
+					temperature = <99000>;
+					hysteresis = <1000>;
+					type = "hot";
+				};
 			};
 
 			cooling-maps {
@@ -975,6 +980,11 @@ pllx_shutdown_trip {
 					hysteresis = <1000>;
 					type = "critical";
 				};
+				pllx_throttle_trip {
+					temperature = <99000>;
+					hysteresis = <1000>;
+					type = "hot";
+				};
 			};
 
 			cooling-maps {
-- 
2.25.4


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

* [PATCH v2 4/6] arm64: tegra: Add missing gpu-throt-level to tegra210 soctherm
  2020-09-27 15:09 [PATCH v2 0/6] thermal: tegra: soctherm bugfixes Nicolas Chauvet
                   ` (2 preceding siblings ...)
  2020-09-27 15:09 ` [PATCH v2 3/6] arm64: tegra: Add missing hot temperatures to tegra132 thermal-zones Nicolas Chauvet
@ 2020-09-27 15:09 ` Nicolas Chauvet
  2020-09-27 15:09 ` [PATCH v2 5/6] arm64: tegra: Add missing hot temperatures to tegra210 thermal-zones Nicolas Chauvet
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Nicolas Chauvet @ 2020-09-27 15:09 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Zhang Rui, Daniel Lezcano
  Cc: linux-tegra, linux-pm, Nicolas Chauvet

On jetson-tx1 the following message can be seen:
 tegra_soctherm 700e2000.thermal-sensor: throttle-cfg: heavy: no throt prop or invalid prop

This patch will fix the invalid prop issue according to the binding.

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
---
 arch/arm64/boot/dts/nvidia/tegra210.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
index 8cca2166a446..c518292ee3f5 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
@@ -1582,6 +1582,7 @@ throttle-cfgs {
 			throttle_heavy: heavy {
 				nvidia,priority = <100>;
 				nvidia,cpu-throt-percent = <85>;
+				nvidia,gpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_HIGH>;
 
 				#cooling-cells = <2>;
 			};
-- 
2.25.4


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

* [PATCH v2 5/6] arm64: tegra: Add missing hot temperatures to tegra210 thermal-zones
  2020-09-27 15:09 [PATCH v2 0/6] thermal: tegra: soctherm bugfixes Nicolas Chauvet
                   ` (3 preceding siblings ...)
  2020-09-27 15:09 ` [PATCH v2 4/6] arm64: tegra: Add missing gpu-throt-level to tegra210 soctherm Nicolas Chauvet
@ 2020-09-27 15:09 ` Nicolas Chauvet
  2020-09-27 15:09 ` [PATCH v2 6/6] thermal: tegra: Avoid setting edp_irq when not relevant Nicolas Chauvet
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Nicolas Chauvet @ 2020-09-27 15:09 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Zhang Rui, Daniel Lezcano
  Cc: linux-tegra, linux-pm, Nicolas Chauvet

According to dmesg, thermal-zones for mem and cpu are missing hot
temperatures properties.

  throttrip: pll: missing hot temperature
...
  throttrip: mem: missing hot temperature
...

Adding them will clear the messages.

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
---
 arch/arm64/boot/dts/nvidia/tegra210.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
index c518292ee3f5..9e8ddec52651 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
@@ -1639,6 +1639,12 @@ dram_throttle: mem-throttle-trip {
 					type = "active";
 				};
 
+				mem-hot-trip {
+					temperature = <100000>;
+					hysteresis = <1000>;
+					type = "hot";
+				};
+
 				mem-shutdown-trip {
 					temperature = <103000>;
 					hysteresis = <0>;
@@ -1701,6 +1707,12 @@ pllx-shutdown-trip {
 					hysteresis = <0>;
 					type = "critical";
 				};
+
+				pllx-throttle-trip {
+					temperature = <100000>;
+					hysteresis = <1000>;
+					type = "hot";
+				};
 			};
 
 			cooling-maps {
-- 
2.25.4


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

* [PATCH v2 6/6] thermal: tegra: Avoid setting edp_irq when not relevant
  2020-09-27 15:09 [PATCH v2 0/6] thermal: tegra: soctherm bugfixes Nicolas Chauvet
                   ` (4 preceding siblings ...)
  2020-09-27 15:09 ` [PATCH v2 5/6] arm64: tegra: Add missing hot temperatures to tegra210 thermal-zones Nicolas Chauvet
@ 2020-09-27 15:09 ` Nicolas Chauvet
  2020-11-19 19:15   ` Jon Hunter
  2020-11-19 11:00 ` [PATCH v2 0/6] thermal: tegra: soctherm bugfixes Nicolas Chauvet
  2020-11-20 16:14 ` Thierry Reding
  7 siblings, 1 reply; 12+ messages in thread
From: Nicolas Chauvet @ 2020-09-27 15:09 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Zhang Rui, Daniel Lezcano
  Cc: linux-tegra, linux-pm, Nicolas Chauvet, stable

According to the binding, the edp_irq is not available on tegra124/132

This commit moves the initialization of tegra->edp_irq after the
introduced has_edp_irq condition. This will have the following effects:
 - soctherm_interrupts_init will not return prematurely with unfinished
thermal_irq initialization on tegra124 and tegra132
 - edp_irq initialization will be done only when relevant

As a result, this will clear the following error on jetson-tk1 :
  kernel: tegra_soctherm 700e2000.thermal-sensor: IRQ index 1 not found

v2:
    * Use .has_edp_irq boolean instead of of_compatible
    * Switch subject prefix to use thermal instead of ARM

Fixes: 4a04beb1bf2e (thermal: tegra: add support for EDP IRQ)
Cc: stable@vger.kernel.org
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
---
 drivers/thermal/tegra/soctherm.c          | 38 +++++++++++++----------
 drivers/thermal/tegra/soctherm.h          |  1 +
 drivers/thermal/tegra/tegra124-soctherm.c |  1 +
 drivers/thermal/tegra/tegra132-soctherm.c |  1 +
 drivers/thermal/tegra/tegra210-soctherm.c |  1 +
 5 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c
index 66e0639da4bf..0c79e033e7ea 100644
--- a/drivers/thermal/tegra/soctherm.c
+++ b/drivers/thermal/tegra/soctherm.c
@@ -2025,12 +2025,6 @@ static int soctherm_interrupts_init(struct platform_device *pdev,
 		return 0;
 	}
 
-	tegra->edp_irq = platform_get_irq(pdev, 1);
-	if (tegra->edp_irq < 0) {
-		dev_dbg(&pdev->dev, "get 'edp_irq' failed.\n");
-		return 0;
-	}
-
 	ret = devm_request_threaded_irq(&pdev->dev,
 					tegra->thermal_irq,
 					soctherm_thermal_isr,
@@ -2043,16 +2037,28 @@ static int soctherm_interrupts_init(struct platform_device *pdev,
 		return ret;
 	}
 
-	ret = devm_request_threaded_irq(&pdev->dev,
-					tegra->edp_irq,
-					soctherm_edp_isr,
-					soctherm_edp_isr_thread,
-					IRQF_ONESHOT,
-					"soctherm_edp",
-					tegra);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "request_irq 'edp_irq' failed.\n");
-		return ret;
+	/* Initialize edp_irq when available */
+	if (tegra->soc->has_edp_irq) {
+		/* get IRQ */
+
+		tegra->edp_irq = platform_get_irq(pdev, 1);
+		if (tegra->edp_irq < 0) {
+			dev_dbg(&pdev->dev, "get 'edp_irq' failed.\n");
+			return 0;
+		}
+
+		/* request IRQ */
+		ret = devm_request_threaded_irq(&pdev->dev,
+						tegra->edp_irq,
+						soctherm_edp_isr,
+						soctherm_edp_isr_thread,
+						IRQF_ONESHOT,
+						"soctherm_edp",
+						tegra);
+		if (ret < 0) {
+			dev_err(&pdev->dev, "request_irq 'edp_irq' failed.\n");
+			return ret;
+		}
 	}
 
 	return 0;
diff --git a/drivers/thermal/tegra/soctherm.h b/drivers/thermal/tegra/soctherm.h
index 70501e73d586..b93cfdd06e5d 100644
--- a/drivers/thermal/tegra/soctherm.h
+++ b/drivers/thermal/tegra/soctherm.h
@@ -128,6 +128,7 @@ struct tegra_soctherm_soc {
 	const int thresh_grain;
 	const unsigned int bptt;
 	const bool use_ccroc;
+	const bool has_edp_irq;
 	struct tsensor_group_thermtrips *thermtrips;
 };
 
diff --git a/drivers/thermal/tegra/tegra124-soctherm.c b/drivers/thermal/tegra/tegra124-soctherm.c
index 20ad27f4d1a1..c8c8231f6cdd 100644
--- a/drivers/thermal/tegra/tegra124-soctherm.c
+++ b/drivers/thermal/tegra/tegra124-soctherm.c
@@ -216,4 +216,5 @@ const struct tegra_soctherm_soc tegra124_soctherm = {
 	.thresh_grain = TEGRA124_THRESH_GRAIN,
 	.bptt = TEGRA124_BPTT,
 	.use_ccroc = false,
+	.has_edp_irq = false,
 };
diff --git a/drivers/thermal/tegra/tegra132-soctherm.c b/drivers/thermal/tegra/tegra132-soctherm.c
index b76308fdad9e..1bc9481de5fc 100644
--- a/drivers/thermal/tegra/tegra132-soctherm.c
+++ b/drivers/thermal/tegra/tegra132-soctherm.c
@@ -216,4 +216,5 @@ const struct tegra_soctherm_soc tegra132_soctherm = {
 	.thresh_grain = TEGRA132_THRESH_GRAIN,
 	.bptt = TEGRA132_BPTT,
 	.use_ccroc = true,
+	.has_edp_irq = false,
 };
diff --git a/drivers/thermal/tegra/tegra210-soctherm.c b/drivers/thermal/tegra/tegra210-soctherm.c
index d0ff793f18c5..2b09c8a811d0 100644
--- a/drivers/thermal/tegra/tegra210-soctherm.c
+++ b/drivers/thermal/tegra/tegra210-soctherm.c
@@ -224,5 +224,6 @@ const struct tegra_soctherm_soc tegra210_soctherm = {
 	.thresh_grain = TEGRA210_THRESH_GRAIN,
 	.bptt = TEGRA210_BPTT,
 	.use_ccroc = false,
+	.has_edp_irq = true,
 	.thermtrips = tegra210_tsensor_thermtrips,
 };
-- 
2.25.4


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

* Re: [PATCH v2 0/6] thermal: tegra: soctherm bugfixes
  2020-09-27 15:09 [PATCH v2 0/6] thermal: tegra: soctherm bugfixes Nicolas Chauvet
                   ` (5 preceding siblings ...)
  2020-09-27 15:09 ` [PATCH v2 6/6] thermal: tegra: Avoid setting edp_irq when not relevant Nicolas Chauvet
@ 2020-11-19 11:00 ` Nicolas Chauvet
  2020-11-19 11:04   ` Daniel Lezcano
  2020-11-20 16:14 ` Thierry Reding
  7 siblings, 1 reply; 12+ messages in thread
From: Nicolas Chauvet @ 2020-11-19 11:00 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Zhang Rui, Daniel Lezcano
  Cc: linux-tegra, linux-pm

Le dim. 27 sept. 2020 à 17:10, Nicolas Chauvet <kwizart@gmail.com> a écrit :
>
> When using tegra_soctherm driver on jetson-tk1, the following messages
> can be seen:
> from kernel: tegra_soctherm 700e2000.thermal-sensor:
>  throttle-cfg: heavy: no throt prop or invalid prop
>  soctherm: trip temperature -2147483647 forced to -127000
>  thermtrip: will shut down when cpu reaches 101000 mC
>  soctherm: trip temperature -2147483647 forced to -127000
>  thermtrip: will shut down when gpu reaches 101000 mC
>  soctherm: trip temperature -2147483647 forced to -127000
>  thermtrip: will shut down when pll reaches 103000 mC
>  throttrip: pll: missing hot temperature
>  soctherm: trip temperature -2147483647 forced to -127000
>  thermtrip: will shut down when mem reaches 101000 mC
>  throttrip: mem: missing hot temperature
>  IRQ index 1 not found
>
> This serie fixes two errors and two warnings that are reported in dmesg
> It was compiled and tested at runtime on jetson-tk1 only.
>
>
> v2:
>  * Add missing tegra210 device-tree properties
>  * Add the appropriate prefix for tegra soctherm
>  * Use SoCs condition over of_compatible
>
>
> Nicolas Chauvet (6):
>   ARM: tegra: Add missing gpu-throt-level to tegra124 soctherm
>   ARM: tegra: Add missing hot temperatures to tegra124 thermal-zones
>   arm64: tegra: Add missing hot temperatures to tegra132 thermal-zones
>   arm64: tegra: Add missing gpu-throt-level to tegra210 soctherm
>   arm64: tegra: Add missing hot temperatures to tegra210 thermal-zones
>   thermal: tegra: Avoid setting edp_irq when not relevant
>
>  arch/arm/boot/dts/tegra124.dtsi           | 11 +++++++
>  arch/arm64/boot/dts/nvidia/tegra132.dtsi  | 10 ++++++
>  arch/arm64/boot/dts/nvidia/tegra210.dtsi  | 13 ++++++++
>  drivers/thermal/tegra/soctherm.c          | 38 +++++++++++++----------
>  drivers/thermal/tegra/soctherm.h          |  1 +
>  drivers/thermal/tegra/tegra124-soctherm.c |  1 +
>  drivers/thermal/tegra/tegra132-soctherm.c |  1 +
>  drivers/thermal/tegra/tegra210-soctherm.c |  1 +
>  8 files changed, 60 insertions(+), 16 deletions(-)
>
> --
> 2.25.4

Hello,
This series is still pending review.

Thierry, do you expect some reviewers from the linux-pm (Zhang, Daniel ?)
To me it seems like tegra specific changes, so maybe a Nvidia reviewer
is awaited ?

Thanks.

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

* Re: [PATCH v2 0/6] thermal: tegra: soctherm bugfixes
  2020-11-19 11:00 ` [PATCH v2 0/6] thermal: tegra: soctherm bugfixes Nicolas Chauvet
@ 2020-11-19 11:04   ` Daniel Lezcano
  2020-11-20 15:07     ` Thierry Reding
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Lezcano @ 2020-11-19 11:04 UTC (permalink / raw)
  To: Nicolas Chauvet, Thierry Reding, Jonathan Hunter, Zhang Rui
  Cc: linux-tegra, linux-pm

On 19/11/2020 12:00, Nicolas Chauvet wrote:
> Le dim. 27 sept. 2020 à 17:10, Nicolas Chauvet <kwizart@gmail.com> a écrit :
>>
>> When using tegra_soctherm driver on jetson-tk1, the following messages
>> can be seen:
>> from kernel: tegra_soctherm 700e2000.thermal-sensor:
>>  throttle-cfg: heavy: no throt prop or invalid prop
>>  soctherm: trip temperature -2147483647 forced to -127000
>>  thermtrip: will shut down when cpu reaches 101000 mC
>>  soctherm: trip temperature -2147483647 forced to -127000
>>  thermtrip: will shut down when gpu reaches 101000 mC
>>  soctherm: trip temperature -2147483647 forced to -127000
>>  thermtrip: will shut down when pll reaches 103000 mC
>>  throttrip: pll: missing hot temperature
>>  soctherm: trip temperature -2147483647 forced to -127000
>>  thermtrip: will shut down when mem reaches 101000 mC
>>  throttrip: mem: missing hot temperature
>>  IRQ index 1 not found
>>
>> This serie fixes two errors and two warnings that are reported in dmesg
>> It was compiled and tested at runtime on jetson-tk1 only.
>>
>>
>> v2:
>>  * Add missing tegra210 device-tree properties
>>  * Add the appropriate prefix for tegra soctherm
>>  * Use SoCs condition over of_compatible
>>
>>
>> Nicolas Chauvet (6):
>>   ARM: tegra: Add missing gpu-throt-level to tegra124 soctherm
>>   ARM: tegra: Add missing hot temperatures to tegra124 thermal-zones
>>   arm64: tegra: Add missing hot temperatures to tegra132 thermal-zones
>>   arm64: tegra: Add missing gpu-throt-level to tegra210 soctherm
>>   arm64: tegra: Add missing hot temperatures to tegra210 thermal-zones
>>   thermal: tegra: Avoid setting edp_irq when not relevant
>>
>>  arch/arm/boot/dts/tegra124.dtsi           | 11 +++++++
>>  arch/arm64/boot/dts/nvidia/tegra132.dtsi  | 10 ++++++
>>  arch/arm64/boot/dts/nvidia/tegra210.dtsi  | 13 ++++++++
>>  drivers/thermal/tegra/soctherm.c          | 38 +++++++++++++----------
>>  drivers/thermal/tegra/soctherm.h          |  1 +
>>  drivers/thermal/tegra/tegra124-soctherm.c |  1 +
>>  drivers/thermal/tegra/tegra132-soctherm.c |  1 +
>>  drivers/thermal/tegra/tegra210-soctherm.c |  1 +
>>  8 files changed, 60 insertions(+), 16 deletions(-)
>>
>> --
>> 2.25.4
> 
> Hello,
> This series is still pending review.
> 
> Thierry, do you expect some reviewers from the linux-pm (Zhang, Daniel ?)
> To me it seems like tegra specific changes, so maybe a Nvidia reviewer
> is awaited ?

I can apply the patch 6/6, other patches must go through arm-soc tree.

Thierry can you give your blessing ?

Thanks

  -- Daniel


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

* Re: [PATCH v2 6/6] thermal: tegra: Avoid setting edp_irq when not relevant
  2020-09-27 15:09 ` [PATCH v2 6/6] thermal: tegra: Avoid setting edp_irq when not relevant Nicolas Chauvet
@ 2020-11-19 19:15   ` Jon Hunter
  0 siblings, 0 replies; 12+ messages in thread
From: Jon Hunter @ 2020-11-19 19:15 UTC (permalink / raw)
  To: Nicolas Chauvet, Thierry Reding, Zhang Rui, Daniel Lezcano
  Cc: linux-tegra, linux-pm, stable



On 27/09/2020 16:09, Nicolas Chauvet wrote:
> According to the binding, the edp_irq is not available on tegra124/132

It appears that the binding doc is not update to date or missing the
relevant information. Looking at the Tegra124 TRM I see that there is a
SOCTHERM EDP IRQ (51) and so maybe the correct fix is to add this.

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH v2 0/6] thermal: tegra: soctherm bugfixes
  2020-11-19 11:04   ` Daniel Lezcano
@ 2020-11-20 15:07     ` Thierry Reding
  0 siblings, 0 replies; 12+ messages in thread
From: Thierry Reding @ 2020-11-20 15:07 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Nicolas Chauvet, Jonathan Hunter, Zhang Rui, linux-tegra, linux-pm

[-- Attachment #1: Type: text/plain, Size: 3348 bytes --]

On Thu, Nov 19, 2020 at 12:04:34PM +0100, Daniel Lezcano wrote:
> On 19/11/2020 12:00, Nicolas Chauvet wrote:
> > Le dim. 27 sept. 2020 à 17:10, Nicolas Chauvet <kwizart@gmail.com> a écrit :
> >>
> >> When using tegra_soctherm driver on jetson-tk1, the following messages
> >> can be seen:
> >> from kernel: tegra_soctherm 700e2000.thermal-sensor:
> >>  throttle-cfg: heavy: no throt prop or invalid prop
> >>  soctherm: trip temperature -2147483647 forced to -127000
> >>  thermtrip: will shut down when cpu reaches 101000 mC
> >>  soctherm: trip temperature -2147483647 forced to -127000
> >>  thermtrip: will shut down when gpu reaches 101000 mC
> >>  soctherm: trip temperature -2147483647 forced to -127000
> >>  thermtrip: will shut down when pll reaches 103000 mC
> >>  throttrip: pll: missing hot temperature
> >>  soctherm: trip temperature -2147483647 forced to -127000
> >>  thermtrip: will shut down when mem reaches 101000 mC
> >>  throttrip: mem: missing hot temperature
> >>  IRQ index 1 not found
> >>
> >> This serie fixes two errors and two warnings that are reported in dmesg
> >> It was compiled and tested at runtime on jetson-tk1 only.
> >>
> >>
> >> v2:
> >>  * Add missing tegra210 device-tree properties
> >>  * Add the appropriate prefix for tegra soctherm
> >>  * Use SoCs condition over of_compatible
> >>
> >>
> >> Nicolas Chauvet (6):
> >>   ARM: tegra: Add missing gpu-throt-level to tegra124 soctherm
> >>   ARM: tegra: Add missing hot temperatures to tegra124 thermal-zones
> >>   arm64: tegra: Add missing hot temperatures to tegra132 thermal-zones
> >>   arm64: tegra: Add missing gpu-throt-level to tegra210 soctherm
> >>   arm64: tegra: Add missing hot temperatures to tegra210 thermal-zones
> >>   thermal: tegra: Avoid setting edp_irq when not relevant
> >>
> >>  arch/arm/boot/dts/tegra124.dtsi           | 11 +++++++
> >>  arch/arm64/boot/dts/nvidia/tegra132.dtsi  | 10 ++++++
> >>  arch/arm64/boot/dts/nvidia/tegra210.dtsi  | 13 ++++++++
> >>  drivers/thermal/tegra/soctherm.c          | 38 +++++++++++++----------
> >>  drivers/thermal/tegra/soctherm.h          |  1 +
> >>  drivers/thermal/tegra/tegra124-soctherm.c |  1 +
> >>  drivers/thermal/tegra/tegra132-soctherm.c |  1 +
> >>  drivers/thermal/tegra/tegra210-soctherm.c |  1 +
> >>  8 files changed, 60 insertions(+), 16 deletions(-)
> >>
> >> --
> >> 2.25.4
> > 
> > Hello,
> > This series is still pending review.
> > 
> > Thierry, do you expect some reviewers from the linux-pm (Zhang, Daniel ?)
> > To me it seems like tegra specific changes, so maybe a Nvidia reviewer
> > is awaited ?
> 
> I can apply the patch 6/6, other patches must go through arm-soc tree.
> 
> Thierry can you give your blessing ?

As Jon mentioned, making support for that EDP IRQ doesn't seem to be the
right thing. If this IRQ does exist on Tegra124/Tegra132, then a more
correct patch would be to add that to the device tree. I vaguely recall
writing a patch to do that, a while back when I was trying to get rid of
a couple of dt_binding_check warnings/errors, so I'll dig around for
that.

I think for now we should probably ignore the driver patch. I'll get
back to you if we determine that EDP IRQ is not present on those SoCs,
in which case the driver patch would be correct.

Thierry

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

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

* Re: [PATCH v2 0/6] thermal: tegra: soctherm bugfixes
  2020-09-27 15:09 [PATCH v2 0/6] thermal: tegra: soctherm bugfixes Nicolas Chauvet
                   ` (6 preceding siblings ...)
  2020-11-19 11:00 ` [PATCH v2 0/6] thermal: tegra: soctherm bugfixes Nicolas Chauvet
@ 2020-11-20 16:14 ` Thierry Reding
  7 siblings, 0 replies; 12+ messages in thread
From: Thierry Reding @ 2020-11-20 16:14 UTC (permalink / raw)
  To: Nicolas Chauvet
  Cc: Jonathan Hunter, Zhang Rui, Daniel Lezcano, linux-tegra, linux-pm

[-- Attachment #1: Type: text/plain, Size: 1783 bytes --]

On Sun, Sep 27, 2020 at 05:09:50PM +0200, Nicolas Chauvet wrote:
> When using tegra_soctherm driver on jetson-tk1, the following messages
> can be seen:
> from kernel: tegra_soctherm 700e2000.thermal-sensor:
>  throttle-cfg: heavy: no throt prop or invalid prop
>  soctherm: trip temperature -2147483647 forced to -127000
>  thermtrip: will shut down when cpu reaches 101000 mC
>  soctherm: trip temperature -2147483647 forced to -127000
>  thermtrip: will shut down when gpu reaches 101000 mC
>  soctherm: trip temperature -2147483647 forced to -127000
>  thermtrip: will shut down when pll reaches 103000 mC
>  throttrip: pll: missing hot temperature
>  soctherm: trip temperature -2147483647 forced to -127000
>  thermtrip: will shut down when mem reaches 101000 mC
>  throttrip: mem: missing hot temperature
>  IRQ index 1 not found
> 
> This serie fixes two errors and two warnings that are reported in dmesg
> It was compiled and tested at runtime on jetson-tk1 only.
> 
> 
> v2:
>  * Add missing tegra210 device-tree properties
>  * Add the appropriate prefix for tegra soctherm
>  * Use SoCs condition over of_compatible
> 
> 
> Nicolas Chauvet (6):
>   ARM: tegra: Add missing gpu-throt-level to tegra124 soctherm
>   ARM: tegra: Add missing hot temperatures to tegra124 thermal-zones
>   arm64: tegra: Add missing hot temperatures to tegra132 thermal-zones
>   arm64: tegra: Add missing gpu-throt-level to tegra210 soctherm
>   arm64: tegra: Add missing hot temperatures to tegra210 thermal-zones

I've applied all these...

>   thermal: tegra: Avoid setting edp_irq when not relevant

and sent out a couple of patches that should make this obsolete since
the EDP IRQ does exist on Tegra124/Tegra132 according to the TRM.

Thierry

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

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

end of thread, other threads:[~2020-11-20 16:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-27 15:09 [PATCH v2 0/6] thermal: tegra: soctherm bugfixes Nicolas Chauvet
2020-09-27 15:09 ` [PATCH v2 1/6] ARM: tegra: Add missing gpu-throt-level to tegra124 soctherm Nicolas Chauvet
2020-09-27 15:09 ` [PATCH v2 2/6] ARM: tegra: Add missing hot temperatures to tegra124 thermal-zones Nicolas Chauvet
2020-09-27 15:09 ` [PATCH v2 3/6] arm64: tegra: Add missing hot temperatures to tegra132 thermal-zones Nicolas Chauvet
2020-09-27 15:09 ` [PATCH v2 4/6] arm64: tegra: Add missing gpu-throt-level to tegra210 soctherm Nicolas Chauvet
2020-09-27 15:09 ` [PATCH v2 5/6] arm64: tegra: Add missing hot temperatures to tegra210 thermal-zones Nicolas Chauvet
2020-09-27 15:09 ` [PATCH v2 6/6] thermal: tegra: Avoid setting edp_irq when not relevant Nicolas Chauvet
2020-11-19 19:15   ` Jon Hunter
2020-11-19 11:00 ` [PATCH v2 0/6] thermal: tegra: soctherm bugfixes Nicolas Chauvet
2020-11-19 11:04   ` Daniel Lezcano
2020-11-20 15:07     ` Thierry Reding
2020-11-20 16:14 ` Thierry Reding

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.