[PATCH] arm64: dts: qcom: patch mahua thermal zones by label
From: Dmitry Baryshkov
Date: Thu Mar 19 2026 - 22:51:14 EST
Updating DT nodes by the full path is fragile and frowned upon, it's
easy to miss the rename of the node in the main tree. Add necessary
labels and patch thermal zones for Mahua using those labels.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
---
arch/arm64/boot/dts/qcom/glymur.dtsi | 98 ++++++++---------
arch/arm64/boot/dts/qcom/mahua.dtsi | 199 +++++++++++++++++------------------
2 files changed, 148 insertions(+), 149 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/glymur.dtsi b/arch/arm64/boot/dts/qcom/glymur.dtsi
index bde287f645ee..d0117a844dad 100644
--- a/arch/arm64/boot/dts/qcom/glymur.dtsi
+++ b/arch/arm64/boot/dts/qcom/glymur.dtsi
@@ -4962,7 +4962,7 @@ ddr-0-critical {
};
};
- video-0-thermal {
+ thermal_video_0: video-0-thermal {
thermal-sensors = <&tsens1 7>;
trips {
@@ -4974,7 +4974,7 @@ video-0-critical {
};
};
- video-1-thermal {
+ thermal_video_1: video-1-thermal {
thermal-sensors = <&tsens1 8>;
trips {
@@ -5250,7 +5250,7 @@ aoss-4-critical {
};
};
- cpu-2-0-0-thermal {
+ thermal_cpu_2_0_0: cpu-2-0-0-thermal {
thermal-sensors = <&tsens4 1>;
trips {
@@ -5262,7 +5262,7 @@ cpu-2-0-0-critical {
};
};
- cpu-2-0-1-thermal {
+ thermal_cpu_2_0_1: cpu-2-0-1-thermal {
thermal-sensors = <&tsens4 2>;
trips {
@@ -5274,7 +5274,7 @@ cpu-2-0-1-critical {
};
};
- cpu-2-1-0-thermal {
+ thermal_cpu_2_1_0: cpu-2-1-0-thermal {
thermal-sensors = <&tsens4 3>;
trips {
@@ -5286,7 +5286,7 @@ cpu-2-1-0-critical {
};
};
- cpu-2-1-1-thermal {
+ thermal_cpu_2_1_1: cpu-2-1-1-thermal {
thermal-sensors = <&tsens4 4>;
trips {
@@ -5298,7 +5298,7 @@ cpu-2-1-1-critical {
};
};
- cpu-2-2-0-thermal {
+ thermal_cpu_2_2_0: cpu-2-2-0-thermal {
thermal-sensors = <&tsens4 5>;
trips {
@@ -5310,7 +5310,7 @@ cpu-2-2-0-critical {
};
};
- cpu-2-2-1-thermal {
+ thermal_cpu_2_2_1: cpu-2-2-1-thermal {
thermal-sensors = <&tsens4 6>;
trips {
@@ -5322,7 +5322,7 @@ cpu-2-2-1-critical {
};
};
- cpu-2-3-0-thermal {
+ thermal_cpu_2_3_0: cpu-2-3-0-thermal {
thermal-sensors = <&tsens4 7>;
trips {
@@ -5334,7 +5334,7 @@ cpu-2-3-0-critical {
};
};
- cpu-2-3-1-thermal {
+ thermal_cpu_2_3_1: cpu-2-3-1-thermal {
thermal-sensors = <&tsens4 8>;
trips {
@@ -5346,7 +5346,7 @@ cpu-2-3-1-critical {
};
};
- cpu-2-4-0-thermal {
+ thermal_cpu_2_4_0: cpu-2-4-0-thermal {
thermal-sensors = <&tsens4 9>;
trips {
@@ -5358,7 +5358,7 @@ cpu-2-4-0-critical {
};
};
- cpu-2-4-1-thermal {
+ thermal_cpu_2_4_1: cpu-2-4-1-thermal {
thermal-sensors = <&tsens4 10>;
trips {
@@ -5370,7 +5370,7 @@ cpu-2-4-1-critical {
};
};
- cpu-2-5-0-thermal {
+ thermal_cpu_2_5_0: cpu-2-5-0-thermal {
thermal-sensors = <&tsens4 11>;
trips {
@@ -5382,7 +5382,7 @@ cpu-2-5-0-critical {
};
};
- cpu-2-5-1-thermal {
+ thermal_cpu_2_5_1: cpu-2-5-1-thermal {
thermal-sensors = <&tsens4 12>;
trips {
@@ -5406,7 +5406,7 @@ aoss-5-critical {
};
};
- cpullc-2-0-thermal {
+ thermal_cpullc_2_0: cpullc-2-0-thermal {
thermal-sensors = <&tsens5 1>;
trips {
@@ -5418,7 +5418,7 @@ cpullc-2-0-critical {
};
};
- cpuillc-2-1-thermal {
+ thermal_cpuillc_2_1: cpuillc-2-1-thermal {
thermal-sensors = <&tsens5 2>;
trips {
@@ -5430,7 +5430,7 @@ cpullc-2-1-critical {
};
};
- qmx-2-0-thermal {
+ thermal_qmx_2_0: qmx-2-0-thermal {
thermal-sensors = <&tsens5 3>;
trips {
@@ -5442,7 +5442,7 @@ qmx-2-0-critical {
};
};
- qmx-2-1-thermal {
+ thermal_qmx_2_1: qmx-2-1-thermal {
thermal-sensors = <&tsens5 4>;
trips {
@@ -5454,7 +5454,7 @@ qmx-2-1-critical {
};
};
- qmx-2-2-thermal {
+ thermal_qmx_2_2: qmx-2-2-thermal {
thermal-sensors = <&tsens5 5>;
trips {
@@ -5466,7 +5466,7 @@ qmx-2-2-critical {
};
};
- qmx-2-3-thermal {
+ thermal_qmx_2_3: qmx-2-3-thermal {
thermal-sensors = <&tsens5 6>;
trips {
@@ -5478,7 +5478,7 @@ qmx-2-3-critical {
};
};
- qmx-2-4-thermal {
+ thermal_qmx_2_4: qmx-2-4-thermal {
thermal-sensors = <&tsens5 7>;
trips {
@@ -5490,7 +5490,7 @@ qmx-2-4-critical {
};
};
- aoss-6-thermal {
+ thermal_aoss_6: aoss-6-thermal {
thermal-sensors = <&tsens6 0>;
trips {
@@ -5502,7 +5502,7 @@ aoss-6-critical {
};
};
- nsphvx-0-thermal {
+ thermal_nsphvx_0: nsphvx-0-thermal {
thermal-sensors = <&tsens6 1>;
trips {
@@ -5514,7 +5514,7 @@ nsphvx-0-critical {
};
};
- nsphvx-1-thermal {
+ thermal_nsphvx_1: nsphvx-1-thermal {
thermal-sensors = <&tsens6 2>;
trips {
@@ -5526,7 +5526,7 @@ nsphvx-1-critical {
};
};
- nsphvx-2-thermal {
+ thermal_nsphvx_2: nsphvx-2-thermal {
thermal-sensors = <&tsens6 3>;
trips {
@@ -5538,7 +5538,7 @@ nsphvx-2-critical {
};
};
- nsphvx-3-thermal {
+ thermal_nsphvx_3: nsphvx-3-thermal {
thermal-sensors = <&tsens6 4>;
trips {
@@ -5550,7 +5550,7 @@ nsphvx-3-critical {
};
};
- nsphmx-0-thermal {
+ thermal_nsphmx_0: nsphmx-0-thermal {
thermal-sensors = <&tsens6 5>;
trips {
@@ -5562,7 +5562,7 @@ nsphmx-0-critical {
};
};
- nsphmx-1-thermal {
+ thermal_nsphmx_1: nsphmx-1-thermal {
thermal-sensors = <&tsens6 6>;
trips {
@@ -5574,7 +5574,7 @@ nsphmx-1-critical {
};
};
- nsphmx-2-thermal {
+ thermal_nsphmx_2: nsphmx-2-thermal {
thermal-sensors = <&tsens6 7>;
trips {
@@ -5586,7 +5586,7 @@ nsphmx-2-critical {
};
};
- nsphmx-3-thermal {
+ thermal_nsphmx_3: nsphmx-3-thermal {
thermal-sensors = <&tsens6 8>;
trips {
@@ -5598,7 +5598,7 @@ nsphmx-3-critical {
};
};
- camera-0-thermal {
+ thermal_camera_0: camera-0-thermal {
thermal-sensors = <&tsens6 9>;
trips {
@@ -5610,7 +5610,7 @@ camera-0-critical {
};
};
- camera-1-thermal {
+ thermal_camera_1: camera-1-thermal {
thermal-sensors = <&tsens6 10>;
trips {
@@ -5622,7 +5622,7 @@ camera-1-critical {
};
};
- ddr-1-thermal {
+ thermal_ddr_1: ddr-1-thermal {
thermal-sensors = <&tsens6 11>;
trips {
@@ -5634,7 +5634,7 @@ ddr-1-critical {
};
};
- ddr-2-thermal {
+ thermal_ddr_2: ddr-2-thermal {
thermal-sensors = <&tsens6 12>;
trips {
@@ -5646,7 +5646,7 @@ ddr-2-critical {
};
};
- aoss-7-thermal {
+ thermal_aoss_7: aoss-7-thermal {
thermal-sensors = <&tsens7 0>;
trips {
@@ -5658,7 +5658,7 @@ aoss-7-critical {
};
};
- gpu-0-0-thermal {
+ thermal_gpu_0_0: gpu-0-0-thermal {
thermal-sensors = <&tsens7 1>;
trips {
@@ -5676,7 +5676,7 @@ gpu-0-0-critical {
};
};
- gpu-0-1-thermal {
+ thermal_gpu_0_1: gpu-0-1-thermal {
thermal-sensors = <&tsens7 2>;
trips {
@@ -5694,7 +5694,7 @@ gpu-0-1-critical {
};
};
- gpu-0-2-thermal {
+ thermal_gpu_0_2: gpu-0-2-thermal {
thermal-sensors = <&tsens7 3>;
trips {
@@ -5712,7 +5712,7 @@ gpu-0-2-critical {
};
};
- gpu-1-0-thermal {
+ thermal_gpu_1_0: gpu-1-0-thermal {
thermal-sensors = <&tsens7 4>;
trips {
@@ -5730,7 +5730,7 @@ gpu-1-0-critical {
};
};
- gpu-1-1-thermal {
+ thermal_gpu_1_1: gpu-1-1-thermal {
thermal-sensors = <&tsens7 5>;
trips {
@@ -5748,7 +5748,7 @@ gpu-1-1-critical {
};
};
- gpu-1-2-thermal {
+ thermal_gpu_1_2: gpu-1-2-thermal {
thermal-sensors = <&tsens7 6>;
trips {
@@ -5766,7 +5766,7 @@ gpu-1-2-critical {
};
};
- gpu-2-0-thermal {
+ thermal_gpu_2_0: gpu-2-0-thermal {
thermal-sensors = <&tsens7 7>;
trips {
@@ -5784,7 +5784,7 @@ gpu-2-0-critical {
};
};
- gpu-2-1-thermal {
+ thermal_gpu_2_1: gpu-2-1-thermal {
thermal-sensors = <&tsens7 8>;
trips {
@@ -5802,7 +5802,7 @@ gpu-2-1-critical {
};
};
- gpu-2-2-thermal {
+ thermal_gpu_2_2: gpu-2-2-thermal {
thermal-sensors = <&tsens7 9>;
trips {
@@ -5820,7 +5820,7 @@ gpu-2-2-critical {
};
};
- gpu-3-0-thermal {
+ thermal_gpu_3_0: gpu-3-0-thermal {
thermal-sensors = <&tsens7 10>;
trips {
@@ -5838,7 +5838,7 @@ gpu-3-0-critical {
};
};
- gpu-3-1-thermal {
+ thermal_gpu_3_1: gpu-3-1-thermal {
thermal-sensors = <&tsens7 11>;
trips {
@@ -5856,7 +5856,7 @@ gpu-3-1-critical {
};
};
- gpu-3-2-thermal {
+ thermal_gpu_3_2: gpu-3-2-thermal {
thermal-sensors = <&tsens7 12>;
trips {
@@ -5874,7 +5874,7 @@ gpu-3-2-critical {
};
};
- gpuss-0-thermal {
+ thermal_gpuss_0: gpuss-0-thermal {
thermal-sensors = <&tsens7 13>;
trips {
@@ -5892,7 +5892,7 @@ gpuss-0-critical {
};
};
- gpuss-1-thermal {
+ thermal_gpuss_1: gpuss-1-thermal {
thermal-sensors = <&tsens7 14>;
trips {
diff --git a/arch/arm64/boot/dts/qcom/mahua.dtsi b/arch/arm64/boot/dts/qcom/mahua.dtsi
index 7aa8d26b2b3a..59e771291613 100644
--- a/arch/arm64/boot/dts/qcom/mahua.dtsi
+++ b/arch/arm64/boot/dts/qcom/mahua.dtsi
@@ -20,6 +20,32 @@
/delete-node/ &cpu_pd15;
/delete-node/ &cpu_pd16;
/delete-node/ &cpu_pd17;
+/delete-node/ &thermal_aoss_6;
+/delete-node/ &thermal_aoss_7;
+/delete-node/ &thermal_cpu_2_0_0;
+/delete-node/ &thermal_cpu_2_0_1;
+/delete-node/ &thermal_cpu_2_1_0;
+/delete-node/ &thermal_cpu_2_1_1;
+/delete-node/ &thermal_cpu_2_2_0;
+/delete-node/ &thermal_cpu_2_2_1;
+/delete-node/ &thermal_cpu_2_3_0;
+/delete-node/ &thermal_cpu_2_3_1;
+/delete-node/ &thermal_cpu_2_4_0;
+/delete-node/ &thermal_cpu_2_4_1;
+/delete-node/ &thermal_cpu_2_5_0;
+/delete-node/ &thermal_cpu_2_5_1;
+/delete-node/ &thermal_cpuillc_2_1;
+/delete-node/ &thermal_cpullc_2_0;
+/delete-node/ &thermal_ddr_2;
+/delete-node/ &thermal_gpu_3_0;
+/delete-node/ &thermal_gpu_3_1;
+/delete-node/ &thermal_gpu_3_2;
+/delete-node/ &thermal_qmx_2_0;
+/delete-node/ &thermal_qmx_2_1;
+/delete-node/ &thermal_qmx_2_2;
+/delete-node/ &thermal_qmx_2_3;
+/delete-node/ &thermal_qmx_2_4;
+/delete-node/ &thermal_video_1;
/delete-node/ &tsens6;
/delete-node/ &tsens7;
@@ -110,130 +136,99 @@ &system_noc {
compatible = "qcom,mahua-system-noc", "qcom,glymur-system-noc";
};
-&tlmm {
- compatible = "qcom,mahua-tlmm";
+&thermal_camera_0 {
+ thermal-sensors = <&tsens4 9>;
};
-&thermal_zones {
- /delete-node/ aoss-6-thermal;
- /delete-node/ aoss-7-thermal;
- /delete-node/ cpu-2-0-0-thermal;
- /delete-node/ cpu-2-0-1-thermal;
- /delete-node/ cpu-2-1-0-thermal;
- /delete-node/ cpu-2-1-1-thermal;
- /delete-node/ cpu-2-2-0-thermal;
- /delete-node/ cpu-2-2-1-thermal;
- /delete-node/ cpu-2-3-0-thermal;
- /delete-node/ cpu-2-3-1-thermal;
- /delete-node/ cpu-2-4-0-thermal;
- /delete-node/ cpu-2-4-1-thermal;
- /delete-node/ cpu-2-5-0-thermal;
- /delete-node/ cpu-2-5-1-thermal;
- /delete-node/ cpullc-2-0-thermal;
- /delete-node/ cpuillc-2-1-thermal;
- /delete-node/ ddr-2-thermal;
- /delete-node/ gpu-3-0-thermal;
- /delete-node/ gpu-3-1-thermal;
- /delete-node/ gpu-3-2-thermal;
- /delete-node/ qmx-2-0-thermal;
- /delete-node/ qmx-2-1-thermal;
- /delete-node/ qmx-2-2-thermal;
- /delete-node/ qmx-2-3-thermal;
- /delete-node/ qmx-2-4-thermal;
- /delete-node/ video-1-thermal;
-
- ddr-1-thermal {
- thermal-sensors = <&tsens1 7>;
- };
-
- video-0-thermal {
- thermal-sensors = <&tsens1 8>;
- };
+&thermal_camera_1 {
+ thermal-sensors = <&tsens4 10>;
+};
- nsphvx-0-thermal {
- thermal-sensors = <&tsens4 1>;
- };
+&thermal_ddr_1 {
+ thermal-sensors = <&tsens1 7>;
+};
- nsphvx-1-thermal {
- thermal-sensors = <&tsens4 2>;
- };
+&thermal_gpu_0_0 {
+ thermal-sensors = <&tsens5 1>;
+};
- nsphvx-2-thermal {
- thermal-sensors = <&tsens4 3>;
- };
+&thermal_gpu_0_1 {
+ thermal-sensors = <&tsens5 2>;
+};
- nsphvx-3-thermal {
- thermal-sensors = <&tsens4 4>;
- };
+&thermal_gpu_0_2 {
+ thermal-sensors = <&tsens5 3>;
+};
- nsphmx-0-thermal {
- thermal-sensors = <&tsens4 5>;
- };
+&thermal_gpu_1_0 {
+ thermal-sensors = <&tsens5 4>;
+};
- nsphmx-1-thermal {
- thermal-sensors = <&tsens4 6>;
- };
+&thermal_gpu_1_1 {
+ thermal-sensors = <&tsens5 5>;
+};
- nsphmx-2-thermal {
- thermal-sensors = <&tsens4 7>;
- };
+&thermal_gpu_1_2 {
+ thermal-sensors = <&tsens5 6>;
+};
- nsphmx-3-thermal {
- thermal-sensors = <&tsens4 8>;
- };
+&thermal_gpu_2_0 {
+ thermal-sensors = <&tsens5 7>;
+};
- camera-0-thermal {
- thermal-sensors = <&tsens4 9>;
- };
+&thermal_gpu_2_1 {
+ thermal-sensors = <&tsens5 8>;
+};
- camera-1-thermal {
- thermal-sensors = <&tsens4 10>;
- };
+&thermal_gpu_2_2 {
+ thermal-sensors = <&tsens5 9>;
+};
- gpu-0-0-thermal {
- thermal-sensors = <&tsens5 1>;
- };
+&thermal_gpuss_0 {
+ thermal-sensors = <&tsens5 10>;
+};
- gpu-0-1-thermal {
- thermal-sensors = <&tsens5 2>;
- };
+&thermal_gpuss_1 {
+ thermal-sensors = <&tsens5 11>;
+};
- gpu-0-2-thermal {
- thermal-sensors = <&tsens5 3>;
- };
+&thermal_nsphmx_0 {
+ thermal-sensors = <&tsens4 5>;
+};
- gpu-1-0-thermal {
- thermal-sensors = <&tsens5 4>;
- };
+&thermal_nsphmx_1 {
+ thermal-sensors = <&tsens4 6>;
+};
- gpu-1-1-thermal {
- thermal-sensors = <&tsens5 5>;
- };
+&thermal_nsphmx_2 {
+ thermal-sensors = <&tsens4 7>;
+};
- gpu-1-2-thermal {
- thermal-sensors = <&tsens5 6>;
- };
+&thermal_nsphmx_3 {
+ thermal-sensors = <&tsens4 8>;
+};
- gpu-2-0-thermal {
- thermal-sensors = <&tsens5 7>;
- };
+&thermal_nsphvx_0 {
+ thermal-sensors = <&tsens4 1>;
+};
- gpu-2-1-thermal {
- thermal-sensors = <&tsens5 8>;
- };
+&thermal_nsphvx_1 {
+ thermal-sensors = <&tsens4 2>;
+};
- gpu-2-2-thermal {
- thermal-sensors = <&tsens5 9>;
- };
+&thermal_nsphvx_2 {
+ thermal-sensors = <&tsens4 3>;
+};
- gpuss-0-thermal {
- thermal-sensors = <&tsens5 10>;
- };
+&thermal_nsphvx_3 {
+ thermal-sensors = <&tsens4 4>;
+};
- gpuss-1-thermal {
- thermal-sensors = <&tsens5 11>;
- };
+&thermal_video_0 {
+ thermal-sensors = <&tsens1 8>;
+};
+&thermal_zones {
gpuss-2-thermal {
thermal-sensors = <&tsens5 12>;
@@ -289,6 +284,10 @@ gpuss-4-critical {
};
};
+&tlmm {
+ compatible = "qcom,mahua-tlmm";
+};
+
&tsens4 {
#qcom,sensors = <11>;
};
---
base-commit: 3b11871f8e473fe399fb348ea4d0c122f4c182b1
change-id: 20260320-mahua-fix-thermals-a46cf98e1988
Best regards,
--
With best wishes
Dmitry