[go: nahoru, domu]

1f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/*
2f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle * BRIEF MODULE DESCRIPTION
3f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *	Hardware definitions for the Au1200 LCD controller
4f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *
5f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle * Copyright 2004 AMD
6f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle * Author:	AMD
7f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *
8f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  This program is free software; you can redistribute	 it and/or modify it
9f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  under  the terms of	 the GNU General  Public License as published by the
10f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  Free Software Foundation;  either version 2 of the	License, or (at your
11f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  option) any later version.
12f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *
13f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  THIS  SOFTWARE  IS PROVIDED	  ``AS	IS'' AND   ANY	EXPRESS OR IMPLIED
14f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  WARRANTIES,	  INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
15f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
16f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  NO	EVENT  SHALL   THE AUTHOR  BE	 LIABLE FOR ANY	  DIRECT, INDIRECT,
17f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  NOT LIMITED	  TO, PROCUREMENT OF  SUBSTITUTE GOODS	OR SERVICES; LOSS OF
19f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  USE, DATA,	OR PROFITS; OR	BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  ANY THEORY OF LIABILITY, WHETHER IN	 CONTRACT, STRICT LIABILITY, OR TORT
21f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *
24f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  You should have received a copy of the  GNU General Public License along
25f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  with this program; if not, write  to the Free Software Foundation, Inc.,
26f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  675 Mass Ave, Cambridge, MA 02139, USA.
27f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle */
28f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
29f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#ifndef _AU1200LCD_H
30f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define _AU1200LCD_H
31f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
32f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/********************************************************************/
33f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define AU1200_LCD_ADDR		0xB5000000
34f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
35f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define uint8 unsigned char
36f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define uint32 unsigned int
37f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
38f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechlestruct au1200_lcd {
39f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	reserved0;
40f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	screen;
41f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	backcolor;
42f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	horztiming;
43f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	verttiming;
44f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	clkcontrol;
45f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	pwmdiv;
46f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	pwmhi;
47f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	reserved1;
48f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	winenable;
49f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	colorkey;
50f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	colorkeymsk;
51f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	struct
52f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	{
53f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	cursorctrl;
54f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	cursorpos;
55f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	cursorcolor0;
56f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	cursorcolor1;
57f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	cursorcolor2;
58f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		uint32	cursorcolor3;
59f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	} hwc;
60f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	intstatus;
61f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	intenable;
62f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	outmask;
63f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	fifoctrl;
64f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	uint32	reserved2[(0x0100-0x0058)/4];
65f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	struct
66f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	{
67f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	winctrl0;
68f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	winctrl1;
69f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	winctrl2;
70f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	winbuf0;
71f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	winbuf1;
72f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	winbufctrl;
73f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		uint32	winreserved0;
74f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		uint32	winreserved1;
75f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	} window[4];
76f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
77f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	uint32	reserved3[(0x0400-0x0180)/4];
78f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
79f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	palette[(0x0800-0x0400)/4];
80f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
81f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint8	cursorpattern[256];
82f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle};
83f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
84f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_screen */
85f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_SEN		(1<<31)
86f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_SX		(0x07FF<<19)
87f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_SY		(0x07FF<< 8)
88f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_SWP		(1<<7)
89f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_SWD		(1<<6)
90f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_PT		(7<<0)
91f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_PT_TFT	(0<<0)
92f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_SX_N(WIDTH)	((WIDTH-1)<<19)
93f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_SY_N(HEIGHT)	((HEIGHT-1)<<8)
94f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_PT_CSTN	(1<<0)
95f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_PT_CDSTN	(2<<0)
96f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_PT_M8STN	(3<<0)
97f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_PT_M4STN	(4<<0)
98f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
99f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_backcolor */
100f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_BACKCOLOR_SBGR		(0xFF<<16)
101f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_BACKCOLOR_SBGG		(0xFF<<8)
102f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_BACKCOLOR_SBGB		(0xFF<<0)
103f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_BACKCOLOR_SBGR_N(N)	((N)<<16)
104f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_BACKCOLOR_SBGG_N(N)	((N)<<8)
105f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_BACKCOLOR_SBGB_N(N)	((N)<<0)
106f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
107f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_winenable */
108f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINENABLE_WEN3		(1<<3)
109f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINENABLE_WEN2		(1<<2)
110f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINENABLE_WEN1		(1<<1)
111f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINENABLE_WEN0		(1<<0)
112f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
113f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_colorkey */
114f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEY_CKR		(0xFF<<16)
115f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEY_CKG		(0xFF<<8)
116f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEY_CKB		(0xFF<<0)
117f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEY_CKR_N(N)	((N)<<16)
118f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEY_CKG_N(N)	((N)<<8)
119f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEY_CKB_N(N)	((N)<<0)
120f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
121f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_colorkeymsk */
122f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEYMSK_CKMR		(0xFF<<16)
123f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEYMSK_CKMG		(0xFF<<8)
124f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEYMSK_CKMB		(0xFF<<0)
125f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEYMSK_CKMR_N(N)	((N)<<16)
126f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEYMSK_CKMG_N(N)	((N)<<8)
127f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEYMSK_CKMB_N(N)	((N)<<0)
128f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
129f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd windows control 0 */
130f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL0_OX		(0x07FF<<21)
131f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL0_OY		(0x07FF<<10)
132f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL0_A		(0x00FF<<2)
133f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL0_AEN	(1<<1)
134f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL0_OX_N(N) ((N)<<21)
135f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL0_OY_N(N) ((N)<<10)
136f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL0_A_N(N) ((N)<<2)
137f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
138f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd windows control 1 */
139f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PRI	(3<<30)
140f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PIPE	(1<<29)
141f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM	(0xF<<25)
142f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_CCO	(1<<24)
143f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PO		(3<<22)
144f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_SZX	(0x07FF<<11)
145f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_SZY	(0x07FF<<0)
146f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_1BPP	(0<<25)
147f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_2BPP	(1<<25)
148f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_4BPP	(2<<25)
149f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_8BPP	(3<<25)
150f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_12BPP	(4<<25)
151f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_16BPP655	(5<<25)
152f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_16BPP565	(6<<25)
153f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_16BPP556	(7<<25)
154f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_16BPPI1555	(8<<25)
155f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_16BPPI5551	(9<<25)
156f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_16BPPA1555	(10<<25)
157f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_16BPPA5551	(11<<25)
158f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_24BPP		(12<<25)
159f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_32BPP		(13<<25)
160f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PRI_N(N)	((N)<<30)
161f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PO_00		(0<<22)
162f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PO_01		(1<<22)
163f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PO_10		(2<<22)
164f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PO_11		(3<<22)
165f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_SZX_N(N)	((N-1)<<11)
166f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_SZY_N(N)	((N-1)<<0)
167f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
168f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd windows control 2 */
169f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_CKMODE		(3<<24)
170f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_DBM		(1<<23)
171f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_RAM		(3<<21)
172f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_BX			(0x1FFF<<8)
173f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCX		(0xF<<4)
174f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCY		(0xF<<0)
175f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_CKMODE_00		(0<<24)
176f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_CKMODE_01		(1<<24)
177f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_CKMODE_10		(2<<24)
178f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_CKMODE_11		(3<<24)
179f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_RAM_NONE		(0<<21)
180f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_RAM_PALETTE	(1<<21)
181f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_RAM_GAMMA		(2<<21)
182f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_RAM_BUFFER		(3<<21)
183f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_BX_N(N)	((N)<<8)
184f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCX_1		(0<<4)
185f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCX_2		(1<<4)
186f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCX_4		(2<<4)
187f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCY_1		(0<<0)
188f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCY_2		(1<<0)
189f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCY_4		(2<<0)
190f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
191f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd windows buffer control */
192f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINBUFCTRL_DB		(1<<1)
193f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINBUFCTRL_DBN		(1<<0)
194f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
195f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_intstatus, lcd_intenable */
196f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_IFO				(0xF<<14)
197f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_IFU				(0xF<<10)
198f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_OFO				(1<<9)
199f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_OFU				(1<<8)
200f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_WAIT			(1<<3)
201f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_SD				(1<<2)
202f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_SA				(1<<1)
203f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_SS				(1<<0)
204f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
205f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_horztiming */
206f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_HORZTIMING_HND2		(0x1FF<<18)
207f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_HORZTIMING_HND1		(0x1FF<<9)
208f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_HORZTIMING_HPW		(0x1FF<<0)
209f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_HORZTIMING_HND2_N(N)(((N)-1)<<18)
210f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_HORZTIMING_HND1_N(N)(((N)-1)<<9)
211f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_HORZTIMING_HPW_N(N)	(((N)-1)<<0)
212f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
213f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_verttiming */
214f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_VERTTIMING_VND2		(0x1FF<<18)
215f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_VERTTIMING_VND1		(0x1FF<<9)
216f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_VERTTIMING_VPW		(0x1FF<<0)
217f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_VERTTIMING_VND2_N(N)(((N)-1)<<18)
218f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_VERTTIMING_VND1_N(N)(((N)-1)<<9)
219f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_VERTTIMING_VPW_N(N)	(((N)-1)<<0)
220f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
221f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_clkcontrol */
222f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_EXT		(1<<22)
223f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_DELAY	(3<<20)
224f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_CDD		(1<<19)
225f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_IB		(1<<18)
226f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_IC		(1<<17)
227f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_IH		(1<<16)
228f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_IV		(1<<15)
229f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_BF		(0x1F<<10)
230f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_PCD		(0x3FF<<0)
231f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_BF_N(N)	(((N)-1)<<10)
232f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_PCD_N(N)	((N)<<0)
233f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
234f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_pwmdiv */
235f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_PWMDIV_EN			(1<<31)
236f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_PWMDIV_PWMDIV		(0x1FFFF<<0)
237f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_PWMDIV_PWMDIV_N(N)	((N)<<0)
238f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
239f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_pwmhi */
240f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_PWMHI_PWMHI1		(0xFFFF<<16)
241f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_PWMHI_PWMHI0		(0xFFFF<<0)
242f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_PWMHI_PWMHI1_N(N)	((N)<<16)
243f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_PWMHI_PWMHI0_N(N)	((N)<<0)
244f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
245f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_hwccon */
246f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_HWCCON_EN			(1<<0)
247f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
248f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_cursorpos */
249f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCXOFF		(0x1F<<27)
250f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCXPOS		(0x07FF<<16)
251f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCYOFF		(0x1F<<11)
252f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCYPOS		(0x07FF<<0)
253f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCXOFF_N(N)	((N)<<27)
254f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCXPOS_N(N)	((N)<<16)
255f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCYOFF_N(N)	((N)<<11)
256f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCYPOS_N(N)	((N)<<0)
257f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
258f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_cursorcolor */
259f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCA		(0xFF<<24)
260f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCR		(0xFF<<16)
261f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCG		(0xFF<<8)
262f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCB		(0xFF<<0)
263f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCA_N(N)	((N)<<24)
264f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCR_N(N)	((N)<<16)
265f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCG_N(N)	((N)<<8)
266f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCB_N(N)	((N)<<0)
267f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
268f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_fifoctrl */
269f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F3IF		(1<<29)
270f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F3REQ		(0x1F<<24)
271f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F2IF		(1<<29)
272f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F2REQ		(0x1F<<16)
273f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F1IF		(1<<29)
274f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F1REQ		(0x1F<<8)
275f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F0IF		(1<<29)
276f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F0REQ		(0x1F<<0)
277f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F3REQ_N(N)	((N-1)<<24)
278f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F2REQ_N(N)	((N-1)<<16)
279f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F1REQ_N(N)	((N-1)<<8)
280f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F0REQ_N(N)	((N-1)<<0)
281f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
282f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_outmask */
283f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_OUTMASK_MASK		(0x00FFFFFF)
284f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
285f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/********************************************************************/
286f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#endif /* _AU1200LCD_H */
287f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/*
288f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle * BRIEF MODULE DESCRIPTION
289f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *	Hardware definitions for the Au1200 LCD controller
290f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *
291f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle * Copyright 2004 AMD
292f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle * Author:	AMD
293f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *
294f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  This program is free software; you can redistribute	 it and/or modify it
295f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  under  the terms of	 the GNU General  Public License as published by the
296f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  Free Software Foundation;  either version 2 of the	License, or (at your
297f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  option) any later version.
298f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *
299f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  THIS  SOFTWARE  IS PROVIDED	  ``AS	IS'' AND   ANY	EXPRESS OR IMPLIED
300f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  WARRANTIES,	  INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
301f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
302f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  NO	EVENT  SHALL   THE AUTHOR  BE	 LIABLE FOR ANY	  DIRECT, INDIRECT,
303f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
304f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  NOT LIMITED	  TO, PROCUREMENT OF  SUBSTITUTE GOODS	OR SERVICES; LOSS OF
305f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  USE, DATA,	OR PROFITS; OR	BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
306f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  ANY THEORY OF LIABILITY, WHETHER IN	 CONTRACT, STRICT LIABILITY, OR TORT
307f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
308f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
309f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *
310f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  You should have received a copy of the  GNU General Public License along
311f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  with this program; if not, write  to the Free Software Foundation, Inc.,
312f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle *  675 Mass Ave, Cambridge, MA 02139, USA.
313f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle */
314f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
315f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#ifndef _AU1200LCD_H
316f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define _AU1200LCD_H
317f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
318f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/********************************************************************/
319f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define AU1200_LCD_ADDR		0xB5000000
320f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
321f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define uint8 unsigned char
322f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define uint32 unsigned int
323f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
324f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechlestruct au1200_lcd {
325f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	reserved0;
326f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	screen;
327f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	backcolor;
328f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	horztiming;
329f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	verttiming;
330f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	clkcontrol;
331f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	pwmdiv;
332f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	pwmhi;
333f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	reserved1;
334f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	winenable;
335f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	colorkey;
336f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	colorkeymsk;
337f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	struct
338f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	{
339f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	cursorctrl;
340f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	cursorpos;
341f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	cursorcolor0;
342f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	cursorcolor1;
343f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	cursorcolor2;
344f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		uint32	cursorcolor3;
345f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	} hwc;
346f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	intstatus;
347f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	intenable;
348f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	outmask;
349f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	fifoctrl;
350f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	uint32	reserved2[(0x0100-0x0058)/4];
351f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	struct
352f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	{
353f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	winctrl0;
354f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	winctrl1;
355f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	winctrl2;
356f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	winbuf0;
357f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	winbuf1;
358f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		volatile uint32	winbufctrl;
359f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		uint32	winreserved0;
360f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle		uint32	winreserved1;
361f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	} window[4];
362f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
363f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	uint32	reserved3[(0x0400-0x0180)/4];
364f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
365f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint32	palette[(0x0800-0x0400)/4];
366f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
367f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle	volatile uint8	cursorpattern[256];
368f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle};
369f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
370f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_screen */
371f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_SEN		(1<<31)
372f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_SX		(0x07FF<<19)
373f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_SY		(0x07FF<< 8)
374f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_SWP		(1<<7)
375f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_SWD		(1<<6)
376f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_PT		(7<<0)
377f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_PT_TFT	(0<<0)
378f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_SX_N(WIDTH)	((WIDTH-1)<<19)
379f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_SY_N(HEIGHT)	((HEIGHT-1)<<8)
380f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_PT_CSTN	(1<<0)
381f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_PT_CDSTN	(2<<0)
382f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_PT_M8STN	(3<<0)
383f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_SCREEN_PT_M4STN	(4<<0)
384f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
385f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_backcolor */
386f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_BACKCOLOR_SBGR		(0xFF<<16)
387f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_BACKCOLOR_SBGG		(0xFF<<8)
388f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_BACKCOLOR_SBGB		(0xFF<<0)
389f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_BACKCOLOR_SBGR_N(N)	((N)<<16)
390f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_BACKCOLOR_SBGG_N(N)	((N)<<8)
391f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_BACKCOLOR_SBGB_N(N)	((N)<<0)
392f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
393f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_winenable */
394f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINENABLE_WEN3		(1<<3)
395f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINENABLE_WEN2		(1<<2)
396f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINENABLE_WEN1		(1<<1)
397f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINENABLE_WEN0		(1<<0)
398f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
399f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_colorkey */
400f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEY_CKR		(0xFF<<16)
401f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEY_CKG		(0xFF<<8)
402f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEY_CKB		(0xFF<<0)
403f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEY_CKR_N(N)	((N)<<16)
404f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEY_CKG_N(N)	((N)<<8)
405f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEY_CKB_N(N)	((N)<<0)
406f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
407f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_colorkeymsk */
408f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEYMSK_CKMR		(0xFF<<16)
409f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEYMSK_CKMG		(0xFF<<8)
410f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEYMSK_CKMB		(0xFF<<0)
411f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEYMSK_CKMR_N(N)	((N)<<16)
412f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEYMSK_CKMG_N(N)	((N)<<8)
413f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_COLORKEYMSK_CKMB_N(N)	((N)<<0)
414f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
415f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd windows control 0 */
416f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL0_OX		(0x07FF<<21)
417f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL0_OY		(0x07FF<<10)
418f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL0_A		(0x00FF<<2)
419f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL0_AEN	(1<<1)
420f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL0_OX_N(N) ((N)<<21)
421f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL0_OY_N(N) ((N)<<10)
422f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL0_A_N(N) ((N)<<2)
423f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
424f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd windows control 1 */
425f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PRI	(3<<30)
426f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PIPE	(1<<29)
427f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM	(0xF<<25)
428f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_CCO	(1<<24)
429f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PO		(3<<22)
430f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_SZX	(0x07FF<<11)
431f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_SZY	(0x07FF<<0)
432f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_1BPP	(0<<25)
433f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_2BPP	(1<<25)
434f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_4BPP	(2<<25)
435f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_8BPP	(3<<25)
436f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_12BPP	(4<<25)
437f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_16BPP655	(5<<25)
438f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_16BPP565	(6<<25)
439f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_16BPP556	(7<<25)
440f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_16BPPI1555	(8<<25)
441f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_16BPPI5551	(9<<25)
442f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_16BPPA1555	(10<<25)
443f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_16BPPA5551	(11<<25)
444f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_24BPP		(12<<25)
445f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_FRM_32BPP		(13<<25)
446f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PRI_N(N)	((N)<<30)
447f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PO_00		(0<<22)
448f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PO_01		(1<<22)
449f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PO_10		(2<<22)
450f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_PO_11		(3<<22)
451f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_SZX_N(N)	((N-1)<<11)
452f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL1_SZY_N(N)	((N-1)<<0)
453f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
454f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd windows control 2 */
455f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_CKMODE		(3<<24)
456f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_DBM		(1<<23)
457f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_RAM		(3<<21)
458f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_BX			(0x1FFF<<8)
459f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCX		(0xF<<4)
460f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCY		(0xF<<0)
461f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_CKMODE_00		(0<<24)
462f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_CKMODE_01		(1<<24)
463f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_CKMODE_10		(2<<24)
464f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_CKMODE_11		(3<<24)
465f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_RAM_NONE		(0<<21)
466f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_RAM_PALETTE	(1<<21)
467f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_RAM_GAMMA		(2<<21)
468f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_RAM_BUFFER		(3<<21)
469f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_BX_N(N)	((N)<<8)
470f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCX_1		(0<<4)
471f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCX_2		(1<<4)
472f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCX_4		(2<<4)
473f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCY_1		(0<<0)
474f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCY_2		(1<<0)
475f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINCTRL2_SCY_4		(2<<0)
476f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
477f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd windows buffer control */
478f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINBUFCTRL_DB		(1<<1)
479f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_WINBUFCTRL_DBN		(1<<0)
480f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
481f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_intstatus, lcd_intenable */
482f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_IFO				(0xF<<14)
483f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_IFU				(0xF<<10)
484f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_OFO				(1<<9)
485f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_OFU				(1<<8)
486f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_WAIT			(1<<3)
487f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_SD				(1<<2)
488f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_SA				(1<<1)
489f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_INT_SS				(1<<0)
490f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
491f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_horztiming */
492f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_HORZTIMING_HND2		(0x1FF<<18)
493f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_HORZTIMING_HND1		(0x1FF<<9)
494f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_HORZTIMING_HPW		(0x1FF<<0)
495f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_HORZTIMING_HND2_N(N)(((N)-1)<<18)
496f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_HORZTIMING_HND1_N(N)(((N)-1)<<9)
497f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_HORZTIMING_HPW_N(N)	(((N)-1)<<0)
498f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
499f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_verttiming */
500f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_VERTTIMING_VND2		(0x1FF<<18)
501f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_VERTTIMING_VND1		(0x1FF<<9)
502f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_VERTTIMING_VPW		(0x1FF<<0)
503f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_VERTTIMING_VND2_N(N)(((N)-1)<<18)
504f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_VERTTIMING_VND1_N(N)(((N)-1)<<9)
505f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_VERTTIMING_VPW_N(N)	(((N)-1)<<0)
506f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
507f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_clkcontrol */
508f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_EXT		(1<<22)
509f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_DELAY	(3<<20)
510f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_CDD		(1<<19)
511f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_IB		(1<<18)
512f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_IC		(1<<17)
513f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_IH		(1<<16)
514f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_IV		(1<<15)
515f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_BF		(0x1F<<10)
516f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_PCD		(0x3FF<<0)
517f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_BF_N(N)	(((N)-1)<<10)
518f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CLKCONTROL_PCD_N(N)	((N)<<0)
519f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
520f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_pwmdiv */
521f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_PWMDIV_EN			(1<<31)
522f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_PWMDIV_PWMDIV		(0x1FFFF<<0)
523f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_PWMDIV_PWMDIV_N(N)	((N)<<0)
524f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
525f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_pwmhi */
526f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_PWMHI_PWMHI1		(0xFFFF<<16)
527f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_PWMHI_PWMHI0		(0xFFFF<<0)
528f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_PWMHI_PWMHI1_N(N)	((N)<<16)
529f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_PWMHI_PWMHI0_N(N)	((N)<<0)
530f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
531f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_hwccon */
532f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_HWCCON_EN			(1<<0)
533f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
534f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_cursorpos */
535f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCXOFF		(0x1F<<27)
536f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCXPOS		(0x07FF<<16)
537f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCYOFF		(0x1F<<11)
538f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCYPOS		(0x07FF<<0)
539f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCXOFF_N(N)	((N)<<27)
540f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCXPOS_N(N)	((N)<<16)
541f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCYOFF_N(N)	((N)<<11)
542f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORPOS_HWCYPOS_N(N)	((N)<<0)
543f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
544f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_cursorcolor */
545f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCA		(0xFF<<24)
546f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCR		(0xFF<<16)
547f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCG		(0xFF<<8)
548f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCB		(0xFF<<0)
549f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCA_N(N)	((N)<<24)
550f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCR_N(N)	((N)<<16)
551f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCG_N(N)	((N)<<8)
552f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_CURSORCOLOR_HWCB_N(N)	((N)<<0)
553f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
554f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_fifoctrl */
555f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F3IF		(1<<29)
556f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F3REQ		(0x1F<<24)
557f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F2IF		(1<<29)
558f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F2REQ		(0x1F<<16)
559f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F1IF		(1<<29)
560f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F1REQ		(0x1F<<8)
561f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F0IF		(1<<29)
562f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F0REQ		(0x1F<<0)
563f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F3REQ_N(N)	((N-1)<<24)
564f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F2REQ_N(N)	((N-1)<<16)
565f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F1REQ_N(N)	((N-1)<<8)
566f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_FIFOCTRL_F0REQ_N(N)	((N-1)<<0)
567f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
568f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/* lcd_outmask */
569f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#define LCD_OUTMASK_MASK		(0x00FFFFFF)
570f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle
571f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle/********************************************************************/
572f95ec3c6df271ae4e6290cd6b95c18a009c76dc9Ralf Baechle#endif /* _AU1200LCD_H */
573