aon_clk.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  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 _AON_CLK_H_
  13. #define _AON_CLK_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_AON_CLK_BASE (0x51508800)
  17. typedef volatile struct
  18. {
  19. uint32_t __0[9]; // 0x00000000
  20. uint32_t cgm_aon_ahb_div_cfg; // 0x00000024
  21. uint32_t cgm_aon_ahb_sel_cfg; // 0x00000028
  22. uint32_t __44[2]; // 0x0000002c
  23. uint32_t cgm_uart2_bf_div_sel_cfg; // 0x00000034
  24. uint32_t __56[2]; // 0x00000038
  25. uint32_t cgm_uart3_bf_div_sel_cfg; // 0x00000040
  26. uint32_t __68[2]; // 0x00000044
  27. uint32_t cgm_debug_host_bf_div_sel_cfg; // 0x0000004c
  28. uint32_t __80[1]; // 0x00000050
  29. uint32_t cgm_audio_div_cfg; // 0x00000054
  30. uint32_t cgm_audio_sel_cfg; // 0x00000058
  31. uint32_t __92[1]; // 0x0000005c
  32. uint32_t cgm_codec_mclock_div_cfg; // 0x00000060
  33. uint32_t cgm_codec_mclock_sel_cfg; // 0x00000064
  34. uint32_t __104[1]; // 0x00000068
  35. uint32_t cgm_i2s_bck_bf_div_div_cfg; // 0x0000006c
  36. uint32_t cgm_i2s_bck_bf_div_sel_cfg; // 0x00000070
  37. uint32_t __116[1]; // 0x00000074
  38. uint32_t cgm_out_div_cfg; // 0x00000078
  39. uint32_t cgm_out_sel_cfg; // 0x0000007c
  40. uint32_t __128[2]; // 0x00000080
  41. uint32_t cgm_efuse_sel_cfg; // 0x00000088
  42. uint32_t __140[2]; // 0x0000008c
  43. uint32_t cgm_adi_sel_cfg; // 0x00000094
  44. uint32_t __152[2]; // 0x00000098
  45. uint32_t cgm_dap_sel_cfg; // 0x000000a0
  46. uint32_t __164[11]; // 0x000000a4
  47. uint32_t cgm_djtag_tck_sel_cfg; // 0x000000d0
  48. uint32_t __212[2]; // 0x000000d4
  49. uint32_t cgm_swcgm_hw_sel_cfg; // 0x000000dc
  50. uint32_t __224[2]; // 0x000000e0
  51. uint32_t cgm_gpt2_sel_cfg; // 0x000000e8
  52. uint32_t __236[2]; // 0x000000ec
  53. uint32_t cgm_i2c3_sel_cfg; // 0x000000f4
  54. uint32_t __248[5]; // 0x000000f8
  55. uint32_t cgm_usb_ref_sel_cfg; // 0x0000010c
  56. uint32_t __272[1]; // 0x00000110
  57. uint32_t cgm_usb_ahb_div_cfg; // 0x00000114
  58. uint32_t cgm_usb_ahb_sel_cfg; // 0x00000118
  59. uint32_t __284[1]; // 0x0000011c
  60. uint32_t cgm_spi2_div_cfg; // 0x00000120
  61. uint32_t cgm_spi2_sel_cfg; // 0x00000124
  62. uint32_t __296[2]; // 0x00000128
  63. uint32_t cgm_scc_sel_cfg; // 0x00000130
  64. uint32_t __308[1]; // 0x00000134
  65. uint32_t cgm_sdio_2x_div_cfg; // 0x00000138
  66. uint32_t cgm_sdio_2x_sel_cfg; // 0x0000013c
  67. uint32_t __320[1]; // 0x00000140
  68. uint32_t cgm_sdio_1x_div_cfg; // 0x00000144
  69. uint32_t __328[19]; // 0x00000148
  70. uint32_t cgm_busy_src_monitor_cfg0; // 0x00000194
  71. uint32_t cgm_busy_src_monitor_cfg1; // 0x00000198
  72. uint32_t cgm_busy_src_monitor_cfg2; // 0x0000019c
  73. uint32_t cgm_busy_src_monitor_cfg3; // 0x000001a0
  74. } HWP_AON_CLK_T;
  75. #define hwp_aonClk ((HWP_AON_CLK_T *)REG_ACCESS_ADDRESS(REG_AON_CLK_BASE))
  76. // cgm_aon_ahb_div_cfg
  77. typedef union {
  78. uint32_t v;
  79. struct
  80. {
  81. uint32_t cgm_aon_ahb_div : 2; // [1:0]
  82. uint32_t __31_2 : 30; // [31:2]
  83. } b;
  84. } REG_AON_CLK_CGM_AON_AHB_DIV_CFG_T;
  85. // cgm_aon_ahb_sel_cfg
  86. typedef union {
  87. uint32_t v;
  88. struct
  89. {
  90. uint32_t cgm_aon_ahb_sel : 3; // [2:0]
  91. uint32_t __31_3 : 29; // [31:3]
  92. } b;
  93. } REG_AON_CLK_CGM_AON_AHB_SEL_CFG_T;
  94. // cgm_uart2_bf_div_sel_cfg
  95. typedef union {
  96. uint32_t v;
  97. struct
  98. {
  99. uint32_t cgm_uart2_bf_div_sel : 3; // [2:0]
  100. uint32_t __31_3 : 29; // [31:3]
  101. } b;
  102. } REG_AON_CLK_CGM_UART2_BF_DIV_SEL_CFG_T;
  103. // cgm_uart3_bf_div_sel_cfg
  104. typedef union {
  105. uint32_t v;
  106. struct
  107. {
  108. uint32_t cgm_uart3_bf_div_sel : 3; // [2:0]
  109. uint32_t __31_3 : 29; // [31:3]
  110. } b;
  111. } REG_AON_CLK_CGM_UART3_BF_DIV_SEL_CFG_T;
  112. // cgm_debug_host_bf_div_sel_cfg
  113. typedef union {
  114. uint32_t v;
  115. struct
  116. {
  117. uint32_t cgm_debug_host_bf_div_sel : 2; // [1:0]
  118. uint32_t __31_2 : 30; // [31:2]
  119. } b;
  120. } REG_AON_CLK_CGM_DEBUG_HOST_BF_DIV_SEL_CFG_T;
  121. // cgm_audio_div_cfg
  122. typedef union {
  123. uint32_t v;
  124. struct
  125. {
  126. uint32_t cgm_audio_div : 4; // [3:0]
  127. uint32_t __31_4 : 28; // [31:4]
  128. } b;
  129. } REG_AON_CLK_CGM_AUDIO_DIV_CFG_T;
  130. // cgm_audio_sel_cfg
  131. typedef union {
  132. uint32_t v;
  133. struct
  134. {
  135. uint32_t cgm_audio_sel : 3; // [2:0]
  136. uint32_t __31_3 : 29; // [31:3]
  137. } b;
  138. } REG_AON_CLK_CGM_AUDIO_SEL_CFG_T;
  139. // cgm_codec_mclock_div_cfg
  140. typedef union {
  141. uint32_t v;
  142. struct
  143. {
  144. uint32_t cgm_codec_mclock_div : 4; // [3:0]
  145. uint32_t __31_4 : 28; // [31:4]
  146. } b;
  147. } REG_AON_CLK_CGM_CODEC_MCLOCK_DIV_CFG_T;
  148. // cgm_codec_mclock_sel_cfg
  149. typedef union {
  150. uint32_t v;
  151. struct
  152. {
  153. uint32_t cgm_codec_mclock_sel : 3; // [2:0]
  154. uint32_t __31_3 : 29; // [31:3]
  155. } b;
  156. } REG_AON_CLK_CGM_CODEC_MCLOCK_SEL_CFG_T;
  157. // cgm_i2s_bck_bf_div_div_cfg
  158. typedef union {
  159. uint32_t v;
  160. struct
  161. {
  162. uint32_t cgm_i2s_bck_bf_div_div : 12; // [11:0]
  163. uint32_t __31_12 : 20; // [31:12]
  164. } b;
  165. } REG_AON_CLK_CGM_I2S_BCK_BF_DIV_DIV_CFG_T;
  166. // cgm_i2s_bck_bf_div_sel_cfg
  167. typedef union {
  168. uint32_t v;
  169. struct
  170. {
  171. uint32_t cgm_i2s_bck_bf_div_sel : 3; // [2:0]
  172. uint32_t __15_3 : 13; // [15:3]
  173. uint32_t cgm_i2s_bck_bf_div_pad_sel : 1; // [16]
  174. uint32_t __31_17 : 15; // [31:17]
  175. } b;
  176. } REG_AON_CLK_CGM_I2S_BCK_BF_DIV_SEL_CFG_T;
  177. // cgm_out_div_cfg
  178. typedef union {
  179. uint32_t v;
  180. struct
  181. {
  182. uint32_t cgm_out_div : 8; // [7:0]
  183. uint32_t __31_8 : 24; // [31:8]
  184. } b;
  185. } REG_AON_CLK_CGM_OUT_DIV_CFG_T;
  186. // cgm_out_sel_cfg
  187. typedef union {
  188. uint32_t v;
  189. struct
  190. {
  191. uint32_t cgm_out_sel : 3; // [2:0]
  192. uint32_t __31_3 : 29; // [31:3]
  193. } b;
  194. } REG_AON_CLK_CGM_OUT_SEL_CFG_T;
  195. // cgm_efuse_sel_cfg
  196. typedef union {
  197. uint32_t v;
  198. struct
  199. {
  200. uint32_t cgm_efuse_sel : 2; // [1:0]
  201. uint32_t __31_2 : 30; // [31:2]
  202. } b;
  203. } REG_AON_CLK_CGM_EFUSE_SEL_CFG_T;
  204. // cgm_adi_sel_cfg
  205. typedef union {
  206. uint32_t v;
  207. struct
  208. {
  209. uint32_t cgm_adi_sel : 2; // [1:0]
  210. uint32_t __31_2 : 30; // [31:2]
  211. } b;
  212. } REG_AON_CLK_CGM_ADI_SEL_CFG_T;
  213. // cgm_dap_sel_cfg
  214. typedef union {
  215. uint32_t v;
  216. struct
  217. {
  218. uint32_t cgm_dap_sel : 3; // [2:0]
  219. uint32_t __31_3 : 29; // [31:3]
  220. } b;
  221. } REG_AON_CLK_CGM_DAP_SEL_CFG_T;
  222. // cgm_djtag_tck_sel_cfg
  223. typedef union {
  224. uint32_t v;
  225. struct
  226. {
  227. uint32_t cgm_djtag_tck_sel : 1; // [0]
  228. uint32_t __15_1 : 15; // [15:1]
  229. uint32_t cgm_djtag_tck_pad_sel : 1; // [16]
  230. uint32_t __31_17 : 15; // [31:17]
  231. } b;
  232. } REG_AON_CLK_CGM_DJTAG_TCK_SEL_CFG_T;
  233. // cgm_swcgm_hw_sel_cfg
  234. typedef union {
  235. uint32_t v;
  236. struct
  237. {
  238. uint32_t __15_0 : 16; // [15:0]
  239. uint32_t cgm_swcgm_hw_pad_sel : 1; // [16]
  240. uint32_t __31_17 : 15; // [31:17]
  241. } b;
  242. } REG_AON_CLK_CGM_SWCGM_HW_SEL_CFG_T;
  243. // cgm_gpt2_sel_cfg
  244. typedef union {
  245. uint32_t v;
  246. struct
  247. {
  248. uint32_t cgm_gpt2_sel : 3; // [2:0]
  249. uint32_t __31_3 : 29; // [31:3]
  250. } b;
  251. } REG_AON_CLK_CGM_GPT2_SEL_CFG_T;
  252. // cgm_i2c3_sel_cfg
  253. typedef union {
  254. uint32_t v;
  255. struct
  256. {
  257. uint32_t cgm_i2c3_sel : 3; // [2:0]
  258. uint32_t __31_3 : 29; // [31:3]
  259. } b;
  260. } REG_AON_CLK_CGM_I2C3_SEL_CFG_T;
  261. // cgm_usb_ref_sel_cfg
  262. typedef union {
  263. uint32_t v;
  264. struct
  265. {
  266. uint32_t cgm_usb_ref_sel : 1; // [0]
  267. uint32_t __31_1 : 31; // [31:1]
  268. } b;
  269. } REG_AON_CLK_CGM_USB_REF_SEL_CFG_T;
  270. // cgm_usb_ahb_div_cfg
  271. typedef union {
  272. uint32_t v;
  273. struct
  274. {
  275. uint32_t cgm_usb_ahb_div : 2; // [1:0]
  276. uint32_t __31_2 : 30; // [31:2]
  277. } b;
  278. } REG_AON_CLK_CGM_USB_AHB_DIV_CFG_T;
  279. // cgm_usb_ahb_sel_cfg
  280. typedef union {
  281. uint32_t v;
  282. struct
  283. {
  284. uint32_t cgm_usb_ahb_sel : 3; // [2:0]
  285. uint32_t __31_3 : 29; // [31:3]
  286. } b;
  287. } REG_AON_CLK_CGM_USB_AHB_SEL_CFG_T;
  288. // cgm_spi2_div_cfg
  289. typedef union {
  290. uint32_t v;
  291. struct
  292. {
  293. uint32_t cgm_spi2_div : 3; // [2:0]
  294. uint32_t __31_3 : 29; // [31:3]
  295. } b;
  296. } REG_AON_CLK_CGM_SPI2_DIV_CFG_T;
  297. // cgm_spi2_sel_cfg
  298. typedef union {
  299. uint32_t v;
  300. struct
  301. {
  302. uint32_t cgm_spi2_sel : 3; // [2:0]
  303. uint32_t __15_3 : 13; // [15:3]
  304. uint32_t cgm_spi2_pad_sel : 1; // [16]
  305. uint32_t __31_17 : 15; // [31:17]
  306. } b;
  307. } REG_AON_CLK_CGM_SPI2_SEL_CFG_T;
  308. // cgm_scc_sel_cfg
  309. typedef union {
  310. uint32_t v;
  311. struct
  312. {
  313. uint32_t __15_0 : 16; // [15:0]
  314. uint32_t cgm_scc_pad_sel : 1; // [16]
  315. uint32_t __31_17 : 15; // [31:17]
  316. } b;
  317. } REG_AON_CLK_CGM_SCC_SEL_CFG_T;
  318. // cgm_sdio_2x_div_cfg
  319. typedef union {
  320. uint32_t v;
  321. struct
  322. {
  323. uint32_t cgm_sdio_2x_div : 11; // [10:0]
  324. uint32_t __31_11 : 21; // [31:11]
  325. } b;
  326. } REG_AON_CLK_CGM_SDIO_2X_DIV_CFG_T;
  327. // cgm_sdio_2x_sel_cfg
  328. typedef union {
  329. uint32_t v;
  330. struct
  331. {
  332. uint32_t cgm_sdio_2x_sel : 3; // [2:0]
  333. uint32_t __31_3 : 29; // [31:3]
  334. } b;
  335. } REG_AON_CLK_CGM_SDIO_2X_SEL_CFG_T;
  336. // cgm_sdio_1x_div_cfg
  337. typedef union {
  338. uint32_t v;
  339. struct
  340. {
  341. uint32_t cgm_sdio_1x_div : 1; // [0]
  342. uint32_t __31_1 : 31; // [31:1]
  343. } b;
  344. } REG_AON_CLK_CGM_SDIO_1X_DIV_CFG_T;
  345. // cgm_aon_ahb_div_cfg
  346. #define AON_CLK_CGM_AON_AHB_DIV(n) (((n)&0x3) << 0)
  347. // cgm_aon_ahb_sel_cfg
  348. #define AON_CLK_CGM_AON_AHB_SEL(n) (((n)&0x7) << 0)
  349. // cgm_uart2_bf_div_sel_cfg
  350. #define AON_CLK_CGM_UART2_BF_DIV_SEL(n) (((n)&0x7) << 0)
  351. // cgm_uart3_bf_div_sel_cfg
  352. #define AON_CLK_CGM_UART3_BF_DIV_SEL(n) (((n)&0x7) << 0)
  353. // cgm_debug_host_bf_div_sel_cfg
  354. #define AON_CLK_CGM_DEBUG_HOST_BF_DIV_SEL(n) (((n)&0x3) << 0)
  355. // cgm_audio_div_cfg
  356. #define AON_CLK_CGM_AUDIO_DIV(n) (((n)&0xf) << 0)
  357. // cgm_audio_sel_cfg
  358. #define AON_CLK_CGM_AUDIO_SEL(n) (((n)&0x7) << 0)
  359. // cgm_codec_mclock_div_cfg
  360. #define AON_CLK_CGM_CODEC_MCLOCK_DIV(n) (((n)&0xf) << 0)
  361. // cgm_codec_mclock_sel_cfg
  362. #define AON_CLK_CGM_CODEC_MCLOCK_SEL(n) (((n)&0x7) << 0)
  363. // cgm_i2s_bck_bf_div_div_cfg
  364. #define AON_CLK_CGM_I2S_BCK_BF_DIV_DIV(n) (((n)&0xfff) << 0)
  365. // cgm_i2s_bck_bf_div_sel_cfg
  366. #define AON_CLK_CGM_I2S_BCK_BF_DIV_SEL(n) (((n)&0x7) << 0)
  367. #define AON_CLK_CGM_I2S_BCK_BF_DIV_PAD_SEL (1 << 16)
  368. // cgm_out_div_cfg
  369. #define AON_CLK_CGM_OUT_DIV(n) (((n)&0xff) << 0)
  370. // cgm_out_sel_cfg
  371. #define AON_CLK_CGM_OUT_SEL(n) (((n)&0x7) << 0)
  372. // cgm_efuse_sel_cfg
  373. #define AON_CLK_CGM_EFUSE_SEL(n) (((n)&0x3) << 0)
  374. // cgm_adi_sel_cfg
  375. #define AON_CLK_CGM_ADI_SEL(n) (((n)&0x3) << 0)
  376. // cgm_dap_sel_cfg
  377. #define AON_CLK_CGM_DAP_SEL(n) (((n)&0x7) << 0)
  378. // cgm_djtag_tck_sel_cfg
  379. #define AON_CLK_CGM_DJTAG_TCK_SEL (1 << 0)
  380. #define AON_CLK_CGM_DJTAG_TCK_PAD_SEL (1 << 16)
  381. // cgm_swcgm_hw_sel_cfg
  382. #define AON_CLK_CGM_SWCGM_HW_PAD_SEL (1 << 16)
  383. // cgm_gpt2_sel_cfg
  384. #define AON_CLK_CGM_GPT2_SEL(n) (((n)&0x7) << 0)
  385. // cgm_i2c3_sel_cfg
  386. #define AON_CLK_CGM_I2C3_SEL(n) (((n)&0x7) << 0)
  387. // cgm_usb_ref_sel_cfg
  388. #define AON_CLK_CGM_USB_REF_SEL (1 << 0)
  389. // cgm_usb_ahb_div_cfg
  390. #define AON_CLK_CGM_USB_AHB_DIV(n) (((n)&0x3) << 0)
  391. // cgm_usb_ahb_sel_cfg
  392. #define AON_CLK_CGM_USB_AHB_SEL(n) (((n)&0x7) << 0)
  393. // cgm_spi2_div_cfg
  394. #define AON_CLK_CGM_SPI2_DIV(n) (((n)&0x7) << 0)
  395. // cgm_spi2_sel_cfg
  396. #define AON_CLK_CGM_SPI2_SEL(n) (((n)&0x7) << 0)
  397. #define AON_CLK_CGM_SPI2_PAD_SEL (1 << 16)
  398. // cgm_scc_sel_cfg
  399. #define AON_CLK_CGM_SCC_PAD_SEL (1 << 16)
  400. // cgm_sdio_2x_div_cfg
  401. #define AON_CLK_CGM_SDIO_2X_DIV(n) (((n)&0x7ff) << 0)
  402. // cgm_sdio_2x_sel_cfg
  403. #define AON_CLK_CGM_SDIO_2X_SEL(n) (((n)&0x7) << 0)
  404. // cgm_sdio_1x_div_cfg
  405. #define AON_CLK_CGM_SDIO_1X_DIV (1 << 0)
  406. #endif // _AON_CLK_H_