rv740d.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 RV740_H
  24. #define RV740_H
  25. #define CG_SPLL_FUNC_CNTL 0x600
  26. #define SPLL_RESET (1 << 0)
  27. #define SPLL_SLEEP (1 << 1)
  28. #define SPLL_BYPASS_EN (1 << 3)
  29. #define SPLL_REF_DIV(x) ((x) << 4)
  30. #define SPLL_REF_DIV_MASK (0x3f << 4)
  31. #define SPLL_PDIV_A(x) ((x) << 20)
  32. #define SPLL_PDIV_A_MASK (0x7f << 20)
  33. #define CG_SPLL_FUNC_CNTL_2 0x604
  34. #define SCLK_MUX_SEL(x) ((x) << 0)
  35. #define SCLK_MUX_SEL_MASK (0x1ff << 0)
  36. #define CG_SPLL_FUNC_CNTL_3 0x608
  37. #define SPLL_FB_DIV(x) ((x) << 0)
  38. #define SPLL_FB_DIV_MASK (0x3ffffff << 0)
  39. #define SPLL_DITHEN (1 << 28)
  40. #define MPLL_CNTL_MODE 0x61c
  41. #define SS_SSEN (1 << 24)
  42. #define MPLL_AD_FUNC_CNTL 0x624
  43. #define CLKF(x) ((x) << 0)
  44. #define CLKF_MASK (0x7f << 0)
  45. #define CLKR(x) ((x) << 7)
  46. #define CLKR_MASK (0x1f << 7)
  47. #define CLKFRAC(x) ((x) << 12)
  48. #define CLKFRAC_MASK (0x1f << 12)
  49. #define YCLK_POST_DIV(x) ((x) << 17)
  50. #define YCLK_POST_DIV_MASK (3 << 17)
  51. #define IBIAS(x) ((x) << 20)
  52. #define IBIAS_MASK (0x3ff << 20)
  53. #define RESET (1 << 30)
  54. #define PDNB (1 << 31)
  55. #define MPLL_AD_FUNC_CNTL_2 0x628
  56. #define BYPASS (1 << 19)
  57. #define BIAS_GEN_PDNB (1 << 24)
  58. #define RESET_EN (1 << 25)
  59. #define VCO_MODE (1 << 29)
  60. #define MPLL_DQ_FUNC_CNTL 0x62c
  61. #define MPLL_DQ_FUNC_CNTL_2 0x630
  62. #define MCLK_PWRMGT_CNTL 0x648
  63. #define DLL_SPEED(x) ((x) << 0)
  64. #define DLL_SPEED_MASK (0x1f << 0)
  65. # define MPLL_PWRMGT_OFF (1 << 5)
  66. # define DLL_READY (1 << 6)
  67. # define MC_INT_CNTL (1 << 7)
  68. # define MRDCKA0_SLEEP (1 << 8)
  69. # define MRDCKA1_SLEEP (1 << 9)
  70. # define MRDCKB0_SLEEP (1 << 10)
  71. # define MRDCKB1_SLEEP (1 << 11)
  72. # define MRDCKC0_SLEEP (1 << 12)
  73. # define MRDCKC1_SLEEP (1 << 13)
  74. # define MRDCKD0_SLEEP (1 << 14)
  75. # define MRDCKD1_SLEEP (1 << 15)
  76. # define MRDCKA0_RESET (1 << 16)
  77. # define MRDCKA1_RESET (1 << 17)
  78. # define MRDCKB0_RESET (1 << 18)
  79. # define MRDCKB1_RESET (1 << 19)
  80. # define MRDCKC0_RESET (1 << 20)
  81. # define MRDCKC1_RESET (1 << 21)
  82. # define MRDCKD0_RESET (1 << 22)
  83. # define MRDCKD1_RESET (1 << 23)
  84. # define DLL_READY_READ (1 << 24)
  85. # define USE_DISPLAY_GAP (1 << 25)
  86. # define USE_DISPLAY_URGENT_NORMAL (1 << 26)
  87. # define MPLL_TURNOFF_D2 (1 << 28)
  88. #define DLL_CNTL 0x64c
  89. # define MRDCKA0_BYPASS (1 << 24)
  90. # define MRDCKA1_BYPASS (1 << 25)
  91. # define MRDCKB0_BYPASS (1 << 26)
  92. # define MRDCKB1_BYPASS (1 << 27)
  93. # define MRDCKC0_BYPASS (1 << 28)
  94. # define MRDCKC1_BYPASS (1 << 29)
  95. # define MRDCKD0_BYPASS (1 << 30)
  96. # define MRDCKD1_BYPASS (1 << 31)
  97. #define CG_SPLL_SPREAD_SPECTRUM 0x790
  98. #define SSEN (1 << 0)
  99. #define CLK_S(x) ((x) << 4)
  100. #define CLK_S_MASK (0xfff << 4)
  101. #define CG_SPLL_SPREAD_SPECTRUM_2 0x794
  102. #define CLK_V(x) ((x) << 0)
  103. #define CLK_V_MASK (0x3ffffff << 0)
  104. #define MPLL_SS1 0x85c
  105. #define CLKV(x) ((x) << 0)
  106. #define CLKV_MASK (0x3ffffff << 0)
  107. #define MPLL_SS2 0x860
  108. #define CLKS(x) ((x) << 0)
  109. #define CLKS_MASK (0xfff << 0)
  110. #endif