pms405.dtsi 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. // SPDX-License-Identifier: GPL-2.0
  2. // Copyright (c) 2018, Linaro Limited
  3. #include <dt-bindings/spmi/spmi.h>
  4. #include <dt-bindings/input/linux-event-codes.h>
  5. #include <dt-bindings/iio/qcom,spmi-vadc.h>
  6. #include <dt-bindings/thermal/thermal.h>
  7. / {
  8. thermal-zones {
  9. pms405-thermal {
  10. polling-delay-passive = <250>;
  11. polling-delay = <1000>;
  12. thermal-sensors = <&pms405_temp>;
  13. trips {
  14. pms405_alert0: pms405-alert0 {
  15. temperature = <105000>;
  16. hysteresis = <2000>;
  17. type = "passive";
  18. };
  19. pms405_crit: pms405-crit {
  20. temperature = <125000>;
  21. hysteresis = <2000>;
  22. type = "critical";
  23. };
  24. };
  25. };
  26. };
  27. };
  28. &spmi_bus {
  29. pms405_0: pms405@0 {
  30. compatible = "qcom,pms405", "qcom,spmi-pmic";
  31. reg = <0x0 SPMI_USID>;
  32. #address-cells = <1>;
  33. #size-cells = <0>;
  34. pms405_gpios: gpio@c000 {
  35. compatible = "qcom,pms405-gpio", "qcom,spmi-gpio";
  36. reg = <0xc000>;
  37. gpio-controller;
  38. gpio-ranges = <&pms405_gpios 0 0 12>;
  39. #gpio-cells = <2>;
  40. interrupt-controller;
  41. #interrupt-cells = <2>;
  42. };
  43. pon@800 {
  44. compatible = "qcom,pms405-pon";
  45. reg = <0x0800>;
  46. mode-bootloader = <0x2>;
  47. mode-recovery = <0x1>;
  48. 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. };
  55. };
  56. pms405_temp: temp-alarm@2400 {
  57. compatible = "qcom,spmi-temp-alarm";
  58. reg = <0x2400>;
  59. interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
  60. io-channels = <&pms405_adc ADC5_DIE_TEMP>;
  61. io-channel-names = "thermal";
  62. #thermal-sensor-cells = <0>;
  63. };
  64. pms405_adc: adc@3100 {
  65. compatible = "qcom,pms405-adc", "qcom,spmi-adc-rev2";
  66. reg = <0x3100>;
  67. interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
  68. #address-cells = <1>;
  69. #size-cells = <0>;
  70. #io-channel-cells = <1>;
  71. ref_gnd@0 {
  72. reg = <ADC5_REF_GND>;
  73. qcom,pre-scaling = <1 1>;
  74. };
  75. vref_1p25@1 {
  76. reg = <ADC5_1P25VREF>;
  77. qcom,pre-scaling = <1 1>;
  78. };
  79. pon_1: vph_pwr@131 {
  80. reg = <ADC5_VPH_PWR>;
  81. qcom,pre-scaling = <1 3>;
  82. };
  83. die_temp@6 {
  84. reg = <ADC5_DIE_TEMP>;
  85. qcom,pre-scaling = <1 1>;
  86. };
  87. pa_therm1: thermistor1@77 {
  88. reg = <ADC5_AMUX_THM1_100K_PU>;
  89. qcom,ratiometric;
  90. qcom,hw-settle-time = <200>;
  91. qcom,pre-scaling = <1 1>;
  92. };
  93. pa_therm3: thermistor3@79 {
  94. reg = <ADC5_AMUX_THM3_100K_PU>;
  95. qcom,ratiometric;
  96. qcom,hw-settle-time = <200>;
  97. qcom,pre-scaling = <1 1>;
  98. };
  99. xo_therm: xo_temp@76 {
  100. reg = <ADC5_XO_THERM_100K_PU>;
  101. qcom,ratiometric;
  102. qcom,hw-settle-time = <200>;
  103. qcom,pre-scaling = <1 1>;
  104. };
  105. };
  106. rtc@6000 {
  107. compatible = "qcom,pm8941-rtc";
  108. reg = <0x6000>;
  109. reg-names = "rtc", "alarm";
  110. interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
  111. };
  112. };
  113. pms405_1: pms405@1 {
  114. compatible = "qcom,pms405", "qcom,spmi-pmic";
  115. reg = <0x1 SPMI_USID>;
  116. pms405_spmi_regulators: regulators {
  117. compatible = "qcom,pms405-regulators";
  118. };
  119. };
  120. };