s3c2440 lcd驱动移植

    xiaoxiao2025-08-21  11

     

    ———————————————————————————————————————主机操作系统:Centos 6.7交叉编译器环境:arm-linux-gcc-4.5.4 开发板平台: FL2440 Linux内核版本: linux-3.0 开发模块: lcd驱动移植

    lcd屏幕尺寸:4.3寸邮箱:leiyuxing205@gmail.com———————————————————————————————————————

     

     

    一.lcd简介:

           LCD(Liquid Crystal Display的简称)液晶显示器。

           LCD 的构造是在两片平行的玻璃基板当中放置液晶盒,下基板玻璃上设置TFT(薄膜晶体管),上基板玻璃上设置彩色滤光片,通过TFT上的信号与电压改变来控制液晶分子的转动方向,从而达到控制每个像素点偏振光出射与否而达到显示目的。现在LCD已经替代CRT成为主流,价格也已经下降了很多,并已充分的普及。

    二.修改内核代码

    [leiyuxing@centos6 linux-3.0]$ vim arch/arm/mach-s3c2440/mach-smdk2440.c   162 static struct s3c2410fb_display smdk2440_lcd_cfg __initdata = { 163 164 .lcdcon5 = S3C2410_LCDCON5_FRM565 | 165 S3C2410_LCDCON5_INVVLINE | 166 S3C2410_LCDCON5_INVVFRAME | 167 S3C2410_LCDCON5_PWREN | 168 S3C2410_LCDCON5_HWSWP, 169 170 .type = S3C2410_LCDCON1_TFT, 171 172 .width = 480,//modify by leiyuxing 173 .height = 272,//modify by leiyuxing 174 175 .pixclock = 4000, /* HCLK 60 MHz, divisor 10 */ //modify by leiyuxing 176 .xres = 480,//modify by leiyuxing 177 .yres = 272,//modify by leiyuxing 178 .bpp = 16,//modify by leiyuxing 179 .left_margin = 19,//modify by leiyuxing 180 .right_margin = 10,//modify by leiyuxing 181 .hsync_len = 30,//modify by leiyuxing 182 .upper_margin = 4,//modify by leiyuxing 183 .lower_margin = 2,//modify by leiyuxing 184 .vsync_len = 8,//modify by leiyuxing 185 }; ...... 204 .lpcsel = 0,//((0xCE6) & ~7) | 1<<4,//modify by leiyuxing

    三.配置内核文件

    [leiyuxing@centos6 linux-3.0]$make menuconfig Device Drivers  ---> Graphics (图像)support  --->              <*> Support for frame buffer devices  --->                            [*]   Enable firmware EDID                            [*]   Enable Video Mode Handling Helpers                            <*>   S3C2410 LCD framebuffer support              [*] Backlight & LCD device support  --->                           <M>   Lowlevel LCD controls                           <M>   Lowlevel Backlight controls                           <M>     Generic (aka Sharp Corgi) Backlight Driver                                         Console display driver support  --->                                                      <*> Framebuffer Console support                                                      [*]   Map the console to the primary display device                                                      [*]   Framebuffer Console Rotation                                                      [*] Select compiled-in fonts                                                      [*]   VGA 8x8 font                                                      [*]   Mini 4x6 font                                     [*] Bootup logo  --->                                                      [*]   Standard 224-color Linux logo

    这样就配置完了,然后

    [leiyuxing@centos6 linux-3.0]$ make

    如果要想在开发板的屏幕上看到你启动的代码,则因修改如下环境变量

    set bootargs 'console=ttyS0 console=tty1,115200 mem=64M ubi.mtd=2 root=ubi0:rootfs rootwait rootfstype=ubifs rw' set bootargs_ubifs 'console=ttyS0 console=tty1,115200 mem=64M ubi.mtd=2 root=ubi0:rootfs rootwait rootfstype=ubifs rw'

    启动Linux内核,可以看到small penguin. 

     

     

     

     

     

     

     

    转载请注明原文地址: https://ju.6miu.com/read-1301904.html
    最新回复(0)