es8156.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * Copyright Everest Semiconductor Co.,Ltd *
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. */
  9. #ifndef _ES8156_H
  10. #define _ES8156_H
  11. /* ES8156 register space */
  12. /*
  13. * RESET Control
  14. */
  15. #define ES8156_RESET_REG00 0x00
  16. /*
  17. * Clock Managerment
  18. */
  19. #define ES8156_MAINCLOCK_CTL_REG01 0x01
  20. #define ES8156_SCLK_MODE_REG02 0x02
  21. #define ES8156_LRCLK_DIV_H_REG03 0x03
  22. #define ES8156_LRCLK_DIV_L_REG04 0x04
  23. #define ES8156_SCLK_DIV_REG05 0x05
  24. #define ES8156_NFS_CONFIG_REG06 0x06
  25. #define ES8156_MISC_CONTROL1_REG07 0x07
  26. #define ES8156_CLOCK_ON_OFF_REG08 0x08
  27. #define ES8156_MISC_CONTROL2_REG09 0x09
  28. #define ES8156_TIME_CONTROL1_REG0A 0x0a
  29. #define ES8156_TIME_CONTROL2_REG0B 0x0b
  30. /*
  31. * System Control
  32. */
  33. #define ES8156_CHIP_STATUS_REG0C 0x0c
  34. #define ES8156_P2S_CONTROL_REG0D 0x0d
  35. #define ES8156_DAC_OSR_COUNTER_REG10 0x10
  36. /*
  37. * SDP Control
  38. */
  39. #define ES8156_DAC_SDP_REG11 0x11
  40. #define ES8156_AUTOMUTE_SET_REG12 0x12
  41. #define ES8156_DAC_MUTE_REG13 0x13
  42. #define ES8156_VOLUME_CONTROL_REG14 0x14
  43. /*
  44. * ALC Control
  45. */
  46. #define ES8156_ALC_CONFIG1_REG15 0x15
  47. #define ES8156_ALC_CONFIG2_REG16 0x16
  48. #define ES8156_ALC_CONFIG3_REG17 0x17
  49. #define ES8156_MISC_CONTROL3_REG18 0x18
  50. #define ES8156_EQ_CONTROL1_REG19 0x19
  51. #define ES8156_EQ_CONTROL2_REG1A 0x1a
  52. /*
  53. * Analog System Control
  54. */
  55. #define ES8156_ANALOG_SYS1_REG20 0x20
  56. #define ES8156_ANALOG_SYS2_REG21 0x21
  57. #define ES8156_ANALOG_SYS3_REG22 0x22
  58. #define ES8156_ANALOG_SYS4_REG23 0x23
  59. #define ES8156_ANALOG_LP_REG24 0x24
  60. #define ES8156_ANALOG_SYS5_REG25 0x25
  61. /*
  62. * Chip Information
  63. */
  64. #define ES8156_I2C_PAGESEL_REGFC 0xFC
  65. #define ES8156_CHIPID1_REGFD 0xFD
  66. #define ES8156_CHIPID0_REGFE 0xFE
  67. #define ES8156_CHIP_VERSION_REGFF 0xFF
  68. enum vmidlow {
  69. VMIDLEVEL0,
  70. VMIDLEVEL1,
  71. VMIDLEVEL2,
  72. VMIDLEVEL3,
  73. };
  74. #define ES8156_3V3 0
  75. #define ES8156_1V8 1
  76. #define ES8156_DVDD ES8156_1V8
  77. #endif