6 Copyright (C) 2005 Marc Singer
12 Only one panel may be defined at a time.
14 The pixel clock is calculated to be no greater than the target.
16 Each timing value is accompanied by a specification comment.
20 Most of the units will be in clocks.
24 Define this macro to configure the AMBA LCD controller to use an
25 RGB555 encoding for the pels instead of the normal RGB565.
27 LPD9520, LPD79524, LPD7A400, LPD7A404-10, LPD7A404-11
29 These boards are best approximated by 555 for all panels. Some
30 can use an extra low-order bit of blue in bit 16 of the color
31 value, but we don't have a way to communicate this non-linear
32 mapping to the kernel.
36 #if !defined (__LCD_PANEL_H__)
37 # define __LCD_PANEL_H__
39 #if defined (MACH_LPD79520)\
40 || defined (MACH_LPD79524)\
41 || defined (MACH_LPD7A400)\
42 || defined (MACH_LPD7A404)
46 struct clcd_panel_extra {
57 #define NS_TO_CLOCK(ns,c) ((((ns)*((c)/1000) + (1000000 - 1))/1000000))
58 #define CLOCK_TO_DIV(e,c) (((c) + (e) - 1)/(e))
60 #if defined CONFIG_FB_ARMCLCD_SHARP_LQ035Q7DB02_HRTFT
62 /* Logic Product Development LCD 3.5" QVGA HRTFT -10 */
63 /* Sharp PN LQ035Q7DB02 w/HRTFT controller chip */
65 #define PIX_CLOCK_TARGET (6800000)
66 #define PIX_CLOCK_DIVIDER CLOCK_TO_DIV (PIX_CLOCK_TARGET, HCLK)
67 #define PIX_CLOCK (HCLK/PIX_CLOCK_DIVIDER)
69 static struct clcd_panel lcd_panel = {
71 .name = "3.5in QVGA (LQ035Q7DB02)",
74 .pixclock = PIX_CLOCK,
77 .upper_margin = 8, // line/8/8/8
80 .vsync_len = NS_TO_CLOCK (60, PIX_CLOCK),
81 .vmode = FB_VMODE_NONINTERLACED,
85 .tim2 = TIM2_IPC | (PIX_CLOCK_DIVIDER - 2),
86 .cntl = CNTL_LCDTFT | CNTL_WATERMARK,
90 #define HAS_LCD_PANEL_EXTRA
92 static struct clcd_panel_extra lcd_panel_extra = {
105 #if defined CONFIG_FB_ARMCLCD_SHARP_LQ057Q3DC02
107 /* Logic Product Development LCD 5.7" QVGA -10 */
108 /* Sharp PN LQ057Q3DC02 */
109 /* QVGA mode, V/Q=LOW */
111 /* From Sharp on 2006.1.3. I believe some of the values are incorrect
112 * based on the datasheet.
114 Timing0 TIMING1 TIMING2 CONTROL
115 0x140A0C4C 0x080504EF 0x013F380D 0x00000829
116 HBP= 20 VBP= 8 BCD= 0
117 HFP= 10 VFP= 5 CPL=319
118 HSW= 12 VSW= 1 IOE= 0
119 PPL= 19 LPP=239 IPC= 1
128 /* The full horizontal cycle (Th) is clock/360/400/450. */
129 /* The full vertical cycle (Tv) is line/251/262/280. */
131 #define PIX_CLOCK_TARGET (6300000) /* -/6.3/7 MHz */
132 #define PIX_CLOCK_DIVIDER CLOCK_TO_DIV (PIX_CLOCK_TARGET, HCLK)
133 #define PIX_CLOCK (HCLK/PIX_CLOCK_DIVIDER)
135 static struct clcd_panel lcd_panel = {
137 .name = "5.7in QVGA (LQ057Q3DC02)",
140 .pixclock = PIX_CLOCK,
142 .right_margin = 400-11-320-2,
143 .upper_margin = 7, // line/7/7/7
144 .lower_margin = 262-7-240-2,
145 .hsync_len = 2, // clk/2/96/200
146 .vsync_len = 2, // line/2/-/34
147 .vmode = FB_VMODE_NONINTERLACED,
151 .tim2 = TIM2_IHS | TIM2_IVS
152 | (PIX_CLOCK_DIVIDER - 2),
153 .cntl = CNTL_LCDTFT | CNTL_WATERMARK,
159 #if defined CONFIG_FB_ARMCLCD_SHARP_LQ64D343
161 /* Logic Product Development LCD 6.4" VGA -10 */
162 /* Sharp PN LQ64D343 */
164 /* The full horizontal cycle (Th) is clock/750/800/900. */
165 /* The full vertical cycle (Tv) is line/515/525/560. */
167 #define PIX_CLOCK_TARGET (28330000)
168 #define PIX_CLOCK_DIVIDER CLOCK_TO_DIV (PIX_CLOCK_TARGET, HCLK)
169 #define PIX_CLOCK (HCLK/PIX_CLOCK_DIVIDER)
171 static struct clcd_panel lcd_panel = {
173 .name = "6.4in QVGA (LQ64D343)",
176 .pixclock = PIX_CLOCK,
178 .right_margin = 800-32-640-96,
179 .upper_margin = 32, // line/34/34/34
180 .lower_margin = 540-32-480-2,
181 .hsync_len = 96, // clk/2/96/200
182 .vsync_len = 2, // line/2/-/34
183 .vmode = FB_VMODE_NONINTERLACED,
187 .tim2 = TIM2_IHS | TIM2_IVS
188 | (PIX_CLOCK_DIVIDER - 2),
189 .cntl = CNTL_LCDTFT | CNTL_WATERMARK,
195 #if defined CONFIG_FB_ARMCLCD_SHARP_LQ10D368
197 /* Logic Product Development LCD 10.4" VGA -10 */
198 /* Sharp PN LQ10D368 */
200 #define PIX_CLOCK_TARGET (28330000)
201 #define PIX_CLOCK_DIVIDER CLOCK_TO_DIV (PIX_CLOCK_TARGET, HCLK)
202 #define PIX_CLOCK (HCLK/PIX_CLOCK_DIVIDER)
204 static struct clcd_panel lcd_panel = {
206 .name = "10.4in VGA (LQ10D368)",
209 .pixclock = PIX_CLOCK,
216 .vmode = FB_VMODE_NONINTERLACED,
220 .tim2 = TIM2_IHS | TIM2_IVS
221 | (PIX_CLOCK_DIVIDER - 2),
222 .cntl = CNTL_LCDTFT | CNTL_WATERMARK,
228 #if defined CONFIG_FB_ARMCLCD_SHARP_LQ121S1DG41
230 /* Logic Product Development LCD 12.1" SVGA -10 */
231 /* Sharp PN LQ121S1DG41, was LQ121S1DG31 */
233 /* Note that with a 99993900 Hz HCLK, it is not possible to hit the
234 * target clock frequency range of 35MHz to 42MHz. */
236 /* If the target pixel clock is substantially lower than the panel
237 * spec, this is done to prevent the LCD display from glitching when
238 * the CPU is under load. A pixel clock higher than 25MHz
239 * (empirically determined) will compete with the CPU for bus cycles
240 * for the Ethernet chip. However, even a pixel clock of 10MHz
241 * competes with Compact Flash interface during some operations
242 * (fdisk, e2fsck). And, at that speed the display may have a visible
245 /* The full horizontal cycle (Th) is clock/832/1056/1395. */
247 #define PIX_CLOCK_TARGET (20000000)
248 #define PIX_CLOCK_DIVIDER CLOCK_TO_DIV (PIX_CLOCK_TARGET, HCLK)
249 #define PIX_CLOCK (HCLK/PIX_CLOCK_DIVIDER)
251 static struct clcd_panel lcd_panel = {
253 .name = "12.1in SVGA (LQ121S1DG41)",
256 .pixclock = PIX_CLOCK,
257 .left_margin = 89, // ns/5/-/(1/PIX_CLOCK)-10
258 .right_margin = 1056-800-89-128,
259 .upper_margin = 23, // line/23/23/23
261 .hsync_len = 128, // clk/2/128/200
262 .vsync_len = 4, // line/2/4/6
263 .vmode = FB_VMODE_NONINTERLACED,
267 .tim2 = TIM2_IHS | TIM2_IVS
268 | (PIX_CLOCK_DIVIDER - 2),
269 .cntl = CNTL_LCDTFT | CNTL_WATERMARK,
275 #if defined CONFIG_FB_ARMCLCD_HITACHI
278 /* Submitted by Michele Da Rold <michele.darold@ecsproject.com> */
280 #define PIX_CLOCK_TARGET (49000000)
281 #define PIX_CLOCK_DIVIDER CLOCK_TO_DIV (PIX_CLOCK_TARGET, HCLK)
282 #define PIX_CLOCK (HCLK/PIX_CLOCK_DIVIDER)
284 static struct clcd_panel lcd_panel = {
286 .name = "Hitachi 800x480",
289 .pixclock = PIX_CLOCK,
296 .vmode = FB_VMODE_NONINTERLACED,
300 .tim2 = TIM2_IPC | TIM2_IHS | TIM2_IVS
301 | (PIX_CLOCK_DIVIDER - 2),
302 .cntl = CNTL_LCDTFT | CNTL_WATERMARK,
309 #if defined CONFIG_FB_ARMCLCD_AUO_A070VW01_WIDE
311 /* AU Optotronics A070VW01 7.0 Wide Screen color Display*/
312 /* Submitted by Michele Da Rold <michele.darold@ecsproject.com> */
314 #define PIX_CLOCK_TARGET (10000000)
315 #define PIX_CLOCK_DIVIDER CLOCK_TO_DIV (PIX_CLOCK_TARGET, HCLK)
316 #define PIX_CLOCK (HCLK/PIX_CLOCK_DIVIDER)
318 static struct clcd_panel lcd_panel = {
320 .name = "7.0in Wide (A070VW01)",
323 .pixclock = PIX_CLOCK,
330 .vmode = FB_VMODE_NONINTERLACED,
334 .tim2 = TIM2_IPC | TIM2_IHS | TIM2_IVS
335 | (PIX_CLOCK_DIVIDER - 2),
336 .cntl = CNTL_LCDTFT | CNTL_WATERMARK,
345 #endif /* __LCD_PANEL_H__ */