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 52b9b0f1ce
commit 069b605424
4 changed files with 10 additions and 10 deletions

View File

@ -9,6 +9,7 @@ CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_CMD_HDMIDETECT=y
CONFIG_NXP_BOARD_REVISION=y
CONFIG_NR_DRAM_BANKS=1
# CONFIG_SYS_MALLOC_F is not set

View File

@ -9,6 +9,7 @@ CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_CMD_HDMIDETECT=y
CONFIG_NR_DRAM_BANKS=1
# CONFIG_SYS_MALLOC_F is not set
CONFIG_FIT=y

View File

@ -48,13 +48,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" \
@ -94,7 +96,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

@ -18,9 +18,6 @@
#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
#define VIDEO_ARGS "${video_args}"
#define VIDEO_ARGS_SCRIPT "run video_args_script; "
#include "mx6sabre_common.h"
/* Falcon Mode */