mtk_auxadc_hw.h 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #ifndef _MTK_ADC_HW_H
  2. #define _MTK_ADC_HW_H
  3. //#include <mach/mt6577_reg_base.h>
  4. //#define AUXADC_BASE 0x70020000 // will modify
  5. //#define AUXADC_BASE 0xF1006000
  6. #ifdef AUXADC_BASE
  7. #undef AUXADC_BASE
  8. #endif
  9. #define AUXADC_BASE 0x11001000
  10. #if 0
  11. #define AUXADC_CON0 (AUXADC_BASE + 0x000)
  12. #define AUXADC_CON1 (AUXADC_BASE + 0x004)
  13. #define AUXADC_CON2 (AUXADC_BASE + 0x008)
  14. #define AUXADC_CON3 (AUXADC_BASE + 0x00C)
  15. #define AUXADC_DAT0 (AUXADC_BASE + 0x010)
  16. #define AUXADC_DAT1 (AUXADC_BASE + 0x014)
  17. #define AUXADC_DAT2 (AUXADC_BASE + 0x018)
  18. #define AUXADC_DAT3 (AUXADC_BASE + 0x01C)
  19. #define AUXADC_DAT4 (AUXADC_BASE + 0x020)
  20. #define AUXADC_DAT5 (AUXADC_BASE + 0x024)
  21. #define AUXADC_DAT6 (AUXADC_BASE + 0x028)
  22. #define AUXADC_DAT7 (AUXADC_BASE + 0x02C)
  23. #define AUXADC_DAT8 (AUXADC_BASE + 0x030)
  24. #define AUXADC_DAT9 (AUXADC_BASE + 0x034)
  25. #define AUXADC_DAT10 (AUXADC_BASE + 0x038)
  26. #define AUXADC_DAT11 (AUXADC_BASE + 0x03C)
  27. #define AUXADC_DAT12 (AUXADC_BASE + 0x040)
  28. #define AUXADC_DAT13 (AUXADC_BASE + 0x044)
  29. #endif
  30. #define AUXADC_CON0 (AUXADC_BASE + 0x000)
  31. #define AUXADC_CON1 (AUXADC_BASE + 0x004)
  32. #define AUXADC_CON1_SET (AUXADC_BASE + 0x008)
  33. #define AUXADC_CON1_CLR (AUXADC_BASE + 0x00C)
  34. #define AUXADC_CON2 (AUXADC_BASE + 0x010)
  35. //#define AUXADC_CON3 (AUXADC_BASE + 0x014)
  36. #define AUXADC_DAT0 (AUXADC_BASE + 0x014)
  37. #define AUXADC_TP_CMD (AUXADC_BASE + 0x005c)
  38. #define AUXADC_TP_ADDR (AUXADC_BASE + 0x0060)
  39. #define AUXADC_TP_CON0 (AUXADC_BASE + 0x0064)
  40. #define AUXADC_TP_DATA0 (AUXADC_BASE + 0x0074)
  41. #define PAD_AUX_XP 13
  42. #define TP_CMD_ADDR_X 0x0005
  43. #define AUXADC_CON_RTP (10209000 + 0x0404)
  44. #define AUXADC_DET_VOLT (AUXADC_BASE + 0x084)
  45. #define AUXADC_DET_SEL (AUXADC_BASE + 0x088)
  46. #define AUXADC_DET_PERIOD (AUXADC_BASE + 0x08C)
  47. #define AUXADC_DET_DEBT (AUXADC_BASE + 0x090)
  48. #define AUXADC_MISC (AUXADC_BASE + 0x094)
  49. #define AUXADC_ECC (AUXADC_BASE + 0x098)
  50. #define AUXADC_SAMPLE_LIST (AUXADC_BASE + 0x09c)
  51. #define AUXADC_ABIST_PERIOD (AUXADC_BASE + 0x0A0)
  52. //-----------------------------------------------------------------------------
  53. #if 0
  54. /*AUXADC_SYNC on AUXADC_CON0*/
  55. #define AUXADC_SYNC_CHAN(_line) (0x0001<<_line) /*Time event 1*/
  56. /*AUXADC_IMM on AUXADC_CON1*/
  57. #define AUXADC_IMM_CHAN(_line) (0x0001<<_line)
  58. /*AUXADC_SYN on AUXADC_CON2*/
  59. #define AUXADC_SYN_BIT (0x0001) /*Time event 0*/
  60. /*AUXADC_CON3*/
  61. #define AUXADC_CON3_STATUS_MASK (0x0001)
  62. #define AUXADC_CON3_STATUS_OFFSET (0)
  63. #define AUXADC_STATUS_BUSY (0x01)
  64. #define AUXADC_STATUS_IDLE (0x00)
  65. #define AUXADC_CON3_SOFT_RST_MASK (0x0080)
  66. #define AUXADC_CON3_SOFT_RST_OFFSET (7)
  67. #define AUXADC_CON3_AUTOCLR0_MASK (0x0100)
  68. #define AUXADC_CON3_AUTOCLR0_OFFSET (8)
  69. #define AUXADC_CON3_AUTOCLR1_MASK (0x0200)
  70. #define AUXADC_CON3_AUTOCLR1_OFFSET (9)
  71. #define AUXADC_CON3_PUWAIT_EN_MASK (0x0800)
  72. #define AUXADC_CON3_PUWAIT_EN_OFFSET (11)
  73. #define AUXADC_CON3_AUTOSET_MASK (0x8000)
  74. #define AUXADC_CON3_AUTOSET_OFFSET (15)
  75. #endif
  76. #endif /*_MTK_ADC_HW_H*/