rv730d.h 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. /*
  2. * Copyright 2011 Advanced Micro Devices, Inc.
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  17. * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
  18. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  19. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  20. * OTHER DEALINGS IN THE SOFTWARE.
  21. *
  22. */
  23. #ifndef RV730_H
  24. #define RV730_H
  25. #define CG_SPLL_FUNC_CNTL 0x600
  26. #define SPLL_RESET (1 << 0)
  27. #define SPLL_SLEEP (1 << 1)
  28. #define SPLL_DIVEN (1 << 2)
  29. #define SPLL_BYPASS_EN (1 << 3)
  30. #define SPLL_REF_DIV(x) ((x) << 4)
  31. #define SPLL_REF_DIV_MASK (0x3f << 4)
  32. #define SPLL_HILEN(x) ((x) << 12)
  33. #define SPLL_HILEN_MASK (0xf << 12)
  34. #define SPLL_LOLEN(x) ((x) << 16)
  35. #define SPLL_LOLEN_MASK (0xf << 16)
  36. #define CG_SPLL_FUNC_CNTL_2 0x604
  37. #define SCLK_MUX_SEL(x) ((x) << 0)
  38. #define SCLK_MUX_SEL_MASK (0x1ff << 0)
  39. #define CG_SPLL_FUNC_CNTL_3 0x608
  40. #define SPLL_FB_DIV(x) ((x) << 0)
  41. #define SPLL_FB_DIV_MASK (0x3ffffff << 0)
  42. #define SPLL_DITHEN (1 << 28)
  43. #define CG_MPLL_FUNC_CNTL 0x624
  44. #define MPLL_RESET (1 << 0)
  45. #define MPLL_SLEEP (1 << 1)
  46. #define MPLL_DIVEN (1 << 2)
  47. #define MPLL_BYPASS_EN (1 << 3)
  48. #define MPLL_REF_DIV(x) ((x) << 4)
  49. #define MPLL_REF_DIV_MASK (0x3f << 4)
  50. #define MPLL_HILEN(x) ((x) << 12)
  51. #define MPLL_HILEN_MASK (0xf << 12)
  52. #define MPLL_LOLEN(x) ((x) << 16)
  53. #define MPLL_LOLEN_MASK (0xf << 16)
  54. #define CG_MPLL_FUNC_CNTL_2 0x628
  55. #define MCLK_MUX_SEL(x) ((x) << 0)
  56. #define MCLK_MUX_SEL_MASK (0x1ff << 0)
  57. #define CG_MPLL_FUNC_CNTL_3 0x62c
  58. #define MPLL_FB_DIV(x) ((x) << 0)
  59. #define MPLL_FB_DIV_MASK (0x3ffffff << 0)
  60. #define MPLL_DITHEN (1 << 28)
  61. #define CG_TCI_MPLL_SPREAD_SPECTRUM 0x634
  62. #define CG_TCI_MPLL_SPREAD_SPECTRUM_2 0x638
  63. #define GENERAL_PWRMGT 0x63c
  64. # define GLOBAL_PWRMGT_EN (1 << 0)
  65. # define STATIC_PM_EN (1 << 1)
  66. # define THERMAL_PROTECTION_DIS (1 << 2)
  67. # define THERMAL_PROTECTION_TYPE (1 << 3)
  68. # define ENABLE_GEN2PCIE (1 << 4)
  69. # define ENABLE_GEN2XSP (1 << 5)
  70. # define SW_SMIO_INDEX(x) ((x) << 6)
  71. # define SW_SMIO_INDEX_MASK (3 << 6)
  72. # define LOW_VOLT_D2_ACPI (1 << 8)
  73. # define LOW_VOLT_D3_ACPI (1 << 9)
  74. # define VOLT_PWRMGT_EN (1 << 10)
  75. # define BACKBIAS_PAD_EN (1 << 18)
  76. # define BACKBIAS_VALUE (1 << 19)
  77. # define DYN_SPREAD_SPECTRUM_EN (1 << 23)
  78. # define AC_DC_SW (1 << 24)
  79. #define SCLK_PWRMGT_CNTL 0x644
  80. # define SCLK_PWRMGT_OFF (1 << 0)
  81. # define SCLK_LOW_D1 (1 << 1)
  82. # define FIR_RESET (1 << 4)
  83. # define FIR_FORCE_TREND_SEL (1 << 5)
  84. # define FIR_TREND_MODE (1 << 6)
  85. # define DYN_GFX_CLK_OFF_EN (1 << 7)
  86. # define GFX_CLK_FORCE_ON (1 << 8)
  87. # define GFX_CLK_REQUEST_OFF (1 << 9)
  88. # define GFX_CLK_FORCE_OFF (1 << 10)
  89. # define GFX_CLK_OFF_ACPI_D1 (1 << 11)
  90. # define GFX_CLK_OFF_ACPI_D2 (1 << 12)
  91. # define GFX_CLK_OFF_ACPI_D3 (1 << 13)
  92. #define TCI_MCLK_PWRMGT_CNTL 0x648
  93. # define MPLL_PWRMGT_OFF (1 << 5)
  94. # define DLL_READY (1 << 6)
  95. # define MC_INT_CNTL (1 << 7)
  96. # define MRDCKA_SLEEP (1 << 8)
  97. # define MRDCKB_SLEEP (1 << 9)
  98. # define MRDCKC_SLEEP (1 << 10)
  99. # define MRDCKD_SLEEP (1 << 11)
  100. # define MRDCKE_SLEEP (1 << 12)
  101. # define MRDCKF_SLEEP (1 << 13)
  102. # define MRDCKG_SLEEP (1 << 14)
  103. # define MRDCKH_SLEEP (1 << 15)
  104. # define MRDCKA_RESET (1 << 16)
  105. # define MRDCKB_RESET (1 << 17)
  106. # define MRDCKC_RESET (1 << 18)
  107. # define MRDCKD_RESET (1 << 19)
  108. # define MRDCKE_RESET (1 << 20)
  109. # define MRDCKF_RESET (1 << 21)
  110. # define MRDCKG_RESET (1 << 22)
  111. # define MRDCKH_RESET (1 << 23)
  112. # define DLL_READY_READ (1 << 24)
  113. # define USE_DISPLAY_GAP (1 << 25)
  114. # define USE_DISPLAY_URGENT_NORMAL (1 << 26)
  115. # define MPLL_TURNOFF_D2 (1 << 28)
  116. #define TCI_DLL_CNTL 0x64c
  117. #define CG_PG_CNTL 0x858
  118. # define PWRGATE_ENABLE (1 << 0)
  119. #define CG_AT 0x6d4
  120. #define CG_R(x) ((x) << 0)
  121. #define CG_R_MASK (0xffff << 0)
  122. #define CG_L(x) ((x) << 16)
  123. #define CG_L_MASK (0xffff << 16)
  124. #define CG_SPLL_SPREAD_SPECTRUM 0x790
  125. #define SSEN (1 << 0)
  126. #define CLK_S(x) ((x) << 4)
  127. #define CLK_S_MASK (0xfff << 4)
  128. #define CG_SPLL_SPREAD_SPECTRUM_2 0x794
  129. #define CLK_V(x) ((x) << 0)
  130. #define CLK_V_MASK (0x3ffffff << 0)
  131. #define MC_ARB_DRAM_TIMING 0x2774
  132. #define MC_ARB_DRAM_TIMING2 0x2778
  133. #define MC_ARB_RFSH_RATE 0x27b0
  134. #define POWERMODE0(x) ((x) << 0)
  135. #define POWERMODE0_MASK (0xff << 0)
  136. #define POWERMODE1(x) ((x) << 8)
  137. #define POWERMODE1_MASK (0xff << 8)
  138. #define POWERMODE2(x) ((x) << 16)
  139. #define POWERMODE2_MASK (0xff << 16)
  140. #define POWERMODE3(x) ((x) << 24)
  141. #define POWERMODE3_MASK (0xff << 24)
  142. #define MC_ARB_DRAM_TIMING_1 0x27f0
  143. #define MC_ARB_DRAM_TIMING_2 0x27f4
  144. #define MC_ARB_DRAM_TIMING_3 0x27f8
  145. #define MC_ARB_DRAM_TIMING2_1 0x27fc
  146. #define MC_ARB_DRAM_TIMING2_2 0x2800
  147. #define MC_ARB_DRAM_TIMING2_3 0x2804
  148. #define MC4_IO_DQ_PAD_CNTL_D0_I0 0x2978
  149. #define MC4_IO_DQ_PAD_CNTL_D0_I1 0x297c
  150. #define MC4_IO_QS_PAD_CNTL_D0_I0 0x2980
  151. #define MC4_IO_QS_PAD_CNTL_D0_I1 0x2984
  152. #endif