nau8824.txt 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. Nuvoton NAU8824 audio codec
  2. This device supports I2C only.
  3. Required properties:
  4. - compatible : Must be "nuvoton,nau8824"
  5. - reg : the I2C address of the device. This is either 0x1a (CSB=0) or 0x1b (CSB=1).
  6. Optional properties:
  7. - nuvoton,jkdet-polarity: JKDET pin polarity. 0 - active high, 1 - active low.
  8. - nuvoton,vref-impedance: VREF Impedance selection
  9. 0 - Open
  10. 1 - 25 kOhm
  11. 2 - 125 kOhm
  12. 3 - 2.5 kOhm
  13. - nuvoton,micbias-voltage: Micbias voltage level.
  14. 0 - VDDA
  15. 1 - VDDA
  16. 2 - VDDA * 1.1
  17. 3 - VDDA * 1.2
  18. 4 - VDDA * 1.3
  19. 5 - VDDA * 1.4
  20. 6 - VDDA * 1.53
  21. 7 - VDDA * 1.53
  22. - nuvoton,sar-threshold-num: Number of buttons supported
  23. - nuvoton,sar-threshold: Impedance threshold for each button. Array that contains up to 8 buttons configuration. SAR value is calculated as
  24. SAR = 255 * MICBIAS / SAR_VOLTAGE * R / (2000 + R)
  25. where MICBIAS is configured by 'nuvoton,micbias-voltage', SAR_VOLTAGE is configured by 'nuvoton,sar-voltage', R - button impedance.
  26. Refer datasheet section 10.2 for more information about threshold calculation.
  27. - nuvoton,sar-hysteresis: Button impedance measurement hysteresis.
  28. - nuvoton,sar-voltage: Reference voltage for button impedance measurement.
  29. 0 - VDDA
  30. 1 - VDDA
  31. 2 - VDDA * 1.1
  32. 3 - VDDA * 1.2
  33. 4 - VDDA * 1.3
  34. 5 - VDDA * 1.4
  35. 6 - VDDA * 1.53
  36. 7 - VDDA * 1.53
  37. - nuvoton,sar-compare-time: SAR compare time
  38. 0 - 500 ns
  39. 1 - 1 us
  40. 2 - 2 us
  41. 3 - 4 us
  42. - nuvoton,sar-sampling-time: SAR sampling time
  43. 0 - 2 us
  44. 1 - 4 us
  45. 2 - 8 us
  46. 3 - 16 us
  47. - nuvoton,short-key-debounce: Button short key press debounce time.
  48. 0 - 30 ms
  49. 1 - 50 ms
  50. 2 - 100 ms
  51. - nuvoton,jack-eject-debounce: Jack ejection debounce time.
  52. 0 - 0 ms
  53. 1 - 1 ms
  54. 2 - 10 ms
  55. Example:
  56. headset: nau8824@1a {
  57. compatible = "nuvoton,nau8824";
  58. reg = <0x1a>;
  59. interrupt-parent = <&gpio>;
  60. interrupts = <TEGRA_GPIO(E, 6) IRQ_TYPE_LEVEL_LOW>;
  61. nuvoton,vref-impedance = <2>;
  62. nuvoton,micbias-voltage = <6>;
  63. // Setup 4 buttons impedance according to Android specification
  64. nuvoton,sar-threshold-num = <4>;
  65. nuvoton,sar-threshold = <0xc 0x1e 0x38 0x60>;
  66. nuvoton,sar-hysteresis = <0>;
  67. nuvoton,sar-voltage = <6>;
  68. nuvoton,sar-compare-time = <1>;
  69. nuvoton,sar-sampling-time = <1>;
  70. nuvoton,short-key-debounce = <0>;
  71. nuvoton,jack-eject-debounce = <1>;
  72. };