162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Copyright 2011 Advanced Micro Devices, Inc. 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 562306a36Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 662306a36Sopenharmony_ci * to deal in the Software without restriction, including without limitation 762306a36Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 862306a36Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 962306a36Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 1062306a36Sopenharmony_ci * 1162306a36Sopenharmony_ci * The above copyright notice and this permission notice shall be included in 1262306a36Sopenharmony_ci * all copies or substantial portions of the Software. 1362306a36Sopenharmony_ci * 1462306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1562306a36Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1662306a36Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1762306a36Sopenharmony_ci * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 1862306a36Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1962306a36Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2062306a36Sopenharmony_ci * OTHER DEALINGS IN THE SOFTWARE. 2162306a36Sopenharmony_ci * 2262306a36Sopenharmony_ci */ 2362306a36Sopenharmony_ci#ifndef RV740_H 2462306a36Sopenharmony_ci#define RV740_H 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci#define CG_SPLL_FUNC_CNTL 0x600 2762306a36Sopenharmony_ci#define SPLL_RESET (1 << 0) 2862306a36Sopenharmony_ci#define SPLL_SLEEP (1 << 1) 2962306a36Sopenharmony_ci#define SPLL_BYPASS_EN (1 << 3) 3062306a36Sopenharmony_ci#define SPLL_REF_DIV(x) ((x) << 4) 3162306a36Sopenharmony_ci#define SPLL_REF_DIV_MASK (0x3f << 4) 3262306a36Sopenharmony_ci#define SPLL_PDIV_A(x) ((x) << 20) 3362306a36Sopenharmony_ci#define SPLL_PDIV_A_MASK (0x7f << 20) 3462306a36Sopenharmony_ci#define CG_SPLL_FUNC_CNTL_2 0x604 3562306a36Sopenharmony_ci#define SCLK_MUX_SEL(x) ((x) << 0) 3662306a36Sopenharmony_ci#define SCLK_MUX_SEL_MASK (0x1ff << 0) 3762306a36Sopenharmony_ci#define CG_SPLL_FUNC_CNTL_3 0x608 3862306a36Sopenharmony_ci#define SPLL_FB_DIV(x) ((x) << 0) 3962306a36Sopenharmony_ci#define SPLL_FB_DIV_MASK (0x3ffffff << 0) 4062306a36Sopenharmony_ci#define SPLL_DITHEN (1 << 28) 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci#define MPLL_CNTL_MODE 0x61c 4362306a36Sopenharmony_ci#define SS_SSEN (1 << 24) 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci#define MPLL_AD_FUNC_CNTL 0x624 4662306a36Sopenharmony_ci#define CLKF(x) ((x) << 0) 4762306a36Sopenharmony_ci#define CLKF_MASK (0x7f << 0) 4862306a36Sopenharmony_ci#define CLKR(x) ((x) << 7) 4962306a36Sopenharmony_ci#define CLKR_MASK (0x1f << 7) 5062306a36Sopenharmony_ci#define CLKFRAC(x) ((x) << 12) 5162306a36Sopenharmony_ci#define CLKFRAC_MASK (0x1f << 12) 5262306a36Sopenharmony_ci#define YCLK_POST_DIV(x) ((x) << 17) 5362306a36Sopenharmony_ci#define YCLK_POST_DIV_MASK (3 << 17) 5462306a36Sopenharmony_ci#define IBIAS(x) ((x) << 20) 5562306a36Sopenharmony_ci#define IBIAS_MASK (0x3ff << 20) 5662306a36Sopenharmony_ci#define RESET (1 << 30) 5762306a36Sopenharmony_ci#define PDNB (1 << 31) 5862306a36Sopenharmony_ci#define MPLL_AD_FUNC_CNTL_2 0x628 5962306a36Sopenharmony_ci#define BYPASS (1 << 19) 6062306a36Sopenharmony_ci#define BIAS_GEN_PDNB (1 << 24) 6162306a36Sopenharmony_ci#define RESET_EN (1 << 25) 6262306a36Sopenharmony_ci#define VCO_MODE (1 << 29) 6362306a36Sopenharmony_ci#define MPLL_DQ_FUNC_CNTL 0x62c 6462306a36Sopenharmony_ci#define MPLL_DQ_FUNC_CNTL_2 0x630 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci#define MCLK_PWRMGT_CNTL 0x648 6762306a36Sopenharmony_ci#define DLL_SPEED(x) ((x) << 0) 6862306a36Sopenharmony_ci#define DLL_SPEED_MASK (0x1f << 0) 6962306a36Sopenharmony_ci# define MPLL_PWRMGT_OFF (1 << 5) 7062306a36Sopenharmony_ci# define DLL_READY (1 << 6) 7162306a36Sopenharmony_ci# define MC_INT_CNTL (1 << 7) 7262306a36Sopenharmony_ci# define MRDCKA0_SLEEP (1 << 8) 7362306a36Sopenharmony_ci# define MRDCKA1_SLEEP (1 << 9) 7462306a36Sopenharmony_ci# define MRDCKB0_SLEEP (1 << 10) 7562306a36Sopenharmony_ci# define MRDCKB1_SLEEP (1 << 11) 7662306a36Sopenharmony_ci# define MRDCKC0_SLEEP (1 << 12) 7762306a36Sopenharmony_ci# define MRDCKC1_SLEEP (1 << 13) 7862306a36Sopenharmony_ci# define MRDCKD0_SLEEP (1 << 14) 7962306a36Sopenharmony_ci# define MRDCKD1_SLEEP (1 << 15) 8062306a36Sopenharmony_ci# define MRDCKA0_RESET (1 << 16) 8162306a36Sopenharmony_ci# define MRDCKA1_RESET (1 << 17) 8262306a36Sopenharmony_ci# define MRDCKB0_RESET (1 << 18) 8362306a36Sopenharmony_ci# define MRDCKB1_RESET (1 << 19) 8462306a36Sopenharmony_ci# define MRDCKC0_RESET (1 << 20) 8562306a36Sopenharmony_ci# define MRDCKC1_RESET (1 << 21) 8662306a36Sopenharmony_ci# define MRDCKD0_RESET (1 << 22) 8762306a36Sopenharmony_ci# define MRDCKD1_RESET (1 << 23) 8862306a36Sopenharmony_ci# define DLL_READY_READ (1 << 24) 8962306a36Sopenharmony_ci# define USE_DISPLAY_GAP (1 << 25) 9062306a36Sopenharmony_ci# define USE_DISPLAY_URGENT_NORMAL (1 << 26) 9162306a36Sopenharmony_ci# define MPLL_TURNOFF_D2 (1 << 28) 9262306a36Sopenharmony_ci#define DLL_CNTL 0x64c 9362306a36Sopenharmony_ci# define MRDCKA0_BYPASS (1 << 24) 9462306a36Sopenharmony_ci# define MRDCKA1_BYPASS (1 << 25) 9562306a36Sopenharmony_ci# define MRDCKB0_BYPASS (1 << 26) 9662306a36Sopenharmony_ci# define MRDCKB1_BYPASS (1 << 27) 9762306a36Sopenharmony_ci# define MRDCKC0_BYPASS (1 << 28) 9862306a36Sopenharmony_ci# define MRDCKC1_BYPASS (1 << 29) 9962306a36Sopenharmony_ci# define MRDCKD0_BYPASS (1 << 30) 10062306a36Sopenharmony_ci# define MRDCKD1_BYPASS (1 << 31) 10162306a36Sopenharmony_ci 10262306a36Sopenharmony_ci#define CG_SPLL_SPREAD_SPECTRUM 0x790 10362306a36Sopenharmony_ci#define SSEN (1 << 0) 10462306a36Sopenharmony_ci#define CLK_S(x) ((x) << 4) 10562306a36Sopenharmony_ci#define CLK_S_MASK (0xfff << 4) 10662306a36Sopenharmony_ci#define CG_SPLL_SPREAD_SPECTRUM_2 0x794 10762306a36Sopenharmony_ci#define CLK_V(x) ((x) << 0) 10862306a36Sopenharmony_ci#define CLK_V_MASK (0x3ffffff << 0) 10962306a36Sopenharmony_ci 11062306a36Sopenharmony_ci#define MPLL_SS1 0x85c 11162306a36Sopenharmony_ci#define CLKV(x) ((x) << 0) 11262306a36Sopenharmony_ci#define CLKV_MASK (0x3ffffff << 0) 11362306a36Sopenharmony_ci#define MPLL_SS2 0x860 11462306a36Sopenharmony_ci#define CLKS(x) ((x) << 0) 11562306a36Sopenharmony_ci#define CLKS_MASK (0xfff << 0) 11662306a36Sopenharmony_ci 11762306a36Sopenharmony_ci#endif 118