1、模仿友坚恒天的6410 Android2.3的内核2.6.36来移植!
2、对比mach-smdk6410.c
static void smdk6410_lcd_power_set(struct plat_lcd_data *pd,
unsigned int power)
{
if (power) {
gpio_direction_output(S3C64XX_GPF(13), 1);
//add by hcm
gpio_direction_output(S3C64XX_GPF(15), 1); //pwm isn`t gpf14?
/* fire nRESET on power up */
gpio_direction_output(S3C64XX_GPN(5), 0);
msleep(10);
gpio_direction_output(S3C64XX_GPN(5), 1);
msleep(1);
} else {
gpio_direction_output(S3C64XX_GPF(13), 0);
//add by hcm
gpio_direction_output(S3C64XX_GPF(15), 0);
}
}
static struct map_desc smdk6410_iodesc[] =
{
{
/* LCD support */
.virtual = (unsigned long)S3C_VA_LCD,
.pfn = __phys_to_pfn(S3C_PA_FB),
.length = SZ_16K,
.type = MT_DEVICE,
},
};
在map-base.h中添加
#define S3C_VA_UART S3C_ADDR(0x01000000)/* UART */
//add by hcm
#define S3C_VA_LCD S3C_ADDR(0x01100000)
从友坚2.6.36中将drivers/video/samsung整个文件夹拷贝过来
vi drivers/video/Kconfig
第2068行增加
source "drivers/video/samsung/Kconfig"
vi drivers/video/Makefile
120行增加
obj-$(CONFIG_FB_S3C_EXT) += samsung/
将Y:\ut6410_kernel_2.6.36\arch\arm\mach-s3c64xx\include\mach下的regs-lcd.h和regs-fb.h拷贝到Y:\linux-3.6.6\arch\arm\mach-s3c64xx\include\mach
Device Drivers --->
Graphics support --->
<*> Support for frame buffer devices ---> (里面的都空选)一定的将< > Samsung S3C framebuffer support空选(如果你默认的话后,后面添加的lcd驱动将无效)
<*> Support for frame buffer devices --->
[ ] Backlight & LCD device support --->
<*> S3C Framebuffer Support (eXtended)(修改Kconfig之后才有这个选)
Select LCD Type (4.3 inch 480x272 TFT LCD) --->
(X) 4.3 inch 480x272 TFT LCD
<*> Advanced options for S3C Framebuffer
Select BPP(Bits Per Pixel) (16 BPP) --->
(4) Number of Framebuffers
[ ] Enable Virtual Screen
[*] Enable Double Buffering
Console display driver support --->
<*> Framebuffer Console support
[*] Bootup logo --->(显示小企鹅)
[*] Standard 224-color Linux logo
最后烧写显示:
S3C_LCD clock got enabled :: 133.000 Mhz
LCD TYPE :: UT_LCD7inch will be initialized
Window[0] - FB1: map_video_memory: clear c885a000:00177000
Window[0] - FB2: map_video_memory: clear c8915800:000bb800
Console: switching to colour frame buffer device 100x30
fb0: s3cfb frame buffer device
Window[1] - FB1: map_video_memory: clear c89d2000:00177000
Window[1] - FB2: map_video_memory: clear c8a8d800:000bb800
fb1: s3cfb frame buffer device
Window[2] - FB1: map_video_memory: clear c8b4a000:000bb800
fb2: s3cfb frame buffer device
Window[3] - FB1: map_video_memory: clear c8c07000:000bb800
fb3: s3cfb frame buffer device
这就说明你的lcd成功了!
触摸屏调试