rv740d.h revision 1.2 1 1.2 riastrad /* $NetBSD: rv740d.h,v 1.2 2018/08/27 04:58:36 riastradh Exp $ */
2 1.2 riastrad
3 1.1 riastrad /*
4 1.1 riastrad * Copyright 2011 Advanced Micro Devices, Inc.
5 1.1 riastrad *
6 1.1 riastrad * Permission is hereby granted, free of charge, to any person obtaining a
7 1.1 riastrad * copy of this software and associated documentation files (the "Software"),
8 1.1 riastrad * to deal in the Software without restriction, including without limitation
9 1.1 riastrad * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 1.1 riastrad * and/or sell copies of the Software, and to permit persons to whom the
11 1.1 riastrad * Software is furnished to do so, subject to the following conditions:
12 1.1 riastrad *
13 1.1 riastrad * The above copyright notice and this permission notice shall be included in
14 1.1 riastrad * all copies or substantial portions of the Software.
15 1.1 riastrad *
16 1.1 riastrad * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 1.1 riastrad * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 1.1 riastrad * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 1.1 riastrad * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 1.1 riastrad * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 1.1 riastrad * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 1.1 riastrad * OTHER DEALINGS IN THE SOFTWARE.
23 1.1 riastrad *
24 1.1 riastrad */
25 1.1 riastrad #ifndef RV740_H
26 1.1 riastrad #define RV740_H
27 1.1 riastrad
28 1.1 riastrad #define CG_SPLL_FUNC_CNTL 0x600
29 1.1 riastrad #define SPLL_RESET (1 << 0)
30 1.1 riastrad #define SPLL_SLEEP (1 << 1)
31 1.1 riastrad #define SPLL_BYPASS_EN (1 << 3)
32 1.1 riastrad #define SPLL_REF_DIV(x) ((x) << 4)
33 1.1 riastrad #define SPLL_REF_DIV_MASK (0x3f << 4)
34 1.1 riastrad #define SPLL_PDIV_A(x) ((x) << 20)
35 1.1 riastrad #define SPLL_PDIV_A_MASK (0x7f << 20)
36 1.1 riastrad #define CG_SPLL_FUNC_CNTL_2 0x604
37 1.1 riastrad #define SCLK_MUX_SEL(x) ((x) << 0)
38 1.1 riastrad #define SCLK_MUX_SEL_MASK (0x1ff << 0)
39 1.1 riastrad #define CG_SPLL_FUNC_CNTL_3 0x608
40 1.1 riastrad #define SPLL_FB_DIV(x) ((x) << 0)
41 1.1 riastrad #define SPLL_FB_DIV_MASK (0x3ffffff << 0)
42 1.1 riastrad #define SPLL_DITHEN (1 << 28)
43 1.1 riastrad
44 1.1 riastrad #define MPLL_CNTL_MODE 0x61c
45 1.1 riastrad #define SS_SSEN (1 << 24)
46 1.1 riastrad
47 1.1 riastrad #define MPLL_AD_FUNC_CNTL 0x624
48 1.1 riastrad #define CLKF(x) ((x) << 0)
49 1.1 riastrad #define CLKF_MASK (0x7f << 0)
50 1.1 riastrad #define CLKR(x) ((x) << 7)
51 1.1 riastrad #define CLKR_MASK (0x1f << 7)
52 1.1 riastrad #define CLKFRAC(x) ((x) << 12)
53 1.1 riastrad #define CLKFRAC_MASK (0x1f << 12)
54 1.1 riastrad #define YCLK_POST_DIV(x) ((x) << 17)
55 1.1 riastrad #define YCLK_POST_DIV_MASK (3 << 17)
56 1.1 riastrad #define IBIAS(x) ((x) << 20)
57 1.1 riastrad #define IBIAS_MASK (0x3ff << 20)
58 1.1 riastrad #define RESET (1 << 30)
59 1.1 riastrad #define PDNB (1 << 31)
60 1.1 riastrad #define MPLL_AD_FUNC_CNTL_2 0x628
61 1.1 riastrad #define BYPASS (1 << 19)
62 1.1 riastrad #define BIAS_GEN_PDNB (1 << 24)
63 1.1 riastrad #define RESET_EN (1 << 25)
64 1.1 riastrad #define VCO_MODE (1 << 29)
65 1.1 riastrad #define MPLL_DQ_FUNC_CNTL 0x62c
66 1.1 riastrad #define MPLL_DQ_FUNC_CNTL_2 0x630
67 1.1 riastrad
68 1.1 riastrad #define MCLK_PWRMGT_CNTL 0x648
69 1.1 riastrad #define DLL_SPEED(x) ((x) << 0)
70 1.1 riastrad #define DLL_SPEED_MASK (0x1f << 0)
71 1.1 riastrad # define MPLL_PWRMGT_OFF (1 << 5)
72 1.1 riastrad # define DLL_READY (1 << 6)
73 1.1 riastrad # define MC_INT_CNTL (1 << 7)
74 1.1 riastrad # define MRDCKA0_SLEEP (1 << 8)
75 1.1 riastrad # define MRDCKA1_SLEEP (1 << 9)
76 1.1 riastrad # define MRDCKB0_SLEEP (1 << 10)
77 1.1 riastrad # define MRDCKB1_SLEEP (1 << 11)
78 1.1 riastrad # define MRDCKC0_SLEEP (1 << 12)
79 1.1 riastrad # define MRDCKC1_SLEEP (1 << 13)
80 1.1 riastrad # define MRDCKD0_SLEEP (1 << 14)
81 1.1 riastrad # define MRDCKD1_SLEEP (1 << 15)
82 1.1 riastrad # define MRDCKA0_RESET (1 << 16)
83 1.1 riastrad # define MRDCKA1_RESET (1 << 17)
84 1.1 riastrad # define MRDCKB0_RESET (1 << 18)
85 1.1 riastrad # define MRDCKB1_RESET (1 << 19)
86 1.1 riastrad # define MRDCKC0_RESET (1 << 20)
87 1.1 riastrad # define MRDCKC1_RESET (1 << 21)
88 1.1 riastrad # define MRDCKD0_RESET (1 << 22)
89 1.1 riastrad # define MRDCKD1_RESET (1 << 23)
90 1.1 riastrad # define DLL_READY_READ (1 << 24)
91 1.1 riastrad # define USE_DISPLAY_GAP (1 << 25)
92 1.1 riastrad # define USE_DISPLAY_URGENT_NORMAL (1 << 26)
93 1.1 riastrad # define MPLL_TURNOFF_D2 (1 << 28)
94 1.1 riastrad #define DLL_CNTL 0x64c
95 1.1 riastrad # define MRDCKA0_BYPASS (1 << 24)
96 1.1 riastrad # define MRDCKA1_BYPASS (1 << 25)
97 1.1 riastrad # define MRDCKB0_BYPASS (1 << 26)
98 1.1 riastrad # define MRDCKB1_BYPASS (1 << 27)
99 1.1 riastrad # define MRDCKC0_BYPASS (1 << 28)
100 1.1 riastrad # define MRDCKC1_BYPASS (1 << 29)
101 1.1 riastrad # define MRDCKD0_BYPASS (1 << 30)
102 1.1 riastrad # define MRDCKD1_BYPASS (1 << 31)
103 1.1 riastrad
104 1.1 riastrad #define CG_SPLL_SPREAD_SPECTRUM 0x790
105 1.1 riastrad #define SSEN (1 << 0)
106 1.1 riastrad #define CLK_S(x) ((x) << 4)
107 1.1 riastrad #define CLK_S_MASK (0xfff << 4)
108 1.1 riastrad #define CG_SPLL_SPREAD_SPECTRUM_2 0x794
109 1.1 riastrad #define CLK_V(x) ((x) << 0)
110 1.1 riastrad #define CLK_V_MASK (0x3ffffff << 0)
111 1.1 riastrad
112 1.1 riastrad #define MPLL_SS1 0x85c
113 1.1 riastrad #define CLKV(x) ((x) << 0)
114 1.1 riastrad #define CLKV_MASK (0x3ffffff << 0)
115 1.1 riastrad #define MPLL_SS2 0x860
116 1.1 riastrad #define CLKS(x) ((x) << 0)
117 1.1 riastrad #define CLKS_MASK (0xfff << 0)
118 1.1 riastrad
119 1.1 riastrad #endif
120