FS2410 开发板linux-2.6.35内核 LCD 驱动移植
2011-01-31 14:33
711 查看
FS2410 开发板linux-2.6.35内核 LCD 驱动移植
在arch/arm/mach-smdk2410.c相应位置中添加如下蓝色行代码
#include <mach/regs-lcd.h> //added by Thomas.Yang 2011-01-30
#include <mach/fb.h>
#include <mach/regs-gpio.h>
#include <plat/pll.h>
#include <plat/udc.h>
#include <mach/gpio-fns.h>
#include <mach/regs-clock.h>
#include <asm/delay.h>
/*LCD35 driver Added by Thomas.Yang (Yang Zhiping) 2011-01-30
********************************************************************/
static struct s3c2410fb_display fb_thomas_display = {
.type = S3C2410_LCDCON1_TFT, //LCD 类型
.width = 320, //LCD 宽
.height = 240, //LCD 高
.xres = 320,
.yres = 240,
.bpp = 16, //LCD 色深,每个像素占多少位
.pixclock = 156000, //像素时钟
.left_margin = 20,
.right_margin = 38,
.hsync_len = 30, //水平同步
.upper_margin = 4,
.lower_margin = 15,
.vsync_len = 3, //垂直同步
.lcdcon5 = S3C2410_LCD
CON5_FRM565 |
S3C2410_LCD
CON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
S3C2410_LCDCON5_PWREN |
S3C2410_LCDCON5_HWSWP,
};
The frame buffer device uses the following fields:
- pixclock: pixel clock in ps (pico seconds)
- left_margin: time from sync to picture
- right_margin: time from picture to sync
- upper_margin: time from sync to picture
- lower_margin: time from picture to sync
- hsync_len: length of horizontal sync
- vsync_len: length of vertical sync
static struct s3c2410fb_mach_info s3c2410fb_thomas_info __initdata={
.displays = &fb_thomas_display,
.num_displays = 1,
.default_display = 0,
.gpcup = 0xffffffff,
.gpcup_mask = 0xffffffff,
.gpccon = 0xaa9556a9,
.gpccon_mask = 0xffffffff,
.gpdup = 0xffffffff,
.gpdup_mask = 0xffffffff,
.gpdcon = 0xaaaaaaaa,
.gpdcon_mask = 0xffffffff,
.lpcsel =0x00,
};
/****************************************************************/
static void __init smdk2410_init(void)
{
s3c_i2c0_set_platdata(NULL);
s3c24xx_fb_set_platdata(&s3c2410fb_thomas_info); //LCD35 driver Added by Thomas.Yang (Yang Zhiping) 2011-01-30
platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices));
smdk_machine_init();
}
在内核编译配置选项中选择:
Device Drivers ---> Graphics support --->
<*> Support for frame buffer devices --->
<*> S3C2410 LCD framebuffer Support
[*] S3C2410 lcd debug messages
[*] Backlight & LCD device support --->
<*> Samsung LTV350QV LCD Panel
[*] Bootup logo --->
[*] Standard 224-color Linux logo (NEW)
make uImage -j4
启动内核,LCD既可以显示linux kernel 小企鹅了。
在arch/arm/mach-smdk2410.c相应位置中添加如下蓝色行代码
#include <mach/regs-lcd.h> //added by Thomas.Yang 2011-01-30
#include <mach/fb.h>
#include <mach/regs-gpio.h>
#include <plat/pll.h>
#include <plat/udc.h>
#include <mach/gpio-fns.h>
#include <mach/regs-clock.h>
#include <asm/delay.h>
/*LCD35 driver Added by Thomas.Yang (Yang Zhiping) 2011-01-30
********************************************************************/
static struct s3c2410fb_display fb_thomas_display = {
.type = S3C2410_LCDCON1_TFT, //LCD 类型
.width = 320, //LCD 宽
.height = 240, //LCD 高
.xres = 320,
.yres = 240,
.bpp = 16, //LCD 色深,每个像素占多少位
.pixclock = 156000, //像素时钟
.left_margin = 20,
.right_margin = 38,
.hsync_len = 30, //水平同步
.upper_margin = 4,
.lower_margin = 15,
.vsync_len = 3, //垂直同步
.lcdcon5 = S3C2410_LCD
CON5_FRM565 |
S3C2410_LCD
CON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
S3C2410_LCDCON5_PWREN |
S3C2410_LCDCON5_HWSWP,
};
The frame buffer device uses the following fields:
- pixclock: pixel clock in ps (pico seconds)
- left_margin: time from sync to picture
- right_margin: time from picture to sync
- upper_margin: time from sync to picture
- lower_margin: time from picture to sync
- hsync_len: length of horizontal sync
- vsync_len: length of vertical sync
static struct s3c2410fb_mach_info s3c2410fb_thomas_info __initdata={
.displays = &fb_thomas_display,
.num_displays = 1,
.default_display = 0,
.gpcup = 0xffffffff,
.gpcup_mask = 0xffffffff,
.gpccon = 0xaa9556a9,
.gpccon_mask = 0xffffffff,
.gpdup = 0xffffffff,
.gpdup_mask = 0xffffffff,
.gpdcon = 0xaaaaaaaa,
.gpdcon_mask = 0xffffffff,
.lpcsel =0x00,
};
/****************************************************************/
static void __init smdk2410_init(void)
{
s3c_i2c0_set_platdata(NULL);
s3c24xx_fb_set_platdata(&s3c2410fb_thomas_info); //LCD35 driver Added by Thomas.Yang (Yang Zhiping) 2011-01-30
platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices));
smdk_machine_init();
}
在内核编译配置选项中选择:
Device Drivers ---> Graphics support --->
<*> Support for frame buffer devices --->
<*> S3C2410 LCD framebuffer Support
[*] S3C2410 lcd debug messages
[*] Backlight & LCD device support --->
<*> Samsung LTV350QV LCD Panel
[*] Bootup logo --->
[*] Standard 224-color Linux logo (NEW)
make uImage -j4
启动内核,LCD既可以显示linux kernel 小企鹅了。
相关文章推荐
- [ARM-LINUX]移植2.6.31.12内核到立宇泰ARMSYS2440开发板之LCD驱动+触摸屏驱动
- linux-2.6.35内核移植—LCD驱动的添加
- Linux-2.6.32.2内核在mini2440上的移植----增加LCD背光驱动
- linux-2.6.32在mini2440开发板上移植 ---W35型LCD驱动移植
- linux-2.6.26.5内核的 lcd驱动移植 lcd 触摸屏移植 tslib-1.4移植 (转)
- Linux-2.6.32.2内核在mini2440上的移植(六)---添加LCD背光驱动
- Linux-2.6.32.2内核在mini2440上的移植(七)---LCD驱动移植
- linux-2.6.35内核移植——Nand flash 驱动的移植
- Linux-2.6.32.2内核在mini2440上的移植(七)---LCD驱动移植
- linux-2.6.32在mini2440开发板上移植 ---W35型LCD驱动移植
- Linux-2.6.32.2内核在mini2440上的移植(六)---添加LCD背光驱动
- linux-2.6.35内核移植—网卡驱动的移植
- 移植Linux3.4.2版本内核到mini2440(二)--添加网卡、UVC摄像头、LCD驱动
- [转]移植linux-2.6.36内核后的ts及lcd驱动参数修改
- S3C2410 LCD驱动的移植(基于linux-2.6.15.4内核)
- fs2410 linux-2.6.35内核移植中的RTC问题--drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
- 【移植驱动到Linux3.4.2内核之二】LCD,触摸屏,按键,USB等驱动程序的移植心得总结
- FS2410 开发板linux-2.6.35内核 jffs2根文件系统镜像
- linux2.6.37.4内核在2440开发板上移植 触摸屏驱动移植
- 基于tiny210v2的linux-3.9.6内核驱动移植3:LCD移植