qcom-pm8941.dtsi 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. // SPDX-License-Identifier: GPL-2.0
  2. #include <dt-bindings/iio/qcom,spmi-vadc.h>
  3. #include <dt-bindings/interrupt-controller/irq.h>
  4. #include <dt-bindings/spmi/spmi.h>
  5. &spmi_bus {
  6. pm8941_0: pm8941@0 {
  7. compatible = "qcom,pm8941", "qcom,spmi-pmic";
  8. reg = <0x0 SPMI_USID>;
  9. #address-cells = <1>;
  10. #size-cells = <0>;
  11. rtc@6000 {
  12. compatible = "qcom,pm8941-rtc";
  13. reg = <0x6000>,
  14. <0x6100>;
  15. reg-names = "rtc", "alarm";
  16. interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
  17. };
  18. pwrkey@800 {
  19. compatible = "qcom,pm8941-pwrkey";
  20. reg = <0x800>;
  21. interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
  22. debounce = <15625>;
  23. bias-pull-up;
  24. };
  25. usb_id: misc@900 {
  26. compatible = "qcom,pm8941-misc";
  27. reg = <0x900>;
  28. interrupts = <0x0 0x9 0 IRQ_TYPE_EDGE_BOTH>;
  29. interrupt-names = "usb_id";
  30. };
  31. smbb: charger@1000 {
  32. compatible = "qcom,pm8941-charger";
  33. reg = <0x1000>;
  34. interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
  35. <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
  36. <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>,
  37. <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
  38. <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
  39. <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
  40. <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
  41. <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>;
  42. interrupt-names = "chg-done",
  43. "chg-fast",
  44. "chg-trkl",
  45. "bat-temp-ok",
  46. "bat-present",
  47. "chg-gone",
  48. "usb-valid",
  49. "dc-valid";
  50. usb-otg-in-supply = <&pm8941_5vs1>;
  51. chg_otg: otg-vbus { };
  52. };
  53. pm8941_gpios: gpios@c000 {
  54. compatible = "qcom,pm8941-gpio", "qcom,spmi-gpio";
  55. reg = <0xc000>;
  56. gpio-controller;
  57. gpio-ranges = <&pm8941_gpios 0 0 36>;
  58. #gpio-cells = <2>;
  59. interrupt-controller;
  60. #interrupt-cells = <2>;
  61. boost_bypass_n_pin: boost-bypass-state {
  62. pins = "gpio21";
  63. function = "normal";
  64. };
  65. };
  66. pm8941_mpps: mpps@a000 {
  67. compatible = "qcom,pm8941-mpp", "qcom,spmi-mpp";
  68. reg = <0xa000>;
  69. gpio-controller;
  70. #gpio-cells = <2>;
  71. gpio-ranges = <&pm8941_mpps 0 0 8>;
  72. interrupt-controller;
  73. #interrupt-cells = <2>;
  74. };
  75. pm8941_temp: temp-alarm@2400 {
  76. compatible = "qcom,spmi-temp-alarm";
  77. reg = <0x2400>;
  78. interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
  79. io-channels = <&pm8941_vadc VADC_DIE_TEMP>;
  80. io-channel-names = "thermal";
  81. #thermal-sensor-cells = <0>;
  82. };
  83. pm8941_vadc: adc@3100 {
  84. compatible = "qcom,spmi-vadc";
  85. reg = <0x3100>;
  86. interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
  87. #address-cells = <1>;
  88. #size-cells = <0>;
  89. #io-channel-cells = <1>;
  90. bat_temp {
  91. reg = <VADC_LR_MUX1_BAT_THERM>;
  92. };
  93. die_temp {
  94. reg = <VADC_DIE_TEMP>;
  95. };
  96. ref_625mv {
  97. reg = <VADC_REF_625MV>;
  98. };
  99. ref_1250v {
  100. reg = <VADC_REF_1250MV>;
  101. };
  102. ref_gnd {
  103. reg = <VADC_GND_REF>;
  104. };
  105. ref_vdd {
  106. reg = <VADC_VDD_VADC>;
  107. };
  108. vbat_sns {
  109. reg = <VADC_VBAT_SNS>;
  110. };
  111. };
  112. pm8941_iadc: iadc@3600 {
  113. compatible = "qcom,pm8941-iadc", "qcom,spmi-iadc";
  114. reg = <0x3600>;
  115. interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
  116. qcom,external-resistor-micro-ohms = <10000>;
  117. };
  118. pm8941_coincell: coincell@2800 {
  119. compatible = "qcom,pm8941-coincell";
  120. reg = <0x2800>;
  121. status = "disabled";
  122. };
  123. };
  124. pm8941_1: pm8941@1 {
  125. compatible = "qcom,pm8941", "qcom,spmi-pmic";
  126. reg = <0x1 SPMI_USID>;
  127. #address-cells = <1>;
  128. #size-cells = <0>;
  129. pm8941_lpg: pwm {
  130. compatible = "qcom,pm8941-lpg";
  131. #address-cells = <1>;
  132. #size-cells = <0>;
  133. #pwm-cells = <2>;
  134. status = "disabled";
  135. };
  136. pm8941_wled: wled@d800 {
  137. compatible = "qcom,pm8941-wled";
  138. reg = <0xd800>;
  139. label = "backlight";
  140. status = "disabled";
  141. };
  142. regulators {
  143. compatible = "qcom,pm8941-regulators";
  144. interrupts = <0x1 0x83 0x2 0>, <0x1 0x84 0x2 0>;
  145. interrupt-names = "ocp-5vs1", "ocp-5vs2";
  146. vin_5vs-supply = <&pm8941_5v>;
  147. pm8941_5v: s4 {
  148. regulator-min-microvolt = <5000000>;
  149. regulator-max-microvolt = <5000000>;
  150. regulator-enable-ramp-delay = <500>;
  151. };
  152. pm8941_5vs1: 5vs1 {
  153. regulator-enable-ramp-delay = <1000>;
  154. regulator-pull-down;
  155. regulator-over-current-protection;
  156. qcom,ocp-max-retries = <10>;
  157. qcom,ocp-retry-delay = <30>;
  158. qcom,vs-soft-start-strength = <0>;
  159. regulator-initial-mode = <1>;
  160. };
  161. pm8941_5vs2: 5vs2 {
  162. regulator-enable-ramp-delay = <1000>;
  163. regulator-pull-down;
  164. regulator-over-current-protection;
  165. qcom,ocp-max-retries = <10>;
  166. qcom,ocp-retry-delay = <30>;
  167. qcom,vs-soft-start-strength = <0>;
  168. regulator-initial-mode = <1>;
  169. };
  170. };
  171. };
  172. };