diff options
author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-08-17 18:24:13 +0200 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-08-17 18:24:13 +0200 |
commit | 9ed887caecb9ecb0c68773a1870d143b9f28d3da (patch) | |
tree | 08c0259674f532de0d272740e4b7dcd778132fe0 /board/freescale/mx6sabresd/mx6sabresd.c | |
parent | 425faf74cd8189c87919f7e72a0101c684ee3b9f (diff) | |
parent | 326ea986ac150acdc7656d57fca647db80b50158 (diff) | |
download | u-boot-imx-9ed887caecb9ecb0c68773a1870d143b9f28d3da.zip u-boot-imx-9ed887caecb9ecb0c68773a1870d143b9f28d3da.tar.gz u-boot-imx-9ed887caecb9ecb0c68773a1870d143b9f28d3da.tar.bz2 |
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Diffstat (limited to 'board/freescale/mx6sabresd/mx6sabresd.c')
-rw-r--r-- | board/freescale/mx6sabresd/mx6sabresd.c | 64 |
1 files changed, 63 insertions, 1 deletions
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index 936f029..5db516d 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -18,7 +18,12 @@ #include <fsl_esdhc.h> #include <miiphy.h> #include <netdev.h> - +#include <asm/arch/mxc_hdmi.h> +#include <asm/arch/crm_regs.h> +#include <linux/fb.h> +#include <ipu_pixfmt.h> +#include <asm/io.h> +#include <asm/arch/sys_proto.h> DECLARE_GLOBAL_DATA_PTR; #define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ @@ -228,6 +233,60 @@ int board_phy_config(struct phy_device *phydev) return 0; } +#if defined(CONFIG_VIDEO_IPUV3) +static struct fb_videomode const hdmi = { + .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 +}; + +int board_video_skip(void) +{ + int ret; + + ret = ipuv3_fb_init(&hdmi, 0, IPU_PIX_FMT_RGB24); + + if (ret) + printf("HDMI cannot be configured: %d\n", ret); + + imx_enable_hdmi_phy(); + return ret; +} + +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_eth_init(bd_t *bis) { int ret; @@ -244,6 +303,9 @@ int board_eth_init(bd_t *bis) int board_early_init_f(void) { setup_iomux_uart(); +#if defined(CONFIG_VIDEO_IPUV3) + setup_display(); +#endif return 0; } |