lps_clk_gen.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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_GEN_H_
  13. #define _LPS_CLK_GEN_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_LPS_CLK_GEN_BASE (0x51708000)
  17. typedef volatile struct
  18. {
  19. uint32_t __0[8]; // 0x00000000
  20. uint32_t soft_cnt_done0_cfg; // 0x00000020
  21. uint32_t pll_wait_sel0_cfg; // 0x00000024
  22. uint32_t pll_wait_sw_ctl0_cfg; // 0x00000028
  23. uint32_t __44[2]; // 0x0000002c
  24. uint32_t gate_en_sel0_cfg; // 0x00000034
  25. uint32_t gate_en_sw_ctl0_cfg; // 0x00000038
  26. uint32_t monitor_wait_en_status0_cfg; // 0x0000003c
  27. uint32_t monitor_gate_auto_en_status0_cfg; // 0x00000040
  28. } HWP_LPS_CLK_GEN_T;
  29. #define hwp_lpsClkGen ((HWP_LPS_CLK_GEN_T *)REG_ACCESS_ADDRESS(REG_LPS_CLK_GEN_BASE))
  30. // soft_cnt_done0_cfg
  31. typedef union {
  32. uint32_t v;
  33. struct
  34. {
  35. uint32_t rc26m_26m_soft_cnt_done : 1; // [0]
  36. uint32_t __31_1 : 31; // [31:1]
  37. } b;
  38. } REG_LPS_CLK_GEN_SOFT_CNT_DONE0_CFG_T;
  39. // pll_wait_sel0_cfg
  40. typedef union {
  41. uint32_t v;
  42. struct
  43. {
  44. uint32_t rc26m_26m_wait_auto_gate_sel : 1; // [0]
  45. uint32_t __31_1 : 31; // [31:1]
  46. } b;
  47. } REG_LPS_CLK_GEN_PLL_WAIT_SEL0_CFG_T;
  48. // pll_wait_sw_ctl0_cfg
  49. typedef union {
  50. uint32_t v;
  51. struct
  52. {
  53. uint32_t rc26m_26m_wait_force_en : 1; // [0]
  54. uint32_t __31_1 : 31; // [31:1]
  55. } b;
  56. } REG_LPS_CLK_GEN_PLL_WAIT_SW_CTL0_CFG_T;
  57. // gate_en_sel0_cfg
  58. typedef union {
  59. uint32_t v;
  60. struct
  61. {
  62. uint32_t cgm_rc_26m_lps_auto_gate_sel : 1; // [0]
  63. uint32_t cgm_rtc_32k_lps_auto_gate_sel : 1; // [1]
  64. uint32_t cgm_rc_26m_aon_auto_gate_sel : 1; // [2]
  65. uint32_t cgm_rtc_32k_aon_auto_gate_sel : 1; // [3]
  66. uint32_t cgm_rtc_32k_cp_auto_gate_sel : 1; // [4]
  67. uint32_t cgm_rc_26m_ap_auto_gate_sel : 1; // [5]
  68. uint32_t cgm_rtc_32k_ap_auto_gate_sel : 1; // [6]
  69. uint32_t __31_7 : 25; // [31:7]
  70. } b;
  71. } REG_LPS_CLK_GEN_GATE_EN_SEL0_CFG_T;
  72. // gate_en_sw_ctl0_cfg
  73. typedef union {
  74. uint32_t v;
  75. struct
  76. {
  77. uint32_t cgm_rc_26m_lps_force_en : 1; // [0]
  78. uint32_t cgm_rtc_32k_lps_force_en : 1; // [1]
  79. uint32_t cgm_rc_26m_aon_force_en : 1; // [2]
  80. uint32_t cgm_rtc_32k_aon_force_en : 1; // [3]
  81. uint32_t cgm_rtc_32k_cp_force_en : 1; // [4]
  82. uint32_t cgm_rc_26m_ap_force_en : 1; // [5]
  83. uint32_t cgm_rtc_32k_ap_force_en : 1; // [6]
  84. uint32_t __31_7 : 25; // [31:7]
  85. } b;
  86. } REG_LPS_CLK_GEN_GATE_EN_SW_CTL0_CFG_T;
  87. // monitor_wait_en_status0_cfg
  88. typedef union {
  89. uint32_t v;
  90. struct
  91. {
  92. uint32_t monitor_wait_en_status : 1; // [0], read only
  93. uint32_t __31_1 : 31; // [31:1]
  94. } b;
  95. } REG_LPS_CLK_GEN_MONITOR_WAIT_EN_STATUS0_CFG_T;
  96. // monitor_gate_auto_en_status0_cfg
  97. typedef union {
  98. uint32_t v;
  99. struct
  100. {
  101. uint32_t monitor_gate_auto_en_status : 7; // [6:0], read only
  102. uint32_t __31_7 : 25; // [31:7]
  103. } b;
  104. } REG_LPS_CLK_GEN_MONITOR_GATE_AUTO_EN_STATUS0_CFG_T;
  105. // soft_cnt_done0_cfg
  106. #define LPS_CLK_GEN_RC26M_26M_SOFT_CNT_DONE (1 << 0)
  107. // pll_wait_sel0_cfg
  108. #define LPS_CLK_GEN_RC26M_26M_WAIT_AUTO_GATE_SEL (1 << 0)
  109. // pll_wait_sw_ctl0_cfg
  110. #define LPS_CLK_GEN_RC26M_26M_WAIT_FORCE_EN (1 << 0)
  111. // gate_en_sel0_cfg
  112. #define LPS_CLK_GEN_CGM_RC_26M_LPS_AUTO_GATE_SEL (1 << 0)
  113. #define LPS_CLK_GEN_CGM_RTC_32K_LPS_AUTO_GATE_SEL (1 << 1)
  114. #define LPS_CLK_GEN_CGM_RC_26M_AON_AUTO_GATE_SEL (1 << 2)
  115. #define LPS_CLK_GEN_CGM_RTC_32K_AON_AUTO_GATE_SEL (1 << 3)
  116. #define LPS_CLK_GEN_CGM_RTC_32K_CP_AUTO_GATE_SEL (1 << 4)
  117. #define LPS_CLK_GEN_CGM_RC_26M_AP_AUTO_GATE_SEL (1 << 5)
  118. #define LPS_CLK_GEN_CGM_RTC_32K_AP_AUTO_GATE_SEL (1 << 6)
  119. // gate_en_sw_ctl0_cfg
  120. #define LPS_CLK_GEN_CGM_RC_26M_LPS_FORCE_EN (1 << 0)
  121. #define LPS_CLK_GEN_CGM_RTC_32K_LPS_FORCE_EN (1 << 1)
  122. #define LPS_CLK_GEN_CGM_RC_26M_AON_FORCE_EN (1 << 2)
  123. #define LPS_CLK_GEN_CGM_RTC_32K_AON_FORCE_EN (1 << 3)
  124. #define LPS_CLK_GEN_CGM_RTC_32K_CP_FORCE_EN (1 << 4)
  125. #define LPS_CLK_GEN_CGM_RC_26M_AP_FORCE_EN (1 << 5)
  126. #define LPS_CLK_GEN_CGM_RTC_32K_AP_FORCE_EN (1 << 6)
  127. // monitor_wait_en_status0_cfg
  128. #define LPS_CLK_GEN_MONITOR_WAIT_EN_STATUS (1 << 0)
  129. // monitor_gate_auto_en_status0_cfg
  130. #define LPS_CLK_GEN_MONITOR_GATE_AUTO_EN_STATUS(n) (((n)&0x7f) << 0)
  131. #endif // _LPS_CLK_GEN_H_