pm8058.dtsi 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. // SPDX-License-Identifier: GPL-2.0
  2. &ssbi {
  3. pm8058: pmic {
  4. compatible = "qcom,pm8058";
  5. #interrupt-cells = <2>;
  6. interrupt-controller;
  7. #address-cells = <1>;
  8. #size-cells = <0>;
  9. pwrkey@1c {
  10. compatible = "qcom,pm8058-pwrkey";
  11. reg = <0x1c>;
  12. interrupts-extended = <&pm8058 50 IRQ_TYPE_EDGE_RISING>,
  13. <&pm8058 51 IRQ_TYPE_EDGE_RISING>;
  14. debounce = <15625>;
  15. pull-up;
  16. };
  17. pm8058_led48: led@48 {
  18. compatible = "qcom,pm8058-keypad-led";
  19. reg = <0x48>;
  20. status = "disabled";
  21. };
  22. vibrator@4a {
  23. compatible = "qcom,pm8058-vib";
  24. reg = <0x4a>;
  25. };
  26. pm8058_mpps: mpps@50 {
  27. compatible = "qcom,pm8058-mpp",
  28. "qcom,ssbi-mpp";
  29. reg = <0x50>;
  30. gpio-controller;
  31. #gpio-cells = <2>;
  32. gpio-ranges = <&pm8058_mpps 0 0 12>;
  33. interrupt-controller;
  34. #interrupt-cells = <2>;
  35. };
  36. pm8058_led131: led@131 {
  37. compatible = "qcom,pm8058-led";
  38. reg = <0x131>;
  39. status = "disabled";
  40. };
  41. pm8058_led132: led@132 {
  42. compatible = "qcom,pm8058-led";
  43. reg = <0x132>;
  44. status = "disabled";
  45. };
  46. pm8058_led133: led@133 {
  47. compatible = "qcom,pm8058-led";
  48. reg = <0x133>;
  49. status = "disabled";
  50. };
  51. pm8058_keypad: keypad@148 {
  52. compatible = "qcom,pm8058-keypad";
  53. reg = <0x148>;
  54. interrupts-extended = <&pm8058 74 IRQ_TYPE_EDGE_RISING>,
  55. <&pm8058 75 IRQ_TYPE_EDGE_RISING>;
  56. debounce = <15>;
  57. scan-delay = <32>;
  58. row-hold = <91500>;
  59. };
  60. pm8058_gpio: gpio@150 {
  61. compatible = "qcom,pm8058-gpio",
  62. "qcom,ssbi-gpio";
  63. reg = <0x150>;
  64. interrupt-controller;
  65. #interrupt-cells = <2>;
  66. gpio-controller;
  67. gpio-ranges = <&pm8058_gpio 0 0 44>;
  68. #gpio-cells = <2>;
  69. };
  70. pm8058_xoadc: xoadc@197 {
  71. compatible = "qcom,pm8058-adc";
  72. reg = <0x197>;
  73. interrupts-extended = <&pm8058 76 IRQ_TYPE_EDGE_RISING>;
  74. #address-cells = <2>;
  75. #size-cells = <0>;
  76. #io-channel-cells = <2>;
  77. vcoin: adc-channel@0 {
  78. reg = <0x00 0x00>;
  79. };
  80. vbat: adc-channel@1 {
  81. reg = <0x00 0x01>;
  82. };
  83. dcin: adc-channel@2 {
  84. reg = <0x00 0x02>;
  85. };
  86. ichg: adc-channel@3 {
  87. reg = <0x00 0x03>;
  88. };
  89. vph_pwr: adc-channel@4 {
  90. reg = <0x00 0x04>;
  91. };
  92. usb_vbus: adc-channel@a {
  93. reg = <0x00 0x0a>;
  94. };
  95. die_temp: adc-channel@b {
  96. reg = <0x00 0x0b>;
  97. };
  98. ref_625mv: adc-channel@c {
  99. reg = <0x00 0x0c>;
  100. };
  101. ref_1250mv: adc-channel@d {
  102. reg = <0x00 0x0d>;
  103. };
  104. ref_325mv: adc-channel@e {
  105. reg = <0x00 0x0e>;
  106. };
  107. ref_muxoff: adc-channel@f {
  108. reg = <0x00 0x0f>;
  109. };
  110. };
  111. rtc@1e8 {
  112. compatible = "qcom,pm8058-rtc";
  113. reg = <0x1e8>;
  114. interrupts-extended = <&pm8058 39 IRQ_TYPE_EDGE_RISING>;
  115. allow-set-time;
  116. };
  117. };
  118. };
  119. / {
  120. /*
  121. * These channels from the ADC are simply hardware monitors.
  122. * That is why the ADC is referred to as "HKADC" - HouseKeeping
  123. * ADC.
  124. */
  125. iio-hwmon {
  126. compatible = "iio-hwmon";
  127. io-channels = <&pm8058_xoadc 0x00 0x01>, /* Battery */
  128. <&pm8058_xoadc 0x00 0x02>, /* DC in (charger) */
  129. <&pm8058_xoadc 0x00 0x04>, /* VPH the main system voltage */
  130. <&pm8058_xoadc 0x00 0x0b>, /* Die temperature */
  131. <&pm8058_xoadc 0x00 0x0c>, /* Reference voltage 1.25V */
  132. <&pm8058_xoadc 0x00 0x0d>, /* Reference voltage 0.625V */
  133. <&pm8058_xoadc 0x00 0x0e>; /* Reference voltage 0.325V */
  134. };
  135. };