ARM: dts: qcom: apq8064: create tsens device node
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sat, 21 May 2022 15:14:37 +0000 (18:14 +0300)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 13 Jul 2022 21:23:34 +0000 (16:23 -0500)
Create separate device node for thermal sensors on apq8064 platform.
Move related properties to the newly created device tree node.
This harmonizes apq8064 and ipq8064 device trees and allows gcc device
to be probed earlier by removing dependency on QFPROM nodes.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220521151437.1489111-5-dmitry.baryshkov@linaro.org
arch/arm/boot/dts/qcom-apq8064.dtsi

index cc38829774839bcabd32cd5796c6464426165129..01207f6116a905f008fffad37101389b61f4d4fc 100644 (file)
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
 
-                       thermal-sensors = <&gcc 7>;
+                       thermal-sensors = <&tsens 7>;
                        coefficients = <1199 0>;
 
                        trips {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
 
-                       thermal-sensors = <&gcc 8>;
+                       thermal-sensors = <&tsens 8>;
                        coefficients = <1132 0>;
 
                        trips {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
 
-                       thermal-sensors = <&gcc 9>;
+                       thermal-sensors = <&tsens 9>;
                        coefficients = <1199 0>;
 
                        trips {
                        polling-delay-passive = <250>;
                        polling-delay = <1000>;
 
-                       thermal-sensors = <&gcc 10>;
+                       thermal-sensors = <&tsens 10>;
                        coefficients = <1132 0>;
 
                        trips {
                };
 
                gcc: clock-controller@900000 {
-                       compatible = "qcom,gcc-apq8064";
+                       compatible = "qcom,gcc-apq8064", "syscon";
                        reg = <0x00900000 0x4000>;
-                       nvmem-cells = <&tsens_calib>, <&tsens_backup>;
-                       nvmem-cell-names = "calib", "calib_backup";
                        #clock-cells = <1>;
                        #power-domain-cells = <1>;
                        #reset-cells = <1>;
-                       #thermal-sensor-cells = <1>;
+
+                       tsens: thermal-sensor {
+                               compatible = "qcom,msm8960-tsens";
+
+                               nvmem-cells = <&tsens_calib>, <&tsens_backup>;
+                               nvmem-cell-names = "calib", "calib_backup";
+                               interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupt-names = "uplow";
+
+                               #qcom,sensors = <11>;
+                               #thermal-sensor-cells = <1>;
+                       };
                };
 
                lcc: clock-controller@28000000 {