da7218.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. Dialog Semiconductor DA7218 Audio Codec bindings
  2. DA7218 is an audio codec with HP detect feature.
  3. ======
  4. Required properties:
  5. - compatible : Should be "dlg,da7217" or "dlg,da7218"
  6. - reg: Specifies the I2C slave address
  7. - VDD-supply: VDD power supply for the device
  8. - VDDMIC-supply: VDDMIC power supply for the device
  9. - VDDIO-supply: VDDIO power supply for the device
  10. (See Documentation/devicetree/bindings/regulator/regulator.txt for further
  11. information relating to regulators)
  12. Optional properties:
  13. - interrupts: IRQ line info for DA7218 chip.
  14. (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for
  15. further information relating to interrupt properties)
  16. - interrupt-names : Name associated with interrupt line. Should be "wakeup" if
  17. interrupt is to be used to wake system, otherwise "irq" should be used.
  18. - wakeup-source: Flag to indicate this device can wake system (suspend/resume).
  19. - clocks : phandle and clock specifier for codec MCLK.
  20. - clock-names : Clock name string for 'clocks' attribute, should be "mclk".
  21. - dlg,micbias1-lvl-millivolt : Voltage (mV) for Mic Bias 1
  22. [<1200>, <1600>, <1800>, <2000>, <2200>, <2400>, <2600>, <2800>, <3000>]
  23. - dlg,micbias2-lvl-millivolt : Voltage (mV) for Mic Bias 2
  24. [<1200>, <1600>, <1800>, <2000>, <2200>, <2400>, <2600>, <2800>, <3000>]
  25. - dlg,mic1-amp-in-sel : Mic1 input source type
  26. ["diff", "se_p", "se_n"]
  27. - dlg,mic2-amp-in-sel : Mic2 input source type
  28. ["diff", "se_p", "se_n"]
  29. - dlg,dmic1-data-sel : DMIC1 channel select based on clock edge.
  30. ["lrise_rfall", "lfall_rrise"]
  31. - dlg,dmic1-samplephase : When to sample audio from DMIC1.
  32. ["on_clkedge", "between_clkedge"]
  33. - dlg,dmic1-clkrate-hz : DMic1 clock frequency (Hz).
  34. [<1500000>, <3000000>]
  35. - dlg,dmic2-data-sel : DMic2 channel select based on clock edge.
  36. ["lrise_rfall", "lfall_rrise"]
  37. - dlg,dmic2-samplephase : When to sample audio from DMic2.
  38. ["on_clkedge", "between_clkedge"]
  39. - dlg,dmic2-clkrate-hz : DMic2 clock frequency (Hz).
  40. [<1500000>, <3000000>]
  41. - dlg,hp-diff-single-supply : Boolean flag, use single supply for HP
  42. (DA7217 only)
  43. ======
  44. Optional Child node - 'da7218_hpldet' (DA7218 only):
  45. Optional properties:
  46. - dlg,jack-rate-us : Time between jack detect measurements (us)
  47. [<5>, <10>, <20>, <40>, <80>, <160>, <320>, <640>]
  48. - dlg,jack-debounce : Number of debounce measurements taken for jack detect
  49. [<0>, <2>, <3>, <4>]
  50. - dlg,jack-threshold-pct : Threshold level for jack detection (% of VDD)
  51. [<84>, <88>, <92>, <96>]
  52. - dlg,comp-inv : Boolean flag, invert comparator output
  53. - dlg,hyst : Boolean flag, enable hysteresis
  54. - dlg,discharge : Boolean flag, auto discharge of Mic Bias on jack removal
  55. ======
  56. Example:
  57. codec: da7218@1a {
  58. compatible = "dlg,da7218";
  59. reg = <0x1a>;
  60. interrupt-parent = <&gpio6>;
  61. interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
  62. wakeup-source;
  63. VDD-supply = <&reg_audio>;
  64. VDDMIC-supply = <&reg_audio>;
  65. VDDIO-supply = <&reg_audio>;
  66. clocks = <&clks 201>;
  67. clock-names = "mclk";
  68. dlg,micbias1-lvl-millivolt = <2600>;
  69. dlg,micbias2-lvl-millivolt = <2600>;
  70. dlg,mic1-amp-in-sel = "diff";
  71. dlg,mic2-amp-in-sel = "diff";
  72. dlg,dmic1-data-sel = "lrise_rfall";
  73. dlg,dmic1-samplephase = "on_clkedge";
  74. dlg,dmic1-clkrate-hz = <3000000>;
  75. dlg,dmic2-data-sel = "lrise_rfall";
  76. dlg,dmic2-samplephase = "on_clkedge";
  77. dlg,dmic2-clkrate-hz = <3000000>;
  78. da7218_hpldet {
  79. dlg,jack-rate-us = <40>;
  80. dlg,jack-debounce = <2>;
  81. dlg,jack-threshold-pct = <84>;
  82. dlg,hyst;
  83. };
  84. };