Adding support for MOXA ART SoC. Testing port of linux-2.6.32.60-moxart.
[linux-3.6.7-moxart.git] / drivers / staging / xgifb / vb_def.h
blob69078d933a47b7b4c5c9b05c1045d4bfccaf0a71
1 #ifndef _VB_DEF_
2 #define _VB_DEF_
3 #include "../../video/sis/initdef.h"
5 #define VB_XGI301C 0x0020 /* for 301C */
6 #define VB_YPbPr1080i 0x03
8 #define LVDSCRT1Len 15
9 #define SupportCRT2in301C 0x0100 /* for 301C */
10 #define SetCHTVOverScan 0x8000
12 #define Panel_320x480 0x07 /*fstn*/
13 #define PanelResInfo 0x1F /* CR36 Panel Type/LCDResInfo */
14 #define Panel_1024x768x75 0x22
15 #define Panel_1280x1024x75 0x23
17 #define PanelRef60Hz 0x00
18 #define PanelRef75Hz 0x20
20 #define YPbPr525iVCLK 0x03B
21 #define YPbPr525iVCLK_2 0x03A
23 #define XGI_CRT2_PORT_00 (0x00 - 0x030)
25 /* =============================================================
26 for 310
27 ============================================================== */
28 #define ModeSoftSetting 0x04
30 /* ---------------- SetMode Stack */
31 #define CRT1Len 15
32 #define VCLKLen 4
34 #define SupportAllCRT2 0x0078
35 #define NoSupportTV 0x0070
36 #define NoSupportHiVisionTV 0x0060
37 #define NoSupportLCD 0x0058
39 /* -------------- SetMode Stack/Scratch */
40 #define XGI_SetCRT2ToLCDA 0x0100
41 #define SetCRT2ToDualEdge 0x8000
43 #define ReserveTVOption 0x0008
44 #define GatingCRT 0x0800
45 #define DisableChB 0x1000
46 #define EnableChB 0x2000
47 #define DisableChA 0x4000
48 #define EnableChA 0x8000
50 #define SetTVLowResolution 0x0400
51 #define TVSimuMode 0x0800
52 #define RPLLDIV2XO 0x1000
53 #define NTSC1024x768 0x2000
54 #define SetTVLockMode 0x4000
56 #define XGI_LCDVESATiming 0x0001 /* LCD Info/CR37 */
57 #define XGI_EnableLVDSDDA 0x0002
58 #define EnableScalingLCD 0x0008
59 #define SetPWDEnable 0x0004
60 #define SetLCDtoNonExpanding 0x0010
61 #define SetLCDDualLink 0x0100
62 #define SetLCDLowResolution 0x0200
63 #define SetLCDStdMode 0x0400
65 /* LCD Capability shampoo */
66 #define DefaultLCDCap 0x80ea
67 #define EnableLCD24bpp 0x0004 /* default */
68 #define DisableLCD24bpp 0x0000
69 #define LCDPolarity 0x00c0 /* default: SyncNN */
70 #define XGI_LCDDualLink 0x0100
71 #define EnableSpectrum 0x0200
72 #define PWDEnable 0x0400
73 #define EnableVBCLKDRVLOW 0x4000
74 #define EnablePLLSPLOW 0x8000
76 #define LCDBToA 0x20 /* LCD SetFlag */
77 #define StLCDBToA 0x40
78 #define LockLCDBToA 0x80
79 #define LCDToFull 0x10
80 #define AVIDEOSense 0x01 /* CR32 */
81 #define SVIDEOSense 0x02
82 #define SCARTSense 0x04
83 #define LCDSense 0x08
84 #define Monitor2Sense 0x10
85 #define Monitor1Sense 0x20
86 #define HiTVSense 0x40
88 #define YPbPrSense 0x80 /* NEW SCRATCH */
90 #define TVSense 0xc7
92 #define YPbPrMode 0xe0
93 #define YPbPrMode525i 0x00
94 #define YPbPrMode525p 0x20
95 #define YPbPrMode750p 0x40
96 #define YPbPrMode1080i 0x60
98 #define ScalingLCD 0x08
100 #define SetYPbPr 0x04
102 /* ---------------------- VUMA Information */
103 #define DisplayDeviceFromCMOS 0x10
105 /* ---------------------- HK Evnet Definition */
106 #define XGI_ModeSwitchStatus 0xf0
107 #define ActiveCRT1 0x10
108 #define ActiveLCD 0x0020
109 #define ActiveTV 0x40
110 #define ActiveCRT2 0x80
112 #define ActiveAVideo 0x01
113 #define ActiveSVideo 0x02
114 #define ActiveSCART 0x04
115 #define ActiveHiTV 0x08
116 #define ActiveYPbPr 0x10
118 /* --------------------------------------------------------- */
119 /* translated from asm code 301def.h */
120 /* */
121 /* --------------------------------------------------------- */
122 #define LVDSCRT1Len_H 8
123 #define LVDSCRT1Len_V 7
124 #define LCDDesDataLen 6
125 #define LVDSDesDataLen2 8
126 #define LCDDesDataLen2 8
128 #define NTSC1024x768HT 1908
130 #define YPbPrTV525iHT 1716 /* YPbPr */
131 #define YPbPrTV525iVT 525
132 #define YPbPrTV525pHT 1716
133 #define YPbPrTV525pVT 525
134 #define YPbPrTV750pHT 1650
135 #define YPbPrTV750pVT 750
137 #define VCLK25_175 0x00
138 #define VCLK28_322 0x01
139 #define VCLK31_5 0x02
140 #define VCLK36 0x03
141 #define VCLK43_163 0x05
142 #define VCLK44_9 0x06
143 #define VCLK49_5 0x07
144 #define VCLK50 0x08
145 #define VCLK52_406 0x09
146 #define VCLK56_25 0x0A
147 #define VCLK68_179 0x0D
148 #define VCLK72_852 0x0E
149 #define VCLK75 0x0F
150 #define VCLK78_75 0x11
151 #define VCLK79_411 0x12
152 #define VCLK83_95 0x13
153 #define VCLK86_6 0x15
154 #define VCLK94_5 0x16
155 #define VCLK113_309 0x1B
156 #define VCLK116_406 0x1C
157 #define VCLK135_5 0x1E
158 #define VCLK139_054 0x1F
159 #define VCLK157_5 0x20
160 #define VCLK162 0x21
161 #define VCLK175 0x22
162 #define VCLK189 0x23
163 #define VCLK202_5 0x25
164 #define VCLK229_5 0x26
165 #define VCLK234 0x27
166 #define VCLK254_817 0x29
167 #define VCLK266_952 0x2B
168 #define VCLK269_655 0x2C
169 #define VCLK277_015 0x2E
170 #define VCLK291_132 0x30
171 #define VCLK291_766 0x31
172 #define VCLK315_195 0x33
173 #define VCLK323_586 0x34
174 #define VCLK330_615 0x35
175 #define VCLK340_477 0x37
176 #define VCLK375_847 0x38
177 #define VCLK388_631 0x39
178 #define VCLK125_999 0x51
179 #define VCLK148_5 0x52
180 #define VCLK217_325 0x55
181 #define XGI_YPbPr750pVCLK 0x57
183 #define VCLK39_77 0x40
184 #define YPbPr525pVCLK 0x3A
185 #define NTSC1024VCLK 0x41
186 #define VCLK35_2 0x49 /* ; 800x480 */
187 #define VCLK122_61 0x4A
188 #define VCLK80_350 0x4B
189 #define VCLK107_385 0x4C
191 #define RES320x200 0x00
192 #define RES320x240 0x01
193 #define RES400x300 0x02
194 #define RES512x384 0x03
195 #define RES640x400 0x04
196 #define RES640x480x60 0x05
197 #define RES640x480x72 0x06
198 #define RES640x480x75 0x07
199 #define RES640x480x85 0x08
200 #define RES640x480x100 0x09
201 #define RES640x480x120 0x0A
202 #define RES640x480x160 0x0B
203 #define RES640x480x200 0x0C
204 #define RES800x600x56 0x0D
205 #define RES800x600x60 0x0E
206 #define RES800x600x72 0x0F
207 #define RES800x600x75 0x10
208 #define RES800x600x85 0x11
209 #define RES800x600x100 0x12
210 #define RES800x600x120 0x13
211 #define RES800x600x160 0x14
212 #define RES1024x768x43 0x15
213 #define RES1024x768x60 0x16
214 #define RES1024x768x70 0x17
215 #define RES1024x768x75 0x18
216 #define RES1024x768x85 0x19
217 #define RES1024x768x100 0x1A
218 #define RES1024x768x120 0x1B
219 #define RES1280x1024x43 0x1C
220 #define RES1280x1024x60 0x1D
221 #define RES1280x1024x75 0x1E
222 #define RES1280x1024x85 0x1F
223 #define RES1600x1200x60 0x20
224 #define RES1600x1200x65 0x21
225 #define RES1600x1200x70 0x22
226 #define RES1600x1200x75 0x23
227 #define RES1600x1200x85 0x24
228 #define RES1600x1200x100 0x25
229 #define RES1600x1200x120 0x26
230 #define RES1920x1440x60 0x27
231 #define RES1920x1440x65 0x28
232 #define RES1920x1440x70 0x29
233 #define RES1920x1440x75 0x2A
234 #define RES1920x1440x85 0x2B
235 #define RES1920x1440x100 0x2C
236 #define RES2048x1536x60 0x2D
237 #define RES2048x1536x65 0x2E
238 #define RES2048x1536x70 0x2F
239 #define RES2048x1536x75 0x30
240 #define RES2048x1536x85 0x31
241 #define RES800x480x60 0x32
242 #define RES800x480x75 0x33
243 #define RES800x480x85 0x34
244 #define RES1024x576x60 0x35
245 #define RES1024x576x75 0x36
246 #define RES1024x576x85 0x37
247 #define RES1280x720x60 0x38
248 #define RES1280x720x75 0x39
249 #define RES1280x720x85 0x3A
250 #define RES1280x960x60 0x3B
251 #define RES720x480x60 0x3C
252 #define RES720x576x56 0x3D
253 #define RES856x480x79I 0x3E
254 #define RES856x480x60 0x3F
255 #define RES1280x768x60 0x40
256 #define RES1400x1050x60 0x41
257 #define RES1152x864x60 0x42
258 #define RES1152x864x75 0x43
259 #define RES1024x768x160 0x44
260 #define RES1280x960x75 0x45
261 #define RES1280x960x85 0x46
262 #define RES1280x960x120 0x47
265 #define XG27_CR8F 0x0C
266 #define XG27_SR36 0x30
267 #define XG27_SR40 0x04
268 #define XG27_SR41 0x00
269 #define XG40_CRCF 0x13
270 #define XGI330_CRT2Data_1_2 0
271 #define XGI330_CRT2Data_4_D 0
272 #define XGI330_CRT2Data_4_E 0
273 #define XGI330_CRT2Data_4_10 0x80
274 #define XGI330_SR07 0x18
275 #define XGI330_SR1F 0
276 #define XGI330_SR23 0xf6
277 #define XGI330_SR24 0x0d
278 #define XGI330_SR25 0
279 #define XGI330_SR31 0xc0
280 #define XGI330_SR32 0x11
281 #define XGI330_SR33 0
283 #endif