pm8916.dtsi 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. pm8916_0: pm8916@0 {
  7. compatible = "qcom,pm8916", "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. reg-names = "rtc", "alarm";
  15. interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
  16. };
  17. pwrkey@800 {
  18. compatible = "qcom,pm8941-pwrkey";
  19. reg = <0x800>;
  20. interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
  21. debounce = <15625>;
  22. bias-pull-up;
  23. };
  24. pm8916_gpios: gpios@c000 {
  25. compatible = "qcom,pm8916-gpio";
  26. reg = <0xc000>;
  27. gpio-controller;
  28. #gpio-cells = <2>;
  29. interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
  30. <0 0xc1 0 IRQ_TYPE_NONE>,
  31. <0 0xc2 0 IRQ_TYPE_NONE>,
  32. <0 0xc3 0 IRQ_TYPE_NONE>;
  33. };
  34. pm8916_mpps: mpps@a000 {
  35. compatible = "qcom,pm8916-mpp";
  36. reg = <0xa000>;
  37. gpio-controller;
  38. #gpio-cells = <2>;
  39. interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
  40. <0 0xa1 0 IRQ_TYPE_NONE>,
  41. <0 0xa2 0 IRQ_TYPE_NONE>,
  42. <0 0xa3 0 IRQ_TYPE_NONE>;
  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: vadc@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. usb_in {
  60. reg = <VADC_USBIN>;
  61. qcom,pre-scaling = <1 10>;
  62. };
  63. vph_pwr {
  64. reg = <VADC_VSYS>;
  65. qcom,pre-scaling = <1 3>;
  66. };
  67. die_temp {
  68. reg = <VADC_DIE_TEMP>;
  69. };
  70. ref_625mv {
  71. reg = <VADC_REF_625MV>;
  72. };
  73. ref_1250v {
  74. reg = <VADC_REF_1250MV>;
  75. };
  76. ref_gnd {
  77. reg = <VADC_GND_REF>;
  78. };
  79. ref_vdd {
  80. reg = <VADC_VDD_VADC>;
  81. };
  82. };
  83. };
  84. pm8916_1: pm8916@1 {
  85. compatible = "qcom,pm8916", "qcom,spmi-pmic";
  86. reg = <0x1 SPMI_USID>;
  87. #address-cells = <1>;
  88. #size-cells = <0>;
  89. wcd_codec: codec@f000 {
  90. compatible = "qcom,pm8916-wcd-analog-codec";
  91. reg = <0xf000 0x200>;
  92. reg-names = "pmic-codec-core";
  93. clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
  94. clock-names = "mclk";
  95. interrupt-parent = <&spmi_bus>;
  96. interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
  97. <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
  98. <0x1 0xf0 0x2 IRQ_TYPE_NONE>,
  99. <0x1 0xf0 0x3 IRQ_TYPE_NONE>,
  100. <0x1 0xf0 0x4 IRQ_TYPE_NONE>,
  101. <0x1 0xf0 0x5 IRQ_TYPE_NONE>,
  102. <0x1 0xf0 0x6 IRQ_TYPE_NONE>,
  103. <0x1 0xf0 0x7 IRQ_TYPE_NONE>,
  104. <0x1 0xf1 0x0 IRQ_TYPE_NONE>,
  105. <0x1 0xf1 0x1 IRQ_TYPE_NONE>,
  106. <0x1 0xf1 0x2 IRQ_TYPE_NONE>,
  107. <0x1 0xf1 0x3 IRQ_TYPE_NONE>,
  108. <0x1 0xf1 0x4 IRQ_TYPE_NONE>,
  109. <0x1 0xf1 0x5 IRQ_TYPE_NONE>;
  110. interrupt-names = "cdc_spk_cnp_int",
  111. "cdc_spk_clip_int",
  112. "cdc_spk_ocp_int",
  113. "mbhc_ins_rem_det1",
  114. "mbhc_but_rel_det",
  115. "mbhc_but_press_det",
  116. "mbhc_ins_rem_det",
  117. "mbhc_switch_int",
  118. "cdc_ear_ocp_int",
  119. "cdc_hphr_ocp_int",
  120. "cdc_hphl_ocp_det",
  121. "cdc_ear_cnp_int",
  122. "cdc_hphr_cnp_int",
  123. "cdc_hphl_cnp_int";
  124. vdd-cdc-io-supply = <&pm8916_l5>;
  125. vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>;
  126. vdd-micbias-supply = <&pm8916_l13>;
  127. #sound-dai-cells = <1>;
  128. };
  129. };
  130. };