nau8825.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. Nuvoton NAU8825 audio codec
  2. This device supports I2C only.
  3. Required properties:
  4. - compatible : Must be "nuvoton,nau8825"
  5. - reg : the I2C address of the device. This is either 0x1a (CSB=0) or 0x1b (CSB=1).
  6. Optional properties:
  7. - nuvoton,jkdet-enable: Enable jack detection via JKDET pin.
  8. - nuvoton,jkdet-pull-enable: Enable JKDET pin pull. If set - pin pull enabled,
  9. otherwise pin in high impedance state.
  10. - nuvoton,jkdet-pull-up: Pull-up JKDET pin. If set then JKDET pin is pull up, otherwise pull down.
  11. - nuvoton,jkdet-polarity: JKDET pin polarity. 0 - active high, 1 - active low.
  12. - nuvoton,vref-impedance: VREF Impedance selection
  13. 0 - Open
  14. 1 - 25 kOhm
  15. 2 - 125 kOhm
  16. 3 - 2.5 kOhm
  17. - nuvoton,micbias-voltage: Micbias voltage level.
  18. 0 - VDDA
  19. 1 - VDDA
  20. 2 - VDDA * 1.1
  21. 3 - VDDA * 1.2
  22. 4 - VDDA * 1.3
  23. 5 - VDDA * 1.4
  24. 6 - VDDA * 1.53
  25. 7 - VDDA * 1.53
  26. - nuvoton,sar-threshold-num: Number of buttons supported
  27. - nuvoton,sar-threshold: Impedance threshold for each button. Array that contains up to 8 buttons configuration. SAR value is calculated as
  28. SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R)
  29. where MICBIAS is configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by 'nuvoton,sar-voltage', R - button impedance.
  30. Refer datasheet section 10.2 for more information about threshold calculation.
  31. - nuvoton,sar-hysteresis: Button impedance measurement hysteresis.
  32. - nuvoton,sar-voltage: Reference voltage for button impedance measurement.
  33. 0 - VDDA
  34. 1 - VDDA
  35. 2 - VDDA * 1.1
  36. 3 - VDDA * 1.2
  37. 4 - VDDA * 1.3
  38. 5 - VDDA * 1.4
  39. 6 - VDDA * 1.53
  40. 7 - VDDA * 1.53
  41. - nuvoton,sar-compare-time: SAR compare time
  42. 0 - 500 ns
  43. 1 - 1 us
  44. 2 - 2 us
  45. 3 - 4 us
  46. - nuvoton,sar-sampling-time: SAR sampling time
  47. 0 - 2 us
  48. 1 - 4 us
  49. 2 - 8 us
  50. 3 - 16 us
  51. - nuvoton,short-key-debounce: Button short key press debounce time.
  52. 0 - 30 ms
  53. 1 - 50 ms
  54. 2 - 100 ms
  55. 3 - 30 ms
  56. - nuvoton,jack-insert-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms
  57. - nuvoton,jack-eject-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms
  58. - clocks: list of phandle and clock specifier pairs according to common clock bindings for the
  59. clocks described in clock-names
  60. - clock-names: should include "mclk" for the MCLK master clock
  61. Example:
  62. headset: nau8825@1a {
  63. compatible = "nuvoton,nau8825";
  64. reg = <0x1a>;
  65. interrupt-parent = <&gpio>;
  66. interrupts = <TEGRA_GPIO(E, 6) IRQ_TYPE_LEVEL_LOW>;
  67. nuvoton,jkdet-enable;
  68. nuvoton,jkdet-pull-enable;
  69. nuvoton,jkdet-pull-up;
  70. nuvoton,jkdet-polarity = <GPIO_ACTIVE_LOW>;
  71. nuvoton,vref-impedance = <2>;
  72. nuvoton,micbias-voltage = <6>;
  73. // Setup 4 buttons impedance according to Android specification
  74. nuvoton,sar-threshold-num = <4>;
  75. nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>;
  76. nuvoton,sar-hysteresis = <1>;
  77. nuvoton,sar-voltage = <0>;
  78. nuvoton,sar-compare-time = <0>;
  79. nuvoton,sar-sampling-time = <0>;
  80. nuvoton,short-key-debounce = <2>;
  81. nuvoton,jack-insert-debounce = <7>;
  82. nuvoton,jack-eject-debounce = <7>;
  83. clock-names = "mclk";
  84. clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_2>;
  85. };