cs42l42.txt 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. CS42L42 audio CODEC
  2. Required properties:
  3. - compatible : "cirrus,cs42l42"
  4. - reg : the I2C address of the device for I2C.
  5. - VP-supply, VCP-supply, VD_FILT-supply, VL-supply, VA-supply :
  6. power supplies for the device, as covered in
  7. Documentation/devicetree/bindings/regulator/regulator.txt.
  8. Optional properties:
  9. - reset-gpios : a GPIO spec for the reset pin. If specified, it will be
  10. deasserted before communication to the codec starts.
  11. - interrupts : IRQ line info CS42L42.
  12. (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
  13. for further information relating to interrupt properties)
  14. - cirrus,ts-inv : Boolean property. For jacks that invert the tip sense
  15. polarity. Normal jacks will short tip sense pin to HS1 when headphones are
  16. plugged in and leave tip sense floating when not plugged in. Inverting jacks
  17. short tip sense when unplugged and float when plugged in.
  18. 0 = (Default) Non-inverted
  19. 1 = Inverted
  20. - cirrus,ts-dbnc-rise : Debounce the rising edge of TIP_SENSE_PLUG. With no
  21. debounce, the tip sense pin might be noisy on a plug event.
  22. 0 - 0ms,
  23. 1 - 125ms,
  24. 2 - 250ms,
  25. 3 - 500ms,
  26. 4 - 750ms,
  27. 5 - (Default) 1s,
  28. 6 - 1.25s,
  29. 7 - 1.5s,
  30. - cirrus,ts-dbnc-fall : Debounce the falling edge of TIP_SENSE_UNPLUG.
  31. With no debounce, the tip sense pin might be noisy on an unplug event.
  32. 0 - 0ms,
  33. 1 - 125ms,
  34. 2 - 250ms,
  35. 3 - 500ms,
  36. 4 - 750ms,
  37. 5 - (Default) 1s,
  38. 6 - 1.25s,
  39. 7 - 1.5s,
  40. - cirrus,btn-det-init-dbnce : This sets how long the driver sleeps after
  41. enabling button detection interrupts. After auto-detection and before
  42. servicing button interrupts, the HS bias needs time to settle. If you
  43. don't wait, there is possibility for erroneous button interrupt.
  44. 0ms - 200ms,
  45. Default = 100ms
  46. - cirrus,btn-det-event-dbnce : This sets how long the driver delays after
  47. receiving a button press interrupt. With level detect interrupts, you want
  48. to wait a small amount of time to make sure the button press is making a
  49. clean connection with the bias resistors.
  50. 0ms - 20ms,
  51. Default = 10ms
  52. - cirrus,bias-lvls : For a level-detect headset button scheme, each button
  53. will bias the mic pin to a certain voltage. To determine which button was
  54. pressed, the driver will compare this biased voltage to sequential,
  55. decreasing voltages and will stop when a comparator is tripped,
  56. indicating a comparator voltage < bias voltage. This value represents a
  57. percentage of the internally generated HS bias voltage. For different
  58. hardware setups, a designer might want to tweak this. This is an array of
  59. descending values for the comparator voltage.
  60. Array of 4 values
  61. Each 0-63
  62. < x1 x2 x3 x4 >
  63. Default = < 15 8 4 1>
  64. Example:
  65. cs42l42: cs42l42@48 {
  66. compatible = "cirrus,cs42l42";
  67. reg = <0x48>;
  68. VA-supply = <&dummy_vreg>;
  69. VP-supply = <&dummy_vreg>;
  70. VCP-supply = <&dummy_vreg>;
  71. VD_FILT-supply = <&dummy_vreg>;
  72. VL-supply = <&dummy_vreg>;
  73. reset-gpios = <&axi_gpio_0 1 0>;
  74. interrupt-parent = <&gpio0>;
  75. interrupts = <55 8>
  76. cirrus,ts-inv = <0x00>;
  77. cirrus,ts-dbnc-rise = <0x05>;
  78. cirrus,ts-dbnc-fall = <0x00>;
  79. cirrus,btn-det-init-dbnce = <100>;
  80. cirrus,btn-det-event-dbnce = <10>;
  81. cirrus,bias-lvls = <0x0F 0x08 0x04 0x01>;
  82. cirrus,hs-bias-ramp-rate = <0x02>;
  83. };