summaryrefslogtreecommitdiff
path: root/drivers/video/wmt/hw/wmt-lvds-reg.h
blob: 0a6e616c313d31d87b5bcbb24e37f630e574e0f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/*++
 * linux/drivers/video/wmt/hw/wmt-lvds-reg.h
 * WonderMedia video post processor (VPP) driver
 *
 * Copyright c 2014  WonderMedia  Technologies, Inc.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * WonderMedia Technologies, Inc.
 * 4F, 533, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C
--*/

#ifndef WMT_LVDS_REG_H
#define WMT_LVDS_REG_H

#define WMT_FTBLK_LVDS

struct lvds_base_regs {
	union {
		unsigned int val;
		struct {
			unsigned int inv_clk:1;
			unsigned int _01_03:3;
			unsigned int dual_channel:1;
			unsigned int _05_07:3;
			unsigned int test:4;
		} b;
	} status; /* 0x00 */

	union {
		unsigned int val;
		struct {
			unsigned int drv_pdmode:1;
			unsigned int _01:1;
			unsigned int vbg_sel:2;
			unsigned int _04_07:4;
			unsigned int pd:1;
			unsigned int tre_en:2;
			unsigned int _11:1;
			unsigned int pllck_dly:3;
			unsigned int _15:1;
			unsigned int pll_cpset:2;
			unsigned int pll_r_f:1;
		} b;
	} test; /* 0x04 */

	union {
		unsigned int val;
		struct {
			unsigned int update:1;
			unsigned int _01_07:7;
			unsigned int level:1;
		} b;
	} level; /* 0x08 */

	union {
		unsigned int val;
		struct {
			unsigned int bpp_type:3; /* 0-888,1-555,2-666,3-565 */
			unsigned int _03_07:5;
			unsigned int ldi_shift_left:1; /* 0-shift right,1-left*/
		} b;
	} igs; /* 0x0c */

	union {
		unsigned int val;
		struct {
			unsigned int out_data_12:1; /* 0-24bit,1-12bit */
			unsigned int hsync_polar_lo:1; /* 0-active hi,1-low */
			unsigned int dvo_enable:1;
			unsigned int vsync_polar_lo:1; /* 0-active hi,1-low */
		} b;
	} set; /* 0x10 */

	union {
		unsigned int val;
		struct {
			unsigned int colfmt:2; /* 0-YUV444,1/3-RGB,2-YUV422 */
		} b;
	} set2; /* 0x14 */

	union {
		unsigned int val;
		struct {
			unsigned int pll_ready:1;
			unsigned int _01_07:7;
			unsigned int rsen:1;
		} b;
	} detect; /* 0x18 */

	union {
		unsigned int val;
		struct {
			unsigned int pll_tsync:1;
			unsigned int tp2s_type:1;
			unsigned int div_sel:2;
			unsigned int pd_v2i:1;
			unsigned int vco_sx:1;
			unsigned int vco_mode:1;
			unsigned int _07:1;
			unsigned int vsref_sel:2;
			unsigned int mode:1;
			unsigned int pd_l2ha:1;
			unsigned int pd_l2hb:1;
			unsigned int l2ha_hsen:1;
			unsigned int resa_en:1;
			unsigned int resa_s:1;
			unsigned int pll_lpfs:2;
		} b;
	} test2; /* 0x1c */
};

#define REG_LVDS_BEGIN	(LVDS_BASE_ADDR + 0x00)
#define REG_LVDS_END	(LVDS_BASE_ADDR + 0x1C)
#ifndef LVDS_C
extern struct lvds_base_regs *lvds_regs;
#endif
#endif /* WMT_LVDS_REG_H */