diff options
author | Ye Li <ye.li@nxp.com> | 2017-02-15 17:45:17 +0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2017-02-16 10:06:15 +0800 |
commit | 49cb68f5c17e42f9290336e1252ace6ac7d0b5ce (patch) | |
tree | d757709afffb57931baffc06740a598a7a6e0417 | |
parent | a783799017a929f9918c9c5981fe3a7a25cd8125 (diff) | |
download | u-boot-imx-49cb68f5c17e42f9290336e1252ace6ac7d0b5ce.zip u-boot-imx-49cb68f5c17e42f9290336e1252ace6ac7d0b5ce.tar.gz u-boot-imx-49cb68f5c17e42f9290336e1252ace6ac7d0b5ce.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>
-rw-r--r-- | arch/arm/imx-common/Makefile | 3 | ||||
-rw-r--r-- | board/freescale/mx7ulp_evk/mx7ulp_evk.c | 71 | ||||
-rw-r--r-- | include/configs/mx7ulp_evk.h | 21 |
3 files changed, 93 insertions, 2 deletions
diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile index d9d73a3..9fbf7d3 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 76d2ca2..41f6cd6 100644 --- a/board/freescale/mx7ulp_evk/mx7ulp_evk.c +++ b/board/freescale/mx7ulp_evk/mx7ulp_evk.c @@ -14,6 +14,7 @@ #include <fsl_esdhc.h> #include <mmc.h> #include <usb.h> +#include <asm/imx-common/video.h> #ifdef CONFIG_FSL_FASTBOOT #include <fastboot.h> @@ -40,6 +41,8 @@ DECLARE_GLOBAL_DATA_PTR; #define QSPI_PAD_CTRL0 (PAD_CTL_PUS_UP | PAD_CTL_DSE \ | PAD_CTL_OBE_ENABLE) +#define MIPI_GPIO_PAD_CTRL (PAD_CTL_OBE_ENABLE) + int dram_init(void) { gd->ram_size = PHYS_SDRAM_SIZE; @@ -175,6 +178,73 @@ int board_qspi_init(void) } #endif +#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 */ @@ -273,7 +343,6 @@ int board_mmc_get_env_dev(int devno) } #endif - int board_late_init(void) { #ifdef CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/mx7ulp_evk.h b/include/configs/mx7ulp_evk.h index e58afdc..1d1570e 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. * @@ -292,6 +293,26 @@ #define CONFIG_QSPI_MEMMAP_BASE QSPI0_AMBA_BASE #endif +#define CONFIG_VIDEO +#ifdef CONFIG_VIDEO +#define CONFIG_CFB_CONSOLE +#define CONFIG_VIDEO_MXS +#define CONFIG_VIDEO_LOGO +#define CONFIG_VIDEO_SW_CURSOR +#define CONFIG_VGA_AS_SINGLE_DEVICE +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#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 #if defined(CONFIG_ANDROID_SUPPORT) #include "mx7ulp_evk_android.h" |