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

uboot 下S3C6410 的LCD 显示

时间:11-11 来源:互联网 点击:

MODE_MASK (0xf < 2)

#define WINCON2_BPPMODE_SHIFT (2)

#define WINCON2_BPPMODE_1BPP (0x0 < 2)

#define WINCON2_BPPMODE_2BPP (0x1 < 2)

#define WINCON2_BPPMODE_4BPP (0x2 < 2)

#define WINCON2_BPPMODE_8BPP_1232 (0x4 < 2)

#define WINCON2_BPPMODE_16BPP_565 (0x5 < 2)

#define WINCON2_BPPMODE_16BPP_A1555 (0x6 < 2)

#define WINCON2_BPPMODE_16BPP_I1555 (0x7 < 2)

#define WINCON2_BPPMODE_18BPP_666 (0x8 < 2)

#define WINCON2_BPPMODE_18BPP_A1665 (0x9 < 2)

#define WINCON2_BPPMODE_19BPP_A1666 (0xa < 2)

#define WINCON2_BPPMODE_24BPP_888 (0xb < 2)

#define WINCON2_BPPMODE_24BPP_A1887 (0xc < 2)

#define WINCON2_BPPMODE_25BPP_A1888 (0xd < 2)

#define WINCON2_BPPMODE_28BPP_A4888 (0xd < 2)

#define WINCON3_BLD_PIX (1 < 6)

#define WINCON3_ALPHA_SEL (1 < 1)

#define WINCON3_BPPMODE_MASK (0xf < 2)

#define WINCON3_BPPMODE_SHIFT (2)

#define WINCON3_BPPMODE_1BPP (0x0 < 2)

#define WINCON3_BPPMODE_2BPP (0x1 < 2)

#define WINCON3_BPPMODE_4BPP (0x2 < 2)

#define WINCON3_BPPMODE_16BPP_565 (0x5 < 2)

#define WINCON3_BPPMODE_16BPP_A1555 (0x6 < 2)

#define WINCON3_BPPMODE_16BPP_I1555 (0x7 < 2)

#define WINCON3_BPPMODE_18BPP_666 (0x8 < 2)

#define WINCON3_BPPMODE_18BPP_A1665 (0x9 < 2)

#define WINCON3_BPPMODE_19BPP_A1666 (0xa < 2)

#define WINCON3_BPPMODE_24BPP_888 (0xb < 2)

#define WINCON3_BPPMODE_24BPP_A1887 (0xc < 2)

#define WINCON3_BPPMODE_25BPP_A1888 (0xd < 2)

#define WINCON3_BPPMODE_28BPP_A4888 (0xd < 2)

#define VIDINTCON0_FIFIOSEL_WINDOW2 (0x10 < 5)

#define VIDINTCON0_FIFIOSEL_WINDOW3 (0x20 < 5)

#define VIDINTCON0_FIFIOSEL_WINDOW4 (0x40 < 5)

//#define DITHMODE (0x170)

#define WINxMAP(_win) (0x180 + ((_win) * 4))

#define DITHMODE_R_POS_MASK (0x3 < 5)

#define DITHMODE_R_POS_SHIFT (5)

#define DITHMODE_R_POS_8BIT (0x0 < 5)

#define DITHMODE_R_POS_6BIT (0x1 < 5)

#define DITHMODE_R_POS_5BIT (0x2 < 5)

#define DITHMODE_G_POS_MASK (0x3 < 3)

#define DITHMODE_G_POS_SHIFT (3)

#define DITHMODE_G_POS_8BIT (0x0 < 3)

#define DITHMODE_G_POS_6BIT (0x1 < 3)

#define DITHMODE_G_POS_5BIT (0x2 < 3)

#define DITHMODE_B_POS_MASK (0x3 < 1)

#define DITHMODE_B_POS_SHIFT (1)

#define DITHMODE_B_POS_8BIT (0x0 < 1)

#define DITHMODE_B_POS_6BIT (0x1 < 1)

#define DITHMODE_B_POS_5BIT (0x2 < 1)

#define DITHMODE_DITH_EN (1 < 0)

//#define WPALCON (0x1A0)

/* Palette control */

/* Note for S5PC100: you can still use those macros on WPALCON (aka WPALCON_L),

* but make sure that WPALCON_H W2PAL-W4PAL entries are zeroed out */

#define WPALCON_W4PAL_16BPP_A555 (1 < 8)

#define WPALCON_W3PAL_16BPP_A555 (1 < 7)

#define WPALCON_W2PAL_16BPP_A555 (1 < 6)

4、修改driver/video/videomodes.c,添加相应分辨率

const struct ctfb_vesa_modes vesa_modes[VESA_MODES_COUNT]添加如下成员

{0x31B, RES_MODE_1280x1024, 24},

{0x211, RES_MODE_240x320, 16},

{0x212, RES_MODE_480x272, 16},

{0x213, RES_MODE_800x480, 16},

const struct ctfb_res_modes res_mode_init[RES_MODES_COUNT]添加成员函数

{240, 320, 90000, 1, 4, 1, 1, 30, 4, 0, FB_VMODE_NONINTERLACED},

{480, 272, 75000, 2, 3, 1, 1, 40, 1, 0, FB_VMODE_NONINTERLACED},

{800, 480, 50000, 2, 2, 2, 2, 41, 4, 0, FB_VMODE_NONINTERLACED},

5、修改driver/video/videomodes.h

修改#define CONFIG_SYS_DEFAULT_VIDEO_MODE 0x212//0x301

添加:

#define RES_MODE_240x320 6

#define RES_MODE_480x272 7

#define RES_MODE_800x480 8

#define RES_MODES_COUNT 9

修改:#define VESA_MODES_COUNT 22//19

6、include/asm-arm/s3c6400.h

添加

#define ELFIN_FB_BASE 0x77100000

#define LCD_SEL 0

#define LCD_SEL_MASK 0x03

static inline s3c64xx_fb *s3c64xx_get_base_fb(void)

{

return (s3c64xx_fb *)(ELFIN_FB_BASE);

}

7、include/asm-arm/s3c64x0.h

添加:

typedef struct {

volatile u32 VIDCON0;

volatile u32 VIDCON1;

volatile u32 VIDCON2;

volatile u8 res1[4];

volatile u32 VIDTCON0;

volati

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

网站地图

Top