cs4265.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * cs4265.h -- CS4265 ALSA SoC audio driver
  4. *
  5. * Copyright 2014 Cirrus Logic, Inc.
  6. *
  7. * Author: Paul Handrigan <paul.handrigan@cirrus.com>
  8. */
  9. #ifndef __CS4265_H__
  10. #define __CS4265_H__
  11. #define CS4265_CHIP_ID 0x1
  12. #define CS4265_CHIP_ID_VAL 0xD0
  13. #define CS4265_CHIP_ID_MASK 0xF0
  14. #define CS4265_REV_ID_MASK 0x0F
  15. #define CS4265_PWRCTL 0x02
  16. #define CS4265_PWRCTL_PDN 1
  17. #define CS4265_DAC_CTL 0x3
  18. #define CS4265_DAC_CTL_MUTE (1 << 2)
  19. #define CS4265_DAC_CTL_DIF (3 << 4)
  20. #define CS4265_ADC_CTL 0x4
  21. #define CS4265_ADC_MASTER 1
  22. #define CS4265_ADC_DIF (1 << 4)
  23. #define CS4265_ADC_FM (3 << 6)
  24. #define CS4265_MCLK_FREQ 0x5
  25. #define CS4265_MCLK_FREQ_MASK (7 << 4)
  26. #define CS4265_SIG_SEL 0x6
  27. #define CS4265_SIG_SEL_LOOP (1 << 1)
  28. #define CS4265_CHB_PGA_CTL 0x7
  29. #define CS4265_CHA_PGA_CTL 0x8
  30. #define CS4265_ADC_CTL2 0x9
  31. #define CS4265_DAC_CHA_VOL 0xA
  32. #define CS4265_DAC_CHB_VOL 0xB
  33. #define CS4265_DAC_CTL2 0xC
  34. #define CS4265_INT_STATUS 0xD
  35. #define CS4265_INT_MASK 0xE
  36. #define CS4265_STATUS_MODE_MSB 0xF
  37. #define CS4265_STATUS_MODE_LSB 0x10
  38. #define CS4265_SPDIF_CTL1 0x11
  39. #define CS4265_SPDIF_CTL2 0x12
  40. #define CS4265_SPDIF_CTL2_MUTE (1 << 4)
  41. #define CS4265_SPDIF_CTL2_DIF (3 << 6)
  42. #define CS4265_C_DATA_BUFF 0x13
  43. #define CS4265_MAX_REGISTER 0x2A
  44. #endif