xref: /linux/drivers/gpu/drm/exynos/regs-decon7.h (revision 4f52e55081fb81d6348ecca1f5e2cd45480ca559)
1*4f52e550SKrzysztof Kozlowski /*
2*4f52e550SKrzysztof Kozlowski  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3*4f52e550SKrzysztof Kozlowski  * Author: Ajay Kumar <ajaykumar.rs@samsung.com>
4*4f52e550SKrzysztof Kozlowski  *
5*4f52e550SKrzysztof Kozlowski  * This program is free software; you can redistribute  it and/or modify it
6*4f52e550SKrzysztof Kozlowski  * under  the terms of  the GNU General  Public License as published by the
7*4f52e550SKrzysztof Kozlowski  * Free Software Foundation;  either version 2 of the  License, or (at your
8*4f52e550SKrzysztof Kozlowski  * option) any later version.
9*4f52e550SKrzysztof Kozlowski  */
10*4f52e550SKrzysztof Kozlowski 
11*4f52e550SKrzysztof Kozlowski /* VIDCON0 */
12*4f52e550SKrzysztof Kozlowski #define VIDCON0					0x00
13*4f52e550SKrzysztof Kozlowski 
14*4f52e550SKrzysztof Kozlowski #define VIDCON0_SWRESET				(1 << 28)
15*4f52e550SKrzysztof Kozlowski #define VIDCON0_DECON_STOP_STATUS		(1 << 2)
16*4f52e550SKrzysztof Kozlowski #define VIDCON0_ENVID				(1 << 1)
17*4f52e550SKrzysztof Kozlowski #define VIDCON0_ENVID_F				(1 << 0)
18*4f52e550SKrzysztof Kozlowski 
19*4f52e550SKrzysztof Kozlowski /* VIDOUTCON0 */
20*4f52e550SKrzysztof Kozlowski #define VIDOUTCON0				0x4
21*4f52e550SKrzysztof Kozlowski 
22*4f52e550SKrzysztof Kozlowski #define VIDOUTCON0_DUAL_MASK			(0x3 << 24)
23*4f52e550SKrzysztof Kozlowski #define VIDOUTCON0_DUAL_ON			(0x3 << 24)
24*4f52e550SKrzysztof Kozlowski #define VIDOUTCON0_DISP_IF_1_ON			(0x2 << 24)
25*4f52e550SKrzysztof Kozlowski #define VIDOUTCON0_DISP_IF_0_ON			(0x1 << 24)
26*4f52e550SKrzysztof Kozlowski #define VIDOUTCON0_DUAL_OFF			(0x0 << 24)
27*4f52e550SKrzysztof Kozlowski #define VIDOUTCON0_IF_SHIFT			23
28*4f52e550SKrzysztof Kozlowski #define VIDOUTCON0_IF_MASK			(0x1 << 23)
29*4f52e550SKrzysztof Kozlowski #define VIDOUTCON0_RGBIF			(0x0 << 23)
30*4f52e550SKrzysztof Kozlowski #define VIDOUTCON0_I80IF			(0x1 << 23)
31*4f52e550SKrzysztof Kozlowski 
32*4f52e550SKrzysztof Kozlowski /* VIDCON3 */
33*4f52e550SKrzysztof Kozlowski #define VIDCON3					0x8
34*4f52e550SKrzysztof Kozlowski 
35*4f52e550SKrzysztof Kozlowski /* VIDCON4 */
36*4f52e550SKrzysztof Kozlowski #define VIDCON4					0xC
37*4f52e550SKrzysztof Kozlowski #define VIDCON4_FIFOCNT_START_EN		(1 << 0)
38*4f52e550SKrzysztof Kozlowski 
39*4f52e550SKrzysztof Kozlowski /* VCLKCON0 */
40*4f52e550SKrzysztof Kozlowski #define VCLKCON0				0x10
41*4f52e550SKrzysztof Kozlowski #define VCLKCON0_CLKVALUP			(1 << 8)
42*4f52e550SKrzysztof Kozlowski #define VCLKCON0_VCLKFREE			(1 << 0)
43*4f52e550SKrzysztof Kozlowski 
44*4f52e550SKrzysztof Kozlowski /* VCLKCON */
45*4f52e550SKrzysztof Kozlowski #define VCLKCON1				0x14
46*4f52e550SKrzysztof Kozlowski #define VCLKCON1_CLKVAL_NUM_VCLK(val)		(((val) & 0xff) << 0)
47*4f52e550SKrzysztof Kozlowski #define VCLKCON2				0x18
48*4f52e550SKrzysztof Kozlowski 
49*4f52e550SKrzysztof Kozlowski /* SHADOWCON */
50*4f52e550SKrzysztof Kozlowski #define SHADOWCON				0x30
51*4f52e550SKrzysztof Kozlowski 
52*4f52e550SKrzysztof Kozlowski #define SHADOWCON_WINx_PROTECT(_win)		(1 << (10 + (_win)))
53*4f52e550SKrzysztof Kozlowski 
54*4f52e550SKrzysztof Kozlowski /* WINCONx */
55*4f52e550SKrzysztof Kozlowski #define WINCON(_win)				(0x50 + ((_win) * 4))
56*4f52e550SKrzysztof Kozlowski 
57*4f52e550SKrzysztof Kozlowski #define WINCONx_BUFSTATUS			(0x3 << 30)
58*4f52e550SKrzysztof Kozlowski #define WINCONx_BUFSEL_MASK			(0x3 << 28)
59*4f52e550SKrzysztof Kozlowski #define WINCONx_BUFSEL_SHIFT			28
60*4f52e550SKrzysztof Kozlowski #define WINCONx_TRIPLE_BUF_MODE			(0x1 << 18)
61*4f52e550SKrzysztof Kozlowski #define WINCONx_DOUBLE_BUF_MODE			(0x0 << 18)
62*4f52e550SKrzysztof Kozlowski #define WINCONx_BURSTLEN_16WORD			(0x0 << 11)
63*4f52e550SKrzysztof Kozlowski #define WINCONx_BURSTLEN_8WORD			(0x1 << 11)
64*4f52e550SKrzysztof Kozlowski #define WINCONx_BURSTLEN_MASK			(0x1 << 11)
65*4f52e550SKrzysztof Kozlowski #define WINCONx_BURSTLEN_SHIFT			11
66*4f52e550SKrzysztof Kozlowski #define WINCONx_BLD_PLANE			(0 << 8)
67*4f52e550SKrzysztof Kozlowski #define WINCONx_BLD_PIX				(1 << 8)
68*4f52e550SKrzysztof Kozlowski #define WINCONx_ALPHA_MUL			(1 << 7)
69*4f52e550SKrzysztof Kozlowski 
70*4f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_MASK			(0xf << 2)
71*4f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_SHIFT			2
72*4f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_16BPP_565		(0x8 << 2)
73*4f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_24BPP_BGRx		(0x7 << 2)
74*4f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_24BPP_RGBx		(0x6 << 2)
75*4f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_24BPP_xBGR		(0x5 << 2)
76*4f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_24BPP_xRGB		(0x4 << 2)
77*4f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_32BPP_BGRA		(0x3 << 2)
78*4f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_32BPP_RGBA		(0x2 << 2)
79*4f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_32BPP_ABGR		(0x1 << 2)
80*4f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_32BPP_ARGB		(0x0 << 2)
81*4f52e550SKrzysztof Kozlowski #define WINCONx_ALPHA_SEL			(1 << 1)
82*4f52e550SKrzysztof Kozlowski #define WINCONx_ENWIN				(1 << 0)
83*4f52e550SKrzysztof Kozlowski 
84*4f52e550SKrzysztof Kozlowski #define WINCON1_ALPHA_MUL_F			(1 << 7)
85*4f52e550SKrzysztof Kozlowski #define WINCON2_ALPHA_MUL_F			(1 << 7)
86*4f52e550SKrzysztof Kozlowski #define WINCON3_ALPHA_MUL_F			(1 << 7)
87*4f52e550SKrzysztof Kozlowski #define WINCON4_ALPHA_MUL_F			(1 << 7)
88*4f52e550SKrzysztof Kozlowski 
89*4f52e550SKrzysztof Kozlowski /*  VIDOSDxH: The height for the OSD image(READ ONLY)*/
90*4f52e550SKrzysztof Kozlowski #define VIDOSD_H(_x)				(0x80 + ((_x) * 4))
91*4f52e550SKrzysztof Kozlowski 
92*4f52e550SKrzysztof Kozlowski /* Frame buffer start addresses: VIDWxxADD0n */
93*4f52e550SKrzysztof Kozlowski #define VIDW_BUF_START(_win)			(0x80 + ((_win) * 0x10))
94*4f52e550SKrzysztof Kozlowski #define VIDW_BUF_START1(_win)			(0x84 + ((_win) * 0x10))
95*4f52e550SKrzysztof Kozlowski #define VIDW_BUF_START2(_win)			(0x88 + ((_win) * 0x10))
96*4f52e550SKrzysztof Kozlowski 
97*4f52e550SKrzysztof Kozlowski #define VIDW_WHOLE_X(_win)			(0x0130 + ((_win) * 8))
98*4f52e550SKrzysztof Kozlowski #define VIDW_WHOLE_Y(_win)			(0x0134 + ((_win) * 8))
99*4f52e550SKrzysztof Kozlowski #define VIDW_OFFSET_X(_win)			(0x0170 + ((_win) * 8))
100*4f52e550SKrzysztof Kozlowski #define VIDW_OFFSET_Y(_win)			(0x0174 + ((_win) * 8))
101*4f52e550SKrzysztof Kozlowski #define VIDW_BLKOFFSET(_win)			(0x01B0 + ((_win) * 4))
102*4f52e550SKrzysztof Kozlowski #define VIDW_BLKSIZE(win)			(0x0200 + ((_win) * 4))
103*4f52e550SKrzysztof Kozlowski 
104*4f52e550SKrzysztof Kozlowski /* Interrupt controls register */
105*4f52e550SKrzysztof Kozlowski #define VIDINTCON2				0x228
106*4f52e550SKrzysztof Kozlowski 
107*4f52e550SKrzysztof Kozlowski #define VIDINTCON1_INTEXTRA1_EN			(1 << 1)
108*4f52e550SKrzysztof Kozlowski #define VIDINTCON1_INTEXTRA0_EN			(1 << 0)
109*4f52e550SKrzysztof Kozlowski 
110*4f52e550SKrzysztof Kozlowski /* Interrupt controls and status register */
111*4f52e550SKrzysztof Kozlowski #define VIDINTCON3				0x22C
112*4f52e550SKrzysztof Kozlowski 
113*4f52e550SKrzysztof Kozlowski #define VIDINTCON1_INTEXTRA1_PEND		(1 << 1)
114*4f52e550SKrzysztof Kozlowski #define VIDINTCON1_INTEXTRA0_PEND		(1 << 0)
115*4f52e550SKrzysztof Kozlowski 
116*4f52e550SKrzysztof Kozlowski /* VIDOSDxA ~ VIDOSDxE */
117*4f52e550SKrzysztof Kozlowski #define VIDOSD_BASE				0x230
118*4f52e550SKrzysztof Kozlowski 
119*4f52e550SKrzysztof Kozlowski #define OSD_STRIDE				0x20
120*4f52e550SKrzysztof Kozlowski 
121*4f52e550SKrzysztof Kozlowski #define VIDOSD_A(_win)				(VIDOSD_BASE + \
122*4f52e550SKrzysztof Kozlowski 						((_win) * OSD_STRIDE) + 0x00)
123*4f52e550SKrzysztof Kozlowski #define VIDOSD_B(_win)				(VIDOSD_BASE + \
124*4f52e550SKrzysztof Kozlowski 						((_win) * OSD_STRIDE) + 0x04)
125*4f52e550SKrzysztof Kozlowski #define VIDOSD_C(_win)				(VIDOSD_BASE + \
126*4f52e550SKrzysztof Kozlowski 						((_win) * OSD_STRIDE) + 0x08)
127*4f52e550SKrzysztof Kozlowski #define VIDOSD_D(_win)				(VIDOSD_BASE + \
128*4f52e550SKrzysztof Kozlowski 						((_win) * OSD_STRIDE) + 0x0C)
129*4f52e550SKrzysztof Kozlowski #define VIDOSD_E(_win)				(VIDOSD_BASE + \
130*4f52e550SKrzysztof Kozlowski 						((_win) * OSD_STRIDE) + 0x10)
131*4f52e550SKrzysztof Kozlowski 
132*4f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_X_MASK			(0x1fff << 13)
133*4f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_X_SHIFT		13
134*4f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_X_LIMIT		0x1fff
135*4f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_X(_x)			(((_x) & 0x1fff) << 13)
136*4f52e550SKrzysztof Kozlowski 
137*4f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_Y_MASK			(0x1fff << 0)
138*4f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_Y_SHIFT		0
139*4f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_Y_LIMIT		0x1fff
140*4f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_Y(_x)			(((_x) & 0x1fff) << 0)
141*4f52e550SKrzysztof Kozlowski 
142*4f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_X_MASK		(0x1fff << 13)
143*4f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_X_SHIFT		13
144*4f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_X_LIMIT		0x1fff
145*4f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_X(_x)			(((_x) & 0x1fff) << 13)
146*4f52e550SKrzysztof Kozlowski 
147*4f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_Y_MASK		(0x1fff << 0)
148*4f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_Y_SHIFT		0
149*4f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_Y_LIMIT		0x1fff
150*4f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_Y(_x)			(((_x) & 0x1fff) << 0)
151*4f52e550SKrzysztof Kozlowski 
152*4f52e550SKrzysztof Kozlowski #define VIDOSDxC_ALPHA0_R_F(_x)			(((_x) & 0xFF) << 16)
153*4f52e550SKrzysztof Kozlowski #define VIDOSDxC_ALPHA0_G_F(_x)			(((_x) & 0xFF) << 8)
154*4f52e550SKrzysztof Kozlowski #define VIDOSDxC_ALPHA0_B_F(_x)			(((_x) & 0xFF) << 0)
155*4f52e550SKrzysztof Kozlowski 
156*4f52e550SKrzysztof Kozlowski #define VIDOSDxD_ALPHA1_R_F(_x)			(((_x) & 0xFF) << 16)
157*4f52e550SKrzysztof Kozlowski #define VIDOSDxD_ALPHA1_G_F(_x)			(((_x) & 0xFF) << 8)
158*4f52e550SKrzysztof Kozlowski #define VIDOSDxD_ALPHA1_B_F(_x)			(((_x) & 0xFF) >> 0)
159*4f52e550SKrzysztof Kozlowski 
160*4f52e550SKrzysztof Kozlowski /* Window MAP (Color map) */
161*4f52e550SKrzysztof Kozlowski #define WINxMAP(_win)				(0x340 + ((_win) * 4))
162*4f52e550SKrzysztof Kozlowski 
163*4f52e550SKrzysztof Kozlowski #define WINxMAP_MAP				(1 << 24)
164*4f52e550SKrzysztof Kozlowski #define WINxMAP_MAP_COLOUR_MASK			(0xffffff << 0)
165*4f52e550SKrzysztof Kozlowski #define WINxMAP_MAP_COLOUR_SHIFT		0
166*4f52e550SKrzysztof Kozlowski #define WINxMAP_MAP_COLOUR_LIMIT		0xffffff
167*4f52e550SKrzysztof Kozlowski #define WINxMAP_MAP_COLOUR(_x)			((_x) << 0)
168*4f52e550SKrzysztof Kozlowski 
169*4f52e550SKrzysztof Kozlowski /* Window colour-key control registers */
170*4f52e550SKrzysztof Kozlowski #define WKEYCON					0x370
171*4f52e550SKrzysztof Kozlowski 
172*4f52e550SKrzysztof Kozlowski #define WKEYCON0				0x00
173*4f52e550SKrzysztof Kozlowski #define WKEYCON1				0x04
174*4f52e550SKrzysztof Kozlowski #define WxKEYCON0_KEYBL_EN			(1 << 26)
175*4f52e550SKrzysztof Kozlowski #define WxKEYCON0_KEYEN_F			(1 << 25)
176*4f52e550SKrzysztof Kozlowski #define WxKEYCON0_DIRCON			(1 << 24)
177*4f52e550SKrzysztof Kozlowski #define WxKEYCON0_COMPKEY_MASK			(0xffffff << 0)
178*4f52e550SKrzysztof Kozlowski #define WxKEYCON0_COMPKEY_SHIFT			0
179*4f52e550SKrzysztof Kozlowski #define WxKEYCON0_COMPKEY_LIMIT			0xffffff
180*4f52e550SKrzysztof Kozlowski #define WxKEYCON0_COMPKEY(_x)			((_x) << 0)
181*4f52e550SKrzysztof Kozlowski #define WxKEYCON1_COLVAL_MASK			(0xffffff << 0)
182*4f52e550SKrzysztof Kozlowski #define WxKEYCON1_COLVAL_SHIFT			0
183*4f52e550SKrzysztof Kozlowski #define WxKEYCON1_COLVAL_LIMIT			0xffffff
184*4f52e550SKrzysztof Kozlowski #define WxKEYCON1_COLVAL(_x)			((_x) << 0)
185*4f52e550SKrzysztof Kozlowski 
186*4f52e550SKrzysztof Kozlowski /* color key control register for hardware window 1 ~ 4. */
187*4f52e550SKrzysztof Kozlowski #define WKEYCON0_BASE(x)		((WKEYCON + WKEYCON0) + ((x - 1) * 8))
188*4f52e550SKrzysztof Kozlowski /* color key value register for hardware window 1 ~ 4. */
189*4f52e550SKrzysztof Kozlowski #define WKEYCON1_BASE(x)		((WKEYCON + WKEYCON1) + ((x - 1) * 8))
190*4f52e550SKrzysztof Kozlowski 
191*4f52e550SKrzysztof Kozlowski /* Window KEY Alpha value */
192*4f52e550SKrzysztof Kozlowski #define WxKEYALPHA(_win)			(0x3A0 + (((_win) - 1) * 0x4))
193*4f52e550SKrzysztof Kozlowski 
194*4f52e550SKrzysztof Kozlowski #define Wx_KEYALPHA_R_F_SHIFT			16
195*4f52e550SKrzysztof Kozlowski #define Wx_KEYALPHA_G_F_SHIFT			8
196*4f52e550SKrzysztof Kozlowski #define Wx_KEYALPHA_B_F_SHIFT			0
197*4f52e550SKrzysztof Kozlowski 
198*4f52e550SKrzysztof Kozlowski /* Blending equation */
199*4f52e550SKrzysztof Kozlowski #define BLENDE(_win)				(0x03C0 + ((_win) * 4))
200*4f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ZERO			0x0
201*4f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ONE				0x1
202*4f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ALPHA_A			0x2
203*4f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ONE_MINUS_ALPHA_A		0x3
204*4f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ALPHA_B			0x4
205*4f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ONE_MINUS_ALPHA_B		0x5
206*4f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ALPHA0			0x6
207*4f52e550SKrzysztof Kozlowski #define BLENDE_COEF_A				0xA
208*4f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ONE_MINUS_A			0xB
209*4f52e550SKrzysztof Kozlowski #define BLENDE_COEF_B				0xC
210*4f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ONE_MINUS_B			0xD
211*4f52e550SKrzysztof Kozlowski #define BLENDE_Q_FUNC(_v)			((_v) << 18)
212*4f52e550SKrzysztof Kozlowski #define BLENDE_P_FUNC(_v)			((_v) << 12)
213*4f52e550SKrzysztof Kozlowski #define BLENDE_B_FUNC(_v)			((_v) << 6)
214*4f52e550SKrzysztof Kozlowski #define BLENDE_A_FUNC(_v)			((_v) << 0)
215*4f52e550SKrzysztof Kozlowski 
216*4f52e550SKrzysztof Kozlowski /* Blending equation control */
217*4f52e550SKrzysztof Kozlowski #define BLENDCON				0x3D8
218*4f52e550SKrzysztof Kozlowski #define BLENDCON_NEW_MASK			(1 << 0)
219*4f52e550SKrzysztof Kozlowski #define BLENDCON_NEW_8BIT_ALPHA_VALUE		(1 << 0)
220*4f52e550SKrzysztof Kozlowski #define BLENDCON_NEW_4BIT_ALPHA_VALUE		(0 << 0)
221*4f52e550SKrzysztof Kozlowski 
222*4f52e550SKrzysztof Kozlowski /* Interrupt control register */
223*4f52e550SKrzysztof Kozlowski #define VIDINTCON0				0x500
224*4f52e550SKrzysztof Kozlowski 
225*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_WAKEUP_MASK			(0x3f << 26)
226*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_INTEXTRAEN			(1 << 21)
227*4f52e550SKrzysztof Kozlowski 
228*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_FRAMESEL0_SHIFT		15
229*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_FRAMESEL0_MASK		(0x3 << 15)
230*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_FRAMESEL0_BACKPORCH		(0x0 << 15)
231*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_FRAMESEL0_VSYNC		(0x1 << 15)
232*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_FRAMESEL0_ACTIVE		(0x2 << 15)
233*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_FRAMESEL0_FRONTPORCH		(0x3 << 15)
234*4f52e550SKrzysztof Kozlowski 
235*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_INT_FRAME			(1 << 11)
236*4f52e550SKrzysztof Kozlowski 
237*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_FIFOLEVEL_MASK		(0x7 << 3)
238*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_FIFOLEVEL_SHIFT		3
239*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_FIFOLEVEL_EMPTY		(0x0 << 3)
240*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_FIFOLEVEL_TO25PC		(0x1 << 3)
241*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_FIFOLEVEL_TO50PC		(0x2 << 3)
242*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_FIFOLEVEL_FULL		(0x4 << 3)
243*4f52e550SKrzysztof Kozlowski 
244*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_FIFOSEL_MAIN_EN		(1 << 1)
245*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_INT_FIFO			(1 << 1)
246*4f52e550SKrzysztof Kozlowski 
247*4f52e550SKrzysztof Kozlowski #define VIDINTCON0_INT_ENABLE			(1 << 0)
248*4f52e550SKrzysztof Kozlowski 
249*4f52e550SKrzysztof Kozlowski /* Interrupt controls and status register */
250*4f52e550SKrzysztof Kozlowski #define VIDINTCON1				0x504
251*4f52e550SKrzysztof Kozlowski 
252*4f52e550SKrzysztof Kozlowski #define VIDINTCON1_INT_EXTRA			(1 << 3)
253*4f52e550SKrzysztof Kozlowski #define VIDINTCON1_INT_I80			(1 << 2)
254*4f52e550SKrzysztof Kozlowski #define VIDINTCON1_INT_FRAME			(1 << 1)
255*4f52e550SKrzysztof Kozlowski #define VIDINTCON1_INT_FIFO			(1 << 0)
256*4f52e550SKrzysztof Kozlowski 
257*4f52e550SKrzysztof Kozlowski /* VIDCON1 */
258*4f52e550SKrzysztof Kozlowski #define VIDCON1(_x)				(0x0600 + ((_x) * 0x50))
259*4f52e550SKrzysztof Kozlowski #define VIDCON1_LINECNT_GET(_v)			(((_v) >> 17) & 0x1fff)
260*4f52e550SKrzysztof Kozlowski #define VIDCON1_VCLK_MASK			(0x3 << 9)
261*4f52e550SKrzysztof Kozlowski #define VIDCON1_VCLK_HOLD			(0x0 << 9)
262*4f52e550SKrzysztof Kozlowski #define VIDCON1_VCLK_RUN			(0x1 << 9)
263*4f52e550SKrzysztof Kozlowski #define VIDCON1_VCLK_RUN_VDEN_DISABLE		(0x3 << 9)
264*4f52e550SKrzysztof Kozlowski #define VIDCON1_RGB_ORDER_O_MASK		(0x7 << 4)
265*4f52e550SKrzysztof Kozlowski #define VIDCON1_RGB_ORDER_O_RGB			(0x0 << 4)
266*4f52e550SKrzysztof Kozlowski #define VIDCON1_RGB_ORDER_O_GBR			(0x1 << 4)
267*4f52e550SKrzysztof Kozlowski #define VIDCON1_RGB_ORDER_O_BRG			(0x2 << 4)
268*4f52e550SKrzysztof Kozlowski #define VIDCON1_RGB_ORDER_O_BGR			(0x4 << 4)
269*4f52e550SKrzysztof Kozlowski #define VIDCON1_RGB_ORDER_O_RBG			(0x5 << 4)
270*4f52e550SKrzysztof Kozlowski #define VIDCON1_RGB_ORDER_O_GRB			(0x6 << 4)
271*4f52e550SKrzysztof Kozlowski 
272*4f52e550SKrzysztof Kozlowski /* VIDTCON0 */
273*4f52e550SKrzysztof Kozlowski #define VIDTCON0				0x610
274*4f52e550SKrzysztof Kozlowski 
275*4f52e550SKrzysztof Kozlowski #define VIDTCON0_VBPD_MASK			(0xffff << 16)
276*4f52e550SKrzysztof Kozlowski #define VIDTCON0_VBPD_SHIFT			16
277*4f52e550SKrzysztof Kozlowski #define VIDTCON0_VBPD_LIMIT			0xffff
278*4f52e550SKrzysztof Kozlowski #define VIDTCON0_VBPD(_x)			((_x) << 16)
279*4f52e550SKrzysztof Kozlowski 
280*4f52e550SKrzysztof Kozlowski #define VIDTCON0_VFPD_MASK			(0xffff << 0)
281*4f52e550SKrzysztof Kozlowski #define VIDTCON0_VFPD_SHIFT			0
282*4f52e550SKrzysztof Kozlowski #define VIDTCON0_VFPD_LIMIT			0xffff
283*4f52e550SKrzysztof Kozlowski #define VIDTCON0_VFPD(_x)			((_x) << 0)
284*4f52e550SKrzysztof Kozlowski 
285*4f52e550SKrzysztof Kozlowski /* VIDTCON1 */
286*4f52e550SKrzysztof Kozlowski #define VIDTCON1				0x614
287*4f52e550SKrzysztof Kozlowski 
288*4f52e550SKrzysztof Kozlowski #define VIDTCON1_VSPW_MASK			(0xffff << 16)
289*4f52e550SKrzysztof Kozlowski #define VIDTCON1_VSPW_SHIFT			16
290*4f52e550SKrzysztof Kozlowski #define VIDTCON1_VSPW_LIMIT			0xffff
291*4f52e550SKrzysztof Kozlowski #define VIDTCON1_VSPW(_x)			((_x) << 16)
292*4f52e550SKrzysztof Kozlowski 
293*4f52e550SKrzysztof Kozlowski /* VIDTCON2 */
294*4f52e550SKrzysztof Kozlowski #define VIDTCON2				0x618
295*4f52e550SKrzysztof Kozlowski 
296*4f52e550SKrzysztof Kozlowski #define VIDTCON2_HBPD_MASK			(0xffff << 16)
297*4f52e550SKrzysztof Kozlowski #define VIDTCON2_HBPD_SHIFT			16
298*4f52e550SKrzysztof Kozlowski #define VIDTCON2_HBPD_LIMIT			0xffff
299*4f52e550SKrzysztof Kozlowski #define VIDTCON2_HBPD(_x)			((_x) << 16)
300*4f52e550SKrzysztof Kozlowski 
301*4f52e550SKrzysztof Kozlowski #define VIDTCON2_HFPD_MASK			(0xffff << 0)
302*4f52e550SKrzysztof Kozlowski #define VIDTCON2_HFPD_SHIFT			0
303*4f52e550SKrzysztof Kozlowski #define VIDTCON2_HFPD_LIMIT			0xffff
304*4f52e550SKrzysztof Kozlowski #define VIDTCON2_HFPD(_x)			((_x) << 0)
305*4f52e550SKrzysztof Kozlowski 
306*4f52e550SKrzysztof Kozlowski /* VIDTCON3 */
307*4f52e550SKrzysztof Kozlowski #define VIDTCON3				0x61C
308*4f52e550SKrzysztof Kozlowski 
309*4f52e550SKrzysztof Kozlowski #define VIDTCON3_HSPW_MASK			(0xffff << 16)
310*4f52e550SKrzysztof Kozlowski #define VIDTCON3_HSPW_SHIFT			16
311*4f52e550SKrzysztof Kozlowski #define VIDTCON3_HSPW_LIMIT			0xffff
312*4f52e550SKrzysztof Kozlowski #define VIDTCON3_HSPW(_x)			((_x) << 16)
313*4f52e550SKrzysztof Kozlowski 
314*4f52e550SKrzysztof Kozlowski /* VIDTCON4 */
315*4f52e550SKrzysztof Kozlowski #define VIDTCON4				0x620
316*4f52e550SKrzysztof Kozlowski 
317*4f52e550SKrzysztof Kozlowski #define VIDTCON4_LINEVAL_MASK			(0xfff << 16)
318*4f52e550SKrzysztof Kozlowski #define VIDTCON4_LINEVAL_SHIFT			16
319*4f52e550SKrzysztof Kozlowski #define VIDTCON4_LINEVAL_LIMIT			0xfff
320*4f52e550SKrzysztof Kozlowski #define VIDTCON4_LINEVAL(_x)			(((_x) & 0xfff) << 16)
321*4f52e550SKrzysztof Kozlowski 
322*4f52e550SKrzysztof Kozlowski #define VIDTCON4_HOZVAL_MASK			(0xfff << 0)
323*4f52e550SKrzysztof Kozlowski #define VIDTCON4_HOZVAL_SHIFT			0
324*4f52e550SKrzysztof Kozlowski #define VIDTCON4_HOZVAL_LIMIT			0xfff
325*4f52e550SKrzysztof Kozlowski #define VIDTCON4_HOZVAL(_x)			(((_x) & 0xfff) << 0)
326*4f52e550SKrzysztof Kozlowski 
327*4f52e550SKrzysztof Kozlowski /* LINECNT OP THRSHOLD*/
328*4f52e550SKrzysztof Kozlowski #define LINECNT_OP_THRESHOLD			0x630
329*4f52e550SKrzysztof Kozlowski 
330*4f52e550SKrzysztof Kozlowski /* CRCCTRL */
331*4f52e550SKrzysztof Kozlowski #define CRCCTRL					0x6C8
332*4f52e550SKrzysztof Kozlowski #define CRCCTRL_CRCCLKEN			(0x1 << 2)
333*4f52e550SKrzysztof Kozlowski #define CRCCTRL_CRCSTART_F			(0x1 << 1)
334*4f52e550SKrzysztof Kozlowski #define CRCCTRL_CRCEN				(0x1 << 0)
335*4f52e550SKrzysztof Kozlowski 
336*4f52e550SKrzysztof Kozlowski /* DECON_CMU */
337*4f52e550SKrzysztof Kozlowski #define DECON_CMU				0x704
338*4f52e550SKrzysztof Kozlowski 
339*4f52e550SKrzysztof Kozlowski #define DECON_CMU_ALL_CLKGATE_ENABLE		0x3
340*4f52e550SKrzysztof Kozlowski #define DECON_CMU_SE_CLKGATE_ENABLE		(0x1 << 2)
341*4f52e550SKrzysztof Kozlowski #define DECON_CMU_SFR_CLKGATE_ENABLE		(0x1 << 1)
342*4f52e550SKrzysztof Kozlowski #define DECON_CMU_MEM_CLKGATE_ENABLE		(0x1 << 0)
343*4f52e550SKrzysztof Kozlowski 
344*4f52e550SKrzysztof Kozlowski /* DECON_UPDATE */
345*4f52e550SKrzysztof Kozlowski #define DECON_UPDATE				0x710
346*4f52e550SKrzysztof Kozlowski 
347*4f52e550SKrzysztof Kozlowski #define DECON_UPDATE_SLAVE_SYNC			(1 << 4)
348*4f52e550SKrzysztof Kozlowski #define DECON_UPDATE_STANDALONE_F		(1 << 0)
349