blob: 1cb0b860f2042d1d564c97dc236a19a079cec30d [file] [log] [blame]
wdenka6c7ad22002-12-03 21:28:10 +00001/*
2 * (C) Copyright 2002
Albert ARIBAUDfa82f872011-08-04 18:45:45 +02003 * Stäubli Faverges - <www.staubli.com>
wdenka6c7ad22002-12-03 21:28:10 +00004 * Pierre AUBERT p.aubert@staubli.com
5 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02006 * SPDX-License-Identifier: GPL-2.0+
wdenka6c7ad22002-12-03 21:28:10 +00007 */
8/* Video support for Epson SED13806 chipset */
9
10
11#ifndef _SED13806_H_
12#define _SED13806_H_
13
14
15/* General definitions */
16#define FRAME_BUFFER_OFFSET 0x200000 /* Frame buffer offset */
17#define TOTAL_SPACE_SIZE 0x400000
18
19#define DEFAULT_VIDEO_MEMORY_SIZE 0x140000 /* Video Memory Size */
20
Wolfgang Denk53677ef2008-05-20 16:00:29 +020021#define HWCURSORSIZE 1024 /* Size of memory reserved
wdenk8bde7f72003-06-27 21:31:46 +000022 for HW cursor*/
wdenka6c7ad22002-12-03 21:28:10 +000023
24/* Offset of chipset registers */
25#define BLT_CTRL0 (0x0100)
26#define BLT_CTRL1 (0x0101)
27#define BLT_ROP (0x0102)
28#define BLT_OP (0x0103)
29#define BLT_SRC_ADDR0 (0x0104)
30#define BLT_SRC_ADDR1 (0x0105)
31#define BLT_SRC_ADDR2 (0x0106)
32#define BLT_DST_ADDR0 (0x0108)
33#define BLT_DST_ADDR1 (0x0109)
34#define BLT_DST_ADDR2 (0x010A)
35#define BLT_MEM_OFF0 (0x010C)
36#define BLT_MEM_OFF1 (0x010D)
37#define BLT_WIDTH0 (0x0110)
38#define BLT_WIDTH1 (0x0111)
39#define BLT_HEIGHT0 (0x0112)
40#define BLT_HEIGHT1 (0x0113)
41#define BLT_BGCOLOR0 (0x0114)
42#define BLT_BGCOLOR1 (0x0115)
43#define BLT_FGCOLOR0 (0x0118)
44#define BLT_FGCOLOR1 (0x0119)
45
46#define BLT_REG (0x100000)
47
48/* Lookup table registers */
49#define REG_LUT_ADDR 0x1e2
50#define REG_LUT_DATA 0x1e4
51
52/* Cursor/Ink registers */
53#define LCD_CURSOR_CNTL (0x0070)
54#define LCD_CURSOR_START (0x0071)
55#define LCD_CURSOR_XL (0x0072)
56#define LCD_CURSOR_XM (0x0073)
57#define LCD_CURSOR_YL (0x0074)
58#define LCD_CURSOR_YM (0x0075)
59#define LCD_CURSOR_COL0_B (0x0076)
60#define LCD_CURSOR_COL0_G (0x0077)
61#define LCD_CURSOR_COL0_R (0x0078)
62#define LCD_CURSOR_COL1_B (0x007A)
63#define LCD_CURSOR_COL1_G (0x007B)
64#define LCD_CURSOR_COL1_R (0x007C)
65#define LCD_CURSOR_FIFO (0x007E)
66
67typedef struct
68{
69 unsigned short Index;
70 unsigned char Value;
71} S1D_REGS;
72
73
wdenka6c7ad22002-12-03 21:28:10 +000074/* Board specific functions */
75unsigned int board_video_init (void);
76void board_validate_screen (unsigned int base);
77const S1D_REGS *board_get_regs (void);
78int board_get_width (void);
79int board_get_height (void);
80
81#endif /* _SED13806_H_ */