18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (c) 2014 Samsung Electronics Co., Ltd.
48c2ecf20Sopenharmony_ci * Author: Ajay Kumar <ajaykumar.rs@samsung.com>
58c2ecf20Sopenharmony_ci */
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#ifndef EXYNOS_REGS_DECON7_H
88c2ecf20Sopenharmony_ci#define EXYNOS_REGS_DECON7_H
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci/* VIDCON0 */
118c2ecf20Sopenharmony_ci#define VIDCON0					0x00
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#define VIDCON0_SWRESET				(1 << 28)
148c2ecf20Sopenharmony_ci#define VIDCON0_DECON_STOP_STATUS		(1 << 2)
158c2ecf20Sopenharmony_ci#define VIDCON0_ENVID				(1 << 1)
168c2ecf20Sopenharmony_ci#define VIDCON0_ENVID_F				(1 << 0)
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci/* VIDOUTCON0 */
198c2ecf20Sopenharmony_ci#define VIDOUTCON0				0x4
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci#define VIDOUTCON0_DUAL_MASK			(0x3 << 24)
228c2ecf20Sopenharmony_ci#define VIDOUTCON0_DUAL_ON			(0x3 << 24)
238c2ecf20Sopenharmony_ci#define VIDOUTCON0_DISP_IF_1_ON			(0x2 << 24)
248c2ecf20Sopenharmony_ci#define VIDOUTCON0_DISP_IF_0_ON			(0x1 << 24)
258c2ecf20Sopenharmony_ci#define VIDOUTCON0_DUAL_OFF			(0x0 << 24)
268c2ecf20Sopenharmony_ci#define VIDOUTCON0_IF_SHIFT			23
278c2ecf20Sopenharmony_ci#define VIDOUTCON0_IF_MASK			(0x1 << 23)
288c2ecf20Sopenharmony_ci#define VIDOUTCON0_RGBIF			(0x0 << 23)
298c2ecf20Sopenharmony_ci#define VIDOUTCON0_I80IF			(0x1 << 23)
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci/* VIDCON3 */
328c2ecf20Sopenharmony_ci#define VIDCON3					0x8
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci/* VIDCON4 */
358c2ecf20Sopenharmony_ci#define VIDCON4					0xC
368c2ecf20Sopenharmony_ci#define VIDCON4_FIFOCNT_START_EN		(1 << 0)
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci/* VCLKCON0 */
398c2ecf20Sopenharmony_ci#define VCLKCON0				0x10
408c2ecf20Sopenharmony_ci#define VCLKCON0_CLKVALUP			(1 << 8)
418c2ecf20Sopenharmony_ci#define VCLKCON0_VCLKFREE			(1 << 0)
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci/* VCLKCON */
448c2ecf20Sopenharmony_ci#define VCLKCON1				0x14
458c2ecf20Sopenharmony_ci#define VCLKCON1_CLKVAL_NUM_VCLK(val)		(((val) & 0xff) << 0)
468c2ecf20Sopenharmony_ci#define VCLKCON2				0x18
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci/* SHADOWCON */
498c2ecf20Sopenharmony_ci#define SHADOWCON				0x30
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci#define SHADOWCON_WINx_PROTECT(_win)		(1 << (10 + (_win)))
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci/* WINCONx */
548c2ecf20Sopenharmony_ci#define WINCON(_win)				(0x50 + ((_win) * 4))
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci#define WINCONx_BUFSTATUS			(0x3 << 30)
578c2ecf20Sopenharmony_ci#define WINCONx_BUFSEL_MASK			(0x3 << 28)
588c2ecf20Sopenharmony_ci#define WINCONx_BUFSEL_SHIFT			28
598c2ecf20Sopenharmony_ci#define WINCONx_TRIPLE_BUF_MODE			(0x1 << 18)
608c2ecf20Sopenharmony_ci#define WINCONx_DOUBLE_BUF_MODE			(0x0 << 18)
618c2ecf20Sopenharmony_ci#define WINCONx_BURSTLEN_16WORD			(0x0 << 11)
628c2ecf20Sopenharmony_ci#define WINCONx_BURSTLEN_8WORD			(0x1 << 11)
638c2ecf20Sopenharmony_ci#define WINCONx_BURSTLEN_MASK			(0x1 << 11)
648c2ecf20Sopenharmony_ci#define WINCONx_BURSTLEN_SHIFT			11
658c2ecf20Sopenharmony_ci#define WINCONx_BLD_PLANE			(0 << 8)
668c2ecf20Sopenharmony_ci#define WINCONx_BLD_PIX				(1 << 8)
678c2ecf20Sopenharmony_ci#define WINCONx_ALPHA_MUL			(1 << 7)
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci#define WINCONx_BPPMODE_MASK			(0xf << 2)
708c2ecf20Sopenharmony_ci#define WINCONx_BPPMODE_SHIFT			2
718c2ecf20Sopenharmony_ci#define WINCONx_BPPMODE_16BPP_565		(0x8 << 2)
728c2ecf20Sopenharmony_ci#define WINCONx_BPPMODE_24BPP_BGRx		(0x7 << 2)
738c2ecf20Sopenharmony_ci#define WINCONx_BPPMODE_24BPP_RGBx		(0x6 << 2)
748c2ecf20Sopenharmony_ci#define WINCONx_BPPMODE_24BPP_xBGR		(0x5 << 2)
758c2ecf20Sopenharmony_ci#define WINCONx_BPPMODE_24BPP_xRGB		(0x4 << 2)
768c2ecf20Sopenharmony_ci#define WINCONx_BPPMODE_32BPP_BGRA		(0x3 << 2)
778c2ecf20Sopenharmony_ci#define WINCONx_BPPMODE_32BPP_RGBA		(0x2 << 2)
788c2ecf20Sopenharmony_ci#define WINCONx_BPPMODE_32BPP_ABGR		(0x1 << 2)
798c2ecf20Sopenharmony_ci#define WINCONx_BPPMODE_32BPP_ARGB		(0x0 << 2)
808c2ecf20Sopenharmony_ci#define WINCONx_ALPHA_SEL			(1 << 1)
818c2ecf20Sopenharmony_ci#define WINCONx_ENWIN				(1 << 0)
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci#define WINCON1_ALPHA_MUL_F			(1 << 7)
848c2ecf20Sopenharmony_ci#define WINCON2_ALPHA_MUL_F			(1 << 7)
858c2ecf20Sopenharmony_ci#define WINCON3_ALPHA_MUL_F			(1 << 7)
868c2ecf20Sopenharmony_ci#define WINCON4_ALPHA_MUL_F			(1 << 7)
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ci/*  VIDOSDxH: The height for the OSD image(READ ONLY)*/
898c2ecf20Sopenharmony_ci#define VIDOSD_H(_x)				(0x80 + ((_x) * 4))
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci/* Frame buffer start addresses: VIDWxxADD0n */
928c2ecf20Sopenharmony_ci#define VIDW_BUF_START(_win)			(0x80 + ((_win) * 0x10))
938c2ecf20Sopenharmony_ci#define VIDW_BUF_START1(_win)			(0x84 + ((_win) * 0x10))
948c2ecf20Sopenharmony_ci#define VIDW_BUF_START2(_win)			(0x88 + ((_win) * 0x10))
958c2ecf20Sopenharmony_ci
968c2ecf20Sopenharmony_ci#define VIDW_WHOLE_X(_win)			(0x0130 + ((_win) * 8))
978c2ecf20Sopenharmony_ci#define VIDW_WHOLE_Y(_win)			(0x0134 + ((_win) * 8))
988c2ecf20Sopenharmony_ci#define VIDW_OFFSET_X(_win)			(0x0170 + ((_win) * 8))
998c2ecf20Sopenharmony_ci#define VIDW_OFFSET_Y(_win)			(0x0174 + ((_win) * 8))
1008c2ecf20Sopenharmony_ci#define VIDW_BLKOFFSET(_win)			(0x01B0 + ((_win) * 4))
1018c2ecf20Sopenharmony_ci#define VIDW_BLKSIZE(win)			(0x0200 + ((_win) * 4))
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci/* Interrupt controls register */
1048c2ecf20Sopenharmony_ci#define VIDINTCON2				0x228
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_ci#define VIDINTCON1_INTEXTRA1_EN			(1 << 1)
1078c2ecf20Sopenharmony_ci#define VIDINTCON1_INTEXTRA0_EN			(1 << 0)
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ci/* Interrupt controls and status register */
1108c2ecf20Sopenharmony_ci#define VIDINTCON3				0x22C
1118c2ecf20Sopenharmony_ci
1128c2ecf20Sopenharmony_ci#define VIDINTCON1_INTEXTRA1_PEND		(1 << 1)
1138c2ecf20Sopenharmony_ci#define VIDINTCON1_INTEXTRA0_PEND		(1 << 0)
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_ci/* VIDOSDxA ~ VIDOSDxE */
1168c2ecf20Sopenharmony_ci#define VIDOSD_BASE				0x230
1178c2ecf20Sopenharmony_ci
1188c2ecf20Sopenharmony_ci#define OSD_STRIDE				0x20
1198c2ecf20Sopenharmony_ci
1208c2ecf20Sopenharmony_ci#define VIDOSD_A(_win)				(VIDOSD_BASE + \
1218c2ecf20Sopenharmony_ci						((_win) * OSD_STRIDE) + 0x00)
1228c2ecf20Sopenharmony_ci#define VIDOSD_B(_win)				(VIDOSD_BASE + \
1238c2ecf20Sopenharmony_ci						((_win) * OSD_STRIDE) + 0x04)
1248c2ecf20Sopenharmony_ci#define VIDOSD_C(_win)				(VIDOSD_BASE + \
1258c2ecf20Sopenharmony_ci						((_win) * OSD_STRIDE) + 0x08)
1268c2ecf20Sopenharmony_ci#define VIDOSD_D(_win)				(VIDOSD_BASE + \
1278c2ecf20Sopenharmony_ci						((_win) * OSD_STRIDE) + 0x0C)
1288c2ecf20Sopenharmony_ci#define VIDOSD_E(_win)				(VIDOSD_BASE + \
1298c2ecf20Sopenharmony_ci						((_win) * OSD_STRIDE) + 0x10)
1308c2ecf20Sopenharmony_ci
1318c2ecf20Sopenharmony_ci#define VIDOSDxA_TOPLEFT_X_MASK			(0x1fff << 13)
1328c2ecf20Sopenharmony_ci#define VIDOSDxA_TOPLEFT_X_SHIFT		13
1338c2ecf20Sopenharmony_ci#define VIDOSDxA_TOPLEFT_X_LIMIT		0x1fff
1348c2ecf20Sopenharmony_ci#define VIDOSDxA_TOPLEFT_X(_x)			(((_x) & 0x1fff) << 13)
1358c2ecf20Sopenharmony_ci
1368c2ecf20Sopenharmony_ci#define VIDOSDxA_TOPLEFT_Y_MASK			(0x1fff << 0)
1378c2ecf20Sopenharmony_ci#define VIDOSDxA_TOPLEFT_Y_SHIFT		0
1388c2ecf20Sopenharmony_ci#define VIDOSDxA_TOPLEFT_Y_LIMIT		0x1fff
1398c2ecf20Sopenharmony_ci#define VIDOSDxA_TOPLEFT_Y(_x)			(((_x) & 0x1fff) << 0)
1408c2ecf20Sopenharmony_ci
1418c2ecf20Sopenharmony_ci#define VIDOSDxB_BOTRIGHT_X_MASK		(0x1fff << 13)
1428c2ecf20Sopenharmony_ci#define VIDOSDxB_BOTRIGHT_X_SHIFT		13
1438c2ecf20Sopenharmony_ci#define VIDOSDxB_BOTRIGHT_X_LIMIT		0x1fff
1448c2ecf20Sopenharmony_ci#define VIDOSDxB_BOTRIGHT_X(_x)			(((_x) & 0x1fff) << 13)
1458c2ecf20Sopenharmony_ci
1468c2ecf20Sopenharmony_ci#define VIDOSDxB_BOTRIGHT_Y_MASK		(0x1fff << 0)
1478c2ecf20Sopenharmony_ci#define VIDOSDxB_BOTRIGHT_Y_SHIFT		0
1488c2ecf20Sopenharmony_ci#define VIDOSDxB_BOTRIGHT_Y_LIMIT		0x1fff
1498c2ecf20Sopenharmony_ci#define VIDOSDxB_BOTRIGHT_Y(_x)			(((_x) & 0x1fff) << 0)
1508c2ecf20Sopenharmony_ci
1518c2ecf20Sopenharmony_ci#define VIDOSDxC_ALPHA0_R_F(_x)			(((_x) & 0xFF) << 16)
1528c2ecf20Sopenharmony_ci#define VIDOSDxC_ALPHA0_G_F(_x)			(((_x) & 0xFF) << 8)
1538c2ecf20Sopenharmony_ci#define VIDOSDxC_ALPHA0_B_F(_x)			(((_x) & 0xFF) << 0)
1548c2ecf20Sopenharmony_ci
1558c2ecf20Sopenharmony_ci#define VIDOSDxD_ALPHA1_R_F(_x)			(((_x) & 0xFF) << 16)
1568c2ecf20Sopenharmony_ci#define VIDOSDxD_ALPHA1_G_F(_x)			(((_x) & 0xFF) << 8)
1578c2ecf20Sopenharmony_ci#define VIDOSDxD_ALPHA1_B_F(_x)			(((_x) & 0xFF) >> 0)
1588c2ecf20Sopenharmony_ci
1598c2ecf20Sopenharmony_ci/* Window MAP (Color map) */
1608c2ecf20Sopenharmony_ci#define WINxMAP(_win)				(0x340 + ((_win) * 4))
1618c2ecf20Sopenharmony_ci
1628c2ecf20Sopenharmony_ci#define WINxMAP_MAP				(1 << 24)
1638c2ecf20Sopenharmony_ci#define WINxMAP_MAP_COLOUR_MASK			(0xffffff << 0)
1648c2ecf20Sopenharmony_ci#define WINxMAP_MAP_COLOUR_SHIFT		0
1658c2ecf20Sopenharmony_ci#define WINxMAP_MAP_COLOUR_LIMIT		0xffffff
1668c2ecf20Sopenharmony_ci#define WINxMAP_MAP_COLOUR(_x)			((_x) << 0)
1678c2ecf20Sopenharmony_ci
1688c2ecf20Sopenharmony_ci/* Window colour-key control registers */
1698c2ecf20Sopenharmony_ci#define WKEYCON					0x370
1708c2ecf20Sopenharmony_ci
1718c2ecf20Sopenharmony_ci#define WKEYCON0				0x00
1728c2ecf20Sopenharmony_ci#define WKEYCON1				0x04
1738c2ecf20Sopenharmony_ci#define WxKEYCON0_KEYBL_EN			(1 << 26)
1748c2ecf20Sopenharmony_ci#define WxKEYCON0_KEYEN_F			(1 << 25)
1758c2ecf20Sopenharmony_ci#define WxKEYCON0_DIRCON			(1 << 24)
1768c2ecf20Sopenharmony_ci#define WxKEYCON0_COMPKEY_MASK			(0xffffff << 0)
1778c2ecf20Sopenharmony_ci#define WxKEYCON0_COMPKEY_SHIFT			0
1788c2ecf20Sopenharmony_ci#define WxKEYCON0_COMPKEY_LIMIT			0xffffff
1798c2ecf20Sopenharmony_ci#define WxKEYCON0_COMPKEY(_x)			((_x) << 0)
1808c2ecf20Sopenharmony_ci#define WxKEYCON1_COLVAL_MASK			(0xffffff << 0)
1818c2ecf20Sopenharmony_ci#define WxKEYCON1_COLVAL_SHIFT			0
1828c2ecf20Sopenharmony_ci#define WxKEYCON1_COLVAL_LIMIT			0xffffff
1838c2ecf20Sopenharmony_ci#define WxKEYCON1_COLVAL(_x)			((_x) << 0)
1848c2ecf20Sopenharmony_ci
1858c2ecf20Sopenharmony_ci/* color key control register for hardware window 1 ~ 4. */
1868c2ecf20Sopenharmony_ci#define WKEYCON0_BASE(x)		((WKEYCON + WKEYCON0) + ((x - 1) * 8))
1878c2ecf20Sopenharmony_ci/* color key value register for hardware window 1 ~ 4. */
1888c2ecf20Sopenharmony_ci#define WKEYCON1_BASE(x)		((WKEYCON + WKEYCON1) + ((x - 1) * 8))
1898c2ecf20Sopenharmony_ci
1908c2ecf20Sopenharmony_ci/* Window KEY Alpha value */
1918c2ecf20Sopenharmony_ci#define WxKEYALPHA(_win)			(0x3A0 + (((_win) - 1) * 0x4))
1928c2ecf20Sopenharmony_ci
1938c2ecf20Sopenharmony_ci#define Wx_KEYALPHA_R_F_SHIFT			16
1948c2ecf20Sopenharmony_ci#define Wx_KEYALPHA_G_F_SHIFT			8
1958c2ecf20Sopenharmony_ci#define Wx_KEYALPHA_B_F_SHIFT			0
1968c2ecf20Sopenharmony_ci
1978c2ecf20Sopenharmony_ci/* Blending equation */
1988c2ecf20Sopenharmony_ci#define BLENDE(_win)				(0x03C0 + ((_win) * 4))
1998c2ecf20Sopenharmony_ci#define BLENDE_COEF_ZERO			0x0
2008c2ecf20Sopenharmony_ci#define BLENDE_COEF_ONE				0x1
2018c2ecf20Sopenharmony_ci#define BLENDE_COEF_ALPHA_A			0x2
2028c2ecf20Sopenharmony_ci#define BLENDE_COEF_ONE_MINUS_ALPHA_A		0x3
2038c2ecf20Sopenharmony_ci#define BLENDE_COEF_ALPHA_B			0x4
2048c2ecf20Sopenharmony_ci#define BLENDE_COEF_ONE_MINUS_ALPHA_B		0x5
2058c2ecf20Sopenharmony_ci#define BLENDE_COEF_ALPHA0			0x6
2068c2ecf20Sopenharmony_ci#define BLENDE_COEF_A				0xA
2078c2ecf20Sopenharmony_ci#define BLENDE_COEF_ONE_MINUS_A			0xB
2088c2ecf20Sopenharmony_ci#define BLENDE_COEF_B				0xC
2098c2ecf20Sopenharmony_ci#define BLENDE_COEF_ONE_MINUS_B			0xD
2108c2ecf20Sopenharmony_ci#define BLENDE_Q_FUNC(_v)			((_v) << 18)
2118c2ecf20Sopenharmony_ci#define BLENDE_P_FUNC(_v)			((_v) << 12)
2128c2ecf20Sopenharmony_ci#define BLENDE_B_FUNC(_v)			((_v) << 6)
2138c2ecf20Sopenharmony_ci#define BLENDE_A_FUNC(_v)			((_v) << 0)
2148c2ecf20Sopenharmony_ci
2158c2ecf20Sopenharmony_ci/* Blending equation control */
2168c2ecf20Sopenharmony_ci#define BLENDCON				0x3D8
2178c2ecf20Sopenharmony_ci#define BLENDCON_NEW_MASK			(1 << 0)
2188c2ecf20Sopenharmony_ci#define BLENDCON_NEW_8BIT_ALPHA_VALUE		(1 << 0)
2198c2ecf20Sopenharmony_ci#define BLENDCON_NEW_4BIT_ALPHA_VALUE		(0 << 0)
2208c2ecf20Sopenharmony_ci
2218c2ecf20Sopenharmony_ci/* Interrupt control register */
2228c2ecf20Sopenharmony_ci#define VIDINTCON0				0x500
2238c2ecf20Sopenharmony_ci
2248c2ecf20Sopenharmony_ci#define VIDINTCON0_WAKEUP_MASK			(0x3f << 26)
2258c2ecf20Sopenharmony_ci#define VIDINTCON0_INTEXTRAEN			(1 << 21)
2268c2ecf20Sopenharmony_ci
2278c2ecf20Sopenharmony_ci#define VIDINTCON0_FRAMESEL0_SHIFT		15
2288c2ecf20Sopenharmony_ci#define VIDINTCON0_FRAMESEL0_MASK		(0x3 << 15)
2298c2ecf20Sopenharmony_ci#define VIDINTCON0_FRAMESEL0_BACKPORCH		(0x0 << 15)
2308c2ecf20Sopenharmony_ci#define VIDINTCON0_FRAMESEL0_VSYNC		(0x1 << 15)
2318c2ecf20Sopenharmony_ci#define VIDINTCON0_FRAMESEL0_ACTIVE		(0x2 << 15)
2328c2ecf20Sopenharmony_ci#define VIDINTCON0_FRAMESEL0_FRONTPORCH		(0x3 << 15)
2338c2ecf20Sopenharmony_ci
2348c2ecf20Sopenharmony_ci#define VIDINTCON0_INT_FRAME			(1 << 11)
2358c2ecf20Sopenharmony_ci
2368c2ecf20Sopenharmony_ci#define VIDINTCON0_FIFOLEVEL_MASK		(0x7 << 3)
2378c2ecf20Sopenharmony_ci#define VIDINTCON0_FIFOLEVEL_SHIFT		3
2388c2ecf20Sopenharmony_ci#define VIDINTCON0_FIFOLEVEL_EMPTY		(0x0 << 3)
2398c2ecf20Sopenharmony_ci#define VIDINTCON0_FIFOLEVEL_TO25PC		(0x1 << 3)
2408c2ecf20Sopenharmony_ci#define VIDINTCON0_FIFOLEVEL_TO50PC		(0x2 << 3)
2418c2ecf20Sopenharmony_ci#define VIDINTCON0_FIFOLEVEL_FULL		(0x4 << 3)
2428c2ecf20Sopenharmony_ci
2438c2ecf20Sopenharmony_ci#define VIDINTCON0_FIFOSEL_MAIN_EN		(1 << 1)
2448c2ecf20Sopenharmony_ci#define VIDINTCON0_INT_FIFO			(1 << 1)
2458c2ecf20Sopenharmony_ci
2468c2ecf20Sopenharmony_ci#define VIDINTCON0_INT_ENABLE			(1 << 0)
2478c2ecf20Sopenharmony_ci
2488c2ecf20Sopenharmony_ci/* Interrupt controls and status register */
2498c2ecf20Sopenharmony_ci#define VIDINTCON1				0x504
2508c2ecf20Sopenharmony_ci
2518c2ecf20Sopenharmony_ci#define VIDINTCON1_INT_EXTRA			(1 << 3)
2528c2ecf20Sopenharmony_ci#define VIDINTCON1_INT_I80			(1 << 2)
2538c2ecf20Sopenharmony_ci#define VIDINTCON1_INT_FRAME			(1 << 1)
2548c2ecf20Sopenharmony_ci#define VIDINTCON1_INT_FIFO			(1 << 0)
2558c2ecf20Sopenharmony_ci
2568c2ecf20Sopenharmony_ci/* VIDCON1 */
2578c2ecf20Sopenharmony_ci#define VIDCON1(_x)				(0x0600 + ((_x) * 0x50))
2588c2ecf20Sopenharmony_ci#define VIDCON1_LINECNT_GET(_v)			(((_v) >> 17) & 0x1fff)
2598c2ecf20Sopenharmony_ci#define VIDCON1_VCLK_MASK			(0x3 << 9)
2608c2ecf20Sopenharmony_ci#define VIDCON1_VCLK_HOLD			(0x0 << 9)
2618c2ecf20Sopenharmony_ci#define VIDCON1_VCLK_RUN			(0x1 << 9)
2628c2ecf20Sopenharmony_ci#define VIDCON1_VCLK_RUN_VDEN_DISABLE		(0x3 << 9)
2638c2ecf20Sopenharmony_ci#define VIDCON1_RGB_ORDER_O_MASK		(0x7 << 4)
2648c2ecf20Sopenharmony_ci#define VIDCON1_RGB_ORDER_O_RGB			(0x0 << 4)
2658c2ecf20Sopenharmony_ci#define VIDCON1_RGB_ORDER_O_GBR			(0x1 << 4)
2668c2ecf20Sopenharmony_ci#define VIDCON1_RGB_ORDER_O_BRG			(0x2 << 4)
2678c2ecf20Sopenharmony_ci#define VIDCON1_RGB_ORDER_O_BGR			(0x4 << 4)
2688c2ecf20Sopenharmony_ci#define VIDCON1_RGB_ORDER_O_RBG			(0x5 << 4)
2698c2ecf20Sopenharmony_ci#define VIDCON1_RGB_ORDER_O_GRB			(0x6 << 4)
2708c2ecf20Sopenharmony_ci
2718c2ecf20Sopenharmony_ci/* VIDTCON0 */
2728c2ecf20Sopenharmony_ci#define VIDTCON0				0x610
2738c2ecf20Sopenharmony_ci
2748c2ecf20Sopenharmony_ci#define VIDTCON0_VBPD_MASK			(0xffff << 16)
2758c2ecf20Sopenharmony_ci#define VIDTCON0_VBPD_SHIFT			16
2768c2ecf20Sopenharmony_ci#define VIDTCON0_VBPD_LIMIT			0xffff
2778c2ecf20Sopenharmony_ci#define VIDTCON0_VBPD(_x)			((_x) << 16)
2788c2ecf20Sopenharmony_ci
2798c2ecf20Sopenharmony_ci#define VIDTCON0_VFPD_MASK			(0xffff << 0)
2808c2ecf20Sopenharmony_ci#define VIDTCON0_VFPD_SHIFT			0
2818c2ecf20Sopenharmony_ci#define VIDTCON0_VFPD_LIMIT			0xffff
2828c2ecf20Sopenharmony_ci#define VIDTCON0_VFPD(_x)			((_x) << 0)
2838c2ecf20Sopenharmony_ci
2848c2ecf20Sopenharmony_ci/* VIDTCON1 */
2858c2ecf20Sopenharmony_ci#define VIDTCON1				0x614
2868c2ecf20Sopenharmony_ci
2878c2ecf20Sopenharmony_ci#define VIDTCON1_VSPW_MASK			(0xffff << 16)
2888c2ecf20Sopenharmony_ci#define VIDTCON1_VSPW_SHIFT			16
2898c2ecf20Sopenharmony_ci#define VIDTCON1_VSPW_LIMIT			0xffff
2908c2ecf20Sopenharmony_ci#define VIDTCON1_VSPW(_x)			((_x) << 16)
2918c2ecf20Sopenharmony_ci
2928c2ecf20Sopenharmony_ci/* VIDTCON2 */
2938c2ecf20Sopenharmony_ci#define VIDTCON2				0x618
2948c2ecf20Sopenharmony_ci
2958c2ecf20Sopenharmony_ci#define VIDTCON2_HBPD_MASK			(0xffff << 16)
2968c2ecf20Sopenharmony_ci#define VIDTCON2_HBPD_SHIFT			16
2978c2ecf20Sopenharmony_ci#define VIDTCON2_HBPD_LIMIT			0xffff
2988c2ecf20Sopenharmony_ci#define VIDTCON2_HBPD(_x)			((_x) << 16)
2998c2ecf20Sopenharmony_ci
3008c2ecf20Sopenharmony_ci#define VIDTCON2_HFPD_MASK			(0xffff << 0)
3018c2ecf20Sopenharmony_ci#define VIDTCON2_HFPD_SHIFT			0
3028c2ecf20Sopenharmony_ci#define VIDTCON2_HFPD_LIMIT			0xffff
3038c2ecf20Sopenharmony_ci#define VIDTCON2_HFPD(_x)			((_x) << 0)
3048c2ecf20Sopenharmony_ci
3058c2ecf20Sopenharmony_ci/* VIDTCON3 */
3068c2ecf20Sopenharmony_ci#define VIDTCON3				0x61C
3078c2ecf20Sopenharmony_ci
3088c2ecf20Sopenharmony_ci#define VIDTCON3_HSPW_MASK			(0xffff << 16)
3098c2ecf20Sopenharmony_ci#define VIDTCON3_HSPW_SHIFT			16
3108c2ecf20Sopenharmony_ci#define VIDTCON3_HSPW_LIMIT			0xffff
3118c2ecf20Sopenharmony_ci#define VIDTCON3_HSPW(_x)			((_x) << 16)
3128c2ecf20Sopenharmony_ci
3138c2ecf20Sopenharmony_ci/* VIDTCON4 */
3148c2ecf20Sopenharmony_ci#define VIDTCON4				0x620
3158c2ecf20Sopenharmony_ci
3168c2ecf20Sopenharmony_ci#define VIDTCON4_LINEVAL_MASK			(0xfff << 16)
3178c2ecf20Sopenharmony_ci#define VIDTCON4_LINEVAL_SHIFT			16
3188c2ecf20Sopenharmony_ci#define VIDTCON4_LINEVAL_LIMIT			0xfff
3198c2ecf20Sopenharmony_ci#define VIDTCON4_LINEVAL(_x)			(((_x) & 0xfff) << 16)
3208c2ecf20Sopenharmony_ci
3218c2ecf20Sopenharmony_ci#define VIDTCON4_HOZVAL_MASK			(0xfff << 0)
3228c2ecf20Sopenharmony_ci#define VIDTCON4_HOZVAL_SHIFT			0
3238c2ecf20Sopenharmony_ci#define VIDTCON4_HOZVAL_LIMIT			0xfff
3248c2ecf20Sopenharmony_ci#define VIDTCON4_HOZVAL(_x)			(((_x) & 0xfff) << 0)
3258c2ecf20Sopenharmony_ci
3268c2ecf20Sopenharmony_ci/* LINECNT OP THRSHOLD*/
3278c2ecf20Sopenharmony_ci#define LINECNT_OP_THRESHOLD			0x630
3288c2ecf20Sopenharmony_ci
3298c2ecf20Sopenharmony_ci/* CRCCTRL */
3308c2ecf20Sopenharmony_ci#define CRCCTRL					0x6C8
3318c2ecf20Sopenharmony_ci#define CRCCTRL_CRCCLKEN			(0x1 << 2)
3328c2ecf20Sopenharmony_ci#define CRCCTRL_CRCSTART_F			(0x1 << 1)
3338c2ecf20Sopenharmony_ci#define CRCCTRL_CRCEN				(0x1 << 0)
3348c2ecf20Sopenharmony_ci
3358c2ecf20Sopenharmony_ci/* DECON_CMU */
3368c2ecf20Sopenharmony_ci#define DECON_CMU				0x704
3378c2ecf20Sopenharmony_ci
3388c2ecf20Sopenharmony_ci#define DECON_CMU_ALL_CLKGATE_ENABLE		0x3
3398c2ecf20Sopenharmony_ci#define DECON_CMU_SE_CLKGATE_ENABLE		(0x1 << 2)
3408c2ecf20Sopenharmony_ci#define DECON_CMU_SFR_CLKGATE_ENABLE		(0x1 << 1)
3418c2ecf20Sopenharmony_ci#define DECON_CMU_MEM_CLKGATE_ENABLE		(0x1 << 0)
3428c2ecf20Sopenharmony_ci
3438c2ecf20Sopenharmony_ci/* DECON_UPDATE */
3448c2ecf20Sopenharmony_ci#define DECON_UPDATE				0x710
3458c2ecf20Sopenharmony_ci
3468c2ecf20Sopenharmony_ci#define DECON_UPDATE_SLAVE_SYNC			(1 << 4)
3478c2ecf20Sopenharmony_ci#define DECON_UPDATE_STANDALONE_F		(1 << 0)
3488c2ecf20Sopenharmony_ci
3498c2ecf20Sopenharmony_ci#endif /* EXYNOS_REGS_DECON7_H */
350