微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > uboot 下S3C6410 的LCD 显示

uboot 下S3C6410 的LCD 显示

时间:11-11 来源:互联网 点击:
cf_console.c中属于框架,基本不用改动,添加lcd,主要是通过video_hw_init()来实现lcd控制器的初始化。

具体工作:

1、smdk6410的修改

#if 1

//enable LCD display

#define CONFIG_CMD_BMP

#define CONFIG_VIDEO

#define CONFIG_VIDEO_S3C64X0

#define CONFIG_VIDEO_LOGO //display Linux Logo in upper left corner

#define VIDEO_FB_16BPP_WORD_SWAP //for BMP logo

#define CONFIG_VIDEO_SW_CURSOR //Draws a cursor after the last character.No blinking is provided.

//#define CONFIG_VIDEO_BMP_LOGO //use bmp_logo instead of linux_logo

//#define CONFIG_CONSOLE_EXTRA_INFO

//#define CONFIG_CONSOLE_CURSOR //on/off drawing cursor is done with delay loop in VIDEO_TSTC_FCT

//#define CONFIG_CONSOLE_TIME

#define CONFIG_CFB_CONSOLE

#define CONFIG_SYS_CONSOLE_IS_IN_ENV

//#define CFG_CONSOLE_INFO_QUIET

//#define VIDEO_FB_LITTLE_ENDIAN

#define CONFIG_SPLASH_SCREEN //enable splash screen support,implicitly enable U-Boot Bitmap Support.

#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (1024*768+1024+100) /* 100 = slack */

#define CONFIG_VIDEO_BMP_GZIP //Gzip compressed BMP image support

#define CONFIG_CMD_UNZIP

#define LCD_VIDEO_ADDR 0x57a00000

#define LCD_VIDEO_BACKGROUND

#if defined(LCD_VIDEO_BACKGROUND)

#define LCD_VIDEO_BACKGROUND_ADDR (0x57600000)

#define LCD_VIDEO_BACKGROUND_LOADADDR (0x57500000)

#define LCD_VIDEO_BACKGROUND_LOADSIZE (0x80000)

#define LCD_VIDEO_BACKGROUND_ALPHA (0xa)

#define LCD_VIDEO_BACKGROUND_IN_NAND

//#define LCD_VIDEO_BACKGROUND_IN_MMC

#define LCD_VIDEO_BACKGROUND_FLASH_ADDR (0x10000000)

#endif

#define CONFIG_SYS_VIDEO_VCLOCK_HZ (133000000)

//RAM_TEXT = 0x57e00000

/*for PC-keyboard*/

#define VIDEO_KBD_INIT_FCT 0

#define VIDEO_TSTC_FCT serial_tstc

#define VIDEO_GETC_FCT serial_getc

#endif /*enable LCD display*/

#define CONFIG_EXTRA_ENV_SETTINGS \ //串口信息输出到lcd上

"stdin=serial\0" \

"stdout=vga\0" \

"stderr=serial\0"

2、include/asm-arm/arch-s3c64xx下建立regs-fb.h

#define VIDCON0_INTERLACE (1 < 29)

#define VIDCON0_VIDOUT_MASK (0x3 < 26)

#define VIDCON0_VIDOUT_SHIFT (26)

#define VIDCON0_VIDOUT_RGB (0x0 < 26)

#define VIDCON0_VIDOUT_TV (0x1 < 26)

#define VIDCON0_VIDOUT_I80_LDI0 (0x2 < 26)

#define VIDCON0_VIDOUT_I80_LDI1 (0x3 < 26)

#define VIDCON0_L1_DATA_MASK (0x7 < 23)

#define VIDCON0_L1_DATA_SHIFT (23)

#define VIDCON0_L1_DATA_16BPP (0x0 < 23)

#define VIDCON0_L1_DATA_18BPP16 (0x1 < 23)

#define VIDCON0_L1_DATA_18BPP9 (0x2 < 23)

#define VIDCON0_L1_DATA_24BPP (0x3 < 23)

#define VIDCON0_L1_DATA_18BPP (0x4 < 23)

#define VIDCON0_L1_DATA_16BPP8 (0x5 < 23)

#define VIDCON0_L0_DATA_MASK (0x7 < 20)

#define VIDCON0_L0_DATA_SHIFT (20)

#define VIDCON0_L0_DATA_16BPP (0x0 < 20)

#define VIDCON0_L0_DATA_18BPP16 (0x1 < 20)

#define VIDCON0_L0_DATA_18BPP9 (0x2 < 20)

#define VIDCON0_L0_DATA_24BPP (0x3 < 20)

#define VIDCON0_L0_DATA_18BPP (0x4 < 20)

#define VIDCON0_L0_DATA_16BPP8 (0x5 < 20)

#define VIDCON0_PNRMODE_MASK (0x3 < 17)

#define VIDCON0_PNRMODE_SHIFT (17)

#define VIDCON0_PNRMODE_RGB (0x0 < 17)

#define VIDCON0_PNRMODE_BGR (0x1 < 17)

#define VIDCON0_PNRMODE_SERIAL_RGB (0x2 < 17)

#define VIDCON0_PNRMODE_SERIAL_BGR (0x3 < 17)

#define VIDCON0_CLKVALUP (1 < 16)

#define VIDCON0_CLKVAL_F_MASK (0xff < 6)

#define VIDCON0_CLKVAL_F_SHIFT (6)

#define VIDCON0_CLKVAL_F_LIMIT (0xff)

#define VIDCON0_CLKVAL_F(_x) ((_x) < 6)

#define VIDCON0_VLCKFREE (1 < 5)

#define VIDCON0_CLKDIR (1 < 4)

#define VIDCON0_CLKSEL_MASK (0x3 < 2)

#define VIDCON0_CLKSEL_SHIFT (2)

#define VIDCON0_CLKSEL_HCLK (0x0 < 2)

#define VIDCON0_CLKSEL_LCD (0x1 < 2)

#define VIDCON0_CLKSEL_27M (0x3 < 2)

#define VIDCON0_ENVID (1 < 1)

#define VIDCON0_ENVID_F (1 < 0)

//#define VIDCON1 (0x04)

#define VIDCON1_LINECNT_MASK

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top