这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 综合技术 » 基础知识 » SALI-IMX6Q的uboot启动时默认选择LCD屏幕显示

共2条 1/1 1 跳转至

SALI-IMX6Q的uboot启动时默认选择LCD屏幕显示

菜鸟
2019-11-01 14:44:46     打赏

SALI-IMX6Q的uboot启动时默认选择LCD屏幕显示


在uboot启动时默认选择LCD屏幕显示这个问题我一直在想如何去实现,在经过不断地实验过后,我找到了解决办法,我是以电鱼电子公司SALI-IMX6Q开发板为例下面就分享给有需要的朋友们吧!


修改/uboot/board/freescale/mx6sabresd/mx6sabresd.c文件,如图所示:

 

修改如下部分:

struct display_info_t const displays[] = {{

       .bus = -1,

       .addr      = 0,

       .pixfmt    = IPU_PIX_FMT_RGB24,

       .detect    = NULL,

       .enable   = enable_lvds,

       .mode     = {

              .name           = "Hannstar-XGA",

              .refresh        = 60,

              .xres           = 1920,

              .yres           = 1080,

              .pixclock       = 6734,

              .left_margin    = 90,

              .right_margin   = 50,

              .upper_margin   = 30,

              .lower_margin   = 6,

              .hsync_len      = 24,

              .vsync_len      = 3,

              .sync           = FB_SYNC_EXT,

              .vmode          = FB_VMODE_NONINTERLACED

} }, {

       .bus = -1,

       .addr      = 0,

       .pixfmt    = IPU_PIX_FMT_RGB24,

       .detect    = NULL,

       .enable   = do_enable_hdmi,

       .mode     = {

              .name           = "HDMI",

              .refresh        = 60,

              .xres           = 640,

              .yres           = 480,

              .pixclock       = 39721,

              .left_margin    = 48,

              .right_margin   = 16,

              .upper_margin   = 33,

              .lower_margin   = 10,

              .hsync_len      = 96,

              .vsync_len      = 2,

              .sync           = 0,

              .vmode          = FB_VMODE_NONINTERLACED

} }, {

       .bus = 0,

       .addr      = 0,

       .pixfmt    = IPU_PIX_FMT_RGB24,

       .detect    = NULL,

       .enable   = enable_rgb,

       .mode     = {

              .name           = "SEIKO-WVGA",

              .refresh        = 60,

              .xres           = 800,

              .yres           = 480,

              .pixclock       = 29850,

              .left_margin    = 89,

              .right_margin   = 164,

              .upper_margin   = 23,

              .lower_margin   = 10,

              .hsync_len      = 10,

              .vsync_len      = 10,

              .sync           = 0,

              .vmode          = FB_VMODE_NONINTERLACED

} } };

size_t display_count = ARRAY_SIZE(displays);

 

修改完成后如下图所示:

 

struct display_info_t const displays[] = {{

       .bus = 0,

       .addr      = 0,

       .pixfmt    = IPU_PIX_FMT_RGB24,

       .detect    = NULL,

       .enable   = enable_rgb,

       .mode     = {

              .name           = "CLAA-WVGA",

              .refresh        = 57,

              .xres           = 800,

              .yres           = 480,

              .pixclock       = 37037,

              .left_margin    = 40,

              .right_margin   = 60,

              .upper_margin   = 10,

              .lower_margin   = 10,

              .hsync_len      = 20,

              .vsync_len      = 10,

              .sync           = 0,

              .vmode          = FB_VMODE_NONINTERLACED

} },{

       .bus = -1,

       .addr      = 0,

       .pixfmt    = IPU_PIX_FMT_RGB666,

       .detect    = NULL,

       .enable   = enable_lvds,

       .mode     = {

              .name           = "Hannstar-XGA",

              .refresh        = 60,

              .xres           = 1024,

              .yres           = 768,

              .pixclock       = 15385,

              .left_margin    = 220,

              .right_margin   = 40,

              .upper_margin   = 21,

              .lower_margin   = 7,

              .hsync_len      = 60,

              .vsync_len      = 10,

              .sync           = FB_SYNC_EXT,

              .vmode          = FB_VMODE_NONINTERLACED

} }, {

       .bus = -1,

       .addr      = 0,

       .pixfmt    = IPU_PIX_FMT_RGB24,

       .detect    = NULL,

       .enable   = do_enable_hdmi,

       .mode     = {

              .name           = "HDMI",

              .refresh        = 60,

              .xres           = 640,

              .yres           = 480,

              .pixclock       = 39721,

              .left_margin    = 48,

              .right_margin   = 16,

              .upper_margin   = 33,

              .lower_margin   = 10,

              .hsync_len      = 96,

              .vsync_len      = 2,

              .sync           = 0,

              .vmode          = FB_VMODE_NONINTERLACED

} } };

size_t display_count = ARRAY_SIZE(displays);


 这样就实现了我们的目的,被这个问题所困扰的朋友们可以去试试啦,希望能够帮助到大家!





关键词: uboot    

高工
2019-11-01 14:52:19     打赏
2楼

谢谢分享的代码


共2条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]