1 From d05cf625f27335320a2ad883b7f7c4cd638dca99 Mon Sep 17 00:00:00 2001
2 From: Yuantian Tang <andy.tang@nxp.com>
3 Date: Mon, 5 Nov 2018 17:25:32 +0800
4 Subject: [PATCH] arm64: dts: nxp: ls208xa: add more thermal zone support
6 Ls208xa has several thermal sensors. Add all the sensor id to dts
9 To make the dts cleaner, re-organize the nodes to split out the
10 common part so that it can be shared with other SoCs.
12 Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
14 arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 8 +-
15 arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi | 8 +-
16 arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 70 ++++---
17 arch/arm64/boot/dts/freescale/fsl-tmu-map1.dtsi | 99 ++++++++++
18 arch/arm64/boot/dts/freescale/fsl-tmu-map2.dtsi | 99 ++++++++++
19 arch/arm64/boot/dts/freescale/fsl-tmu-map3.dtsi | 99 ++++++++++
20 arch/arm64/boot/dts/freescale/fsl-tmu.dtsi | 251 ++++++++++++++++++++++++
21 7 files changed, 590 insertions(+), 44 deletions(-)
22 create mode 100644 arch/arm64/boot/dts/freescale/fsl-tmu-map1.dtsi
23 create mode 100644 arch/arm64/boot/dts/freescale/fsl-tmu-map2.dtsi
24 create mode 100644 arch/arm64/boot/dts/freescale/fsl-tmu-map3.dtsi
25 create mode 100644 arch/arm64/boot/dts/freescale/fsl-tmu.dtsi
27 --- a/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
28 +++ b/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
30 #include "fsl-ls208xa.dtsi"
34 + cooling_map0: cpu0: cpu@0 {
36 compatible = "arm,cortex-a57";
43 + cooling_map1: cpu2: cpu@100 {
45 compatible = "arm,cortex-a57";
52 + cooling_map2: cpu4: cpu@200 {
54 compatible = "arm,cortex-a57";
61 + cooling_map3: cpu6: cpu@300 {
63 compatible = "arm,cortex-a57";
65 --- a/arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi
66 +++ b/arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi
68 #include "fsl-ls208xa.dtsi"
72 + cooling_map0: cpu0: cpu@0 {
74 compatible = "arm,cortex-a72";
81 + cooling_map1: cpu2: cpu@100 {
83 compatible = "arm,cortex-a72";
90 + cooling_map2: cpu4: cpu@200 {
92 compatible = "arm,cortex-a72";
99 + cooling_map3: cpu6: cpu@300 {
101 compatible = "arm,cortex-a72";
103 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
104 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
110 - cpu_thermal: cpu-thermal {
111 - polling-delay-passive = <1000>;
112 - polling-delay = <5000>;
114 - thermal-sensors = <&tmu 4>;
117 - cpu_alert: cpu-alert {
118 - temperature = <75000>;
119 - hysteresis = <2000>;
122 - cpu_crit: cpu-crit {
123 - temperature = <85000>;
124 - hysteresis = <2000>;
131 - trip = <&cpu_alert>;
133 - <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
134 - <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
135 - <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
136 - <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
137 - <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
138 - <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
139 - <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
140 - <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
145 + #include "fsl-tmu.dtsi"
148 compatible = "arm,armv8-timer";
154 +#include "fsl-tmu-map1.dtsi"
155 +#include "fsl-tmu-map2.dtsi"
156 +#include "fsl-tmu-map3.dtsi"
187 +++ b/arch/arm64/boot/dts/freescale/fsl-tmu-map1.dtsi
189 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
191 + * Device Tree Include file for Thermal Monitor Unit.
193 + * Copyright 2018 NXP
195 + * Tang Yuantian <andy.tang@nxp.com>
205 + <&cooling_map1 THERMAL_NO_LIMIT
216 + <&cooling_map1 THERMAL_NO_LIMIT
227 + <&cooling_map1 THERMAL_NO_LIMIT
238 + <&cooling_map1 THERMAL_NO_LIMIT
249 + <&cooling_map1 THERMAL_NO_LIMIT
260 + <&cooling_map1 THERMAL_NO_LIMIT
271 + <&cooling_map1 THERMAL_NO_LIMIT
282 + <&cooling_map1 THERMAL_NO_LIMIT
289 +++ b/arch/arm64/boot/dts/freescale/fsl-tmu-map2.dtsi
291 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
293 + * Device Tree Include file for Thermal Monitor Unit.
295 + * Copyright 2018 NXP
297 + * Tang Yuantian <andy.tang@nxp.com>
307 + <&cooling_map2 THERMAL_NO_LIMIT
318 + <&cooling_map2 THERMAL_NO_LIMIT
329 + <&cooling_map2 THERMAL_NO_LIMIT
340 + <&cooling_map2 THERMAL_NO_LIMIT
351 + <&cooling_map2 THERMAL_NO_LIMIT
362 + <&cooling_map2 THERMAL_NO_LIMIT
373 + <&cooling_map2 THERMAL_NO_LIMIT
384 + <&cooling_map2 THERMAL_NO_LIMIT
391 +++ b/arch/arm64/boot/dts/freescale/fsl-tmu-map3.dtsi
393 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
395 + * Device Tree Include file for Thermal Monitor Unit.
397 + * Copyright 2018 NXP
399 + * Tang Yuantian <andy.tang@nxp.com>
409 + <&cooling_map3 THERMAL_NO_LIMIT
420 + <&cooling_map3 THERMAL_NO_LIMIT
431 + <&cooling_map3 THERMAL_NO_LIMIT
442 + <&cooling_map3 THERMAL_NO_LIMIT
453 + <&cooling_map3 THERMAL_NO_LIMIT
464 + <&cooling_map3 THERMAL_NO_LIMIT
475 + <&cooling_map3 THERMAL_NO_LIMIT
486 + <&cooling_map3 THERMAL_NO_LIMIT
493 +++ b/arch/arm64/boot/dts/freescale/fsl-tmu.dtsi
495 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
497 + * Device Tree Include file for Thermal Monitor Unit.
499 + * Copyright 2018 NXP
501 + * Tang Yuantian <andy.tang@nxp.com>
505 +thermal_zones: thermal-zones {
506 + thermal_zone0: thermal-zone0 {
507 + polling-delay-passive = <1000>;
508 + polling-delay = <5000>;
509 + thermal-sensors = <&tmu 0>;
510 + status = "disabled";
514 + temperature = <75000>;
515 + hysteresis = <2000>;
520 + temperature = <85000>;
521 + hysteresis = <2000>;
530 + <&cooling_map0 THERMAL_NO_LIMIT
537 + polling-delay-passive = <1000>;
538 + polling-delay = <5000>;
539 + thermal-sensors = <&tmu 1>;
540 + status = "disabled";
544 + temperature = <75000>;
545 + hysteresis = <2000>;
550 + temperature = <85000>;
551 + hysteresis = <2000>;
560 + <&cooling_map0 THERMAL_NO_LIMIT
567 + polling-delay-passive = <1000>;
568 + polling-delay = <5000>;
569 + thermal-sensors = <&tmu 2>;
570 + status = "disabled";
574 + temperature = <75000>;
575 + hysteresis = <2000>;
580 + temperature = <85000>;
581 + hysteresis = <2000>;
590 + <&cooling_map0 THERMAL_NO_LIMIT
597 + polling-delay-passive = <1000>;
598 + polling-delay = <5000>;
599 + thermal-sensors = <&tmu 3>;
600 + status = "disabled";
604 + temperature = <75000>;
605 + hysteresis = <2000>;
610 + temperature = <85000>;
611 + hysteresis = <2000>;
620 + <&cooling_map0 THERMAL_NO_LIMIT
627 + polling-delay-passive = <1000>;
628 + polling-delay = <5000>;
629 + thermal-sensors = <&tmu 4>;
630 + status = "disabled";
634 + temperature = <75000>;
635 + hysteresis = <2000>;
640 + temperature = <85000>;
641 + hysteresis = <2000>;
650 + <&cooling_map0 THERMAL_NO_LIMIT
657 + polling-delay-passive = <1000>;
658 + polling-delay = <5000>;
659 + thermal-sensors = <&tmu 5>;
660 + status = "disabled";
664 + temperature = <75000>;
665 + hysteresis = <2000>;
670 + temperature = <85000>;
671 + hysteresis = <2000>;
680 + <&cooling_map0 THERMAL_NO_LIMIT
687 + polling-delay-passive = <1000>;
688 + polling-delay = <5000>;
689 + thermal-sensors = <&tmu 6>;
690 + status = "disabled";
694 + temperature = <75000>;
695 + hysteresis = <2000>;
700 + temperature = <85000>;
701 + hysteresis = <2000>;
710 + <&cooling_map0 THERMAL_NO_LIMIT
717 + polling-delay-passive = <1000>;
718 + polling-delay = <5000>;
719 + thermal-sensors = <&tmu 7>;
720 + status = "disabled";
724 + temperature = <75000>;
725 + hysteresis = <2000>;
730 + temperature = <85000>;
731 + hysteresis = <2000>;
740 + <&cooling_map0 THERMAL_NO_LIMIT