xref: /linux/drivers/gpu/drm/exynos/regs-hdmi.h (revision 3e148baf464e5b5690ba68f3c310b06024bb862b)
1d8408326SSeung-Woo Kim /*
2d8408326SSeung-Woo Kim  *
3d8408326SSeung-Woo Kim  *  Cloned from drivers/media/video/s5p-tv/regs-hdmi.h
4d8408326SSeung-Woo Kim  *
5d8408326SSeung-Woo Kim  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
6d8408326SSeung-Woo Kim  * http://www.samsung.com/
7d8408326SSeung-Woo Kim  *
8d8408326SSeung-Woo Kim  * HDMI register header file for Samsung TVOUT driver
9d8408326SSeung-Woo Kim  *
10d8408326SSeung-Woo Kim  * This program is free software; you can redistribute it and/or modify
11d8408326SSeung-Woo Kim  * it under the terms of the GNU General Public License version 2 as
12d8408326SSeung-Woo Kim  * published by the Free Software Foundation.
13d8408326SSeung-Woo Kim */
14d8408326SSeung-Woo Kim 
15d8408326SSeung-Woo Kim #ifndef SAMSUNG_REGS_HDMI_H
16d8408326SSeung-Woo Kim #define SAMSUNG_REGS_HDMI_H
17d8408326SSeung-Woo Kim 
18d8408326SSeung-Woo Kim /*
19d8408326SSeung-Woo Kim  * Register part
20d8408326SSeung-Woo Kim */
21d8408326SSeung-Woo Kim 
223ecd70b1SJoonyoung Shim /* HDMI Version 1.3 & Common */
23d8408326SSeung-Woo Kim #define HDMI_CTRL_BASE(x)		((x) + 0x00000000)
24d8408326SSeung-Woo Kim #define HDMI_CORE_BASE(x)		((x) + 0x00010000)
25*3e148bafSSeung-Woo Kim #define HDMI_I2S_BASE(x)		((x) + 0x00040000)
26d8408326SSeung-Woo Kim #define HDMI_TG_BASE(x)			((x) + 0x00050000)
27d8408326SSeung-Woo Kim 
28d8408326SSeung-Woo Kim /* Control registers */
29d8408326SSeung-Woo Kim #define HDMI_INTC_CON			HDMI_CTRL_BASE(0x0000)
30d8408326SSeung-Woo Kim #define HDMI_INTC_FLAG			HDMI_CTRL_BASE(0x0004)
31d8408326SSeung-Woo Kim #define HDMI_HPD_STATUS			HDMI_CTRL_BASE(0x000C)
323ecd70b1SJoonyoung Shim #define HDMI_V13_PHY_RSTOUT		HDMI_CTRL_BASE(0x0014)
333ecd70b1SJoonyoung Shim #define HDMI_V13_PHY_VPLL		HDMI_CTRL_BASE(0x0018)
343ecd70b1SJoonyoung Shim #define HDMI_V13_PHY_CMU		HDMI_CTRL_BASE(0x001C)
353ecd70b1SJoonyoung Shim #define HDMI_V13_CORE_RSTOUT		HDMI_CTRL_BASE(0x0020)
36d8408326SSeung-Woo Kim 
37d8408326SSeung-Woo Kim /* Core registers */
38d8408326SSeung-Woo Kim #define HDMI_CON_0			HDMI_CORE_BASE(0x0000)
39d8408326SSeung-Woo Kim #define HDMI_CON_1			HDMI_CORE_BASE(0x0004)
40d8408326SSeung-Woo Kim #define HDMI_CON_2			HDMI_CORE_BASE(0x0008)
41d8408326SSeung-Woo Kim #define HDMI_SYS_STATUS			HDMI_CORE_BASE(0x0010)
423ecd70b1SJoonyoung Shim #define HDMI_V13_PHY_STATUS		HDMI_CORE_BASE(0x0014)
43d8408326SSeung-Woo Kim #define HDMI_STATUS_EN			HDMI_CORE_BASE(0x0020)
44d8408326SSeung-Woo Kim #define HDMI_HPD			HDMI_CORE_BASE(0x0030)
45d8408326SSeung-Woo Kim #define HDMI_MODE_SEL			HDMI_CORE_BASE(0x0040)
463ecd70b1SJoonyoung Shim #define HDMI_ENC_EN			HDMI_CORE_BASE(0x0044)
473ecd70b1SJoonyoung Shim #define HDMI_V13_BLUE_SCREEN_0		HDMI_CORE_BASE(0x0050)
483ecd70b1SJoonyoung Shim #define HDMI_V13_BLUE_SCREEN_1		HDMI_CORE_BASE(0x0054)
493ecd70b1SJoonyoung Shim #define HDMI_V13_BLUE_SCREEN_2		HDMI_CORE_BASE(0x0058)
50d8408326SSeung-Woo Kim #define HDMI_H_BLANK_0			HDMI_CORE_BASE(0x00A0)
51d8408326SSeung-Woo Kim #define HDMI_H_BLANK_1			HDMI_CORE_BASE(0x00A4)
523ecd70b1SJoonyoung Shim #define HDMI_V13_V_BLANK_0		HDMI_CORE_BASE(0x00B0)
533ecd70b1SJoonyoung Shim #define HDMI_V13_V_BLANK_1		HDMI_CORE_BASE(0x00B4)
543ecd70b1SJoonyoung Shim #define HDMI_V13_V_BLANK_2		HDMI_CORE_BASE(0x00B8)
553ecd70b1SJoonyoung Shim #define HDMI_V13_H_V_LINE_0		HDMI_CORE_BASE(0x00C0)
563ecd70b1SJoonyoung Shim #define HDMI_V13_H_V_LINE_1		HDMI_CORE_BASE(0x00C4)
573ecd70b1SJoonyoung Shim #define HDMI_V13_H_V_LINE_2		HDMI_CORE_BASE(0x00C8)
58d8408326SSeung-Woo Kim #define HDMI_VSYNC_POL			HDMI_CORE_BASE(0x00E4)
59d8408326SSeung-Woo Kim #define HDMI_INT_PRO_MODE		HDMI_CORE_BASE(0x00E8)
603ecd70b1SJoonyoung Shim #define HDMI_V13_V_BLANK_F_0		HDMI_CORE_BASE(0x0110)
613ecd70b1SJoonyoung Shim #define HDMI_V13_V_BLANK_F_1		HDMI_CORE_BASE(0x0114)
623ecd70b1SJoonyoung Shim #define HDMI_V13_V_BLANK_F_2		HDMI_CORE_BASE(0x0118)
633ecd70b1SJoonyoung Shim #define HDMI_V13_H_SYNC_GEN_0		HDMI_CORE_BASE(0x0120)
643ecd70b1SJoonyoung Shim #define HDMI_V13_H_SYNC_GEN_1		HDMI_CORE_BASE(0x0124)
653ecd70b1SJoonyoung Shim #define HDMI_V13_H_SYNC_GEN_2		HDMI_CORE_BASE(0x0128)
663ecd70b1SJoonyoung Shim #define HDMI_V13_V_SYNC_GEN_1_0		HDMI_CORE_BASE(0x0130)
673ecd70b1SJoonyoung Shim #define HDMI_V13_V_SYNC_GEN_1_1		HDMI_CORE_BASE(0x0134)
683ecd70b1SJoonyoung Shim #define HDMI_V13_V_SYNC_GEN_1_2		HDMI_CORE_BASE(0x0138)
693ecd70b1SJoonyoung Shim #define HDMI_V13_V_SYNC_GEN_2_0		HDMI_CORE_BASE(0x0140)
703ecd70b1SJoonyoung Shim #define HDMI_V13_V_SYNC_GEN_2_1		HDMI_CORE_BASE(0x0144)
713ecd70b1SJoonyoung Shim #define HDMI_V13_V_SYNC_GEN_2_2		HDMI_CORE_BASE(0x0148)
723ecd70b1SJoonyoung Shim #define HDMI_V13_V_SYNC_GEN_3_0		HDMI_CORE_BASE(0x0150)
733ecd70b1SJoonyoung Shim #define HDMI_V13_V_SYNC_GEN_3_1		HDMI_CORE_BASE(0x0154)
743ecd70b1SJoonyoung Shim #define HDMI_V13_V_SYNC_GEN_3_2		HDMI_CORE_BASE(0x0158)
753ecd70b1SJoonyoung Shim #define HDMI_V13_ACR_CON		HDMI_CORE_BASE(0x0180)
763ecd70b1SJoonyoung Shim #define HDMI_V13_AVI_CON		HDMI_CORE_BASE(0x0300)
773ecd70b1SJoonyoung Shim #define HDMI_V13_AVI_BYTE(n)		HDMI_CORE_BASE(0x0320 + 4 * (n))
783ecd70b1SJoonyoung Shim #define HDMI_V13_DC_CONTROL		HDMI_CORE_BASE(0x05C0)
793ecd70b1SJoonyoung Shim #define HDMI_V13_VIDEO_PATTERN_GEN	HDMI_CORE_BASE(0x05C4)
803ecd70b1SJoonyoung Shim #define HDMI_V13_HPD_GEN		HDMI_CORE_BASE(0x05C8)
813ecd70b1SJoonyoung Shim #define HDMI_V13_AUI_CON		HDMI_CORE_BASE(0x0360)
823ecd70b1SJoonyoung Shim #define HDMI_V13_SPD_CON		HDMI_CORE_BASE(0x0400)
83d8408326SSeung-Woo Kim 
84d8408326SSeung-Woo Kim /* Timing generator registers */
85d8408326SSeung-Woo Kim #define HDMI_TG_CMD			HDMI_TG_BASE(0x0000)
86d8408326SSeung-Woo Kim #define HDMI_TG_H_FSZ_L			HDMI_TG_BASE(0x0018)
87d8408326SSeung-Woo Kim #define HDMI_TG_H_FSZ_H			HDMI_TG_BASE(0x001C)
88d8408326SSeung-Woo Kim #define HDMI_TG_HACT_ST_L		HDMI_TG_BASE(0x0020)
89d8408326SSeung-Woo Kim #define HDMI_TG_HACT_ST_H		HDMI_TG_BASE(0x0024)
90d8408326SSeung-Woo Kim #define HDMI_TG_HACT_SZ_L		HDMI_TG_BASE(0x0028)
91d8408326SSeung-Woo Kim #define HDMI_TG_HACT_SZ_H		HDMI_TG_BASE(0x002C)
92d8408326SSeung-Woo Kim #define HDMI_TG_V_FSZ_L			HDMI_TG_BASE(0x0030)
93d8408326SSeung-Woo Kim #define HDMI_TG_V_FSZ_H			HDMI_TG_BASE(0x0034)
94d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC_L			HDMI_TG_BASE(0x0038)
95d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC_H			HDMI_TG_BASE(0x003C)
96d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC2_L		HDMI_TG_BASE(0x0040)
97d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC2_H		HDMI_TG_BASE(0x0044)
98d8408326SSeung-Woo Kim #define HDMI_TG_VACT_ST_L		HDMI_TG_BASE(0x0048)
99d8408326SSeung-Woo Kim #define HDMI_TG_VACT_ST_H		HDMI_TG_BASE(0x004C)
100d8408326SSeung-Woo Kim #define HDMI_TG_VACT_SZ_L		HDMI_TG_BASE(0x0050)
101d8408326SSeung-Woo Kim #define HDMI_TG_VACT_SZ_H		HDMI_TG_BASE(0x0054)
102d8408326SSeung-Woo Kim #define HDMI_TG_FIELD_CHG_L		HDMI_TG_BASE(0x0058)
103d8408326SSeung-Woo Kim #define HDMI_TG_FIELD_CHG_H		HDMI_TG_BASE(0x005C)
104d8408326SSeung-Woo Kim #define HDMI_TG_VACT_ST2_L		HDMI_TG_BASE(0x0060)
105d8408326SSeung-Woo Kim #define HDMI_TG_VACT_ST2_H		HDMI_TG_BASE(0x0064)
106d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC_TOP_HDMI_L	HDMI_TG_BASE(0x0078)
107d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC_TOP_HDMI_H	HDMI_TG_BASE(0x007C)
108d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC_BOT_HDMI_L	HDMI_TG_BASE(0x0080)
109d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC_BOT_HDMI_H	HDMI_TG_BASE(0x0084)
110d8408326SSeung-Woo Kim #define HDMI_TG_FIELD_TOP_HDMI_L	HDMI_TG_BASE(0x0088)
111d8408326SSeung-Woo Kim #define HDMI_TG_FIELD_TOP_HDMI_H	HDMI_TG_BASE(0x008C)
112d8408326SSeung-Woo Kim #define HDMI_TG_FIELD_BOT_HDMI_L	HDMI_TG_BASE(0x0090)
113d8408326SSeung-Woo Kim #define HDMI_TG_FIELD_BOT_HDMI_H	HDMI_TG_BASE(0x0094)
114d8408326SSeung-Woo Kim 
115d8408326SSeung-Woo Kim /*
116d8408326SSeung-Woo Kim  * Bit definition part
117d8408326SSeung-Woo Kim  */
118d8408326SSeung-Woo Kim 
119d8408326SSeung-Woo Kim /* HDMI_INTC_CON */
120d8408326SSeung-Woo Kim #define HDMI_INTC_EN_GLOBAL		(1 << 6)
121d8408326SSeung-Woo Kim #define HDMI_INTC_EN_HPD_PLUG		(1 << 3)
122d8408326SSeung-Woo Kim #define HDMI_INTC_EN_HPD_UNPLUG		(1 << 2)
123d8408326SSeung-Woo Kim 
124d8408326SSeung-Woo Kim /* HDMI_INTC_FLAG */
125d8408326SSeung-Woo Kim #define HDMI_INTC_FLAG_HPD_PLUG		(1 << 3)
126d8408326SSeung-Woo Kim #define HDMI_INTC_FLAG_HPD_UNPLUG	(1 << 2)
127d8408326SSeung-Woo Kim 
128d8408326SSeung-Woo Kim /* HDMI_PHY_RSTOUT */
129d8408326SSeung-Woo Kim #define HDMI_PHY_SW_RSTOUT		(1 << 0)
130d8408326SSeung-Woo Kim 
131d8408326SSeung-Woo Kim /* HDMI_CORE_RSTOUT */
132d8408326SSeung-Woo Kim #define HDMI_CORE_SW_RSTOUT		(1 << 0)
133d8408326SSeung-Woo Kim 
134d8408326SSeung-Woo Kim /* HDMI_CON_0 */
135d8408326SSeung-Woo Kim #define HDMI_BLUE_SCR_EN		(1 << 5)
136*3e148bafSSeung-Woo Kim #define HDMI_ASP_EN			(1 << 2)
137*3e148bafSSeung-Woo Kim #define HDMI_ASP_DIS			(0 << 2)
138*3e148bafSSeung-Woo Kim #define HDMI_ASP_MASK			(1 << 2)
139d8408326SSeung-Woo Kim #define HDMI_EN				(1 << 0)
140d8408326SSeung-Woo Kim 
141d8408326SSeung-Woo Kim /* HDMI_PHY_STATUS */
142d8408326SSeung-Woo Kim #define HDMI_PHY_STATUS_READY		(1 << 0)
143d8408326SSeung-Woo Kim 
144d8408326SSeung-Woo Kim /* HDMI_MODE_SEL */
145d8408326SSeung-Woo Kim #define HDMI_MODE_HDMI_EN		(1 << 1)
146d8408326SSeung-Woo Kim #define HDMI_MODE_DVI_EN		(1 << 0)
147*3e148bafSSeung-Woo Kim #define HDMI_DVI_MODE_EN		(1)
148*3e148bafSSeung-Woo Kim #define HDMI_DVI_MODE_DIS		(0)
149d8408326SSeung-Woo Kim #define HDMI_MODE_MASK			(3 << 0)
150d8408326SSeung-Woo Kim 
151d8408326SSeung-Woo Kim /* HDMI_TG_CMD */
152d8408326SSeung-Woo Kim #define HDMI_TG_EN			(1 << 0)
153d8408326SSeung-Woo Kim #define HDMI_FIELD_EN			(1 << 1)
154d8408326SSeung-Woo Kim 
1553ecd70b1SJoonyoung Shim 
1563ecd70b1SJoonyoung Shim /* HDMI Version 1.4 */
1573ecd70b1SJoonyoung Shim /* Control registers */
1583ecd70b1SJoonyoung Shim /* #define HDMI_INTC_CON		HDMI_CTRL_BASE(0x0000) */
1593ecd70b1SJoonyoung Shim /* #define HDMI_INTC_FLAG		HDMI_CTRL_BASE(0x0004) */
1603ecd70b1SJoonyoung Shim #define HDMI_HDCP_KEY_LOAD		HDMI_CTRL_BASE(0x0008)
1613ecd70b1SJoonyoung Shim /* #define HDMI_HPD_STATUS		HDMI_CTRL_BASE(0x000C) */
1623ecd70b1SJoonyoung Shim #define HDMI_INTC_CON_1			HDMI_CTRL_BASE(0x0010)
1633ecd70b1SJoonyoung Shim #define HDMI_INTC_FLAG_1		HDMI_CTRL_BASE(0x0014)
1643ecd70b1SJoonyoung Shim #define HDMI_PHY_STATUS_0		HDMI_CTRL_BASE(0x0020)
1653ecd70b1SJoonyoung Shim #define HDMI_PHY_STATUS_CMU		HDMI_CTRL_BASE(0x0024)
1663ecd70b1SJoonyoung Shim #define HDMI_PHY_STATUS_PLL		HDMI_CTRL_BASE(0x0028)
1673ecd70b1SJoonyoung Shim #define HDMI_PHY_CON_0			HDMI_CTRL_BASE(0x0030)
1683ecd70b1SJoonyoung Shim #define HDMI_HPD_CTRL			HDMI_CTRL_BASE(0x0040)
1693ecd70b1SJoonyoung Shim #define HDMI_HPD_ST			HDMI_CTRL_BASE(0x0044)
1703ecd70b1SJoonyoung Shim #define HDMI_HPD_TH_X			HDMI_CTRL_BASE(0x0050)
1713ecd70b1SJoonyoung Shim #define HDMI_AUDIO_CLKSEL		HDMI_CTRL_BASE(0x0070)
1723ecd70b1SJoonyoung Shim #define HDMI_PHY_RSTOUT			HDMI_CTRL_BASE(0x0074)
1733ecd70b1SJoonyoung Shim #define HDMI_PHY_VPLL			HDMI_CTRL_BASE(0x0078)
1743ecd70b1SJoonyoung Shim #define HDMI_PHY_CMU			HDMI_CTRL_BASE(0x007C)
1753ecd70b1SJoonyoung Shim #define HDMI_CORE_RSTOUT		HDMI_CTRL_BASE(0x0080)
1763ecd70b1SJoonyoung Shim 
1773ecd70b1SJoonyoung Shim /* Video related registers */
1783ecd70b1SJoonyoung Shim #define HDMI_YMAX			HDMI_CORE_BASE(0x0060)
1793ecd70b1SJoonyoung Shim #define HDMI_YMIN			HDMI_CORE_BASE(0x0064)
1803ecd70b1SJoonyoung Shim #define HDMI_CMAX			HDMI_CORE_BASE(0x0068)
1813ecd70b1SJoonyoung Shim #define HDMI_CMIN			HDMI_CORE_BASE(0x006C)
1823ecd70b1SJoonyoung Shim 
1833ecd70b1SJoonyoung Shim #define HDMI_V2_BLANK_0			HDMI_CORE_BASE(0x00B0)
1843ecd70b1SJoonyoung Shim #define HDMI_V2_BLANK_1			HDMI_CORE_BASE(0x00B4)
1853ecd70b1SJoonyoung Shim #define HDMI_V1_BLANK_0			HDMI_CORE_BASE(0x00B8)
1863ecd70b1SJoonyoung Shim #define HDMI_V1_BLANK_1			HDMI_CORE_BASE(0x00BC)
1873ecd70b1SJoonyoung Shim 
1883ecd70b1SJoonyoung Shim #define HDMI_V_LINE_0			HDMI_CORE_BASE(0x00C0)
1893ecd70b1SJoonyoung Shim #define HDMI_V_LINE_1			HDMI_CORE_BASE(0x00C4)
1903ecd70b1SJoonyoung Shim #define HDMI_H_LINE_0			HDMI_CORE_BASE(0x00C8)
1913ecd70b1SJoonyoung Shim #define HDMI_H_LINE_1			HDMI_CORE_BASE(0x00CC)
1923ecd70b1SJoonyoung Shim 
1933ecd70b1SJoonyoung Shim #define HDMI_HSYNC_POL			HDMI_CORE_BASE(0x00E0)
1943ecd70b1SJoonyoung Shim 
1953ecd70b1SJoonyoung Shim #define HDMI_V_BLANK_F0_0		HDMI_CORE_BASE(0x0110)
1963ecd70b1SJoonyoung Shim #define HDMI_V_BLANK_F0_1		HDMI_CORE_BASE(0x0114)
1973ecd70b1SJoonyoung Shim #define HDMI_V_BLANK_F1_0		HDMI_CORE_BASE(0x0118)
1983ecd70b1SJoonyoung Shim #define HDMI_V_BLANK_F1_1		HDMI_CORE_BASE(0x011C)
1993ecd70b1SJoonyoung Shim 
2003ecd70b1SJoonyoung Shim #define HDMI_H_SYNC_START_0		HDMI_CORE_BASE(0x0120)
2013ecd70b1SJoonyoung Shim #define HDMI_H_SYNC_START_1		HDMI_CORE_BASE(0x0124)
2023ecd70b1SJoonyoung Shim #define HDMI_H_SYNC_END_0		HDMI_CORE_BASE(0x0128)
2033ecd70b1SJoonyoung Shim #define HDMI_H_SYNC_END_1		HDMI_CORE_BASE(0x012C)
2043ecd70b1SJoonyoung Shim 
2053ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_BEF_2_0	HDMI_CORE_BASE(0x0130)
2063ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_BEF_2_1	HDMI_CORE_BASE(0x0134)
2073ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_BEF_1_0	HDMI_CORE_BASE(0x0138)
2083ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_BEF_1_1	HDMI_CORE_BASE(0x013C)
2093ecd70b1SJoonyoung Shim 
2103ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_2_0	HDMI_CORE_BASE(0x0140)
2113ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_2_1	HDMI_CORE_BASE(0x0144)
2123ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_1_0	HDMI_CORE_BASE(0x0148)
2133ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_1_1	HDMI_CORE_BASE(0x014C)
2143ecd70b1SJoonyoung Shim 
2153ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_PXL_2_0	HDMI_CORE_BASE(0x0150)
2163ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_PXL_2_1	HDMI_CORE_BASE(0x0154)
2173ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_PXL_1_0	HDMI_CORE_BASE(0x0158)
2183ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_PXL_1_1	HDMI_CORE_BASE(0x015C)
2193ecd70b1SJoonyoung Shim 
2203ecd70b1SJoonyoung Shim #define HDMI_V_BLANK_F2_0		HDMI_CORE_BASE(0x0160)
2213ecd70b1SJoonyoung Shim #define HDMI_V_BLANK_F2_1		HDMI_CORE_BASE(0x0164)
2223ecd70b1SJoonyoung Shim #define HDMI_V_BLANK_F3_0		HDMI_CORE_BASE(0x0168)
2233ecd70b1SJoonyoung Shim #define HDMI_V_BLANK_F3_1		HDMI_CORE_BASE(0x016C)
2243ecd70b1SJoonyoung Shim #define HDMI_V_BLANK_F4_0		HDMI_CORE_BASE(0x0170)
2253ecd70b1SJoonyoung Shim #define HDMI_V_BLANK_F4_1		HDMI_CORE_BASE(0x0174)
2263ecd70b1SJoonyoung Shim #define HDMI_V_BLANK_F5_0		HDMI_CORE_BASE(0x0178)
2273ecd70b1SJoonyoung Shim #define HDMI_V_BLANK_F5_1		HDMI_CORE_BASE(0x017C)
2283ecd70b1SJoonyoung Shim 
2293ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_3_0	HDMI_CORE_BASE(0x0180)
2303ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_3_1	HDMI_CORE_BASE(0x0184)
2313ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_4_0	HDMI_CORE_BASE(0x0188)
2323ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_4_1	HDMI_CORE_BASE(0x018C)
2333ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_5_0	HDMI_CORE_BASE(0x0190)
2343ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_5_1	HDMI_CORE_BASE(0x0194)
2353ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_6_0	HDMI_CORE_BASE(0x0198)
2363ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_6_1	HDMI_CORE_BASE(0x019C)
2373ecd70b1SJoonyoung Shim 
2383ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_PXL_3_0	HDMI_CORE_BASE(0x01A0)
2393ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_PXL_3_1	HDMI_CORE_BASE(0x01A4)
2403ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_PXL_4_0	HDMI_CORE_BASE(0x01A8)
2413ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_PXL_4_1	HDMI_CORE_BASE(0x01AC)
2423ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_PXL_5_0	HDMI_CORE_BASE(0x01B0)
2433ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_PXL_5_1	HDMI_CORE_BASE(0x01B4)
2443ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_PXL_6_0	HDMI_CORE_BASE(0x01B8)
2453ecd70b1SJoonyoung Shim #define HDMI_V_SYNC_LINE_AFT_PXL_6_1	HDMI_CORE_BASE(0x01BC)
2463ecd70b1SJoonyoung Shim 
2473ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_1_0		HDMI_CORE_BASE(0x01C0)
2483ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_1_1		HDMI_CORE_BASE(0x01C4)
2493ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_2_0		HDMI_CORE_BASE(0x01C8)
2503ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_2_1		HDMI_CORE_BASE(0x01CC)
2513ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_3_0		HDMI_CORE_BASE(0x01D0)
2523ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_3_1		HDMI_CORE_BASE(0x01D4)
2533ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_4_0		HDMI_CORE_BASE(0x01D8)
2543ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_4_1		HDMI_CORE_BASE(0x01DC)
2553ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_5_0		HDMI_CORE_BASE(0x01E0)
2563ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_5_1		HDMI_CORE_BASE(0x01E4)
2573ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_6_0		HDMI_CORE_BASE(0x01E8)
2583ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_6_1		HDMI_CORE_BASE(0x01EC)
2593ecd70b1SJoonyoung Shim 
2603ecd70b1SJoonyoung Shim #define HDMI_GCP_CON			HDMI_CORE_BASE(0x0200)
2613ecd70b1SJoonyoung Shim #define HDMI_GCP_BYTE1			HDMI_CORE_BASE(0x0210)
2623ecd70b1SJoonyoung Shim #define HDMI_GCP_BYTE2			HDMI_CORE_BASE(0x0214)
2633ecd70b1SJoonyoung Shim #define HDMI_GCP_BYTE3			HDMI_CORE_BASE(0x0218)
2643ecd70b1SJoonyoung Shim 
2653ecd70b1SJoonyoung Shim /* Audio related registers */
2663ecd70b1SJoonyoung Shim #define HDMI_ASP_CON			HDMI_CORE_BASE(0x0300)
2673ecd70b1SJoonyoung Shim #define HDMI_ASP_SP_FLAT		HDMI_CORE_BASE(0x0304)
2683ecd70b1SJoonyoung Shim #define HDMI_ASP_CHCFG0			HDMI_CORE_BASE(0x0310)
2693ecd70b1SJoonyoung Shim #define HDMI_ASP_CHCFG1			HDMI_CORE_BASE(0x0314)
2703ecd70b1SJoonyoung Shim #define HDMI_ASP_CHCFG2			HDMI_CORE_BASE(0x0318)
2713ecd70b1SJoonyoung Shim #define HDMI_ASP_CHCFG3			HDMI_CORE_BASE(0x031C)
2723ecd70b1SJoonyoung Shim 
2733ecd70b1SJoonyoung Shim #define HDMI_ACR_CON			HDMI_CORE_BASE(0x0400)
2743ecd70b1SJoonyoung Shim #define HDMI_ACR_MCTS0			HDMI_CORE_BASE(0x0410)
2753ecd70b1SJoonyoung Shim #define HDMI_ACR_MCTS1			HDMI_CORE_BASE(0x0414)
2763ecd70b1SJoonyoung Shim #define HDMI_ACR_MCTS2			HDMI_CORE_BASE(0x0418)
277*3e148bafSSeung-Woo Kim #define HDMI_ACR_CTS0			HDMI_CORE_BASE(0x0420)
278*3e148bafSSeung-Woo Kim #define HDMI_ACR_CTS1			HDMI_CORE_BASE(0x0424)
279*3e148bafSSeung-Woo Kim #define HDMI_ACR_CTS2			HDMI_CORE_BASE(0x0428)
2803ecd70b1SJoonyoung Shim #define HDMI_ACR_N0			HDMI_CORE_BASE(0x0430)
2813ecd70b1SJoonyoung Shim #define HDMI_ACR_N1			HDMI_CORE_BASE(0x0434)
2823ecd70b1SJoonyoung Shim #define HDMI_ACR_N2			HDMI_CORE_BASE(0x0438)
2833ecd70b1SJoonyoung Shim 
2843ecd70b1SJoonyoung Shim /* Packet related registers */
2853ecd70b1SJoonyoung Shim #define HDMI_ACP_CON			HDMI_CORE_BASE(0x0500)
2863ecd70b1SJoonyoung Shim #define HDMI_ACP_TYPE			HDMI_CORE_BASE(0x0514)
2873ecd70b1SJoonyoung Shim #define HDMI_ACP_DATA(n)		HDMI_CORE_BASE(0x0520 + 4 * (n))
2883ecd70b1SJoonyoung Shim 
2893ecd70b1SJoonyoung Shim #define HDMI_ISRC_CON			HDMI_CORE_BASE(0x0600)
2903ecd70b1SJoonyoung Shim #define HDMI_ISRC1_HEADER1		HDMI_CORE_BASE(0x0614)
2913ecd70b1SJoonyoung Shim #define HDMI_ISRC1_DATA(n)		HDMI_CORE_BASE(0x0620 + 4 * (n))
2923ecd70b1SJoonyoung Shim #define HDMI_ISRC2_DATA(n)		HDMI_CORE_BASE(0x06A0 + 4 * (n))
2933ecd70b1SJoonyoung Shim 
2943ecd70b1SJoonyoung Shim #define HDMI_AVI_CON			HDMI_CORE_BASE(0x0700)
2953ecd70b1SJoonyoung Shim #define HDMI_AVI_HEADER0		HDMI_CORE_BASE(0x0710)
2963ecd70b1SJoonyoung Shim #define HDMI_AVI_HEADER1		HDMI_CORE_BASE(0x0714)
2973ecd70b1SJoonyoung Shim #define HDMI_AVI_HEADER2		HDMI_CORE_BASE(0x0718)
2983ecd70b1SJoonyoung Shim #define HDMI_AVI_CHECK_SUM		HDMI_CORE_BASE(0x071C)
2993ecd70b1SJoonyoung Shim #define HDMI_AVI_BYTE(n)		HDMI_CORE_BASE(0x0720 + 4 * (n))
3003ecd70b1SJoonyoung Shim 
3013ecd70b1SJoonyoung Shim #define HDMI_AUI_CON			HDMI_CORE_BASE(0x0800)
3023ecd70b1SJoonyoung Shim #define HDMI_AUI_HEADER0		HDMI_CORE_BASE(0x0810)
3033ecd70b1SJoonyoung Shim #define HDMI_AUI_HEADER1		HDMI_CORE_BASE(0x0814)
3043ecd70b1SJoonyoung Shim #define HDMI_AUI_HEADER2		HDMI_CORE_BASE(0x0818)
3053ecd70b1SJoonyoung Shim #define HDMI_AUI_CHECK_SUM		HDMI_CORE_BASE(0x081C)
3063ecd70b1SJoonyoung Shim #define HDMI_AUI_BYTE(n)		HDMI_CORE_BASE(0x0820 + 4 * (n))
3073ecd70b1SJoonyoung Shim 
3083ecd70b1SJoonyoung Shim #define HDMI_MPG_CON			HDMI_CORE_BASE(0x0900)
3093ecd70b1SJoonyoung Shim #define HDMI_MPG_CHECK_SUM		HDMI_CORE_BASE(0x091C)
3103ecd70b1SJoonyoung Shim #define HDMI_MPG_DATA(n)		HDMI_CORE_BASE(0x0920 + 4 * (n))
3113ecd70b1SJoonyoung Shim 
3123ecd70b1SJoonyoung Shim #define HDMI_SPD_CON			HDMI_CORE_BASE(0x0A00)
3133ecd70b1SJoonyoung Shim #define HDMI_SPD_HEADER0		HDMI_CORE_BASE(0x0A10)
3143ecd70b1SJoonyoung Shim #define HDMI_SPD_HEADER1		HDMI_CORE_BASE(0x0A14)
3153ecd70b1SJoonyoung Shim #define HDMI_SPD_HEADER2		HDMI_CORE_BASE(0x0A18)
3163ecd70b1SJoonyoung Shim #define HDMI_SPD_DATA(n)		HDMI_CORE_BASE(0x0A20 + 4 * (n))
3173ecd70b1SJoonyoung Shim 
3183ecd70b1SJoonyoung Shim #define HDMI_GAMUT_CON			HDMI_CORE_BASE(0x0B00)
3193ecd70b1SJoonyoung Shim #define HDMI_GAMUT_HEADER0		HDMI_CORE_BASE(0x0B10)
3203ecd70b1SJoonyoung Shim #define HDMI_GAMUT_HEADER1		HDMI_CORE_BASE(0x0B14)
3213ecd70b1SJoonyoung Shim #define HDMI_GAMUT_HEADER2		HDMI_CORE_BASE(0x0B18)
3223ecd70b1SJoonyoung Shim #define HDMI_GAMUT_METADATA(n)		HDMI_CORE_BASE(0x0B20 + 4 * (n))
3233ecd70b1SJoonyoung Shim 
3243ecd70b1SJoonyoung Shim #define HDMI_VSI_CON			HDMI_CORE_BASE(0x0C00)
3253ecd70b1SJoonyoung Shim #define HDMI_VSI_HEADER0		HDMI_CORE_BASE(0x0C10)
3263ecd70b1SJoonyoung Shim #define HDMI_VSI_HEADER1		HDMI_CORE_BASE(0x0C14)
3273ecd70b1SJoonyoung Shim #define HDMI_VSI_HEADER2		HDMI_CORE_BASE(0x0C18)
3283ecd70b1SJoonyoung Shim #define HDMI_VSI_DATA(n)		HDMI_CORE_BASE(0x0C20 + 4 * (n))
3293ecd70b1SJoonyoung Shim 
3303ecd70b1SJoonyoung Shim #define HDMI_DC_CONTROL			HDMI_CORE_BASE(0x0D00)
3313ecd70b1SJoonyoung Shim #define HDMI_VIDEO_PATTERN_GEN		HDMI_CORE_BASE(0x0D04)
3323ecd70b1SJoonyoung Shim 
3333ecd70b1SJoonyoung Shim #define HDMI_AN_SEED_SEL		HDMI_CORE_BASE(0x0E48)
3343ecd70b1SJoonyoung Shim #define HDMI_AN_SEED_0			HDMI_CORE_BASE(0x0E58)
3353ecd70b1SJoonyoung Shim #define HDMI_AN_SEED_1			HDMI_CORE_BASE(0x0E5C)
3363ecd70b1SJoonyoung Shim #define HDMI_AN_SEED_2			HDMI_CORE_BASE(0x0E60)
3373ecd70b1SJoonyoung Shim #define HDMI_AN_SEED_3			HDMI_CORE_BASE(0x0E64)
3383ecd70b1SJoonyoung Shim 
3393ecd70b1SJoonyoung Shim /* HDCP related registers */
3403ecd70b1SJoonyoung Shim #define HDMI_HDCP_SHA1(n)		HDMI_CORE_BASE(0x7000 + 4 * (n))
3413ecd70b1SJoonyoung Shim #define HDMI_HDCP_KSV_LIST(n)		HDMI_CORE_BASE(0x7050 + 4 * (n))
3423ecd70b1SJoonyoung Shim 
3433ecd70b1SJoonyoung Shim #define HDMI_HDCP_KSV_LIST_CON		HDMI_CORE_BASE(0x7064)
3443ecd70b1SJoonyoung Shim #define HDMI_HDCP_SHA_RESULT		HDMI_CORE_BASE(0x7070)
3453ecd70b1SJoonyoung Shim #define HDMI_HDCP_CTRL1			HDMI_CORE_BASE(0x7080)
3463ecd70b1SJoonyoung Shim #define HDMI_HDCP_CTRL2			HDMI_CORE_BASE(0x7084)
3473ecd70b1SJoonyoung Shim #define HDMI_HDCP_CHECK_RESULT		HDMI_CORE_BASE(0x7090)
3483ecd70b1SJoonyoung Shim #define HDMI_HDCP_BKSV(n)		HDMI_CORE_BASE(0x70A0 + 4 * (n))
3493ecd70b1SJoonyoung Shim #define HDMI_HDCP_AKSV(n)		HDMI_CORE_BASE(0x70C0 + 4 * (n))
3503ecd70b1SJoonyoung Shim #define HDMI_HDCP_AN(n)			HDMI_CORE_BASE(0x70E0 + 4 * (n))
3513ecd70b1SJoonyoung Shim 
3523ecd70b1SJoonyoung Shim #define HDMI_HDCP_BCAPS			HDMI_CORE_BASE(0x7100)
3533ecd70b1SJoonyoung Shim #define HDMI_HDCP_BSTATUS_0		HDMI_CORE_BASE(0x7110)
3543ecd70b1SJoonyoung Shim #define HDMI_HDCP_BSTATUS_1		HDMI_CORE_BASE(0x7114)
3553ecd70b1SJoonyoung Shim #define HDMI_HDCP_RI_0			HDMI_CORE_BASE(0x7140)
3563ecd70b1SJoonyoung Shim #define HDMI_HDCP_RI_1			HDMI_CORE_BASE(0x7144)
3573ecd70b1SJoonyoung Shim #define HDMI_HDCP_I2C_INT		HDMI_CORE_BASE(0x7180)
3583ecd70b1SJoonyoung Shim #define HDMI_HDCP_AN_INT		HDMI_CORE_BASE(0x7190)
3593ecd70b1SJoonyoung Shim #define HDMI_HDCP_WDT_INT		HDMI_CORE_BASE(0x71A0)
3603ecd70b1SJoonyoung Shim #define HDMI_HDCP_RI_INT		HDMI_CORE_BASE(0x71B0)
3613ecd70b1SJoonyoung Shim #define HDMI_HDCP_RI_COMPARE_0		HDMI_CORE_BASE(0x71D0)
3623ecd70b1SJoonyoung Shim #define HDMI_HDCP_RI_COMPARE_1		HDMI_CORE_BASE(0x71D4)
3633ecd70b1SJoonyoung Shim #define HDMI_HDCP_FRAME_COUNT		HDMI_CORE_BASE(0x71E0)
3643ecd70b1SJoonyoung Shim 
3653ecd70b1SJoonyoung Shim #define HDMI_RGB_ROUND_EN		HDMI_CORE_BASE(0xD500)
3663ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_R_0		HDMI_CORE_BASE(0xD504)
3673ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_R_1		HDMI_CORE_BASE(0xD508)
3683ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_G_0		HDMI_CORE_BASE(0xD50C)
3693ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_G_1		HDMI_CORE_BASE(0xD510)
3703ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_B_0		HDMI_CORE_BASE(0xD514)
3713ecd70b1SJoonyoung Shim #define HDMI_VACT_SPACE_B_1		HDMI_CORE_BASE(0xD518)
3723ecd70b1SJoonyoung Shim 
3733ecd70b1SJoonyoung Shim #define HDMI_BLUE_SCREEN_B_0		HDMI_CORE_BASE(0xD520)
3743ecd70b1SJoonyoung Shim #define HDMI_BLUE_SCREEN_B_1		HDMI_CORE_BASE(0xD524)
3753ecd70b1SJoonyoung Shim #define HDMI_BLUE_SCREEN_G_0		HDMI_CORE_BASE(0xD528)
3763ecd70b1SJoonyoung Shim #define HDMI_BLUE_SCREEN_G_1		HDMI_CORE_BASE(0xD52C)
3773ecd70b1SJoonyoung Shim #define HDMI_BLUE_SCREEN_R_0		HDMI_CORE_BASE(0xD530)
3783ecd70b1SJoonyoung Shim #define HDMI_BLUE_SCREEN_R_1		HDMI_CORE_BASE(0xD534)
3793ecd70b1SJoonyoung Shim 
380*3e148bafSSeung-Woo Kim /* HDMI I2S register */
381*3e148bafSSeung-Woo Kim #define HDMI_I2S_CLK_CON		HDMI_I2S_BASE(0x000)
382*3e148bafSSeung-Woo Kim #define HDMI_I2S_CON_1			HDMI_I2S_BASE(0x004)
383*3e148bafSSeung-Woo Kim #define HDMI_I2S_CON_2			HDMI_I2S_BASE(0x008)
384*3e148bafSSeung-Woo Kim #define HDMI_I2S_PIN_SEL_0		HDMI_I2S_BASE(0x00c)
385*3e148bafSSeung-Woo Kim #define HDMI_I2S_PIN_SEL_1		HDMI_I2S_BASE(0x010)
386*3e148bafSSeung-Woo Kim #define HDMI_I2S_PIN_SEL_2		HDMI_I2S_BASE(0x014)
387*3e148bafSSeung-Woo Kim #define HDMI_I2S_PIN_SEL_3		HDMI_I2S_BASE(0x018)
388*3e148bafSSeung-Woo Kim #define HDMI_I2S_DSD_CON		HDMI_I2S_BASE(0x01c)
389*3e148bafSSeung-Woo Kim #define HDMI_I2S_MUX_CON		HDMI_I2S_BASE(0x020)
390*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_ST_CON		HDMI_I2S_BASE(0x024)
391*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_ST_0		HDMI_I2S_BASE(0x028)
392*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_ST_1		HDMI_I2S_BASE(0x02c)
393*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_ST_2		HDMI_I2S_BASE(0x030)
394*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_ST_3		HDMI_I2S_BASE(0x034)
395*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_ST_4		HDMI_I2S_BASE(0x038)
396*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_ST_SH_0		HDMI_I2S_BASE(0x03c)
397*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_ST_SH_1		HDMI_I2S_BASE(0x040)
398*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_ST_SH_2		HDMI_I2S_BASE(0x044)
399*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_ST_SH_3		HDMI_I2S_BASE(0x048)
400*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_ST_SH_4		HDMI_I2S_BASE(0x04c)
401*3e148bafSSeung-Woo Kim #define HDMI_I2S_MUX_CH			HDMI_I2S_BASE(0x054)
402*3e148bafSSeung-Woo Kim #define HDMI_I2S_MUX_CUV		HDMI_I2S_BASE(0x058)
403*3e148bafSSeung-Woo Kim 
404*3e148bafSSeung-Woo Kim /* I2S bit definition */
405*3e148bafSSeung-Woo Kim 
406*3e148bafSSeung-Woo Kim /* I2S_CLK_CON */
407*3e148bafSSeung-Woo Kim #define HDMI_I2S_CLK_DIS		(0)
408*3e148bafSSeung-Woo Kim #define HDMI_I2S_CLK_EN			(1)
409*3e148bafSSeung-Woo Kim 
410*3e148bafSSeung-Woo Kim /* I2S_CON_1 */
411*3e148bafSSeung-Woo Kim #define HDMI_I2S_SCLK_FALLING_EDGE	(0 << 1)
412*3e148bafSSeung-Woo Kim #define HDMI_I2S_SCLK_RISING_EDGE	(1 << 1)
413*3e148bafSSeung-Woo Kim #define HDMI_I2S_L_CH_LOW_POL		(0)
414*3e148bafSSeung-Woo Kim #define HDMI_I2S_L_CH_HIGH_POL		(1)
415*3e148bafSSeung-Woo Kim 
416*3e148bafSSeung-Woo Kim /* I2S_CON_2 */
417*3e148bafSSeung-Woo Kim #define HDMI_I2S_MSB_FIRST_MODE		(0 << 6)
418*3e148bafSSeung-Woo Kim #define HDMI_I2S_LSB_FIRST_MODE		(1 << 6)
419*3e148bafSSeung-Woo Kim #define HDMI_I2S_BIT_CH_32FS		(0 << 4)
420*3e148bafSSeung-Woo Kim #define HDMI_I2S_BIT_CH_48FS		(1 << 4)
421*3e148bafSSeung-Woo Kim #define HDMI_I2S_BIT_CH_RESERVED	(2 << 4)
422*3e148bafSSeung-Woo Kim #define HDMI_I2S_SDATA_16BIT		(1 << 2)
423*3e148bafSSeung-Woo Kim #define HDMI_I2S_SDATA_20BIT		(2 << 2)
424*3e148bafSSeung-Woo Kim #define HDMI_I2S_SDATA_24BIT		(3 << 2)
425*3e148bafSSeung-Woo Kim #define HDMI_I2S_BASIC_FORMAT		(0)
426*3e148bafSSeung-Woo Kim #define HDMI_I2S_L_JUST_FORMAT		(2)
427*3e148bafSSeung-Woo Kim #define HDMI_I2S_R_JUST_FORMAT		(3)
428*3e148bafSSeung-Woo Kim #define HDMI_I2S_CON_2_CLR		(~(0xFF))
429*3e148bafSSeung-Woo Kim #define HDMI_I2S_SET_BIT_CH(x)		(((x) & 0x7) << 4)
430*3e148bafSSeung-Woo Kim #define HDMI_I2S_SET_SDATA_BIT(x)	(((x) & 0x7) << 2)
431*3e148bafSSeung-Woo Kim 
432*3e148bafSSeung-Woo Kim /* I2S_PIN_SEL_0 */
433*3e148bafSSeung-Woo Kim #define HDMI_I2S_SEL_SCLK(x)		(((x) & 0x7) << 4)
434*3e148bafSSeung-Woo Kim #define HDMI_I2S_SEL_LRCK(x)		((x) & 0x7)
435*3e148bafSSeung-Woo Kim 
436*3e148bafSSeung-Woo Kim /* I2S_PIN_SEL_1 */
437*3e148bafSSeung-Woo Kim #define HDMI_I2S_SEL_SDATA1(x)		(((x) & 0x7) << 4)
438*3e148bafSSeung-Woo Kim #define HDMI_I2S_SEL_SDATA2(x)		((x) & 0x7)
439*3e148bafSSeung-Woo Kim 
440*3e148bafSSeung-Woo Kim /* I2S_PIN_SEL_2 */
441*3e148bafSSeung-Woo Kim #define HDMI_I2S_SEL_SDATA3(x)		(((x) & 0x7) << 4)
442*3e148bafSSeung-Woo Kim #define HDMI_I2S_SEL_SDATA2(x)		((x) & 0x7)
443*3e148bafSSeung-Woo Kim 
444*3e148bafSSeung-Woo Kim /* I2S_PIN_SEL_3 */
445*3e148bafSSeung-Woo Kim #define HDMI_I2S_SEL_DSD(x)		((x) & 0x7)
446*3e148bafSSeung-Woo Kim 
447*3e148bafSSeung-Woo Kim /* I2S_DSD_CON */
448*3e148bafSSeung-Woo Kim #define HDMI_I2S_DSD_CLK_RI_EDGE	(1 << 1)
449*3e148bafSSeung-Woo Kim #define HDMI_I2S_DSD_CLK_FA_EDGE	(0 << 1)
450*3e148bafSSeung-Woo Kim #define HDMI_I2S_DSD_ENABLE		(1)
451*3e148bafSSeung-Woo Kim #define HDMI_I2S_DSD_DISABLE		(0)
452*3e148bafSSeung-Woo Kim 
453*3e148bafSSeung-Woo Kim /* I2S_MUX_CON */
454*3e148bafSSeung-Woo Kim #define HDMI_I2S_NOISE_FILTER_ZERO	(0 << 5)
455*3e148bafSSeung-Woo Kim #define HDMI_I2S_NOISE_FILTER_2_STAGE	(1 << 5)
456*3e148bafSSeung-Woo Kim #define HDMI_I2S_NOISE_FILTER_3_STAGE	(2 << 5)
457*3e148bafSSeung-Woo Kim #define HDMI_I2S_NOISE_FILTER_4_STAGE	(3 << 5)
458*3e148bafSSeung-Woo Kim #define HDMI_I2S_NOISE_FILTER_5_STAGE	(4 << 5)
459*3e148bafSSeung-Woo Kim #define HDMI_I2S_IN_DISABLE		(1 << 4)
460*3e148bafSSeung-Woo Kim #define HDMI_I2S_IN_ENABLE		(0 << 4)
461*3e148bafSSeung-Woo Kim #define HDMI_I2S_AUD_SPDIF		(0 << 2)
462*3e148bafSSeung-Woo Kim #define HDMI_I2S_AUD_I2S		(1 << 2)
463*3e148bafSSeung-Woo Kim #define HDMI_I2S_AUD_DSD		(2 << 2)
464*3e148bafSSeung-Woo Kim #define HDMI_I2S_CUV_SPDIF_ENABLE	(0 << 1)
465*3e148bafSSeung-Woo Kim #define HDMI_I2S_CUV_I2S_ENABLE		(1 << 1)
466*3e148bafSSeung-Woo Kim #define HDMI_I2S_MUX_DISABLE		(0)
467*3e148bafSSeung-Woo Kim #define HDMI_I2S_MUX_ENABLE		(1)
468*3e148bafSSeung-Woo Kim #define HDMI_I2S_MUX_CON_CLR		(~(0xFF))
469*3e148bafSSeung-Woo Kim 
470*3e148bafSSeung-Woo Kim /* I2S_CH_ST_CON */
471*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_STATUS_RELOAD	(1)
472*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_ST_CON_CLR		(~(1))
473*3e148bafSSeung-Woo Kim 
474*3e148bafSSeung-Woo Kim /* I2S_CH_ST_0 / I2S_CH_ST_SH_0 */
475*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_STATUS_MODE_0	(0 << 6)
476*3e148bafSSeung-Woo Kim #define HDMI_I2S_2AUD_CH_WITHOUT_PREEMPH	(0 << 3)
477*3e148bafSSeung-Woo Kim #define HDMI_I2S_2AUD_CH_WITH_PREEMPH	(1 << 3)
478*3e148bafSSeung-Woo Kim #define HDMI_I2S_DEFAULT_EMPHASIS	(0 << 3)
479*3e148bafSSeung-Woo Kim #define HDMI_I2S_COPYRIGHT		(0 << 2)
480*3e148bafSSeung-Woo Kim #define HDMI_I2S_NO_COPYRIGHT		(1 << 2)
481*3e148bafSSeung-Woo Kim #define HDMI_I2S_LINEAR_PCM		(0 << 1)
482*3e148bafSSeung-Woo Kim #define HDMI_I2S_NO_LINEAR_PCM		(1 << 1)
483*3e148bafSSeung-Woo Kim #define HDMI_I2S_CONSUMER_FORMAT	(0)
484*3e148bafSSeung-Woo Kim #define HDMI_I2S_PROF_FORMAT		(1)
485*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_ST_0_CLR		(~(0xFF))
486*3e148bafSSeung-Woo Kim 
487*3e148bafSSeung-Woo Kim /* I2S_CH_ST_1 / I2S_CH_ST_SH_1 */
488*3e148bafSSeung-Woo Kim #define HDMI_I2S_CD_PLAYER		(0x00)
489*3e148bafSSeung-Woo Kim #define HDMI_I2S_DAT_PLAYER		(0x03)
490*3e148bafSSeung-Woo Kim #define HDMI_I2S_DCC_PLAYER		(0x43)
491*3e148bafSSeung-Woo Kim #define HDMI_I2S_MINI_DISC_PLAYER	(0x49)
492*3e148bafSSeung-Woo Kim 
493*3e148bafSSeung-Woo Kim /* I2S_CH_ST_2 / I2S_CH_ST_SH_2 */
494*3e148bafSSeung-Woo Kim #define HDMI_I2S_CHANNEL_NUM_MASK	(0xF << 4)
495*3e148bafSSeung-Woo Kim #define HDMI_I2S_SOURCE_NUM_MASK	(0xF)
496*3e148bafSSeung-Woo Kim #define HDMI_I2S_SET_CHANNEL_NUM(x)	(((x) & (0xF)) << 4)
497*3e148bafSSeung-Woo Kim #define HDMI_I2S_SET_SOURCE_NUM(x)	((x) & (0xF))
498*3e148bafSSeung-Woo Kim 
499*3e148bafSSeung-Woo Kim /* I2S_CH_ST_3 / I2S_CH_ST_SH_3 */
500*3e148bafSSeung-Woo Kim #define HDMI_I2S_CLK_ACCUR_LEVEL_1	(1 << 4)
501*3e148bafSSeung-Woo Kim #define HDMI_I2S_CLK_ACCUR_LEVEL_2	(0 << 4)
502*3e148bafSSeung-Woo Kim #define HDMI_I2S_CLK_ACCUR_LEVEL_3	(2 << 4)
503*3e148bafSSeung-Woo Kim #define HDMI_I2S_SMP_FREQ_44_1		(0x0)
504*3e148bafSSeung-Woo Kim #define HDMI_I2S_SMP_FREQ_48		(0x2)
505*3e148bafSSeung-Woo Kim #define HDMI_I2S_SMP_FREQ_32		(0x3)
506*3e148bafSSeung-Woo Kim #define HDMI_I2S_SMP_FREQ_96		(0xA)
507*3e148bafSSeung-Woo Kim #define HDMI_I2S_SET_SMP_FREQ(x)	((x) & (0xF))
508*3e148bafSSeung-Woo Kim 
509*3e148bafSSeung-Woo Kim /* I2S_CH_ST_4 / I2S_CH_ST_SH_4 */
510*3e148bafSSeung-Woo Kim #define HDMI_I2S_ORG_SMP_FREQ_44_1	(0xF << 4)
511*3e148bafSSeung-Woo Kim #define HDMI_I2S_ORG_SMP_FREQ_88_2	(0x7 << 4)
512*3e148bafSSeung-Woo Kim #define HDMI_I2S_ORG_SMP_FREQ_22_05	(0xB << 4)
513*3e148bafSSeung-Woo Kim #define HDMI_I2S_ORG_SMP_FREQ_176_4	(0x3 << 4)
514*3e148bafSSeung-Woo Kim #define HDMI_I2S_WORD_LEN_NOT_DEFINE	(0x0 << 1)
515*3e148bafSSeung-Woo Kim #define HDMI_I2S_WORD_LEN_MAX24_20BITS	(0x1 << 1)
516*3e148bafSSeung-Woo Kim #define HDMI_I2S_WORD_LEN_MAX24_22BITS	(0x2 << 1)
517*3e148bafSSeung-Woo Kim #define HDMI_I2S_WORD_LEN_MAX24_23BITS	(0x4 << 1)
518*3e148bafSSeung-Woo Kim #define HDMI_I2S_WORD_LEN_MAX24_24BITS	(0x5 << 1)
519*3e148bafSSeung-Woo Kim #define HDMI_I2S_WORD_LEN_MAX24_21BITS	(0x6 << 1)
520*3e148bafSSeung-Woo Kim #define HDMI_I2S_WORD_LEN_MAX20_16BITS	(0x1 << 1)
521*3e148bafSSeung-Woo Kim #define HDMI_I2S_WORD_LEN_MAX20_18BITS	(0x2 << 1)
522*3e148bafSSeung-Woo Kim #define HDMI_I2S_WORD_LEN_MAX20_19BITS	(0x4 << 1)
523*3e148bafSSeung-Woo Kim #define HDMI_I2S_WORD_LEN_MAX20_20BITS	(0x5 << 1)
524*3e148bafSSeung-Woo Kim #define HDMI_I2S_WORD_LEN_MAX20_17BITS	(0x6 << 1)
525*3e148bafSSeung-Woo Kim #define HDMI_I2S_WORD_LEN_MAX_24BITS	(1)
526*3e148bafSSeung-Woo Kim #define HDMI_I2S_WORD_LEN_MAX_20BITS	(0)
527*3e148bafSSeung-Woo Kim 
528*3e148bafSSeung-Woo Kim /* I2S_MUX_CH */
529*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH3_R_EN		(1 << 7)
530*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH3_L_EN		(1 << 6)
531*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH3_EN			(3 << 6)
532*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH2_R_EN		(1 << 5)
533*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH2_L_EN		(1 << 4)
534*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH2_EN			(3 << 4)
535*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH1_R_EN		(1 << 3)
536*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH1_L_EN		(1 << 2)
537*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH1_EN			(3 << 2)
538*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH0_R_EN		(1 << 1)
539*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH0_L_EN		(1)
540*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH0_EN			(3)
541*3e148bafSSeung-Woo Kim #define HDMI_I2S_CH_ALL_EN		(0xFF)
542*3e148bafSSeung-Woo Kim #define HDMI_I2S_MUX_CH_CLR		(~HDMI_I2S_CH_ALL_EN)
543*3e148bafSSeung-Woo Kim 
544*3e148bafSSeung-Woo Kim /* I2S_MUX_CUV */
545*3e148bafSSeung-Woo Kim #define HDMI_I2S_CUV_R_EN		(1 << 1)
546*3e148bafSSeung-Woo Kim #define HDMI_I2S_CUV_L_EN		(1)
547*3e148bafSSeung-Woo Kim #define HDMI_I2S_CUV_RL_EN		(0x03)
548*3e148bafSSeung-Woo Kim 
549*3e148bafSSeung-Woo Kim /* I2S_CUV_L_R */
550*3e148bafSSeung-Woo Kim #define HDMI_I2S_CUV_R_DATA_MASK	(0x7 << 4)
551*3e148bafSSeung-Woo Kim #define HDMI_I2S_CUV_L_DATA_MASK	(0x7)
552*3e148bafSSeung-Woo Kim 
5533ecd70b1SJoonyoung Shim /* Timing generator registers */
5543ecd70b1SJoonyoung Shim /* TG configure/status registers */
5553ecd70b1SJoonyoung Shim #define HDMI_TG_VACT_ST3_L		HDMI_TG_BASE(0x0068)
5563ecd70b1SJoonyoung Shim #define HDMI_TG_VACT_ST3_H		HDMI_TG_BASE(0x006c)
5573ecd70b1SJoonyoung Shim #define HDMI_TG_VACT_ST4_L		HDMI_TG_BASE(0x0070)
5583ecd70b1SJoonyoung Shim #define HDMI_TG_VACT_ST4_H		HDMI_TG_BASE(0x0074)
5593ecd70b1SJoonyoung Shim #define HDMI_TG_3D			HDMI_TG_BASE(0x00F0)
5603ecd70b1SJoonyoung Shim 
561d8408326SSeung-Woo Kim #endif /* SAMSUNG_REGS_HDMI_H */
562