pm660.dtsi 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. // SPDX-License-Identifier: BSD-3-Clause
  2. /*
  3. * Copyright (c) 2020, Konrad Dybcio
  4. */
  5. #include <dt-bindings/iio/qcom,spmi-vadc.h>
  6. #include <dt-bindings/input/linux-event-codes.h>
  7. #include <dt-bindings/interrupt-controller/irq.h>
  8. #include <dt-bindings/spmi/spmi.h>
  9. #include <dt-bindings/thermal/thermal.h>
  10. / {
  11. thermal-zones {
  12. pm660 {
  13. polling-delay-passive = <250>;
  14. polling-delay = <1000>;
  15. thermal-sensors = <&pm660_temp>;
  16. trips {
  17. pm660_alert0: pm660-alert0 {
  18. temperature = <95000>;
  19. hysteresis = <2000>;
  20. type = "passive";
  21. };
  22. pm660_crit: pm660-crit {
  23. temperature = <125000>;
  24. hysteresis = <2000>;
  25. type = "critical";
  26. };
  27. };
  28. };
  29. };
  30. };
  31. &spmi_bus {
  32. pmic@0 {
  33. compatible = "qcom,pm660", "qcom,spmi-pmic";
  34. reg = <0x0 SPMI_USID>;
  35. #address-cells = <1>;
  36. #size-cells = <0>;
  37. rtc@6000 {
  38. compatible = "qcom,pm8941-rtc";
  39. reg = <0x6000>, <0x6100>;
  40. reg-names = "rtc", "alarm";
  41. interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
  42. };
  43. pon: pon@800 {
  44. compatible = "qcom,pm8998-pon";
  45. reg = <0x800>;
  46. mode-bootloader = <0x2>;
  47. mode-recovery = <0x1>;
  48. pon_pwrkey: pwrkey {
  49. compatible = "qcom,pm8941-pwrkey";
  50. interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
  51. debounce = <15625>;
  52. bias-pull-up;
  53. linux,code = <KEY_POWER>;
  54. status = "disabled";
  55. };
  56. pon_resin: resin {
  57. compatible = "qcom,pm8941-resin";
  58. interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
  59. debounce = <15625>;
  60. bias-pull-up;
  61. status = "disabled";
  62. };
  63. };
  64. pm660_temp: temp-alarm@2400 {
  65. compatible = "qcom,spmi-temp-alarm";
  66. reg = <0x2400>;
  67. interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
  68. io-channels = <&pm660_adc ADC5_DIE_TEMP>;
  69. io-channel-names = "thermal";
  70. #thermal-sensor-cells = <0>;
  71. };
  72. pm660_adc: adc@3100 {
  73. compatible = "qcom,spmi-adc-rev2";
  74. reg = <0x3100>;
  75. interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
  76. #address-cells = <1>;
  77. #size-cells = <0>;
  78. #io-channel-cells = <1>;
  79. ref_gnd: ref_gnd@0 {
  80. reg = <ADC5_REF_GND>;
  81. qcom,decimation = <1024>;
  82. qcom,pre-scaling = <1 1>;
  83. };
  84. vref_1p25: vref_1p25@1 {
  85. reg = <ADC5_1P25VREF>;
  86. qcom,decimation = <1024>;
  87. qcom,pre-scaling = <1 1>;
  88. };
  89. die_temp: die_temp@6 {
  90. reg = <ADC5_DIE_TEMP>;
  91. qcom,decimation = <1024>;
  92. qcom,pre-scaling = <1 1>;
  93. };
  94. xo_therm: xo_therm@4c {
  95. reg = <ADC5_XO_THERM_100K_PU>;
  96. qcom,pre-scaling = <1 1>;
  97. qcom,decimation = <1024>;
  98. qcom,hw-settle-time = <200>;
  99. qcom,ratiometric;
  100. };
  101. msm_therm: msm_therm@4d {
  102. reg = <ADC5_AMUX_THM1_100K_PU>;
  103. qcom,pre-scaling = <1 1>;
  104. qcom,decimation = <1024>;
  105. qcom,hw-settle-time = <200>;
  106. qcom,ratiometric;
  107. };
  108. emmc_therm: emmc_therm@4e {
  109. reg = <ADC5_AMUX_THM2_100K_PU>;
  110. qcom,pre-scaling = <1 1>;
  111. qcom,decimation = <1024>;
  112. qcom,hw-settle-time = <200>;
  113. qcom,ratiometric;
  114. };
  115. pa_therm0: thermistor0@4f {
  116. reg = <ADC5_AMUX_THM3_100K_PU>;
  117. qcom,pre-scaling = <1 1>;
  118. qcom,decimation = <1024>;
  119. qcom,hw-settle-time = <200>;
  120. qcom,ratiometric;
  121. };
  122. pa_therm1: thermistor1@50 {
  123. reg = <ADC5_AMUX_THM4_100K_PU>;
  124. qcom,pre-scaling = <1 1>;
  125. qcom,decimation = <1024>;
  126. qcom,hw-settle-time = <200>;
  127. qcom,ratiometric;
  128. };
  129. quiet_therm: quiet_therm@51 {
  130. reg = <ADC5_AMUX_THM5_100K_PU>;
  131. qcom,pre-scaling = <1 1>;
  132. qcom,decimation = <1024>;
  133. qcom,hw-settle-time = <200>;
  134. qcom,ratiometric;
  135. };
  136. vadc_vph_pwr: vph_pwr@83 {
  137. reg = <ADC5_VPH_PWR>;
  138. qcom,decimation = <1024>;
  139. qcom,pre-scaling = <1 3>;
  140. };
  141. vcoin: vcoin@85 {
  142. reg = <ADC5_VCOIN>;
  143. qcom,decimation = <1024>;
  144. qcom,pre-scaling = <1 3>;
  145. };
  146. };
  147. pm660_gpios: gpios@c000 {
  148. compatible = "qcom,pm660-gpio", "qcom,spmi-gpio";
  149. reg = <0xc000>;
  150. gpio-controller;
  151. gpio-ranges = <&pm660_gpios 0 0 13>;
  152. #gpio-cells = <2>;
  153. interrupt-controller;
  154. #interrupt-cells = <2>;
  155. };
  156. };
  157. pmic@1 {
  158. compatible = "qcom,pm660", "qcom,spmi-pmic";
  159. reg = <0x1 SPMI_USID>;
  160. #address-cells = <1>;
  161. #size-cells = <0>;
  162. pm660_spmi_regulators: regulators {
  163. compatible = "qcom,pm660-regulators";
  164. };
  165. };
  166. };