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 RV730_H 2462306a36Sopenharmony_ci#define RV730_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_DIVEN (1 << 2) 3062306a36Sopenharmony_ci#define SPLL_BYPASS_EN (1 << 3) 3162306a36Sopenharmony_ci#define SPLL_REF_DIV(x) ((x) << 4) 3262306a36Sopenharmony_ci#define SPLL_REF_DIV_MASK (0x3f << 4) 3362306a36Sopenharmony_ci#define SPLL_HILEN(x) ((x) << 12) 3462306a36Sopenharmony_ci#define SPLL_HILEN_MASK (0xf << 12) 3562306a36Sopenharmony_ci#define SPLL_LOLEN(x) ((x) << 16) 3662306a36Sopenharmony_ci#define SPLL_LOLEN_MASK (0xf << 16) 3762306a36Sopenharmony_ci#define CG_SPLL_FUNC_CNTL_2 0x604 3862306a36Sopenharmony_ci#define SCLK_MUX_SEL(x) ((x) << 0) 3962306a36Sopenharmony_ci#define SCLK_MUX_SEL_MASK (0x1ff << 0) 4062306a36Sopenharmony_ci#define CG_SPLL_FUNC_CNTL_3 0x608 4162306a36Sopenharmony_ci#define SPLL_FB_DIV(x) ((x) << 0) 4262306a36Sopenharmony_ci#define SPLL_FB_DIV_MASK (0x3ffffff << 0) 4362306a36Sopenharmony_ci#define SPLL_DITHEN (1 << 28) 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci#define CG_MPLL_FUNC_CNTL 0x624 4662306a36Sopenharmony_ci#define MPLL_RESET (1 << 0) 4762306a36Sopenharmony_ci#define MPLL_SLEEP (1 << 1) 4862306a36Sopenharmony_ci#define MPLL_DIVEN (1 << 2) 4962306a36Sopenharmony_ci#define MPLL_BYPASS_EN (1 << 3) 5062306a36Sopenharmony_ci#define MPLL_REF_DIV(x) ((x) << 4) 5162306a36Sopenharmony_ci#define MPLL_REF_DIV_MASK (0x3f << 4) 5262306a36Sopenharmony_ci#define MPLL_HILEN(x) ((x) << 12) 5362306a36Sopenharmony_ci#define MPLL_HILEN_MASK (0xf << 12) 5462306a36Sopenharmony_ci#define MPLL_LOLEN(x) ((x) << 16) 5562306a36Sopenharmony_ci#define MPLL_LOLEN_MASK (0xf << 16) 5662306a36Sopenharmony_ci#define CG_MPLL_FUNC_CNTL_2 0x628 5762306a36Sopenharmony_ci#define MCLK_MUX_SEL(x) ((x) << 0) 5862306a36Sopenharmony_ci#define MCLK_MUX_SEL_MASK (0x1ff << 0) 5962306a36Sopenharmony_ci#define CG_MPLL_FUNC_CNTL_3 0x62c 6062306a36Sopenharmony_ci#define MPLL_FB_DIV(x) ((x) << 0) 6162306a36Sopenharmony_ci#define MPLL_FB_DIV_MASK (0x3ffffff << 0) 6262306a36Sopenharmony_ci#define MPLL_DITHEN (1 << 28) 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci#define CG_TCI_MPLL_SPREAD_SPECTRUM 0x634 6562306a36Sopenharmony_ci#define CG_TCI_MPLL_SPREAD_SPECTRUM_2 0x638 6662306a36Sopenharmony_ci#define GENERAL_PWRMGT 0x63c 6762306a36Sopenharmony_ci# define GLOBAL_PWRMGT_EN (1 << 0) 6862306a36Sopenharmony_ci# define STATIC_PM_EN (1 << 1) 6962306a36Sopenharmony_ci# define THERMAL_PROTECTION_DIS (1 << 2) 7062306a36Sopenharmony_ci# define THERMAL_PROTECTION_TYPE (1 << 3) 7162306a36Sopenharmony_ci# define ENABLE_GEN2PCIE (1 << 4) 7262306a36Sopenharmony_ci# define ENABLE_GEN2XSP (1 << 5) 7362306a36Sopenharmony_ci# define SW_SMIO_INDEX(x) ((x) << 6) 7462306a36Sopenharmony_ci# define SW_SMIO_INDEX_MASK (3 << 6) 7562306a36Sopenharmony_ci# define LOW_VOLT_D2_ACPI (1 << 8) 7662306a36Sopenharmony_ci# define LOW_VOLT_D3_ACPI (1 << 9) 7762306a36Sopenharmony_ci# define VOLT_PWRMGT_EN (1 << 10) 7862306a36Sopenharmony_ci# define BACKBIAS_PAD_EN (1 << 18) 7962306a36Sopenharmony_ci# define BACKBIAS_VALUE (1 << 19) 8062306a36Sopenharmony_ci# define DYN_SPREAD_SPECTRUM_EN (1 << 23) 8162306a36Sopenharmony_ci# define AC_DC_SW (1 << 24) 8262306a36Sopenharmony_ci 8362306a36Sopenharmony_ci#define SCLK_PWRMGT_CNTL 0x644 8462306a36Sopenharmony_ci# define SCLK_PWRMGT_OFF (1 << 0) 8562306a36Sopenharmony_ci# define SCLK_LOW_D1 (1 << 1) 8662306a36Sopenharmony_ci# define FIR_RESET (1 << 4) 8762306a36Sopenharmony_ci# define FIR_FORCE_TREND_SEL (1 << 5) 8862306a36Sopenharmony_ci# define FIR_TREND_MODE (1 << 6) 8962306a36Sopenharmony_ci# define DYN_GFX_CLK_OFF_EN (1 << 7) 9062306a36Sopenharmony_ci# define GFX_CLK_FORCE_ON (1 << 8) 9162306a36Sopenharmony_ci# define GFX_CLK_REQUEST_OFF (1 << 9) 9262306a36Sopenharmony_ci# define GFX_CLK_FORCE_OFF (1 << 10) 9362306a36Sopenharmony_ci# define GFX_CLK_OFF_ACPI_D1 (1 << 11) 9462306a36Sopenharmony_ci# define GFX_CLK_OFF_ACPI_D2 (1 << 12) 9562306a36Sopenharmony_ci# define GFX_CLK_OFF_ACPI_D3 (1 << 13) 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci#define TCI_MCLK_PWRMGT_CNTL 0x648 9862306a36Sopenharmony_ci# define MPLL_PWRMGT_OFF (1 << 5) 9962306a36Sopenharmony_ci# define DLL_READY (1 << 6) 10062306a36Sopenharmony_ci# define MC_INT_CNTL (1 << 7) 10162306a36Sopenharmony_ci# define MRDCKA_SLEEP (1 << 8) 10262306a36Sopenharmony_ci# define MRDCKB_SLEEP (1 << 9) 10362306a36Sopenharmony_ci# define MRDCKC_SLEEP (1 << 10) 10462306a36Sopenharmony_ci# define MRDCKD_SLEEP (1 << 11) 10562306a36Sopenharmony_ci# define MRDCKE_SLEEP (1 << 12) 10662306a36Sopenharmony_ci# define MRDCKF_SLEEP (1 << 13) 10762306a36Sopenharmony_ci# define MRDCKG_SLEEP (1 << 14) 10862306a36Sopenharmony_ci# define MRDCKH_SLEEP (1 << 15) 10962306a36Sopenharmony_ci# define MRDCKA_RESET (1 << 16) 11062306a36Sopenharmony_ci# define MRDCKB_RESET (1 << 17) 11162306a36Sopenharmony_ci# define MRDCKC_RESET (1 << 18) 11262306a36Sopenharmony_ci# define MRDCKD_RESET (1 << 19) 11362306a36Sopenharmony_ci# define MRDCKE_RESET (1 << 20) 11462306a36Sopenharmony_ci# define MRDCKF_RESET (1 << 21) 11562306a36Sopenharmony_ci# define MRDCKG_RESET (1 << 22) 11662306a36Sopenharmony_ci# define MRDCKH_RESET (1 << 23) 11762306a36Sopenharmony_ci# define DLL_READY_READ (1 << 24) 11862306a36Sopenharmony_ci# define USE_DISPLAY_GAP (1 << 25) 11962306a36Sopenharmony_ci# define USE_DISPLAY_URGENT_NORMAL (1 << 26) 12062306a36Sopenharmony_ci# define MPLL_TURNOFF_D2 (1 << 28) 12162306a36Sopenharmony_ci#define TCI_DLL_CNTL 0x64c 12262306a36Sopenharmony_ci 12362306a36Sopenharmony_ci#define CG_PG_CNTL 0x858 12462306a36Sopenharmony_ci# define PWRGATE_ENABLE (1 << 0) 12562306a36Sopenharmony_ci 12662306a36Sopenharmony_ci#define CG_AT 0x6d4 12762306a36Sopenharmony_ci#define CG_R(x) ((x) << 0) 12862306a36Sopenharmony_ci#define CG_R_MASK (0xffff << 0) 12962306a36Sopenharmony_ci#define CG_L(x) ((x) << 16) 13062306a36Sopenharmony_ci#define CG_L_MASK (0xffff << 16) 13162306a36Sopenharmony_ci 13262306a36Sopenharmony_ci#define CG_SPLL_SPREAD_SPECTRUM 0x790 13362306a36Sopenharmony_ci#define SSEN (1 << 0) 13462306a36Sopenharmony_ci#define CLK_S(x) ((x) << 4) 13562306a36Sopenharmony_ci#define CLK_S_MASK (0xfff << 4) 13662306a36Sopenharmony_ci#define CG_SPLL_SPREAD_SPECTRUM_2 0x794 13762306a36Sopenharmony_ci#define CLK_V(x) ((x) << 0) 13862306a36Sopenharmony_ci#define CLK_V_MASK (0x3ffffff << 0) 13962306a36Sopenharmony_ci 14062306a36Sopenharmony_ci#define MC_ARB_DRAM_TIMING 0x2774 14162306a36Sopenharmony_ci#define MC_ARB_DRAM_TIMING2 0x2778 14262306a36Sopenharmony_ci 14362306a36Sopenharmony_ci#define MC_ARB_RFSH_RATE 0x27b0 14462306a36Sopenharmony_ci#define POWERMODE0(x) ((x) << 0) 14562306a36Sopenharmony_ci#define POWERMODE0_MASK (0xff << 0) 14662306a36Sopenharmony_ci#define POWERMODE1(x) ((x) << 8) 14762306a36Sopenharmony_ci#define POWERMODE1_MASK (0xff << 8) 14862306a36Sopenharmony_ci#define POWERMODE2(x) ((x) << 16) 14962306a36Sopenharmony_ci#define POWERMODE2_MASK (0xff << 16) 15062306a36Sopenharmony_ci#define POWERMODE3(x) ((x) << 24) 15162306a36Sopenharmony_ci#define POWERMODE3_MASK (0xff << 24) 15262306a36Sopenharmony_ci 15362306a36Sopenharmony_ci#define MC_ARB_DRAM_TIMING_1 0x27f0 15462306a36Sopenharmony_ci#define MC_ARB_DRAM_TIMING_2 0x27f4 15562306a36Sopenharmony_ci#define MC_ARB_DRAM_TIMING_3 0x27f8 15662306a36Sopenharmony_ci#define MC_ARB_DRAM_TIMING2_1 0x27fc 15762306a36Sopenharmony_ci#define MC_ARB_DRAM_TIMING2_2 0x2800 15862306a36Sopenharmony_ci#define MC_ARB_DRAM_TIMING2_3 0x2804 15962306a36Sopenharmony_ci 16062306a36Sopenharmony_ci#define MC4_IO_DQ_PAD_CNTL_D0_I0 0x2978 16162306a36Sopenharmony_ci#define MC4_IO_DQ_PAD_CNTL_D0_I1 0x297c 16262306a36Sopenharmony_ci#define MC4_IO_QS_PAD_CNTL_D0_I0 0x2980 16362306a36Sopenharmony_ci#define MC4_IO_QS_PAD_CNTL_D0_I1 0x2984 16462306a36Sopenharmony_ci 16562306a36Sopenharmony_ci#endif 166