atmel-pdmic.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __ATMEL_PDMIC_H_
  3. #define __ATMEL_PDMIC_H_
  4. #include <linux/bitops.h>
  5. #define PDMIC_CR 0x00000000
  6. #define PDMIC_CR_SWRST 0x1
  7. #define PDMIC_CR_SWRST_MASK BIT(0)
  8. #define PDMIC_CR_SWRST_SHIFT (0)
  9. #define PDMIC_CR_ENPDM_DIS 0x0
  10. #define PDMIC_CR_ENPDM_EN 0x1
  11. #define PDMIC_CR_ENPDM_MASK BIT(4)
  12. #define PDMIC_CR_ENPDM_SHIFT (4)
  13. #define PDMIC_MR 0x00000004
  14. #define PDMIC_MR_CLKS_PCK 0x0
  15. #define PDMIC_MR_CLKS_GCK 0x1
  16. #define PDMIC_MR_CLKS_MASK BIT(4)
  17. #define PDMIC_MR_CLKS_SHIFT (4)
  18. #define PDMIC_MR_PRESCAL_MASK GENMASK(14, 8)
  19. #define PDMIC_MR_PRESCAL_SHIFT (8)
  20. #define PDMIC_CDR 0x00000014
  21. #define PDMIC_IER 0x00000018
  22. #define PDMIC_IER_OVRE BIT(25)
  23. #define PDMIC_IDR 0x0000001c
  24. #define PDMIC_IDR_OVRE BIT(25)
  25. #define PDMIC_IMR 0x00000020
  26. #define PDMIC_ISR 0x00000024
  27. #define PDMIC_ISR_OVRE BIT(25)
  28. #define PDMIC_DSPR0 0x00000058
  29. #define PDMIC_DSPR0_HPFBYP_DIS 0x1
  30. #define PDMIC_DSPR0_HPFBYP_EN 0x0
  31. #define PDMIC_DSPR0_HPFBYP_MASK BIT(1)
  32. #define PDMIC_DSPR0_HPFBYP_SHIFT (1)
  33. #define PDMIC_DSPR0_SINBYP_DIS 0x1
  34. #define PDMIC_DSPR0_SINBYP_EN 0x0
  35. #define PDMIC_DSPR0_SINBYP_MASK BIT(2)
  36. #define PDMIC_DSPR0_SINBYP_SHIFT (2)
  37. #define PDMIC_DSPR0_SIZE_16_BITS 0x0
  38. #define PDMIC_DSPR0_SIZE_32_BITS 0x1
  39. #define PDMIC_DSPR0_SIZE_MASK BIT(3)
  40. #define PDMIC_DSPR0_SIZE_SHIFT (3)
  41. #define PDMIC_DSPR0_OSR_128 0x0
  42. #define PDMIC_DSPR0_OSR_64 0x1
  43. #define PDMIC_DSPR0_OSR_MASK GENMASK(6, 4)
  44. #define PDMIC_DSPR0_OSR_SHIFT (4)
  45. #define PDMIC_DSPR0_SCALE_MASK GENMASK(11, 8)
  46. #define PDMIC_DSPR0_SCALE_SHIFT (8)
  47. #define PDMIC_DSPR0_SHIFT_MASK GENMASK(15, 12)
  48. #define PDMIC_DSPR0_SHIFT_SHIFT (12)
  49. #define PDMIC_DSPR1 0x0000005c
  50. #define PDMIC_DSPR1_DGAIN_MASK GENMASK(14, 0)
  51. #define PDMIC_DSPR1_DGAIN_SHIFT (0)
  52. #define PDMIC_DSPR1_OFFSET_MASK GENMASK(31, 16)
  53. #define PDMIC_DSPR1_OFFSET_SHIFT (16)
  54. #define PDMIC_WPMR 0x000000e4
  55. #define PDMIC_WPSR 0x000000e8
  56. #endif