xref: /linux/drivers/gpu/drm/exynos/regs-hdmi.h (revision d84083268bd707ebb8ed2f4fc26ebc7a0c453a83)
1*d8408326SSeung-Woo Kim /*
2*d8408326SSeung-Woo Kim  *
3*d8408326SSeung-Woo Kim  *  Cloned from drivers/media/video/s5p-tv/regs-hdmi.h
4*d8408326SSeung-Woo Kim  *
5*d8408326SSeung-Woo Kim  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
6*d8408326SSeung-Woo Kim  * http://www.samsung.com/
7*d8408326SSeung-Woo Kim  *
8*d8408326SSeung-Woo Kim  * HDMI register header file for Samsung TVOUT driver
9*d8408326SSeung-Woo Kim  *
10*d8408326SSeung-Woo Kim  * This program is free software; you can redistribute it and/or modify
11*d8408326SSeung-Woo Kim  * it under the terms of the GNU General Public License version 2 as
12*d8408326SSeung-Woo Kim  * published by the Free Software Foundation.
13*d8408326SSeung-Woo Kim */
14*d8408326SSeung-Woo Kim 
15*d8408326SSeung-Woo Kim #ifndef SAMSUNG_REGS_HDMI_H
16*d8408326SSeung-Woo Kim #define SAMSUNG_REGS_HDMI_H
17*d8408326SSeung-Woo Kim 
18*d8408326SSeung-Woo Kim /*
19*d8408326SSeung-Woo Kim  * Register part
20*d8408326SSeung-Woo Kim */
21*d8408326SSeung-Woo Kim 
22*d8408326SSeung-Woo Kim #define HDMI_CTRL_BASE(x)		((x) + 0x00000000)
23*d8408326SSeung-Woo Kim #define HDMI_CORE_BASE(x)		((x) + 0x00010000)
24*d8408326SSeung-Woo Kim #define HDMI_TG_BASE(x)			((x) + 0x00050000)
25*d8408326SSeung-Woo Kim 
26*d8408326SSeung-Woo Kim /* Control registers */
27*d8408326SSeung-Woo Kim #define HDMI_INTC_CON			HDMI_CTRL_BASE(0x0000)
28*d8408326SSeung-Woo Kim #define HDMI_INTC_FLAG			HDMI_CTRL_BASE(0x0004)
29*d8408326SSeung-Woo Kim #define HDMI_HPD_STATUS			HDMI_CTRL_BASE(0x000C)
30*d8408326SSeung-Woo Kim #define HDMI_PHY_RSTOUT			HDMI_CTRL_BASE(0x0014)
31*d8408326SSeung-Woo Kim #define HDMI_PHY_VPLL			HDMI_CTRL_BASE(0x0018)
32*d8408326SSeung-Woo Kim #define HDMI_PHY_CMU			HDMI_CTRL_BASE(0x001C)
33*d8408326SSeung-Woo Kim #define HDMI_CORE_RSTOUT		HDMI_CTRL_BASE(0x0020)
34*d8408326SSeung-Woo Kim 
35*d8408326SSeung-Woo Kim /* Core registers */
36*d8408326SSeung-Woo Kim #define HDMI_CON_0			HDMI_CORE_BASE(0x0000)
37*d8408326SSeung-Woo Kim #define HDMI_CON_1			HDMI_CORE_BASE(0x0004)
38*d8408326SSeung-Woo Kim #define HDMI_CON_2			HDMI_CORE_BASE(0x0008)
39*d8408326SSeung-Woo Kim #define HDMI_SYS_STATUS			HDMI_CORE_BASE(0x0010)
40*d8408326SSeung-Woo Kim #define HDMI_PHY_STATUS			HDMI_CORE_BASE(0x0014)
41*d8408326SSeung-Woo Kim #define HDMI_STATUS_EN			HDMI_CORE_BASE(0x0020)
42*d8408326SSeung-Woo Kim #define HDMI_HPD			HDMI_CORE_BASE(0x0030)
43*d8408326SSeung-Woo Kim #define HDMI_MODE_SEL			HDMI_CORE_BASE(0x0040)
44*d8408326SSeung-Woo Kim #define HDMI_BLUE_SCREEN_0		HDMI_CORE_BASE(0x0050)
45*d8408326SSeung-Woo Kim #define HDMI_BLUE_SCREEN_1		HDMI_CORE_BASE(0x0054)
46*d8408326SSeung-Woo Kim #define HDMI_BLUE_SCREEN_2		HDMI_CORE_BASE(0x0058)
47*d8408326SSeung-Woo Kim #define HDMI_H_BLANK_0			HDMI_CORE_BASE(0x00A0)
48*d8408326SSeung-Woo Kim #define HDMI_H_BLANK_1			HDMI_CORE_BASE(0x00A4)
49*d8408326SSeung-Woo Kim #define HDMI_V_BLANK_0			HDMI_CORE_BASE(0x00B0)
50*d8408326SSeung-Woo Kim #define HDMI_V_BLANK_1			HDMI_CORE_BASE(0x00B4)
51*d8408326SSeung-Woo Kim #define HDMI_V_BLANK_2			HDMI_CORE_BASE(0x00B8)
52*d8408326SSeung-Woo Kim #define HDMI_H_V_LINE_0			HDMI_CORE_BASE(0x00C0)
53*d8408326SSeung-Woo Kim #define HDMI_H_V_LINE_1			HDMI_CORE_BASE(0x00C4)
54*d8408326SSeung-Woo Kim #define HDMI_H_V_LINE_2			HDMI_CORE_BASE(0x00C8)
55*d8408326SSeung-Woo Kim #define HDMI_VSYNC_POL			HDMI_CORE_BASE(0x00E4)
56*d8408326SSeung-Woo Kim #define HDMI_INT_PRO_MODE		HDMI_CORE_BASE(0x00E8)
57*d8408326SSeung-Woo Kim #define HDMI_V_BLANK_F_0		HDMI_CORE_BASE(0x0110)
58*d8408326SSeung-Woo Kim #define HDMI_V_BLANK_F_1		HDMI_CORE_BASE(0x0114)
59*d8408326SSeung-Woo Kim #define HDMI_V_BLANK_F_2		HDMI_CORE_BASE(0x0118)
60*d8408326SSeung-Woo Kim #define HDMI_H_SYNC_GEN_0		HDMI_CORE_BASE(0x0120)
61*d8408326SSeung-Woo Kim #define HDMI_H_SYNC_GEN_1		HDMI_CORE_BASE(0x0124)
62*d8408326SSeung-Woo Kim #define HDMI_H_SYNC_GEN_2		HDMI_CORE_BASE(0x0128)
63*d8408326SSeung-Woo Kim #define HDMI_V_SYNC_GEN_1_0		HDMI_CORE_BASE(0x0130)
64*d8408326SSeung-Woo Kim #define HDMI_V_SYNC_GEN_1_1		HDMI_CORE_BASE(0x0134)
65*d8408326SSeung-Woo Kim #define HDMI_V_SYNC_GEN_1_2		HDMI_CORE_BASE(0x0138)
66*d8408326SSeung-Woo Kim #define HDMI_V_SYNC_GEN_2_0		HDMI_CORE_BASE(0x0140)
67*d8408326SSeung-Woo Kim #define HDMI_V_SYNC_GEN_2_1		HDMI_CORE_BASE(0x0144)
68*d8408326SSeung-Woo Kim #define HDMI_V_SYNC_GEN_2_2		HDMI_CORE_BASE(0x0148)
69*d8408326SSeung-Woo Kim #define HDMI_V_SYNC_GEN_3_0		HDMI_CORE_BASE(0x0150)
70*d8408326SSeung-Woo Kim #define HDMI_V_SYNC_GEN_3_1		HDMI_CORE_BASE(0x0154)
71*d8408326SSeung-Woo Kim #define HDMI_V_SYNC_GEN_3_2		HDMI_CORE_BASE(0x0158)
72*d8408326SSeung-Woo Kim #define HDMI_ACR_CON			HDMI_CORE_BASE(0x0180)
73*d8408326SSeung-Woo Kim #define HDMI_AVI_CON			HDMI_CORE_BASE(0x0300)
74*d8408326SSeung-Woo Kim #define HDMI_AVI_BYTE(n)		HDMI_CORE_BASE(0x0320 + 4 * (n))
75*d8408326SSeung-Woo Kim #define HDMI_DC_CONTROL			HDMI_CORE_BASE(0x05C0)
76*d8408326SSeung-Woo Kim #define HDMI_VIDEO_PATTERN_GEN		HDMI_CORE_BASE(0x05C4)
77*d8408326SSeung-Woo Kim #define HDMI_HPD_GEN			HDMI_CORE_BASE(0x05C8)
78*d8408326SSeung-Woo Kim #define HDMI_AUI_CON			HDMI_CORE_BASE(0x0360)
79*d8408326SSeung-Woo Kim #define HDMI_SPD_CON			HDMI_CORE_BASE(0x0400)
80*d8408326SSeung-Woo Kim 
81*d8408326SSeung-Woo Kim /* Timing generator registers */
82*d8408326SSeung-Woo Kim #define HDMI_TG_CMD			HDMI_TG_BASE(0x0000)
83*d8408326SSeung-Woo Kim #define HDMI_TG_H_FSZ_L			HDMI_TG_BASE(0x0018)
84*d8408326SSeung-Woo Kim #define HDMI_TG_H_FSZ_H			HDMI_TG_BASE(0x001C)
85*d8408326SSeung-Woo Kim #define HDMI_TG_HACT_ST_L		HDMI_TG_BASE(0x0020)
86*d8408326SSeung-Woo Kim #define HDMI_TG_HACT_ST_H		HDMI_TG_BASE(0x0024)
87*d8408326SSeung-Woo Kim #define HDMI_TG_HACT_SZ_L		HDMI_TG_BASE(0x0028)
88*d8408326SSeung-Woo Kim #define HDMI_TG_HACT_SZ_H		HDMI_TG_BASE(0x002C)
89*d8408326SSeung-Woo Kim #define HDMI_TG_V_FSZ_L			HDMI_TG_BASE(0x0030)
90*d8408326SSeung-Woo Kim #define HDMI_TG_V_FSZ_H			HDMI_TG_BASE(0x0034)
91*d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC_L			HDMI_TG_BASE(0x0038)
92*d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC_H			HDMI_TG_BASE(0x003C)
93*d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC2_L		HDMI_TG_BASE(0x0040)
94*d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC2_H		HDMI_TG_BASE(0x0044)
95*d8408326SSeung-Woo Kim #define HDMI_TG_VACT_ST_L		HDMI_TG_BASE(0x0048)
96*d8408326SSeung-Woo Kim #define HDMI_TG_VACT_ST_H		HDMI_TG_BASE(0x004C)
97*d8408326SSeung-Woo Kim #define HDMI_TG_VACT_SZ_L		HDMI_TG_BASE(0x0050)
98*d8408326SSeung-Woo Kim #define HDMI_TG_VACT_SZ_H		HDMI_TG_BASE(0x0054)
99*d8408326SSeung-Woo Kim #define HDMI_TG_FIELD_CHG_L		HDMI_TG_BASE(0x0058)
100*d8408326SSeung-Woo Kim #define HDMI_TG_FIELD_CHG_H		HDMI_TG_BASE(0x005C)
101*d8408326SSeung-Woo Kim #define HDMI_TG_VACT_ST2_L		HDMI_TG_BASE(0x0060)
102*d8408326SSeung-Woo Kim #define HDMI_TG_VACT_ST2_H		HDMI_TG_BASE(0x0064)
103*d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC_TOP_HDMI_L	HDMI_TG_BASE(0x0078)
104*d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC_TOP_HDMI_H	HDMI_TG_BASE(0x007C)
105*d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC_BOT_HDMI_L	HDMI_TG_BASE(0x0080)
106*d8408326SSeung-Woo Kim #define HDMI_TG_VSYNC_BOT_HDMI_H	HDMI_TG_BASE(0x0084)
107*d8408326SSeung-Woo Kim #define HDMI_TG_FIELD_TOP_HDMI_L	HDMI_TG_BASE(0x0088)
108*d8408326SSeung-Woo Kim #define HDMI_TG_FIELD_TOP_HDMI_H	HDMI_TG_BASE(0x008C)
109*d8408326SSeung-Woo Kim #define HDMI_TG_FIELD_BOT_HDMI_L	HDMI_TG_BASE(0x0090)
110*d8408326SSeung-Woo Kim #define HDMI_TG_FIELD_BOT_HDMI_H	HDMI_TG_BASE(0x0094)
111*d8408326SSeung-Woo Kim 
112*d8408326SSeung-Woo Kim /*
113*d8408326SSeung-Woo Kim  * Bit definition part
114*d8408326SSeung-Woo Kim  */
115*d8408326SSeung-Woo Kim 
116*d8408326SSeung-Woo Kim /* HDMI_INTC_CON */
117*d8408326SSeung-Woo Kim #define HDMI_INTC_EN_GLOBAL		(1 << 6)
118*d8408326SSeung-Woo Kim #define HDMI_INTC_EN_HPD_PLUG		(1 << 3)
119*d8408326SSeung-Woo Kim #define HDMI_INTC_EN_HPD_UNPLUG		(1 << 2)
120*d8408326SSeung-Woo Kim 
121*d8408326SSeung-Woo Kim /* HDMI_INTC_FLAG */
122*d8408326SSeung-Woo Kim #define HDMI_INTC_FLAG_HPD_PLUG		(1 << 3)
123*d8408326SSeung-Woo Kim #define HDMI_INTC_FLAG_HPD_UNPLUG	(1 << 2)
124*d8408326SSeung-Woo Kim 
125*d8408326SSeung-Woo Kim /* HDMI_PHY_RSTOUT */
126*d8408326SSeung-Woo Kim #define HDMI_PHY_SW_RSTOUT		(1 << 0)
127*d8408326SSeung-Woo Kim 
128*d8408326SSeung-Woo Kim /* HDMI_CORE_RSTOUT */
129*d8408326SSeung-Woo Kim #define HDMI_CORE_SW_RSTOUT		(1 << 0)
130*d8408326SSeung-Woo Kim 
131*d8408326SSeung-Woo Kim /* HDMI_CON_0 */
132*d8408326SSeung-Woo Kim #define HDMI_BLUE_SCR_EN		(1 << 5)
133*d8408326SSeung-Woo Kim #define HDMI_EN				(1 << 0)
134*d8408326SSeung-Woo Kim 
135*d8408326SSeung-Woo Kim /* HDMI_PHY_STATUS */
136*d8408326SSeung-Woo Kim #define HDMI_PHY_STATUS_READY		(1 << 0)
137*d8408326SSeung-Woo Kim 
138*d8408326SSeung-Woo Kim /* HDMI_MODE_SEL */
139*d8408326SSeung-Woo Kim #define HDMI_MODE_HDMI_EN		(1 << 1)
140*d8408326SSeung-Woo Kim #define HDMI_MODE_DVI_EN		(1 << 0)
141*d8408326SSeung-Woo Kim #define HDMI_MODE_MASK			(3 << 0)
142*d8408326SSeung-Woo Kim 
143*d8408326SSeung-Woo Kim /* HDMI_TG_CMD */
144*d8408326SSeung-Woo Kim #define HDMI_TG_EN			(1 << 0)
145*d8408326SSeung-Woo Kim #define HDMI_FIELD_EN			(1 << 1)
146*d8408326SSeung-Woo Kim 
147*d8408326SSeung-Woo Kim #endif /* SAMSUNG_REGS_HDMI_H */
148