at73c213.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Driver for the AT73C213 16-bit stereo DAC on Atmel ATSTK1000
  4. *
  5. * Copyright (C) 2006 - 2007 Atmel Corporation
  6. */
  7. #ifndef _SND_AT73C213_H
  8. #define _SND_AT73C213_H
  9. /* DAC control register */
  10. #define DAC_CTRL 0x00
  11. #define DAC_CTRL_ONPADRV 7
  12. #define DAC_CTRL_ONAUXIN 6
  13. #define DAC_CTRL_ONDACR 5
  14. #define DAC_CTRL_ONDACL 4
  15. #define DAC_CTRL_ONLNOR 3
  16. #define DAC_CTRL_ONLNOL 2
  17. #define DAC_CTRL_ONLNIR 1
  18. #define DAC_CTRL_ONLNIL 0
  19. /* DAC left line in gain register */
  20. #define DAC_LLIG 0x01
  21. #define DAC_LLIG_LLIG 0
  22. /* DAC right line in gain register */
  23. #define DAC_RLIG 0x02
  24. #define DAC_RLIG_RLIG 0
  25. /* DAC Left Master Playback Gain Register */
  26. #define DAC_LMPG 0x03
  27. #define DAC_LMPG_LMPG 0
  28. /* DAC Right Master Playback Gain Register */
  29. #define DAC_RMPG 0x04
  30. #define DAC_RMPG_RMPG 0
  31. /* DAC Left Line Out Gain Register */
  32. #define DAC_LLOG 0x05
  33. #define DAC_LLOG_LLOG 0
  34. /* DAC Right Line Out Gain Register */
  35. #define DAC_RLOG 0x06
  36. #define DAC_RLOG_RLOG 0
  37. /* DAC Output Level Control Register */
  38. #define DAC_OLC 0x07
  39. #define DAC_OLC_RSHORT 7
  40. #define DAC_OLC_ROLC 4
  41. #define DAC_OLC_LSHORT 3
  42. #define DAC_OLC_LOLC 0
  43. /* DAC Mixer Control Register */
  44. #define DAC_MC 0x08
  45. #define DAC_MC_INVR 5
  46. #define DAC_MC_INVL 4
  47. #define DAC_MC_RMSMIN2 3
  48. #define DAC_MC_RMSMIN1 2
  49. #define DAC_MC_LMSMIN2 1
  50. #define DAC_MC_LMSMIN1 0
  51. /* DAC Clock and Sampling Frequency Control Register */
  52. #define DAC_CSFC 0x09
  53. #define DAC_CSFC_OVRSEL 4
  54. /* DAC Miscellaneous Register */
  55. #define DAC_MISC 0x0A
  56. #define DAC_MISC_VCMCAPSEL 7
  57. #define DAC_MISC_DINTSEL 4
  58. #define DAC_MISC_DITHEN 3
  59. #define DAC_MISC_DEEMPEN 2
  60. #define DAC_MISC_NBITS 0
  61. /* DAC Precharge Control Register */
  62. #define DAC_PRECH 0x0C
  63. #define DAC_PRECH_PRCHGPDRV 7
  64. #define DAC_PRECH_PRCHGAUX1 6
  65. #define DAC_PRECH_PRCHGLNOR 5
  66. #define DAC_PRECH_PRCHGLNOL 4
  67. #define DAC_PRECH_PRCHGLNIR 3
  68. #define DAC_PRECH_PRCHGLNIL 2
  69. #define DAC_PRECH_PRCHG 1
  70. #define DAC_PRECH_ONMSTR 0
  71. /* DAC Auxiliary Input Gain Control Register */
  72. #define DAC_AUXG 0x0D
  73. #define DAC_AUXG_AUXG 0
  74. /* DAC Reset Register */
  75. #define DAC_RST 0x10
  76. #define DAC_RST_RESMASK 2
  77. #define DAC_RST_RESFILZ 1
  78. #define DAC_RST_RSTZ 0
  79. /* Power Amplifier Control Register */
  80. #define PA_CTRL 0x11
  81. #define PA_CTRL_APAON 6
  82. #define PA_CTRL_APAPRECH 5
  83. #define PA_CTRL_APALP 4
  84. #define PA_CTRL_APAGAIN 0
  85. #endif /* _SND_AT73C213_H */