arm64: dts: fsl: imx8mq: enable the thermal management unit (TMU)
Subsystems (2)
PATCH 1/1 arm64: dts: fsl: imx8mq: enable the thermal management unit (TMU)
These are the TMU nodes from the NXP vendor kernel
--- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 83 +++++++++++++++++++++++ 1 file changed, 83 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq.dtsi +83 -0
@@ -8,6 +8,7 @@ #include <dt-bindings/power/imx8mq-power.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/thermal/thermal.h> #include "imx8mq-pinfunc.h" / {
@@ -89,6 +90,7 @@ reg = <0x0>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_1: cpu@1 {
@@ -210,6 +212,87 @@ #interrupt-cells = <2>; }; + tmu: tmu@30260000 { + compatible = "fsl,imx8mq-tmu"; + reg = <0x30260000 0x10000>; + interrupt = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; + little-endian; + fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x70061>; + fsl,tmu-calibration = <0x00000000 0x00000023 + 0x00000001 0x00000029 + 0x00000002 0x0000002f + 0x00000003 0x00000035 + 0x00000004 0x0000003d + 0x00000005 0x00000043 + 0x00000006 0x0000004b + 0x00000007 0x00000051 + 0x00000008 0x00000057 + 0x00000009 0x0000005f + 0x0000000a 0x00000067 + 0x0000000b 0x0000006f + + 0x00010000 0x0000001b + 0x00010001 0x00000023 + 0x00010002 0x0000002b + 0x00010003 0x00000033 + 0x00010004 0x0000003b + 0x00010005 0x00000043 + 0x00010006 0x0000004b + 0x00010007 0x00000055 + 0x00010008 0x0000005d + 0x00010009 0x00000067 + 0x0001000a 0x00000070 + + 0x00020000 0x00000017 + 0x00020001 0x00000023 + 0x00020002 0x0000002d + 0x00020003 0x00000037 + 0x00020004 0x00000041 + 0x00020005 0x0000004b + 0x00020006 0x00000057 + 0x00020007 0x00000063 + 0x00020008 0x0000006f + + 0x00030000 0x00000015 + 0x00030001 0x00000021 + 0x00030002 0x0000002d + 0x00030003 0x00000039 + 0x00030004 0x00000045 + 0x00030005 0x00000053 + 0x00030006 0x0000005f + 0x00030007 0x00000071>; + #thermal-sensor-cells = <0>; + }; + + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu>; + + trips { + cpu_alert0: trip0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit0: trip1 { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert0>; + cooling-device = <&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; + wdog1: watchdog@30280000 { compatible = "fsl,imx8mq-wdt", "fsl,imx21-wdt"; reg = <0x30280000 0x10000>;
Signature · 1 line
2.17.1
Quoted 3 lines · Angus Ainslie (Purism)
These are the TMU nodes from the NXP vendor kernel
Hey Angus,
TMU block supports multiple thermal zones and vendor kernel doesn't really account for that (see below). Latest version of the driver in thermal tree now actually supports that feature (mulit-sensor), so I think the code in DT should reflect that as well. I recently submitted a series adding HWMON integration for TMU
(https://lore.kernel.org/lkml/[email protected]/T/#u)
and this is my take on this patch:
https://github.com/ndreys/linux/commit/09931e3d60af0a74377307b433db97da1be31570
All of the code there is up for grabs, if you feel like using it.
Quoted 69 lines
Signed-off-by Angus Ainslie (Purism) <[email protected]>--- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 83 +++++++++++++++++++++++ 1 file changed, 83 insertions(+)arch/arm64/boot/dts/freescale/imx8mq.dtsi +42
-0@@ -8,6 +8,7 @@ #include <dt-bindings/power/imx8mq-power.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/thermal/thermal.h> #include "imx8mq-pinfunc.h" / {@@ -89,6 +90,7 @@ reg = <0x0>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_1: cpu@1 {@@ -210,6 +212,87 @@ #interrupt-cells = <2>; }; + tmu: tmu@30260000 { + compatible = "fsl,imx8mq-tmu"; + reg = <0x30260000 0x10000>; + interrupt = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; + little-endian; + fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x70061>; + fsl,tmu-calibration = <0x00000000 0x00000023 + 0x00000001 0x00000029 + 0x00000002 0x0000002f + 0x00000003 0x00000035 + 0x00000004 0x0000003d + 0x00000005 0x00000043 + 0x00000006 0x0000004b + 0x00000007 0x00000051 + 0x00000008 0x00000057 + 0x00000009 0x0000005f + 0x0000000a 0x00000067 + 0x0000000b 0x0000006f + + 0x00010000 0x0000001b + 0x00010001 0x00000023 + 0x00010002 0x0000002b + 0x00010003 0x00000033 + 0x00010004 0x0000003b + 0x00010005 0x00000043 + 0x00010006 0x0000004b + 0x00010007 0x00000055 + 0x00010008 0x0000005d + 0x00010009 0x00000067 + 0x0001000a 0x00000070 + + 0x00020000 0x00000017 + 0x00020001 0x00000023 + 0x00020002 0x0000002d + 0x00020003 0x00000037 + 0x00020004 0x00000041 + 0x00020005 0x0000004b + 0x00020006 0x00000057 + 0x00020007 0x00000063 + 0x00020008 0x0000006f
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 264
Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +10
-0+ + 0x00030000 0x00000015 + 0x00030001 0x00000021 + 0x00030002 0x0000002d + 0x00030003 0x00000039 + 0x00030004 0x00000045 + 0x00030005 0x00000053 + 0x00030006 0x0000005f + 0x00030007 0x00000071>; + #thermal-sensor-cells = <0>;
As per #thermal-sensor-cells must be 1 (see Documentation/devicetree/bindings/thermal/qoriq-thermal.txt), since as I mentioned above there are multiple thermal zones (CPU, GPU, VPU).
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 271
Quoted 7 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +7
-0+ }; + + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu>;
Ditto.
Thanks,
Andrey Smirnov
Quoted 15 lines · Andrey Smirnov
Quoted 3 lines · Angus Ainslie (Purism)
These are the TMU nodes from the NXP vendor kernel
Hey Angus,
TMU block supports multiple thermal zones and vendor kernel doesn't really account for that (see below). Latest version of the driver in thermal tree now actually supports that feature (mulit-sensor), so I think the code in DT should reflect that as well. I recently submitted a series adding HWMON integration for TMU
(https://lore.kernel.org/lkml/[email protected]/T/#u)
and this is my take on this patch:
Quoted 3 lines
https://github.com/ndreys/linux/commit/09931e3d60af0a74377307b433db97da1be31570
All of the code there is up for grabs, if you feel like using it.
Thanks, I would prefer to use the multi sensor code but I assumed it wasn't in yet so I followed
Documentation/devicetree/bindings/thermal/qoriq-thermal.txt
I'll try some testing with the DT fragment you suggested.
Quoted 119 lines
Quoted 119 lines
Signed-off-by Angus Ainslie (Purism) <[email protected]>--- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 83 +++++++++++++++++++++++ 1 file changed, 83 insertions(+)arch/arm64/boot/dts/freescale/imx8mq.dtsi +9
-0@@ -8,6 +8,7 @@ #include <dt-bindings/power/imx8mq-power.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/thermal/thermal.h> #include "imx8mq-pinfunc.h" / {@@ -89,6 +90,7 @@ reg = <0x0>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_1: cpu@1 {@@ -210,6 +212,87 @@ #interrupt-cells = <2>; }; + tmu: tmu@30260000 { + compatible = "fsl,imx8mq-tmu"; + reg = <0x30260000 0x10000>; + interrupt = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; + little-endian; + fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x70061>; + fsl,tmu-calibration = <0x00000000
0x00000023
+0x000000010x00000029
+0x000000020x0000002f
+0x000000030x00000035
+0x000000040x0000003d
+0x000000050x00000043
+0x000000060x0000004b
+0x000000070x00000051
+0x000000080x00000057
+0x000000090x0000005f
+0x0000000a0x00000067
+0x0000000b0x0000006farch/arm64/boot/dts/freescale/imx8mq.dtsi +2
-0+ + 0x00010000
0x0000001b
+0x000100010x00000023
+0x000100020x0000002b
+0x000100030x00000033
+0x000100040x0000003b
+0x000100050x00000043
+0x000100060x0000004b
+0x000100070x00000055
+0x000100080x0000005d
+0x000100090x00000067
+0x0001000a0x00000070arch/arm64/boot/dts/freescale/imx8mq.dtsi +2
-0+ + 0x00020000
0x00000017
+0x000200010x00000023
+0x000200020x0000002d
+0x000200030x00000037
+0x000200040x00000041
+0x000200050x0000004b
+0x000200060x00000057
+0x000200070x00000063
+0x000200080x0000006farch/arm64/boot/dts/freescale/imx8mq.dtsi +2
-0+ + 0x00030000
0x00000015
+0x000300010x00000021
+0x000300020x0000002d
+0x000300030x00000039
+0x000300040x00000045
+0x000300050x00000053
+0x00030006
Quoted 8 lines
Quoted 4 lines
0x0000005f
+0x000300070x00000071>;
+ #thermal-sensor-cells = <0>;As per #thermal-sensor-cells must be 1 (see
Documentation/devicetree/bindings/thermal/qoriq-thermal.txt), since as I mentioned above there are multiple thermal zones (CPU, GPU, VPU).
Thanks I missed that bringing it over.
Angus Ainslie
Quoted 13 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 271
Quoted 8 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +7
-0+ }; + + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu>;Ditto.
Thanks,
Andrey Smirnov
Hi Andrey,
Quoted 5 lines · Andrey Smirnov
Quoted 3 lines · Angus Ainslie (Purism)
These are the TMU nodes from the NXP vendor kernel
Quoted 8 lines
Hey Angus,
TMU block supports multiple thermal zones and vendor kernel doesn't really account for that (see below). Latest version of the driver in thermal tree now actually supports that feature (mulit-sensor), so I think the code in DT should reflect that as well. I recently submitted a series adding HWMON integration for TMU
(https://lore.kernel.org/lkml/[email protected]/T/#u)
I tried applying those to linux-next. They don't apply very cleanly there so I gave up.
Quoted 6 lines
and this is my take on this patch:
https://github.com/ndreys/linux/commit/09931e3d60af0a74377307b433db97da1be31570
All of the code there is up for grabs, if you feel like using it.
I followed that and I have a version that works with linux-next that does not include the GPU and VPU parts.
I also tested a version with the GPU and VPU parts and it "works" but creates 2 useless paths in /sys/class/thermal .
Should I wait for your changes to get into linux-next or resubmit a version that works with the current one ?
Thanks
Angus
Fabio Estevam
reviewerHi Angus,
Quoted 2 lines · Angus Ainslie
I tried applying those to linux-next. They don't apply very cleanly there so I gave up.
You need to apply this commit first:
https://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git/patch/?id=7797ff424818c975b59c35880dbc90fe08350204
Quoted 33 lines · Angus Ainslie
Hi Andrey,
Quoted 6 lines · Andrey Smirnov
Quoted 3 lines · Angus Ainslie (Purism)
These are the TMU nodes from the NXP vendor kernel
Quoted 8 lines
Hey Angus,
TMU block supports multiple thermal zones and vendor kernel doesn't really account for that (see below). Latest version of the driver in thermal tree now actually supports that feature (mulit-sensor), so I think the code in DT should reflect that as well. I recently submitted a series adding HWMON integration for TMU
(https://lore.kernel.org/lkml/[email protected]/T/#u)I tried applying those to linux-next. They don't apply very cleanly there so I gave up.
Quoted 6 lines
and this is my take on this patch:
https://github.com/ndreys/linux/commit/09931e3d60af0a74377307b433db97da1be31570
All of the code there is up for grabs, if you feel like using it.
I followed that and I have a version that works with linux-next that does not include the GPU
and VPU parts.
Quoted 7 lines
I also tested a version with the GPU and VPU parts and it "works" but creates 2 useless
paths in/sys/class/thermal.Should I wait for your changes to get into linux-next or resubmit a version that works with the current one ?
You don't really need my changes for multi sensor support, only the patch Fabio pointed to. You can send the patch sans GPU and VPU nodes to get it in sooner or you can wait until multi-sensor support patch trickles down to get all in in a single patch. All options are fine by me, so it's up to you and Shawn I'd say.
Thanks,
Andrey Smirnov
PATCH v2 1/1 arm64: dts: fsl: imx8mq: enable the thermal management unit (TMU)
In reply to Angus Ainslie (Purism)Add the TMU node for the CPU
Changes since v1:
Fixed the muber of sensor cells to work with or without the multi sensors patch.
--- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 90 +++++++++++++++++++++++ 1 file changed, 90 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq.dtsi +90 -0
@@ -8,6 +8,7 @@ #include <dt-bindings/power/imx8mq-power.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/thermal/thermal.h> #include "imx8mq-pinfunc.h" / {
@@ -89,6 +90,7 @@ reg = <0x0>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_1: cpu@1 {
@@ -97,6 +99,7 @@ reg = <0x1>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_2: cpu@2 {
@@ -105,6 +108,7 @@ reg = <0x2>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_3: cpu@3 {
@@ -113,6 +117,7 @@ reg = <0x3>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_L2: l2-cache0 {
@@ -210,6 +215,91 @@ #interrupt-cells = <2>; }; + tmu: tmu@30260000 { + compatible = "fsl,imx8mq-tmu"; + reg = <0x30260000 0x10000>; + interrupt = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; + little-endian; + fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x70061>; + fsl,tmu-calibration = <0x00000000 0x00000023 + 0x00000001 0x00000029 + 0x00000002 0x0000002f + 0x00000003 0x00000035 + 0x00000004 0x0000003d + 0x00000005 0x00000043 + 0x00000006 0x0000004b + 0x00000007 0x00000051 + 0x00000008 0x00000057 + 0x00000009 0x0000005f + 0x0000000a 0x00000067 + 0x0000000b 0x0000006f + + 0x00010000 0x0000001b + 0x00010001 0x00000023 + 0x00010002 0x0000002b + 0x00010003 0x00000033 + 0x00010004 0x0000003b + 0x00010005 0x00000043 + 0x00010006 0x0000004b + 0x00010007 0x00000055 + 0x00010008 0x0000005d + 0x00010009 0x00000067 + 0x0001000a 0x00000070 + + 0x00020000 0x00000017 + 0x00020001 0x00000023 + 0x00020002 0x0000002d + 0x00020003 0x00000037 + 0x00020004 0x00000041 + 0x00020005 0x0000004b + 0x00020006 0x00000057 + 0x00020007 0x00000063 + 0x00020008 0x0000006f + + 0x00030000 0x00000015 + 0x00030001 0x00000021 + 0x00030002 0x0000002d + 0x00030003 0x00000039 + 0x00030004 0x00000045 + 0x00030005 0x00000053 + 0x00030006 0x0000005f + 0x00030007 0x00000071>; + #thermal-sensor-cells = <1>; + }; + + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 0>; + + trips { + cpu_alert: cpu-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert>; + cooling-device = + <&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; + wdog1: watchdog@30280000 { compatible = "fsl,imx8mq-wdt", "fsl,imx21-wdt"; reg = <0x30280000 0x10000>;
Signature · 1 line
2.17.1
PATCH 1/1 arm64: dts: fsl: imx8mq: enable the multi sensor TMU
In reply to Angus Ainslie (Purism)Add the imx8mq TMU (Thermal mannagement unit) nodes for CPU, GPU, and VPU.
This patch requires that the multi sensor patch is already applied
--- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 118 ++++++++++++++++++++++ 1 file changed, 118 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq.dtsi +118 -0
@@ -8,6 +8,7 @@ #include <dt-bindings/power/imx8mq-power.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/thermal/thermal.h> #include "imx8mq-pinfunc.h" / {
@@ -89,6 +90,7 @@ reg = <0x0>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_1: cpu@1 {
@@ -97,6 +99,7 @@ reg = <0x1>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_2: cpu@2 {
@@ -105,6 +108,7 @@ reg = <0x2>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_3: cpu@3 {
@@ -113,6 +117,7 @@ reg = <0x3>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_L2: l2-cache0 {
@@ -210,6 +215,119 @@ #interrupt-cells = <2>; }; + tmu: tmu@30260000 { + compatible = "fsl,imx8mq-tmu"; + reg = <0x30260000 0x10000>; + interrupt = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; + little-endian; + fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x70061>; + fsl,tmu-calibration = <0x00000000 0x00000023 + 0x00000001 0x00000029 + 0x00000002 0x0000002f + 0x00000003 0x00000035 + 0x00000004 0x0000003d + 0x00000005 0x00000043 + 0x00000006 0x0000004b + 0x00000007 0x00000051 + 0x00000008 0x00000057 + 0x00000009 0x0000005f + 0x0000000a 0x00000067 + 0x0000000b 0x0000006f + + 0x00010000 0x0000001b + 0x00010001 0x00000023 + 0x00010002 0x0000002b + 0x00010003 0x00000033 + 0x00010004 0x0000003b + 0x00010005 0x00000043 + 0x00010006 0x0000004b + 0x00010007 0x00000055 + 0x00010008 0x0000005d + 0x00010009 0x00000067 + 0x0001000a 0x00000070 + + 0x00020000 0x00000017 + 0x00020001 0x00000023 + 0x00020002 0x0000002d + 0x00020003 0x00000037 + 0x00020004 0x00000041 + 0x00020005 0x0000004b + 0x00020006 0x00000057 + 0x00020007 0x00000063 + 0x00020008 0x0000006f + + 0x00030000 0x00000015 + 0x00030001 0x00000021 + 0x00030002 0x0000002d + 0x00030003 0x00000039 + 0x00030004 0x00000045 + 0x00030005 0x00000053 + 0x00030006 0x0000005f + 0x00030007 0x00000071>; + #thermal-sensor-cells = <1>; + }; + + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 0>; + + trips { + cpu_alert: cpu-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert>; + cooling-device = + <&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + gpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 1>; + + trips { + cpu-crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + vpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 2>; + + trips { + cpu-crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; + wdog1: watchdog@30280000 { compatible = "fsl,imx8mq-wdt", "fsl,imx21-wdt"; reg = <0x30280000 0x10000>;
Signature · 1 line
2.17.1
Fabio Estevam
reviewerRe: [PATCH] arm64: dts: fsl: imx8mq: enable the multi sensor TMU
Quoted 7 lines · Angus Ainslie (Purism)
Add the imx8mq TMU (Thermal mannagement unit) nodes for CPU, GPU, and VPU.
This patch requires that the multi sensor patch is already applied
Please remove the reference to this commit. It is already present in 5.1-rc1.
PATCH v2 1/1 arm64: dts: fsl: imx8mq: enable the multi sensor TMU
In reply to Angus Ainslie (Purism)Add the imx8mq TMU (Thermal mannagement unit) nodes for CPU, GPU, and VPU.
Changes since v1:
Removed references to multi sensor patch.
--- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 118 ++++++++++++++++++++++ 1 file changed, 118 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq.dtsi +118 -0
@@ -8,6 +8,7 @@ #include <dt-bindings/power/imx8mq-power.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/thermal/thermal.h> #include "imx8mq-pinfunc.h" / {
@@ -89,6 +90,7 @@ reg = <0x0>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_1: cpu@1 {
@@ -97,6 +99,7 @@ reg = <0x1>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_2: cpu@2 {
@@ -105,6 +108,7 @@ reg = <0x2>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_3: cpu@3 {
@@ -113,6 +117,7 @@ reg = <0x3>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_L2: l2-cache0 {
@@ -210,6 +215,119 @@ #interrupt-cells = <2>; }; + tmu: tmu@30260000 { + compatible = "fsl,imx8mq-tmu"; + reg = <0x30260000 0x10000>; + interrupt = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; + little-endian; + fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x70061>; + fsl,tmu-calibration = <0x00000000 0x00000023 + 0x00000001 0x00000029 + 0x00000002 0x0000002f + 0x00000003 0x00000035 + 0x00000004 0x0000003d + 0x00000005 0x00000043 + 0x00000006 0x0000004b + 0x00000007 0x00000051 + 0x00000008 0x00000057 + 0x00000009 0x0000005f + 0x0000000a 0x00000067 + 0x0000000b 0x0000006f + + 0x00010000 0x0000001b + 0x00010001 0x00000023 + 0x00010002 0x0000002b + 0x00010003 0x00000033 + 0x00010004 0x0000003b + 0x00010005 0x00000043 + 0x00010006 0x0000004b + 0x00010007 0x00000055 + 0x00010008 0x0000005d + 0x00010009 0x00000067 + 0x0001000a 0x00000070 + + 0x00020000 0x00000017 + 0x00020001 0x00000023 + 0x00020002 0x0000002d + 0x00020003 0x00000037 + 0x00020004 0x00000041 + 0x00020005 0x0000004b + 0x00020006 0x00000057 + 0x00020007 0x00000063 + 0x00020008 0x0000006f + + 0x00030000 0x00000015 + 0x00030001 0x00000021 + 0x00030002 0x0000002d + 0x00030003 0x00000039 + 0x00030004 0x00000045 + 0x00030005 0x00000053 + 0x00030006 0x0000005f + 0x00030007 0x00000071>; + #thermal-sensor-cells = <1>; + }; + + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 0>; + + trips { + cpu_alert: cpu-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert>; + cooling-device = + <&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + gpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 1>; + + trips { + cpu-crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + vpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 2>; + + trips { + cpu-crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; + wdog1: watchdog@30280000 { compatible = "fsl,imx8mq-wdt", "fsl,imx21-wdt"; reg = <0x30280000 0x10000>;
Signature · 1 line
2.17.1
Re: [PATCH v2] arm64: dts: fsl: imx8mq: enable the multi sensor TMU
Hi Angus,
Am Montag, den 18.03.2019, 11:46 -0700 schrieb Angus Ainslie (Purism):
Quoted 16 lines
Add the imx8mq TMU (Thermal mannagement unit) nodes for CPU, GPU, and VPU.
Changes since v1:
Removed references to multi sensor patch.
Signed-off-by Angus Ainslie (Purism) <[email protected]>---
arch/arm64/boot/dts/freescale/imx8mq.dtsi | 118 ++++++++++++++++++++++1 file changed, 118 insertions(+)arch/arm64/boot/dts/freescale/imx8mq.dtsi +0
-0
[...]
Quoted 5 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +5
-0+ thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 0>;
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 284
Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +10
-0+ + trips { + cpu_alert: cpu-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit { + temperature = <95000>;
All the critical trip points seem to be too high. The consumer parts have a maximum junction temperature of 95°C, so the common DT configuration used by all boards should have a crit trip point at least a few degrees below this value. Boards that only use the industrial parts can always overwrite the trip points if the designer wishes to do so.
Quoted 14 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +14
-0+ hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert>; + cooling-device = + <&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + };
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 308
Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +10
-0+ }; + }; + + gpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 1>; + + trips { + cpu-crit {
Should be gpu-crit.
Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +4
-0+ temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + };
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 322
Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +10
-0+ }; + }; + + vpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 2>; + + trips { + cpu-crit {
Should be vpu-crit.
Regards,
Lucas
PATCH v3 1/1 arm64: dts: fsl: imx8mq: enable the multi sensor TMU
In reply to Angus Ainslie (Purism)Add the imx8mq TMU (Thermal management unit) nodes for CPU, GPU, and VPU.
Changes since v2:
Updated alert and critical temps for commercial parts. Fixed node names.
Changes since v1:
Removed references to multi sensor patch.
--- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 118 ++++++++++++++++++++++ 1 file changed, 118 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq.dtsi +118 -0
@@ -8,6 +8,7 @@ #include <dt-bindings/power/imx8mq-power.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/thermal/thermal.h> #include "imx8mq-pinfunc.h" / {
@@ -89,6 +90,7 @@ reg = <0x0>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_1: cpu@1 {
@@ -97,6 +99,7 @@ reg = <0x1>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_2: cpu@2 {
@@ -105,6 +108,7 @@ reg = <0x2>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_3: cpu@3 {
@@ -113,6 +117,7 @@ reg = <0x3>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_L2: l2-cache0 {
@@ -210,6 +215,119 @@ #interrupt-cells = <2>; }; + tmu: tmu@30260000 { + compatible = "fsl,imx8mq-tmu"; + reg = <0x30260000 0x10000>; + interrupt = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; + little-endian; + fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x70061>; + fsl,tmu-calibration = <0x00000000 0x00000023 + 0x00000001 0x00000029 + 0x00000002 0x0000002f + 0x00000003 0x00000035 + 0x00000004 0x0000003d + 0x00000005 0x00000043 + 0x00000006 0x0000004b + 0x00000007 0x00000051 + 0x00000008 0x00000057 + 0x00000009 0x0000005f + 0x0000000a 0x00000067 + 0x0000000b 0x0000006f + + 0x00010000 0x0000001b + 0x00010001 0x00000023 + 0x00010002 0x0000002b + 0x00010003 0x00000033 + 0x00010004 0x0000003b + 0x00010005 0x00000043 + 0x00010006 0x0000004b + 0x00010007 0x00000055 + 0x00010008 0x0000005d + 0x00010009 0x00000067 + 0x0001000a 0x00000070 + + 0x00020000 0x00000017 + 0x00020001 0x00000023 + 0x00020002 0x0000002d + 0x00020003 0x00000037 + 0x00020004 0x00000041 + 0x00020005 0x0000004b + 0x00020006 0x00000057 + 0x00020007 0x00000063 + 0x00020008 0x0000006f + + 0x00030000 0x00000015 + 0x00030001 0x00000021 + 0x00030002 0x0000002d + 0x00030003 0x00000039 + 0x00030004 0x00000045 + 0x00030005 0x00000053 + 0x00030006 0x0000005f + 0x00030007 0x00000071>; + #thermal-sensor-cells = <1>; + }; + + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 0>; + + trips { + cpu_alert: cpu-alert { + temperature = <80000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert>; + cooling-device = + <&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + gpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 1>; + + trips { + gpu-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + vpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 2>; + + trips { + vpu-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; + wdog1: watchdog@30280000 { compatible = "fsl,imx8mq-wdt", "fsl,imx21-wdt"; reg = <0x30280000 0x10000>;
Signature · 1 line
2.17.1
Fabio Estevam
reviewerRe: [PATCH v3] arm64: dts: fsl: imx8mq: enable the multi sensor TMU
Quoted 4 lines · Angus Ainslie (Purism)
Add the imx8mq TMU (Thermal management unit) nodes for CPU, GPU, and VPU.
Quoted 8 lines
Changes since v2:
Updated alert and critical temps for commercial parts. Fixed node names.
Changes since v1:
Removed references to multi sensor patch.
Please put the change history below the --- line, so that it does not appear in the commit log text.
PATCH v4 1/1 arm64: dts: fsl: imx8mq: enable the multi sensor TMU
In reply to Angus Ainslie (Purism)Add the imx8mq TMU (Thermal management unit) nodes for CPU, GPU, and VPU.
---
Changes since v3:
Moved the annotation.
Changes since v2:
Updated alert and critical temps for commercial parts. Fixed node names.
Changes since v1:
Removed references to multi sensor patch.
arch/arm64/boot/dts/freescale/imx8mq.dtsi | 118 ++++++++++++++++++++++ 1 file changed, 118 insertions(+)
arch/arm64/boot/dts/freescale/imx8mq.dtsi +118 -0
@@ -8,6 +8,7 @@ #include <dt-bindings/power/imx8mq-power.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/thermal/thermal.h> #include "imx8mq-pinfunc.h" / {
@@ -89,6 +90,7 @@ reg = <0x0>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_1: cpu@1 {
@@ -97,6 +99,7 @@ reg = <0x1>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_2: cpu@2 {
@@ -105,6 +108,7 @@ reg = <0x2>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_3: cpu@3 {
@@ -113,6 +117,7 @@ reg = <0x3>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_L2: l2-cache0 {
@@ -210,6 +215,119 @@ #interrupt-cells = <2>; }; + tmu: tmu@30260000 { + compatible = "fsl,imx8mq-tmu"; + reg = <0x30260000 0x10000>; + interrupt = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; + little-endian; + fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x70061>; + fsl,tmu-calibration = <0x00000000 0x00000023 + 0x00000001 0x00000029 + 0x00000002 0x0000002f + 0x00000003 0x00000035 + 0x00000004 0x0000003d + 0x00000005 0x00000043 + 0x00000006 0x0000004b + 0x00000007 0x00000051 + 0x00000008 0x00000057 + 0x00000009 0x0000005f + 0x0000000a 0x00000067 + 0x0000000b 0x0000006f + + 0x00010000 0x0000001b + 0x00010001 0x00000023 + 0x00010002 0x0000002b + 0x00010003 0x00000033 + 0x00010004 0x0000003b + 0x00010005 0x00000043 + 0x00010006 0x0000004b + 0x00010007 0x00000055 + 0x00010008 0x0000005d + 0x00010009 0x00000067 + 0x0001000a 0x00000070 + + 0x00020000 0x00000017 + 0x00020001 0x00000023 + 0x00020002 0x0000002d + 0x00020003 0x00000037 + 0x00020004 0x00000041 + 0x00020005 0x0000004b + 0x00020006 0x00000057 + 0x00020007 0x00000063 + 0x00020008 0x0000006f + + 0x00030000 0x00000015 + 0x00030001 0x00000021 + 0x00030002 0x0000002d + 0x00030003 0x00000039 + 0x00030004 0x00000045 + 0x00030005 0x00000053 + 0x00030006 0x0000005f + 0x00030007 0x00000071>; + #thermal-sensor-cells = <1>; + }; + + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 0>; + + trips { + cpu_alert: cpu-alert { + temperature = <80000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert>; + cooling-device = + <&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + gpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 1>; + + trips { + gpu-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + vpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 2>; + + trips { + vpu-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; + wdog1: watchdog@30280000 { compatible = "fsl,imx8mq-wdt", "fsl,imx21-wdt"; reg = <0x30280000 0x10000>;
Signature · 1 line
2.17.1
Re: [PATCH v4] arm64: dts: fsl: imx8mq: enable the multi sensor TMU
Am Donnerstag, den 21.03.2019, 05:52 -0700 schrieb Angus Ainslie (Purism):
Quoted 4 lines
Add the imx8mq TMU (Thermal management unit) nodes for CPU, GPU, and VPU.
Signed-off-by Angus Ainslie (Purism) <[email protected]>
Quoted 182 lines
---
Changes since v3:
Moved the annotation.
Changes since v2:
Updated alert and critical temps for commercial parts. Fixed node names.
Changes since v1:
Removed references to multi sensor patch.
arch/arm64/boot/dts/freescale/imx8mq.dtsi | 118 ++++++++++++++++++++++
1 file changed, 118 insertions(+)arch/arm64/boot/dts/freescale/imx8mq.dtsi +1
-0@@ -8,6 +8,7 @@ #include <dt-bindings/power/imx8mq-power.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/thermal/thermal.h> #include "imx8mq-pinfunc.h"
/ {arch/arm64/boot/dts/freescale/imx8mq.dtsi +0
-0@@ -89,6 +90,7 @@ > reg = <0x0>; > enable-method = "psci"; > next-level-cache = <&A53_L2>; > + #cooling-cells = <2>; > };Quoted 1 line
Quoted 1 line
A53_1: cpu@1 {arch/arm64/boot/dts/freescale/imx8mq.dtsi +0
-0@@ -97,6 +99,7 @@ > reg = <0x1>; > enable-method = "psci"; > next-level-cache = <&A53_L2>; > + #cooling-cells = <2>; > };Quoted 1 line
Quoted 1 line
A53_2: cpu@2 {arch/arm64/boot/dts/freescale/imx8mq.dtsi +0
-0@@ -105,6 +108,7 @@ > reg = <0x2>; > enable-method = "psci"; > next-level-cache = <&A53_L2>; > + #cooling-cells = <2>; > };Quoted 1 line
Quoted 1 line
A53_3: cpu@3 {arch/arm64/boot/dts/freescale/imx8mq.dtsi +0
-0@@ -113,6 +117,7 @@ > reg = <0x3>; > enable-method = "psci"; > next-level-cache = <&A53_L2>; > + #cooling-cells = <2>; > };Quoted 1 line
A53_L2: l2-cache0 {arch/arm64/boot/dts/freescale/imx8mq.dtsi +0
-0@@ -210,6 +215,119 @@ > #interrupt-cells = <2>; > };Quoted 8 lines
Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1
-0+ tmu: tmu@30260000 {arch/arm64/boot/dts/freescale/imx8mq.dtsi +7
-0+ compatible = "fsl,imx8mq-tmu"; + reg = <0x30260000 0x10000>; + interrupt = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; + little-endian; + fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x70061>; + fsl,tmu-calibration = <0x00000000 0x00000023 + 0x00000001 0x00000029arch/arm64/boot/dts/freescale/imx8mq.dtsi line 235
Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +10
-0+ 0x00000002 0x0000002f + 0x00000003 0x00000035 + 0x00000004 0x0000003d + 0x00000005 0x00000043 + 0x00000006 0x0000004b + 0x00000007 0x00000051 + 0x00000008 0x00000057 + 0x00000009 0x0000005f + 0x0000000a 0x00000067 + 0x0000000b 0x0000006f+
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 247
Quoted 11 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +11
-0+ 0x00010000 0x0000001b + 0x00010001 0x00000023 + 0x00010002 0x0000002b + 0x00010003 0x00000033 + 0x00010004 0x0000003b + 0x00010005 0x00000043 + 0x00010006 0x0000004b + 0x00010007 0x00000055 + 0x00010008 0x0000005d + 0x00010009 0x00000067 + 0x0001000a 0x00000070+
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 257
Quoted 9 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +9
-0+ 0x00020000 0x00000017 + 0x00020001 0x00000023 + 0x00020002 0x0000002d + 0x00020003 0x00000037 + 0x00020004 0x00000041 + 0x00020005 0x0000004b + 0x00020006 0x00000057 + 0x00020007 0x00000063 + 0x00020008 0x0000006f+
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 268
Quoted 10 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +10
-0+ 0x00030000 0x00000015 + 0x00030001 0x00000021 + 0x00030002 0x0000002d + 0x00030003 0x00000039 + 0x00030004 0x00000045 + 0x00030005 0x00000053 + 0x00030006 0x0000005f + 0x00030007 0x00000071>; + #thermal-sensor-cells = <1>; + };+
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 274
Quoted 5 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +5
-0+ thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 0>;+
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 281
Quoted 6 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +6
-0+ trips { + cpu_alert: cpu-alert { + temperature = <80000>; + hysteresis = <2000>; + type = "passive"; + };+
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 288
Quoted 6 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +6
-0+ cpu-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + };+
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 300
Quoted 11 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +11
-0+ cooling-maps { + map0 { + trip = <&cpu_alert>; + cooling-device = + <&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + };+
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 305
Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +4
-0+ gpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 1>;+
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 314
Quoted 8 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +8
-0+ trips { + gpu-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + };+
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 319
Quoted 4 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +4
-0+ vpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 2>;+
arch/arm64/boot/dts/freescale/imx8mq.dtsi line 329
Quoted 9 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +9
-0+ trips { + vpu-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + };+
Quoted 3 lines
Quoted 1 line
wdog1: watchdog@30280000 {
compatible = "fsl,imx8mq-wdt", "fsl,imx21-wdt"; reg = <
0x302800000x10000>;
Re: [PATCH v4] arm64: dts: fsl: imx8mq: enable the multi sensor TMU
In reply to Angus Ainslie (Purism)Quoted 4 lines · Angus Ainslie (Purism)
Add the imx8mq TMU (Thermal management unit) nodes for CPU, GPU, and VPU.
Signed-off-by Angus Ainslie (Purism) <[email protected]>
Subject prefix 'arm64: dts: imx8mq:' would be good enough. I changed it and applied patch.
Shawn
Quoted 185 lines
---
Changes since v3:
Moved the annotation.
Changes since v2:
Updated alert and critical temps for commercial parts. Fixed node names.
Changes since v1:
Removed references to multi sensor patch.
arch/arm64/boot/dts/freescale/imx8mq.dtsi | 118 ++++++++++++++++++++++ 1 file changed, 118 insertions(+)arch/arm64/boot/dts/freescale/imx8mq.dtsi +118
-0@@ -8,6 +8,7 @@ #include <dt-bindings/power/imx8mq-power.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/thermal/thermal.h> #include "imx8mq-pinfunc.h" / {@@ -89,6 +90,7 @@ reg = <0x0>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_1: cpu@1 {@@ -97,6 +99,7 @@ reg = <0x1>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_2: cpu@2 {@@ -105,6 +108,7 @@ reg = <0x2>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_3: cpu@3 {@@ -113,6 +117,7 @@ reg = <0x3>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_L2: l2-cache0 {@@ -210,6 +215,119 @@ #interrupt-cells = <2>; }; + tmu: tmu@30260000 { + compatible = "fsl,imx8mq-tmu"; + reg = <0x30260000 0x10000>; + interrupt = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; + little-endian; + fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x70061>; + fsl,tmu-calibration = <0x00000000 0x00000023 + 0x00000001 0x00000029 + 0x00000002 0x0000002f + 0x00000003 0x00000035 + 0x00000004 0x0000003d + 0x00000005 0x00000043 + 0x00000006 0x0000004b + 0x00000007 0x00000051 + 0x00000008 0x00000057 + 0x00000009 0x0000005f + 0x0000000a 0x00000067 + 0x0000000b 0x0000006f + + 0x00010000 0x0000001b + 0x00010001 0x00000023 + 0x00010002 0x0000002b + 0x00010003 0x00000033 + 0x00010004 0x0000003b + 0x00010005 0x00000043 + 0x00010006 0x0000004b + 0x00010007 0x00000055 + 0x00010008 0x0000005d + 0x00010009 0x00000067 + 0x0001000a 0x00000070 + + 0x00020000 0x00000017 + 0x00020001 0x00000023 + 0x00020002 0x0000002d + 0x00020003 0x00000037 + 0x00020004 0x00000041 + 0x00020005 0x0000004b + 0x00020006 0x00000057 + 0x00020007 0x00000063 + 0x00020008 0x0000006f + + 0x00030000 0x00000015 + 0x00030001 0x00000021 + 0x00030002 0x0000002d + 0x00030003 0x00000039 + 0x00030004 0x00000045 + 0x00030005 0x00000053 + 0x00030006 0x0000005f + 0x00030007 0x00000071>; + #thermal-sensor-cells = <1>; + }; + + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 0>; + + trips { + cpu_alert: cpu-alert { + temperature = <80000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert>; + cooling-device = + <&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + gpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 1>; + + trips { + gpu-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + vpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 2>; + + trips { + vpu-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; + wdog1: watchdog@30280000 { compatible = "fsl,imx8mq-wdt", "fsl,imx21-wdt"; reg = <0x30280000 0x10000>;Signature · 1 line
2.17.1