qcom,msm8916-wcd-analog.txt 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. msm8916 analog audio CODEC
  2. Bindings for codec Analog IP which is integrated in pmic pm8916,
  3. ## Bindings for codec core on pmic:
  4. Required properties
  5. - compatible = "qcom,pm8916-wcd-analog-codec";
  6. - reg: represents the slave base address provided to the peripheral.
  7. - interrupts: List of interrupts in given SPMI peripheral.
  8. - interrupt-names: Names specified to above list of interrupts in same
  9. order. List of supported interrupt names are:
  10. "cdc_spk_cnp_int" - Speaker click and pop interrupt.
  11. "cdc_spk_clip_int" - Speaker clip interrupt.
  12. "cdc_spk_ocp_int" - Speaker over current protect interrupt.
  13. "mbhc_ins_rem_det1" - jack insert removal detect interrupt 1.
  14. "mbhc_but_rel_det" - button release interrupt.
  15. "mbhc_but_press_det" - button press event
  16. "mbhc_ins_rem_det" - jack insert removal detect interrupt.
  17. "mbhc_switch_int" - multi button headset interrupt.
  18. "cdc_ear_ocp_int" - Earphone over current protect interrupt.
  19. "cdc_hphr_ocp_int" - Headphone R over current protect interrupt.
  20. "cdc_hphl_ocp_det" - Headphone L over current protect interrupt.
  21. "cdc_ear_cnp_int" - earphone cnp interrupt.
  22. "cdc_hphr_cnp_int" - hphr click and pop interrupt.
  23. "cdc_hphl_cnp_int" - hphl click and pop interrupt.
  24. - clocks: Handle to mclk.
  25. - clock-names: should be "mclk"
  26. - vdd-cdc-io-supply: phandle to VDD_CDC_IO regulator DT node.
  27. - vdd-cdc-tx-rx-cx-supply: phandle to VDD_CDC_TX/RX/CX regulator DT node.
  28. - vdd-micbias-supply: phandle of VDD_MICBIAS supply's regulator DT node.
  29. Optional Properties:
  30. - qcom,mbhc-vthreshold-low: Array of 5 threshold voltages in mV for 5 buttons
  31. detection on headset when the mbhc is powered up
  32. by internal current source, this is a low power.
  33. - qcom,mbhc-vthreshold-high: Array of 5 thresold voltages in mV for 5 buttons
  34. detection on headset when mbhc is powered up
  35. from micbias.
  36. - qcom,micbias-lvl: Voltage (mV) for Mic Bias
  37. - qcom,hphl-jack-type-normally-open: boolean, present if hphl pin on jack is a
  38. NO (Normally Open). If not specified, then
  39. its assumed that hphl pin on jack is NC
  40. (Normally Closed).
  41. - qcom,gnd-jack-type-normally-open: boolean, present if gnd pin on jack is
  42. NO (Normally Open). If not specified, then
  43. its assumed that gnd pin on jack is NC
  44. (Normally Closed).
  45. - qcom,micbias1-ext-cap: boolean, present if micbias1 has external capacitor
  46. connected.
  47. - qcom,micbias2-ext-cap: boolean, present if micbias2 has external capacitor
  48. connected.
  49. Example:
  50. spmi_bus {
  51. ...
  52. audio-codec@f000{
  53. compatible = "qcom,pm8916-wcd-analog-codec";
  54. reg = <0xf000 0x200>;
  55. reg-names = "pmic-codec-core";
  56. clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
  57. clock-names = "mclk";
  58. qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
  59. qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
  60. interrupt-parent = <&spmi_bus>;
  61. interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
  62. <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
  63. <0x1 0xf0 0x2 IRQ_TYPE_NONE>,
  64. <0x1 0xf0 0x3 IRQ_TYPE_NONE>,
  65. <0x1 0xf0 0x4 IRQ_TYPE_NONE>,
  66. <0x1 0xf0 0x5 IRQ_TYPE_NONE>,
  67. <0x1 0xf0 0x6 IRQ_TYPE_NONE>,
  68. <0x1 0xf0 0x7 IRQ_TYPE_NONE>,
  69. <0x1 0xf1 0x0 IRQ_TYPE_NONE>,
  70. <0x1 0xf1 0x1 IRQ_TYPE_NONE>,
  71. <0x1 0xf1 0x2 IRQ_TYPE_NONE>,
  72. <0x1 0xf1 0x3 IRQ_TYPE_NONE>,
  73. <0x1 0xf1 0x4 IRQ_TYPE_NONE>,
  74. <0x1 0xf1 0x5 IRQ_TYPE_NONE>;
  75. interrupt-names = "cdc_spk_cnp_int",
  76. "cdc_spk_clip_int",
  77. "cdc_spk_ocp_int",
  78. "mbhc_ins_rem_det1",
  79. "mbhc_but_rel_det",
  80. "mbhc_but_press_det",
  81. "mbhc_ins_rem_det",
  82. "mbhc_switch_int",
  83. "cdc_ear_ocp_int",
  84. "cdc_hphr_ocp_int",
  85. "cdc_hphl_ocp_det",
  86. "cdc_ear_cnp_int",
  87. "cdc_hphr_cnp_int",
  88. "cdc_hphl_cnp_int";
  89. VDD-CDC-IO-supply = <&pm8916_l5>;
  90. VDD-CDC-TX-RX-CX-supply = <&pm8916_l5>;
  91. VDD-MICBIAS-supply = <&pm8916_l13>;
  92. #sound-dai-cells = <1>;
  93. };
  94. };