xref: /linux/drivers/gpu/drm/exynos/regs-decon7.h (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1*2874c5fdSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
24f52e550SKrzysztof Kozlowski /*
34f52e550SKrzysztof Kozlowski  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
44f52e550SKrzysztof Kozlowski  * Author: Ajay Kumar <ajaykumar.rs@samsung.com>
54f52e550SKrzysztof Kozlowski  */
64f52e550SKrzysztof Kozlowski 
7ca52c712SKrzysztof Kozlowski #ifndef EXYNOS_REGS_DECON7_H
8ca52c712SKrzysztof Kozlowski #define EXYNOS_REGS_DECON7_H
9ca52c712SKrzysztof Kozlowski 
104f52e550SKrzysztof Kozlowski /* VIDCON0 */
114f52e550SKrzysztof Kozlowski #define VIDCON0					0x00
124f52e550SKrzysztof Kozlowski 
134f52e550SKrzysztof Kozlowski #define VIDCON0_SWRESET				(1 << 28)
144f52e550SKrzysztof Kozlowski #define VIDCON0_DECON_STOP_STATUS		(1 << 2)
154f52e550SKrzysztof Kozlowski #define VIDCON0_ENVID				(1 << 1)
164f52e550SKrzysztof Kozlowski #define VIDCON0_ENVID_F				(1 << 0)
174f52e550SKrzysztof Kozlowski 
184f52e550SKrzysztof Kozlowski /* VIDOUTCON0 */
194f52e550SKrzysztof Kozlowski #define VIDOUTCON0				0x4
204f52e550SKrzysztof Kozlowski 
214f52e550SKrzysztof Kozlowski #define VIDOUTCON0_DUAL_MASK			(0x3 << 24)
224f52e550SKrzysztof Kozlowski #define VIDOUTCON0_DUAL_ON			(0x3 << 24)
234f52e550SKrzysztof Kozlowski #define VIDOUTCON0_DISP_IF_1_ON			(0x2 << 24)
244f52e550SKrzysztof Kozlowski #define VIDOUTCON0_DISP_IF_0_ON			(0x1 << 24)
254f52e550SKrzysztof Kozlowski #define VIDOUTCON0_DUAL_OFF			(0x0 << 24)
264f52e550SKrzysztof Kozlowski #define VIDOUTCON0_IF_SHIFT			23
274f52e550SKrzysztof Kozlowski #define VIDOUTCON0_IF_MASK			(0x1 << 23)
284f52e550SKrzysztof Kozlowski #define VIDOUTCON0_RGBIF			(0x0 << 23)
294f52e550SKrzysztof Kozlowski #define VIDOUTCON0_I80IF			(0x1 << 23)
304f52e550SKrzysztof Kozlowski 
314f52e550SKrzysztof Kozlowski /* VIDCON3 */
324f52e550SKrzysztof Kozlowski #define VIDCON3					0x8
334f52e550SKrzysztof Kozlowski 
344f52e550SKrzysztof Kozlowski /* VIDCON4 */
354f52e550SKrzysztof Kozlowski #define VIDCON4					0xC
364f52e550SKrzysztof Kozlowski #define VIDCON4_FIFOCNT_START_EN		(1 << 0)
374f52e550SKrzysztof Kozlowski 
384f52e550SKrzysztof Kozlowski /* VCLKCON0 */
394f52e550SKrzysztof Kozlowski #define VCLKCON0				0x10
404f52e550SKrzysztof Kozlowski #define VCLKCON0_CLKVALUP			(1 << 8)
414f52e550SKrzysztof Kozlowski #define VCLKCON0_VCLKFREE			(1 << 0)
424f52e550SKrzysztof Kozlowski 
434f52e550SKrzysztof Kozlowski /* VCLKCON */
444f52e550SKrzysztof Kozlowski #define VCLKCON1				0x14
454f52e550SKrzysztof Kozlowski #define VCLKCON1_CLKVAL_NUM_VCLK(val)		(((val) & 0xff) << 0)
464f52e550SKrzysztof Kozlowski #define VCLKCON2				0x18
474f52e550SKrzysztof Kozlowski 
484f52e550SKrzysztof Kozlowski /* SHADOWCON */
494f52e550SKrzysztof Kozlowski #define SHADOWCON				0x30
504f52e550SKrzysztof Kozlowski 
514f52e550SKrzysztof Kozlowski #define SHADOWCON_WINx_PROTECT(_win)		(1 << (10 + (_win)))
524f52e550SKrzysztof Kozlowski 
534f52e550SKrzysztof Kozlowski /* WINCONx */
544f52e550SKrzysztof Kozlowski #define WINCON(_win)				(0x50 + ((_win) * 4))
554f52e550SKrzysztof Kozlowski 
564f52e550SKrzysztof Kozlowski #define WINCONx_BUFSTATUS			(0x3 << 30)
574f52e550SKrzysztof Kozlowski #define WINCONx_BUFSEL_MASK			(0x3 << 28)
584f52e550SKrzysztof Kozlowski #define WINCONx_BUFSEL_SHIFT			28
594f52e550SKrzysztof Kozlowski #define WINCONx_TRIPLE_BUF_MODE			(0x1 << 18)
604f52e550SKrzysztof Kozlowski #define WINCONx_DOUBLE_BUF_MODE			(0x0 << 18)
614f52e550SKrzysztof Kozlowski #define WINCONx_BURSTLEN_16WORD			(0x0 << 11)
624f52e550SKrzysztof Kozlowski #define WINCONx_BURSTLEN_8WORD			(0x1 << 11)
634f52e550SKrzysztof Kozlowski #define WINCONx_BURSTLEN_MASK			(0x1 << 11)
644f52e550SKrzysztof Kozlowski #define WINCONx_BURSTLEN_SHIFT			11
654f52e550SKrzysztof Kozlowski #define WINCONx_BLD_PLANE			(0 << 8)
664f52e550SKrzysztof Kozlowski #define WINCONx_BLD_PIX				(1 << 8)
674f52e550SKrzysztof Kozlowski #define WINCONx_ALPHA_MUL			(1 << 7)
684f52e550SKrzysztof Kozlowski 
694f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_MASK			(0xf << 2)
704f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_SHIFT			2
714f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_16BPP_565		(0x8 << 2)
724f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_24BPP_BGRx		(0x7 << 2)
734f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_24BPP_RGBx		(0x6 << 2)
744f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_24BPP_xBGR		(0x5 << 2)
754f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_24BPP_xRGB		(0x4 << 2)
764f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_32BPP_BGRA		(0x3 << 2)
774f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_32BPP_RGBA		(0x2 << 2)
784f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_32BPP_ABGR		(0x1 << 2)
794f52e550SKrzysztof Kozlowski #define WINCONx_BPPMODE_32BPP_ARGB		(0x0 << 2)
804f52e550SKrzysztof Kozlowski #define WINCONx_ALPHA_SEL			(1 << 1)
814f52e550SKrzysztof Kozlowski #define WINCONx_ENWIN				(1 << 0)
824f52e550SKrzysztof Kozlowski 
834f52e550SKrzysztof Kozlowski #define WINCON1_ALPHA_MUL_F			(1 << 7)
844f52e550SKrzysztof Kozlowski #define WINCON2_ALPHA_MUL_F			(1 << 7)
854f52e550SKrzysztof Kozlowski #define WINCON3_ALPHA_MUL_F			(1 << 7)
864f52e550SKrzysztof Kozlowski #define WINCON4_ALPHA_MUL_F			(1 << 7)
874f52e550SKrzysztof Kozlowski 
884f52e550SKrzysztof Kozlowski /*  VIDOSDxH: The height for the OSD image(READ ONLY)*/
894f52e550SKrzysztof Kozlowski #define VIDOSD_H(_x)				(0x80 + ((_x) * 4))
904f52e550SKrzysztof Kozlowski 
914f52e550SKrzysztof Kozlowski /* Frame buffer start addresses: VIDWxxADD0n */
924f52e550SKrzysztof Kozlowski #define VIDW_BUF_START(_win)			(0x80 + ((_win) * 0x10))
934f52e550SKrzysztof Kozlowski #define VIDW_BUF_START1(_win)			(0x84 + ((_win) * 0x10))
944f52e550SKrzysztof Kozlowski #define VIDW_BUF_START2(_win)			(0x88 + ((_win) * 0x10))
954f52e550SKrzysztof Kozlowski 
964f52e550SKrzysztof Kozlowski #define VIDW_WHOLE_X(_win)			(0x0130 + ((_win) * 8))
974f52e550SKrzysztof Kozlowski #define VIDW_WHOLE_Y(_win)			(0x0134 + ((_win) * 8))
984f52e550SKrzysztof Kozlowski #define VIDW_OFFSET_X(_win)			(0x0170 + ((_win) * 8))
994f52e550SKrzysztof Kozlowski #define VIDW_OFFSET_Y(_win)			(0x0174 + ((_win) * 8))
1004f52e550SKrzysztof Kozlowski #define VIDW_BLKOFFSET(_win)			(0x01B0 + ((_win) * 4))
1014f52e550SKrzysztof Kozlowski #define VIDW_BLKSIZE(win)			(0x0200 + ((_win) * 4))
1024f52e550SKrzysztof Kozlowski 
1034f52e550SKrzysztof Kozlowski /* Interrupt controls register */
1044f52e550SKrzysztof Kozlowski #define VIDINTCON2				0x228
1054f52e550SKrzysztof Kozlowski 
1064f52e550SKrzysztof Kozlowski #define VIDINTCON1_INTEXTRA1_EN			(1 << 1)
1074f52e550SKrzysztof Kozlowski #define VIDINTCON1_INTEXTRA0_EN			(1 << 0)
1084f52e550SKrzysztof Kozlowski 
1094f52e550SKrzysztof Kozlowski /* Interrupt controls and status register */
1104f52e550SKrzysztof Kozlowski #define VIDINTCON3				0x22C
1114f52e550SKrzysztof Kozlowski 
1124f52e550SKrzysztof Kozlowski #define VIDINTCON1_INTEXTRA1_PEND		(1 << 1)
1134f52e550SKrzysztof Kozlowski #define VIDINTCON1_INTEXTRA0_PEND		(1 << 0)
1144f52e550SKrzysztof Kozlowski 
1154f52e550SKrzysztof Kozlowski /* VIDOSDxA ~ VIDOSDxE */
1164f52e550SKrzysztof Kozlowski #define VIDOSD_BASE				0x230
1174f52e550SKrzysztof Kozlowski 
1184f52e550SKrzysztof Kozlowski #define OSD_STRIDE				0x20
1194f52e550SKrzysztof Kozlowski 
1204f52e550SKrzysztof Kozlowski #define VIDOSD_A(_win)				(VIDOSD_BASE + \
1214f52e550SKrzysztof Kozlowski 						((_win) * OSD_STRIDE) + 0x00)
1224f52e550SKrzysztof Kozlowski #define VIDOSD_B(_win)				(VIDOSD_BASE + \
1234f52e550SKrzysztof Kozlowski 						((_win) * OSD_STRIDE) + 0x04)
1244f52e550SKrzysztof Kozlowski #define VIDOSD_C(_win)				(VIDOSD_BASE + \
1254f52e550SKrzysztof Kozlowski 						((_win) * OSD_STRIDE) + 0x08)
1264f52e550SKrzysztof Kozlowski #define VIDOSD_D(_win)				(VIDOSD_BASE + \
1274f52e550SKrzysztof Kozlowski 						((_win) * OSD_STRIDE) + 0x0C)
1284f52e550SKrzysztof Kozlowski #define VIDOSD_E(_win)				(VIDOSD_BASE + \
1294f52e550SKrzysztof Kozlowski 						((_win) * OSD_STRIDE) + 0x10)
1304f52e550SKrzysztof Kozlowski 
1314f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_X_MASK			(0x1fff << 13)
1324f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_X_SHIFT		13
1334f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_X_LIMIT		0x1fff
1344f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_X(_x)			(((_x) & 0x1fff) << 13)
1354f52e550SKrzysztof Kozlowski 
1364f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_Y_MASK			(0x1fff << 0)
1374f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_Y_SHIFT		0
1384f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_Y_LIMIT		0x1fff
1394f52e550SKrzysztof Kozlowski #define VIDOSDxA_TOPLEFT_Y(_x)			(((_x) & 0x1fff) << 0)
1404f52e550SKrzysztof Kozlowski 
1414f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_X_MASK		(0x1fff << 13)
1424f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_X_SHIFT		13
1434f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_X_LIMIT		0x1fff
1444f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_X(_x)			(((_x) & 0x1fff) << 13)
1454f52e550SKrzysztof Kozlowski 
1464f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_Y_MASK		(0x1fff << 0)
1474f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_Y_SHIFT		0
1484f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_Y_LIMIT		0x1fff
1494f52e550SKrzysztof Kozlowski #define VIDOSDxB_BOTRIGHT_Y(_x)			(((_x) & 0x1fff) << 0)
1504f52e550SKrzysztof Kozlowski 
1514f52e550SKrzysztof Kozlowski #define VIDOSDxC_ALPHA0_R_F(_x)			(((_x) & 0xFF) << 16)
1524f52e550SKrzysztof Kozlowski #define VIDOSDxC_ALPHA0_G_F(_x)			(((_x) & 0xFF) << 8)
1534f52e550SKrzysztof Kozlowski #define VIDOSDxC_ALPHA0_B_F(_x)			(((_x) & 0xFF) << 0)
1544f52e550SKrzysztof Kozlowski 
1554f52e550SKrzysztof Kozlowski #define VIDOSDxD_ALPHA1_R_F(_x)			(((_x) & 0xFF) << 16)
1564f52e550SKrzysztof Kozlowski #define VIDOSDxD_ALPHA1_G_F(_x)			(((_x) & 0xFF) << 8)
1574f52e550SKrzysztof Kozlowski #define VIDOSDxD_ALPHA1_B_F(_x)			(((_x) & 0xFF) >> 0)
1584f52e550SKrzysztof Kozlowski 
1594f52e550SKrzysztof Kozlowski /* Window MAP (Color map) */
1604f52e550SKrzysztof Kozlowski #define WINxMAP(_win)				(0x340 + ((_win) * 4))
1614f52e550SKrzysztof Kozlowski 
1624f52e550SKrzysztof Kozlowski #define WINxMAP_MAP				(1 << 24)
1634f52e550SKrzysztof Kozlowski #define WINxMAP_MAP_COLOUR_MASK			(0xffffff << 0)
1644f52e550SKrzysztof Kozlowski #define WINxMAP_MAP_COLOUR_SHIFT		0
1654f52e550SKrzysztof Kozlowski #define WINxMAP_MAP_COLOUR_LIMIT		0xffffff
1664f52e550SKrzysztof Kozlowski #define WINxMAP_MAP_COLOUR(_x)			((_x) << 0)
1674f52e550SKrzysztof Kozlowski 
1684f52e550SKrzysztof Kozlowski /* Window colour-key control registers */
1694f52e550SKrzysztof Kozlowski #define WKEYCON					0x370
1704f52e550SKrzysztof Kozlowski 
1714f52e550SKrzysztof Kozlowski #define WKEYCON0				0x00
1724f52e550SKrzysztof Kozlowski #define WKEYCON1				0x04
1734f52e550SKrzysztof Kozlowski #define WxKEYCON0_KEYBL_EN			(1 << 26)
1744f52e550SKrzysztof Kozlowski #define WxKEYCON0_KEYEN_F			(1 << 25)
1754f52e550SKrzysztof Kozlowski #define WxKEYCON0_DIRCON			(1 << 24)
1764f52e550SKrzysztof Kozlowski #define WxKEYCON0_COMPKEY_MASK			(0xffffff << 0)
1774f52e550SKrzysztof Kozlowski #define WxKEYCON0_COMPKEY_SHIFT			0
1784f52e550SKrzysztof Kozlowski #define WxKEYCON0_COMPKEY_LIMIT			0xffffff
1794f52e550SKrzysztof Kozlowski #define WxKEYCON0_COMPKEY(_x)			((_x) << 0)
1804f52e550SKrzysztof Kozlowski #define WxKEYCON1_COLVAL_MASK			(0xffffff << 0)
1814f52e550SKrzysztof Kozlowski #define WxKEYCON1_COLVAL_SHIFT			0
1824f52e550SKrzysztof Kozlowski #define WxKEYCON1_COLVAL_LIMIT			0xffffff
1834f52e550SKrzysztof Kozlowski #define WxKEYCON1_COLVAL(_x)			((_x) << 0)
1844f52e550SKrzysztof Kozlowski 
1854f52e550SKrzysztof Kozlowski /* color key control register for hardware window 1 ~ 4. */
1864f52e550SKrzysztof Kozlowski #define WKEYCON0_BASE(x)		((WKEYCON + WKEYCON0) + ((x - 1) * 8))
1874f52e550SKrzysztof Kozlowski /* color key value register for hardware window 1 ~ 4. */
1884f52e550SKrzysztof Kozlowski #define WKEYCON1_BASE(x)		((WKEYCON + WKEYCON1) + ((x - 1) * 8))
1894f52e550SKrzysztof Kozlowski 
1904f52e550SKrzysztof Kozlowski /* Window KEY Alpha value */
1914f52e550SKrzysztof Kozlowski #define WxKEYALPHA(_win)			(0x3A0 + (((_win) - 1) * 0x4))
1924f52e550SKrzysztof Kozlowski 
1934f52e550SKrzysztof Kozlowski #define Wx_KEYALPHA_R_F_SHIFT			16
1944f52e550SKrzysztof Kozlowski #define Wx_KEYALPHA_G_F_SHIFT			8
1954f52e550SKrzysztof Kozlowski #define Wx_KEYALPHA_B_F_SHIFT			0
1964f52e550SKrzysztof Kozlowski 
1974f52e550SKrzysztof Kozlowski /* Blending equation */
1984f52e550SKrzysztof Kozlowski #define BLENDE(_win)				(0x03C0 + ((_win) * 4))
1994f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ZERO			0x0
2004f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ONE				0x1
2014f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ALPHA_A			0x2
2024f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ONE_MINUS_ALPHA_A		0x3
2034f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ALPHA_B			0x4
2044f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ONE_MINUS_ALPHA_B		0x5
2054f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ALPHA0			0x6
2064f52e550SKrzysztof Kozlowski #define BLENDE_COEF_A				0xA
2074f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ONE_MINUS_A			0xB
2084f52e550SKrzysztof Kozlowski #define BLENDE_COEF_B				0xC
2094f52e550SKrzysztof Kozlowski #define BLENDE_COEF_ONE_MINUS_B			0xD
2104f52e550SKrzysztof Kozlowski #define BLENDE_Q_FUNC(_v)			((_v) << 18)
2114f52e550SKrzysztof Kozlowski #define BLENDE_P_FUNC(_v)			((_v) << 12)
2124f52e550SKrzysztof Kozlowski #define BLENDE_B_FUNC(_v)			((_v) << 6)
2134f52e550SKrzysztof Kozlowski #define BLENDE_A_FUNC(_v)			((_v) << 0)
2144f52e550SKrzysztof Kozlowski 
2154f52e550SKrzysztof Kozlowski /* Blending equation control */
2164f52e550SKrzysztof Kozlowski #define BLENDCON				0x3D8
2174f52e550SKrzysztof Kozlowski #define BLENDCON_NEW_MASK			(1 << 0)
2184f52e550SKrzysztof Kozlowski #define BLENDCON_NEW_8BIT_ALPHA_VALUE		(1 << 0)
2194f52e550SKrzysztof Kozlowski #define BLENDCON_NEW_4BIT_ALPHA_VALUE		(0 << 0)
2204f52e550SKrzysztof Kozlowski 
2214f52e550SKrzysztof Kozlowski /* Interrupt control register */
2224f52e550SKrzysztof Kozlowski #define VIDINTCON0				0x500
2234f52e550SKrzysztof Kozlowski 
2244f52e550SKrzysztof Kozlowski #define VIDINTCON0_WAKEUP_MASK			(0x3f << 26)
2254f52e550SKrzysztof Kozlowski #define VIDINTCON0_INTEXTRAEN			(1 << 21)
2264f52e550SKrzysztof Kozlowski 
2274f52e550SKrzysztof Kozlowski #define VIDINTCON0_FRAMESEL0_SHIFT		15
2284f52e550SKrzysztof Kozlowski #define VIDINTCON0_FRAMESEL0_MASK		(0x3 << 15)
2294f52e550SKrzysztof Kozlowski #define VIDINTCON0_FRAMESEL0_BACKPORCH		(0x0 << 15)
2304f52e550SKrzysztof Kozlowski #define VIDINTCON0_FRAMESEL0_VSYNC		(0x1 << 15)
2314f52e550SKrzysztof Kozlowski #define VIDINTCON0_FRAMESEL0_ACTIVE		(0x2 << 15)
2324f52e550SKrzysztof Kozlowski #define VIDINTCON0_FRAMESEL0_FRONTPORCH		(0x3 << 15)
2334f52e550SKrzysztof Kozlowski 
2344f52e550SKrzysztof Kozlowski #define VIDINTCON0_INT_FRAME			(1 << 11)
2354f52e550SKrzysztof Kozlowski 
2364f52e550SKrzysztof Kozlowski #define VIDINTCON0_FIFOLEVEL_MASK		(0x7 << 3)
2374f52e550SKrzysztof Kozlowski #define VIDINTCON0_FIFOLEVEL_SHIFT		3
2384f52e550SKrzysztof Kozlowski #define VIDINTCON0_FIFOLEVEL_EMPTY		(0x0 << 3)
2394f52e550SKrzysztof Kozlowski #define VIDINTCON0_FIFOLEVEL_TO25PC		(0x1 << 3)
2404f52e550SKrzysztof Kozlowski #define VIDINTCON0_FIFOLEVEL_TO50PC		(0x2 << 3)
2414f52e550SKrzysztof Kozlowski #define VIDINTCON0_FIFOLEVEL_FULL		(0x4 << 3)
2424f52e550SKrzysztof Kozlowski 
2434f52e550SKrzysztof Kozlowski #define VIDINTCON0_FIFOSEL_MAIN_EN		(1 << 1)
2444f52e550SKrzysztof Kozlowski #define VIDINTCON0_INT_FIFO			(1 << 1)
2454f52e550SKrzysztof Kozlowski 
2464f52e550SKrzysztof Kozlowski #define VIDINTCON0_INT_ENABLE			(1 << 0)
2474f52e550SKrzysztof Kozlowski 
2484f52e550SKrzysztof Kozlowski /* Interrupt controls and status register */
2494f52e550SKrzysztof Kozlowski #define VIDINTCON1				0x504
2504f52e550SKrzysztof Kozlowski 
2514f52e550SKrzysztof Kozlowski #define VIDINTCON1_INT_EXTRA			(1 << 3)
2524f52e550SKrzysztof Kozlowski #define VIDINTCON1_INT_I80			(1 << 2)
2534f52e550SKrzysztof Kozlowski #define VIDINTCON1_INT_FRAME			(1 << 1)
2544f52e550SKrzysztof Kozlowski #define VIDINTCON1_INT_FIFO			(1 << 0)
2554f52e550SKrzysztof Kozlowski 
2564f52e550SKrzysztof Kozlowski /* VIDCON1 */
2574f52e550SKrzysztof Kozlowski #define VIDCON1(_x)				(0x0600 + ((_x) * 0x50))
2584f52e550SKrzysztof Kozlowski #define VIDCON1_LINECNT_GET(_v)			(((_v) >> 17) & 0x1fff)
2594f52e550SKrzysztof Kozlowski #define VIDCON1_VCLK_MASK			(0x3 << 9)
2604f52e550SKrzysztof Kozlowski #define VIDCON1_VCLK_HOLD			(0x0 << 9)
2614f52e550SKrzysztof Kozlowski #define VIDCON1_VCLK_RUN			(0x1 << 9)
2624f52e550SKrzysztof Kozlowski #define VIDCON1_VCLK_RUN_VDEN_DISABLE		(0x3 << 9)
2634f52e550SKrzysztof Kozlowski #define VIDCON1_RGB_ORDER_O_MASK		(0x7 << 4)
2644f52e550SKrzysztof Kozlowski #define VIDCON1_RGB_ORDER_O_RGB			(0x0 << 4)
2654f52e550SKrzysztof Kozlowski #define VIDCON1_RGB_ORDER_O_GBR			(0x1 << 4)
2664f52e550SKrzysztof Kozlowski #define VIDCON1_RGB_ORDER_O_BRG			(0x2 << 4)
2674f52e550SKrzysztof Kozlowski #define VIDCON1_RGB_ORDER_O_BGR			(0x4 << 4)
2684f52e550SKrzysztof Kozlowski #define VIDCON1_RGB_ORDER_O_RBG			(0x5 << 4)
2694f52e550SKrzysztof Kozlowski #define VIDCON1_RGB_ORDER_O_GRB			(0x6 << 4)
2704f52e550SKrzysztof Kozlowski 
2714f52e550SKrzysztof Kozlowski /* VIDTCON0 */
2724f52e550SKrzysztof Kozlowski #define VIDTCON0				0x610
2734f52e550SKrzysztof Kozlowski 
2744f52e550SKrzysztof Kozlowski #define VIDTCON0_VBPD_MASK			(0xffff << 16)
2754f52e550SKrzysztof Kozlowski #define VIDTCON0_VBPD_SHIFT			16
2764f52e550SKrzysztof Kozlowski #define VIDTCON0_VBPD_LIMIT			0xffff
2774f52e550SKrzysztof Kozlowski #define VIDTCON0_VBPD(_x)			((_x) << 16)
2784f52e550SKrzysztof Kozlowski 
2794f52e550SKrzysztof Kozlowski #define VIDTCON0_VFPD_MASK			(0xffff << 0)
2804f52e550SKrzysztof Kozlowski #define VIDTCON0_VFPD_SHIFT			0
2814f52e550SKrzysztof Kozlowski #define VIDTCON0_VFPD_LIMIT			0xffff
2824f52e550SKrzysztof Kozlowski #define VIDTCON0_VFPD(_x)			((_x) << 0)
2834f52e550SKrzysztof Kozlowski 
2844f52e550SKrzysztof Kozlowski /* VIDTCON1 */
2854f52e550SKrzysztof Kozlowski #define VIDTCON1				0x614
2864f52e550SKrzysztof Kozlowski 
2874f52e550SKrzysztof Kozlowski #define VIDTCON1_VSPW_MASK			(0xffff << 16)
2884f52e550SKrzysztof Kozlowski #define VIDTCON1_VSPW_SHIFT			16
2894f52e550SKrzysztof Kozlowski #define VIDTCON1_VSPW_LIMIT			0xffff
2904f52e550SKrzysztof Kozlowski #define VIDTCON1_VSPW(_x)			((_x) << 16)
2914f52e550SKrzysztof Kozlowski 
2924f52e550SKrzysztof Kozlowski /* VIDTCON2 */
2934f52e550SKrzysztof Kozlowski #define VIDTCON2				0x618
2944f52e550SKrzysztof Kozlowski 
2954f52e550SKrzysztof Kozlowski #define VIDTCON2_HBPD_MASK			(0xffff << 16)
2964f52e550SKrzysztof Kozlowski #define VIDTCON2_HBPD_SHIFT			16
2974f52e550SKrzysztof Kozlowski #define VIDTCON2_HBPD_LIMIT			0xffff
2984f52e550SKrzysztof Kozlowski #define VIDTCON2_HBPD(_x)			((_x) << 16)
2994f52e550SKrzysztof Kozlowski 
3004f52e550SKrzysztof Kozlowski #define VIDTCON2_HFPD_MASK			(0xffff << 0)
3014f52e550SKrzysztof Kozlowski #define VIDTCON2_HFPD_SHIFT			0
3024f52e550SKrzysztof Kozlowski #define VIDTCON2_HFPD_LIMIT			0xffff
3034f52e550SKrzysztof Kozlowski #define VIDTCON2_HFPD(_x)			((_x) << 0)
3044f52e550SKrzysztof Kozlowski 
3054f52e550SKrzysztof Kozlowski /* VIDTCON3 */
3064f52e550SKrzysztof Kozlowski #define VIDTCON3				0x61C
3074f52e550SKrzysztof Kozlowski 
3084f52e550SKrzysztof Kozlowski #define VIDTCON3_HSPW_MASK			(0xffff << 16)
3094f52e550SKrzysztof Kozlowski #define VIDTCON3_HSPW_SHIFT			16
3104f52e550SKrzysztof Kozlowski #define VIDTCON3_HSPW_LIMIT			0xffff
3114f52e550SKrzysztof Kozlowski #define VIDTCON3_HSPW(_x)			((_x) << 16)
3124f52e550SKrzysztof Kozlowski 
3134f52e550SKrzysztof Kozlowski /* VIDTCON4 */
3144f52e550SKrzysztof Kozlowski #define VIDTCON4				0x620
3154f52e550SKrzysztof Kozlowski 
3164f52e550SKrzysztof Kozlowski #define VIDTCON4_LINEVAL_MASK			(0xfff << 16)
3174f52e550SKrzysztof Kozlowski #define VIDTCON4_LINEVAL_SHIFT			16
3184f52e550SKrzysztof Kozlowski #define VIDTCON4_LINEVAL_LIMIT			0xfff
3194f52e550SKrzysztof Kozlowski #define VIDTCON4_LINEVAL(_x)			(((_x) & 0xfff) << 16)
3204f52e550SKrzysztof Kozlowski 
3214f52e550SKrzysztof Kozlowski #define VIDTCON4_HOZVAL_MASK			(0xfff << 0)
3224f52e550SKrzysztof Kozlowski #define VIDTCON4_HOZVAL_SHIFT			0
3234f52e550SKrzysztof Kozlowski #define VIDTCON4_HOZVAL_LIMIT			0xfff
3244f52e550SKrzysztof Kozlowski #define VIDTCON4_HOZVAL(_x)			(((_x) & 0xfff) << 0)
3254f52e550SKrzysztof Kozlowski 
3264f52e550SKrzysztof Kozlowski /* LINECNT OP THRSHOLD*/
3274f52e550SKrzysztof Kozlowski #define LINECNT_OP_THRESHOLD			0x630
3284f52e550SKrzysztof Kozlowski 
3294f52e550SKrzysztof Kozlowski /* CRCCTRL */
3304f52e550SKrzysztof Kozlowski #define CRCCTRL					0x6C8
3314f52e550SKrzysztof Kozlowski #define CRCCTRL_CRCCLKEN			(0x1 << 2)
3324f52e550SKrzysztof Kozlowski #define CRCCTRL_CRCSTART_F			(0x1 << 1)
3334f52e550SKrzysztof Kozlowski #define CRCCTRL_CRCEN				(0x1 << 0)
3344f52e550SKrzysztof Kozlowski 
3354f52e550SKrzysztof Kozlowski /* DECON_CMU */
3364f52e550SKrzysztof Kozlowski #define DECON_CMU				0x704
3374f52e550SKrzysztof Kozlowski 
3384f52e550SKrzysztof Kozlowski #define DECON_CMU_ALL_CLKGATE_ENABLE		0x3
3394f52e550SKrzysztof Kozlowski #define DECON_CMU_SE_CLKGATE_ENABLE		(0x1 << 2)
3404f52e550SKrzysztof Kozlowski #define DECON_CMU_SFR_CLKGATE_ENABLE		(0x1 << 1)
3414f52e550SKrzysztof Kozlowski #define DECON_CMU_MEM_CLKGATE_ENABLE		(0x1 << 0)
3424f52e550SKrzysztof Kozlowski 
3434f52e550SKrzysztof Kozlowski /* DECON_UPDATE */
3444f52e550SKrzysztof Kozlowski #define DECON_UPDATE				0x710
3454f52e550SKrzysztof Kozlowski 
3464f52e550SKrzysztof Kozlowski #define DECON_UPDATE_SLAVE_SYNC			(1 << 4)
3474f52e550SKrzysztof Kozlowski #define DECON_UPDATE_STANDALONE_F		(1 << 0)
348ca52c712SKrzysztof Kozlowski 
349ca52c712SKrzysztof Kozlowski #endif /* EXYNOS_REGS_DECON7_H */
350