pmic_int.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _PMIC_INT_H_
  13. #define _PMIC_INT_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_PMIC_INT_BASE (0x51108400)
  17. typedef volatile struct
  18. {
  19. uint32_t int_mask_status; // 0x00000000
  20. uint32_t int_raw_status; // 0x00000004
  21. uint32_t int_en; // 0x00000008
  22. } HWP_PMIC_INT_T;
  23. #define hwp_pmicInt ((HWP_PMIC_INT_T *)REG_ACCESS_ADDRESS(REG_PMIC_INT_BASE))
  24. // int_mask_status
  25. typedef union {
  26. uint32_t v;
  27. struct
  28. {
  29. uint32_t adc_int_mask_status : 1; // [0], read only
  30. uint32_t rtc_int_mask_status : 1; // [1], read only
  31. uint32_t wdg_int_mask_status : 1; // [2], read only
  32. uint32_t __3_3 : 1; // [3]
  33. uint32_t eic_int_mask_status : 1; // [4], read only
  34. uint32_t __5_5 : 1; // [5]
  35. uint32_t trm_int_mask_status : 1; // [6], read only
  36. uint32_t cal_int_mask_status : 1; // [7], read only
  37. uint32_t psm_int_mask_status : 1; // [8], read only
  38. uint32_t __31_9 : 23; // [31:9]
  39. } b;
  40. } REG_PMIC_INT_INT_MASK_STATUS_T;
  41. // int_raw_status
  42. typedef union {
  43. uint32_t v;
  44. struct
  45. {
  46. uint32_t adc_int_raw_status : 1; // [0], read only
  47. uint32_t rtc_int_raw_status : 1; // [1], read only
  48. uint32_t wdg_int_raw_status : 1; // [2], read only
  49. uint32_t __3_3 : 1; // [3]
  50. uint32_t eic_int_raw_status : 1; // [4], read only
  51. uint32_t __5_5 : 1; // [5]
  52. uint32_t trm_int_raw_status : 1; // [6], read only
  53. uint32_t cal_int_raw_status : 1; // [7], read only
  54. uint32_t psm_int_raw_status : 1; // [8], read only
  55. uint32_t __31_9 : 23; // [31:9]
  56. } b;
  57. } REG_PMIC_INT_INT_RAW_STATUS_T;
  58. // int_en
  59. typedef union {
  60. uint32_t v;
  61. struct
  62. {
  63. uint32_t adc_int_en : 1; // [0]
  64. uint32_t rtc_int_en : 1; // [1]
  65. uint32_t wdg_int_en : 1; // [2]
  66. uint32_t __3_3 : 1; // [3]
  67. uint32_t eic_int_en : 1; // [4]
  68. uint32_t __5_5 : 1; // [5]
  69. uint32_t trm_int_en : 1; // [6]
  70. uint32_t cal_int_en : 1; // [7]
  71. uint32_t psm_int_en : 1; // [8]
  72. uint32_t __31_9 : 23; // [31:9]
  73. } b;
  74. } REG_PMIC_INT_INT_EN_T;
  75. // int_mask_status
  76. #define PMIC_INT_ADC_INT_MASK_STATUS (1 << 0)
  77. #define PMIC_INT_RTC_INT_MASK_STATUS (1 << 1)
  78. #define PMIC_INT_WDG_INT_MASK_STATUS (1 << 2)
  79. #define PMIC_INT_EIC_INT_MASK_STATUS (1 << 4)
  80. #define PMIC_INT_TRM_INT_MASK_STATUS (1 << 6)
  81. #define PMIC_INT_CAL_INT_MASK_STATUS (1 << 7)
  82. #define PMIC_INT_PSM_INT_MASK_STATUS (1 << 8)
  83. // int_raw_status
  84. #define PMIC_INT_ADC_INT_RAW_STATUS (1 << 0)
  85. #define PMIC_INT_RTC_INT_RAW_STATUS (1 << 1)
  86. #define PMIC_INT_WDG_INT_RAW_STATUS (1 << 2)
  87. #define PMIC_INT_EIC_INT_RAW_STATUS (1 << 4)
  88. #define PMIC_INT_TRM_INT_RAW_STATUS (1 << 6)
  89. #define PMIC_INT_CAL_INT_RAW_STATUS (1 << 7)
  90. #define PMIC_INT_PSM_INT_RAW_STATUS (1 << 8)
  91. // int_en
  92. #define PMIC_INT_ADC_INT_EN (1 << 0)
  93. #define PMIC_INT_RTC_INT_EN (1 << 1)
  94. #define PMIC_INT_WDG_INT_EN (1 << 2)
  95. #define PMIC_INT_EIC_INT_EN (1 << 4)
  96. #define PMIC_INT_TRM_INT_EN (1 << 6)
  97. #define PMIC_INT_CAL_INT_EN (1 << 7)
  98. #define PMIC_INT_PSM_INT_EN (1 << 8)
  99. #endif // _PMIC_INT_H_