diff options
author | dissent1 <be.dissent+github@gmail.com> | 2016-11-05 16:15:33 +0300 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-12-01 15:47:43 +0100 |
commit | fef6a96d9e9e001a28b6a673c56ed79029457b5d (patch) | |
tree | 808f89926a7a7a2b3b29564e2070592ef983d948 /target/linux/ipq806x/files/arch/arm/boot/dts | |
parent | 2b71f958b1d2022bd0c4dcaa458f5ba1b955f934 (diff) | |
download | upstream-fef6a96d9e9e001a28b6a673c56ed79029457b5d.tar.gz upstream-fef6a96d9e9e001a28b6a673c56ed79029457b5d.tar.bz2 upstream-fef6a96d9e9e001a28b6a673c56ed79029457b5d.zip |
ipq806x: add thermal sensor driver
Allows to check cpu temperature.
Huge thanks to @hnyman for valuable assistance!
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Diffstat (limited to 'target/linux/ipq806x/files/arch/arm/boot/dts')
-rw-r--r-- | target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065.dtsi | 109 |
1 files changed, 97 insertions, 12 deletions
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065.dtsi b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065.dtsi index e0ba99a41c..614610c016 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065.dtsi +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065.dtsi @@ -79,6 +79,92 @@ }; }; + 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>; @@ -205,8 +291,14 @@ 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 { @@ -687,9 +779,12 @@ 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 { @@ -704,16 +799,6 @@ 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>; |