xref: /utopia/UTPA2-700.0.x/modules/graphic/hal/k6/gop/regGOP.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1*53ee8cc1Swenshuai.xi //<MStar Software>
2*53ee8cc1Swenshuai.xi //******************************************************************************
3*53ee8cc1Swenshuai.xi // MStar Software
4*53ee8cc1Swenshuai.xi // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved.
5*53ee8cc1Swenshuai.xi // All software, firmware and related documentation herein ("MStar Software") are
6*53ee8cc1Swenshuai.xi // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by
7*53ee8cc1Swenshuai.xi // law, including, but not limited to, copyright law and international treaties.
8*53ee8cc1Swenshuai.xi // Any use, modification, reproduction, retransmission, or republication of all
9*53ee8cc1Swenshuai.xi // or part of MStar Software is expressly prohibited, unless prior written
10*53ee8cc1Swenshuai.xi // permission has been granted by MStar.
11*53ee8cc1Swenshuai.xi //
12*53ee8cc1Swenshuai.xi // By accessing, browsing and/or using MStar Software, you acknowledge that you
13*53ee8cc1Swenshuai.xi // have read, understood, and agree, to be bound by below terms ("Terms") and to
14*53ee8cc1Swenshuai.xi // comply with all applicable laws and regulations:
15*53ee8cc1Swenshuai.xi //
16*53ee8cc1Swenshuai.xi // 1. MStar shall retain any and all right, ownership and interest to MStar
17*53ee8cc1Swenshuai.xi //    Software and any modification/derivatives thereof.
18*53ee8cc1Swenshuai.xi //    No right, ownership, or interest to MStar Software and any
19*53ee8cc1Swenshuai.xi //    modification/derivatives thereof is transferred to you under Terms.
20*53ee8cc1Swenshuai.xi //
21*53ee8cc1Swenshuai.xi // 2. You understand that MStar Software might include, incorporate or be
22*53ee8cc1Swenshuai.xi //    supplied together with third party`s software and the use of MStar
23*53ee8cc1Swenshuai.xi //    Software may require additional licenses from third parties.
24*53ee8cc1Swenshuai.xi //    Therefore, you hereby agree it is your sole responsibility to separately
25*53ee8cc1Swenshuai.xi //    obtain any and all third party right and license necessary for your use of
26*53ee8cc1Swenshuai.xi //    such third party`s software.
27*53ee8cc1Swenshuai.xi //
28*53ee8cc1Swenshuai.xi // 3. MStar Software and any modification/derivatives thereof shall be deemed as
29*53ee8cc1Swenshuai.xi //    MStar`s confidential information and you agree to keep MStar`s
30*53ee8cc1Swenshuai.xi //    confidential information in strictest confidence and not disclose to any
31*53ee8cc1Swenshuai.xi //    third party.
32*53ee8cc1Swenshuai.xi //
33*53ee8cc1Swenshuai.xi // 4. MStar Software is provided on an "AS IS" basis without warranties of any
34*53ee8cc1Swenshuai.xi //    kind. Any warranties are hereby expressly disclaimed by MStar, including
35*53ee8cc1Swenshuai.xi //    without limitation, any warranties of merchantability, non-infringement of
36*53ee8cc1Swenshuai.xi //    intellectual property rights, fitness for a particular purpose, error free
37*53ee8cc1Swenshuai.xi //    and in conformity with any international standard.  You agree to waive any
38*53ee8cc1Swenshuai.xi //    claim against MStar for any loss, damage, cost or expense that you may
39*53ee8cc1Swenshuai.xi //    incur related to your use of MStar Software.
40*53ee8cc1Swenshuai.xi //    In no event shall MStar be liable for any direct, indirect, incidental or
41*53ee8cc1Swenshuai.xi //    consequential damages, including without limitation, lost of profit or
42*53ee8cc1Swenshuai.xi //    revenues, lost or damage of data, and unauthorized system use.
43*53ee8cc1Swenshuai.xi //    You agree that this Section 4 shall still apply without being affected
44*53ee8cc1Swenshuai.xi //    even if MStar Software has been modified by MStar in accordance with your
45*53ee8cc1Swenshuai.xi //    request or instruction for your use, except otherwise agreed by both
46*53ee8cc1Swenshuai.xi //    parties in writing.
47*53ee8cc1Swenshuai.xi //
48*53ee8cc1Swenshuai.xi // 5. If requested, MStar may from time to time provide technical supports or
49*53ee8cc1Swenshuai.xi //    services in relation with MStar Software to you for your use of
50*53ee8cc1Swenshuai.xi //    MStar Software in conjunction with your or your customer`s product
51*53ee8cc1Swenshuai.xi //    ("Services").
52*53ee8cc1Swenshuai.xi //    You understand and agree that, except otherwise agreed by both parties in
53*53ee8cc1Swenshuai.xi //    writing, Services are provided on an "AS IS" basis and the warranty
54*53ee8cc1Swenshuai.xi //    disclaimer set forth in Section 4 above shall apply.
55*53ee8cc1Swenshuai.xi //
56*53ee8cc1Swenshuai.xi // 6. Nothing contained herein shall be construed as by implication, estoppels
57*53ee8cc1Swenshuai.xi //    or otherwise:
58*53ee8cc1Swenshuai.xi //    (a) conferring any license or right to use MStar name, trademark, service
59*53ee8cc1Swenshuai.xi //        mark, symbol or any other identification;
60*53ee8cc1Swenshuai.xi //    (b) obligating MStar or any of its affiliates to furnish any person,
61*53ee8cc1Swenshuai.xi //        including without limitation, you and your customers, any assistance
62*53ee8cc1Swenshuai.xi //        of any kind whatsoever, or any information; or
63*53ee8cc1Swenshuai.xi //    (c) conferring any license or right under any intellectual property right.
64*53ee8cc1Swenshuai.xi //
65*53ee8cc1Swenshuai.xi // 7. These terms shall be governed by and construed in accordance with the laws
66*53ee8cc1Swenshuai.xi //    of Taiwan, R.O.C., excluding its conflict of law rules.
67*53ee8cc1Swenshuai.xi //    Any and all dispute arising out hereof or related hereto shall be finally
68*53ee8cc1Swenshuai.xi //    settled by arbitration referred to the Chinese Arbitration Association,
69*53ee8cc1Swenshuai.xi //    Taipei in accordance with the ROC Arbitration Law and the Arbitration
70*53ee8cc1Swenshuai.xi //    Rules of the Association by three (3) arbitrators appointed in accordance
71*53ee8cc1Swenshuai.xi //    with the said Rules.
72*53ee8cc1Swenshuai.xi //    The place of arbitration shall be in Taipei, Taiwan and the language shall
73*53ee8cc1Swenshuai.xi //    be English.
74*53ee8cc1Swenshuai.xi //    The arbitration award shall be final and binding to both parties.
75*53ee8cc1Swenshuai.xi //
76*53ee8cc1Swenshuai.xi //******************************************************************************
77*53ee8cc1Swenshuai.xi //<MStar Software>
78*53ee8cc1Swenshuai.xi ////////////////////////////////////////////////////////////////////////////////
79*53ee8cc1Swenshuai.xi //
80*53ee8cc1Swenshuai.xi // Copyright (c) 2008-2009 MStar Semiconductor, Inc.
81*53ee8cc1Swenshuai.xi // All rights reserved.
82*53ee8cc1Swenshuai.xi //
83*53ee8cc1Swenshuai.xi // Unless otherwise stipulated in writing, any and all information contained
84*53ee8cc1Swenshuai.xi // herein regardless in any format shall remain the sole proprietary of
85*53ee8cc1Swenshuai.xi // MStar Semiconductor Inc. and be kept in strict confidence
86*53ee8cc1Swenshuai.xi // ("MStar Confidential Information") by the recipient.
87*53ee8cc1Swenshuai.xi // Any unauthorized act including without limitation unauthorized disclosure,
88*53ee8cc1Swenshuai.xi // copying, use, reproduction, sale, distribution, modification, disassembling,
89*53ee8cc1Swenshuai.xi // reverse engineering and compiling of the contents of MStar Confidential
90*53ee8cc1Swenshuai.xi // Information is unlawful and strictly prohibited. MStar hereby reserves the
91*53ee8cc1Swenshuai.xi // rights to any and all damages, losses, costs and expenses resulting therefrom.
92*53ee8cc1Swenshuai.xi //
93*53ee8cc1Swenshuai.xi ////////////////////////////////////////////////////////////////////////////////
94*53ee8cc1Swenshuai.xi 
95*53ee8cc1Swenshuai.xi #ifndef _REG_GOP_H_
96*53ee8cc1Swenshuai.xi #define _REG_GOP_H_
97*53ee8cc1Swenshuai.xi 
98*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
99*53ee8cc1Swenshuai.xi //  Hardware Capability
100*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
101*53ee8cc1Swenshuai.xi 
102*53ee8cc1Swenshuai.xi 
103*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
104*53ee8cc1Swenshuai.xi //  Macro and Define
105*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
106*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
107*53ee8cc1Swenshuai.xi // HW IP Reg Base Adr
108*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
109*53ee8cc1Swenshuai.xi #define GOP_REG_BASE                           0x1F00UL
110*53ee8cc1Swenshuai.xi #define GE_REG_BASE                            0x2800UL
111*53ee8cc1Swenshuai.xi #define SC1_REG_BASE                           0x2F00UL
112*53ee8cc1Swenshuai.xi #define CKG_REG_BASE                           0x0B00UL
113*53ee8cc1Swenshuai.xi #define MIU0_REG_BASE                          0x0600UL
114*53ee8cc1Swenshuai.xi #define MIU_REG_BASE                           0x1200UL
115*53ee8cc1Swenshuai.xi #define MIU2_REG_BASE                          0x162000
116*53ee8cc1Swenshuai.xi #define MVOP_REG_BASE                          0x1400UL
117*53ee8cc1Swenshuai.xi #define VE_REG_BASE                            0x3B00UL
118*53ee8cc1Swenshuai.xi #define SC1_DIRREG_BASE                        0x130000UL
119*53ee8cc1Swenshuai.xi 
120*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
121*53ee8cc1Swenshuai.xi // Scaler Reg
122*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
123*53ee8cc1Swenshuai.xi #define XC_REG(bk, reg)                        (SC1_REG_BASE+((MS_U32)(bk)<<16) + (reg) * 2)
124*53ee8cc1Swenshuai.xi 
125*53ee8cc1Swenshuai.xi #define REG_SC_BK00_00_L                        XC_REG(0x00, 0x00)
126*53ee8cc1Swenshuai.xi #define REG_SC_BK00_05_L                        XC_REG(0x00, 0x05)
127*53ee8cc1Swenshuai.xi #define REG_SC_BK00_06_L                        XC_REG(0x00, 0x06)
128*53ee8cc1Swenshuai.xi #define REG_SC_BK01_02_L                        XC_REG(0x01, 0x02)
129*53ee8cc1Swenshuai.xi #define REG_SC_BK01_05_L                        XC_REG(0x01, 0x05)
130*53ee8cc1Swenshuai.xi #define REG_SC_BK01_1E_L                        XC_REG(0x01, 0x1E)
131*53ee8cc1Swenshuai.xi #define REG_SC_BK01_21_L                        XC_REG(0x01, 0x21)
132*53ee8cc1Swenshuai.xi #define REG_SC_BK02_5F_L                        XC_REG(0x02, 0x5F)
133*53ee8cc1Swenshuai.xi #define REG_SC_BK0F_2B_L                        XC_REG(0x0F, 0x2B)
134*53ee8cc1Swenshuai.xi #define REG_SC_BK10_23_L                        XC_REG(0x10, 0x23)
135*53ee8cc1Swenshuai.xi #define REG_SC_BK10_5B_L                        XC_REG(0x10, 0x5B)
136*53ee8cc1Swenshuai.xi #define REG_SC_BK12_03_L                        XC_REG(0x12, 0x03)
137*53ee8cc1Swenshuai.xi #define REG_SC_BK2F_27_L                        XC_REG(0x2F, 0x27)
138*53ee8cc1Swenshuai.xi #define REG_SC_BK2F_37_L                        XC_REG(0x2F, 0x37)
139*53ee8cc1Swenshuai.xi #define REG_SC_BK2F_38_L                        XC_REG(0x2F, 0x38)
140*53ee8cc1Swenshuai.xi #define REG_SC_BK2F_39_L                        XC_REG(0x2F, 0x39)
141*53ee8cc1Swenshuai.xi #define REG_SC_BK2F_3A_L                        XC_REG(0x2F, 0x3A)
142*53ee8cc1Swenshuai.xi #define REG_SC_BK2F_3B_L                        XC_REG(0x2F, 0x3B)
143*53ee8cc1Swenshuai.xi #define REG_SC_BK2F_3C_L                        XC_REG(0x2F, 0x3C)
144*53ee8cc1Swenshuai.xi #define REG_SC_BK37_22_L                        XC_REG(0x37, 0x22)
145*53ee8cc1Swenshuai.xi #define REG_SC_BK37_24_L                        XC_REG(0x37, 0x24)
146*53ee8cc1Swenshuai.xi #define REG_SC_BK37_28_L                        XC_REG(0x37, 0x28)
147*53ee8cc1Swenshuai.xi #define REG_SC_BK3D_0D_L                        XC_REG(0x3D, 0x0D)
148*53ee8cc1Swenshuai.xi #define REG_SC_BK40_22_L                        XC_REG(0x40, 0x22)
149*53ee8cc1Swenshuai.xi #define REG_SC_BK40_23_L                        XC_REG(0x40, 0x23)
150*53ee8cc1Swenshuai.xi #define REG_SC_BK40_24_L                        XC_REG(0x40, 0x24)
151*53ee8cc1Swenshuai.xi #define REG_SC_BK40_25_L                        XC_REG(0x40, 0x25)
152*53ee8cc1Swenshuai.xi #define REG_SC_BK7F_10_L                        XC_REG(0x7F, 0x10)
153*53ee8cc1Swenshuai.xi #define REG_SC_BK7F_11_L                        XC_REG(0x7F, 0x11)
154*53ee8cc1Swenshuai.xi 
155*53ee8cc1Swenshuai.xi #define REG_SC1_BK00_05_L                       XC_REG(0x80+0x00, 0x05)
156*53ee8cc1Swenshuai.xi #define REG_SC1_BK00_06_L                       XC_REG(0x80+0x00, 0x06)
157*53ee8cc1Swenshuai.xi #define REG_SC1_BK10_23_L                       XC_REG(0x80+0x10, 0x23)
158*53ee8cc1Swenshuai.xi 
159*53ee8cc1Swenshuai.xi #define GOP_SC_BANKSEL                          REG_SC_BK00_00_L
160*53ee8cc1Swenshuai.xi #define GOP_SC_CHANNELSYNC                      REG_SC_BK00_05_L
161*53ee8cc1Swenshuai.xi #define GOP_SC_GOPEN                            REG_SC_BK00_06_L
162*53ee8cc1Swenshuai.xi #define GOP_SC_IP_SYNC                          REG_SC_BK01_02_L
163*53ee8cc1Swenshuai.xi #define GOP_SC_IP_MAIN_HSTART                   REG_SC_BK01_05_L
164*53ee8cc1Swenshuai.xi #define GOP_SC_IP_MAIN_INTERLACE                REG_SC_BK01_1E_L
165*53ee8cc1Swenshuai.xi #define GOP_SC_IP_MAIN_USR_INTERLACE            REG_SC_BK01_21_L
166*53ee8cc1Swenshuai.xi #define GOP_SC_IP2GOP_SRCSEL                    REG_SC_BK02_5F_L
167*53ee8cc1Swenshuai.xi #define GOP_SC_OSD_CHECK_ALPHA                  REG_SC_BK0F_2B_L
168*53ee8cc1Swenshuai.xi #define GOP_SC_VOPNBL                           REG_SC_BK10_23_L
169*53ee8cc1Swenshuai.xi #define GOP_SC_ALPHAMODE                        REG_SC_BK10_5B_L
170*53ee8cc1Swenshuai.xi #define GOP_SC_GOPENMODE1                       REG_SC_BK10_5B_L
171*53ee8cc1Swenshuai.xi #define GOP_SC_MIRRORCFG                        REG_SC_BK12_03_L
172*53ee8cc1Swenshuai.xi #define GOP_SC_BLEND0_GOP_SWITCH                REG_SC_BK2F_27_L
173*53ee8cc1Swenshuai.xi #define GOP_SC_VOP2BLENDING_L                   REG_SC_BK2F_37_L
174*53ee8cc1Swenshuai.xi #define GOP_SC_VOP2BLENDING_H                   REG_SC_BK2F_38_L
175*53ee8cc1Swenshuai.xi #define GOP_SC_VOP2BLENDING_EX                  REG_SC_BK2F_39_L
176*53ee8cc1Swenshuai.xi #define GOP_SC_VOPVTK                           REG_SC_BK2F_3A_L
177*53ee8cc1Swenshuai.xi #define GOP_SC_VOPVTK_L                         REG_SC_BK2F_3B_L
178*53ee8cc1Swenshuai.xi #define GOP_SC_VOPVTK_H                         REG_SC_BK2F_3C_L
179*53ee8cc1Swenshuai.xi #define GOP_SC_OCMIXER                          REG_SC_BK37_22_L
180*53ee8cc1Swenshuai.xi #define GOP_SC_OCMISC                           REG_SC_BK37_24_L
181*53ee8cc1Swenshuai.xi #define GOP_SC_OCALPHA                          REG_SC_BK37_28_L
182*53ee8cc1Swenshuai.xi #define GOP_SC_GOPSC_SRAM_CTRL                  REG_SC_BK3D_0D_L
183*53ee8cc1Swenshuai.xi #define GOP_SC_FRC_LAYER1_L_EN                  REG_SC_BK40_22_L
184*53ee8cc1Swenshuai.xi #define GOP_SC_FRC_LAYER1_R_EN                  REG_SC_BK40_23_L
185*53ee8cc1Swenshuai.xi #define GOP_SC_FRC_LAYER2_L_EN                  REG_SC_BK40_24_L
186*53ee8cc1Swenshuai.xi #define GOP_SC_FRC_LAYER2_R_EN                  REG_SC_BK40_25_L
187*53ee8cc1Swenshuai.xi #define GOP_SC_MIU_SEL                          REG_SC_BK7F_10_L
188*53ee8cc1Swenshuai.xi #define GOP_SC_MIU_IP_SEL                       REG_SC_BK7F_11_L
189*53ee8cc1Swenshuai.xi 
190*53ee8cc1Swenshuai.xi #define GOP_SC1_CHANNELSYNC                     REG_SC1_BK00_05_L
191*53ee8cc1Swenshuai.xi #define GOP_SC1_GOPEN                           REG_SC1_BK00_06_L
192*53ee8cc1Swenshuai.xi #define GOP_SC1_VOPNBL                          REG_SC1_BK10_23_L
193*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
194*53ee8cc1Swenshuai.xi // MVOP Reg
195*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
196*53ee8cc1Swenshuai.xi #define GOP_MVOP_MIRRORCFG                      (MVOP_REG_BASE+0x76)
197*53ee8cc1Swenshuai.xi 
198*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
199*53ee8cc1Swenshuai.xi // VE Reg
200*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
201*53ee8cc1Swenshuai.xi #define VE_REG(reg)                 (VE_REG_BASE + (reg) * 2)
202*53ee8cc1Swenshuai.xi 
203*53ee8cc1Swenshuai.xi #define GOP_VE_TVS_CTRL             VE_REG(0x00)
204*53ee8cc1Swenshuai.xi #define GOP_VE_TVS_OSD_EN           VE_REG(0x55)
205*53ee8cc1Swenshuai.xi #define GOP_VE_TVS_OSD_EN_ALPHA_INV VE_REG(0x5f)
206*53ee8cc1Swenshuai.xi #define GOP_VE_TVS_OSD1_EN          VE_REG(0x60)
207*53ee8cc1Swenshuai.xi #define GOP_VE_TVE_SWRST            VE_REG(0x07)
208*53ee8cc1Swenshuai.xi 
209*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
210*53ee8cc1Swenshuai.xi // GE Reg
211*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
212*53ee8cc1Swenshuai.xi #define GOP_GE_FMT_BLT                          (GE_REG_BASE+(0x01*2))
213*53ee8cc1Swenshuai.xi #define GOP_GE_EN_CMDQ                          BIT(0)
214*53ee8cc1Swenshuai.xi #define GOP_GE_EN_VCMDQ                         BIT(1)
215*53ee8cc1Swenshuai.xi 
216*53ee8cc1Swenshuai.xi #define GOP_GE_VQ_FIFO_STATUS_L                 (GE_REG_BASE+(0x04*2))
217*53ee8cc1Swenshuai.xi #define GOP_GE_VQ_FIFO_STATUS_H                 (GE_REG_BASE+(0x05*2))
218*53ee8cc1Swenshuai.xi 
219*53ee8cc1Swenshuai.xi #define GOP_GE_STATUS                           (GE_REG_BASE+(0x07*2))
220*53ee8cc1Swenshuai.xi #define GOP_GE_BUSY                             BIT(0)
221*53ee8cc1Swenshuai.xi #define GOP_GE_CMDQ1_STATUS                     BMASK(7:3)
222*53ee8cc1Swenshuai.xi #define GOP_GE_CMDQ2_STATUS                     BMASK(15:11)
223*53ee8cc1Swenshuai.xi 
224*53ee8cc1Swenshuai.xi #define GOP_GE_TAG                              (GE_REG_BASE+(0x2C*2))
225*53ee8cc1Swenshuai.xi 
226*53ee8cc1Swenshuai.xi #define GOP_GE_DBBASE0                          (GE_REG_BASE+(0x26*2))
227*53ee8cc1Swenshuai.xi #define GOP_GE_DBBASE1                          (GE_REG_BASE+(0x27*2))
228*53ee8cc1Swenshuai.xi #define GOP_GE_DBPIT                            (GE_REG_BASE+(0x33*2))
229*53ee8cc1Swenshuai.xi #define GOP_GE_FBFMT                            (GE_REG_BASE+(0x34*2))
230*53ee8cc1Swenshuai.xi #define GOP_GE_SRCW                             (GE_REG_BASE+(0x6e*2))
231*53ee8cc1Swenshuai.xi #define GOP_GE_SRCH                             (GE_REG_BASE+(0x6f*2))
232*53ee8cc1Swenshuai.xi 
233*53ee8cc1Swenshuai.xi 
234*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
235*53ee8cc1Swenshuai.xi // ChipTop Reg
236*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
237*53ee8cc1Swenshuai.xi /* GOP0 and GOP1 CLK */
238*53ee8cc1Swenshuai.xi #define GOP_GOPCLK              (CKG_REG_BASE+(0x40<<1))
239*53ee8cc1Swenshuai.xi #define CKG_GOPG0_DISABLE_CLK   ~(GOP_BIT0)
240*53ee8cc1Swenshuai.xi #define CKG_GOPG0_ODCLK         (0 << 2)
241*53ee8cc1Swenshuai.xi #define CKG_GOPG0_OD1CLK        (2 << 2)
242*53ee8cc1Swenshuai.xi #define CKG_GOPG0_DIP           (3 << 2)
243*53ee8cc1Swenshuai.xi #define CKG_GOPG0_IDCLK2        (6 << 2)
244*53ee8cc1Swenshuai.xi #define CKG_GOPG0_IDCLK1        (7 << 2)
245*53ee8cc1Swenshuai.xi #define CKG_GOPG0_DISABLE_CLK_MASK    (GOP_BIT0)
246*53ee8cc1Swenshuai.xi #define CKG_GOPG0_MASK          (GOP_BIT4 | GOP_BIT3 | GOP_BIT2)
247*53ee8cc1Swenshuai.xi 
248*53ee8cc1Swenshuai.xi #define CKG_GOPG1_DISABLE_CLK   ~(GOP_BIT8)
249*53ee8cc1Swenshuai.xi #define CKG_GOPG1_ODCLK         (0 << 10)
250*53ee8cc1Swenshuai.xi #define CKG_GOPG1_OD1CLK        (2 << 10)
251*53ee8cc1Swenshuai.xi #define CKG_GOPG1_DIP           (3 << 10)
252*53ee8cc1Swenshuai.xi #define CKG_GOPG1_IDCLK2        (6 << 10)
253*53ee8cc1Swenshuai.xi #define CKG_GOPG1_IDCLK1        (7 << 10)
254*53ee8cc1Swenshuai.xi #define CKG_GOPG1_DISABLE_CLK_MASK    (GOP_BIT8)
255*53ee8cc1Swenshuai.xi #define CKG_GOPG1_MASK          (GOP_BIT12 | GOP_BIT11 | GOP_BIT10)
256*53ee8cc1Swenshuai.xi 
257*53ee8cc1Swenshuai.xi /* GOP Mixer CLK */
258*53ee8cc1Swenshuai.xi #define CKG_GOPMIXER_CLK        (CKG_REG_BASE+(0x41<<1))
259*53ee8cc1Swenshuai.xi #define CKG_GOPMIXER_ODCLK      (4<<2)
260*53ee8cc1Swenshuai.xi #define CKG_GOPMIXER_VECLK      (6<<2)
261*53ee8cc1Swenshuai.xi #define CKG_GOPMIXER_MASK       (GOP_BIT4|GOP_BIT3 | GOP_BIT2)
262*53ee8cc1Swenshuai.xi 
263*53ee8cc1Swenshuai.xi /* GOPD CLK */
264*53ee8cc1Swenshuai.xi #define GOP_GOPDCLK             (CKG_REG_BASE+(0x41<<1))
265*53ee8cc1Swenshuai.xi #define CKG_GOPD_CLK_IDCLK2      (0 << 10)
266*53ee8cc1Swenshuai.xi #define CKG_GOPD_CLK_ODCLK       (1 << 10)
267*53ee8cc1Swenshuai.xi #define CKG_GOPD_CLK_DC0CLK      (2 << 10)
268*53ee8cc1Swenshuai.xi #define CKG_GOPD_CLK_SUBDC0CLK   (3 << 10)
269*53ee8cc1Swenshuai.xi #define CKG_GOPD_CLK_MIXERCLK_VE (4 << 10)
270*53ee8cc1Swenshuai.xi #define CKG_GOPD_MASK            (GOP_BIT12 | GOP_BIT11 | GOP_BIT10)
271*53ee8cc1Swenshuai.xi 
272*53ee8cc1Swenshuai.xi /* GOP2 CLK */
273*53ee8cc1Swenshuai.xi #define GOP_GOP2CLK             (CKG_REG_BASE+(0x42<<1))
274*53ee8cc1Swenshuai.xi #define CKG_GOPG2_DISABLE_CLK   ~(GOP_BIT0)
275*53ee8cc1Swenshuai.xi #define CKG_GOPG2_ODCLK         (0 << 2)
276*53ee8cc1Swenshuai.xi #define CKG_GOPG2_OD1CLK        (2 << 2)
277*53ee8cc1Swenshuai.xi #define CKG_GOPG2_IDCLK1        (7 << 2)
278*53ee8cc1Swenshuai.xi #define CKG_GOPG2_DIP           (3 << 2)
279*53ee8cc1Swenshuai.xi #define CKG_GOPG2_DISABLE_CLK_MASK    (GOP_BIT0)
280*53ee8cc1Swenshuai.xi #define CKG_GOPG2_MASK           (GOP_BIT4 | GOP_BIT3 | GOP_BIT2)
281*53ee8cc1Swenshuai.xi 
282*53ee8cc1Swenshuai.xi /* GOP3 CLK*/
283*53ee8cc1Swenshuai.xi #define GOP_GOP3CLK             (CKG_REG_BASE+(0x42<<1))
284*53ee8cc1Swenshuai.xi #define CKG_GOPG3_ODCLK         (0 << 10)
285*53ee8cc1Swenshuai.xi #define CKG_GOPG3_OD1CLK        (2 << 10)
286*53ee8cc1Swenshuai.xi #define CKG_GOPG3_IDCLK1        (7 << 10)
287*53ee8cc1Swenshuai.xi #define CKG_GOPG3_DIP           (3 << 10)
288*53ee8cc1Swenshuai.xi #define CKG_GOPG3_DISABLE_CLK_MASK    (GOP_BIT8)
289*53ee8cc1Swenshuai.xi #define CKG_GOPG3_MASK          (GOP_BIT12 | GOP_BIT11 | GOP_BIT10)
290*53ee8cc1Swenshuai.xi #define CKG_GOPD_DISABLE_CLK   ~(GOP_BIT8)
291*53ee8cc1Swenshuai.xi 
292*53ee8cc1Swenshuai.xi /* GOP4 CLK*/
293*53ee8cc1Swenshuai.xi #define GOP_GOP4CLK             (CKG_REG_BASE+(0x44<<1))
294*53ee8cc1Swenshuai.xi #define CKG_GOPG4_DISABLE_CLK_MASK    (GOP_BIT0)
295*53ee8cc1Swenshuai.xi #define CKG_GOPG4_DISABLE_CLK_MASK    (GOP_BIT0)
296*53ee8cc1Swenshuai.xi #define CKG_GOPG4_MASK          (GOP_BIT4 | GOP_BIT3 | GOP_BIT2)
297*53ee8cc1Swenshuai.xi 
298*53ee8cc1Swenshuai.xi // K6 : GOP0~3 and GOP5, NO GOP4. Mapping E_GOP4 to GOP 5 reg
299*53ee8cc1Swenshuai.xi /* GOP5 CLK*/
300*53ee8cc1Swenshuai.xi #define GOP_GOP5CLK             (CKG_REG_BASE+(0x44<<1))
301*53ee8cc1Swenshuai.xi #define CKG_GOPG5_DISABLE_CLK_MASK    (GOP_BIT8)
302*53ee8cc1Swenshuai.xi #define CKG_GOPG5_ODCLK         (0 << 10)
303*53ee8cc1Swenshuai.xi #define CKG_GOPG5_OD1CLK        (2 << 10)
304*53ee8cc1Swenshuai.xi #define CKG_GOPG5_DIP           (3 << 10)
305*53ee8cc1Swenshuai.xi #define CKG_GOPG5_IDCLK1        (7 << 10)
306*53ee8cc1Swenshuai.xi #define CKG_GOPG5_MASK          (GOP_BIT12 | GOP_BIT11 | GOP_BIT10)
307*53ee8cc1Swenshuai.xi 
308*53ee8cc1Swenshuai.xi /* SRAM CLK */
309*53ee8cc1Swenshuai.xi #define GOP_SRAMCLK             (CKG_REG_BASE+(0x43<<1))
310*53ee8cc1Swenshuai.xi #define CKG_SRAM0_DISABLE_CLK   (GOP_BIT0)
311*53ee8cc1Swenshuai.xi #define CKG_SRAM1_DISABLE_CLK   (GOP_BIT2)
312*53ee8cc1Swenshuai.xi #define CKG_SRAM0_MASK          (GOP_BIT0|GOP_BIT1)
313*53ee8cc1Swenshuai.xi #define CKG_SRAM1_MASK          (GOP_BIT2|GOP_BIT3)
314*53ee8cc1Swenshuai.xi 
315*53ee8cc1Swenshuai.xi /* LINE BUFFER SRAM CLK */
316*53ee8cc1Swenshuai.xi #define GOP_LB_SRAMCLK            (CKG_REG_BASE+(0x45<<1))
317*53ee8cc1Swenshuai.xi #define CKG_LB_SRAM1_DISABLE_CLK   (GOP_BIT0)                   /*GOP1*/
318*53ee8cc1Swenshuai.xi #define CKG_LB_SRAM2_DISABLE_CLK   (GOP_BIT4)                   /*GOP2*/
319*53ee8cc1Swenshuai.xi #define CKG_LB_SRAM1_MASK          (GOP_BIT2|GOP_BIT3)
320*53ee8cc1Swenshuai.xi #define CKG_LB_SRAM2_MASK          (GOP_BIT6|GOP_BIT7)
321*53ee8cc1Swenshuai.xi 
322*53ee8cc1Swenshuai.xi /*AFBC CLK*/
323*53ee8cc1Swenshuai.xi #define GOP_AFBCCLK               (CKG_REG_BASE+(0x5F<<1))
324*53ee8cc1Swenshuai.xi #define CKG_AFBCCLK_DISABLE_CLK   (GOP_BIT0)
325*53ee8cc1Swenshuai.xi #define CKG_AFBCCLK_216           (0 << 2)
326*53ee8cc1Swenshuai.xi #define CKG_AFBCCLK_432           (1 << 2)
327*53ee8cc1Swenshuai.xi #define CKG_AFBCCLK_DISABLE_CLK_MASK    (GOP_BIT0|GOP_BIT1|GOP_BIT2|GOP_BIT3)
328*53ee8cc1Swenshuai.xi 
329*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
330*53ee8cc1Swenshuai.xi // MIU Reg
331*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
332*53ee8cc1Swenshuai.xi #define GOP_CLIENT_REG          0x7D
333*53ee8cc1Swenshuai.xi #define GOP_MIU_GROUP           (MIU0_REG_BASE+(GOP_CLIENT_REG*2))
334*53ee8cc1Swenshuai.xi #define GOP_MIU_GROUP1          (MIU_REG_BASE+(GOP_CLIENT_REG*2))
335*53ee8cc1Swenshuai.xi 
336*53ee8cc1Swenshuai.xi /*Define each gop miu clint bit*/
337*53ee8cc1Swenshuai.xi #define GOP_MIU_CLIENT_DWIN     0xFF
338*53ee8cc1Swenshuai.xi #define GOP_MIU_CLIENT_GOP0     0x0
339*53ee8cc1Swenshuai.xi #define GOP_MIU_CLIENT_GOP1     0x1
340*53ee8cc1Swenshuai.xi #define GOP_MIU_CLIENT_GOP2     0x2
341*53ee8cc1Swenshuai.xi #define GOP_MIU_CLIENT_GOP3     0x3
342*53ee8cc1Swenshuai.xi #define GOP_MIU_CLIENT_GOP4     0x4
343*53ee8cc1Swenshuai.xi 
344*53ee8cc1Swenshuai.xi #define GOP5_CLIENT_REG          0x7C
345*53ee8cc1Swenshuai.xi #define GOP5_MIU_GROUP           (MIU0_REG_BASE+(GOP5_CLIENT_REG*2))
346*53ee8cc1Swenshuai.xi #define GOP5_MIU_GROUP1          (MIU_REG_BASE+(GOP5_CLIENT_REG*2))
347*53ee8cc1Swenshuai.xi #define GOP_MIU_CLIENT_GOP5     0x2
348*53ee8cc1Swenshuai.xi 
349*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
350*53ee8cc1Swenshuai.xi // GOP Reg
351*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
352*53ee8cc1Swenshuai.xi #define GOP_REG(bk, reg)                     (GOP_REG_BASE+((MS_U32)(bk)<<16) + (reg) * 2)
353*53ee8cc1Swenshuai.xi #define __GOP_REG(reg)                       (GOP_REG_BASE+(reg) * 2)
354*53ee8cc1Swenshuai.xi #define GOP_REG_DIRECT_BASE                  (0x120200)
355*53ee8cc1Swenshuai.xi #define GOP_REG_GOP4_BK_OFFSET               0x1900
356*53ee8cc1Swenshuai.xi #define GOP_REG_GOP4_GW_OFFSET               0x1C00
357*53ee8cc1Swenshuai.xi #define GOP_REG_GOP4_ST_OFFSET               0x1D00
358*53ee8cc1Swenshuai.xi 
359*53ee8cc1Swenshuai.xi #define GOP_REG_VAL(x)                       (1<<x)
360*53ee8cc1Swenshuai.xi 
361*53ee8cc1Swenshuai.xi //MUX Setting
362*53ee8cc1Swenshuai.xi #define GOP_MUX_SHIFT                       0x3
363*53ee8cc1Swenshuai.xi #define GOP_REGMUX_MASK                     BMASK((GOP_MUX_SHIFT-1):0)
364*53ee8cc1Swenshuai.xi #define GOP_MUX0_MASK                       (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*0))
365*53ee8cc1Swenshuai.xi #define GOP_MUX1_MASK                       (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*1))
366*53ee8cc1Swenshuai.xi #define GOP_MUX2_MASK                       (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*2))
367*53ee8cc1Swenshuai.xi #define GOP_MUX3_MASK                       (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*3))
368*53ee8cc1Swenshuai.xi #define GOP_MUX4_MASK                       (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*4))
369*53ee8cc1Swenshuai.xi #define GOP_MUX4_SHIFT                      1<<14
370*53ee8cc1Swenshuai.xi 
371*53ee8cc1Swenshuai.xi //Priority Setting
372*53ee8cc1Swenshuai.xi #define GOP_REGPRI_MASK                     BMASK(1:0)
373*53ee8cc1Swenshuai.xi #define GWIN0_PRI_SHIFT                     0
374*53ee8cc1Swenshuai.xi #define GWIN0_PRI_MASK                      (GOP_REGPRI_MASK<<GWIN0_PRI_SHIFT)
375*53ee8cc1Swenshuai.xi #define GWIN1_PRI_SHIFT                     4
376*53ee8cc1Swenshuai.xi #define GWIN1_PRI_MASK                      (GOP_REGPRI_MASK<<GWIN1_PRI_SHIFT)
377*53ee8cc1Swenshuai.xi #define GWIN2_PRI_SHIFT                     8
378*53ee8cc1Swenshuai.xi #define GWIN2_PRI_MASK                      (GOP_REGPRI_MASK<<GWIN2_PRI_SHIFT)
379*53ee8cc1Swenshuai.xi #define GWIN3_PRI_SHIFT                     12
380*53ee8cc1Swenshuai.xi #define GWIN3_PRI_MASK                      (GOP_REGPRI_MASK<<GWIN3_PRI_SHIFT)
381*53ee8cc1Swenshuai.xi 
382*53ee8cc1Swenshuai.xi //IP and VOP MUX Setting
383*53ee8cc1Swenshuai.xi #define GOP_IP_MAIN_MUX_SHIFT                 0
384*53ee8cc1Swenshuai.xi #define GOP_IP_MAIN_MUX_MASK                 (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_MAIN_MUX_SHIFT
385*53ee8cc1Swenshuai.xi #define GOP_IP_SUB_MUX_SHIFT                  3
386*53ee8cc1Swenshuai.xi #define GOP_IP_SUB_MUX_MASK                  (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_SUB_MUX_SHIFT
387*53ee8cc1Swenshuai.xi #define GOP_IP_VOP0_MUX_SHIFT                 6
388*53ee8cc1Swenshuai.xi #define GOP_IP_VOP0_MUX_MASK                 (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_VOP0_MUX_SHIFT
389*53ee8cc1Swenshuai.xi #define GOP_IP_VOP1_MUX_SHIFT                 9
390*53ee8cc1Swenshuai.xi #define GOP_IP_VOP1_MUX_MASK                 (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_VOP1_MUX_SHIFT
391*53ee8cc1Swenshuai.xi 
392*53ee8cc1Swenshuai.xi 
393*53ee8cc1Swenshuai.xi //IP and VOP MUX Setting
394*53ee8cc1Swenshuai.xi #define GOP_Mix_MUX0_SHIFT                    0
395*53ee8cc1Swenshuai.xi #define GOP_Mix_MUX0_MASK                    (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_Mix_MUX0_SHIFT
396*53ee8cc1Swenshuai.xi #define GOP_Mix_MUX1_SHIFT                    3
397*53ee8cc1Swenshuai.xi #define GOP_Mix_MUX1_MASK                    (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_Mix_MUX1_SHIFT
398*53ee8cc1Swenshuai.xi #define GOP_VE0_MUX_SHIFT                     6
399*53ee8cc1Swenshuai.xi #define GOP_VE0_MUX_MASK                     (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_VE0_MUX_SHIFT
400*53ee8cc1Swenshuai.xi #define GOP_VE1_MUX_SHIFT                     9
401*53ee8cc1Swenshuai.xi #define GOP_VE1_MUX_MASK                     (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_VE1_MUX_SHIFT
402*53ee8cc1Swenshuai.xi 
403*53ee8cc1Swenshuai.xi 
404*53ee8cc1Swenshuai.xi //4k2k FRC MUX Setting
405*53ee8cc1Swenshuai.xi #define GOP_FRC_MUX_SHIFT                     0x3
406*53ee8cc1Swenshuai.xi #define GOP_FRC_REGMUX_MASK                   BMASK((GOP_MUX_SHIFT-1):0)
407*53ee8cc1Swenshuai.xi #define GOP_FRC_MUX0_MASK                     (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*0))
408*53ee8cc1Swenshuai.xi #define GOP_FRC_MUX1_MASK                     (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*1))
409*53ee8cc1Swenshuai.xi #define GOP_FRC_MUX2_MASK                     (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*2))
410*53ee8cc1Swenshuai.xi #define GOP_FRC_MUX3_MASK                     (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*3))
411*53ee8cc1Swenshuai.xi 
412*53ee8cc1Swenshuai.xi // for gwin color format mask
413*53ee8cc1Swenshuai.xi #define GOP_REG_COLORTYPE_MASK              BMASK(4:0)
414*53ee8cc1Swenshuai.xi #define GOP_REG_COLORTYPE_SHIFT             4
415*53ee8cc1Swenshuai.xi 
416*53ee8cc1Swenshuai.xi //DIP Setting
417*53ee8cc1Swenshuai.xi #define GOP_DIP_MUX_SHIFT                     12
418*53ee8cc1Swenshuai.xi #define GOP_DIP_MUX_MASK                     (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_DIP_MUX_SHIFT
419*53ee8cc1Swenshuai.xi 
420*53ee8cc1Swenshuai.xi #define GOP_BANK_OFFSET                       0x3
421*53ee8cc1Swenshuai.xi #define GOP_4G_OFST                           0x0
422*53ee8cc1Swenshuai.xi #define GOP_2G_OFST                           (0x1*GOP_BANK_OFFSET)
423*53ee8cc1Swenshuai.xi #define GOP_1G_OFST                           (0x2*GOP_BANK_OFFSET)
424*53ee8cc1Swenshuai.xi #define GOP_1GX_OFST                          (0x3*GOP_BANK_OFFSET)
425*53ee8cc1Swenshuai.xi #define GOP_DW_OFST                           (0x4*GOP_BANK_OFFSET)
426*53ee8cc1Swenshuai.xi #define GOP_AFBC_OFST                         0xE
427*53ee8cc1Swenshuai.xi #define GOP_MIXER_OFST                        0xD
428*53ee8cc1Swenshuai.xi #define GOP_1GS0_OFST                         0x15
429*53ee8cc1Swenshuai.xi #define GOP_1GS1_OFST                         0x19
430*53ee8cc1Swenshuai.xi 
431*53ee8cc1Swenshuai.xi #define GOP_OFFSET_WR                       8
432*53ee8cc1Swenshuai.xi #define GOP_VAL_WR                          GOP_REG_VAL(GOP_OFFSET_WR)
433*53ee8cc1Swenshuai.xi #define GOP_OFFSET_FWR                      9
434*53ee8cc1Swenshuai.xi #define GOP_VAL_FWR                         GOP_REG_VAL(GOP_OFFSET_FWR)
435*53ee8cc1Swenshuai.xi #define GOP_OFFSET_FCLR                     11
436*53ee8cc1Swenshuai.xi #define GOP_VAL_FCL                         GOP_REG_VAL(GOP_OFFSET_FCLR)
437*53ee8cc1Swenshuai.xi #define GOP4G_OFFSET_WR_ACK                 12
438*53ee8cc1Swenshuai.xi #define GOP4G_VAL_WR_ACK                    GOP_REG_VAL(GOP4G_OFFSET_WR_ACK)
439*53ee8cc1Swenshuai.xi #define GOP2G_OFFSET_WR_ACK                 13
440*53ee8cc1Swenshuai.xi #define GOP2G_VAL_WR_ACK                    GOP_REG_VAL(GOP2G_OFFSET_WR_ACK)
441*53ee8cc1Swenshuai.xi #define GOPD_OFFSET_WR_ACK                  14
442*53ee8cc1Swenshuai.xi #define GOPD_VAL_WR_ACK                     GOP_REG_VAL(GOPD_OFFSET_WR_ACK)
443*53ee8cc1Swenshuai.xi #define GOP1G_OFFSET_WR_ACK                 15
444*53ee8cc1Swenshuai.xi #define GOP1G_VAL_WR_ACK                    GOP_REG_VAL(GOPD_OFFSET_WR_ACK)
445*53ee8cc1Swenshuai.xi #define GOP_VAL_ACK(x)                      GOP_REG_VAL(GOP4G_OFFSET_WR_ACK+x)
446*53ee8cc1Swenshuai.xi 
447*53ee8cc1Swenshuai.xi #define GOP_4G_CTRL0                        GOP_REG(GOP_4G_OFST, 0x00)
448*53ee8cc1Swenshuai.xi #define GOP_4G_CTRL1                        GOP_REG(GOP_4G_OFST, 0x01)
449*53ee8cc1Swenshuai.xi #define GOP_4G_RATE                         GOP_REG(GOP_4G_OFST, 0x02)
450*53ee8cc1Swenshuai.xi #define GOP_4G_PALDATA_L                    GOP_REG(GOP_4G_OFST, 0x03)
451*53ee8cc1Swenshuai.xi #define GOP_4G_PALDATA_H                    GOP_REG(GOP_4G_OFST, 0x04)
452*53ee8cc1Swenshuai.xi #define GOP_4G_PALCTRL                      GOP_REG(GOP_4G_OFST, 0x05)
453*53ee8cc1Swenshuai.xi #define GOP_4G_REGDMA_END                   GOP_REG(GOP_4G_OFST, 0x06)
454*53ee8cc1Swenshuai.xi #define GOP_4G_REGDMA_STR                   GOP_REG(GOP_4G_OFST, 0x07)
455*53ee8cc1Swenshuai.xi #define GOP_4G_INT                          GOP_REG(GOP_4G_OFST, 0x08)
456*53ee8cc1Swenshuai.xi #define GOP_4G_HWSTATE                      GOP_REG(GOP_4G_OFST, 0x09)
457*53ee8cc1Swenshuai.xi #define GOP_4G_SVM_HSTR                     GOP_REG(GOP_4G_OFST, 0x0a)
458*53ee8cc1Swenshuai.xi #define GOP_4G_SVM_HEND                     GOP_REG(GOP_4G_OFST, 0x0b)
459*53ee8cc1Swenshuai.xi #define GOP_4G_SVM_VSTR                     GOP_REG(GOP_4G_OFST, 0x0c)
460*53ee8cc1Swenshuai.xi #define GOP_4G_SVM_VEND                     GOP_REG(GOP_4G_OFST, 0x0d)
461*53ee8cc1Swenshuai.xi #define GOP_4G_RDMA_HT                      GOP_REG(GOP_4G_OFST, 0x0e)
462*53ee8cc1Swenshuai.xi #define GOP_4G_HS_PIPE                      GOP_REG(GOP_4G_OFST, 0x0f)
463*53ee8cc1Swenshuai.xi #define GOP_4G_SLOW                         GOP_REG(GOP_4G_OFST, 0x10)
464*53ee8cc1Swenshuai.xi #define GOP_4G_BRI                          GOP_REG(GOP_4G_OFST, 0x11)
465*53ee8cc1Swenshuai.xi #define GOP_4G_CON                          GOP_REG(GOP_4G_OFST, 0x12)
466*53ee8cc1Swenshuai.xi #define GOP_4G_BW                           GOP_REG(GOP_4G_OFST, 0x19)
467*53ee8cc1Swenshuai.xi #define GOP_4G_H121                         GOP_REG(GOP_4G_OFST, 0x1B)
468*53ee8cc1Swenshuai.xi #define GOP_4G_NEW_BW                       GOP_REG(GOP_4G_OFST, 0x1C)
469*53ee8cc1Swenshuai.xi #define GOP_4G_SRAM_BORROW                  GOP_REG(GOP_4G_OFST, 0x1D)
470*53ee8cc1Swenshuai.xi #define GOP_4G_3D_MIDDLE                    GOP_REG(GOP_4G_OFST, 0x1E)
471*53ee8cc1Swenshuai.xi #define GOP_4G_MIU_SEL                      GOP_REG(GOP_4G_OFST, 0x1F)
472*53ee8cc1Swenshuai.xi #define GOP_4G_PRI0                         GOP_REG(GOP_4G_OFST, 0x20)
473*53ee8cc1Swenshuai.xi #define GOP_4G_BOT_HS                       GOP_REG(GOP_4G_OFST, 0x23)
474*53ee8cc1Swenshuai.xi #define GOP_4G_TRSCLR_L                     GOP_REG(GOP_4G_OFST, 0x24)
475*53ee8cc1Swenshuai.xi #define GOP_4G_TRSCLR_H                     GOP_REG(GOP_4G_OFST, 0x25)
476*53ee8cc1Swenshuai.xi #define GOP_4G_TRSCLR_TUV_L                 GOP_REG(GOP_4G_OFST, 0x26)
477*53ee8cc1Swenshuai.xi #define GOP_4G_TRSCLR_TUV_H                 GOP_REG(GOP_4G_OFST, 0x27)
478*53ee8cc1Swenshuai.xi #define GOP_4G_YUV_SWAP                     GOP_REG(GOP_4G_OFST, 0x28)
479*53ee8cc1Swenshuai.xi #define GOP_4G_OP_MUX_DBF                   GOP_REG(GOP_4G_OFST, 0x29)
480*53ee8cc1Swenshuai.xi #define GOP_4G_STRCH_HSZ                    GOP_REG(GOP_4G_OFST, 0x30)
481*53ee8cc1Swenshuai.xi #define GOP_4G_STRCH_VSZ                    GOP_REG(GOP_4G_OFST, 0x31)
482*53ee8cc1Swenshuai.xi #define GOP_4G_STRCH_HSTR                   GOP_REG(GOP_4G_OFST, 0x32)
483*53ee8cc1Swenshuai.xi #define GOP_4G_STRCH_VSTR                   GOP_REG(GOP_4G_OFST, 0x34)
484*53ee8cc1Swenshuai.xi #define GOP_4G_HSTRCH                       GOP_REG(GOP_4G_OFST, 0x35)
485*53ee8cc1Swenshuai.xi #define GOP_4G_VSTRCH                       GOP_REG(GOP_4G_OFST, 0x36)
486*53ee8cc1Swenshuai.xi #define GOP_4G_HSTRCH_INI                   GOP_REG(GOP_4G_OFST, 0x38)
487*53ee8cc1Swenshuai.xi #define GOP_4G_VSTRCH_INI                   GOP_REG(GOP_4G_OFST, 0x39)
488*53ee8cc1Swenshuai.xi #define GOP_4G_HVSTRCHMD                    GOP_REG(GOP_4G_OFST, 0x3a)
489*53ee8cc1Swenshuai.xi #define GOP_4G_OLDADDR                      GOP_REG(GOP_4G_OFST, 0x3b)
490*53ee8cc1Swenshuai.xi #define GOP_4G_MULTI_ALPHA                  GOP_REG(GOP_4G_OFST, 0x3c)
491*53ee8cc1Swenshuai.xi #define GOP_4G_VIP_VOP_TIMING_SEL           GOP_4G_MULTI_ALPHA
492*53ee8cc1Swenshuai.xi #define GOP_4G_TWO_LINEBUFFER               GOP_4G_MULTI_ALPHA
493*53ee8cc1Swenshuai.xi #define GOP_4G_HW_USAGE                     GOP_REG(GOP_4G_OFST, 0x40)
494*53ee8cc1Swenshuai.xi #define GOP_4G_BANK_FWR                     GOP_REG(GOP_4G_OFST, 0x50)
495*53ee8cc1Swenshuai.xi #define GOP_4G_BANK_HVAILDSIZE              GOP_REG(GOP_4G_OFST, 0x52)
496*53ee8cc1Swenshuai.xi #define GOP_4G_BANK_VVAILDSIZE              GOP_REG(GOP_4G_OFST, 0x53)
497*53ee8cc1Swenshuai.xi #define GOP_4G_SCALING_H_OUTPUTSIZE         GOP_REG(GOP_4G_OFST, 0x56)
498*53ee8cc1Swenshuai.xi #define GOP_4G_SCALING_HRATIO_L             GOP_REG(GOP_4G_OFST, 0x59)  //GOP scaling down ratio  dst / out * 2^20
499*53ee8cc1Swenshuai.xi #define GOP_4G_SCALING_HRATIO_H             GOP_REG(GOP_4G_OFST, 0x5A)
500*53ee8cc1Swenshuai.xi #define GOP_4G_SCALING_CFG                  GOP_REG(GOP_4G_OFST, 0x5B)
501*53ee8cc1Swenshuai.xi #define GOP_4G_SCALING_VRATIO_L             GOP_REG(GOP_4G_OFST, 0x5C)  //GOP scaling down ratio  dst / out * 2^20
502*53ee8cc1Swenshuai.xi #define GOP_4G_SCALING_VRATIO_H             GOP_REG(GOP_4G_OFST, 0x5D)
503*53ee8cc1Swenshuai.xi 
504*53ee8cc1Swenshuai.xi 
505*53ee8cc1Swenshuai.xi #define GOP_4G_RBLK0_VOFFL                  GOP_REG(GOP_4G_OFST, 0x60)
506*53ee8cc1Swenshuai.xi #define GOP_4G_RBLK0_VOFFH                  GOP_REG(GOP_4G_OFST, 0x61)
507*53ee8cc1Swenshuai.xi #define GOP_4G_RBLK1_VOFFL                  GOP_REG(GOP_4G_OFST, 0x62)
508*53ee8cc1Swenshuai.xi #define GOP_4G_RBLK1_VOFFH                  GOP_REG(GOP_4G_OFST, 0x63)
509*53ee8cc1Swenshuai.xi #define GOP_4G_RBLK2_VOFFL                  GOP_REG(GOP_4G_OFST, 0x64)
510*53ee8cc1Swenshuai.xi #define GOP_4G_RBLK2_VOFFH                  GOP_REG(GOP_4G_OFST, 0x65)
511*53ee8cc1Swenshuai.xi #define GOP_4G_RBLK3_VOFFL                  GOP_REG(GOP_4G_OFST, 0x66)
512*53ee8cc1Swenshuai.xi #define GOP_4G_RBLK3_VOFFH                  GOP_REG(GOP_4G_OFST, 0x67)
513*53ee8cc1Swenshuai.xi #define GOP_4G_RBLK0_HOFF                   GOP_REG(GOP_4G_OFST, 0x70)
514*53ee8cc1Swenshuai.xi #define GOP_4G_RBLK1_HOFF                   GOP_REG(GOP_4G_OFST, 0x71)
515*53ee8cc1Swenshuai.xi #define GOP_4G_RBLK2_HOFF                   GOP_REG(GOP_4G_OFST, 0x72)
516*53ee8cc1Swenshuai.xi #define GOP_4G_RBLK3_HOFF                   GOP_REG(GOP_4G_OFST, 0x73)
517*53ee8cc1Swenshuai.xi #define GOP_4G_REGDMA_EN                    GOP_REG(GOP_4G_OFST, 0x78)
518*53ee8cc1Swenshuai.xi #define GOP_MUX_IPVOP                       __GOP_REG(0x77)
519*53ee8cc1Swenshuai.xi #define GOP_MUX_SC1                         __GOP_REG(0x7A)
520*53ee8cc1Swenshuai.xi #define GOP_MUX4_MIX_VE                     __GOP_REG(0x7B)
521*53ee8cc1Swenshuai.xi #define GOP_BAK_SEL_EX                      __GOP_REG(0x7C)
522*53ee8cc1Swenshuai.xi #define GOP_MUX_4K2K                        __GOP_REG(0x7D)
523*53ee8cc1Swenshuai.xi #define GOP_MUX                             __GOP_REG(0x7e)
524*53ee8cc1Swenshuai.xi #define GOP_BAK_SEL                         __GOP_REG(0x7f)
525*53ee8cc1Swenshuai.xi 
526*53ee8cc1Swenshuai.xi #define GOP_4G_GWIN0_CTRL(id)               GOP_REG(GOP_4G_OFST+1, 0x00 + (0x20*((id)%MAX_GOP0_GWIN)))
527*53ee8cc1Swenshuai.xi #define GOP_4G_DRAM_RBLK_L(id)              GOP_REG(GOP_4G_OFST+1, 0x01 + (0x20*((id)%MAX_GOP0_GWIN)))
528*53ee8cc1Swenshuai.xi #define GOP_4G_DRAM_RBLK_H(id)              GOP_REG(GOP_4G_OFST+1, 0x02 + (0x20*((id)%MAX_GOP0_GWIN)))
529*53ee8cc1Swenshuai.xi #define GOP_4G_DEL_PIXEL(id)                GOP_REG(GOP_4G_OFST+1, 0x03 + (0x20*((id)%MAX_GOP1_GWIN)))
530*53ee8cc1Swenshuai.xi #define GOP_4G_HSTR(id)                     GOP_REG(GOP_4G_OFST+1, 0x04 + (0x20*((id)%MAX_GOP0_GWIN)))
531*53ee8cc1Swenshuai.xi #define GOP_4G_HEND(id)                     GOP_REG(GOP_4G_OFST+1, 0x05 + (0x20*((id)%MAX_GOP0_GWIN)))
532*53ee8cc1Swenshuai.xi #define GOP_4G_VSTR(id)                     GOP_REG(GOP_4G_OFST+1, 0x06 + (0x20*((id)%MAX_GOP0_GWIN)))
533*53ee8cc1Swenshuai.xi #define GOP_4G_GWIN_MIDDLE(id)              GOP_REG(GOP_4G_OFST+1, 0x07 + (0x20*((id)%MAX_GOP0_GWIN)))
534*53ee8cc1Swenshuai.xi #define GOP_4G_VEND(id)                     GOP_REG(GOP_4G_OFST+1, 0x08 + (0x20*((id)%MAX_GOP0_GWIN)))
535*53ee8cc1Swenshuai.xi #define GOP_4G_DRAM_RBLK_HSIZE(id)          GOP_REG(GOP_4G_OFST+1, 0x09 + (0x20*((id)%MAX_GOP0_GWIN)))
536*53ee8cc1Swenshuai.xi #define GOP_4G_GWIN_ALPHA01(id)             GOP_REG(GOP_4G_OFST+1, 0x0A + (0x20*((id)%MAX_GOP0_GWIN)))
537*53ee8cc1Swenshuai.xi #define GOP_4G_DRAM_VSTR_L(id)              GOP_REG(GOP_4G_OFST+1, 0x0C + (0x20*((id)%MAX_GOP0_GWIN)))
538*53ee8cc1Swenshuai.xi #define GOP_4G_DRAM_VSTR_H(id)              GOP_REG(GOP_4G_OFST+1, 0x0D + (0x20*((id)%MAX_GOP0_GWIN)))
539*53ee8cc1Swenshuai.xi #define GOP_4G_DRAM_HSTR(id)                GOP_REG(GOP_4G_OFST+1, 0x0E + (0x20*((id)%MAX_GOP0_GWIN)))
540*53ee8cc1Swenshuai.xi #define GOP_4G_DRAM_RBLK_SIZE_L(id)         GOP_REG(GOP_4G_OFST+1, 0x10 + (0x20*((id)%MAX_GOP0_GWIN)))
541*53ee8cc1Swenshuai.xi #define GOP_4G_DRAM_RBLK_SIZE_H(id)         GOP_REG(GOP_4G_OFST+1, 0x11 + (0x20*((id)%MAX_GOP0_GWIN)))
542*53ee8cc1Swenshuai.xi #define GOP_4G_DRAM_RLEN_L(id)              GOP_REG(GOP_4G_OFST+1, 0x12 + (0x20*((id)%MAX_GOP0_GWIN)))
543*53ee8cc1Swenshuai.xi #define GOP_4G_DRAM_RLEN_H(id)              GOP_REG(GOP_4G_OFST+1, 0x13 + (0x20*((id)%MAX_GOP0_GWIN)))
544*53ee8cc1Swenshuai.xi #define GOP_4G_DRAM_HVSTOP_L(id)            GOP_REG(GOP_4G_OFST+1, 0x14 + (0x20*((id)%MAX_GOP0_GWIN)))
545*53ee8cc1Swenshuai.xi #define GOP_4G_DRAM_HVSTOP_H(id)            GOP_REG(GOP_4G_OFST+1, 0x15 + (0x20*((id)%MAX_GOP0_GWIN)))
546*53ee8cc1Swenshuai.xi #define GOP_4G_DRAM_FADE(id)                GOP_REG(GOP_4G_OFST+1, 0x16 + (0x20*((id)%MAX_GOP0_GWIN)))
547*53ee8cc1Swenshuai.xi #define GOP_4G_BG_CLR(id)                   GOP_REG(GOP_4G_OFST+1, 0x18 + (0x20*((id)%MAX_GOP0_GWIN)))
548*53ee8cc1Swenshuai.xi #define GOP_4G_BG_HSTR(id)                  GOP_REG(GOP_4G_OFST+1, 0x19 + (0x20*((id)%MAX_GOP0_GWIN)))
549*53ee8cc1Swenshuai.xi #define GOP_4G_BG_HEND(id)                  GOP_REG(GOP_4G_OFST+1, 0x1a + (0x20*((id)%MAX_GOP0_GWIN)))
550*53ee8cc1Swenshuai.xi #define GOP_4G_BG_VSTR(id)                  GOP_REG(GOP_4G_OFST+1, 0x1C + (0x20*((id)%MAX_GOP0_GWIN)))
551*53ee8cc1Swenshuai.xi #define GOP_4G_BG_VEND(id)                  GOP_REG(GOP_4G_OFST+1, 0x1D + (0x20*((id)%MAX_GOP0_GWIN)))
552*53ee8cc1Swenshuai.xi #define GOP_4G_3DOSD_SUB_RBLK_L(id)         GOP_REG(GOP_4G_OFST+1, 0x1E + (0x20*((id)%MAX_GOP0_GWIN)))
553*53ee8cc1Swenshuai.xi #define GOP_4G_3DOSD_SUB_RBLK_H(id)         GOP_REG(GOP_4G_OFST+1, 0x1F + (0x20*((id)%MAX_GOP0_GWIN)))
554*53ee8cc1Swenshuai.xi 
555*53ee8cc1Swenshuai.xi 
556*53ee8cc1Swenshuai.xi #define GOP_2G_CTRL0                        GOP_REG(GOP_2G_OFST, 0x00)
557*53ee8cc1Swenshuai.xi #define GOP_2G_CTRL1                        GOP_REG(GOP_2G_OFST, 0x01)
558*53ee8cc1Swenshuai.xi #define GOP_2G_RATE                         GOP_REG(GOP_2G_OFST, 0x02)
559*53ee8cc1Swenshuai.xi #define GOP_2G_PALDATA_L                    GOP_REG(GOP_2G_OFST, 0x03)
560*53ee8cc1Swenshuai.xi #define GOP_2G_PALDATA_H                    GOP_REG(GOP_2G_OFST, 0x04)
561*53ee8cc1Swenshuai.xi #define GOP_2G_PALCTRL                      GOP_REG(GOP_2G_OFST, 0x05)
562*53ee8cc1Swenshuai.xi #define GOP_2G_REGDMA_END                   GOP_REG(GOP_2G_OFST, 0x06)
563*53ee8cc1Swenshuai.xi #define GOP_2G_REGDMA_STR                   GOP_REG(GOP_2G_OFST, 0x07)
564*53ee8cc1Swenshuai.xi #define GOP_2G_INT                          GOP_REG(GOP_2G_OFST, 0x08)
565*53ee8cc1Swenshuai.xi #define GOP_2G_HWSTATE                      GOP_REG(GOP_2G_OFST, 0x09)
566*53ee8cc1Swenshuai.xi #define GOP_2G_RDMA_HT                      GOP_REG(GOP_2G_OFST, 0x0e)
567*53ee8cc1Swenshuai.xi #define GOP_2G_HS_PIPE                      GOP_REG(GOP_2G_OFST, 0x0f)
568*53ee8cc1Swenshuai.xi #define GOP_2G_SLOW                         GOP_REG(GOP_2G_OFST, 0x10)
569*53ee8cc1Swenshuai.xi #define GOP_2G_BRI                          GOP_REG(GOP_2G_OFST, 0x11)
570*53ee8cc1Swenshuai.xi #define GOP_2G_CON                          GOP_REG(GOP_2G_OFST, 0x12)
571*53ee8cc1Swenshuai.xi #define GOP_2G_BW                           GOP_REG(GOP_2G_OFST, 0x19)
572*53ee8cc1Swenshuai.xi #define GOP_2G_3D_MIDDLE                    GOP_REG(GOP_2G_OFST, 0x1E)
573*53ee8cc1Swenshuai.xi #define GOP_2G_PRI0                         GOP_REG(GOP_2G_OFST, 0x20)
574*53ee8cc1Swenshuai.xi #define GOP_2G_TRSCLR_L                     GOP_REG(GOP_2G_OFST, 0x24)
575*53ee8cc1Swenshuai.xi #define GOP_2G_TRSCLR_H                     GOP_REG(GOP_2G_OFST, 0x25)
576*53ee8cc1Swenshuai.xi #define GOP_2G_STRCH_HSZ                    GOP_REG(GOP_2G_OFST, 0x30)
577*53ee8cc1Swenshuai.xi #define GOP_2G_STRCH_VSZ                    GOP_REG(GOP_2G_OFST, 0x31)
578*53ee8cc1Swenshuai.xi #define GOP_2G_STRCH_HSTR                   GOP_REG(GOP_2G_OFST, 0x32)
579*53ee8cc1Swenshuai.xi #define GOP_2G_STRCH_VSTR                   GOP_REG(GOP_2G_OFST, 0x34)
580*53ee8cc1Swenshuai.xi #define GOP_2G_HSTRCH                       GOP_REG(GOP_2G_OFST, 0x35)
581*53ee8cc1Swenshuai.xi #define GOP_2G_VSTRCH                       GOP_REG(GOP_2G_OFST, 0x36)
582*53ee8cc1Swenshuai.xi #define GOP_2G_HSTRCH_INI                   GOP_REG(GOP_2G_OFST, 0x38)
583*53ee8cc1Swenshuai.xi #define GOP_2G_VSTRCH_INI                   GOP_REG(GOP_2G_OFST, 0x39)
584*53ee8cc1Swenshuai.xi #define GOP_2G_HVStrch_MD                   GOP_REG(GOP_2G_OFST, 0x3a)
585*53ee8cc1Swenshuai.xi #define GOP_2G_OLDADDR                      GOP_REG(GOP_2G_OFST, 0x3b)
586*53ee8cc1Swenshuai.xi #define GOP_2G_MULTI_ALPHA                  GOP_REG(GOP_2G_OFST, 0x3c)
587*53ee8cc1Swenshuai.xi #define GOP_2G_REGDMA_EN                    GOP_REG(GOP_2G_OFST, 0x78)
588*53ee8cc1Swenshuai.xi 
589*53ee8cc1Swenshuai.xi 
590*53ee8cc1Swenshuai.xi #define GOP_2G_GWIN0_CTRL(id)               GOP_REG(GOP_2G_OFST+1, 0x00 + (0x20*((id)%MAX_GOP1_GWIN)))
591*53ee8cc1Swenshuai.xi #define GOP_2G_GWIN_CTRL(id)                GOP_REG(GOP_2G_OFST+1, 0x00 + (0x20*((id)%MAX_GOP1_GWIN)))
592*53ee8cc1Swenshuai.xi #define GOP_2G_DRAM_RBLK_L(id)              GOP_REG(GOP_2G_OFST+1, 0x01 + (0x20*((id)%MAX_GOP1_GWIN)))
593*53ee8cc1Swenshuai.xi #define GOP_2G_DRAM_RBLK_H(id)              GOP_REG(GOP_2G_OFST+1, 0x02 + (0x20*((id)%MAX_GOP1_GWIN)))
594*53ee8cc1Swenshuai.xi #define GOP_2G_DEL_PIXEL(id)                GOP_REG(GOP_2G_OFST+1, 0x03 + (0x20*((id)%MAX_GOP1_GWIN)))
595*53ee8cc1Swenshuai.xi #define GOP_2G_HSTR(id)                     GOP_REG(GOP_2G_OFST+1, 0x04 + (0x20*((id)%MAX_GOP1_GWIN)))
596*53ee8cc1Swenshuai.xi #define GOP_2G_HEND(id)                     GOP_REG(GOP_2G_OFST+1, 0x05 + (0x20*((id)%MAX_GOP1_GWIN)))
597*53ee8cc1Swenshuai.xi #define GOP_2G_VSTR(id)                     GOP_REG(GOP_2G_OFST+1, 0x06 + (0x20*((id)%MAX_GOP1_GWIN)))
598*53ee8cc1Swenshuai.xi #define GOP_2G_VEND(id)                     GOP_REG(GOP_2G_OFST+1, 0x08 + (0x20*((id)%MAX_GOP1_GWIN)))
599*53ee8cc1Swenshuai.xi #define GOP_2G_DRAM_RBLK_HSIZE(id)          GOP_REG(GOP_2G_OFST+1, 0x09 + (0x20*((id)%MAX_GOP1_GWIN)))
600*53ee8cc1Swenshuai.xi #define GOP_2G_GWIN_ALPHA01(id)             GOP_REG(GOP_2G_OFST+1, 0x0A + (0x20*((id)%MAX_GOP1_GWIN)))
601*53ee8cc1Swenshuai.xi #define GOP_2G_DRAM_VSTR_L(id)              GOP_REG(GOP_2G_OFST+1, 0x0C + (0x20*((id)%MAX_GOP1_GWIN)))
602*53ee8cc1Swenshuai.xi #define GOP_2G_DRAM_VSTR_H(id)              GOP_REG(GOP_2G_OFST+1, 0x0D + (0x20*((id)%MAX_GOP1_GWIN)))
603*53ee8cc1Swenshuai.xi #define GOP_2G_DRAM_FADE(id)                GOP_REG(GOP_2G_OFST+1, 0x16 + (0x20*((id)%MAX_GOP1_GWIN)))
604*53ee8cc1Swenshuai.xi #define GOP_2G_3DOSD_SUB_RBLK_L(id)         GOP_REG(GOP_2G_OFST+1, 0x1E + (0x20*((id)%MAX_GOP1_GWIN)))
605*53ee8cc1Swenshuai.xi #define GOP_2G_3DOSD_SUB_RBLK_H(id)         GOP_REG(GOP_2G_OFST+1, 0x1F + (0x20*((id)%MAX_GOP1_GWIN)))
606*53ee8cc1Swenshuai.xi 
607*53ee8cc1Swenshuai.xi // DWIN reg
608*53ee8cc1Swenshuai.xi #define GOP_DW_CTL0_EN                          GOP_REG(GOP_DW_OFST, 0x00)
609*53ee8cc1Swenshuai.xi #define GOP_DWIN_EN                             (0x00)
610*53ee8cc1Swenshuai.xi #define GOP_DWIN_EN_VAL                         GOP_REG_VAL(GOP_DWIN_EN)
611*53ee8cc1Swenshuai.xi #define GOP_DWIN_SHOT                           (0x07)
612*53ee8cc1Swenshuai.xi #define GOP_DWIN_SHOT_VAL                       GOP_REG_VAL(GOP_DWIN_SHOT)
613*53ee8cc1Swenshuai.xi 
614*53ee8cc1Swenshuai.xi #define GOP_DW_LSTR_WBE                         GOP_REG(GOP_DW_OFST, 0x01)
615*53ee8cc1Swenshuai.xi #define GOP_DW_INT_MASK                         GOP_REG(GOP_DW_OFST, 0x02)
616*53ee8cc1Swenshuai.xi #define GOP_DW_DEBUG                            GOP_REG(GOP_DW_OFST, 0x03)
617*53ee8cc1Swenshuai.xi #define GOP_DW_ALPHA                            GOP_REG(GOP_DW_OFST, 0x04)
618*53ee8cc1Swenshuai.xi #define GOP_DW_BW                               GOP_REG(GOP_DW_OFST, 0x05)
619*53ee8cc1Swenshuai.xi #define GOP_DW_VSTR                             GOP_REG(GOP_DW_OFST, 0x10)
620*53ee8cc1Swenshuai.xi #define GOP_DW_HSTR                             GOP_REG(GOP_DW_OFST, 0x11)
621*53ee8cc1Swenshuai.xi #define GOP_DW_VEND                             GOP_REG(GOP_DW_OFST, 0x12)
622*53ee8cc1Swenshuai.xi #define GOP_DW_HEND                             GOP_REG(GOP_DW_OFST, 0x13)
623*53ee8cc1Swenshuai.xi #define GOP_DW_HSIZE                            GOP_REG(GOP_DW_OFST, 0x14)
624*53ee8cc1Swenshuai.xi #define GOP_DW_JMPLEN                           GOP_REG(GOP_DW_OFST, 0x15)
625*53ee8cc1Swenshuai.xi #define GOP_DW_DSTR_L                           GOP_REG(GOP_DW_OFST, 0x16)
626*53ee8cc1Swenshuai.xi #define GOP_DW_DSTR_H                           GOP_REG(GOP_DW_OFST, 0x17)
627*53ee8cc1Swenshuai.xi #define GOP_DW_UB_L                             GOP_REG(GOP_DW_OFST, 0x18)
628*53ee8cc1Swenshuai.xi #define GOP_DW_UB_H                             GOP_REG(GOP_DW_OFST, 0x19)
629*53ee8cc1Swenshuai.xi 
630*53ee8cc1Swenshuai.xi #define GOP_DW_PON_DSTR_L                       GOP_REG(GOP_DW_OFST, 0x1a)
631*53ee8cc1Swenshuai.xi #define GOP_DW_PON_DSTR_H                       GOP_REG(GOP_DW_OFST, 0x1b)
632*53ee8cc1Swenshuai.xi #define GOP_DW_PON_UB_L                         GOP_REG(GOP_DW_OFST, 0x1c)
633*53ee8cc1Swenshuai.xi #define GOP_DW_PON_UB_H                         GOP_REG(GOP_DW_OFST, 0x1d)
634*53ee8cc1Swenshuai.xi #define GOP_DW_FRAME_CTRL                       GOP_REG(GOP_DW_OFST, 0x30)
635*53ee8cc1Swenshuai.xi 
636*53ee8cc1Swenshuai.xi #define GOP_VE_DATA_MUX                         GOP_REG(GOP_MIXER_OFST, 0x30)
637*53ee8cc1Swenshuai.xi 
638*53ee8cc1Swenshuai.xi #define GOP_1G_CTRL0                        GOP_REG(GOP_1G_OFST, 0x00)
639*53ee8cc1Swenshuai.xi #define GOP_1G_CTRL1                        GOP_REG(GOP_1G_OFST, 0x01)
640*53ee8cc1Swenshuai.xi #define GOP_1G_RATE                         GOP_REG(GOP_1G_OFST, 0x02)
641*53ee8cc1Swenshuai.xi #define GOP_1G_PALDATA_L                    GOP_REG(GOP_1G_OFST, 0x03)
642*53ee8cc1Swenshuai.xi #define GOP_1G_PALDATA_H                    GOP_REG(GOP_1G_OFST, 0x04)
643*53ee8cc1Swenshuai.xi #define GOP_1G_PALCTRL                      GOP_REG(GOP_1G_OFST, 0x05)
644*53ee8cc1Swenshuai.xi #define GOP_1G_REGDMA_END                   GOP_REG(GOP_1G_OFST, 0x06)
645*53ee8cc1Swenshuai.xi #define GOP_1G_REGDMA_STR                   GOP_REG(GOP_1G_OFST, 0x07)
646*53ee8cc1Swenshuai.xi #define GOP_1G_INT                          GOP_REG(GOP_1G_OFST, 0x08)
647*53ee8cc1Swenshuai.xi #define GOP_1G_HWSTATE                      GOP_REG(GOP_1G_OFST, 0x09)
648*53ee8cc1Swenshuai.xi #define GOP_1G_RDMA_HT                      GOP_REG(GOP_1G_OFST, 0x0e)
649*53ee8cc1Swenshuai.xi #define GOP_1G_HS_PIPE                      GOP_REG(GOP_1G_OFST, 0x0f)
650*53ee8cc1Swenshuai.xi #define GOP_1G_BRI                          GOP_REG(GOP_1G_OFST, 0x11)
651*53ee8cc1Swenshuai.xi #define GOP_1G_CON                          GOP_REG(GOP_1G_OFST, 0x12)
652*53ee8cc1Swenshuai.xi #define GOP_1G_BW                           GOP_REG(GOP_1G_OFST, 0x19)
653*53ee8cc1Swenshuai.xi #define GOP_1G_3D_MIDDLE                    GOP_REG(GOP_1G_OFST, 0x1E)
654*53ee8cc1Swenshuai.xi #define GOP_1G_TRSCLR_L                     GOP_REG(GOP_1G_OFST, 0x24)
655*53ee8cc1Swenshuai.xi #define GOP_1G_TRSCLR_H                     GOP_REG(GOP_1G_OFST, 0x25)
656*53ee8cc1Swenshuai.xi #define GOP_1G_STRCH_HSZ                    GOP_REG(GOP_1G_OFST, 0x30)
657*53ee8cc1Swenshuai.xi #define GOP_1G_STRCH_VSZ                    GOP_REG(GOP_1G_OFST, 0x31)
658*53ee8cc1Swenshuai.xi #define GOP_1G_STRCH_HSTR                   GOP_REG(GOP_1G_OFST, 0x32)
659*53ee8cc1Swenshuai.xi #define GOP_1G_STRCH_VSTR                   GOP_REG(GOP_1G_OFST, 0x34)
660*53ee8cc1Swenshuai.xi #define GOP_1G_HSTRCH                       GOP_REG(GOP_1G_OFST, 0x35)
661*53ee8cc1Swenshuai.xi #define GOP_1G_HSTRCH_INI                   GOP_REG(GOP_1G_OFST, 0x38)
662*53ee8cc1Swenshuai.xi #define GOP_1G_VSTRCH_INI                   GOP_REG(GOP_1G_OFST, 0x39)
663*53ee8cc1Swenshuai.xi #define GOP_1G_HStrch_MD                    GOP_REG(GOP_1G_OFST, 0x3a)
664*53ee8cc1Swenshuai.xi #define GOP_1G_OLDADDR                      GOP_REG(GOP_1G_OFST, 0x3b)
665*53ee8cc1Swenshuai.xi #define GOP_1G_MULTI_ALPHA                  GOP_REG(GOP_1G_OFST, 0x3c)
666*53ee8cc1Swenshuai.xi 
667*53ee8cc1Swenshuai.xi #define GOP_1G_GWIN0_CTRL                   GOP_REG(GOP_1G_OFST+1, 0x0)
668*53ee8cc1Swenshuai.xi #define GOP_1G_DRAM_RBLK_L                  GOP_REG(GOP_1G_OFST+1, 0x1)
669*53ee8cc1Swenshuai.xi #define GOP_1G_DRAM_RBLK_H                  GOP_REG(GOP_1G_OFST+1, 0x2)
670*53ee8cc1Swenshuai.xi #define GOP_1G_DEL_PIXEL                    GOP_REG(GOP_1G_OFST+1, 0x3)
671*53ee8cc1Swenshuai.xi #define GOP_1G_HSTR                         GOP_REG(GOP_1G_OFST+1, 0x4)
672*53ee8cc1Swenshuai.xi #define GOP_1G_HEND                         GOP_REG(GOP_1G_OFST+1, 0x5)
673*53ee8cc1Swenshuai.xi #define GOP_1G_VSTR                         GOP_REG(GOP_1G_OFST+1, 0x6)
674*53ee8cc1Swenshuai.xi #define GOP_1G_VEND                         GOP_REG(GOP_1G_OFST+1, 0x8)
675*53ee8cc1Swenshuai.xi #define GOP_1G_DRAM_RBLK_HSIZE              GOP_REG(GOP_1G_OFST+1, 0x9)
676*53ee8cc1Swenshuai.xi #define GOP_1G_GWIN_ALPHA01                 GOP_REG(GOP_1G_OFST+1, 0xA)
677*53ee8cc1Swenshuai.xi #define GOP_1G_DRAM_VSTR_L                  GOP_REG(GOP_1G_OFST+1, 0x0C)
678*53ee8cc1Swenshuai.xi #define GOP_1G_DRAM_VSTR_H                  GOP_REG(GOP_1G_OFST+1, 0x0D)
679*53ee8cc1Swenshuai.xi #define GOP_1G_DRAM_FADE                    GOP_REG(GOP_1G_OFST+1, 0x16)
680*53ee8cc1Swenshuai.xi #define GOP_1G_3DOSD_SUB_RBLK_L             GOP_REG(GOP_1G_OFST+1, 0x1E)
681*53ee8cc1Swenshuai.xi #define GOP_1G_3DOSD_SUB_RBLK_H             GOP_REG(GOP_1G_OFST+1, 0x1F)
682*53ee8cc1Swenshuai.xi 
683*53ee8cc1Swenshuai.xi #define GOP_1GX_CTRL0                        GOP_REG(GOP_1GX_OFST, 0x00)
684*53ee8cc1Swenshuai.xi #define GOP_1GX_CTRL1                        GOP_REG(GOP_1GX_OFST, 0x01)
685*53ee8cc1Swenshuai.xi #define GOP_1GX_RATE                         GOP_REG(GOP_1GX_OFST, 0x02)
686*53ee8cc1Swenshuai.xi #define GOP_1GX_PALDATA_L                    GOP_REG(GOP_1GX_OFST, 0x03)
687*53ee8cc1Swenshuai.xi #define GOP_1GX_PALDATA_H                    GOP_REG(GOP_1GX_OFST, 0x04)
688*53ee8cc1Swenshuai.xi #define GOP_1GX_PALCTRL                      GOP_REG(GOP_1GX_OFST, 0x05)
689*53ee8cc1Swenshuai.xi #define GOP_1GX_REGDMA_END                   GOP_REG(GOP_1GX_OFST, 0x06)
690*53ee8cc1Swenshuai.xi #define GOP_1GX_REGDMA_STR                   GOP_REG(GOP_1GX_OFST, 0x07)
691*53ee8cc1Swenshuai.xi #define GOP_1GX_INT                          GOP_REG(GOP_1GX_OFST, 0x08)
692*53ee8cc1Swenshuai.xi #define GOP_1GX_HWSTATE                      GOP_REG(GOP_1GX_OFST, 0x09)
693*53ee8cc1Swenshuai.xi #define GOP_1GX_RDMA_HT                      GOP_REG(GOP_1GX_OFST, 0x0e)
694*53ee8cc1Swenshuai.xi #define GOP_1GX_HS_PIPE                      GOP_REG(GOP_1GX_OFST, 0x0f)
695*53ee8cc1Swenshuai.xi #define GOP_1GX_BRI                          GOP_REG(GOP_1GX_OFST, 0x11)
696*53ee8cc1Swenshuai.xi #define GOP_1GX_CON                          GOP_REG(GOP_1GX_OFST, 0x12)
697*53ee8cc1Swenshuai.xi #define GOP_1GX_BW                           GOP_REG(GOP_1GX_OFST, 0x19)
698*53ee8cc1Swenshuai.xi #define GOP_1GX_3D_MIDDLE                    GOP_REG(GOP_1GX_OFST, 0x1E)
699*53ee8cc1Swenshuai.xi #define GOP_1GX_TRSCLR_L                     GOP_REG(GOP_1GX_OFST, 0x24)
700*53ee8cc1Swenshuai.xi #define GOP_1GX_TRSCLR_H                     GOP_REG(GOP_1GX_OFST, 0x25)
701*53ee8cc1Swenshuai.xi #define GOP_1GX_STRCH_HSZ                    GOP_REG(GOP_1GX_OFST, 0x30)
702*53ee8cc1Swenshuai.xi #define GOP_1GX_STRCH_VSZ                    GOP_REG(GOP_1GX_OFST, 0x31)
703*53ee8cc1Swenshuai.xi #define GOP_1GX_STRCH_HSTR                   GOP_REG(GOP_1GX_OFST, 0x32)
704*53ee8cc1Swenshuai.xi #define GOP_1GX_STRCH_VSTR                   GOP_REG(GOP_1GX_OFST, 0x34)
705*53ee8cc1Swenshuai.xi #define GOP_1GX_HSTRCH                       GOP_REG(GOP_1GX_OFST, 0x35)
706*53ee8cc1Swenshuai.xi #define GOP_1GX_HSTRCH_INI                   GOP_REG(GOP_1GX_OFST, 0x38)
707*53ee8cc1Swenshuai.xi #define GOP_1GX_VSTRCH_INI                   GOP_REG(GOP_1GX_OFST, 0x39)
708*53ee8cc1Swenshuai.xi #define GOP_1GX_HStrch_MD                    GOP_REG(GOP_1GX_OFST, 0x3a)
709*53ee8cc1Swenshuai.xi #define GOP_1GX_OLDADDR                      GOP_REG(GOP_1GX_OFST, 0x3b)
710*53ee8cc1Swenshuai.xi #define GOP_1GX_MULTI_ALPHA                  GOP_REG(GOP_1GX_OFST, 0x3c)
711*53ee8cc1Swenshuai.xi 
712*53ee8cc1Swenshuai.xi #define GOP_1GX_GWIN0_CTRL                   GOP_REG(GOP_1GX_OFST+1, 0x00)
713*53ee8cc1Swenshuai.xi #define GOP_1GX_DRAM_RBLK_L                  GOP_REG(GOP_1GX_OFST+1, 0x01)
714*53ee8cc1Swenshuai.xi #define GOP_1GX_DRAM_RBLK_H                  GOP_REG(GOP_1GX_OFST+1, 0x02)
715*53ee8cc1Swenshuai.xi #define GOP_1GX_DEL_PIXEL                    GOP_REG(GOP_1GX_OFST+1, 0x03)
716*53ee8cc1Swenshuai.xi #define GOP_1GX_HSTR                         GOP_REG(GOP_1GX_OFST+1, 0x04)
717*53ee8cc1Swenshuai.xi #define GOP_1GX_HEND                         GOP_REG(GOP_1GX_OFST+1, 0x05)
718*53ee8cc1Swenshuai.xi #define GOP_1GX_VSTR                         GOP_REG(GOP_1GX_OFST+1, 0x06)
719*53ee8cc1Swenshuai.xi #define GOP_1GX_VEND                         GOP_REG(GOP_1GX_OFST+1, 0x08)
720*53ee8cc1Swenshuai.xi #define GOP_1GX_DRAM_RBLK_HSIZE              GOP_REG(GOP_1GX_OFST+1, 0x09)
721*53ee8cc1Swenshuai.xi #define GOP_1GX_GWIN_ALPHA01                 GOP_REG(GOP_1GX_OFST+1, 0x0A)
722*53ee8cc1Swenshuai.xi #define GOP_1GX_DRAM_VSTR_L                  GOP_REG(GOP_1GX_OFST+1, 0x0C)
723*53ee8cc1Swenshuai.xi #define GOP_1GX_DRAM_VSTR_H                  GOP_REG(GOP_1GX_OFST+1, 0x0D)
724*53ee8cc1Swenshuai.xi #define GOP_1GX_DRAM_FADE                    GOP_REG(GOP_1GX_OFST+1, 0x16)
725*53ee8cc1Swenshuai.xi #define GOP_1GX_3DOSD_SUB_RBLK_L             GOP_REG(GOP_1GX_OFST+1, 0x1E)
726*53ee8cc1Swenshuai.xi #define GOP_1GX_3DOSD_SUB_RBLK_H             GOP_REG(GOP_1GX_OFST+1, 0x1F)
727*53ee8cc1Swenshuai.xi 
728*53ee8cc1Swenshuai.xi #define GOP_MIXER_CTRL                          GOP_REG(GOP_MIXER_OFST, 0x0)
729*53ee8cc1Swenshuai.xi 
730*53ee8cc1Swenshuai.xi #define GOP_MIXER_EN_GOP_MIX0           (1<<0)
731*53ee8cc1Swenshuai.xi #define GOP_MIXER_EN_GOP_MIX1           (1<<1)
732*53ee8cc1Swenshuai.xi #define GOP_MIXER_GOP_MIX_MODE          (1<<2)
733*53ee8cc1Swenshuai.xi #define GOP_MIXER_HS_POL                    (1<<5)
734*53ee8cc1Swenshuai.xi #define GOP_MIXER_VS_POL                    (1<<6)
735*53ee8cc1Swenshuai.xi #define GOP_MIXER_EN_FLD_FREERUN_MD (1<<7)
736*53ee8cc1Swenshuai.xi #define GOP_MIXER_INV_FIELD_VEOSD           (1<<8)
737*53ee8cc1Swenshuai.xi #define GOP_MIXER_ABL_POL                       (1<<9)
738*53ee8cc1Swenshuai.xi #define GOP_MIXER_EN_MIX                        (1<<15)
739*53ee8cc1Swenshuai.xi 
740*53ee8cc1Swenshuai.xi 
741*53ee8cc1Swenshuai.xi #define GOP_MIXER_FHST                          GOP_REG(GOP_MIXER_OFST, 0x1)
742*53ee8cc1Swenshuai.xi #define GOP_MIXER_FVST                          GOP_REG(GOP_MIXER_OFST, 0x2)
743*53ee8cc1Swenshuai.xi #define GOP_MIXER_FHEND                         GOP_REG(GOP_MIXER_OFST, 0x3)
744*53ee8cc1Swenshuai.xi #define GOP_MIXER_FVEND                         GOP_REG(GOP_MIXER_OFST, 0x4)
745*53ee8cc1Swenshuai.xi #define GOP_MIXER_HTT                           GOP_REG(GOP_MIXER_OFST, 0x5)
746*53ee8cc1Swenshuai.xi #define GOP_MIXER_HS_DELAY                      GOP_REG(GOP_MIXER_OFST, 0x6)
747*53ee8cc1Swenshuai.xi #define GOP_MIXER_FLD_DELAY_LINE                GOP_REG(GOP_MIXER_OFST, 0x7)
748*53ee8cc1Swenshuai.xi #define GOP_MIXER_FLD_DE_ADJUST                 GOP_REG(GOP_MIXER_OFST, 0x8)
749*53ee8cc1Swenshuai.xi #define GOP_MIXER_C_FIL_COEF0COEF1              GOP_REG(GOP_MIXER_OFST, 0x9)
750*53ee8cc1Swenshuai.xi #define GOP_MIXER_C_FIL_COEF2COEF3              GOP_REG(GOP_MIXER_OFST, 0xa)
751*53ee8cc1Swenshuai.xi #define GOP_MIXER_VFIL_RATIO                    GOP_REG(GOP_MIXER_OFST, 0xb)
752*53ee8cc1Swenshuai.xi #define GOP_MIXER_MIX_DUMMY                     GOP_REG(GOP_MIXER_OFST, 0xc)
753*53ee8cc1Swenshuai.xi #define GOP_MIXER_DEBUG_H                       GOP_REG(GOP_MIXER_OFST, 0xd)
754*53ee8cc1Swenshuai.xi #define GOP_MIXER_DEBUG_V                       GOP_REG(GOP_MIXER_OFST, 0xe)
755*53ee8cc1Swenshuai.xi #define GOP_MIXER_DEBUG_PIXEL_L                 GOP_REG(GOP_MIXER_OFST, 0xf)
756*53ee8cc1Swenshuai.xi #define GOP_MIXER_DEBUG_PIXEL_H                 GOP_REG(GOP_MIXER_OFST, 0x10)
757*53ee8cc1Swenshuai.xi #define GOP_MIXER_VE                            GOP_REG(GOP_MIXER_OFST, 0x11)
758*53ee8cc1Swenshuai.xi #define GOP_MIXER_FULL_WIN_DE                   GOP_REG(GOP_MIXER_OFST, 0x20)
759*53ee8cc1Swenshuai.xi #define GOP_VE_DATA_MUX                         GOP_REG(GOP_MIXER_OFST, 0x30)
760*53ee8cc1Swenshuai.xi 
761*53ee8cc1Swenshuai.xi     #define GOP_MIXER_EN_VFIL                   (1<<0)
762*53ee8cc1Swenshuai.xi     #define GOP_MIXER_EN_VFIL_MASK             GOP_BIT0
763*53ee8cc1Swenshuai.xi     #define GOP_MIXER_VS_FLD_ON                 (1<<7)
764*53ee8cc1Swenshuai.xi     #define GOP_MIXER_VS_FLD_ON_MASK           GOP_BIT7
765*53ee8cc1Swenshuai.xi #define GOP_MIXER_REG_DUMMY                     GOP_REG(GOP_MIXER_OFST, 0x20)
766*53ee8cc1Swenshuai.xi 
767*53ee8cc1Swenshuai.xi #define GOP_1GS0_CTRL0                        GOP_REG(GOP_1GS0_OFST, 0x00)
768*53ee8cc1Swenshuai.xi #define GOP_1GS0_CTRL1                        GOP_REG(GOP_1GS0_OFST, 0x01)
769*53ee8cc1Swenshuai.xi #define GOP_1GS0_RATE                         GOP_REG(GOP_1GS0_OFST, 0x02)
770*53ee8cc1Swenshuai.xi #define GOP_1GS0_PALDATA_L                    GOP_REG(GOP_1GS0_OFST, 0x03)
771*53ee8cc1Swenshuai.xi #define GOP_1GS0_PALDATA_H                    GOP_REG(GOP_1GS0_OFST, 0x04)
772*53ee8cc1Swenshuai.xi #define GOP_1GS0_PALCTRL                      GOP_REG(GOP_1GS0_OFST, 0x05)
773*53ee8cc1Swenshuai.xi #define GOP_1GS0_REGDMA_END                   GOP_REG(GOP_1GS0_OFST, 0x06)
774*53ee8cc1Swenshuai.xi #define GOP_1GS0_REGDMA_STR                   GOP_REG(GOP_1GS0_OFST, 0x07)
775*53ee8cc1Swenshuai.xi #define GOP_1GS0_INT                          GOP_REG(GOP_1GS0_OFST, 0x08)
776*53ee8cc1Swenshuai.xi #define GOP_1GS0_HWSTATE                      GOP_REG(GOP_1GS0_OFST, 0x09)
777*53ee8cc1Swenshuai.xi #define GOP_1GS0_RDMA_HT                      GOP_REG(GOP_1GS0_OFST, 0x0e)
778*53ee8cc1Swenshuai.xi #define GOP_1GS0_HS_PIPE                      GOP_REG(GOP_1GS0_OFST, 0x0f)
779*53ee8cc1Swenshuai.xi #define GOP_1GS0_BRI                          GOP_REG(GOP_1GS0_OFST, 0x11)
780*53ee8cc1Swenshuai.xi #define GOP_1GS0_CON                          GOP_REG(GOP_1GS0_OFST, 0x12)
781*53ee8cc1Swenshuai.xi #define GOP_1GS0_BW                           GOP_REG(GOP_1GS0_OFST, 0x19)
782*53ee8cc1Swenshuai.xi #define GOP_1GS0_TRSCLR_L                     GOP_REG(GOP_1GS0_OFST, 0x24)
783*53ee8cc1Swenshuai.xi #define GOP_1GS0_TRSCLR_H                     GOP_REG(GOP_1GS0_OFST, 0x25)
784*53ee8cc1Swenshuai.xi #define GOP_1GS0_STRCH_HSZ                    GOP_REG(GOP_1GS0_OFST, 0x30)
785*53ee8cc1Swenshuai.xi #define GOP_1GS0_STRCH_VSZ                    GOP_REG(GOP_1GS0_OFST, 0x31)
786*53ee8cc1Swenshuai.xi #define GOP_1GS0_STRCH_HSTR                   GOP_REG(GOP_1GS0_OFST, 0x32)
787*53ee8cc1Swenshuai.xi #define GOP_1GS0_STRCH_VSTR                   GOP_REG(GOP_1GS0_OFST, 0x34)
788*53ee8cc1Swenshuai.xi #define GOP_1GS0_HSTRCH                       GOP_REG(GOP_1GS0_OFST, 0x35)
789*53ee8cc1Swenshuai.xi #define GOP_1GS0_HSTRCH_INI                   GOP_REG(GOP_1GS0_OFST, 0x38)
790*53ee8cc1Swenshuai.xi #define GOP_1GS0_VSTRCH_INI                   GOP_REG(GOP_1GS0_OFST, 0x39)
791*53ee8cc1Swenshuai.xi #define GOP_1GS0_HVStrch_MD                    GOP_REG(GOP_1GS0_OFST, 0x3a)
792*53ee8cc1Swenshuai.xi #define GOP_1GS0_OLDADDR                      GOP_REG(GOP_1GS0_OFST, 0x3b)
793*53ee8cc1Swenshuai.xi #define GOP_1GS0_MULTI_ALPHA                  GOP_REG(GOP_1GS0_OFST, 0x3c)
794*53ee8cc1Swenshuai.xi 
795*53ee8cc1Swenshuai.xi #define GOP_1GS0_GWIN0_CTRL                   GOP_REG(GOP_1GS0_OFST+1, 0x00)
796*53ee8cc1Swenshuai.xi #define GOP_1GS0_DRAM_RBLK_L                  GOP_REG(GOP_1GS0_OFST+1, 0x01)
797*53ee8cc1Swenshuai.xi #define GOP_1GS0_DRAM_RBLK_H                  GOP_REG(GOP_1GS0_OFST+1, 0x02)
798*53ee8cc1Swenshuai.xi #define GOP_1GS0_DEL_PIXEL                    GOP_REG(GOP_1GS0_OFST+1, 0x03)
799*53ee8cc1Swenshuai.xi #define GOP_1GS0_HSTR                         GOP_REG(GOP_1GS0_OFST+1, 0x04)
800*53ee8cc1Swenshuai.xi #define GOP_1GS0_HEND                         GOP_REG(GOP_1GS0_OFST+1, 0x05)
801*53ee8cc1Swenshuai.xi #define GOP_1GS0_VSTR                         GOP_REG(GOP_1GS0_OFST+1, 0x06)
802*53ee8cc1Swenshuai.xi #define GOP_1GS0_VEND                         GOP_REG(GOP_1GS0_OFST+1, 0x08)
803*53ee8cc1Swenshuai.xi #define GOP_1GS0_DRAM_RBLK_HSIZE              GOP_REG(GOP_1GS0_OFST+1, 0x09)
804*53ee8cc1Swenshuai.xi #define GOP_1GS0_GWIN_ALPHA01                 GOP_REG(GOP_1GS0_OFST+1, 0x0A)
805*53ee8cc1Swenshuai.xi #define GOP_1GS0_DRAM_VSTR_L                  GOP_REG(GOP_1GS0_OFST+1, 0x0C)
806*53ee8cc1Swenshuai.xi #define GOP_1GS0_DRAM_VSTR_H                  GOP_REG(GOP_1GS0_OFST+1, 0x0D)
807*53ee8cc1Swenshuai.xi #define GOP_1GS0_DRAM_FADE                    GOP_REG(GOP_1GS0_OFST+1, 0x16)
808*53ee8cc1Swenshuai.xi #define GOP_1GS0_3DOSD_SUB_RBLK_L             GOP_REG(GOP_1GS0_OFST+1, 0x1E)
809*53ee8cc1Swenshuai.xi #define GOP_1GS0_3DOSD_SUB_RBLK_H             GOP_REG(GOP_1GS0_OFST+1, 0x1F)
810*53ee8cc1Swenshuai.xi 
811*53ee8cc1Swenshuai.xi #define GOP_1GS1_CTRL0                        GOP_REG(GOP_1GS1_OFST, 0x00)
812*53ee8cc1Swenshuai.xi #define GOP_1GS1_CTRL1                        GOP_REG(GOP_1GS1_OFST, 0x01)
813*53ee8cc1Swenshuai.xi #define GOP_1GS1_RATE                         GOP_REG(GOP_1GS1_OFST, 0x02)
814*53ee8cc1Swenshuai.xi #define GOP_1GS1_PALDATA_L                    GOP_REG(GOP_1GS1_OFST, 0x03)
815*53ee8cc1Swenshuai.xi #define GOP_1GS1_PALDATA_H                    GOP_REG(GOP_1GS1_OFST, 0x04)
816*53ee8cc1Swenshuai.xi #define GOP_1GS1_PALCTRL                      GOP_REG(GOP_1GS1_OFST, 0x05)
817*53ee8cc1Swenshuai.xi #define GOP_1GS1_REGDMA_END                   GOP_REG(GOP_1GS1_OFST, 0x06)
818*53ee8cc1Swenshuai.xi #define GOP_1GS1_REGDMA_STR                   GOP_REG(GOP_1GS1_OFST, 0x07)
819*53ee8cc1Swenshuai.xi #define GOP_1GS1_INT                          GOP_REG(GOP_1GS1_OFST, 0x08)
820*53ee8cc1Swenshuai.xi #define GOP_1GS1_HWSTATE                      GOP_REG(GOP_1GS1_OFST, 0x09)
821*53ee8cc1Swenshuai.xi #define GOP_1GS1_RDMA_HT                      GOP_REG(GOP_1GS1_OFST, 0x0e)
822*53ee8cc1Swenshuai.xi #define GOP_1GS1_HS_PIPE                      GOP_REG(GOP_1GS1_OFST, 0x0f)
823*53ee8cc1Swenshuai.xi #define GOP_1GS1_BRI                          GOP_REG(GOP_1GS1_OFST, 0x11)
824*53ee8cc1Swenshuai.xi #define GOP_1GS1_CON                          GOP_REG(GOP_1GS1_OFST, 0x12)
825*53ee8cc1Swenshuai.xi #define GOP_1GS1_BW                           GOP_REG(GOP_1GS1_OFST, 0x19)
826*53ee8cc1Swenshuai.xi #define GOP_1GS1_TRSCLR_L                     GOP_REG(GOP_1GS1_OFST, 0x24)
827*53ee8cc1Swenshuai.xi #define GOP_1GS1_TRSCLR_H                     GOP_REG(GOP_1GS1_OFST, 0x25)
828*53ee8cc1Swenshuai.xi #define GOP_1GS1_STRCH_HSZ                    GOP_REG(GOP_1GS1_OFST, 0x30)
829*53ee8cc1Swenshuai.xi #define GOP_1GS1_STRCH_VSZ                    GOP_REG(GOP_1GS1_OFST, 0x31)
830*53ee8cc1Swenshuai.xi #define GOP_1GS1_STRCH_HSTR                   GOP_REG(GOP_1GS1_OFST, 0x32)
831*53ee8cc1Swenshuai.xi #define GOP_1GS1_STRCH_VSTR                   GOP_REG(GOP_1GS1_OFST, 0x34)
832*53ee8cc1Swenshuai.xi #define GOP_1GS1_HSTRCH                       GOP_REG(GOP_1GS1_OFST, 0x35)
833*53ee8cc1Swenshuai.xi #define GOP_1GS1_HSTRCH_INI                   GOP_REG(GOP_1GS1_OFST, 0x38)
834*53ee8cc1Swenshuai.xi #define GOP_1GS1_VSTRCH_INI                   GOP_REG(GOP_1GS1_OFST, 0x39)
835*53ee8cc1Swenshuai.xi #define GOP_1GS1_HVStrch_MD                    GOP_REG(GOP_1GS1_OFST, 0x3a)
836*53ee8cc1Swenshuai.xi #define GOP_1GS1_OLDADDR                      GOP_REG(GOP_1GS1_OFST, 0x3b)
837*53ee8cc1Swenshuai.xi #define GOP_1GS1_MULTI_ALPHA                  GOP_REG(GOP_1GS1_OFST, 0x3c)
838*53ee8cc1Swenshuai.xi 
839*53ee8cc1Swenshuai.xi #define GOP_1GS1_GWIN0_CTRL                   GOP_REG(GOP_1GS1_OFST+1, 0x00)
840*53ee8cc1Swenshuai.xi #define GOP_1GS1_DRAM_RBLK_L                  GOP_REG(GOP_1GS1_OFST+1, 0x01)
841*53ee8cc1Swenshuai.xi #define GOP_1GS1_DRAM_RBLK_H                  GOP_REG(GOP_1GS1_OFST+1, 0x02)
842*53ee8cc1Swenshuai.xi #define GOP_1GS1_DEL_PIXEL                    GOP_REG(GOP_1GS1_OFST+1, 0x03)
843*53ee8cc1Swenshuai.xi #define GOP_1GS1_HSTR                         GOP_REG(GOP_1GS1_OFST+1, 0x04)
844*53ee8cc1Swenshuai.xi #define GOP_1GS1_HEND                         GOP_REG(GOP_1GS1_OFST+1, 0x05)
845*53ee8cc1Swenshuai.xi #define GOP_1GS1_VSTR                         GOP_REG(GOP_1GS1_OFST+1, 0x06)
846*53ee8cc1Swenshuai.xi #define GOP_1GS1_VEND                         GOP_REG(GOP_1GS1_OFST+1, 0x08)
847*53ee8cc1Swenshuai.xi #define GOP_1GS1_DRAM_RBLK_HSIZE              GOP_REG(GOP_1GS1_OFST+1, 0x09)
848*53ee8cc1Swenshuai.xi #define GOP_1GS1_GWIN_ALPHA01                 GOP_REG(GOP_1GS1_OFST+1, 0x0A)
849*53ee8cc1Swenshuai.xi #define GOP_1GS1_DRAM_VSTR_L                  GOP_REG(GOP_1GS1_OFST+1, 0x0C)
850*53ee8cc1Swenshuai.xi #define GOP_1GS1_DRAM_VSTR_H                  GOP_REG(GOP_1GS1_OFST+1, 0x0D)
851*53ee8cc1Swenshuai.xi #define GOP_1GS1_DRAM_FADE                    GOP_REG(GOP_1GS1_OFST+1, 0x16)
852*53ee8cc1Swenshuai.xi #define GOP_1GS1_3DOSD_SUB_RBLK_L             GOP_REG(GOP_1GS1_OFST+1, 0x1E)
853*53ee8cc1Swenshuai.xi #define GOP_1GS1_3DOSD_SUB_RBLK_H             GOP_REG(GOP_1GS1_OFST+1, 0x1F)
854*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
855*53ee8cc1Swenshuai.xi //  Type and Structure
856*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
857*53ee8cc1Swenshuai.xi 
858*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
859*53ee8cc1Swenshuai.xi // GOP Test Pattern Reg
860*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
861*53ee8cc1Swenshuai.xi #define REG_TSTCLR_EN                       GOP_REG(GOP_4G_OFST, 0x00)
862*53ee8cc1Swenshuai.xi #define REG_TSTCLR_ALPHA_EN                 GOP_REG(GOP_4G_OFST+2, 0x00)
863*53ee8cc1Swenshuai.xi #define REG_TLB_TAG_ADDR_L                  GOP_REG(GOP_4G_OFST+2, 0x2C)
864*53ee8cc1Swenshuai.xi #define REG_TLB_TAG_ADDR_H                  GOP_REG(GOP_4G_OFST+2, 0x2D)
865*53ee8cc1Swenshuai.xi #define REG_TLB_TAG_ADDR_RVIEW_L            GOP_REG(GOP_4G_OFST+2, 0x2E)
866*53ee8cc1Swenshuai.xi #define REG_TLB_TAG_ADDR_RVIEW_H            GOP_REG(GOP_4G_OFST+2, 0x2F)
867*53ee8cc1Swenshuai.xi #define REG_TSTCLR_ALPHA                    GOP_REG(GOP_4G_OFST+2, 0x40)
868*53ee8cc1Swenshuai.xi #define REG_R_STC                           GOP_REG(GOP_4G_OFST+2, 0x41)
869*53ee8cc1Swenshuai.xi #define REG_G_STC                           GOP_REG(GOP_4G_OFST+2, 0x48)
870*53ee8cc1Swenshuai.xi #define REG_B_STC                           GOP_REG(GOP_4G_OFST+2, 0x49)
871*53ee8cc1Swenshuai.xi #define REG_TSTCLR_HDUP                     GOP_REG(GOP_4G_OFST+2, 0x01)
872*53ee8cc1Swenshuai.xi #define REG_TSTCLR_VDUP                     GOP_REG(GOP_4G_OFST+2, 0x01)
873*53ee8cc1Swenshuai.xi #define REG_HR_INC                          GOP_REG(GOP_4G_OFST+2, 0x42)
874*53ee8cc1Swenshuai.xi #define REG_HR_INC_SIGNZ                    GOP_REG(GOP_4G_OFST+2, 0x42)
875*53ee8cc1Swenshuai.xi #define REG_HG_INC                          GOP_REG(GOP_4G_OFST+2, 0x43)
876*53ee8cc1Swenshuai.xi #define REG_HG_INC_SIGNZ                    GOP_REG(GOP_4G_OFST+2, 0x43)
877*53ee8cc1Swenshuai.xi #define REG_HB_INC                          GOP_REG(GOP_4G_OFST+2, 0x44)
878*53ee8cc1Swenshuai.xi #define REG_HB_INC_SIGNZ                    GOP_REG(GOP_4G_OFST+2, 0x44)
879*53ee8cc1Swenshuai.xi #define REG_HR_STEP                         GOP_REG(GOP_4G_OFST+2, 0x4A)
880*53ee8cc1Swenshuai.xi #define REG_HG_STEP                         GOP_REG(GOP_4G_OFST+2, 0x4B)
881*53ee8cc1Swenshuai.xi #define REG_HB_STEP                         GOP_REG(GOP_4G_OFST+2, 0x4C)
882*53ee8cc1Swenshuai.xi #define REG_VR_INC                          GOP_REG(GOP_4G_OFST+2, 0x45)
883*53ee8cc1Swenshuai.xi #define REG_VR_INC_SIGNZ                    GOP_REG(GOP_4G_OFST+2, 0x45)
884*53ee8cc1Swenshuai.xi #define REG_VG_INC                          GOP_REG(GOP_4G_OFST+2, 0x46)
885*53ee8cc1Swenshuai.xi #define REG_VG_INC_SIGNZ                    GOP_REG(GOP_4G_OFST+2, 0x46)
886*53ee8cc1Swenshuai.xi #define REG_VB_INC                          GOP_REG(GOP_4G_OFST+2, 0x47)
887*53ee8cc1Swenshuai.xi #define REG_VB_INC_SIGNZ                    GOP_REG(GOP_4G_OFST+2, 0x47)
888*53ee8cc1Swenshuai.xi #define REG_VR_STEP                         GOP_REG(GOP_4G_OFST+2, 0x4D)
889*53ee8cc1Swenshuai.xi #define REG_VG_STEP                         GOP_REG(GOP_4G_OFST+2, 0x4E)
890*53ee8cc1Swenshuai.xi #define REG_VB_STEP                         GOP_REG(GOP_4G_OFST+2, 0x4F)
891*53ee8cc1Swenshuai.xi #define REG_TLB_BASE_ADDR_L                 GOP_REG(GOP_4G_OFST+2, 0x58)
892*53ee8cc1Swenshuai.xi #define REG_TLB_BASE_ADDR_H                 GOP_REG(GOP_4G_OFST+2, 0x59)
893*53ee8cc1Swenshuai.xi #define REG_TLB_BASE_ADDR_RVIEW_L           GOP_REG(GOP_4G_OFST+2, 0x5A)
894*53ee8cc1Swenshuai.xi #define REG_TLB_BASE_ADDR_RVIEW_H           GOP_REG(GOP_4G_OFST+2, 0x5B)
895*53ee8cc1Swenshuai.xi 
896*53ee8cc1Swenshuai.xi #define MASK_TSTCLR_EN                      GOP_BIT6
897*53ee8cc1Swenshuai.xi #define MASK_TSTCLR_ALPHA_EN                GOP_BIT1
898*53ee8cc1Swenshuai.xi #define MASK_TSTCLR_ALPHA                   BMASK(11:8)|BMASK(3:0)
899*53ee8cc1Swenshuai.xi #define MASK_RGB_STC_VALID                  BMASK(7:0)
900*53ee8cc1Swenshuai.xi #define MASK_R_STC                          BMASK(11:8)|BMASK(3:0)
901*53ee8cc1Swenshuai.xi #define MASK_G_STC                          BMASK(11:8)|BMASK(3:0)
902*53ee8cc1Swenshuai.xi #define MASK_B_STC                          BMASK(11:8)|BMASK(3:0)
903*53ee8cc1Swenshuai.xi #define MASK_INI_TSTCLR_EN                  GOP_BIT0
904*53ee8cc1Swenshuai.xi #define MASK_TSTCLR_HDUP                    BMASK(3:2)
905*53ee8cc1Swenshuai.xi #define MASK_TSTCLR_VDUP                    BMASK(1:0)
906*53ee8cc1Swenshuai.xi #define MASK_HR_INC                         BMASK(10:8)|BMASK(3:0)
907*53ee8cc1Swenshuai.xi #define MASK_HR_INC_SIGNZ                   GOP_BIT11
908*53ee8cc1Swenshuai.xi #define MASK_HG_INC                         BMASK(10:8)|BMASK(3:0)
909*53ee8cc1Swenshuai.xi #define MASK_HG_INC_SIGNZ                   GOP_BIT11
910*53ee8cc1Swenshuai.xi #define MASK_HB_INC                         BMASK(10:8)|BMASK(3:0)
911*53ee8cc1Swenshuai.xi #define MASK_HB_INC_SIGNZ                   GOP_BIT11
912*53ee8cc1Swenshuai.xi #define MASK_HR_STEP                        BMASK(11:8)|BMASK(3:0)
913*53ee8cc1Swenshuai.xi #define MASK_HG_STEP                        BMASK(11:8)|BMASK(3:0)
914*53ee8cc1Swenshuai.xi #define MASK_HB_STEP                        BMASK(11:8)|BMASK(3:0)
915*53ee8cc1Swenshuai.xi #define MASK_VR_INC                         BMASK(10:8)|BMASK(3:0)
916*53ee8cc1Swenshuai.xi #define MASK_VR_INC_SIGNZ                   GOP_BIT11
917*53ee8cc1Swenshuai.xi #define MASK_VG_INC                         BMASK(10:8)|BMASK(3:0)
918*53ee8cc1Swenshuai.xi #define MASK_VG_INC_SIGNZ                   GOP_BIT11
919*53ee8cc1Swenshuai.xi #define MASK_VB_INC                         BMASK(10:8)|BMASK(3:0)
920*53ee8cc1Swenshuai.xi #define MASK_VB_INC_SIGNZ                   GOP_BIT11
921*53ee8cc1Swenshuai.xi #define MASK_VR_STEP                        BMASK(11:8)|BMASK(3:0)
922*53ee8cc1Swenshuai.xi #define MASK_VG_STEP                        BMASK(11:8)|BMASK(3:0)
923*53ee8cc1Swenshuai.xi #define MASK_VB_STEP                        BMASK(11:8)|BMASK(3:0)
924*53ee8cc1Swenshuai.xi 
925*53ee8cc1Swenshuai.xi #define SHIFT_TSTCLR_EN                     6
926*53ee8cc1Swenshuai.xi #define SHIFT_TSTCLR_ALPHA_EN               1
927*53ee8cc1Swenshuai.xi #define SHIFT_TSTCLR_ALPHA                  8
928*53ee8cc1Swenshuai.xi #define SHIFT_R_STC                         0
929*53ee8cc1Swenshuai.xi #define SHIFT_G_STC                         0
930*53ee8cc1Swenshuai.xi #define SHIFT_B_STC                         0
931*53ee8cc1Swenshuai.xi #define SHIFT_INI_TSTCLR_EN                 0
932*53ee8cc1Swenshuai.xi #define SHIFT_TSTCLR_HDUP                   2
933*53ee8cc1Swenshuai.xi #define SHIFT_TSTCLR_VDUP                   0
934*53ee8cc1Swenshuai.xi #define SHIFT_HR_INC                        0
935*53ee8cc1Swenshuai.xi #define SHIFT_HR_INC_SIGNZ                  11
936*53ee8cc1Swenshuai.xi #define SHIFT_HG_INC                        0
937*53ee8cc1Swenshuai.xi #define SHIFT_HG_INC_SIGNZ                  11
938*53ee8cc1Swenshuai.xi #define SHIFT_HB_INC                        0
939*53ee8cc1Swenshuai.xi #define SHIFT_HB_INC_SIGNZ                  11
940*53ee8cc1Swenshuai.xi #define SHIFT_HR_STEP                       0
941*53ee8cc1Swenshuai.xi #define SHIFT_HG_STEP                       0
942*53ee8cc1Swenshuai.xi #define SHIFT_HB_STEP                       0
943*53ee8cc1Swenshuai.xi #define SHIFT_VR_INC                        0
944*53ee8cc1Swenshuai.xi #define SHIFT_VR_INC_SIGNZ                  11
945*53ee8cc1Swenshuai.xi #define SHIFT_VG_INC                        0
946*53ee8cc1Swenshuai.xi #define SHIFT_VG_INC_SIGNZ                  11
947*53ee8cc1Swenshuai.xi #define SHIFT_VB_INC                        0
948*53ee8cc1Swenshuai.xi #define SHIFT_VB_INC_SIGNZ                  11
949*53ee8cc1Swenshuai.xi #define SHIFT_VR_STEP                       0
950*53ee8cc1Swenshuai.xi #define SHIFT_VG_STEP                       0
951*53ee8cc1Swenshuai.xi #define SHIFT_VB_STEP                       0
952*53ee8cc1Swenshuai.xi 
953*53ee8cc1Swenshuai.xi 
954*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
955*53ee8cc1Swenshuai.xi // GOP AFBC Reg
956*53ee8cc1Swenshuai.xi //----------------------------------------------------------------------------
957*53ee8cc1Swenshuai.xi #define REG_AFBC_CORE_EN(id)                    GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x00+(0x20*id))
958*53ee8cc1Swenshuai.xi #define REG_AFBC_ADDR_L(id)                     GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x01+(0x20*id))
959*53ee8cc1Swenshuai.xi #define REG_AFBC_ADDR_H(id)                     GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x02+(0x20*id))
960*53ee8cc1Swenshuai.xi #define REG_AFBC_FMT(id)                        GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x0C+(0x20*id))
961*53ee8cc1Swenshuai.xi #define REG_AFBC_WIDTH(id)                      GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x0A+(0x20*id))
962*53ee8cc1Swenshuai.xi #define REG_AFBC_HEIGHT(id)                     GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x0B+(0x20*id))
963*53ee8cc1Swenshuai.xi #define REG_AFBC_RESP(id)                       GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x0F+(0x20*id))
964*53ee8cc1Swenshuai.xi #define REG_AFBC_MIU                            GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x43)
965*53ee8cc1Swenshuai.xi #define REG_AFBC_DEBUG(id)                      GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x44+(0x20*id))
966*53ee8cc1Swenshuai.xi #define REG_AFBC_READCNT(id)                    GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x4C+(0x20*id))
967*53ee8cc1Swenshuai.xi #define REG_AFBC_TRIGGER                        GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x50)
968*53ee8cc1Swenshuai.xi 
969*53ee8cc1Swenshuai.xi #endif // _REG_GOP_H_
970