拿来的 s3c2440 的开发部带的kernel 都是 800X640 的,而touch panel 只有 480X272
通过查看代码 mach_utu2440.c 中发现,其中已经定义了
#if defined(CONFIG_FB_S3C2410_480X272)
static struct s3c2410fb_mach_info utu2440_lcdcfg __initdata = {
.regs = {
.lcdcon1 = S3C2410_LCDCON1_TFT16BPP | /
S3C2410_LCDCON1_TFT | /
S3C2410_LCDCON1_CLKVAL(0x01),
.lcdcon2 = S3C2410_LCDCON2_VBPD(1) | /
S3C2410_LCDCON2_LINEVAL(271) | /
S3C2410_LCDCON2_VFPD(5) | /
S3C2410_LCDCON2_VSPW(9),
.lcdcon3 = S3C2410_LCDCON3_HBPD(5) | /
S3C2410_LCDCON3_HOZVAL(479) | /
S3C2410_LCDCON3_HFPD(15),
.lcdcon4 = S3C2410_LCDCON4_MVAL(13) | /
S3C2410_LCDCON4_HSPW(95),
.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
S3C2410_LCDCON5_PWREN |
S3C2410_LCDCON5_HWSWP,
},
.lpcsel = 0xf82,
.gpccon = 0xaa955699,
.gpccon_mask = 0xffc003cc,
.gpcup = 0x0000ffff,
.gpcup_mask = 0xffffffff,
.gpdcon = 0xaa95aaa1,
.gpdcon_mask = 0xffc0fff0,
.gpdup = 0x0000faff,
.gpdup_mask = 0xffffffff,
.fixed_syncs = 1,
.width = 480,
.height = 272,
.xres = {
.min = 480,
.max = 480,
.defval = 480,
},
.yres = {
.max = 272,
.min = 272,
.defval = 272,
},
.bpp = {
.min = 16,
.max = 16,
.defval = 16,
},
};
#endif
修改 配置文件: make menuconfig
Device Drivers ---> Graphics support ---> LCD select , 选择 4.3 Inch 480X272 LCD
保存配置信息
make uImage 生成 uImage
run install-kernel