15 #define DBE_GETREG(reg, dest) ((dest) = DBE_REG_BASE->reg)
16 #define DBE_SETREG(reg, src) DBE_REG_BASE->reg = (src)
17 #define DBE_IGETREG(reg, idx, dest) ((dest) = DBE_REG_BASE->reg[idx])
18 #define DBE_ISETREG(reg, idx, src) (DBE_REG_BASE->reg[idx] = (src))
20 #define MASK(msb, lsb) ( (((u32)1<<((msb)-(lsb)+1))-1) << (lsb) )
21 #define GET(v, msb, lsb) ( ((u32)(v) & MASK(msb,lsb)) >> (lsb) )
22 #define SET(v, f, msb, lsb) ( (v) = ((v)&~MASK(msb,lsb)) | (( (u32)(f)<<(lsb) ) & MASK(msb,lsb)) )
24 #define GET_DBE_FIELD(reg, field, v) GET((v), DBE_##reg##_##field##_MSB, DBE_##reg##_##field##_LSB)
25 #define SET_DBE_FIELD(reg, field, v, f) SET((v), (f), DBE_##reg##_##field##_MSB, DBE_##reg##_##field##_LSB)
29 #define DBE_REG_PHYS 0xd0000000
30 #define DBE_REG_SIZE 0x01000000
42 char _pad0[ 0x010000 - 0x000020 ];
65 char _pad1[ 0x020000 - 0x010050 ];
71 char _pad2[ 0x030000 - 0x02000C ];
78 char _pad3[ 0x040000 - 0x030010 ];
83 char _pad4[ 0x048000 - 0x040008 ];
87 char _pad5[ 0x050000 - 0x048080 ];
91 char _pad6[ 0x058000 - 0x056000 ];
95 char _pad7[ 0x060000 - 0x058004 ];
99 char _pad8[ 0x068000 - 0x060400 ];
128 #define DBE_CTRLSTAT_CHIPID_MSB 3
129 #define DBE_CTRLSTAT_CHIPID_LSB 0
130 #define DBE_CTRLSTAT_SENSE_N_MSB 4
131 #define DBE_CTRLSTAT_SENSE_N_LSB 4
132 #define DBE_CTRLSTAT_PCLKSEL_MSB 29
133 #define DBE_CTRLSTAT_PCLKSEL_LSB 28
135 #define DBE_DOTCLK_M_MSB 7
136 #define DBE_DOTCLK_M_LSB 0
137 #define DBE_DOTCLK_N_MSB 13
138 #define DBE_DOTCLK_N_LSB 8
139 #define DBE_DOTCLK_P_MSB 15
140 #define DBE_DOTCLK_P_LSB 14
141 #define DBE_DOTCLK_RUN_MSB 20
142 #define DBE_DOTCLK_RUN_LSB 20
144 #define DBE_VT_XY_VT_FREEZE_MSB 31
145 #define DBE_VT_XY_VT_FREEZE_LSB 31
147 #define DBE_FP_VDRV_FP_VDRV_ON_MSB 23
148 #define DBE_FP_VDRV_FP_VDRV_ON_LSB 12
149 #define DBE_FP_VDRV_FP_VDRV_OFF_MSB 11
150 #define DBE_FP_VDRV_FP_VDRV_OFF_LSB 0
152 #define DBE_FP_HDRV_FP_HDRV_ON_MSB 23
153 #define DBE_FP_HDRV_FP_HDRV_ON_LSB 12
154 #define DBE_FP_HDRV_FP_HDRV_OFF_MSB 11
155 #define DBE_FP_HDRV_FP_HDRV_OFF_LSB 0
157 #define DBE_FP_DE_FP_DE_ON_MSB 23
158 #define DBE_FP_DE_FP_DE_ON_LSB 12
159 #define DBE_FP_DE_FP_DE_OFF_MSB 11
160 #define DBE_FP_DE_FP_DE_OFF_LSB 0
162 #define DBE_VT_VSYNC_VT_VSYNC_ON_MSB 23
163 #define DBE_VT_VSYNC_VT_VSYNC_ON_LSB 12
164 #define DBE_VT_VSYNC_VT_VSYNC_OFF_MSB 11
165 #define DBE_VT_VSYNC_VT_VSYNC_OFF_LSB 0
167 #define DBE_VT_HSYNC_VT_HSYNC_ON_MSB 23
168 #define DBE_VT_HSYNC_VT_HSYNC_ON_LSB 12
169 #define DBE_VT_HSYNC_VT_HSYNC_OFF_MSB 11
170 #define DBE_VT_HSYNC_VT_HSYNC_OFF_LSB 0
172 #define DBE_VT_VBLANK_VT_VBLANK_ON_MSB 23
173 #define DBE_VT_VBLANK_VT_VBLANK_ON_LSB 12
174 #define DBE_VT_VBLANK_VT_VBLANK_OFF_MSB 11
175 #define DBE_VT_VBLANK_VT_VBLANK_OFF_LSB 0
177 #define DBE_VT_HBLANK_VT_HBLANK_ON_MSB 23
178 #define DBE_VT_HBLANK_VT_HBLANK_ON_LSB 12
179 #define DBE_VT_HBLANK_VT_HBLANK_OFF_MSB 11
180 #define DBE_VT_HBLANK_VT_HBLANK_OFF_LSB 0
182 #define DBE_VT_FLAGS_VDRV_INVERT_MSB 0
183 #define DBE_VT_FLAGS_VDRV_INVERT_LSB 0
184 #define DBE_VT_FLAGS_HDRV_INVERT_MSB 2
185 #define DBE_VT_FLAGS_HDRV_INVERT_LSB 2
187 #define DBE_VT_VCMAP_VT_VCMAP_ON_MSB 23
188 #define DBE_VT_VCMAP_VT_VCMAP_ON_LSB 12
189 #define DBE_VT_VCMAP_VT_VCMAP_OFF_MSB 11
190 #define DBE_VT_VCMAP_VT_VCMAP_OFF_LSB 0
192 #define DBE_VT_HCMAP_VT_HCMAP_ON_MSB 23
193 #define DBE_VT_HCMAP_VT_HCMAP_ON_LSB 12
194 #define DBE_VT_HCMAP_VT_HCMAP_OFF_MSB 11
195 #define DBE_VT_HCMAP_VT_HCMAP_OFF_LSB 0
197 #define DBE_VT_XYMAX_VT_MAXX_MSB 11
198 #define DBE_VT_XYMAX_VT_MAXX_LSB 0
199 #define DBE_VT_XYMAX_VT_MAXY_MSB 23
200 #define DBE_VT_XYMAX_VT_MAXY_LSB 12
202 #define DBE_VT_HPIXEN_VT_HPIXEN_ON_MSB 23
203 #define DBE_VT_HPIXEN_VT_HPIXEN_ON_LSB 12
204 #define DBE_VT_HPIXEN_VT_HPIXEN_OFF_MSB 11
205 #define DBE_VT_HPIXEN_VT_HPIXEN_OFF_LSB 0
207 #define DBE_VT_VPIXEN_VT_VPIXEN_ON_MSB 23
208 #define DBE_VT_VPIXEN_VT_VPIXEN_ON_LSB 12
209 #define DBE_VT_VPIXEN_VT_VPIXEN_OFF_MSB 11
210 #define DBE_VT_VPIXEN_VT_VPIXEN_OFF_LSB 0
212 #define DBE_OVR_CONTROL_OVR_DMA_ENABLE_MSB 0
213 #define DBE_OVR_CONTROL_OVR_DMA_ENABLE_LSB 0
215 #define DBE_OVR_INHWCTRL_OVR_DMA_ENABLE_MSB 0
216 #define DBE_OVR_INHWCTRL_OVR_DMA_ENABLE_LSB 0
218 #define DBE_OVR_WIDTH_TILE_OVR_FIFO_RESET_MSB 13
219 #define DBE_OVR_WIDTH_TILE_OVR_FIFO_RESET_LSB 13
221 #define DBE_FRM_CONTROL_FRM_DMA_ENABLE_MSB 0
222 #define DBE_FRM_CONTROL_FRM_DMA_ENABLE_LSB 0
223 #define DBE_FRM_CONTROL_FRM_TILE_PTR_MSB 31
224 #define DBE_FRM_CONTROL_FRM_TILE_PTR_LSB 9
225 #define DBE_FRM_CONTROL_FRM_LINEAR_MSB 1
226 #define DBE_FRM_CONTROL_FRM_LINEAR_LSB 1
228 #define DBE_FRM_INHWCTRL_FRM_DMA_ENABLE_MSB 0
229 #define DBE_FRM_INHWCTRL_FRM_DMA_ENABLE_LSB 0
231 #define DBE_FRM_SIZE_TILE_FRM_WIDTH_TILE_MSB 12
232 #define DBE_FRM_SIZE_TILE_FRM_WIDTH_TILE_LSB 5
233 #define DBE_FRM_SIZE_TILE_FRM_RHS_MSB 4
234 #define DBE_FRM_SIZE_TILE_FRM_RHS_LSB 0
235 #define DBE_FRM_SIZE_TILE_FRM_DEPTH_MSB 14
236 #define DBE_FRM_SIZE_TILE_FRM_DEPTH_LSB 13
237 #define DBE_FRM_SIZE_TILE_FRM_FIFO_RESET_MSB 15
238 #define DBE_FRM_SIZE_TILE_FRM_FIFO_RESET_LSB 15
240 #define DBE_FRM_SIZE_PIXEL_FB_HEIGHT_PIX_MSB 31
241 #define DBE_FRM_SIZE_PIXEL_FB_HEIGHT_PIX_LSB 16
243 #define DBE_DID_CONTROL_DID_DMA_ENABLE_MSB 0
244 #define DBE_DID_CONTROL_DID_DMA_ENABLE_LSB 0
245 #define DBE_DID_INHWCTRL_DID_DMA_ENABLE_MSB 0
246 #define DBE_DID_INHWCTRL_DID_DMA_ENABLE_LSB 0
248 #define DBE_DID_START_XY_DID_STARTY_MSB 23
249 #define DBE_DID_START_XY_DID_STARTY_LSB 12
250 #define DBE_DID_START_XY_DID_STARTX_MSB 11
251 #define DBE_DID_START_XY_DID_STARTX_LSB 0
253 #define DBE_CRS_START_XY_CRS_STARTY_MSB 23
254 #define DBE_CRS_START_XY_CRS_STARTY_LSB 12
255 #define DBE_CRS_START_XY_CRS_STARTX_MSB 11
256 #define DBE_CRS_START_XY_CRS_STARTX_LSB 0
258 #define DBE_WID_TYP_MSB 4
259 #define DBE_WID_TYP_LSB 2
260 #define DBE_WID_BUF_MSB 1
261 #define DBE_WID_BUF_LSB 0
263 #define DBE_VC_START_XY_VC_STARTY_MSB 23
264 #define DBE_VC_START_XY_VC_STARTY_LSB 12
265 #define DBE_VC_START_XY_VC_STARTX_MSB 11
266 #define DBE_VC_START_XY_VC_STARTX_LSB 0
270 #define DBE_FRM_DEPTH_8 0
271 #define DBE_FRM_DEPTH_16 1
272 #define DBE_FRM_DEPTH_32 2
274 #define DBE_CMODE_I8 0
275 #define DBE_CMODE_I12 1
276 #define DBE_CMODE_RG3B2 2
277 #define DBE_CMODE_RGB4 3
278 #define DBE_CMODE_ARGB5 4
279 #define DBE_CMODE_RGB8 5
280 #define DBE_CMODE_RGBA5 6
281 #define DBE_CMODE_RGB10 7
283 #define DBE_BMODE_BOTH 3
285 #define DBE_CRS_MAGIC 54
287 #define DBE_CLOCK_REF_KHZ 27000
291 #define DBE_CONFIG_VDAC_ENABLE 0x00000001
292 #define DBE_CONFIG_VDAC_GSYNC 0x00000002
293 #define DBE_CONFIG_VDAC_PBLANK 0x00000004
294 #define DBE_CONFIG_FPENABLE 0x00000008
295 #define DBE_CONFIG_LENDIAN 0x00000020
296 #define DBE_CONFIG_TILEHIST 0x00000040
297 #define DBE_CONFIG_EXT_ADDR 0x00000080
299 #define DBE_CONFIG_FBDEV ( DBE_CONFIG_VDAC_ENABLE | \
300 DBE_CONFIG_VDAC_GSYNC | \
301 DBE_CONFIG_VDAC_PBLANK | \
302 DBE_CONFIG_LENDIAN | \
303 DBE_CONFIG_EXT_ADDR )
376 #define DBE_VOF_UNKNOWNMON 1
377 #define DBE_VOF_STEREO 2
378 #define DBE_VOF_DO_GENSYNC 4
379 #define DBE_VOF_SYNC_ON_GREEN 8
380 #define DBE_VOF_FLATPANEL 0x1000
381 #define DBE_VOF_MAGICKEY 0x2000
387 #ifdef INCLUDE_TIMING_TABLE_DATA
392 0, 640, 480, 59940, 25175,
394 800, 640, 800, 656, 752,
396 525, 480, 525, 490, 492,
404 0, 800, 600, 60317, 40000,
406 1056, 800, 1056, 840, 968,
408 628, 600, 628, 601, 605,
416 0, 800, 600, 75000, 49500,
418 1056, 800, 1056, 816, 896,
420 625, 600, 625, 601, 604,
430 1040, 800, 1040, 856, 976,
432 666, 600, 666, 637, 643,
440 0, 1024, 768, 50000, 54163,
442 1344, 1024, 1344, 1048, 1184,
444 806, 768, 806, 771, 777,
452 0, 1024, 768, 60004, 65000,
454 1344, 1024, 1344, 1048, 1184,
456 806, 768, 806, 771, 777,
464 0, 1024, 768, 75029, 78750,
466 1312, 1024, 1312, 1040, 1136,
468 800, 768, 800, 769, 772,
476 0, 1024, 768, 84997, 94500,
478 1376, 1024, 1376, 1072, 1168,
480 808, 768, 808, 769, 772,
490 1376, 1024, 1376, 1072, 1168,
492 808, 768, 808, 769, 772,
500 0, 1280, 1024, 50000, 89460,
502 1680, 1280, 1680, 1360, 1480,
504 1065, 1024, 1065, 1027, 1030,
512 0, 1280, 1024, 60020, 108000,
514 1688, 1280, 1688, 1328, 1440,
516 1066, 1024, 1066, 1025, 1028,
524 0, 1280, 1024, 75025, 135000,
526 1688, 1280, 1688, 1296, 1440,
528 1066, 1024, 1066, 1025, 1028,
536 0, 1280, 1024, 85024, 157500,
538 1728, 1280, 1728, 1344, 1504,
540 1072, 1024, 1072, 1025, 1028,
549 1600, 1024, 53000, 107447,
551 1900, 1600, 1900, 1630, 1730,
553 1067, 1024, 1067, 1027, 1030,
563 1670, 1600, 1670, 1630, 1650,
565 1067, 1024, 1067, 1027, 1030,
573 0, 1600, 1200, 50000, 130500,
575 2088, 1600, 2088, 1644, 1764,
577 1250, 1200, 1250, 1205, 1211,
585 0, 1600, 1200, 59940, 162000,
587 2160, 1600, 2160, 1644, 1856,
589 1250, 1200, 1250, 1201, 1204,
597 0, 1600, 1200, 75000, 202500,
599 2160, 1600, 2160, 1644, 1856,
601 1250, 1200, 1250, 1201, 1204,
609 0, 1920, 1080, 50000, 133200,
611 2368, 1920, 2368, 1952, 2096,
613 1125, 1080, 1125, 1083, 1086,
621 0, 1920, 1080, 59940, 159840,
623 2368, 1920, 2368, 1952, 2096,
625 1125, 1080, 1125, 1083, 1086,
633 0, 1920, 1080, 72000, 216023,
635 2560, 1920, 2560, 1968, 2184,
637 1172, 1080, 1172, 1083, 1086,
645 0, 1920, 1200, 50000, 161500,
647 2584, 1920, 2584, 1984, 2240,
649 1250, 1200, 1250, 1203, 1206,
657 0, 1920, 1200, 59940, 193800,
659 2584, 1920, 2584, 1984, 2240,
661 1250, 1200, 1250, 1203, 1206,
669 0, 1920, 1200, 66000, 213180,
671 2584, 1920, 2584, 1984, 2240,
673 1250, 1200, 1250, 1203, 1206,
679 #endif // INCLUDE_TIMING_TABLE_DATA
681 #endif // ! __SGIVWFB_H__