Re: [PATCH 1/4] arm64: dts: imx8mm-venice-gw700x: override thermal cfg for industrial temp

From
Tim Harvey <tharvey@gateworks.com>
Date
2021-06-04 15:42:14
Also in
linux-devicetree
Reply to
Frieder Schrempf, 2021-06-02
On Wed, Jun 2, 2021 at 12:11 AM Frieder Schrempf
[off-list ref] wrote:
On 01.06.21 19:49, Tim Harvey wrote:
quoted
Override the default temperature alert/crit for Industrial temp IMX8M
Mini.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 .../boot/dts/freescale/imx8mm-venice-gw700x.dtsi     | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw700x.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw700x.dtsi
index c769fadbd008..512b76cd7c3b 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw700x.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw700x.dtsi
@@ -493,3 +493,15 @@
              >;
      };
 };
+
+&cpu_alert0 {
+     temperature = <95000>;
+     hysteresis = <2000>;
+     type = "passive";
+};
+
+&cpu_crit0 {
+     temperature = <105000>;
+     hysteresis = <2000>;
+     type = "critical";
+};
As this is not really board-specific, I think the proper way to handle this for all boards is to let the thermal driver read the temperature grading from the OTP fuses and set the trip-points accordingly, similar to what is done on i.MX6 [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/thermal/imx_thermal.c?h=v5.13-rc4#n508
Frieder,

Yes, I thought about adding that kind of support to imx8mm_thermal.c
but the difference is that imx8mm has alerts defined by dt and imx6
does not so is it right to override dt alerts on imx8m? What if
someone designs a board that they specifically want a lower alert than
the cpu grade they are using based on something else on the board?

My approach to this was to eventually actually adjust the imx8m dt
alerts in boot firmware based on some boot firmware setting or
specific board support and leave the kernel alone.

Best regards,

Tim

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thread (18 messages) 18 messages, 4 authors, last reply 2021-07-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help