wm8962.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * wm8962.h -- WM8962 Soc Audio driver platform data
  4. */
  5. #ifndef _WM8962_PDATA_H
  6. #define _WM8962_PDATA_H
  7. #define WM8962_MAX_GPIO 6
  8. /* Use to set GPIO default values to zero */
  9. #define WM8962_GPIO_SET 0x10000
  10. #define WM8962_GPIO_FN_CLKOUT 0
  11. #define WM8962_GPIO_FN_LOGIC 1
  12. #define WM8962_GPIO_FN_SDOUT 2
  13. #define WM8962_GPIO_FN_IRQ 3
  14. #define WM8962_GPIO_FN_THERMAL 4
  15. #define WM8962_GPIO_FN_PLL2_LOCK 6
  16. #define WM8962_GPIO_FN_PLL3_LOCK 7
  17. #define WM8962_GPIO_FN_FLL_LOCK 9
  18. #define WM8962_GPIO_FN_DRC_ACT 10
  19. #define WM8962_GPIO_FN_WSEQ_DONE 11
  20. #define WM8962_GPIO_FN_ALC_NG_ACT 12
  21. #define WM8962_GPIO_FN_ALC_PEAK_LIMIT 13
  22. #define WM8962_GPIO_FN_ALC_SATURATION 14
  23. #define WM8962_GPIO_FN_ALC_LEVEL_THR 15
  24. #define WM8962_GPIO_FN_ALC_LEVEL_LOCK 16
  25. #define WM8962_GPIO_FN_FIFO_ERR 17
  26. #define WM8962_GPIO_FN_OPCLK 18
  27. #define WM8962_GPIO_FN_DMICCLK 19
  28. #define WM8962_GPIO_FN_DMICDAT 20
  29. #define WM8962_GPIO_FN_MICD 21
  30. #define WM8962_GPIO_FN_MICSCD 22
  31. struct wm8962_pdata {
  32. struct clk *mclk;
  33. int gpio_base;
  34. u32 gpio_init[WM8962_MAX_GPIO];
  35. /* Setup for microphone detection, raw value to be written to
  36. * R48(0x30) - only microphone related bits will be updated.
  37. * Detection may be enabled here for use with signals brought
  38. * out on the GPIOs. */
  39. u32 mic_cfg;
  40. bool irq_active_low;
  41. bool spk_mono; /* Speaker outputs tied together as mono */
  42. /**
  43. * This flag should be set if one or both IN4 inputs is wired
  44. * in a DC measurement configuration.
  45. */
  46. bool in4_dc_measure;
  47. };
  48. #endif