pm8916.dtsi 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. // SPDX-License-Identifier: GPL-2.0
  2. #include <dt-bindings/iio/qcom,spmi-vadc.h>
  3. #include <dt-bindings/input/linux-event-codes.h>
  4. #include <dt-bindings/interrupt-controller/irq.h>
  5. #include <dt-bindings/spmi/spmi.h>
  6. &spmi_bus {
  7. pm8916_0: pmic@0 {
  8. compatible = "qcom,pm8916", "qcom,spmi-pmic";
  9. reg = <0x0 SPMI_USID>;
  10. #address-cells = <1>;
  11. #size-cells = <0>;
  12. pon@800 {
  13. compatible = "qcom,pm8916-pon";
  14. reg = <0x800>;
  15. mode-bootloader = <0x2>;
  16. mode-recovery = <0x1>;
  17. pwrkey {
  18. compatible = "qcom,pm8941-pwrkey";
  19. interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
  20. debounce = <15625>;
  21. bias-pull-up;
  22. linux,code = <KEY_POWER>;
  23. };
  24. pm8916_resin: resin {
  25. compatible = "qcom,pm8941-resin";
  26. interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
  27. debounce = <15625>;
  28. bias-pull-up;
  29. status = "disabled";
  30. };
  31. watchdog {
  32. compatible = "qcom,pm8916-wdt";
  33. interrupts = <0x0 0x8 6 IRQ_TYPE_EDGE_RISING>;
  34. timeout-sec = <60>;
  35. };
  36. };
  37. pm8916_usbin: extcon@1300 {
  38. compatible = "qcom,pm8941-misc";
  39. reg = <0x1300>;
  40. interrupts = <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>;
  41. interrupt-names = "usb_vbus";
  42. status = "disabled";
  43. };
  44. pm8916_temp: temp-alarm@2400 {
  45. compatible = "qcom,spmi-temp-alarm";
  46. reg = <0x2400>;
  47. interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
  48. io-channels = <&pm8916_vadc VADC_DIE_TEMP>;
  49. io-channel-names = "thermal";
  50. #thermal-sensor-cells = <0>;
  51. };
  52. pm8916_vadc: adc@3100 {
  53. compatible = "qcom,spmi-vadc";
  54. reg = <0x3100>;
  55. interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
  56. #address-cells = <1>;
  57. #size-cells = <0>;
  58. #io-channel-cells = <1>;
  59. adc-chan@0 {
  60. reg = <VADC_USBIN>;
  61. qcom,pre-scaling = <1 10>;
  62. };
  63. adc-chan@7 {
  64. reg = <VADC_VSYS>;
  65. qcom,pre-scaling = <1 3>;
  66. };
  67. adc-chan@8 {
  68. reg = <VADC_DIE_TEMP>;
  69. };
  70. adc-chan@9 {
  71. reg = <VADC_REF_625MV>;
  72. };
  73. adc-chan@a {
  74. reg = <VADC_REF_1250MV>;
  75. };
  76. adc-chan@e {
  77. reg = <VADC_GND_REF>;
  78. };
  79. adc-chan@f {
  80. reg = <VADC_VDD_VADC>;
  81. };
  82. };
  83. rtc@6000 {
  84. compatible = "qcom,pm8941-rtc";
  85. reg = <0x6000>;
  86. interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
  87. };
  88. pm8916_mpps: mpps@a000 {
  89. compatible = "qcom,pm8916-mpp", "qcom,spmi-mpp";
  90. reg = <0xa000>;
  91. gpio-controller;
  92. #gpio-cells = <2>;
  93. gpio-ranges = <&pm8916_mpps 0 0 4>;
  94. interrupt-controller;
  95. #interrupt-cells = <2>;
  96. };
  97. pm8916_gpios: gpios@c000 {
  98. compatible = "qcom,pm8916-gpio", "qcom,spmi-gpio";
  99. reg = <0xc000>;
  100. gpio-controller;
  101. gpio-ranges = <&pm8916_gpios 0 0 4>;
  102. #gpio-cells = <2>;
  103. interrupt-controller;
  104. #interrupt-cells = <2>;
  105. };
  106. };
  107. pm8916_1: pmic@1 {
  108. compatible = "qcom,pm8916", "qcom,spmi-pmic";
  109. reg = <0x1 SPMI_USID>;
  110. #address-cells = <1>;
  111. #size-cells = <0>;
  112. pm8916_pwm: pwm {
  113. compatible = "qcom,pm8916-pwm";
  114. #pwm-cells = <2>;
  115. status = "disabled";
  116. };
  117. pm8916_vib: vibrator@c000 {
  118. compatible = "qcom,pm8916-vib";
  119. reg = <0xc000>;
  120. status = "disabled";
  121. };
  122. wcd_codec: audio-codec@f000 {
  123. compatible = "qcom,pm8916-wcd-analog-codec";
  124. reg = <0xf000>;
  125. reg-names = "pmic-codec-core";
  126. clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
  127. clock-names = "mclk";
  128. interrupt-parent = <&spmi_bus>;
  129. interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
  130. <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
  131. <0x1 0xf0 0x2 IRQ_TYPE_NONE>,
  132. <0x1 0xf0 0x3 IRQ_TYPE_NONE>,
  133. <0x1 0xf0 0x4 IRQ_TYPE_NONE>,
  134. <0x1 0xf0 0x5 IRQ_TYPE_NONE>,
  135. <0x1 0xf0 0x6 IRQ_TYPE_NONE>,
  136. <0x1 0xf0 0x7 IRQ_TYPE_NONE>,
  137. <0x1 0xf1 0x0 IRQ_TYPE_NONE>,
  138. <0x1 0xf1 0x1 IRQ_TYPE_NONE>,
  139. <0x1 0xf1 0x2 IRQ_TYPE_NONE>,
  140. <0x1 0xf1 0x3 IRQ_TYPE_NONE>,
  141. <0x1 0xf1 0x4 IRQ_TYPE_NONE>,
  142. <0x1 0xf1 0x5 IRQ_TYPE_NONE>;
  143. interrupt-names = "cdc_spk_cnp_int",
  144. "cdc_spk_clip_int",
  145. "cdc_spk_ocp_int",
  146. "mbhc_ins_rem_det1",
  147. "mbhc_but_rel_det",
  148. "mbhc_but_press_det",
  149. "mbhc_ins_rem_det",
  150. "mbhc_switch_int",
  151. "cdc_ear_ocp_int",
  152. "cdc_hphr_ocp_int",
  153. "cdc_hphl_ocp_det",
  154. "cdc_ear_cnp_int",
  155. "cdc_hphr_cnp_int",
  156. "cdc_hphl_cnp_int";
  157. vdd-cdc-io-supply = <&pm8916_l5>;
  158. vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>;
  159. vdd-micbias-supply = <&pm8916_l13>;
  160. #sound-dai-cells = <1>;
  161. };
  162. };
  163. };