TFT-4238液晶和原来的TFT-6862差别较大。
这个屏的时钟和信号极性为低电平,需要修改LCD_POL寄存器(0x3104 0008)的bit14为1.
【arch/arm/mach-lpc32xx/clocks-lpc32xx.c】
1623 tmp &= ~(0xF800001F);
1624 tmp &= ~CLCDC_LCDTIMING2_BCD;
1625 tmp |= (div & 0x1F);
1626 tmp |= (((div >> 5) & 0x1F) << 27);
1627 tmp |= (1<<14);//POL low ABING for TFT-4238
1628 __raw_writel(tmp, CLCD_POL(io_p2v(LCD_BASE)));
1629 local_onoff_enable(clk, 1);
【./arch/arm/mach-lpc32xx/clocks-lpc32xx.c】
233 /* TFT-4238 */
234 static struct clcd_panel conn_lcd_panel = {
235 .mode = {
236 .name = "QVGA TFT-4238",
237 .refresh = 65,
238 .xres = 320,
239 .yres = 240,
240 .pixclock = 80000,
241 .left_margin = 19,
242 .right_margin = 12,
243 .upper_margin = 1,
244 .lower_margin = 4,
245 .hsync_len = 3,
246 .vsync_len = 16,
247 .sync = 1,
248 .vmode = FB_VMODE_NONINTERLACED,
249 },
250 .width = -1,
251 .height = -1,
252 .tim2 = (CLCDC_LCDTIMING2_IVS | CLCDC_LCDTIMING2_IHS),
253 .cntl = (CNTL_BGR | CLCDC_LCDCTRL_TFT | CNTL_LCDVCOMP(1) |
254 CLCDC_LCDCTRL_BPP16_565),
255 .bpp = 16,
256 };
257 #define PANEL_SIZE (3 * SZ_64K)
阅读(1827) | 评论(0) | 转发(1) |