summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorNikita Kiryanov <nikita@compulab.co.il>2015-01-14 10:42:46 +0200
committerStefano Babic <sbabic@denx.de>2015-01-29 17:42:28 +0100
commitdeb94d6192e7507d743aefa69a86954c0c26be82 (patch)
tree6269562a5ff11d69ebee73173b513e6995146bbe /board
parent9fbdcf018e5f4bf78126c2f6df42d6f5bf91c946 (diff)
downloadu-boot-imx-deb94d6192e7507d743aefa69a86954c0c26be82.zip
u-boot-imx-deb94d6192e7507d743aefa69a86954c0c26be82.tar.gz
u-boot-imx-deb94d6192e7507d743aefa69a86954c0c26be82.tar.bz2
arm: mx6: cm-fx6: add hdmi console support
Add support for hdmi console. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Cc: Stefano Babic <sbabic@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Diffstat (limited to 'board')
-rw-r--r--board/compulab/cm_fx6/cm_fx6.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index eb18dfc..b31e1f5 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -18,8 +18,10 @@
#include <asm/arch/crm_regs.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/iomux.h>
+#include <asm/arch/mxc_hdmi.h>
#include <asm/imx-common/mxc_i2c.h>
#include <asm/imx-common/sata.h>
+#include <asm/imx-common/video.h>
#include <asm/io.h>
#include <asm/gpio.h>
#include <dm/platform_data/serial_mxc.h>
@@ -28,6 +30,53 @@
DECLARE_GLOBAL_DATA_PTR;
+#ifdef CONFIG_IMX_HDMI
+static void cm_fx6_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 = cm_fx6_enable_hdmi,
+ .mode = {
+ .name = "HDMI",
+ .refresh = 60,
+ .xres = 1024,
+ .yres = 768,
+ .pixclock = 40385,
+ .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 cm_fx6_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 = __raw_readl(&mxc_ccm->CCGR3);
+ reg |= MXC_CCM_CCGR3_IPU1_IPU_DI0_MASK;
+ writel(reg, &mxc_ccm->CCGR3);
+}
+#else
+static inline void cm_fx6_setup_display(void) {}
+#endif /* CONFIG_VIDEO_IPUV3 */
+
#ifdef CONFIG_DWC_AHSATA
static int cm_fx6_issd_gpios[] = {
/* The order of the GPIOs in the array is important! */
@@ -516,6 +565,8 @@ int board_init(void)
if (ret)
printf("Warning: I2C setup failed: %d\n", ret);
+ cm_fx6_setup_display();
+
return 0;
}