From 343273569d4d036b9738e5e6005a20367925ed0b Mon Sep 17 00:00:00 2001 From: Ye Li Date: Tue, 17 Jul 2018 20:25:11 -0700 Subject: [PATCH] MLK-18945-4 video: mxsfb: Update LCDIF driver to use dsi bridge Remove the functions for northwest driver and HX8363 driver, change to use mipi dsi bridge interfaces. The mipi_dsi_northwest driver setup and hx8363 init will move to board level codes. Signed-off-by: Ye Li (cherry picked from commit 0b8dc73e42ade9f44a3bbcf3662898772434988d) (cherry picked from commit 13b169618402876c3fffa786701c796c38bc0f6a) --- drivers/video/mxsfb.c | 43 +++++++------------------------------------ 1 file changed, 7 insertions(+), 36 deletions(-) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index a4dc043c16..8cc7664351 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -29,8 +29,8 @@ #include #endif -#ifdef CONFIG_MXC_MIPI_DSI_NORTHWEST -#include +#ifdef CONFIG_IMX_MIPI_DSI_BRIDGE +#include #endif #define PS2KHZ(ps) (1000000000UL / (ps)) @@ -182,8 +182,8 @@ void lcdif_power_down(void) if (!panel.frameAdrs) return; -#ifdef CONFIG_MXC_MIPI_DSI_NORTHWEST - mipi_dsi_northwest_shutdown(); +#ifdef CONFIG_IMX_MIPI_DSI_BRIDGE + imx_mipi_dsi_bridge_disable(); #endif writel(panel.frameAdrs, ®s->hw_lcdif_cur_buf_reg); @@ -286,40 +286,11 @@ void *video_hw_init(void) printf("%s\n", panel.modeIdent); -#ifdef CONFIG_MXC_MIPI_DSI_NORTHWEST - struct mipi_dsi_northwest_panel_device *pdevice; - - /* Setup DSI host driver */ - mipi_dsi_northwest_setup(DSI_RBASE, SIM0_RBASE); - -#ifdef CONFIG_HX8363 - /* Setup hx8363 panel driver */ - hx8363_init(); -#endif - - pdevice = (struct mipi_dsi_northwest_panel_device *)malloc(sizeof(struct mipi_dsi_northwest_panel_device)); - if (!pdevice) { - printf("Error allocating MIPI panel device!\n"); - free(fb); - return NULL; - } - - /* Using the panel parameters to create a DSI panel device */ - pdevice->bpp = bpp; - pdevice->data_lane_num = 2; - pdevice->mode = fbmode; - pdevice->name = fbmode.name; - pdevice->virtual_ch_id = 0; - pdevice->host = NULL; - - /* Register a panel device */ - mipi_dsi_northwest_register_panel_device(pdevice); - - /* Enable the MIPI DSI host to work */ - mipi_dsi_northwest_enable(); +#ifdef CONFIG_IMX_MIPI_DSI_BRIDGE + imx_mipi_dsi_bridge_mode_set(&fbmode); + imx_mipi_dsi_bridge_enable(); #endif - /* Start framebuffer */ mxs_lcd_init(&panel, &mode, bpp); -- 2.17.1