]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64: dts: qcom: purwa: deduplicate thermal sensors with Hamoa
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Fri, 20 Mar 2026 02:33:15 +0000 (04:33 +0200)
committerBjorn Andersson <andersson@kernel.org>
Thu, 26 Mar 2026 14:40:58 +0000 (09:40 -0500)
Hamoa and Purwa have pretty close thermal zones definitions. The major
difference is that several zones are absent (because of the lack of the
CPU cluster) and several zones use tsens2 instead of tsens3.

Instead of completely duplicating thermal zones for Purwa, reuse themal
zones from Hamoa, patching them where required.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260320-purwa-drop-thermals-v1-1-2c9fe046cd02@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/hamoa.dtsi
arch/arm64/boot/dts/qcom/purwa.dtsi

index 5d52270829226f3865c9d46b0cc0d7a3be054dd1..177b06af4db6212c0b459176d10f9fcca5244a66 100644 (file)
                        };
                };
 
-               cpu2-0-top-thermal {
+               thermal_cpu2_0_top: cpu2-0-top-thermal {
                        thermal-sensors = <&tsens2 1>;
 
                        trips {
                        };
                };
 
-               cpu2-0-btm-thermal {
+               thermal_cpu2_0_btm: cpu2-0-btm-thermal {
                        thermal-sensors = <&tsens2 2>;
 
                        trips {
                        };
                };
 
-               cpu2-1-top-thermal {
+               thermal_cpu2_1_top: cpu2-1-top-thermal {
                        thermal-sensors = <&tsens2 3>;
 
                        trips {
                        };
                };
 
-               cpu2-1-btm-thermal {
+               thermal_cpu2_1_btm: cpu2-1-btm-thermal {
                        thermal-sensors = <&tsens2 4>;
 
                        trips {
                        };
                };
 
-               cpu2-2-top-thermal {
+               thermal_cpu2_2_top: cpu2-2-top-thermal {
                        thermal-sensors = <&tsens2 5>;
 
                        trips {
                        };
                };
 
-               cpu2-2-btm-thermal {
+               thermal_cpu2_2_btm: cpu2-2-btm-thermal {
                        thermal-sensors = <&tsens2 6>;
 
                        trips {
                        };
                };
 
-               cpu2-3-top-thermal {
+               thermal_cpu2_3_top: cpu2-3-top-thermal {
                        thermal-sensors = <&tsens2 7>;
 
                        trips {
                        };
                };
 
-               cpu2-3-btm-thermal {
+               thermal_cpu2_3_btm: cpu2-3-btm-thermal {
                        thermal-sensors = <&tsens2 8>;
 
                        trips {
                        };
                };
 
-               cpuss2-top-thermal {
+               thermal_cpuss2_top: cpuss2-top-thermal {
                        thermal-sensors = <&tsens2 9>;
 
                        trips {
                        };
                };
 
-               cpuss2-btm-thermal {
+               thermal_cpuss2_btm: cpuss2-btm-thermal {
                        thermal-sensors = <&tsens2 10>;
 
                        trips {
                        };
                };
 
-               aoss3-thermal {
+               thermal_aoss3: aoss3-thermal {
                        thermal-sensors = <&tsens3 0>;
 
                        trips {
                        };
                };
 
-               nsp0-thermal {
+               thermal_nsp0: nsp0-thermal {
                        thermal-sensors = <&tsens3 1>;
 
                        trips {
                        };
                };
 
-               nsp1-thermal {
+               thermal_nsp1: nsp1-thermal {
                        thermal-sensors = <&tsens3 2>;
 
                        trips {
                        };
                };
 
-               nsp2-thermal {
+               thermal_nsp2: nsp2-thermal {
                        thermal-sensors = <&tsens3 3>;
 
                        trips {
                        };
                };
 
-               nsp3-thermal {
+               thermal_nsp3: nsp3-thermal {
                        thermal-sensors = <&tsens3 4>;
 
                        trips {
                        };
                };
 
-               gpuss-0-thermal {
+               thermal_gpuss_0: gpuss-0-thermal {
                        polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 5>;
                        };
                };
 
-               gpuss-1-thermal {
+               thermal_gpuss_1: gpuss-1-thermal {
                        polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 6>;
                        };
                };
 
-               gpuss-2-thermal {
+               thermal_gpuss_2: gpuss-2-thermal {
                        polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 7>;
                        };
                };
 
-               gpuss-3-thermal {
+               thermal_gpuss_3: gpuss-3-thermal {
                        polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 8>;
                        };
                };
 
-               gpuss-4-thermal {
+               thermal_gpuss_4: gpuss-4-thermal {
                        polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 9>;
                        };
                };
 
-               gpuss-5-thermal {
+               thermal_gpuss_5: gpuss-5-thermal {
                        polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 10>;
                        };
                };
 
-               gpuss-6-thermal {
+               thermal_gpuss_6: gpuss-6-thermal {
                        polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 11>;
                        };
                };
 
-               gpuss-7-thermal {
+               thermal_gpuss_7: gpuss-7-thermal {
                        polling-delay-passive = <200>;
 
                        thermal-sensors = <&tsens3 12>;
                        };
                };
 
-               camera0-thermal {
+               thermal_camera0: camera0-thermal {
                        thermal-sensors = <&tsens3 13>;
 
                        trips {
                        };
                };
 
-               camera1-thermal {
+               thermal_camera1: camera1-thermal {
                        thermal-sensors = <&tsens3 14>;
 
                        trips {
index 2cecd2dd0de8c39f0702d6983bead2bc2adccf9b..9ab4f26b35f298ad7c6c361b3e232edf07baf223 100644 (file)
 /delete-node/ &gpu_opp_table;
 /delete-node/ &gpu_speed_bin;
 /delete-node/ &pcie3_phy;
-/delete-node/ &thermal_zones;
+/delete-node/ &thermal_aoss3;
+/delete-node/ &thermal_cpu2_0_btm;
+/delete-node/ &thermal_cpu2_0_top;
+/delete-node/ &thermal_cpu2_1_btm;
+/delete-node/ &thermal_cpu2_1_top;
+/delete-node/ &thermal_cpu2_2_btm;
+/delete-node/ &thermal_cpu2_2_top;
+/delete-node/ &thermal_cpu2_3_btm;
+/delete-node/ &thermal_cpu2_3_top;
+/delete-node/ &thermal_cpuss2_btm;
+/delete-node/ &thermal_cpuss2_top;
+/delete-node/ &thermal_gpuss_4;
+/delete-node/ &thermal_gpuss_5;
+/delete-node/ &thermal_gpuss_6;
+/delete-node/ &thermal_gpuss_7;
 
 &gcc {
        compatible = "qcom,x1p42100-gcc", "qcom,x1e80100-gcc";
        };
 };
 
-/* While physically present, this controller is left unconfigured and unused */
-&tsens3 {
-       status = "disabled";
+&thermal_camera0 {
+       thermal-sensors = <&tsens2 9>;
 };
 
-/ {
-       thermal-zones {
-               aoss0-thermal {
-                       thermal-sensors = <&tsens0 0>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <90000>;
-                                       hysteresis = <2000>;
-                                       type = "hot";
-                               };
-
-                               trip-point1 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu0-0-top-thermal {
-                       thermal-sensors = <&tsens0 1>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu0-0-btm-thermal {
-                       thermal-sensors = <&tsens0 2>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu0-1-top-thermal {
-                       thermal-sensors = <&tsens0 3>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu0-1-btm-thermal {
-                       thermal-sensors = <&tsens0 4>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu0-2-top-thermal {
-                       thermal-sensors = <&tsens0 5>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu0-2-btm-thermal {
-                       thermal-sensors = <&tsens0 6>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu0-3-top-thermal {
-                       thermal-sensors = <&tsens0 7>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu0-3-btm-thermal {
-                       thermal-sensors = <&tsens0 8>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpuss0-top-thermal {
-                       thermal-sensors = <&tsens0 9>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpuss0-btm-thermal {
-                       thermal-sensors = <&tsens0 10>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               mem-thermal {
-                       thermal-sensors = <&tsens0 11>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <90000>;
-                                       hysteresis = <2000>;
-                                       type = "hot";
-                               };
-
-                               trip-point1 {
-                                       temperature = <115000>;
-                                       hysteresis = <0>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               video-thermal {
-                       thermal-sensors = <&tsens0 12>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <90000>;
-                                       hysteresis = <2000>;
-                                       type = "hot";
-                               };
-
-                               trip-point1 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               aoss1-thermal {
-                       thermal-sensors = <&tsens1 0>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <90000>;
-                                       hysteresis = <2000>;
-                                       type = "hot";
-                               };
-
-                               trip-point1 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu1-0-top-thermal {
-                       thermal-sensors = <&tsens1 1>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu1-0-btm-thermal {
-                       thermal-sensors = <&tsens1 2>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu1-1-top-thermal {
-                       thermal-sensors = <&tsens1 3>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu1-1-btm-thermal {
-                       thermal-sensors = <&tsens1 4>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu1-2-top-thermal {
-                       thermal-sensors = <&tsens1 5>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu1-2-btm-thermal {
-                       thermal-sensors = <&tsens1 6>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu1-3-top-thermal {
-                       thermal-sensors = <&tsens1 7>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpu1-3-btm-thermal {
-                       thermal-sensors = <&tsens1 8>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpuss1-top-thermal {
-                       thermal-sensors = <&tsens1 9>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               cpuss1-btm-thermal {
-                       thermal-sensors = <&tsens1 10>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               aoss2-thermal {
-                       thermal-sensors = <&tsens2 0>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <90000>;
-                                       hysteresis = <2000>;
-                                       type = "hot";
-                               };
-
-                               trip-point1 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-
-               nsp0-thermal {
-                       thermal-sensors = <&tsens2 1>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <90000>;
-                                       hysteresis = <2000>;
-                                       type = "hot";
-                               };
-
-                               trip-point1 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
+&thermal_camera1 {
+       thermal-sensors = <&tsens2 10>;
+};
 
-               nsp1-thermal {
-                       thermal-sensors = <&tsens2 2>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <90000>;
-                                       hysteresis = <2000>;
-                                       type = "hot";
-                               };
-
-                               trip-point1 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
+&thermal_gpuss_0 {
+       thermal-sensors = <&tsens2 5>;
+};
 
-               nsp2-thermal {
-                       thermal-sensors = <&tsens2 3>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <90000>;
-                                       hysteresis = <2000>;
-                                       type = "hot";
-                               };
-
-                               trip-point1 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
+&thermal_gpuss_1 {
+       thermal-sensors = <&tsens2 6>;
+};
 
-               nsp3-thermal {
-                       thermal-sensors = <&tsens2 4>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <90000>;
-                                       hysteresis = <2000>;
-                                       type = "hot";
-                               };
-
-                               trip-point1 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
+&thermal_gpuss_2 {
+       thermal-sensors = <&tsens2 7>;
+};
 
-               gpuss-0-thermal {
-                       polling-delay-passive = <200>;
-
-                       thermal-sensors = <&tsens2 5>;
-
-                       cooling-maps {
-                               map0 {
-                                       trip = <&gpuss0_alert0>;
-                                       cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
-                               };
-                       };
-
-                       trips {
-                               gpuss0_alert0: trip-point0 {
-                                       temperature = <95000>;
-                                       hysteresis = <1000>;
-                                       type = "passive";
-                               };
-
-                               trip-point1 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
+&thermal_gpuss_3 {
+       thermal-sensors = <&tsens2 8>;
+};
 
-               gpuss-1-thermal {
-                       polling-delay-passive = <200>;
-
-                       thermal-sensors = <&tsens2 6>;
-
-                       cooling-maps {
-                               map0 {
-                                       trip = <&gpuss1_alert0>;
-                                       cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
-                               };
-                       };
-
-                       trips {
-                               gpuss1_alert0: trip-point0 {
-                                       temperature = <95000>;
-                                       hysteresis = <1000>;
-                                       type = "passive";
-                               };
-
-                               trip-point1 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
+&thermal_nsp0 {
+       thermal-sensors = <&tsens2 1>;
+};
 
-               gpuss-2-thermal {
-                       polling-delay-passive = <200>;
-
-                       thermal-sensors = <&tsens2 7>;
-
-                       cooling-maps {
-                               map0 {
-                                       trip = <&gpuss2_alert0>;
-                                       cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
-                               };
-                       };
-
-                       trips {
-                               gpuss2_alert0: trip-point0 {
-                                       temperature = <95000>;
-                                       hysteresis = <1000>;
-                                       type = "passive";
-                               };
-
-                               trip-point1 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
+&thermal_nsp1 {
+       thermal-sensors = <&tsens2 2>;
+};
 
-               gpuss-3-thermal {
-                       polling-delay-passive = <200>;
-
-                       thermal-sensors = <&tsens2 8>;
-
-                       cooling-maps {
-                               map0 {
-                                       trip = <&gpuss3_alert0>;
-                                       cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
-                               };
-                       };
-
-                       trips {
-                               gpuss3_alert0: trip-point0 {
-                                       temperature = <95000>;
-                                       hysteresis = <1000>;
-                                       type = "passive";
-                               };
-
-                               trip-point1 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
+&thermal_nsp2 {
+       thermal-sensors = <&tsens2 3>;
+};
 
-               camera0-thermal {
-                       thermal-sensors = <&tsens2 9>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <90000>;
-                                       hysteresis = <2000>;
-                                       type = "hot";
-                               };
-
-                               trip-point1 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
+&thermal_nsp3 {
+       thermal-sensors = <&tsens2 4>;
+};
 
-               camera1-thermal {
-                       thermal-sensors = <&tsens2 10>;
-
-                       trips {
-                               trip-point0 {
-                                       temperature = <90000>;
-                                       hysteresis = <2000>;
-                                       type = "hot";
-                               };
-
-                               trip-point1 {
-                                       temperature = <115000>;
-                                       hysteresis = <1000>;
-                                       type = "critical";
-                               };
-                       };
-               };
-       };
+/* While physically present, this controller is left unconfigured and unused */
+&tsens3 {
+       status = "disabled";
 };