From e6f1b0acd88f2ec41ba920caaa0f9092f1bc9c70 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Tue, 17 Jul 2018 20:29:41 -0700 Subject: [PATCH] MLK-18945-5 mx7ulp_evk: Update board codes for mipi display Setup the mipi_dsi_northwest driver and register a the HX8363 panel device to mipi dsi bridge in board codes. Signed-off-by: Ye Li (cherry picked from commit fca13cf24f4a7be15747d92e4622d5e3749f80ef) (cherry picked from commit 3005907903a4bdcfe69dd38b84d8627e15172a0e) --- board/freescale/mx7ulp_evk/mx7ulp_evk.c | 20 ++++++++++++++++++++ configs/mx7ulp_evk_defconfig | 1 + configs/mx7ulp_evk_emmc_defconfig | 1 + configs/mx7ulp_evk_m4boot_defconfig | 1 + configs/mx7ulp_evk_plugin_defconfig | 1 + include/configs/mx7ulp_evk.h | 1 - 6 files changed, 24 insertions(+), 1 deletion(-) diff --git a/board/freescale/mx7ulp_evk/mx7ulp_evk.c b/board/freescale/mx7ulp_evk/mx7ulp_evk.c index 840dbb84e0..ee6a898a56 100644 --- a/board/freescale/mx7ulp_evk/mx7ulp_evk.c +++ b/board/freescale/mx7ulp_evk/mx7ulp_evk.c @@ -12,6 +12,9 @@ #include #include #include +#include +#include +#include DECLARE_GLOBAL_DATA_PTR; @@ -124,6 +127,14 @@ static iomux_cfg_t const led_pwm_en_pad[] = { MX7ULP_PAD_PTF2__PTF2 | MUX_PAD_CTRL(MIPI_GPIO_PAD_CTRL), }; +struct mipi_dsi_client_dev hx8363_dev = { + .channel = 0, + .lanes = 2, + .format = MIPI_DSI_FMT_RGB888, + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | + MIPI_DSI_MODE_EOT_PACKET | MIPI_DSI_MODE_VIDEO_HSE, +}; + int board_mipi_panel_reset(void) { gpio_direction_output(MIPI_RESET_GPIO, 0); @@ -153,6 +164,15 @@ void do_enable_mipi_dsi(struct display_info_t const *dev) 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); + + /* Setup DSI host driver */ + mipi_dsi_northwest_setup(DSI_RBASE, SIM0_RBASE); + + /* Init hx8363 driver, must after dsi host driver setup */ + hx8363_init(); + hx8363_dev.name = displays[0].mode.name; + imx_mipi_dsi_bridge_attach(&hx8363_dev); /* attach hx8363 device */ + } struct display_info_t const displays[] = {{ diff --git a/configs/mx7ulp_evk_defconfig b/configs/mx7ulp_evk_defconfig index 25cd9aa9da..b053612314 100644 --- a/configs/mx7ulp_evk_defconfig +++ b/configs/mx7ulp_evk_defconfig @@ -56,3 +56,4 @@ CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_RTL8152=y CONFIG_VIDEO=y +CONFIG_IMX_NORTHWEST_MIPI_DSI=y diff --git a/configs/mx7ulp_evk_emmc_defconfig b/configs/mx7ulp_evk_emmc_defconfig index 14504e4888..67e0789de8 100644 --- a/configs/mx7ulp_evk_emmc_defconfig +++ b/configs/mx7ulp_evk_emmc_defconfig @@ -54,3 +54,4 @@ CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_RTL8152=y CONFIG_VIDEO=y +CONFIG_IMX_NORTHWEST_MIPI_DSI=y diff --git a/configs/mx7ulp_evk_m4boot_defconfig b/configs/mx7ulp_evk_m4boot_defconfig index 5a45b09b21..a11f833191 100644 --- a/configs/mx7ulp_evk_m4boot_defconfig +++ b/configs/mx7ulp_evk_m4boot_defconfig @@ -56,4 +56,5 @@ CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_RTL8152=y CONFIG_VIDEO=y +CONFIG_IMX_NORTHWEST_MIPI_DSI=y CONFIG_IMX_M4_BIND=y diff --git a/configs/mx7ulp_evk_plugin_defconfig b/configs/mx7ulp_evk_plugin_defconfig index 91f8ce55e0..b4da176355 100644 --- a/configs/mx7ulp_evk_plugin_defconfig +++ b/configs/mx7ulp_evk_plugin_defconfig @@ -56,3 +56,4 @@ CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_RTL8152=y CONFIG_VIDEO=y +CONFIG_IMX_NORTHWEST_MIPI_DSI=y diff --git a/include/configs/mx7ulp_evk.h b/include/configs/mx7ulp_evk.h index 2f4fd90fc0..94537c548b 100644 --- a/include/configs/mx7ulp_evk.h +++ b/include/configs/mx7ulp_evk.h @@ -196,7 +196,6 @@ #define CONFIG_VIDEO_BMP_LOGO #define CONFIG_IMX_VIDEO_SKIP -#define CONFIG_MXC_MIPI_DSI_NORTHWEST #define CONFIG_HX8363 #endif -- 2.17.1