pmic_wdt.h 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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_WDT_H_
  13. #define _PMIC_WDT_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_PMIC_WDT_BASE (0x51108480)
  17. typedef volatile struct
  18. {
  19. uint32_t wdg_load_low; // 0x00000000
  20. uint32_t wdg_load_high; // 0x00000004
  21. uint32_t wdg_ctrl; // 0x00000008
  22. uint32_t wdg_int_clr; // 0x0000000c
  23. uint32_t wdg_int_raw; // 0x00000010
  24. uint32_t wdg_irq_mask; // 0x00000014
  25. uint32_t wdg_cnt_low; // 0x00000018
  26. uint32_t wdg_cnt_high; // 0x0000001c
  27. uint32_t wdg_lock; // 0x00000020
  28. uint32_t wdg_cnt_read_low; // 0x00000024
  29. uint32_t wdg_cnt_read_high; // 0x00000028
  30. uint32_t wdg_irq_value_low; // 0x0000002c
  31. uint32_t wdg_irq_value_high; // 0x00000030
  32. uint32_t wdg_load_higher; // 0x00000034
  33. uint32_t wdg_cnt_higher; // 0x00000038
  34. uint32_t wdg_cnt_read_higher; // 0x0000003c
  35. uint32_t wdg_irq_value_higher; // 0x00000040
  36. } HWP_PMIC_WDT_T;
  37. #define hwp_pmicWdt ((HWP_PMIC_WDT_T *)REG_ACCESS_ADDRESS(REG_PMIC_WDT_BASE))
  38. // wdg_load_low
  39. typedef union {
  40. uint32_t v;
  41. struct
  42. {
  43. uint32_t wdg_ld_value_low : 16; // [15:0]
  44. uint32_t __31_16 : 16; // [31:16]
  45. } b;
  46. } REG_PMIC_WDT_WDG_LOAD_LOW_T;
  47. // wdg_load_high
  48. typedef union {
  49. uint32_t v;
  50. struct
  51. {
  52. uint32_t wdg_ld_value_high : 16; // [15:0]
  53. uint32_t __31_16 : 16; // [31:16]
  54. } b;
  55. } REG_PMIC_WDT_WDG_LOAD_HIGH_T;
  56. // wdg_ctrl
  57. typedef union {
  58. uint32_t v;
  59. struct
  60. {
  61. uint32_t wdg_irq_en : 1; // [0]
  62. uint32_t wdg_open : 1; // [1]
  63. uint32_t wdg_new : 1; // [2]
  64. uint32_t wdg_rst_en : 1; // [3]
  65. uint32_t __31_4 : 28; // [31:4]
  66. } b;
  67. } REG_PMIC_WDT_WDG_CTRL_T;
  68. // wdg_int_clr
  69. typedef union {
  70. uint32_t v;
  71. struct
  72. {
  73. uint32_t wdg_irq_clr : 1; // [0]
  74. uint32_t __2_1 : 2; // [2:1]
  75. uint32_t wdg_rst_clr : 1; // [3]
  76. uint32_t __31_4 : 28; // [31:4]
  77. } b;
  78. } REG_PMIC_WDT_WDG_INT_CLR_T;
  79. // wdg_int_raw
  80. typedef union {
  81. uint32_t v;
  82. struct
  83. {
  84. uint32_t wdg_irq_raw : 1; // [0], read only
  85. uint32_t __2_1 : 2; // [2:1]
  86. uint32_t wdg_rst_raw : 1; // [3], read only
  87. uint32_t apb_wr_ld_busy : 1; // [4], read only
  88. uint32_t __31_5 : 27; // [31:5]
  89. } b;
  90. } REG_PMIC_WDT_WDG_INT_RAW_T;
  91. // wdg_irq_mask
  92. typedef union {
  93. uint32_t v;
  94. struct
  95. {
  96. uint32_t wdg_irq_mask : 1; // [0], read only
  97. uint32_t __31_1 : 31; // [31:1]
  98. } b;
  99. } REG_PMIC_WDT_WDG_IRQ_MASK_T;
  100. // wdg_cnt_low
  101. typedef union {
  102. uint32_t v;
  103. struct
  104. {
  105. uint32_t wdg_cnt_low : 16; // [15:0], read only
  106. uint32_t __31_16 : 16; // [31:16]
  107. } b;
  108. } REG_PMIC_WDT_WDG_CNT_LOW_T;
  109. // wdg_cnt_high
  110. typedef union {
  111. uint32_t v;
  112. struct
  113. {
  114. uint32_t wdg_cnt_high : 16; // [15:0], read only
  115. uint32_t __31_16 : 16; // [31:16]
  116. } b;
  117. } REG_PMIC_WDT_WDG_CNT_HIGH_T;
  118. // wdg_lock
  119. typedef union {
  120. uint32_t v;
  121. struct
  122. {
  123. uint32_t wdg_lock : 16; // [15:0]
  124. uint32_t __31_16 : 16; // [31:16]
  125. } b;
  126. } REG_PMIC_WDT_WDG_LOCK_T;
  127. // wdg_cnt_read_low
  128. typedef union {
  129. uint32_t v;
  130. struct
  131. {
  132. uint32_t wdg_cnt_read_low : 16; // [15:0], read only
  133. uint32_t __31_16 : 16; // [31:16]
  134. } b;
  135. } REG_PMIC_WDT_WDG_CNT_READ_LOW_T;
  136. // wdg_cnt_read_high
  137. typedef union {
  138. uint32_t v;
  139. struct
  140. {
  141. uint32_t wdg_cnt_read_high : 16; // [15:0], read only
  142. uint32_t __31_16 : 16; // [31:16]
  143. } b;
  144. } REG_PMIC_WDT_WDG_CNT_READ_HIGH_T;
  145. // wdg_irq_value_low
  146. typedef union {
  147. uint32_t v;
  148. struct
  149. {
  150. uint32_t wdg_irq_value_low : 16; // [15:0]
  151. uint32_t __31_16 : 16; // [31:16]
  152. } b;
  153. } REG_PMIC_WDT_WDG_IRQ_VALUE_LOW_T;
  154. // wdg_irq_value_high
  155. typedef union {
  156. uint32_t v;
  157. struct
  158. {
  159. uint32_t wdg_irq_value_high : 16; // [15:0]
  160. uint32_t __31_16 : 16; // [31:16]
  161. } b;
  162. } REG_PMIC_WDT_WDG_IRQ_VALUE_HIGH_T;
  163. // wdg_load_higher
  164. typedef union {
  165. uint32_t v;
  166. struct
  167. {
  168. uint32_t wdg_ld_value_higher : 16; // [15:0]
  169. uint32_t __31_16 : 16; // [31:16]
  170. } b;
  171. } REG_PMIC_WDT_WDG_LOAD_HIGHER_T;
  172. // wdg_cnt_higher
  173. typedef union {
  174. uint32_t v;
  175. struct
  176. {
  177. uint32_t wdg_cnt_higher : 16; // [15:0], read only
  178. uint32_t __31_16 : 16; // [31:16]
  179. } b;
  180. } REG_PMIC_WDT_WDG_CNT_HIGHER_T;
  181. // wdg_cnt_read_higher
  182. typedef union {
  183. uint32_t v;
  184. struct
  185. {
  186. uint32_t wdg_cnt_read_higher : 16; // [15:0], read only
  187. uint32_t __31_16 : 16; // [31:16]
  188. } b;
  189. } REG_PMIC_WDT_WDG_CNT_READ_HIGHER_T;
  190. // wdg_irq_value_higher
  191. typedef union {
  192. uint32_t v;
  193. struct
  194. {
  195. uint32_t wdg_irq_value_higher : 16; // [15:0]
  196. uint32_t __31_16 : 16; // [31:16]
  197. } b;
  198. } REG_PMIC_WDT_WDG_IRQ_VALUE_HIGHER_T;
  199. // wdg_load_low
  200. #define PMIC_WDT_WDG_LD_VALUE_LOW(n) (((n)&0xffff) << 0)
  201. // wdg_load_high
  202. #define PMIC_WDT_WDG_LD_VALUE_HIGH(n) (((n)&0xffff) << 0)
  203. // wdg_ctrl
  204. #define PMIC_WDT_WDG_IRQ_EN (1 << 0)
  205. #define PMIC_WDT_WDG_OPEN (1 << 1)
  206. #define PMIC_WDT_WDG_NEW (1 << 2)
  207. #define PMIC_WDT_WDG_RST_EN (1 << 3)
  208. // wdg_int_clr
  209. #define PMIC_WDT_WDG_IRQ_CLR (1 << 0)
  210. #define PMIC_WDT_WDG_RST_CLR (1 << 3)
  211. // wdg_int_raw
  212. #define PMIC_WDT_WDG_IRQ_RAW (1 << 0)
  213. #define PMIC_WDT_WDG_RST_RAW (1 << 3)
  214. #define PMIC_WDT_APB_WR_LD_BUSY (1 << 4)
  215. // wdg_irq_mask
  216. #define PMIC_WDT_WDG_IRQ_MASK (1 << 0)
  217. // wdg_cnt_low
  218. #define PMIC_WDT_WDG_CNT_LOW(n) (((n)&0xffff) << 0)
  219. // wdg_cnt_high
  220. #define PMIC_WDT_WDG_CNT_HIGH(n) (((n)&0xffff) << 0)
  221. // wdg_lock
  222. #define PMIC_WDT_WDG_LOCK(n) (((n)&0xffff) << 0)
  223. // wdg_cnt_read_low
  224. #define PMIC_WDT_WDG_CNT_READ_LOW(n) (((n)&0xffff) << 0)
  225. // wdg_cnt_read_high
  226. #define PMIC_WDT_WDG_CNT_READ_HIGH(n) (((n)&0xffff) << 0)
  227. // wdg_irq_value_low
  228. #define PMIC_WDT_WDG_IRQ_VALUE_LOW(n) (((n)&0xffff) << 0)
  229. // wdg_irq_value_high
  230. #define PMIC_WDT_WDG_IRQ_VALUE_HIGH(n) (((n)&0xffff) << 0)
  231. // wdg_load_higher
  232. #define PMIC_WDT_WDG_LD_VALUE_HIGHER(n) (((n)&0xffff) << 0)
  233. // wdg_cnt_higher
  234. #define PMIC_WDT_WDG_CNT_HIGHER(n) (((n)&0xffff) << 0)
  235. // wdg_cnt_read_higher
  236. #define PMIC_WDT_WDG_CNT_READ_HIGHER(n) (((n)&0xffff) << 0)
  237. // wdg_irq_value_higher
  238. #define PMIC_WDT_WDG_IRQ_VALUE_HIGHER(n) (((n)&0xffff) << 0)
  239. #endif // _PMIC_WDT_H_