310-add-necessary-thermal-data.patch 3.0 KB

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