i2c_bbpll.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. // Copyright 2020 Espressif Systems (Shanghai) PTE LTD
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #pragma once
  15. /**
  16. * @file i2c_apll.h
  17. * @brief Register definitions for digital PLL (BBPLL)
  18. *
  19. * This file lists register fields of BBPLL, located on an internal configuration
  20. * bus. These definitions are used via macros defined in i2c_rtc_clk.h, by
  21. * rtc_clk_cpu_freq_set function in rtc_clk.c.
  22. */
  23. #define I2C_BBPLL 0x66
  24. #define I2C_BBPLL_HOSTID 1
  25. #define I2C_BBPLL_IR_CAL_DELAY 0
  26. #define I2C_BBPLL_IR_CAL_DELAY_MSB 3
  27. #define I2C_BBPLL_IR_CAL_DELAY_LSB 0
  28. #define I2C_BBPLL_IR_CAL_CK_DIV 0
  29. #define I2C_BBPLL_IR_CAL_CK_DIV_MSB 7
  30. #define I2C_BBPLL_IR_CAL_CK_DIV_LSB 4
  31. #define I2C_BBPLL_IR_CAL_EXT_CAP 1
  32. #define I2C_BBPLL_IR_CAL_EXT_CAP_MSB 3
  33. #define I2C_BBPLL_IR_CAL_EXT_CAP_LSB 0
  34. #define I2C_BBPLL_IR_CAL_ENX_CAP 1
  35. #define I2C_BBPLL_IR_CAL_ENX_CAP_MSB 4
  36. #define I2C_BBPLL_IR_CAL_ENX_CAP_LSB 4
  37. #define I2C_BBPLL_IR_CAL_RSTB 1
  38. #define I2C_BBPLL_IR_CAL_RSTB_MSB 5
  39. #define I2C_BBPLL_IR_CAL_RSTB_LSB 5
  40. #define I2C_BBPLL_IR_CAL_START 1
  41. #define I2C_BBPLL_IR_CAL_START_MSB 6
  42. #define I2C_BBPLL_IR_CAL_START_LSB 6
  43. #define I2C_BBPLL_IR_CAL_UNSTOP 1
  44. #define I2C_BBPLL_IR_CAL_UNSTOP_MSB 7
  45. #define I2C_BBPLL_IR_CAL_UNSTOP_LSB 7
  46. #define I2C_BBPLL_OC_REF_DIV 2
  47. #define I2C_BBPLL_OC_REF_DIV_MSB 3
  48. #define I2C_BBPLL_OC_REF_DIV_LSB 0
  49. #define I2C_BBPLL_OC_DCHGP 2
  50. #define I2C_BBPLL_OC_DCHGP_MSB 6
  51. #define I2C_BBPLL_OC_DCHGP_LSB 4
  52. #define I2C_BBPLL_OC_ENB_FCAL 2
  53. #define I2C_BBPLL_OC_ENB_FCAL_MSB 7
  54. #define I2C_BBPLL_OC_ENB_FCAL_LSB 7
  55. #define I2C_BBPLL_OC_DIV_7_0 3
  56. #define I2C_BBPLL_OC_DIV_7_0_MSB 7
  57. #define I2C_BBPLL_OC_DIV_7_0_LSB 0
  58. #define I2C_BBPLL_RSTB_DIV_ADC 4
  59. #define I2C_BBPLL_RSTB_DIV_ADC_MSB 0
  60. #define I2C_BBPLL_RSTB_DIV_ADC_LSB 0
  61. #define I2C_BBPLL_MODE_HF 4
  62. #define I2C_BBPLL_MODE_HF_MSB 1
  63. #define I2C_BBPLL_MODE_HF_LSB 1
  64. #define I2C_BBPLL_DIV_ADC 4
  65. #define I2C_BBPLL_DIV_ADC_MSB 3
  66. #define I2C_BBPLL_DIV_ADC_LSB 2
  67. #define I2C_BBPLL_DIV_DAC 4
  68. #define I2C_BBPLL_DIV_DAC_MSB 4
  69. #define I2C_BBPLL_DIV_DAC_LSB 4
  70. #define I2C_BBPLL_DIV_CPU 4
  71. #define I2C_BBPLL_DIV_CPU_MSB 5
  72. #define I2C_BBPLL_DIV_CPU_LSB 5
  73. #define I2C_BBPLL_OC_ENB_VCON 4
  74. #define I2C_BBPLL_OC_ENB_VCON_MSB 6
  75. #define I2C_BBPLL_OC_ENB_VCON_LSB 6
  76. #define I2C_BBPLL_OC_TSCHGP 4
  77. #define I2C_BBPLL_OC_TSCHGP_MSB 7
  78. #define I2C_BBPLL_OC_TSCHGP_LSB 7
  79. #define I2C_BBPLL_OC_DR1 5
  80. #define I2C_BBPLL_OC_DR1_MSB 2
  81. #define I2C_BBPLL_OC_DR1_LSB 0
  82. #define I2C_BBPLL_OC_DR3 5
  83. #define I2C_BBPLL_OC_DR3_MSB 6
  84. #define I2C_BBPLL_OC_DR3_LSB 4
  85. #define I2C_BBPLL_EN_USB 5
  86. #define I2C_BBPLL_EN_USB_MSB 7
  87. #define I2C_BBPLL_EN_USB_LSB 7
  88. #define I2C_BBPLL_OC_DCUR 6
  89. #define I2C_BBPLL_OC_DCUR_MSB 2
  90. #define I2C_BBPLL_OC_DCUR_LSB 0
  91. #define I2C_BBPLL_INC_CUR 6
  92. #define I2C_BBPLL_INC_CUR_MSB 3
  93. #define I2C_BBPLL_INC_CUR_LSB 3
  94. #define I2C_BBPLL_OC_DHREF_SEL 6
  95. #define I2C_BBPLL_OC_DHREF_SEL_MSB 5
  96. #define I2C_BBPLL_OC_DHREF_SEL_LSB 4
  97. #define I2C_BBPLL_OC_DLREF_SEL 6
  98. #define I2C_BBPLL_OC_DLREF_SEL_MSB 7
  99. #define I2C_BBPLL_OC_DLREF_SEL_LSB 6
  100. #define I2C_BBPLL_OR_CAL_CAP 8
  101. #define I2C_BBPLL_OR_CAL_CAP_MSB 3
  102. #define I2C_BBPLL_OR_CAL_CAP_LSB 0
  103. #define I2C_BBPLL_OR_CAL_UDF 8
  104. #define I2C_BBPLL_OR_CAL_UDF_MSB 4
  105. #define I2C_BBPLL_OR_CAL_UDF_LSB 4
  106. #define I2C_BBPLL_OR_CAL_OVF 8
  107. #define I2C_BBPLL_OR_CAL_OVF_MSB 5
  108. #define I2C_BBPLL_OR_CAL_OVF_LSB 5
  109. #define I2C_BBPLL_OR_CAL_END 8
  110. #define I2C_BBPLL_OR_CAL_END_MSB 6
  111. #define I2C_BBPLL_OR_CAL_END_LSB 6
  112. #define I2C_BBPLL_OR_LOCK 8
  113. #define I2C_BBPLL_OR_LOCK_MSB 7
  114. #define I2C_BBPLL_OR_LOCK_LSB 7
  115. #define I2C_BBPLL_BBADC_DELAY1 9
  116. #define I2C_BBPLL_BBADC_DELAY1_MSB 1
  117. #define I2C_BBPLL_BBADC_DELAY1_LSB 0
  118. #define I2C_BBPLL_BBADC_DELAY2 9
  119. #define I2C_BBPLL_BBADC_DELAY2_MSB 3
  120. #define I2C_BBPLL_BBADC_DELAY2_LSB 2
  121. #define I2C_BBPLL_BBADC_DVDD 9
  122. #define I2C_BBPLL_BBADC_DVDD_MSB 5
  123. #define I2C_BBPLL_BBADC_DVDD_LSB 4
  124. #define I2C_BBPLL_BBADC_DREF 9
  125. #define I2C_BBPLL_BBADC_DREF_MSB 7
  126. #define I2C_BBPLL_BBADC_DREF_LSB 6
  127. #define I2C_BBPLL_BBADC_DCUR 10
  128. #define I2C_BBPLL_BBADC_DCUR_MSB 1
  129. #define I2C_BBPLL_BBADC_DCUR_LSB 0
  130. #define I2C_BBPLL_BBADC_INPUT_SHORT 10
  131. #define I2C_BBPLL_BBADC_INPUT_SHORT_MSB 2
  132. #define I2C_BBPLL_BBADC_INPUT_SHORT_LSB 2
  133. #define I2C_BBPLL_ENT_PLL 10
  134. #define I2C_BBPLL_ENT_PLL_MSB 3
  135. #define I2C_BBPLL_ENT_PLL_LSB 3
  136. #define I2C_BBPLL_DTEST 10
  137. #define I2C_BBPLL_DTEST_MSB 5
  138. #define I2C_BBPLL_DTEST_LSB 4
  139. #define I2C_BBPLL_ENT_ADC 10
  140. #define I2C_BBPLL_ENT_ADC_MSB 7
  141. #define I2C_BBPLL_ENT_ADC_LSB 6