lps_clk.h 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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 _LPS_CLK_H_
  13. #define _LPS_CLK_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_LPS_CLK_SET_OFFSET (256)
  17. #define REG_LPS_CLK_CLR_OFFSET (512)
  18. #define REG_LPS_CLK_BASE (0x51701000)
  19. typedef volatile struct
  20. {
  21. uint32_t user_gate_force_off; // 0x00000000
  22. uint32_t user_gate_auto_gate_en; // 0x00000004
  23. uint32_t __8[8]; // 0x00000008
  24. uint32_t cgm_uart1_bf_div_sel_cfg; // 0x00000028
  25. uint32_t __44[5]; // 0x0000002c
  26. uint32_t cgm_lps_ahb_sel_cfg; // 0x00000040
  27. uint32_t cgm_busy_src_monitor_cfg0; // 0x00000044
  28. uint32_t __72[46]; // 0x00000048
  29. uint32_t user_gate_force_off_set; // 0x00000100
  30. uint32_t user_gate_auto_gate_en_set; // 0x00000104
  31. uint32_t __264[62]; // 0x00000108
  32. uint32_t user_gate_force_off_clr; // 0x00000200
  33. uint32_t user_gate_auto_gate_en_clr; // 0x00000204
  34. } HWP_LPS_CLK_T;
  35. #define hwp_lpsClk ((HWP_LPS_CLK_T *)REG_ACCESS_ADDRESS(REG_LPS_CLK_BASE))
  36. // user_gate_force_off
  37. typedef union {
  38. uint32_t v;
  39. struct
  40. {
  41. uint32_t uart1_bf_div_uart1_force_off : 1; // [0]
  42. uint32_t uart1_bf_div_uart1_always_force_off : 1; // [1]
  43. uint32_t lps_32k_fr_force_off : 1; // [2]
  44. uint32_t lps_ahb_to_aon_force_off : 1; // [3]
  45. uint32_t lps_ahb_uart1_mod_force_off : 1; // [4]
  46. uint32_t lps_ahb_uart1_always_force_off : 1; // [5]
  47. uint32_t lps_ahb_uart1_force_off : 1; // [6]
  48. uint32_t lps_ahb_gpio1_force_off : 1; // [7]
  49. uint32_t lps_ahb_gpio_mod_force_off : 1; // [8]
  50. uint32_t lps_ahb_gpt1_force_off : 1; // [9]
  51. uint32_t lps_ahb_apb_reg_force_off : 1; // [10]
  52. uint32_t lps_ahb_keypad_force_off : 1; // [11]
  53. uint32_t lps_ahb_keypad_always_force_off : 1; // [12]
  54. uint32_t lps_ahb_keypad_osc_force_off : 1; // [13]
  55. uint32_t lps_ahb_pwrctrl_intf_force_off : 1; // [14]
  56. uint32_t lps_ahb_pwrctrl_func_force_off : 1; // [15]
  57. uint32_t lps_ahb_idle_lps_force_off : 1; // [16]
  58. uint32_t lps_ahb_ana_wrap3_force_off : 1; // [17]
  59. uint32_t __31_18 : 14; // [31:18]
  60. } b;
  61. } REG_LPS_CLK_USER_GATE_FORCE_OFF_T;
  62. // user_gate_auto_gate_en
  63. typedef union {
  64. uint32_t v;
  65. struct
  66. {
  67. uint32_t uart1_bf_div_uart1_auto_gate_en : 1; // [0]
  68. uint32_t uart1_bf_div_uart1_always_auto_gate_en : 1; // [1]
  69. uint32_t lps_32k_fr_auto_gate_en : 1; // [2]
  70. uint32_t lps_ahb_to_aon_auto_gate_en : 1; // [3]
  71. uint32_t lps_ahb_uart1_mod_auto_gate_en : 1; // [4]
  72. uint32_t lps_ahb_uart1_always_auto_gate_en : 1; // [5]
  73. uint32_t lps_ahb_uart1_auto_gate_en : 1; // [6]
  74. uint32_t lps_ahb_gpio1_auto_gate_en : 1; // [7]
  75. uint32_t lps_ahb_gpio_mod_auto_gate_en : 1; // [8]
  76. uint32_t lps_ahb_gpt1_auto_gate_en : 1; // [9]
  77. uint32_t lps_ahb_apb_reg_auto_gate_en : 1; // [10]
  78. uint32_t lps_ahb_keypad_auto_gate_en : 1; // [11]
  79. uint32_t lps_ahb_keypad_always_auto_gate_en : 1; // [12]
  80. uint32_t lps_ahb_keypad_osc_auto_gate_en : 1; // [13]
  81. uint32_t lps_ahb_pwrctrl_intf_auto_gate_en : 1; // [14]
  82. uint32_t lps_ahb_pwrctrl_func_auto_gate_en : 1; // [15]
  83. uint32_t lps_ahb_idle_lps_auto_gate_en : 1; // [16]
  84. uint32_t lps_ahb_ana_wrap3_auto_gate_en : 1; // [17]
  85. uint32_t __31_18 : 14; // [31:18]
  86. } b;
  87. } REG_LPS_CLK_USER_GATE_AUTO_GATE_EN_T;
  88. // cgm_uart1_bf_div_sel_cfg
  89. typedef union {
  90. uint32_t v;
  91. struct
  92. {
  93. uint32_t cgm_uart1_bf_div_sel : 2; // [1:0]
  94. uint32_t __31_2 : 30; // [31:2]
  95. } b;
  96. } REG_LPS_CLK_CGM_UART1_BF_DIV_SEL_CFG_T;
  97. // cgm_lps_ahb_sel_cfg
  98. typedef union {
  99. uint32_t v;
  100. struct
  101. {
  102. uint32_t cgm_lps_ahb_sel : 2; // [1:0]
  103. uint32_t __31_2 : 30; // [31:2]
  104. } b;
  105. } REG_LPS_CLK_CGM_LPS_AHB_SEL_CFG_T;
  106. // cgm_busy_src_monitor_cfg0
  107. typedef union {
  108. uint32_t v;
  109. struct
  110. {
  111. uint32_t cgm_busy_src_monitor0 : 9; // [8:0], read only
  112. uint32_t __31_9 : 23; // [31:9]
  113. } b;
  114. } REG_LPS_CLK_CGM_BUSY_SRC_MONITOR_CFG0_T;
  115. // user_gate_force_off
  116. #define LPS_CLK_UART1_BF_DIV_UART1_FORCE_OFF (1 << 0)
  117. #define LPS_CLK_UART1_BF_DIV_UART1_ALWAYS_FORCE_OFF (1 << 1)
  118. #define LPS_CLK_LPS_32K_FR_FORCE_OFF (1 << 2)
  119. #define LPS_CLK_LPS_AHB_TO_AON_FORCE_OFF (1 << 3)
  120. #define LPS_CLK_LPS_AHB_UART1_MOD_FORCE_OFF (1 << 4)
  121. #define LPS_CLK_LPS_AHB_UART1_ALWAYS_FORCE_OFF (1 << 5)
  122. #define LPS_CLK_LPS_AHB_UART1_FORCE_OFF (1 << 6)
  123. #define LPS_CLK_LPS_AHB_GPIO1_FORCE_OFF (1 << 7)
  124. #define LPS_CLK_LPS_AHB_GPIO_MOD_FORCE_OFF (1 << 8)
  125. #define LPS_CLK_LPS_AHB_GPT1_FORCE_OFF (1 << 9)
  126. #define LPS_CLK_LPS_AHB_APB_REG_FORCE_OFF (1 << 10)
  127. #define LPS_CLK_LPS_AHB_KEYPAD_FORCE_OFF (1 << 11)
  128. #define LPS_CLK_LPS_AHB_KEYPAD_ALWAYS_FORCE_OFF (1 << 12)
  129. #define LPS_CLK_LPS_AHB_KEYPAD_OSC_FORCE_OFF (1 << 13)
  130. #define LPS_CLK_LPS_AHB_PWRCTRL_INTF_FORCE_OFF (1 << 14)
  131. #define LPS_CLK_LPS_AHB_PWRCTRL_FUNC_FORCE_OFF (1 << 15)
  132. #define LPS_CLK_LPS_AHB_IDLE_LPS_FORCE_OFF (1 << 16)
  133. #define LPS_CLK_LPS_AHB_ANA_WRAP3_FORCE_OFF (1 << 17)
  134. // user_gate_auto_gate_en
  135. #define LPS_CLK_UART1_BF_DIV_UART1_AUTO_GATE_EN (1 << 0)
  136. #define LPS_CLK_UART1_BF_DIV_UART1_ALWAYS_AUTO_GATE_EN (1 << 1)
  137. #define LPS_CLK_LPS_32K_FR_AUTO_GATE_EN (1 << 2)
  138. #define LPS_CLK_LPS_AHB_TO_AON_AUTO_GATE_EN (1 << 3)
  139. #define LPS_CLK_LPS_AHB_UART1_MOD_AUTO_GATE_EN (1 << 4)
  140. #define LPS_CLK_LPS_AHB_UART1_ALWAYS_AUTO_GATE_EN (1 << 5)
  141. #define LPS_CLK_LPS_AHB_UART1_AUTO_GATE_EN (1 << 6)
  142. #define LPS_CLK_LPS_AHB_GPIO1_AUTO_GATE_EN (1 << 7)
  143. #define LPS_CLK_LPS_AHB_GPIO_MOD_AUTO_GATE_EN (1 << 8)
  144. #define LPS_CLK_LPS_AHB_GPT1_AUTO_GATE_EN (1 << 9)
  145. #define LPS_CLK_LPS_AHB_APB_REG_AUTO_GATE_EN (1 << 10)
  146. #define LPS_CLK_LPS_AHB_KEYPAD_AUTO_GATE_EN (1 << 11)
  147. #define LPS_CLK_LPS_AHB_KEYPAD_ALWAYS_AUTO_GATE_EN (1 << 12)
  148. #define LPS_CLK_LPS_AHB_KEYPAD_OSC_AUTO_GATE_EN (1 << 13)
  149. #define LPS_CLK_LPS_AHB_PWRCTRL_INTF_AUTO_GATE_EN (1 << 14)
  150. #define LPS_CLK_LPS_AHB_PWRCTRL_FUNC_AUTO_GATE_EN (1 << 15)
  151. #define LPS_CLK_LPS_AHB_IDLE_LPS_AUTO_GATE_EN (1 << 16)
  152. #define LPS_CLK_LPS_AHB_ANA_WRAP3_AUTO_GATE_EN (1 << 17)
  153. // cgm_uart1_bf_div_sel_cfg
  154. #define LPS_CLK_CGM_UART1_BF_DIV_SEL(n) (((n)&0x3) << 0)
  155. // cgm_lps_ahb_sel_cfg
  156. #define LPS_CLK_CGM_LPS_AHB_SEL(n) (((n)&0x3) << 0)
  157. // cgm_busy_src_monitor_cfg0
  158. #define LPS_CLK_CGM_BUSY_SRC_MONITOR0(n) (((n)&0x1ff) << 0)
  159. #endif // _LPS_CLK_H_