diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2014-09-22 13:55:52 -0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2014-10-21 14:04:39 +0200 |
commit | 510922ac61067a969dd5f53ce83b1de63e052002 (patch) | |
tree | db9a305de893610575add5567fdd4c76bf520e8b /board | |
parent | 257d5614f49c2afd8a4045718b654c662371693a (diff) | |
download | u-boot-imx-510922ac61067a969dd5f53ce83b1de63e052002.zip u-boot-imx-510922ac61067a969dd5f53ce83b1de63e052002.tar.gz u-boot-imx-510922ac61067a969dd5f53ce83b1de63e052002.tar.bz2 |
mx6qsabreauto: Add HDMI support
Let HDMI splash screen support work by default.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/freescale/mx6qsabreauto/mx6qsabreauto.c | 60 |
1 files changed, 59 insertions, 1 deletions
diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c index 9ab502f..0dc0160 100644 --- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c +++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c @@ -24,6 +24,9 @@ #include <netdev.h> #include <asm/arch/sys_proto.h> #include <i2c.h> +#include <asm/arch/mxc_hdmi.h> +#include <asm/imx-common/video.h> +#include <asm/arch/crm_regs.h> DECLARE_GLOBAL_DATA_PTR; @@ -235,10 +238,65 @@ u32 get_board_rev(void) return (get_cpu_rev() & ~(0xF << 8)) | rev; } +#if defined(CONFIG_VIDEO_IPUV3) +static void do_enable_hdmi(struct display_info_t const *dev) +{ + imx_enable_hdmi_phy(); +} + +struct display_info_t const displays[] = {{ + .bus = -1, + .addr = 0, + .pixfmt = IPU_PIX_FMT_RGB24, + .detect = detect_hdmi, + .enable = do_enable_hdmi, + .mode = { + .name = "HDMI", + .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, +} } }; +size_t display_count = ARRAY_SIZE(displays); + +static void setup_display(void) +{ + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; + int reg; + + enable_ipu_clock(); + imx_setup_hdmi(); + + reg = readl(&mxc_ccm->chsccdr); + reg |= (CHSCCDR_CLK_SEL_LDB_DI0 + << MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET); + writel(reg, &mxc_ccm->chsccdr); +} +#endif /* CONFIG_VIDEO_IPUV3 */ + +/* + * Do not overwrite the console + * Use always serial for U-Boot console + */ +int overwrite_console(void) +{ + return 1; +} + int board_early_init_f(void) { setup_iomux_uart(); - +#ifdef CONFIG_VIDEO_IPUV3 + setup_display(); +#endif return 0; } |