summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2017-02-15 17:45:17 +0800
committerYe Li <ye.li@nxp.com>2017-04-05 17:24:35 +0800
commitbe3d3d5c140a1617c1ce35e8657f2d45bc8c70eb (patch)
tree750bfe36238116f16eceba048b2160b77376aadb
parentfce3f6e59f6ae5a171bbb6581420712c4aaa14c3 (diff)
downloadu-boot-imx-be3d3d5c140a1617c1ce35e8657f2d45bc8c70eb.zip
u-boot-imx-be3d3d5c140a1617c1ce35e8657f2d45bc8c70eb.tar.gz
u-boot-imx-be3d3d5c140a1617c1ce35e8657f2d45bc8c70eb.tar.bz2
MLK-13929-6 mx7ulp_evk: Enable the MIPI DSI splashscreen
Enable and setup board level codes for MIPI DSI splashscreen on EVK board. User needs set env variable"panel=HX8363_WVGA" for displaying. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 49cb68f5c17e42f9290336e1252ace6ac7d0b5ce)
-rw-r--r--arch/arm/imx-common/Makefile3
-rw-r--r--board/freescale/mx7ulp_evk/mx7ulp_evk.c70
-rw-r--r--configs/mx7ulp_evk_defconfig1
-rw-r--r--include/configs/mx7ulp_evk.h16
4 files changed, 89 insertions, 1 deletions
diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile
index f428d82..d862258 100644
--- a/arch/arm/imx-common/Makefile
+++ b/arch/arm/imx-common/Makefile
@@ -17,7 +17,7 @@ endif
ifeq ($(SOC),$(filter $(SOC),mx5))
obj-y += timer.o
endif
-ifeq ($(SOC),$(filter $(SOC),mx7 mx6 mxs))
+ifeq ($(SOC),$(filter $(SOC),mx7 mx6 mxs mx7ulp))
obj-y += misc.o
obj-$(CONFIG_SPL_BUILD) += spl.o
endif
@@ -37,6 +37,7 @@ obj-$(CONFIG_SYSCOUNTER_TIMER) += syscounter.o
endif
ifeq ($(SOC),$(filter $(SOC),mx7ulp))
obj-y += cache.o
+obj-$(CONFIG_IMX_VIDEO_SKIP) += video.o
obj-$(CONFIG_SECURE_BOOT) += hab.o
endif
ifeq ($(SOC),$(filter $(SOC),vf610))
diff --git a/board/freescale/mx7ulp_evk/mx7ulp_evk.c b/board/freescale/mx7ulp_evk/mx7ulp_evk.c
index afad505..4fd4e6d 100644
--- a/board/freescale/mx7ulp_evk/mx7ulp_evk.c
+++ b/board/freescale/mx7ulp_evk/mx7ulp_evk.c
@@ -12,6 +12,7 @@
#include <asm/gpio.h>
#include <usb.h>
#include <dm.h>
+#include <asm/imx-common/video.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -19,6 +20,8 @@ DECLARE_GLOBAL_DATA_PTR;
#define QSPI_PAD_CTRL1 (PAD_CTL_PUS_UP | PAD_CTL_DSE)
#define OTG_ID_GPIO_PAD_CTRL (PAD_CTL_IBE_ENABLE)
+#define MIPI_GPIO_PAD_CTRL (PAD_CTL_OBE_ENABLE)
+
int dram_init(void)
{
gd->ram_size = PHYS_SDRAM_SIZE;
@@ -105,6 +108,73 @@ int board_early_init_f(void)
return 0;
}
+#ifdef CONFIG_VIDEO_MXS
+
+#define MIPI_RESET_GPIO IMX_GPIO_NR(3, 19)
+#define LED_PWM_EN_GPIO IMX_GPIO_NR(6, 2)
+
+static iomux_cfg_t const mipi_reset_pad[] = {
+ MX7ULP_PAD_PTC19__PTC19 | MUX_PAD_CTRL(MIPI_GPIO_PAD_CTRL),
+};
+
+static iomux_cfg_t const led_pwm_en_pad[] = {
+ MX7ULP_PAD_PTF2__PTF2 | MUX_PAD_CTRL(MIPI_GPIO_PAD_CTRL),
+};
+
+int board_mipi_panel_reset(void)
+{
+ gpio_direction_output(MIPI_RESET_GPIO, 0);
+ udelay(1000);
+ gpio_direction_output(MIPI_RESET_GPIO, 1);
+ return 0;
+}
+
+int board_mipi_panel_shutdown(void)
+{
+ gpio_direction_output(MIPI_RESET_GPIO, 0);
+ gpio_direction_output(LED_PWM_EN_GPIO, 0);
+ return 0;
+}
+
+void setup_mipi_reset(void)
+{
+ mx7ulp_iomux_setup_multiple_pads(mipi_reset_pad, ARRAY_SIZE(mipi_reset_pad));
+ gpio_request(MIPI_RESET_GPIO, "mipi_panel_reset");
+}
+
+void do_enable_mipi_dsi(struct display_info_t const *dev)
+{
+ setup_mipi_reset();
+
+ /* Enable backlight */
+ mx7ulp_iomux_setup_multiple_pads(led_pwm_en_pad, ARRAY_SIZE(mipi_reset_pad));
+ gpio_request(LED_PWM_EN_GPIO, "led_pwm_en");
+ gpio_direction_output(LED_PWM_EN_GPIO, 1);
+}
+
+struct display_info_t const displays[] = {{
+ .bus = LCDIF_RBASE,
+ .addr = 0,
+ .pixfmt = 24,
+ .detect = NULL,
+ .enable = do_enable_mipi_dsi,
+ .mode = {
+ .name = "HX8363_WVGA",
+ .xres = 480,
+ .yres = 854,
+ .pixclock = 41042,
+ .left_margin = 40,
+ .right_margin = 60,
+ .upper_margin = 3,
+ .lower_margin = 3,
+ .hsync_len = 8,
+ .vsync_len = 4,
+ .sync = 0,
+ .vmode = FB_VMODE_NONINTERLACED
+} } };
+size_t display_count = ARRAY_SIZE(displays);
+#endif
+
int board_init(void)
{
/* address of boot parameters */
diff --git a/configs/mx7ulp_evk_defconfig b/configs/mx7ulp_evk_defconfig
index d813383..5907de4 100644
--- a/configs/mx7ulp_evk_defconfig
+++ b/configs/mx7ulp_evk_defconfig
@@ -36,3 +36,4 @@ CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_MXC_USB_OTG_HACTIVE=y
CONFIG_USB_STORAGE=y
+CONFIG_VIDEO=y
diff --git a/include/configs/mx7ulp_evk.h b/include/configs/mx7ulp_evk.h
index f30341f..11bdd96 100644
--- a/include/configs/mx7ulp_evk.h
+++ b/include/configs/mx7ulp_evk.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2016 Freescale Semiconductor, Inc.
+ * Copyright 2017 NXP
*
* Configuration settings for the Freescale i.MX7ULP EVK board.
*
@@ -213,6 +214,21 @@
#define CONFIG_USB_ETHER_RTL8152
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
+#ifdef CONFIG_VIDEO
+#define CONFIG_VIDEO_MXS
+#define CONFIG_VIDEO_LOGO
+#define CONFIG_SPLASH_SCREEN
+#define CONFIG_SPLASH_SCREEN_ALIGN
+#define CONFIG_CMD_BMP
+#define CONFIG_BMP_16BPP
+#define CONFIG_VIDEO_BMP_RLE8
+#define CONFIG_VIDEO_BMP_LOGO
+#define CONFIG_IMX_VIDEO_SKIP
+
+#define CONFIG_MXC_MIPI_DSI_NORTHWEST
+#define CONFIG_HX8363
+#endif
+
#define CONFIG_OF_SYSTEM_SETUP
#endif /* __CONFIG_H */