pm7250b.dtsi 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. // SPDX-License-Identifier: BSD-3-Clause
  2. /*
  3. * Copyright (C) 2022 Luca Weiss <[email protected]>
  4. */
  5. #include <dt-bindings/iio/qcom,spmi-vadc.h>
  6. #include <dt-bindings/interrupt-controller/irq.h>
  7. #include <dt-bindings/spmi/spmi.h>
  8. / {
  9. thermal-zones {
  10. pm7250b-thermal {
  11. polling-delay-passive = <100>;
  12. polling-delay = <0>;
  13. thermal-sensors = <&pm7250b_temp>;
  14. trips {
  15. trip0 {
  16. temperature = <95000>;
  17. hysteresis = <0>;
  18. type = "passive";
  19. };
  20. trip1 {
  21. temperature = <115000>;
  22. hysteresis = <0>;
  23. type = "hot";
  24. };
  25. trip2 {
  26. temperature = <145000>;
  27. hysteresis = <0>;
  28. type = "critical";
  29. };
  30. };
  31. };
  32. };
  33. };
  34. &spmi_bus {
  35. pmic@2 {
  36. compatible = "qcom,pm7250b", "qcom,spmi-pmic";
  37. reg = <0x2 SPMI_USID>;
  38. #address-cells = <1>;
  39. #size-cells = <0>;
  40. pm7250b_temp: temp-alarm@2400 {
  41. compatible = "qcom,spmi-temp-alarm";
  42. reg = <0x2400>;
  43. interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
  44. io-channels = <&pm7250b_adc ADC5_DIE_TEMP>;
  45. io-channel-names = "thermal";
  46. #thermal-sensor-cells = <0>;
  47. };
  48. pm7250b_adc: adc@3100 {
  49. compatible = "qcom,spmi-adc5";
  50. reg = <0x3100>;
  51. #address-cells = <1>;
  52. #size-cells = <0>;
  53. #io-channel-cells = <1>;
  54. interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
  55. adc-chan@0 {
  56. reg = <ADC5_REF_GND>;
  57. qcom,pre-scaling = <1 1>;
  58. label = "ref_gnd";
  59. };
  60. adc-chan@1 {
  61. reg = <ADC5_1P25VREF>;
  62. qcom,pre-scaling = <1 1>;
  63. label = "vref_1p25";
  64. };
  65. adc-chan@2 {
  66. reg = <ADC5_DIE_TEMP>;
  67. qcom,pre-scaling = <1 1>;
  68. label = "die_temp";
  69. };
  70. adc-chan@7 {
  71. reg = <ADC5_USB_IN_I>;
  72. qcom,pre-scaling = <1 1>;
  73. label = "usb_in_i_uv";
  74. };
  75. adc-chan@8 {
  76. reg = <ADC5_USB_IN_V_16>;
  77. qcom,pre-scaling = <1 16>;
  78. label = "usb_in_v_div_16";
  79. };
  80. adc-chan@9 {
  81. reg = <ADC5_CHG_TEMP>;
  82. qcom,pre-scaling = <1 1>;
  83. label = "chg_temp";
  84. };
  85. adc-chan@e {
  86. reg = <ADC5_AMUX_THM2>;
  87. qcom,hw-settle-time = <200>;
  88. qcom,pre-scaling = <1 1>;
  89. label = "smb1390_therm";
  90. };
  91. adc-chan@1e {
  92. reg = <ADC5_MID_CHG_DIV6>;
  93. qcom,pre-scaling = <1 6>;
  94. label = "chg_mid";
  95. };
  96. adc-chan@83 {
  97. reg = <ADC5_VPH_PWR>;
  98. qcom,pre-scaling = <1 3>;
  99. label = "vph_pwr";
  100. };
  101. adc-chan@84 {
  102. reg = <ADC5_VBAT_SNS>;
  103. qcom,pre-scaling = <1 3>;
  104. label = "vbat_sns";
  105. };
  106. adc-chan@99 {
  107. reg = <ADC5_SBUx>;
  108. qcom,pre-scaling = <1 3>;
  109. label = "chg_sbux";
  110. };
  111. };
  112. pm7250b_adc_tm: adc-tm@3500 {
  113. compatible = "qcom,spmi-adc-tm5";
  114. reg = <0x3500>;
  115. interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
  116. #thermal-sensor-cells = <1>;
  117. #address-cells = <1>;
  118. #size-cells = <0>;
  119. status = "disabled";
  120. };
  121. };
  122. pmic@3 {
  123. compatible = "qcom,pm7250b", "qcom,spmi-pmic";
  124. reg = <0x3 SPMI_USID>;
  125. #address-cells = <1>;
  126. #size-cells = <0>;
  127. };
  128. };