mx6sabre_common: Dynamically change the video output

Use the 'hdmidetect' command in U-boot to load the appropriate
video arguments. If HDMI is connected during boot then make HDMI
as the primary framebuffer, otherwise let LVDS be the primary framebuffer.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
This commit is contained in:
Fabio Estevam 2015-11-09 14:04:31 -02:00 committed by Otavio Salvador
parent 4bcfe85083
commit d6d0c0e0e8
4 changed files with 10 additions and 10 deletions

View File

@ -14,6 +14,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_SPL=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_CMD_HDMIDETECT=y
CONFIG_NXP_BOARD_REVISION=y
CONFIG_SPL_TEXT_BASE=0x00908000
CONFIG_FIT=y

View File

@ -15,6 +15,7 @@ CONFIG_NR_DRAM_BANKS=1
CONFIG_SPL=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SPL_TEXT_BASE=0x00908000
CONFIG_CMD_HDMIDETECT=y
CONFIG_FIT=y
CONFIG_SPL_FIT_PRINT=y
CONFIG_SPL_LOAD_FIT=y

View File

@ -40,13 +40,15 @@
#define EMMC_ENV ""
#endif
#ifndef VIDEO_ARGS
#define VIDEO_ARGS ""
#endif
#define VIDEO_ARGS "${video_args}"
#define VIDEO_ARGS_SCRIPT "run video_args_script; "
#ifndef VIDEO_ARGS_SCRIPT
#define VIDEO_ARGS_SCRIPT ""
#endif
#define CONFIG_PREBOOT \
"if hdmidet; then " \
"setenv video_interfaces hdmi lvds; " \
"else " \
"setenv video_interfaces lvds hdmi; " \
"fi;"
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
@ -87,7 +89,6 @@
"video_args_lcd=setenv video_args $video_args " \
"video=mxcfb${fb}:dev=lcd,CLAA-WVGA,if=RGB666\0" \
"fb=0\0" \
"video_interfaces=hdmi lvds lcd\0" \
"video_args_script=" \
"for v in ${video_interfaces}; do " \
"run video_args_${v}; " \

View File

@ -16,9 +16,6 @@
#define CONFIG_MXC_UART_BASE UART1_BASE
#define CONSOLE_DEV "ttymxc0"
#define VIDEO_ARGS "${video_args}"
#define VIDEO_ARGS_SCRIPT "run video_args_script; "
#include "mx6sabre_common.h"
/* Falcon Mode */