kernel: update kernel 4.4 to version 4.4.110
[librecmc/librecmc.git] / target / linux / ipq806x / patches-4.4 / 310-add-necessary-thermal-data.patch
1 --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
2 +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
3 @@ -31,6 +31,9 @@
4                         clock-latency = <100000>;
5                         cpu-supply = <&smb208_s2a>;
6                         voltage-tolerance = <5>;
7 +                       cooling-min-state = <0>;
8 +                       cooling-max-state = <10>;
9 +                       #cooling-cells = <2>;
10                         cpu-idle-states = <&CPU_SPC>;
11                 };
12  
13 @@ -46,6 +49,9 @@
14                         clock-names = "cpu", "l2";
15                         clock-latency = <100000>;
16                         cpu-supply = <&smb208_s2b>;
17 +                       cooling-min-state = <0>;
18 +                       cooling-max-state = <10>;
19 +                       #cooling-cells = <2>;
20                         cpu-idle-states = <&CPU_SPC>;
21                 };
22  
23 @@ -70,6 +76,92 @@
24                 };
25         };
26  
27 +       thermal-zones {
28 +               cpu-thermal0 {
29 +                       polling-delay-passive = <250>;
30 +                       polling-delay = <1000>;
31 +
32 +                       thermal-sensors = <&gcc 5>;
33 +                       coefficients = <1132 0>;
34 +
35 +                       trips {
36 +                               cpu_alert0: trip0 {
37 +                                       temperature = <75000>;
38 +                                       hysteresis = <2000>;
39 +                                       type = "passive";
40 +                               };
41 +                               cpu_crit0: trip1 {
42 +                                       temperature = <110000>;
43 +                                       hysteresis = <2000>;
44 +                                       type = "critical";
45 +                               };
46 +                       };
47 +               };
48 +
49 +               cpu-thermal1 {
50 +                       polling-delay-passive = <250>;
51 +                       polling-delay = <1000>;
52 +
53 +                       thermal-sensors = <&gcc 6>;
54 +                       coefficients = <1132 0>;
55 +
56 +                       trips {
57 +                               cpu_alert1: trip0 {
58 +                                       temperature = <75000>;
59 +                                       hysteresis = <2000>;
60 +                                       type = "passive";
61 +                               };
62 +                               cpu_crit1: trip1 {
63 +                                       temperature = <110000>;
64 +                                       hysteresis = <2000>;
65 +                                       type = "critical";
66 +                               };
67 +                       };
68 +               };
69 +
70 +               cpu-thermal2 {
71 +                       polling-delay-passive = <250>;
72 +                       polling-delay = <1000>;
73 +
74 +                       thermal-sensors = <&gcc 7>;
75 +                       coefficients = <1199 0>;
76 +
77 +                       trips {
78 +                               cpu_alert2: trip0 {
79 +                                       temperature = <75000>;
80 +                                       hysteresis = <2000>;
81 +                                       type = "passive";
82 +                               };
83 +                               cpu_crit2: trip1 {
84 +                                       temperature = <110000>;
85 +                                       hysteresis = <2000>;
86 +                                       type = "critical";
87 +                               };
88 +                       };
89 +               };
90 +
91 +               cpu-thermal3 {
92 +                       polling-delay-passive = <250>;
93 +                       polling-delay = <1000>;
94 +
95 +                       thermal-sensors = <&gcc 8>;
96 +                       coefficients = <1132 0>;
97 +
98 +                       trips {
99 +                               cpu_alert3: trip0 {
100 +                                       temperature = <75000>;
101 +                                       hysteresis = <2000>;
102 +                                       type = "passive";
103 +                               };
104 +                               cpu_crit3: trip1 {
105 +                                       temperature = <110000>;
106 +                                       hysteresis = <2000>;
107 +                                       type = "critical";
108 +                               };
109 +                       };
110 +               };
111 +       };
112 +
113         cpu-pmu {
114                 compatible = "qcom,krait-pmu";
115                 interrupts = <1 10 0x304>;
116 @@ -172,6 +264,21 @@
117                         reg-names = "lpass-lpaif";
118                 };
119  
120 +               qfprom: qfprom@700000 {
121 +                       compatible = "qcom,qfprom", "syscon";
122 +                       reg = <0x00700000 0x1000>;
123 +                       #address-cells = <1>;
124 +                       #size-cells = <1>;
125 +                       ranges;
126 +
127 +                       tsens_calib: calib {
128 +                               reg = <0x400 0x10>;
129 +                       };
130 +                       tsens_backup: backup_calib {
131 +                               reg = <0x410 0x10>;
132 +                       };
133 +               };
134 +
135                 rpm@108000 {
136                         compatible = "qcom,rpm-ipq8064";
137                         reg = <0x108000 0x1000>;
138 @@ -499,8 +606,12 @@
139                 gcc: clock-controller@900000 {
140                         compatible = "qcom,gcc-ipq8064";
141                         reg = <0x00900000 0x4000>;
142 +                       nvmem-cells = <&tsens_calib>, <&tsens_backup>;
143 +                       nvmem-cell-names = "calib", "calib_backup";
144                         #clock-cells = <1>;
145                         #reset-cells = <1>;
146 +                       #power-domain-cells = <1>;
147 +                       #thermal-sensor-cells = <1>;
148                 };
149  
150                 tcsr: syscon@1a400000 {