max9867.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * max9867.h -- MAX9867 ALSA SoC Audio driver
  4. *
  5. * Copyright 2013-2015 Maxim Integrated Products
  6. */
  7. #ifndef _MAX9867_H
  8. #define _MAX9867_H
  9. /* MAX9867 register space */
  10. #define MAX9867_STATUS 0x00
  11. #define MAX9867_JACKSTATUS 0x01
  12. #define MAX9867_AUXHIGH 0x02
  13. #define MAX9867_AUXLOW 0x03
  14. #define MAX9867_INTEN 0x04
  15. #define MAX9867_SYSCLK 0x05
  16. #define MAX9867_FREQ_MASK 0xF
  17. #define MAX9867_PSCLK_SHIFT 0x4
  18. #define MAX9867_PSCLK_WIDTH 0x2
  19. #define MAX9867_PSCLK_MASK (0x03<<MAX9867_PSCLK_SHIFT)
  20. #define MAX9867_PSCLK_10_20 0x1
  21. #define MAX9867_PSCLK_20_40 0x2
  22. #define MAX9867_PSCLK_40_60 0x3
  23. #define MAX9867_AUDIOCLKHIGH 0x06
  24. #define MAX9867_NI_HIGH_MASK 0x7F
  25. #define MAX9867_NI_LOW_MASK 0xFE
  26. #define MAX9867_PLL (1<<7)
  27. #define MAX9867_AUDIOCLKLOW 0x07
  28. #define MAX9867_RAPID_LOCK 0x01
  29. #define MAX9867_IFC1A 0x08
  30. #define MAX9867_MASTER (1<<7)
  31. #define MAX9867_I2S_DLY (1<<4)
  32. #define MAX9867_SDOUT_HIZ (1<<3)
  33. #define MAX9867_TDM_MODE (1<<2)
  34. #define MAX9867_WCI_MODE (1<<6)
  35. #define MAX9867_BCI_MODE (1<<5)
  36. #define MAX9867_IFC1B 0x09
  37. #define MAX9867_IFC1B_BCLK_MASK 7
  38. #define MAX9867_IFC1B_64X 0x01
  39. #define MAX9867_IFC1B_48X 0x02
  40. #define MAX9867_IFC1B_PCLK_2 0x04
  41. #define MAX9867_IFC1B_PCLK_4 0x05
  42. #define MAX9867_IFC1B_PCLK_8 0x06
  43. #define MAX9867_IFC1B_PCLK_16 0x07
  44. #define MAX9867_CODECFLTR 0x0a
  45. #define MAX9867_CODECFLTR_MODE (1<<7)
  46. #define MAX9867_SIDETONE 0x0b
  47. #define MAX9867_DACLEVEL 0x0c
  48. #define MAX9867_ADCLEVEL 0x0d
  49. #define MAX9867_LEFTLINELVL 0x0e
  50. #define MAX9867_RIGHTLINELVL 0x0f
  51. #define MAX9867_LEFTVOL 0x10
  52. #define MAX9867_RIGHTVOL 0x11
  53. #define MAX9867_LEFTMICGAIN 0x12
  54. #define MAX9867_RIGHTMICGAIN 0x13
  55. #define MAX9867_INPUTCONFIG 0x14
  56. #define MAX9867_MICCONFIG 0x15
  57. #define MAX9867_MODECONFIG 0x16
  58. #define MAX9867_PWRMAN 0x17
  59. #define MAX9867_PWRMAN_SHDN (1<<7)
  60. #define MAX9867_REVISION 0xff
  61. #define MAX9867_CACHEREGNUM 10
  62. #endif