diff options
author | Ye Li <ye.li@nxp.com> | 2018-07-17 20:29:41 -0700 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2018-07-19 21:01:38 -0700 |
commit | 3005907903a4bdcfe69dd38b84d8627e15172a0e (patch) | |
tree | c37783965a455dab13ebf215b9a03b07f73c7b04 | |
parent | 13b169618402876c3fffa786701c796c38bc0f6a (diff) |
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 <ye.li@nxp.com>
(cherry picked from commit fca13cf24f4a7be15747d92e4622d5e3749f80ef)
-rw-r--r-- | board/freescale/mx7ulp_evk/mx7ulp_evk.c | 20 | ||||
-rw-r--r-- | configs/mx7ulp_evk_defconfig | 1 | ||||
-rw-r--r-- | include/configs/mx7ulp_evk.h | 1 |
3 files changed, 21 insertions, 1 deletions
diff --git a/board/freescale/mx7ulp_evk/mx7ulp_evk.c b/board/freescale/mx7ulp_evk/mx7ulp_evk.c index 1710cf45c0f..cc630ea22a6 100644 --- a/board/freescale/mx7ulp_evk/mx7ulp_evk.c +++ b/board/freescale/mx7ulp_evk/mx7ulp_evk.c @@ -13,6 +13,9 @@ #include <usb.h> #include <dm.h> #include <asm/mach-imx/video.h> +#include <mipi_dsi_northwest.h> +#include <imx_mipi_dsi_bridge.h> +#include <mipi_dsi_panel.h> #ifdef CONFIG_FSL_FASTBOOT #include <fastboot.h> @@ -133,6 +136,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); @@ -162,6 +173,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 49bb315f721..b5eb12e8d07 100644 --- a/configs/mx7ulp_evk_defconfig +++ b/configs/mx7ulp_evk_defconfig @@ -47,3 +47,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 e71eacfcbdd..b447f62c2da 100644 --- a/include/configs/mx7ulp_evk.h +++ b/include/configs/mx7ulp_evk.h @@ -239,7 +239,6 @@ #define CONFIG_VIDEO_BMP_LOGO #define CONFIG_IMX_VIDEO_SKIP -#define CONFIG_MXC_MIPI_DSI_NORTHWEST #define CONFIG_HX8363 #endif |