pm8916.dtsi 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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/input/linux-event-codes.h>
  5. #include <dt-bindings/spmi/spmi.h>
  6. &spmi_bus {
  7. pm8916_0: pm8916@0 {
  8. compatible = "qcom,pm8916", "qcom,spmi-pmic";
  9. reg = <0x0 SPMI_USID>;
  10. #address-cells = <1>;
  11. #size-cells = <0>;
  12. rtc@6000 {
  13. compatible = "qcom,pm8941-rtc";
  14. reg = <0x6000>;
  15. reg-names = "rtc", "alarm";
  16. interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
  17. };
  18. pon@800 {
  19. compatible = "qcom,pm8916-pon";
  20. reg = <0x800>;
  21. mode-bootloader = <0x2>;
  22. mode-recovery = <0x1>;
  23. pwrkey {
  24. compatible = "qcom,pm8941-pwrkey";
  25. interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
  26. debounce = <15625>;
  27. bias-pull-up;
  28. linux,code = <KEY_POWER>;
  29. };
  30. };
  31. pm8916_gpios: gpios@c000 {
  32. compatible = "qcom,pm8916-gpio";
  33. reg = <0xc000>;
  34. gpio-controller;
  35. #gpio-cells = <2>;
  36. interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
  37. <0 0xc1 0 IRQ_TYPE_NONE>,
  38. <0 0xc2 0 IRQ_TYPE_NONE>,
  39. <0 0xc3 0 IRQ_TYPE_NONE>;
  40. };
  41. pm8916_mpps: mpps@a000 {
  42. compatible = "qcom,pm8916-mpp";
  43. reg = <0xa000>;
  44. gpio-controller;
  45. #gpio-cells = <2>;
  46. interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
  47. <0 0xa1 0 IRQ_TYPE_NONE>,
  48. <0 0xa2 0 IRQ_TYPE_NONE>,
  49. <0 0xa3 0 IRQ_TYPE_NONE>;
  50. };
  51. pm8916_temp: temp-alarm@2400 {
  52. compatible = "qcom,spmi-temp-alarm";
  53. reg = <0x2400>;
  54. interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
  55. io-channels = <&pm8916_vadc VADC_DIE_TEMP>;
  56. io-channel-names = "thermal";
  57. #thermal-sensor-cells = <0>;
  58. };
  59. pm8916_vadc: vadc@3100 {
  60. compatible = "qcom,spmi-vadc";
  61. reg = <0x3100>;
  62. interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
  63. #address-cells = <1>;
  64. #size-cells = <0>;
  65. #io-channel-cells = <1>;
  66. usb_in {
  67. reg = <VADC_USBIN>;
  68. qcom,pre-scaling = <1 10>;
  69. };
  70. vph_pwr {
  71. reg = <VADC_VSYS>;
  72. qcom,pre-scaling = <1 3>;
  73. };
  74. die_temp {
  75. reg = <VADC_DIE_TEMP>;
  76. };
  77. ref_625mv {
  78. reg = <VADC_REF_625MV>;
  79. };
  80. ref_1250v {
  81. reg = <VADC_REF_1250MV>;
  82. };
  83. ref_gnd {
  84. reg = <VADC_GND_REF>;
  85. };
  86. ref_vdd {
  87. reg = <VADC_VDD_VADC>;
  88. };
  89. };
  90. };
  91. pm8916_1: pm8916@1 {
  92. compatible = "qcom,pm8916", "qcom,spmi-pmic";
  93. reg = <0x1 SPMI_USID>;
  94. #address-cells = <1>;
  95. #size-cells = <0>;
  96. wcd_codec: codec@f000 {
  97. compatible = "qcom,pm8916-wcd-analog-codec";
  98. reg = <0xf000 0x200>;
  99. reg-names = "pmic-codec-core";
  100. clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
  101. clock-names = "mclk";
  102. interrupt-parent = <&spmi_bus>;
  103. interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
  104. <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
  105. <0x1 0xf0 0x2 IRQ_TYPE_NONE>,
  106. <0x1 0xf0 0x3 IRQ_TYPE_NONE>,
  107. <0x1 0xf0 0x4 IRQ_TYPE_NONE>,
  108. <0x1 0xf0 0x5 IRQ_TYPE_NONE>,
  109. <0x1 0xf0 0x6 IRQ_TYPE_NONE>,
  110. <0x1 0xf0 0x7 IRQ_TYPE_NONE>,
  111. <0x1 0xf1 0x0 IRQ_TYPE_NONE>,
  112. <0x1 0xf1 0x1 IRQ_TYPE_NONE>,
  113. <0x1 0xf1 0x2 IRQ_TYPE_NONE>,
  114. <0x1 0xf1 0x3 IRQ_TYPE_NONE>,
  115. <0x1 0xf1 0x4 IRQ_TYPE_NONE>,
  116. <0x1 0xf1 0x5 IRQ_TYPE_NONE>;
  117. interrupt-names = "cdc_spk_cnp_int",
  118. "cdc_spk_clip_int",
  119. "cdc_spk_ocp_int",
  120. "mbhc_ins_rem_det1",
  121. "mbhc_but_rel_det",
  122. "mbhc_but_press_det",
  123. "mbhc_ins_rem_det",
  124. "mbhc_switch_int",
  125. "cdc_ear_ocp_int",
  126. "cdc_hphr_ocp_int",
  127. "cdc_hphl_ocp_det",
  128. "cdc_ear_cnp_int",
  129. "cdc_hphr_cnp_int",
  130. "cdc_hphl_cnp_int";
  131. vdd-cdc-io-supply = <&pm8916_l5>;
  132. vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>;
  133. vdd-micbias-supply = <&pm8916_l13>;
  134. #sound-dai-cells = <1>;
  135. };
  136. };
  137. };