From fca13cf24f4a7be15747d92e4622d5e3749f80ef Mon Sep 17 00:00:00 2001 From: Ye Li Date: Tue, 17 Jul 2018 20:29:41 -0700 Subject: 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 --- board/freescale/mx7ulp_evk/mx7ulp_evk.c | 20 ++++++++++++++++++++ configs/mx7ulp_evk_defconfig | 1 + include/configs/mx7ulp_evk.h | 1 - 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/board/freescale/mx7ulp_evk/mx7ulp_evk.c b/board/freescale/mx7ulp_evk/mx7ulp_evk.c index ca377bf439..e1f5caa9e7 100644 --- a/board/freescale/mx7ulp_evk/mx7ulp_evk.c +++ b/board/freescale/mx7ulp_evk/mx7ulp_evk.c @@ -14,6 +14,9 @@ #include #include #include +#include +#include +#include #ifdef CONFIG_FSL_FASTBOOT #include @@ -134,6 +137,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); @@ -163,6 +174,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 8e81ab85d0..e480697c0c 100644 --- a/configs/mx7ulp_evk_defconfig +++ b/configs/mx7ulp_evk_defconfig @@ -41,3 +41,4 @@ CONFIG_USB_EHCI_HCD=y CONFIG_MXC_USB_OTG_HACTIVE=y CONFIG_USB_STORAGE=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 faac54ac81..b46a70c31d 100644 --- a/include/configs/mx7ulp_evk.h +++ b/include/configs/mx7ulp_evk.h @@ -257,7 +257,6 @@ #define CONFIG_VIDEO_BMP_LOGO #define CONFIG_IMX_VIDEO_SKIP -#define CONFIG_MXC_MIPI_DSI_NORTHWEST #define CONFIG_HX8363 #endif -- cgit v1.2.3