18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright 2011 Advanced Micro Devices, Inc. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 58c2ecf20Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 68c2ecf20Sopenharmony_ci * to deal in the Software without restriction, including without limitation 78c2ecf20Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 88c2ecf20Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 98c2ecf20Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice shall be included in 128c2ecf20Sopenharmony_ci * all copies or substantial portions of the Software. 138c2ecf20Sopenharmony_ci * 148c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 158c2ecf20Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 168c2ecf20Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 178c2ecf20Sopenharmony_ci * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 188c2ecf20Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 198c2ecf20Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 208c2ecf20Sopenharmony_ci * OTHER DEALINGS IN THE SOFTWARE. 218c2ecf20Sopenharmony_ci * 228c2ecf20Sopenharmony_ci */ 238c2ecf20Sopenharmony_ci#ifndef RV740_H 248c2ecf20Sopenharmony_ci#define RV740_H 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define CG_SPLL_FUNC_CNTL 0x600 278c2ecf20Sopenharmony_ci#define SPLL_RESET (1 << 0) 288c2ecf20Sopenharmony_ci#define SPLL_SLEEP (1 << 1) 298c2ecf20Sopenharmony_ci#define SPLL_BYPASS_EN (1 << 3) 308c2ecf20Sopenharmony_ci#define SPLL_REF_DIV(x) ((x) << 4) 318c2ecf20Sopenharmony_ci#define SPLL_REF_DIV_MASK (0x3f << 4) 328c2ecf20Sopenharmony_ci#define SPLL_PDIV_A(x) ((x) << 20) 338c2ecf20Sopenharmony_ci#define SPLL_PDIV_A_MASK (0x7f << 20) 348c2ecf20Sopenharmony_ci#define CG_SPLL_FUNC_CNTL_2 0x604 358c2ecf20Sopenharmony_ci#define SCLK_MUX_SEL(x) ((x) << 0) 368c2ecf20Sopenharmony_ci#define SCLK_MUX_SEL_MASK (0x1ff << 0) 378c2ecf20Sopenharmony_ci#define CG_SPLL_FUNC_CNTL_3 0x608 388c2ecf20Sopenharmony_ci#define SPLL_FB_DIV(x) ((x) << 0) 398c2ecf20Sopenharmony_ci#define SPLL_FB_DIV_MASK (0x3ffffff << 0) 408c2ecf20Sopenharmony_ci#define SPLL_DITHEN (1 << 28) 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci#define MPLL_CNTL_MODE 0x61c 438c2ecf20Sopenharmony_ci#define SS_SSEN (1 << 24) 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci#define MPLL_AD_FUNC_CNTL 0x624 468c2ecf20Sopenharmony_ci#define CLKF(x) ((x) << 0) 478c2ecf20Sopenharmony_ci#define CLKF_MASK (0x7f << 0) 488c2ecf20Sopenharmony_ci#define CLKR(x) ((x) << 7) 498c2ecf20Sopenharmony_ci#define CLKR_MASK (0x1f << 7) 508c2ecf20Sopenharmony_ci#define CLKFRAC(x) ((x) << 12) 518c2ecf20Sopenharmony_ci#define CLKFRAC_MASK (0x1f << 12) 528c2ecf20Sopenharmony_ci#define YCLK_POST_DIV(x) ((x) << 17) 538c2ecf20Sopenharmony_ci#define YCLK_POST_DIV_MASK (3 << 17) 548c2ecf20Sopenharmony_ci#define IBIAS(x) ((x) << 20) 558c2ecf20Sopenharmony_ci#define IBIAS_MASK (0x3ff << 20) 568c2ecf20Sopenharmony_ci#define RESET (1 << 30) 578c2ecf20Sopenharmony_ci#define PDNB (1 << 31) 588c2ecf20Sopenharmony_ci#define MPLL_AD_FUNC_CNTL_2 0x628 598c2ecf20Sopenharmony_ci#define BYPASS (1 << 19) 608c2ecf20Sopenharmony_ci#define BIAS_GEN_PDNB (1 << 24) 618c2ecf20Sopenharmony_ci#define RESET_EN (1 << 25) 628c2ecf20Sopenharmony_ci#define VCO_MODE (1 << 29) 638c2ecf20Sopenharmony_ci#define MPLL_DQ_FUNC_CNTL 0x62c 648c2ecf20Sopenharmony_ci#define MPLL_DQ_FUNC_CNTL_2 0x630 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci#define MCLK_PWRMGT_CNTL 0x648 678c2ecf20Sopenharmony_ci#define DLL_SPEED(x) ((x) << 0) 688c2ecf20Sopenharmony_ci#define DLL_SPEED_MASK (0x1f << 0) 698c2ecf20Sopenharmony_ci# define MPLL_PWRMGT_OFF (1 << 5) 708c2ecf20Sopenharmony_ci# define DLL_READY (1 << 6) 718c2ecf20Sopenharmony_ci# define MC_INT_CNTL (1 << 7) 728c2ecf20Sopenharmony_ci# define MRDCKA0_SLEEP (1 << 8) 738c2ecf20Sopenharmony_ci# define MRDCKA1_SLEEP (1 << 9) 748c2ecf20Sopenharmony_ci# define MRDCKB0_SLEEP (1 << 10) 758c2ecf20Sopenharmony_ci# define MRDCKB1_SLEEP (1 << 11) 768c2ecf20Sopenharmony_ci# define MRDCKC0_SLEEP (1 << 12) 778c2ecf20Sopenharmony_ci# define MRDCKC1_SLEEP (1 << 13) 788c2ecf20Sopenharmony_ci# define MRDCKD0_SLEEP (1 << 14) 798c2ecf20Sopenharmony_ci# define MRDCKD1_SLEEP (1 << 15) 808c2ecf20Sopenharmony_ci# define MRDCKA0_RESET (1 << 16) 818c2ecf20Sopenharmony_ci# define MRDCKA1_RESET (1 << 17) 828c2ecf20Sopenharmony_ci# define MRDCKB0_RESET (1 << 18) 838c2ecf20Sopenharmony_ci# define MRDCKB1_RESET (1 << 19) 848c2ecf20Sopenharmony_ci# define MRDCKC0_RESET (1 << 20) 858c2ecf20Sopenharmony_ci# define MRDCKC1_RESET (1 << 21) 868c2ecf20Sopenharmony_ci# define MRDCKD0_RESET (1 << 22) 878c2ecf20Sopenharmony_ci# define MRDCKD1_RESET (1 << 23) 888c2ecf20Sopenharmony_ci# define DLL_READY_READ (1 << 24) 898c2ecf20Sopenharmony_ci# define USE_DISPLAY_GAP (1 << 25) 908c2ecf20Sopenharmony_ci# define USE_DISPLAY_URGENT_NORMAL (1 << 26) 918c2ecf20Sopenharmony_ci# define MPLL_TURNOFF_D2 (1 << 28) 928c2ecf20Sopenharmony_ci#define DLL_CNTL 0x64c 938c2ecf20Sopenharmony_ci# define MRDCKA0_BYPASS (1 << 24) 948c2ecf20Sopenharmony_ci# define MRDCKA1_BYPASS (1 << 25) 958c2ecf20Sopenharmony_ci# define MRDCKB0_BYPASS (1 << 26) 968c2ecf20Sopenharmony_ci# define MRDCKB1_BYPASS (1 << 27) 978c2ecf20Sopenharmony_ci# define MRDCKC0_BYPASS (1 << 28) 988c2ecf20Sopenharmony_ci# define MRDCKC1_BYPASS (1 << 29) 998c2ecf20Sopenharmony_ci# define MRDCKD0_BYPASS (1 << 30) 1008c2ecf20Sopenharmony_ci# define MRDCKD1_BYPASS (1 << 31) 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ci#define CG_SPLL_SPREAD_SPECTRUM 0x790 1038c2ecf20Sopenharmony_ci#define SSEN (1 << 0) 1048c2ecf20Sopenharmony_ci#define CLK_S(x) ((x) << 4) 1058c2ecf20Sopenharmony_ci#define CLK_S_MASK (0xfff << 4) 1068c2ecf20Sopenharmony_ci#define CG_SPLL_SPREAD_SPECTRUM_2 0x794 1078c2ecf20Sopenharmony_ci#define CLK_V(x) ((x) << 0) 1088c2ecf20Sopenharmony_ci#define CLK_V_MASK (0x3ffffff << 0) 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_ci#define MPLL_SS1 0x85c 1118c2ecf20Sopenharmony_ci#define CLKV(x) ((x) << 0) 1128c2ecf20Sopenharmony_ci#define CLKV_MASK (0x3ffffff << 0) 1138c2ecf20Sopenharmony_ci#define MPLL_SS2 0x860 1148c2ecf20Sopenharmony_ci#define CLKS(x) ((x) << 0) 1158c2ecf20Sopenharmony_ci#define CLKS_MASK (0xfff << 0) 1168c2ecf20Sopenharmony_ci 1178c2ecf20Sopenharmony_ci#endif 118