ipq806x: add thermal sensor driver
[openwrt/staging/lynxis/omap.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8065.dtsi
index e0ba99a41cff70e2c4f1d8d175e6bd9c28e0d9d7..614610c0168d5d39c86302a5053dc6303f60ed63 100644 (file)
                };
        };
 
+       thermal-zones {
+               cpu-thermal0 {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&gcc 5>;
+                       coefficients = <1132 0>;
+
+                       trips {
+                               cpu_alert0: trip0 {
+                                       temperature = <75000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+                               cpu_crit0: trip1 {
+                                       temperature = <110000>;
+                                       hysteresis = <2000>;
+                                       type = "critical";
+                               };
+                       };
+               };
+
+               cpu-thermal1 {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&gcc 6>;
+                       coefficients = <1132 0>;
+
+                       trips {
+                               cpu_alert1: trip0 {
+                                       temperature = <75000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+                               cpu_crit1: trip1 {
+                                       temperature = <110000>;
+                                       hysteresis = <2000>;
+                                       type = "critical";
+                               };
+                       };
+               };
+
+               cpu-thermal2 {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&gcc 7>;
+                       coefficients = <1199 0>;
+
+                       trips {
+                               cpu_alert2: trip0 {
+                                       temperature = <75000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+                               cpu_crit2: trip1 {
+                                       temperature = <110000>;
+                                       hysteresis = <2000>;
+                                       type = "critical";
+                               };
+                       };
+               };
+
+               cpu-thermal3 {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+
+                       thermal-sensors = <&gcc 8>;
+                       coefficients = <1132 0>;
+
+                       trips {
+                               cpu_alert3: trip0 {
+                                       temperature = <75000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+                               cpu_crit3: trip1 {
+                                       temperature = <110000>;
+                                       hysteresis = <2000>;
+                                       type = "critical";
+                               };
+                       };
+               };
+       };
+
        cpu-pmu {
                compatible = "qcom,krait-pmu";
                interrupts = <1 10 0x304>;
                        reg = <0x00700000 0x1000>;
                        #address-cells = <1>;
                        #size-cells = <1>;
-                       stride = <1>;
-                       ranges = <0x0 0x00700000 0x1000>;
+                       ranges;
+
+                       tsens_calib: calib {
+                               reg = <0x400 0x10>;
+                       };
+                       tsens_backup: backup_calib {
+                               reg = <0x410 0x10>;
+                       };
                };
 
                rpm@108000 {
                gcc: clock-controller@900000 {
                        compatible = "qcom,gcc-ipq8064";
                        reg = <0x00900000 0x4000>;
+                       nvmem-cells = <&tsens_calib>, <&tsens_backup>;
+                       nvmem-cell-names = "calib", "calib_backup";
                        #clock-cells = <1>;
                        #reset-cells = <1>;
                        #power-domain-cells = <1>;
+                       #thermal-sensor-cells = <1>;
                };
 
                lcc: clock-controller@28000000 {
                        reg = <0x1a400000 0x100>;
                };
 
-               tsens: tsens-ipq806x {
-                       compatible = "qcom,ipq806x-tsens";
-                       reg = <0x900000 0x3678>, <0x700000 0x420>;
-                       reg-names = "tsens_physical", "tsens_eeprom_physical";
-                       interrupts = <0 178 0>;
-                       qcom,sensors = <11>;
-                       qcom,tsens_factor = <1000>;
-                       qcom,slope = <1176 1176 1154 1176 1111 1132 1132 1199 1132 1199 1132>;
-               };
-
                qcom,msm-thermal {
                        compatible = "qcom,msm-thermal";
                        qcom,sensor-id = <0>;