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 #define CFREG_REV 0x0000
26 #define CR_REV_MASK 0x03
27 #define CR_REV_SHIFT 0
28 #define CR_PRODUCT_MASK 0xfc
29 #define CR_PRODUCT_SHIFT 2
30 #define PRODUCT_S1D13806 0x07
31
32
33 #define CFREG_MISC 0x0001
34 #define CM_MEMSEL 0x00
35 #define CM_REGSEL 0x80
36
37
38 #define CFREG_GPIO_CONF 0x0004
39
40
41 #define CFREG_GPIO_CTRL 0x0008
42
43
44 #define CFREG_STATUS 0x000c
45
46
47 #define CFREG_MEMCLK 0x0010
48 #define MEMCLK_DIVIDE 0x10
49 #define MEMCLK_SRC_CLKI 0x00
50 #define MEMCLK_SRC_BUSCLK 0x01
51 #define MEMCLK_SRC_CLK3 0x02
52
53
54 #define CFREG_LCD_PCLK 0x0014
55 #define LCD_PCLK_SRC_CLKI 0x00
56 #define LCD_PCLK_SRC_BUSCLK 0x01
57 #define LCD_PCLK_SRC_CLKI2 0x02
58 #define LCD_PCLK_SRC_MCLK 0x03
59 #define LCD_PCLK_DIV_1 0x00
60 #define LCD_PCLK_DIV_2 0x10
61 #define LCD_PCLK_DIV_3 0x20
62 #define LCD_PCLK_DIV_4 0x30
63
64
65 #define CFREG_CRTTV_PCLK 0x0018
66 #define CRT_PCLK_SRC_CLKI 0x00
67 #define CRT_PCLK_SRC_BUSCLK 0x01
68 #define CRT_PCLK_SRC_CLKI2 0x02
69 #define CRT_PCLK_SRC_MCLK 0x03
70 #define CRT_PCLK_DIV_1 0x00
71 #define CRT_PCLK_DIV_2 0x10
72 #define CRT_PCLK_DIV_3 0x20
73 #define CRT_PCLK_DIV_4 0x30
74 #define CRT_PCLK_DOUBLE 0x80
75
76
77 #define CFREG_MPLUG_CLK 0x001c
78 #define MPLUG_PCLK_SRC_CLKI 0x00
79 #define MPLUG_PCLK_SRC_BUSCLK 0x01
80 #define MPLUG_PCLK_SRC_CLKI2 0x02
81 #define MPLUG_PCLK_SRC_MCLK 0x03
82 #define MPLUG_PCLK_DIV_1 0x00
83 #define MPLUG_PCLK_DIV_2 0x10
84 #define MPLUG_PCLK_DIV_3 0x20
85 #define MPLUG_PCLK_DIV_4 0x30
86
87
88 #define CFREG_WSTATE 0x001e
89 #define WSTATE_NONE 0x00
90 #define WSTATE_DUAL_MCLK 0x01
91 #define WSTATE_MCLK 0x02
92
93
94 #define CFREG_MEMCNF 0x0020
95 #define MEMCNF_SDRAM_INIT 0x80
96
97
98 #define CFREG_DRAM_RFRSH 0x0021
99 #define DRAM_RFRSH_8MHZ 0x00
100 #define DRAM_RFRSH_16MHZ 0x01
101 #define DRAM_RFRSH_32MHZ 0x02
102 #define DRAM_RFRSH_50MHZ 0x03
103
104
105 #define CFREG_DRAM_TIMING 0x002a
106 #define DRAM_TIMING_33MHZ 0x0311
107 #define DRAM_TIMING_44MHZ 0x0200
108 #define DRAM_TIMING_50MHZ 0x0100
109
110
111 #define CFREG_PANEL 0x0030
112 #define PANEL_PASSIVE 0x00
113 #define PANEL_TFT 0x01
114 #define PANEL_SINGLE 0x00
115 #define PANEL_DUAL 0x02
116 #define PANEL_MONO 0x00
117 #define PANEL_COLOR 0x04
118 #define PANEL_FORMAT_1X 0x00
119 #define PANEL_FORMAT_2X 0x08
120 #define PANEL_WIDTH_4_9 0x00
121 #define PANEL_WIDTH_8_12 0x10
122 #define PANEL_WIDTH_16_18 0x20
123
124
125 #define CFREG_MODRATE 0x0031
126
127
128 #define CFREG_LCD_HWIDTH 0x0032
129
130
131 #define CFREG_LCD_HNDISP 0x0034
132
133
134 #define CFREG_TFT_FPLINE_START 0x0035
135
136
137 #define CFREG_TFT_FPLINE_WIDTH 0x0036
138 #define TFT_FPLINE_POL_TFT_LOW 0x00
139 #define TFT_FPLINE_POL_TFT_HIGH 0x80
140 #define TFT_FPLINE_POL_PASSIVE_LOW 0x80
141 #define TFT_FPLINE_POL_PASSIVE_HIGH 0x00
142
143
144 #define CFREG_LCD_VHEIGHT 0x0038
145
146
147 #define CFREG_LCD_VNDISP 0x003a
148 #define LCD_VNDISP_STATUS 0x80
149
150
151 #define CFREG_TFT_FPFRAME_START 0x003b
152
153
154 #define CFREG_TFT_FPFRAME_WIDTH 0x003c
155 #define TFT_FPFRAME_POL_TFT_LOW 0x00
156 #define TFT_FPFRAME_POL_TFT_HIGH 0x80
157 #define TFT_FPFRAME_POL_PASSIVE_LOW 0x80
158 #define TFT_FPFRAME_POL_PASSIVE_HIGH 0x00
159
160
161 #define CFREG_LCD_LINECNT 0x003e
162
163
164 #define CFREG_LCD_MODE 0x0040
165 #define LCD_MODE_4BPP 0x02
166 #define LCD_MODE_8BPP 0x03
167 #define LCD_MODE_15BPP 0x04
168 #define LCD_MODE_16BPP 0x05
169 #define LCD_MODE_SWIVEL_BIT1 0x10
170 #define LCD_MODE_BLANK 0x80
171
172
173 #define CFREG_LCD_MISC 0x0041
174 #define LCD_MISC_DUAL_PANEL_BUFFER_DISABLE 0x01
175 #define LCD_MISC_DITHERING_DISABLE 0x02
176
177
178 #define CFREG_LCD_START_LOW 0x0042
179 #define CFREG_LCD_START_HIGH 0x0044
180
181
182 #define CFREG_LCD_MEMORY 0x0046
183
184
185 #define CFREG_LCD_PANNING 0x0048
186 #define PIXEL_PANNING_MASK_4BPP 0x03
187 #define PIXEL_PANNING_MASK_8BPP 0x01
188 #define PIXEL_PANNING_MASK_15BPP 0x00
189 #define PIXEL_PANNING_MASK_16BPP 0x00
190
191
192 #define CFREG_LCD_FIFO_THRESHOLD_HIGH 0x004a
193
194
195 #define CFREG_LCD_FIFO_THRESHOLD_LOW 0x004b
196
197
198 #define CFREG_CRT_HWIDTH 0x0050
199
200
201 #define CFREG_CRT_HNDISP 0x0052
202
203
204 #define CFREG_CRT_HSTART 0x0053
205
206
207 #define CFREG_CRT_HPULSE 0x0054
208 #define HRTC_POLARITY 0x80
209
210
211 #define CFREG_CRT_VHEIGHT 0x0056
212
213
214 #define CFREG_CRT_VNDISP 0x0058
215 #define CRT_VNDISP_STATUS 0x80
216
217
218 #define CFREG_CRT_VSTART 0x0059
219
220
221 #define CFREG_CRT_VPULSE 0x005a
222
223
224 #define CFREG_TV_CONTROL 0x005b
225 #define TV_NTSC_OUTPUT 0x00
226 #define TV_PAL_OUTPUT 0x01
227 #define TV_COMPOSITE_OUTPUT 0x00
228 #define TV_SVIDEO_OUTPUT 0x02
229 #define TV_DAC_OUTPUT_HIGH 0x00
230 #define TV_DAC_OUTPUT_LOW 0x08
231 #define TV_LUMINANCE_FILTER 0x10
232 #define TV_CHROMINANCE_FILTER 0x20
233
234
235 #define CFREG_CRT_LINECNT 0x005e
236
237
238 #define CFREG_CRT_MODE 0x0060
239 #define CRT_MODE_4BPP 0x02
240 #define CRT_MODE_8BPP 0x03
241 #define CRT_MODE_15BPP 0x04
242 #define CRT_MODE_16BPP 0x05
243 #define CRT_MODE_BLANK 0x80
244
245
246 #define CFREG_CRT_START_LOW 0x0062
247 #define CFREG_CRT_START_HIGH 0x0064
248
249
250 #define CFREG_CRT_MEMORY 0x0066
251
252
253 #define CFREG_CRT_PANNING 0x0068
254
255
256 #define CFREG_CRT_FIFO_THRESHOLD_HIGH 0x006a
257
258
259 #define CFREG_CRT_FIFO_THRESHOLD_LOW 0x006b
260
261
262 #define CFREG_LCD_CURSOR_CONTROL 0x0070
263 #define CURSOR_INACTIVE 0x00
264 #define CURSOR_CURSOR 0x01
265 #define CURSOR_INK 0x02
266
267
268 #define CFREG_LCD_CURSOR_ADDRESS 0x0071
269
270
271 #define CFREG_LCD_CURSOR_X 0x0072
272 #define LCD_CURSOR_X_SIGN 0x8000
273
274
275 #define CFREG_LCD_CURSOR_Y 0x0074
276 #define LCD_CURSOR_Y_SIGN 0x8000
277
278
279 #define CFREG_LCD_CURSOR_B0 0x0076
280 #define CFREG_LCD_CURSOR_G0 0x0077
281 #define CFREG_LCD_CURSOR_R0 0x0078
282 #define CFREG_LCD_CURSOR_B1 0x007a
283 #define CFREG_LCD_CURSOR_G1 0x007b
284 #define CFREG_LCD_CURSOR_R1 0x007c
285
286
287 #define CFREG_LCD_CURSOR_FIFO 0x007e
288
289
290 #define CFREG_CRT_CURSOR_CONTROL 0x0080
291
292
293 #define CFREG_CRT_CURSOR_ADDRESS 0x0081
294
295
296 #define CFREG_CRT_CURSOR_X 0x0082
297 #define CRT_CURSOR_X_SIGN 0x8000
298
299
300 #define CFREG_CRT_CURSOR_Y 0x0084
301 #define CRT_CURSOR_Y_SIGN 0x8000
302
303
304 #define CFREG_CRT_CURSOR_B0 0x0086
305 #define CFREG_CRT_CURSOR_G0 0x0087
306 #define CFREG_CRT_CURSOR_R0 0x0088
307 #define CFREG_CRT_CURSOR_B1 0x008a
308 #define CFREG_CRT_CURSOR_G1 0x008b
309 #define CFREG_CRT_CURSOR_R1 0x008c
310
311
312 #define CFREG_CRT_CURSOR_FIFO 0x008e
313
314
315 #define CFREG_BITBLT_CONTROL 0x0100
316 #define BITBLT_SRC_LINEAR 0x0001
317 #define BITBLT_DST_LINEAR 0x0002
318 #define BITBLT_FIFO_FULL 0x0010
319 #define BITBLT_FIFO_HALF_FULL 0x0020
320 #define BITBLT_FIFO_NOT_EMPTY 0x0040
321 #define BITBLT_ACTIVE 0x0080
322 #define BITBLT_COLOR_8 0x0000
323 #define BITBLT_COLOR_16 0x0100
324
325
326 #define CFREG_BITBLT_ROP 0x0102
327 #define CFREG_COLOR_EXPANSION 0x0102
328 #define ROP_ZERO 0x00
329 #define ROP_DST 0x0a
330 #define ROP_SRC 0x0c
331 #define ROP_ONES 0x0f
332
333
334 #define CFREG_BITBLT_OPERATION 0x103
335 #define OP_WRITE_ROP 0x00
336 #define OP_READ 0x01
337 #define OP_MOVE_POSITIVE_ROP 0x02
338 #define OP_MOVE_NEGATIVE_ROP 0x03
339 #define OP_TRANSPARENT_WRITE 0x04
340 #define OP_TRANSPARENT_MOVE_POSITIVE 0x05
341 #define OP_PATTERN_FILL_ROP 0x06
342 #define OP_PATTERN_FILL_TRANSPARENCY 0x07
343 #define OP_COLOR_EXPANSION 0x08
344 #define OP_COLOR_EXPANSION_TRANSPARENCY 0x09
345 #define OP_MOVE_COLOR_EXPANSION 0x0a
346 #define OP_MOVE_COLOR_EXPANSION_TRANSPARENCY 0x0b
347 #define OP_SOLID_FILL 0x0c
348
349
350 #define CFREG_BITBLT_SRC_LOW 0x104
351 #define CFREG_BITBLT_SRC_HIGH 0x106
352
353
354 #define CFREG_BITBLT_DST_LOW 0x108
355 #define CFREG_BITBLT_DST_HIGH 0x10a
356
357
358 #define CFREG_BITBLT_OFFSET 0x10c
359
360
361 #define CFREG_BITBLT_WIDTH 0x110
362
363
364 #define CFREG_BITBLT_HEIGHT 0x112
365
366
367 #define CFREG_BITBLT_BG 0x114
368 #define CFREG_BITBLT_FG 0x118
369
370
371 #define CFREG_LUT_MODE 0x1e0
372 #define LUT_BOTH 0x00
373 #define LUT_LCD 0x01
374 #define LUT_CRT 0x02
375
376
377 #define CFREG_LUT_ADDRESS 0x1e2
378
379
380 #define CFREG_LUT_DATA 0x1e4
381
382
383 #define CFREG_POWER_CONF 0x1f0
384 #define POWERSAVE_ENABLE 0x01
385 #define POWERSAVE_MBO 0x10
386
387
388 #define CFREG_POWER_STATUS 0x1f1
389 #define POWERSAVE_STATUS 0x01
390 #define LCD_POWERSAVE_STATUS 0x02
391
392
393 #define CFREG_WATCHDOG 0x1f4
394
395
396 #define CFREG_MODE 0x1fc
397 #define MODE_NO_DISPLAY 0x00
398 #define MODE_LCD 0x01
399 #define MODE_CRT 0x02
400 #define MODE_TV_NO_FLICKER 0x04
401 #define MODE_TV_FLICKER 0x06
402 #define LCD_MODE_SWIVEL_BIT_0 0x40
403
404
405 #define CFREG_BITBLT_DATA 0x0400
406
407 #ifdef _KERNEL
408 #define CFXGA_MEM_RANGE 0x0800
409 #endif