diff --git a/configs/linux-5.4-ansc/sun300iw1p1.dtsi b/configs/linux-5.4-ansc/sun300iw1p1.dtsi
index ab85aa855..eb9bb5d89 100644
--- a/configs/linux-5.4-ansc/sun300iw1p1.dtsi
+++ b/configs/linux-5.4-ansc/sun300iw1p1.dtsi
@@ -1694,6 +1694,7 @@
 			soundcard-mach,codec {
 			};
 		};
+
 		soc_pmu0: soc_pmu0@4A000800 {
 			compatible = "sunxi-soc-pmu,V821";
 			device_type = "sunxi-soc-pmu";
@@ -1708,9 +1709,8 @@
 			};
 		};
 
-		lcd_fb0: lcd_fb0@0 {
-			compatible = "allwinner,sunxi-lcd_fb0";
-			pinctrl-names = "active","sleep";
+		lcd_fb: lcd_fb {
+			compatible = "allwinner,lcd-fb";
 			status = "disabled";
 		};
 
diff --git a/drivers/video/sunxi/Kconfig b/drivers/video/sunxi/Kconfig
index 667ee42f2..84995e433 100644
--- a/drivers/video/sunxi/Kconfig
+++ b/drivers/video/sunxi/Kconfig
@@ -282,42 +282,18 @@ config DISP2_LCD_ESD_DETECT
 	  This enable lcd  esd detect and panel reset for display driver. User must
 	  define panel_reset and esd_check function.
 
-config LCD_FB
-	tristate "Framebuffer implementaion without display hardware of AW"
-#	depends on (ARCH_SUNXI)
-	select FB_CFB_FILLRECT
-	select FB_CFB_COPYAREA
-	select FB_CFB_IMAGEBLIT
-	select BACKLIGHT_CLASS_DEVICE
-	default n
-	help
-	  Framebuffer implementaion for LCD panel without DE and tcon
-
-config LCD_FB_ENABLE_DEFERRED_IO
-	bool "Enable LCD_FB FB_DEFERRED_IO"
-	select FB_DEFERRED_IO
-	default n
-	help
-	  Enable linux framebuffer FB_DEFERRED_IO for LCD_FB
-
 config TV_DECODER_DISPLAY
     tristate "Enable driver of decoder display"
 	default n
 	help
 	  Enable driver of decoder display
 
-menu "LCD panels select"
+menu "LCD Panels select"
 	depends on AW_DISP2
 
 source "$(BSP_TOP)drivers/video/sunxi/disp2/disp/lcd/Kconfig"
 endmenu
 
-menu "LCD fb panels select"
-	depends on LCD_FB
-
-source "$(BSP_TOP)drivers/video/sunxi/lcd_fb/panels/Kconfig"
-endmenu
-
 menu "Display engine feature select"
 	depends on AW_DISP2
 
@@ -337,5 +313,6 @@ config AW_KSC_ENABLE_DMA_HEAP_MEM
 	help
 	  Enable using DMA HEAP memory as internal framebuffer of KSC
 
+source "$(BSP_TOP)drivers/video/sunxi/lcd_fb/Kconfig"
 
 endmenu
diff --git a/drivers/video/sunxi/lcd_fb/Kconfig b/drivers/video/sunxi/lcd_fb/Kconfig
new file mode 100644
index 000000000..c3fd5aa64
--- /dev/null
+++ b/drivers/video/sunxi/lcd_fb/Kconfig
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# SPI LCD Video configuration for sunxi platform
+#
+
+menu "SPI LCD Panel Drivers"
+	depends on FB
+	depends on AW_BSP
+
+config LCD_FB
+	tristate "LCD FB Driver Support (SPI LCD)"
+	depends on (AW_SPI_NG || AW_SPI)
+	select FB_CFB_FILLRECT
+	select FB_CFB_COPYAREA
+	select FB_CFB_IMAGEBLIT
+	select BACKLIGHT_CLASS_DEVICE
+	default n
+	help
+	  Framebuffer implementaion for LCD panel without DE and tcon
+
+config LCD_FB_ENABLE_DEFERRED_IO
+	bool "Enable LCD_FB FB_DEFERRED_IO"
+	depends on LCD_FB
+	select FB_DEFERRED_IO
+	default n
+	help
+	  Enable linux framebuffer FB_DEFERRED_IO for LCD_FB
+
+menu "LCD FB Panels select"
+	depends on LCD_FB
+source "$(BSP_TOP)drivers/video/sunxi/lcd_fb/panels/Kconfig"
+endmenu
+
+endmenu
+
diff --git a/drivers/video/sunxi/lcd_fb/Makefile b/drivers/video/sunxi/lcd_fb/Makefile
index 3fb97678f..9aca80a78 100644
--- a/drivers/video/sunxi/lcd_fb/Makefile
+++ b/drivers/video/sunxi/lcd_fb/Makefile
@@ -1,9 +1,16 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_LCD_FB) += lcd_fb.o
+obj-$(CONFIG_LCD_FB) += lcd_fb_spi_panel.o
 
 lcd_fb-objs := dev_lcd_fb.o disp_lcd.o dev_fb.o logo.o
-lcd_fb-objs += lcd_fb_intf.o disp_display.o panels/panels.o panels/lcd_source.o
+lcd_fb-objs += lcd_fb_intf.o disp_display.o panels/panels.o
+
+lcd_fb_spi_panel-objs += panels/spi_panel.o
+
+# LCD Panel Driver
 lcd_fb-${CONFIG_LCD_SUPPORT_KLD35512} += panels/kld35512.o
 lcd_fb-${CONFIG_LCD_SUPPORT_KLD39501} += panels/kld39501.o
 lcd_fb-${CONFIG_LCD_SUPPORT_KLD2844B} += panels/kld2844b.o
 lcd_fb-${CONFIG_LCD_SUPPORT_NV3029S} += panels/nv3029s.o
+lcd_fb-${CONFIG_LCD_SUPPORT_ST77916_QSPI} += panels/st77916.o
+
diff --git a/drivers/video/sunxi/lcd_fb/dev_fb.c b/drivers/video/sunxi/lcd_fb/dev_fb.c
index 0668ad332..cbbf6afa7 100644
--- a/drivers/video/sunxi/lcd_fb/dev_fb.c
+++ b/drivers/video/sunxi/lcd_fb/dev_fb.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * dev_fb/dev_fb.c
@@ -25,54 +25,57 @@
 #define dma_mmap_writecombine dma_mmap_wc
 #endif
 
-struct fb_info_t {
+struct lcd_fb_info {
+	u32 fb_count;
 	struct device *dev;
-	bool fb_enable[LCD_FB_MAX];
-	struct fb_info *fbinfo[LCD_FB_MAX];
-	int blank[LCD_FB_MAX];
-	int fb_index[LCD_FB_MAX];
-	u32 pseudo_palette[LCD_FB_MAX][16];
+	bool *fb_enable;
+	struct fb_info **fbinfo;
+	int *blank;
+	int *fb_index;
+	u32 **pseudo_palette;
 };
 
-static struct fb_info_t g_fbi;
+static struct lcd_fb_info g_fbi;
 
-static int lcd_fb_open(struct fb_info *info, int user)
+static int sunxi_lcd_fb_open(struct fb_info *info, int user)
 {
 	return 0;
 }
-static int lcd_fb_release(struct fb_info *info, int user)
+
+static int sunxi_lcd_fb_release(struct fb_info *info, int user)
 {
 	return 0;
 }
 
-void lcd_fb_black_screen(u32 sel)
+void sunxi_lcd_fb_black_screen(u32 sel)
 {
-	if (sel >= LCD_FB_MAX) {
-		lcd_fb_wrn("Exceed max fb:%d >= %d\n", sel, LCD_FB_MAX);
+	if (sel >= g_drv_info.lcd_panel_count) {
+		LCDFB_WRN("Exceed max fb:%d >= %d\n", sel,
+			  g_drv_info.lcd_panel_count);
 		return;
 	}
 
-	bsp_disp_lcd_set_layer(sel, g_fbi.fbinfo[sel]);
+	sunxi_lcd_fb_bsp_disp_lcd_set_layer(sel, g_fbi.fbinfo[sel]);
 }
 
-static int lcd_fb_pan_display(struct fb_var_screeninfo *var,
-				struct fb_info *info)
+static int sunxi_lcd_fb_pan_display(struct fb_var_screeninfo *var,
+				    struct fb_info *info)
 {
 	u32 sel = 0;
 	struct fb_info tmp_info;
 	memcpy(&tmp_info, info, sizeof(tmp_info));
 	memcpy(&tmp_info.var, var, sizeof(tmp_info.var));
 
-	for (sel = 0; sel < LCD_FB_MAX; sel++) {
+	for (sel = 0; sel < g_drv_info.lcd_panel_count; sel++) {
 		if (sel == g_fbi.fb_index[info->node]) {
-			bsp_disp_lcd_set_layer(sel, &tmp_info);
-			bsp_disp_lcd_wait_for_vsync(sel);
+			sunxi_lcd_fb_bsp_disp_lcd_set_layer(sel, &tmp_info);
+			sunxi_lcd_fb_bsp_disp_lcd_wait_for_vsync(sel);
 		}
 	}
 	return 0;
 }
 
-static int lcd_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
+static int sunxi_lcd_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
 {
 	unsigned int offset = vma->vm_pgoff << PAGE_SHIFT;
 
@@ -85,34 +88,34 @@ static int lcd_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
 	return -EINVAL;
 }
 
-static int lcd_fb_set_par(struct fb_info *info)
+static int sunxi_lcd_fb_set_par(struct fb_info *info)
 {
-	return bsp_disp_lcd_set_var(info->node, info);
+	return sunxi_lcd_fb_bsp_disp_lcd_set_var(info->node, info);
 }
 
-static int lcd_fb_check_var(struct fb_var_screeninfo *var,
-			      struct fb_info *info)
+static int sunxi_lcd_fb_check_var(struct fb_var_screeninfo *var,
+				  struct fb_info *info)
 {
 	return 0;
 }
-static int lcd_fb_blank(int blank_mode, struct fb_info *info)
+static int sunxi_lcd_fb_blank(int blank_mode, struct fb_info *info)
 {
 	if (blank_mode == FB_BLANK_POWERDOWN)
-		return bsp_disp_lcd_blank(info->node, 1);
+		return sunxi_lcd_fb_bsp_disp_lcd_blank(info->node, 1);
 	else
-		return bsp_disp_lcd_blank(info->node, 0);
+		return sunxi_lcd_fb_bsp_disp_lcd_blank(info->node, 0);
 }
 
-static inline u32 convert_bitfield(int val, struct fb_bitfield *bf)
+static inline u32 sunxi_lcd_fb_convert_bitfield(int val, struct fb_bitfield *bf)
 {
 	u32 mask = ((1 << bf->length) - 1) << bf->offset;
 
 	return (val << bf->offset) & mask;
 }
 
-static int lcd_fb_setcolreg(unsigned regno, unsigned red, unsigned green,
-			      unsigned blue, unsigned transp,
-			      struct fb_info *info)
+static int sunxi_lcd_fb_setcolreg(unsigned regno, unsigned red, unsigned green,
+				  unsigned blue, unsigned transp,
+				  struct fb_info *info)
 {
 	u32 val;
 	u32 ret = 0;
@@ -123,11 +126,15 @@ static int lcd_fb_setcolreg(unsigned regno, unsigned red, unsigned green,
 		break;
 	case FB_VISUAL_TRUECOLOR:
 		if (regno < 16) {
-			val = convert_bitfield(transp, &info->var.transp) |
-			    convert_bitfield(red, &info->var.red) |
-			    convert_bitfield(green, &info->var.green) |
-			    convert_bitfield(blue, &info->var.blue);
-			((u32 *) info->pseudo_palette)[regno] = val;
+			val = sunxi_lcd_fb_convert_bitfield(transp,
+							    &info->var.transp) |
+			      sunxi_lcd_fb_convert_bitfield(red,
+							    &info->var.red) |
+			      sunxi_lcd_fb_convert_bitfield(green,
+							    &info->var.green) |
+			      sunxi_lcd_fb_convert_bitfield(blue,
+							    &info->var.blue);
+			((u32 *)info->pseudo_palette)[regno] = val;
 		} else {
 			ret = 0;
 		}
@@ -140,13 +147,12 @@ static int lcd_fb_setcolreg(unsigned regno, unsigned red, unsigned green,
 	return ret;
 }
 
-static int lcd_fb_setcmap(struct fb_cmap *cmap, struct fb_info *info)
+static int sunxi_lcd_fb_setcmap(struct fb_cmap *cmap, struct fb_info *info)
 {
 	unsigned int j, r = 0;
 	unsigned char hred, hgreen, hblue, htransp = 0xff;
 	unsigned short *red, *green, *blue, *transp;
 
-
 	red = cmap->red;
 	green = cmap->green;
 	blue = cmap->blue;
@@ -161,8 +167,8 @@ static int lcd_fb_setcmap(struct fb_cmap *cmap, struct fb_info *info)
 		else
 			htransp = 0xff;
 
-		r = lcd_fb_setcolreg(cmap->start + j, hred, hgreen, hblue,
-				       htransp, info);
+		r = sunxi_lcd_fb_setcolreg(cmap->start + j, hred, hgreen, hblue,
+					   htransp, info);
 		if (r)
 			return r;
 	}
@@ -172,27 +178,27 @@ static int lcd_fb_setcmap(struct fb_cmap *cmap, struct fb_info *info)
 
 static struct fb_ops lcdfb_ops = {
 	.owner = THIS_MODULE,
-	.fb_open = lcd_fb_open,
-	.fb_release = lcd_fb_release,
-	.fb_pan_display = lcd_fb_pan_display,
+	.fb_open = sunxi_lcd_fb_open,
+	.fb_release = sunxi_lcd_fb_release,
+	.fb_pan_display = sunxi_lcd_fb_pan_display,
 	/* .fb_ioctl = lcd_fb_ioctl, */
-	.fb_check_var = lcd_fb_check_var,
-	.fb_set_par = lcd_fb_set_par,
-	.fb_blank = lcd_fb_blank,
+	.fb_check_var = sunxi_lcd_fb_check_var,
+	.fb_set_par = sunxi_lcd_fb_set_par,
+	.fb_blank = sunxi_lcd_fb_blank,
 	/* .fb_cursor = lcd_fb_cursor, */
-	.fb_mmap = lcd_fb_mmap,
+	.fb_mmap = sunxi_lcd_fb_mmap,
 #if IS_ENABLED(CONFIG_AW_FB_CONSOLE)
 	.fb_fillrect = cfb_fillrect,
 	.fb_copyarea = cfb_copyarea,
 	.fb_imageblit = cfb_imageblit,
 #endif
-	.fb_setcmap = lcd_fb_setcmap,
-	.fb_setcolreg = lcd_fb_setcolreg,
-
+	.fb_setcmap = sunxi_lcd_fb_setcmap,
+	.fb_setcolreg = sunxi_lcd_fb_setcolreg,
 };
 
-static s32 pixel_format_to_var(enum lcdfb_pixel_format format,
-			  struct fb_var_screeninfo *var)
+static s32
+sunxi_lcd_fb_pixel_format_to_var(enum sunxi_lcd_fb_pixel_format format,
+				 struct fb_var_screeninfo *var)
 {
 	switch (format) {
 	case LCDFB_FORMAT_ARGB_8888:
@@ -284,90 +290,106 @@ static s32 pixel_format_to_var(enum lcdfb_pixel_format format,
 
 		break;
 	default:
-		lcd_fb_wrn("[FB]not support format %d\n", format);
+		LCDFB_WRN("[FB]not support format %d\n", format);
 	}
 
-	lcd_fb_inf
-	    ("fmt%d para: %dbpp, a(%d,%d),r(%d,%d),g(%d,%d),b(%d,%d)\n",
-	     (int)format, (int)var->bits_per_pixel, (int)var->transp.offset,
-	     (int)var->transp.length, (int)var->red.offset,
-	     (int)var->red.length, (int)var->green.offset,
-	     (int)var->green.length, (int)var->blue.offset,
-	     (int)var->blue.length);
+	LCDFB_INF("fmt%d para: %dbpp, a(%d,%d),r(%d,%d),g(%d,%d),b(%d,%d)\n",
+		  (int)format, (int)var->bits_per_pixel,
+		  (int)var->transp.offset, (int)var->transp.length,
+		  (int)var->red.offset, (int)var->red.length,
+		  (int)var->green.offset, (int)var->green.length,
+		  (int)var->blue.offset, (int)var->blue.length);
 
 	return 0;
 }
 
-static int fb_map_video_memory(struct fb_info *info)
+static int sunxi_lcd_fb_map_video_memory(struct fb_info *info)
 {
 	unsigned long long phy_addr = 0;
-	info->screen_base =
-	    (char __iomem *)lcd_fb_dma_malloc(info->fix.smem_len,
-					(u32 *) (&phy_addr));
+	info->screen_base = (char __iomem *)sunxi_lcd_fb_dma_malloc(
+		info->fix.smem_len, (u32 *)(&phy_addr));
 	info->fix.smem_start = (unsigned long)phy_addr;
 
 	if (info->screen_base) {
-		lcd_fb_inf("%s(reserve),va=0x%p, pa=0x%p size:0x%x\n", __func__,
-		      (void *)info->screen_base,
-		      (void *)info->fix.smem_start,
-		      (unsigned int)info->fix.smem_len);
+		LCDFB_INF("%s(reserve),va=0x%p, pa=0x%p size:0x%x\n", __func__,
+			  (void *)info->screen_base,
+			  (void *)info->fix.smem_start,
+			  (unsigned int)info->fix.smem_len);
 		memset((void *__force)info->screen_base, 0x0,
 		       info->fix.smem_len);
 
-
 		return 0;
 	}
 
-	lcd_fb_wrn("%s fail!\n", __func__);
+	LCDFB_WRN("%s fail!\n", __func__);
 	return -ENOMEM;
-
-	return 0;
 }
 
-static inline void fb_unmap_video_memory(struct fb_info *info)
+static void sunxi_lcd_fb_unmap_video_memory(struct fb_info *info)
 {
 	if (!info->screen_base) {
-		lcd_fb_wrn("%s: screen_base is null\n", __func__);
+		LCDFB_WRN("%s: screen_base is null\n", __func__);
 		return;
 	}
-	lcd_fb_inf("%s: screen_base=0x%p, smem=0x%p, len=0x%x\n", __func__,
-	      (void *)info->screen_base,
-	      (void *)info->fix.smem_start, info->fix.smem_len);
-	lcd_fb_dma_free((void *__force)info->screen_base,
-		  (void *)info->fix.smem_start, info->fix.smem_len);
+	LCDFB_INF("%s: screen_base=0x%p, smem=0x%p, len=0x%x\n", __func__,
+		  (void *)info->screen_base, (void *)info->fix.smem_start,
+		  info->fix.smem_len);
+	sunxi_lcd_fb_dma_free((void *__force)info->screen_base,
+			      (void *)info->fix.smem_start, info->fix.smem_len);
 	info->screen_base = 0;
 	info->fix.smem_start = 0;
 }
 
-#ifdef CONFIG_FB_DEFERRED_IO
-static void lcdfb_deferred_io(struct fb_info *info, struct list_head *pagelist)
+#if IS_ENABLED(CONFIG_FB_DEFERRED_IO)
+static void sunxi_lcd_fb_deferred_io(struct fb_info *info,
+				     struct list_head *pagelist)
 {
 	u32 sel = 0;
-	for (sel = 0; sel < LCD_FB_MAX; sel++) {
+	for (sel = 0; sel < g_drv_info.lcd_panel_count; sel++) {
 		if (sel == g_fbi.fb_index[info->node]) {
-			bsp_disp_lcd_set_layer(sel, g_fbi.fbinfo[sel]);
+			sunxi_lcd_fb_bsp_disp_lcd_set_layer(sel,
+							    g_fbi.fbinfo[sel]);
 		}
 	}
-
 }
 #endif
 
-int fb_init(struct dev_lcd_fb_t *p_info)
+int sunxi_lcd_fb_init(struct sunxi_lcd_fb_dev_lcd_fb_t *p_info)
 {
 	int i = 0, buffer_num = 2, pixel_format = 0;
-	struct disp_panel_para info;
-#ifdef CONFIG_FB_DEFERRED_IO
+	struct sunxi_lcd_fb_disp_panel_para info;
+#if IS_ENABLED(CONFIG_FB_DEFERRED_IO)
 	struct fb_deferred_io *fbdefio = NULL;
 #endif
 
 	g_fbi.dev = p_info->device;
 
-	if (p_info->lcd_fb_num > LCD_FB_MAX) {
-		lcd_fb_wrn("Only %d fb devices is support\n", LCD_FB_MAX);
+	if (p_info->lcd_fb_num > g_drv_info.lcd_panel_count) {
+		LCDFB_WRN("Only %d fb devices are supported\n", g_drv_info.lcd_panel_count);
 		return -1;
 	}
+
+	g_fbi.fbinfo = kmalloc(sizeof(struct fb_info *) * p_info->lcd_fb_num,
+			       GFP_KERNEL);
+	if (!g_fbi.fbinfo) {
+		return -ENOMEM;
+	}
+
+	g_fbi.fb_enable =
+		kmalloc(sizeof(bool) * p_info->lcd_fb_num, GFP_KERNEL);
+	g_fbi.fb_index = kmalloc(sizeof(int) * p_info->lcd_fb_num, GFP_KERNEL);
+	g_fbi.pseudo_palette =
+		kmalloc(sizeof(u32 *) * p_info->lcd_fb_num, GFP_KERNEL);
+	if (!g_fbi.fb_enable || !g_fbi.fb_index || !g_fbi.pseudo_palette) {
+		return -ENOMEM;
+	}
+
 	for (i = 0; i < p_info->lcd_fb_num; i++) {
 		g_fbi.fbinfo[i] = framebuffer_alloc(0, g_fbi.dev);
+		if (!g_fbi.fbinfo[i]) {
+			return -ENOMEM;
+		}
+
 		g_fbi.fbinfo[i]->fbops = &lcdfb_ops;
 		g_fbi.fbinfo[i]->flags = 0;
 		g_fbi.fbinfo[i]->device = g_fbi.dev;
@@ -397,10 +419,10 @@ int fb_init(struct dev_lcd_fb_t *p_info)
 		g_fbi.fbinfo[i]->fix.ywrapstep = 0;
 		g_fbi.fbinfo[i]->fix.accel = FB_ACCEL_NONE;
 		g_fbi.fbinfo[i]->fix.line_length =
-		    g_fbi.fbinfo[i]->var.xres_virtual * 4;
+			g_fbi.fbinfo[i]->var.xres_virtual * 4;
 		g_fbi.fbinfo[i]->fix.smem_len =
-		    g_fbi.fbinfo[i]->fix.line_length *
-		    g_fbi.fbinfo[i]->var.yres_virtual * 2;
+			g_fbi.fbinfo[i]->fix.line_length *
+			g_fbi.fbinfo[i]->var.yres_virtual * 2;
 		g_fbi.fbinfo[i]->screen_base = NULL;
 		g_fbi.fbinfo[i]->pseudo_palette = g_fbi.pseudo_palette[i];
 		g_fbi.fbinfo[i]->fix.smem_start = 0x0;
@@ -412,73 +434,84 @@ int fb_init(struct dev_lcd_fb_t *p_info)
 		buffer_num = 2;
 		pixel_format = LCDFB_FORMAT_ARGB_8888;
 		memset(&info, 0, sizeof(info));
-		if (!bsp_disp_get_panel_info(i, &info)) {
+		if (!sunxi_lcd_fb_bsp_disp_get_panel_info(i, &info)) {
 			buffer_num = info.fb_buffer_num;
 			pixel_format = info.lcd_pixel_fmt;
 		}
 
-#ifdef CONFIG_FB_DEFERRED_IO
+#if IS_ENABLED(CONFIG_FB_DEFERRED_IO)
 		fbdefio = NULL;
 		fbdefio = devm_kzalloc(g_fbi.dev, sizeof(*fbdefio), GFP_KERNEL);
 		if (!fbdefio)
 			return -1;
 		g_fbi.fbinfo[i]->fbdefio = fbdefio;
-		fbdefio->delay =           HZ/info.lcd_fps;
-		fbdefio->deferred_io =     lcdfb_deferred_io;
+		fbdefio->delay = HZ / info.lcd_fps;
+		fbdefio->deferred_io = sunxi_lcd_fb_deferred_io;
 		fb_deferred_io_init(g_fbi.fbinfo[i]);
 #endif
 
-		pixel_format_to_var(pixel_format,
-			       &(g_fbi.fbinfo[i]->var));
+		sunxi_lcd_fb_pixel_format_to_var(pixel_format,
+						 &(g_fbi.fbinfo[i]->var));
 
 		g_fbi.fbinfo[i]->var.xoffset = 0;
 		g_fbi.fbinfo[i]->var.yoffset = 0;
-		g_fbi.fbinfo[i]->var.xres = bsp_disp_get_screen_width(i);
-		g_fbi.fbinfo[i]->var.yres = bsp_disp_get_screen_height(i);
-		g_fbi.fbinfo[i]->var.xres_virtual = bsp_disp_get_screen_width(i);
+		g_fbi.fbinfo[i]->var.xres =
+			sunxi_lcd_fb_bsp_disp_get_screen_width(i);
+		g_fbi.fbinfo[i]->var.yres =
+			sunxi_lcd_fb_bsp_disp_get_screen_height(i);
+		g_fbi.fbinfo[i]->var.xres_virtual =
+			sunxi_lcd_fb_bsp_disp_get_screen_width(i);
 		g_fbi.fbinfo[i]->fix.line_length =
-		    (g_fbi.fbinfo[i]->var.xres * g_fbi.fbinfo[i]->var.bits_per_pixel) >> 3;
+			(g_fbi.fbinfo[i]->var.xres *
+			 g_fbi.fbinfo[i]->var.bits_per_pixel) >>
+			3;
 
 		g_fbi.fbinfo[i]->fix.smem_len =
-			g_fbi.fbinfo[i]->fix.line_length * g_fbi.fbinfo[i]->var.yres * buffer_num;
+			g_fbi.fbinfo[i]->fix.line_length *
+			g_fbi.fbinfo[i]->var.yres * buffer_num;
 
 		if (g_fbi.fbinfo[i]->fix.line_length != 0)
 			g_fbi.fbinfo[i]->var.yres_virtual =
-				g_fbi.fbinfo[i]->fix.smem_len / g_fbi.fbinfo[i]->fix.line_length;
-		fb_map_video_memory(g_fbi.fbinfo[i]);
-
-		/* TODO:set fb timing */
+				g_fbi.fbinfo[i]->fix.smem_len /
+				g_fbi.fbinfo[i]->fix.line_length;
+		sunxi_lcd_fb_map_video_memory(g_fbi.fbinfo[i]);
 
+		/* set fb timing */
 		g_fbi.fbinfo[i]->var.width =
-			bsp_disp_get_screen_physical_width(i);
+			sunxi_lcd_fb_bsp_disp_get_screen_physical_width(i);
 		g_fbi.fbinfo[i]->var.height =
-			bsp_disp_get_screen_physical_height(i);
+			sunxi_lcd_fb_bsp_disp_get_screen_physical_height(i);
+
+		/* enable display */
 		g_fbi.fb_enable[i] = 1;
-		/* TODO:display something? */
 		g_fbi.fb_index[i] = i;
 		register_framebuffer(g_fbi.fbinfo[i]);
-		logo_parse(g_fbi.fbinfo[i]);
+		sunxi_lcd_fb_logo_parse(g_fbi.fbinfo[i]);
 	}
 
 	return 0;
 }
 
-int fb_exit(void)
+int sunxi_lcd_fb_exit(void)
 {
 	unsigned int fb_id = 0;
 
-	for (fb_id = 0; fb_id < LCD_FB_MAX; fb_id++) {
+	for (fb_id = 0; fb_id < g_drv_info.lcd_panel_count; fb_id++) {
 		if (g_fbi.fbinfo[fb_id]) {
-#ifdef CONFIG_FB_DEFERRED_IO
+#if IS_ENABLED(CONFIG_FB_DEFERRED_IO)
 			fb_deferred_io_cleanup(g_fbi.fbinfo[fb_id]);
 #endif
 			fb_dealloc_cmap(&g_fbi.fbinfo[fb_id]->cmap);
-			fb_unmap_video_memory(g_fbi.fbinfo[fb_id]);
+			sunxi_lcd_fb_unmap_video_memory(g_fbi.fbinfo[fb_id]);
 			unregister_framebuffer(g_fbi.fbinfo[fb_id]);
 			framebuffer_release(g_fbi.fbinfo[fb_id]);
 			g_fbi.fbinfo[fb_id] = NULL;
 		}
 	}
 
+	kfree(g_fbi.fbinfo);
+	kfree(g_fbi.fb_enable);
+	kfree(g_fbi.fb_index);
+	kfree(g_fbi.pseudo_palette);
 	return 0;
 }
diff --git a/drivers/video/sunxi/lcd_fb/dev_fb.h b/drivers/video/sunxi/lcd_fb/dev_fb.h
index 24af20f50..6d2728ed7 100644
--- a/drivers/video/sunxi/lcd_fb/dev_fb.h
+++ b/drivers/video/sunxi/lcd_fb/dev_fb.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Copyright (c) 2007-2019 Allwinnertech Co., Ltd.
@@ -19,8 +19,10 @@
 
 #include "dev_lcd_fb.h"
 
-int fb_init(struct dev_lcd_fb_t *p_info);
-int fb_exit(void);
-void lcd_fb_black_screen(u32 sel);
+int sunxi_lcd_fb_init(struct sunxi_lcd_fb_dev_lcd_fb_t *p_info);
+
+int sunxi_lcd_fb_exit(void);
+
+void sunxi_lcd_fb_black_screen(u32 sel);
 
 #endif /* End of file */
diff --git a/drivers/video/sunxi/lcd_fb/dev_lcd_fb.c b/drivers/video/sunxi/lcd_fb/dev_lcd_fb.c
index ea9129cf0..e7db39c4c 100644
--- a/drivers/video/sunxi/lcd_fb/dev_lcd_fb.c
+++ b/drivers/video/sunxi/lcd_fb/dev_lcd_fb.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Copyright (c) 2007-2019 Allwinnertech Co., Ltd.
@@ -15,183 +15,221 @@
  *
  */
 #include "include.h"
-#include "./panels/panels.h"
+
 #include "disp_lcd.h"
 #include "disp_display.h"
 #include "dev_fb.h"
 #include "dev_lcd_fb.h"
 
-struct dev_lcd_fb_t g_drv_info;
-
-
-extern int lcd_init(void);
-
+#include "./panels/panels.h"
 
+struct sunxi_lcd_fb_dev_lcd_fb_t g_drv_info;
 
-static struct attribute *lcd_fb_attributes[] = {
-	NULL
-};
+static struct attribute *lcd_fb_attributes[] = { NULL };
 
 static struct attribute_group lcd_fb_attribute_group = {
 	.name = "attr",
 	.attrs = lcd_fb_attributes
 };
 
-static void start_work(struct work_struct *work)
+static void sunxi_lcd_fb_module_start_work(struct work_struct *work)
 {
 	int i = 0;
-	struct lcd_fb_device *dispdev = NULL;
+	struct sunxi_lcd_fb_device *dispdev = NULL;
 
-	for (i = 0; i < SUPPORT_MAX_LCD; ++i) {
-		dispdev = lcd_fb_device_get(i);
+	for (i = 0; i < g_drv_info.lcd_panel_count; ++i) {
+		dispdev = sunxi_sunxi_lcd_fb_device_get(i);
 		if (dispdev)
 			dispdev->enable(dispdev);
 	}
-
 }
 
-static s32 start_process(void)
+static s32 sunxi_lcd_fb_module_start_process(void)
 {
 	flush_work(&g_drv_info.start_work);
 	schedule_work(&g_drv_info.start_work);
 	return 0;
 }
 
-static int lcd_fb_probe(struct platform_device *pdev)
+static int sunxi_lcd_fb_module_probe(struct platform_device *pdev)
 {
 	int ret = 0;
+	struct device_node *np = pdev->dev.of_node;
+
+	LCDFB_DBG("running sunxi_lcd_fb_module_probe\n");
 
 	g_drv_info.device = &pdev->dev;
-	lcd_fb_wrn("\n");
+
 	ret = sysfs_create_group(&pdev->dev.kobj, &lcd_fb_attribute_group);
-	INIT_WORK(&g_drv_info.start_work, start_work);
 
-	disp_init_lcd(&g_drv_info);
+	INIT_WORK(&g_drv_info.start_work, sunxi_lcd_fb_module_start_work);
+
+	g_drv_info.lcd_panel_count = of_graph_get_endpoint_count(np);
+	if (g_drv_info.lcd_panel_count <= 0) {
+		LCDFB_WRN("no endpoints found for node\n");
+		return -ENODEV;
+	}
+
+	LCDFB_DBG("get endpoint count %d\n", g_drv_info.lcd_panel_count);
+
+	sunxi_lcd_fb_disp_init_lcd(&g_drv_info);
+
+	if (!g_drv_info.lcd_fb_num) {
+		LCDFB_WRN("no panel found for lcd fb\n");
+		return -ENODEV;
+	}
 
-	lcd_init();
+	sunxi_lcd_fb_lcd_panel_init();
 
-	fb_init(&g_drv_info);
+	sunxi_lcd_fb_init(&g_drv_info);
+
+	sunxi_lcd_fb_module_start_process();
 
-	start_process();
 	return ret;
 }
 
-static void lcd_fb_shutdown(struct platform_device *pdev)
+static void sunxi_lcd_fb_module_shutdown(struct platform_device *pdev)
 {
 	int i = 0;
-	struct lcd_fb_device *dispdev = NULL;
+	struct sunxi_lcd_fb_device *dispdev = NULL;
 
-	for (i = 0; i < SUPPORT_MAX_LCD; ++i) {
-		dispdev = lcd_fb_device_get(i);
+	for (i = 0; i < g_drv_info.lcd_panel_count; ++i) {
+		dispdev = sunxi_sunxi_lcd_fb_device_get(i);
 		if (dispdev)
 			dispdev->disable(dispdev);
 	}
-	lcd_fb_wrn("Finish\n");
+
+	LCDFB_DBG("running sunxi_lcd_fb_module_shutdown\n");
 }
 
-static int lcd_fb_remove(struct platform_device *pdev)
+static int sunxi_lcd_fb_module_remove(struct platform_device *pdev)
 {
-	int ret = 0;
+	sunxi_lcd_fb_module_shutdown(pdev);
+
+	sunxi_lcd_fb_exit();
+
+	sunxi_lcd_fb_disp_exit_lcd();
 
-	lcd_fb_shutdown(pdev);
-	fb_exit();
-	disp_exit_lcd();
 	sysfs_remove_group(&pdev->dev.kobj, &lcd_fb_attribute_group);
+
 	platform_set_drvdata(pdev, NULL);
-	return ret;
-}
 
+	LCDFB_DBG("running sunxi_lcd_fb_module_remove\n");
 
-static const struct of_device_id lcd_fb_match[] = {
-	{.compatible = "allwinner,sunxi-lcd_fb0",},
+	return 0;
+}
+
+static const struct of_device_id sunxi_lcd_fb_module_match[] = {
+	{
+		.compatible = "allwinner,lcd-fb",
+	},
 	{},
 };
 
-int lcd_fb_suspend(struct device *dev)
+int sunxi_lcd_fb_module_suspend(struct device *dev)
 {
 	int i = 0;
 	int ret = 0;
-	struct lcd_fb_device *dispdev = NULL;
+	struct sunxi_lcd_fb_device *dispdev = NULL;
 
-	for (i = 0; i < SUPPORT_MAX_LCD; ++i) {
-		dispdev = lcd_fb_device_get(i);
+	for (i = 0; i < g_drv_info.lcd_panel_count; ++i) {
+		dispdev = sunxi_sunxi_lcd_fb_device_get(i);
 		if (dispdev)
 			ret = dispdev->disable(dispdev);
 	}
 	return ret;
 }
 
-int lcd_fb_resume(struct device *dev)
+int sunxi_lcd_fb_module_resume(struct device *dev)
 {
 	int i = 0;
 	int ret = 0;
-	struct lcd_fb_device *dispdev = NULL;
+	struct sunxi_lcd_fb_device *dispdev = NULL;
 
-	for (i = 0; i < SUPPORT_MAX_LCD; ++i) {
-		dispdev = lcd_fb_device_get(i);
+	for (i = 0; i < g_drv_info.lcd_panel_count; ++i) {
+		dispdev = sunxi_sunxi_lcd_fb_device_get(i);
 		if (dispdev)
 			ret = dispdev->enable(dispdev);
 	}
 	return ret;
 }
 
-static const struct dev_pm_ops lcd_fb_runtime_pm_ops = {
-	.suspend = lcd_fb_suspend,
-	.resume = lcd_fb_resume,
+static const struct dev_pm_ops sunxi_lcd_fb_module_runtime_pm_ops = {
+	.suspend = sunxi_lcd_fb_module_suspend,
+	.resume = sunxi_lcd_fb_module_resume,
 };
 
-struct platform_driver lcd_fb_driver = {
-	.probe = lcd_fb_probe,
-	.remove = lcd_fb_remove,
-	.shutdown = lcd_fb_shutdown,
+struct platform_driver sunxi_lcd_fb_driver = {
+	.probe = sunxi_lcd_fb_module_probe,
+	.remove = sunxi_lcd_fb_module_remove,
+	.shutdown = sunxi_lcd_fb_module_shutdown,
 	.driver = {
 		.name = "lcd_fb",
 		.owner = THIS_MODULE,
-		.pm             = &lcd_fb_runtime_pm_ops,
-		.of_match_table = lcd_fb_match,
+		.pm = &sunxi_lcd_fb_module_runtime_pm_ops,
+		.of_match_table = sunxi_lcd_fb_module_match,
 	},
 };
 
-static int __init lcd_fb_init(void)
+static int __init sunxi_lcd_fb_module_init(void)
 {
 	s32 ret = -1;
-	lcd_fb_wrn("\n");
-	ret = platform_driver_register(&lcd_fb_driver);
+	LCDFB_DBG("running sunxi_lcd_fb_module_init\n");
+	ret = platform_driver_register(&sunxi_lcd_fb_driver);
+
+	if (ret) {
+		LCDFB_WRN("lcd fb register driver failed!\n");
+		return ret;
+	}
+
 	return ret;
 }
 
-static void __exit lcd_fb_exit(void)
+static void __exit sunxi_lcd_fb_module_exit(void)
 {
-	platform_driver_unregister(&lcd_fb_driver);
-	lcd_fb_wrn("\n");
+	platform_driver_unregister(&sunxi_lcd_fb_driver);
+	LCDFB_HERE;
 }
 
-int sunxi_disp_get_source_ops(struct sunxi_disp_source_ops *src_ops)
+int sunxi_lcd_fb_disp_get_source_ops(
+	struct sunxi_lcd_fb_disp_source_ops *src_ops)
 {
 	memset((void *)src_ops, 0, sizeof(*src_ops));
 
-	src_ops->sunxi_lcd_set_panel_funs = bsp_disp_lcd_set_panel_funs;
-	src_ops->sunxi_lcd_delay_ms = disp_delay_ms;
-	src_ops->sunxi_lcd_delay_us = disp_delay_us;
-	src_ops->sunxi_lcd_backlight_enable = bsp_disp_lcd_backlight_enable;
-	src_ops->sunxi_lcd_backlight_disable = bsp_disp_lcd_backlight_disable;
-	src_ops->sunxi_lcd_pwm_enable = bsp_disp_lcd_pwm_enable;
-	src_ops->sunxi_lcd_pwm_disable = bsp_disp_lcd_pwm_disable;
-	src_ops->sunxi_lcd_power_enable = bsp_disp_lcd_power_enable;
-	src_ops->sunxi_lcd_power_disable = bsp_disp_lcd_power_disable;
-	src_ops->sunxi_lcd_pin_cfg = bsp_disp_lcd_pin_cfg;
-	src_ops->sunxi_lcd_gpio_set_value = bsp_disp_lcd_gpio_set_value;
-	src_ops->sunxi_lcd_gpio_set_direction = bsp_disp_lcd_gpio_set_direction;
-	src_ops->sunxi_lcd_cmd_write = bsp_disp_lcd_cmd_write;
-	src_ops->sunxi_lcd_para_write = bsp_disp_lcd_para_write;
-	src_ops->sunxi_lcd_cmd_read = bsp_disp_lcd_cmd_read;
+	src_ops->sunxi_lcd_fb_set_panel_funs_ops =
+		sunxi_lcd_fb_bsp_disp_lcd_set_panel_funs;
+	src_ops->sunxi_lcd_fb_delay_ms_ops = sunxi_lcd_fb_disp_delay_ms;
+	src_ops->sunxi_lcd_fb_delay_us_ops = sunxi_lcd_fb_disp_delay_us;
+	src_ops->sunxi_lcd_fb_backlight_enable_ops =
+		sunxi_lcd_fb_bsp_disp_lcd_backlight_enable;
+	src_ops->sunxi_lcd_fb_backlight_disable_ops =
+		sunxi_lcd_fb_bsp_disp_lcd_backlight_disable;
+	src_ops->sunxi_lcd_fb_pwm_enable_ops =
+		sunxi_lcd_fb_bsp_disp_lcd_pwm_enable;
+	src_ops->sunxi_lcd_fb_pwm_disable_ops =
+		sunxi_lcd_fb_bsp_disp_lcd_pwm_disable;
+	src_ops->sunxi_lcd_fb_power_enable_ops =
+		sunxi_lcd_fb_bsp_disp_lcd_power_enable;
+	src_ops->sunxi_lcd_fb_power_disable_ops =
+		sunxi_lcd_fb_bsp_disp_lcd_power_disable;
+	src_ops->sunxi_lcd_fb_pin_cfg_ops = sunxi_lcd_fb_bsp_disp_lcd_pin_cfg;
+	src_ops->sunxi_lcd_fb_gpio_set_value_ops =
+		sunxi_lcd_fb_bsp_disp_lcd_gpio_set_value;
+	src_ops->sunxi_lcd_fb_gpio_set_direction_ops =
+		sunxi_lcd_fb_bsp_disp_lcd_gpio_set_direction;
+	src_ops->sunxi_lcd_fb_cmd_write_ops =
+		sunxi_lcd_fb_bsp_disp_lcd_cmd_write;
+	src_ops->sunxi_lcd_fb_para_write_ops =
+		sunxi_lcd_fb_bsp_disp_lcd_para_write;
+	src_ops->sunxi_lcd_fb_cmd_read_ops = sunxi_lcd_fb_bsp_disp_lcd_cmd_read;
 	return 0;
 }
 
-module_init(lcd_fb_init);
-module_exit(lcd_fb_exit);
+module_init(sunxi_lcd_fb_module_init);
+module_exit(sunxi_lcd_fb_module_exit);
 
-MODULE_AUTHOR("te <zhengxiaobin@allwinnertech.com>");
-MODULE_DESCRIPTION("lcd fb module");
-MODULE_VERSION("1.0.0");
+MODULE_AUTHOR("zhengxiaobin <zhengxiaobin@allwinnertech.com>");
+MODULE_AUTHOR("zhangyuanjing <zhangyuanjing@allwinnertech.com>");
+MODULE_DESCRIPTION("sunxi lcd fb module");
+MODULE_VERSION("1.0.1");
 MODULE_LICENSE("GPL");
diff --git a/drivers/video/sunxi/lcd_fb/dev_lcd_fb.h b/drivers/video/sunxi/lcd_fb/dev_lcd_fb.h
index 38a752e69..883dcb1c0 100644
--- a/drivers/video/sunxi/lcd_fb/dev_lcd_fb.h
+++ b/drivers/video/sunxi/lcd_fb/dev_lcd_fb.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Copyright (c) 2007-2019 Allwinnertech Co., Ltd.
@@ -16,14 +16,16 @@
  */
 #ifndef _DEV_LCD_FB_H
 #define _DEV_LCD_FB_H
-#include "include.h"
 
-extern struct dev_lcd_fb_t g_drv_info;
+#include "include.h"
 
-struct dev_lcd_fb_t {
+struct sunxi_lcd_fb_dev_lcd_fb_t {
 	struct device *device;
 	struct work_struct start_work;
-	unsigned char lcd_fb_num;
+	u32 lcd_fb_num;
+	u32 lcd_panel_count;
 };
 
+extern struct sunxi_lcd_fb_dev_lcd_fb_t g_drv_info;
+
 #endif /* End of file */
diff --git a/drivers/video/sunxi/lcd_fb/disp_display.c b/drivers/video/sunxi/lcd_fb/disp_display.c
index f5f00f0ef..381cd0513 100644
--- a/drivers/video/sunxi/lcd_fb/disp_display.c
+++ b/drivers/video/sunxi/lcd_fb/disp_display.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Allwinner SoCs display driver.
@@ -20,15 +20,14 @@
 #include "disp_lcd.h"
 #include "dev_lcd_fb.h"
 
-struct disp_dev_t gdisp;
+struct sunxi_lcd_fb_disp_dev_t g_lcd_fb_disp;
 
-
-s32 bsp_disp_get_screen_physical_width(u32 disp)
+s32 sunxi_lcd_fb_bsp_disp_get_screen_physical_width(u32 disp)
 {
 	s32 width = 0;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd == NULL)
 		return -1;
 
@@ -37,12 +36,12 @@ s32 bsp_disp_get_screen_physical_width(u32 disp)
 	return width;
 }
 
-s32 bsp_disp_get_screen_physical_height(u32 disp)
+s32 sunxi_lcd_fb_bsp_disp_get_screen_physical_height(u32 disp)
 {
 	s32 height = 0;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd == NULL)
 		return -1;
 
@@ -51,64 +50,66 @@ s32 bsp_disp_get_screen_physical_height(u32 disp)
 	return height;
 }
 
-s32 bsp_disp_lcd_set_layer(unsigned int disp, struct fb_info *p_info)
+s32 sunxi_lcd_fb_bsp_disp_lcd_set_layer(u32 disp,
+						     struct fb_info *p_info)
 {
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd == NULL) {
-		lcd_fb_wrn("Get lcd device fail!\n");
+		LCDFB_WRN("Get lcd device fail!\n");
 		return -1;
 	}
 
-	return  lcd->set_layer(lcd, p_info);
+	return lcd->set_layer(lcd, p_info);
 }
 
-s32 bsp_disp_lcd_wait_for_vsync(unsigned int disp)
+s32 sunxi_lcd_fb_bsp_disp_lcd_wait_for_vsync(u32 disp)
 {
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd == NULL) {
-		lcd_fb_wrn("Get lcd device fail!\n");
+		LCDFB_WRN("Get lcd device fail!\n");
 		return -1;
 	}
 
-	return  lcd->wait_for_vsync(lcd);
+	return lcd->wait_for_vsync(lcd);
 }
 
-s32 bsp_disp_lcd_set_var(unsigned int disp, struct fb_info *p_info)
+s32 sunxi_lcd_fb_bsp_disp_lcd_set_var(u32 disp,
+						   struct fb_info *p_info)
 {
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd == NULL) {
-		lcd_fb_wrn("Get lcd device fail!\n");
+		LCDFB_WRN("Get lcd device fail!\n");
 		return -1;
 	}
 
-	return  lcd->set_var(lcd, p_info);
+	return lcd->set_var(lcd, p_info);
 }
 
-s32 bsp_disp_lcd_blank(unsigned int disp, unsigned int en)
+s32 sunxi_lcd_fb_bsp_disp_lcd_blank(u32 disp, u32 en)
 {
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd == NULL) {
-		lcd_fb_wrn("Get lcd device fail!\n");
+		LCDFB_WRN("Get lcd device fail!\n");
 		return -1;
 	}
 
-	return  lcd->blank(lcd, en);
+	return lcd->blank(lcd, en);
 }
 
-s32 bsp_disp_get_screen_width(u32 disp)
+s32 sunxi_lcd_fb_bsp_disp_get_screen_width(u32 disp)
 {
 	s32 width = 0;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd == NULL)
 		return -1;
 
@@ -117,12 +118,12 @@ s32 bsp_disp_get_screen_width(u32 disp)
 	return width;
 }
 
-s32 bsp_disp_get_screen_height(u32 disp)
+s32 sunxi_lcd_fb_bsp_disp_get_screen_height(u32 disp)
 {
 	s32 height = 0;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd == NULL)
 		return -2;
 
@@ -131,22 +132,22 @@ s32 bsp_disp_get_screen_height(u32 disp)
 	return height;
 }
 
-
-s32 bsp_disp_lcd_set_panel_funs(char *name, struct disp_lcd_panel_fun *lcd_cfg)
+s32 sunxi_lcd_fb_bsp_disp_lcd_set_panel_funs(
+	char *name, struct sunxi_lcd_fb_disp_lcd_panel_fun *lcd_cfg)
 {
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 	u32 num_screens;
 	u32 screen_id;
 	u32 registered_cnt = 0;
 
 	num_screens = 2;
 	for (screen_id = 0; screen_id < num_screens; screen_id++) {
-		lcd = disp_get_lcd(screen_id);
+		lcd = sunxi_lcd_fb_disp_get_lcd(screen_id);
 		if (lcd && (lcd->set_panel_func)) {
 			if (!lcd->set_panel_func(lcd, name, lcd_cfg)) {
-				gdisp.lcd_registered[screen_id] = 1;
+				g_lcd_fb_disp.lcd_registered[screen_id] = 1;
 				registered_cnt++;
-				lcd_fb_inf("panel driver %s register\n", name);
+				LCDFB_INF("panel driver %s register\n", name);
 			}
 		}
 	}
@@ -154,37 +155,37 @@ s32 bsp_disp_lcd_set_panel_funs(char *name, struct disp_lcd_panel_fun *lcd_cfg)
 	return 0;
 }
 
-void LCD_OPEN_FUNC(u32 disp, LCD_FUNC func, u32 delay)
+void LCD_FB_OPEN_FUNC(u32 disp, LCD_FUNC func, u32 delay)
 {
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 
 	if (lcd && lcd->set_open_func)
 		lcd->set_open_func(lcd, func, delay);
 }
 
-void LCD_CLOSE_FUNC(u32 disp, LCD_FUNC func, u32 delay)
+void LCD_FB_CLOSE_FUNC(u32 disp, LCD_FUNC func, u32 delay)
 {
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 
 	if (lcd && lcd->set_close_func)
 		lcd->set_close_func(lcd, func, delay);
 }
 
-s32 bsp_disp_get_lcd_registered(u32 disp)
+s32 sunxi_lcd_fb_bsp_disp_get_lcd_registered(u32 disp)
 {
-	return gdisp.lcd_registered[disp];
+	return g_lcd_fb_disp.lcd_registered[disp];
 }
 
-s32 bsp_disp_lcd_backlight_enable(u32 disp)
+s32 sunxi_lcd_fb_bsp_disp_lcd_backlight_enable(u32 disp)
 {
 	s32 ret = -1;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd == NULL)
 		return ret;
 
@@ -194,12 +195,12 @@ s32 bsp_disp_lcd_backlight_enable(u32 disp)
 	return ret;
 }
 
-s32 bsp_disp_lcd_backlight_disable(u32 disp)
+s32 sunxi_lcd_fb_bsp_disp_lcd_backlight_disable(u32 disp)
 {
 	s32 ret = -1;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd == NULL)
 		return ret;
 
@@ -209,12 +210,12 @@ s32 bsp_disp_lcd_backlight_disable(u32 disp)
 	return ret;
 }
 
-s32 bsp_disp_lcd_pwm_enable(u32 disp)
+s32 sunxi_lcd_fb_bsp_disp_lcd_pwm_enable(u32 disp)
 {
 	s32 ret = -1;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd == NULL)
 		return ret;
 
@@ -224,12 +225,12 @@ s32 bsp_disp_lcd_pwm_enable(u32 disp)
 	return ret;
 }
 
-s32 bsp_disp_lcd_pwm_disable(u32 disp)
+s32 sunxi_lcd_fb_bsp_disp_lcd_pwm_disable(u32 disp)
 {
 	s32 ret = -1;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd == NULL)
 		return ret;
 
@@ -239,12 +240,12 @@ s32 bsp_disp_lcd_pwm_disable(u32 disp)
 	return ret;
 }
 
-s32 bsp_disp_lcd_power_enable(u32 disp, u32 power_id)
+s32 sunxi_lcd_fb_bsp_disp_lcd_power_enable(u32 disp, u32 power_id)
 {
 	s32 ret = -1;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd == NULL)
 		return ret;
 
@@ -254,12 +255,12 @@ s32 bsp_disp_lcd_power_enable(u32 disp, u32 power_id)
 	return ret;
 }
 
-s32 bsp_disp_lcd_power_disable(u32 disp, u32 power_id)
+s32 sunxi_lcd_fb_bsp_disp_lcd_power_disable(u32 disp, u32 power_id)
 {
 	s32 ret = -1;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd == NULL)
 		return ret;
 
@@ -269,12 +270,12 @@ s32 bsp_disp_lcd_power_disable(u32 disp, u32 power_id)
 	return ret;
 }
 
-s32 bsp_disp_lcd_set_bright(u32 disp, u32 bright)
+s32 sunxi_lcd_fb_bsp_disp_lcd_set_bright(u32 disp, u32 bright)
 {
 	s32 ret = -1;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd == NULL)
 		return ret;
 
@@ -284,63 +285,66 @@ s32 bsp_disp_lcd_set_bright(u32 disp, u32 bright)
 	return ret;
 }
 
-s32 bsp_disp_lcd_get_bright(u32 disp)
+s32 sunxi_lcd_fb_bsp_disp_lcd_get_bright(u32 disp)
 {
 	u32 bright = 0;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd && lcd->get_bright)
 		bright = lcd->get_bright(lcd);
 
 	return bright;
 }
 
-
-s32 bsp_disp_lcd_pin_cfg(u32 disp, u32 en)
+s32 sunxi_lcd_fb_bsp_disp_lcd_pin_cfg(u32 disp, u32 en)
 {
 	int ret = -1;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd && lcd->pin_cfg)
 		ret = lcd->pin_cfg(lcd, en);
 
 	return ret;
 }
 
-s32 bsp_disp_lcd_gpio_set_value(u32 disp, u32 io_index, u32 value)
+s32 sunxi_lcd_fb_bsp_disp_lcd_gpio_set_value(u32 disp,
+							  u32 io_index,
+							  u32 value)
 {
 	int ret = -1;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd && lcd->gpio_set_value)
 		ret = lcd->gpio_set_value(lcd, io_index, value);
 
 	return ret;
 }
 
-s32 bsp_disp_lcd_gpio_set_direction(u32 disp, unsigned int io_index,
-				    u32 direction)
+s32 sunxi_lcd_fb_bsp_disp_lcd_gpio_set_direction(u32 disp,
+								  u32 io_index,
+								  u32 direction)
 {
 	int ret = -1;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (lcd && lcd->gpio_set_direction)
 		ret = lcd->gpio_set_direction(lcd, io_index, direction);
 
 	return ret;
 }
 
-s32 bsp_disp_get_panel_info(u32 disp, struct disp_panel_para *info)
+s32 sunxi_lcd_fb_bsp_disp_get_panel_info(
+	u32 disp, struct sunxi_lcd_fb_disp_panel_para *info)
 {
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(disp);
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
 	if (!lcd)
-		lcd_fb_wrn("get lcd%d fail\n", disp);
+		LCDFB_WRN("get lcd%d fail\n", disp);
 
 	if (lcd && lcd->get_panel_info)
 		return lcd->get_panel_info(lcd, info);
@@ -348,29 +352,28 @@ s32 bsp_disp_get_panel_info(u32 disp, struct disp_panel_para *info)
 	return -1;
 }
 
-int bsp_disp_get_display_size(u32 disp, unsigned int *width,
-			      unsigned int *height)
+int sunxi_lcd_fb_bsp_disp_get_display_size(u32 disp, u32 *width, u32 *height)
 {
 	return 0;
 }
 
 static LIST_HEAD(device_list);
 
-s32 lcd_fb_device_register(struct lcd_fb_device *dispdev)
+s32 sunxi_sunxi_lcd_fb_device_register(struct sunxi_lcd_fb_device *dispdev)
 {
 	list_add_tail(&dispdev->list, &device_list);
 	return 0;
 }
 
-s32 lcd_fb_device_unregister(struct lcd_fb_device *dispdev)
+s32 sunxi_sunxi_lcd_fb_device_unregister(struct sunxi_lcd_fb_device *dispdev)
 {
 	list_del(&dispdev->list);
 	return 0;
 }
 
-struct lcd_fb_device *lcd_fb_device_get(int disp)
+struct sunxi_lcd_fb_device *sunxi_sunxi_lcd_fb_device_get(int disp)
 {
-	struct lcd_fb_device *dispdev = NULL;
+	struct sunxi_lcd_fb_device *dispdev = NULL;
 
 	list_for_each_entry(dispdev, &device_list, list) {
 		if (dispdev->disp == disp) {
@@ -381,11 +384,10 @@ struct lcd_fb_device *lcd_fb_device_get(int disp)
 	return NULL;
 }
 
-
-extern struct dev_lcd_fb_t g_drv_info;
+extern struct sunxi_lcd_fb_dev_lcd_fb_t g_drv_info;
 #define MY_BYTE_ALIGN(x) (((x + (4 * 1024 - 1)) >> 12) << 12)
 
-void *lcd_fb_dma_malloc(u32 num_bytes, void *phys_addr)
+void *sunxi_lcd_fb_dma_malloc(u32 num_bytes, void *phys_addr)
 {
 	u32 actual_bytes;
 	void *address = NULL;
@@ -393,26 +395,28 @@ void *lcd_fb_dma_malloc(u32 num_bytes, void *phys_addr)
 	if (num_bytes != 0) {
 		actual_bytes = MY_BYTE_ALIGN(num_bytes);
 
-		address = dma_alloc_coherent(
-		    g_drv_info.device, actual_bytes, (dma_addr_t *)phys_addr, GFP_KERNEL);
+		address = dma_alloc_coherent(g_drv_info.device, actual_bytes,
+					     (dma_addr_t *)phys_addr,
+					     GFP_KERNEL);
 		if (address) {
-			lcd_fb_inf(
-			    "dma_alloc_coherent ok, address=0x%p, size=0x%x\n",
-			    (void *)(*(unsigned long *)phys_addr), num_bytes);
+			LCDFB_INF(
+				"dma_alloc_coherent ok, address=0x%p, size=0x%x\n",
+				(void *)(*(unsigned long *)phys_addr),
+				num_bytes);
 			return address;
 		} else {
-			lcd_fb_wrn("dma_alloc_coherent fail, size=0x%x\n",
-				num_bytes);
+			LCDFB_WRN("dma_alloc_coherent fail, size=0x%x\n",
+				  num_bytes);
 			return NULL;
 		}
 	} else {
-		lcd_fb_wrn("%s size is zero\n", __func__);
+		LCDFB_WRN("%s size is zero\n", __func__);
 	}
 
 	return NULL;
 }
 
-void lcd_fb_dma_free(void *virt_addr, void *phys_addr, u32 num_bytes)
+void sunxi_lcd_fb_dma_free(void *virt_addr, void *phys_addr, u32 num_bytes)
 {
 	u32 actual_bytes;
 
@@ -422,40 +426,37 @@ void lcd_fb_dma_free(void *virt_addr, void *phys_addr, u32 num_bytes)
 				  (dma_addr_t)(uintptr_t)phys_addr);
 }
 
-
-s32 bsp_disp_lcd_cmd_write(unsigned int screen_id,
-					 unsigned char cmd)
+s32 sunxi_lcd_fb_bsp_disp_lcd_cmd_write(u32 screen_id, u8 cmd)
 {
 	int ret = -1;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(screen_id);
+	lcd = sunxi_lcd_fb_disp_get_lcd(screen_id);
 	if (lcd && lcd->cmd_write)
 		ret = lcd->cmd_write(lcd, cmd);
 
 	return ret;
 }
 
-s32 bsp_disp_lcd_para_write(unsigned int screen_id,
-					 unsigned char para)
+s32 sunxi_lcd_fb_bsp_disp_lcd_para_write(u32 screen_id, u8 para)
 {
 	int ret = -1;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(screen_id);
+	lcd = sunxi_lcd_fb_disp_get_lcd(screen_id);
 	if (lcd && lcd->para_write)
 		ret = lcd->para_write(lcd, para);
 
 	return ret;
 }
 
-s32 bsp_disp_lcd_cmd_read(unsigned int screen_id, unsigned char cmd,
-			  unsigned char *rx_buf, unsigned char len)
+s32 sunxi_lcd_fb_bsp_disp_lcd_cmd_read(u32 screen_id, u8 cmd,
+						    u8 *rx_buf, u8 len)
 {
 	int ret = -1;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
-	lcd = disp_get_lcd(screen_id);
+	lcd = sunxi_lcd_fb_disp_get_lcd(screen_id);
 	if (lcd && lcd->para_write)
 		ret = lcd->cmd_read(lcd, cmd, rx_buf, len);
 
diff --git a/drivers/video/sunxi/lcd_fb/disp_display.h b/drivers/video/sunxi/lcd_fb/disp_display.h
index 24272fa62..4d161adf8 100644
--- a/drivers/video/sunxi/lcd_fb/disp_display.h
+++ b/drivers/video/sunxi/lcd_fb/disp_display.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Allwinner SoCs display driver.
@@ -20,55 +20,89 @@
 #ifndef __DISP_DISPLAY_H__
 #define __DISP_DISPLAY_H__
 
-
-
-struct disp_dev_t {
+struct sunxi_lcd_fb_disp_dev_t {
 	u32 print_level;
 	u32 lcd_registered[3];
 };
 
+extern struct sunxi_lcd_fb_disp_dev_t g_lcd_fb_disp;
+
+void LCD_FB_OPEN_FUNC(u32 screen_id, LCD_FUNC func, u32 delay);
+
+void LCD_FB_CLOSE_FUNC(u32 screen_id, LCD_FUNC func, u32 delay);
+
+s32 sunxi_lcd_fb_bsp_disp_get_screen_physical_width(u32 disp);
+
+s32 sunxi_lcd_fb_bsp_disp_get_screen_physical_height(u32 disp);
+
+s32 sunxi_lcd_fb_bsp_disp_get_screen_width(u32 disp);
+
+s32 sunxi_lcd_fb_bsp_disp_get_screen_height(u32 disp);
 
-extern struct disp_dev_t gdisp;
-void LCD_OPEN_FUNC(u32 screen_id, LCD_FUNC func, u32 delay);
-void LCD_CLOSE_FUNC(u32 screen_id, LCD_FUNC func, u32 delay);
-s32 bsp_disp_get_screen_physical_width(u32 disp);
-s32 bsp_disp_get_screen_physical_height(u32 disp);
-s32 bsp_disp_get_screen_width(u32 disp);
-s32 bsp_disp_get_screen_height(u32 disp);
 /* lcd */
-s32 bsp_disp_lcd_set_panel_funs(char *name, struct disp_lcd_panel_fun *lcd_cfg);
-s32 bsp_disp_lcd_backlight_enable(u32 disp);
-s32 bsp_disp_lcd_backlight_disable(u32 disp);
-s32 bsp_disp_lcd_pwm_enable(u32 disp);
-s32 bsp_disp_lcd_pwm_disable(u32 disp);
-s32 bsp_disp_lcd_power_enable(u32 disp, u32 power_id);
-s32 bsp_disp_lcd_power_disable(u32 disp, u32 power_id);
-s32 bsp_disp_lcd_set_bright(u32 disp, u32 bright);
-s32 bsp_disp_lcd_get_bright(u32 disp);
-s32 bsp_disp_lcd_pin_cfg(u32 disp, u32 en);
-s32 bsp_disp_lcd_gpio_set_value(u32 disp, u32 io_index, u32 value);
-s32 bsp_disp_lcd_gpio_set_direction(u32 disp, unsigned int io_index,
-				    u32 direction);
-struct disp_lcd_flow *bsp_disp_lcd_get_open_flow(u32 disp);
-struct disp_lcd_flow *bsp_disp_lcd_get_close_flow(u32 disp);
-s32 bsp_disp_get_panel_info(u32 disp, struct disp_panel_para *info);
-
-int bsp_disp_get_display_size(u32 disp, unsigned int *width,
-			      unsigned int *height);
-void *lcd_fb_dma_malloc(u32 num_bytes, void *phys_addr);
-void lcd_fb_dma_free(void *virt_addr, void *phys_addr, u32 num_bytes);
-struct lcd_fb_device *lcd_fb_device_get(int disp);
-s32 lcd_fb_device_register(struct lcd_fb_device *dispdev);
-s32 lcd_fb_device_unregister(struct lcd_fb_device *dispdev);
-s32 bsp_disp_lcd_set_layer(unsigned int disp, struct fb_info *p_info);
-s32 bsp_disp_lcd_blank(unsigned int disp, unsigned int en);
-s32 bsp_disp_lcd_set_var(unsigned int disp, struct fb_info *p_info);
-s32 bsp_disp_lcd_cmd_write(unsigned int screen_id,
-					 unsigned char cmd);
-s32 bsp_disp_lcd_para_write(unsigned int screen_id,
-					 unsigned char para);
-s32 bsp_disp_lcd_cmd_read(unsigned int screen_id, unsigned char cmd,
-			  unsigned char *rx_buf, unsigned char len);
-s32 bsp_disp_lcd_wait_for_vsync(unsigned int disp);
+s32 sunxi_lcd_fb_bsp_disp_lcd_set_panel_funs(
+	char *name, struct sunxi_lcd_fb_disp_lcd_panel_fun *lcd_cfg);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_backlight_enable(u32 disp);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_backlight_disable(u32 disp);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_pwm_enable(u32 disp);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_pwm_disable(u32 disp);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_power_enable(u32 disp, u32 power_id);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_power_disable(u32 disp,
+							 u32 power_id);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_set_bright(u32 disp, u32 bright);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_get_bright(u32 disp);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_pin_cfg(u32 disp, u32 en);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_gpio_set_value(u32 disp,
+							  u32 io_index,
+							  u32 value);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_gpio_set_direction(
+	u32 disp, u32 io_index, u32 direction);
+
+struct sunxi_lcd_fb_disp_lcd_flow *bsp_disp_lcd_get_open_flow(u32 disp);
+
+struct sunxi_lcd_fb_disp_lcd_flow *bsp_disp_lcd_get_close_flow(u32 disp);
+
+s32 sunxi_lcd_fb_bsp_disp_get_panel_info(
+	u32 disp, struct sunxi_lcd_fb_disp_panel_para *info);
+
+int sunxi_lcd_fb_bsp_disp_get_display_size(u32 disp, u32 *width, u32 *height);
+
+void *sunxi_lcd_fb_dma_malloc(u32 num_bytes, void *phys_addr);
+
+void sunxi_lcd_fb_dma_free(void *virt_addr, void *phys_addr, u32 num_bytes);
+
+struct sunxi_lcd_fb_device *sunxi_sunxi_lcd_fb_device_get(int disp);
+
+s32 sunxi_sunxi_lcd_fb_device_register(struct sunxi_lcd_fb_device *dispdev);
+
+s32 sunxi_sunxi_lcd_fb_device_unregister(struct sunxi_lcd_fb_device *dispdev);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_set_layer(u32 disp,
+						     struct fb_info *p_info);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_blank(u32 disp, u32 en);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_set_var(u32 disp,
+						   struct fb_info *p_info);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_cmd_write(u32 screen_id, u8 cmd);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_para_write(u32 screen_id, u8 para);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_cmd_read(u32 screen_id, u8 cmd,
+						    u8 *rx_buf, u8 len);
+
+s32 sunxi_lcd_fb_bsp_disp_lcd_wait_for_vsync(u32 disp);
 
 #endif
diff --git a/drivers/video/sunxi/lcd_fb/disp_lcd.c b/drivers/video/sunxi/lcd_fb/disp_lcd.c
index 9cf693c1d..edf50646a 100644
--- a/drivers/video/sunxi/lcd_fb/disp_lcd.c
+++ b/drivers/video/sunxi/lcd_fb/disp_lcd.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Allwinner SoCs display driver.
@@ -15,17 +15,17 @@
 #include <linux/backlight.h>
 #include <linux/hrtimer.h>
 
-#define LCD_SPI_MAX_TRANSFER_BYTE (100*PAGE_SIZE)
+#define LCD_SPI_MAX_TRANSFER_BYTE (100 * PAGE_SIZE)
 
 struct disp_lcd_private_data {
-	struct disp_lcd_flow open_flow;
-	struct disp_lcd_flow close_flow;
-	struct disp_panel_para panel_info;
-	struct panel_extend_para panel_extend_info;
-	struct panel_extend_para panel_extend_info_set;
-	u32    panel_extend_dirty;
-	struct disp_lcd_cfg lcd_cfg;
-	struct disp_lcd_panel_fun lcd_panel_fun;
+	struct sunxi_lcd_fb_disp_lcd_flow open_flow;
+	struct sunxi_lcd_fb_disp_lcd_flow close_flow;
+	struct sunxi_lcd_fb_disp_panel_para panel_info;
+	struct sunxi_lcd_fb_panel_extend_para panel_extend_info;
+	struct sunxi_lcd_fb_panel_extend_para panel_extend_info_set;
+	u32 panel_extend_dirty;
+	struct sunxi_lcd_fb_disp_lcd_cfg lcd_cfg;
+	struct sunxi_lcd_fb_disp_lcd_panel_fun lcd_panel_fun;
 	bool enabling;
 	bool disabling;
 	bool bl_enabled;
@@ -52,28 +52,31 @@ struct disp_lcd_private_data {
 };
 static spinlock_t lcd_data_lock;
 
-static struct lcd_fb_device *lcds;
+static struct sunxi_lcd_fb_device *lcds;
 static struct disp_lcd_private_data *lcd_private;
 
-struct lcd_fb_device *disp_get_lcd(u32 disp)
+struct sunxi_lcd_fb_device *sunxi_lcd_fb_disp_get_lcd(u32 disp)
 {
-	if (disp > SUPPORT_MAX_LCD - 1)
+	if (disp > g_drv_info.lcd_panel_count - 1)
 		return NULL;
 	return &lcds[disp];
 }
-static struct disp_lcd_private_data *disp_lcd_get_priv(struct lcd_fb_device *lcd)
+
+static struct disp_lcd_private_data *
+sunxi_lcd_fb_disp_lcd_get_priv(struct sunxi_lcd_fb_device *lcd)
 {
 	if (lcd == NULL) {
-		lcd_fb_wrn("param is NULL!\n");
+		LCDFB_WRN("param is NULL!\n");
 		return NULL;
 	}
 
 	return (struct disp_lcd_private_data *)lcd->priv_data;
 }
 
-static s32 disp_lcd_is_used(struct lcd_fb_device *lcd)
+static s32 sunxi_lcd_fb_disp_lcd_is_used(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	s32 ret = 0;
 
 	if ((lcd == NULL) || (lcdp == NULL))
@@ -84,123 +87,165 @@ static s32 disp_lcd_is_used(struct lcd_fb_device *lcd)
 	return ret;
 }
 
-static s32 lcd_parse_panel_para(u32 disp, struct disp_panel_para *info)
+static s32
+sunxi_lcd_fb_lcd_parse_panel_para(u32 disp,
+				  struct sunxi_lcd_fb_disp_panel_para *info)
 {
 	s32 ret = 0;
-	char primary_key[25];
 	s32 value = 0;
-	u32 Bpp = 0, lines = 0;
+	u32 lines = 0;
+	struct sunxi_lcd_fb_device *lcd;
+	struct device_node *panel_node;
+
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
+	if (lcd == NULL)
+		return -1;
 
-	sprintf(primary_key, "lcd_fb%d", disp);
+	panel_node = lcd->panel_node;
 	memset(info, 0, sizeof(*info));
 
-	ret = lcd_fb_script_get_item(primary_key, "lcd_x", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_x", &value, 1);
 	if (ret == 1)
 		info->lcd_x = value;
 
-	ret = lcd_fb_script_get_item(primary_key, "lcd_y", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_y", &value, 1);
 	if (ret == 1)
 		info->lcd_y = value;
 
-	ret = lcd_fb_script_get_item(primary_key, "lcd_width", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_width", &value, 1);
 	if (ret == 1)
 		info->lcd_width = value;
 
-	ret = lcd_fb_script_get_item(primary_key, "lcd_height", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_height", &value, 1);
 	if (ret == 1)
 		info->lcd_height = value;
 
 	/* unit:Mhz, speed of rgb data transfer */
-	ret = lcd_fb_script_get_item(primary_key, "lcd_data_speed", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_data_speed", &value,
+					   1);
 	if (ret == 1)
 		info->lcd_data_speed = value;
 
-	ret = lcd_fb_script_get_item(primary_key, "lcd_pwm_used", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_pwm_used", &value,
+					   1);
 	if (ret == 1)
 		info->lcd_pwm_used = value;
 
 	if (info->lcd_pwm_used) {
-		ret = lcd_fb_script_get_item(primary_key, "lcd_pwm_ch", &value, 1);
+		ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_pwm_ch",
+						   &value, 1);
 		if (ret == 1)
 			info->lcd_pwm_ch = value;
 
-		ret = lcd_fb_script_get_item(primary_key, "lcd_pwm_freq", &value, 1);
+		ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_pwm_freq",
+						   &value, 1);
 		if (ret == 1)
 			info->lcd_pwm_freq = value;
 
-		ret = lcd_fb_script_get_item(primary_key, "lcd_pwm_pol", &value, 1);
+		ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_pwm_pol",
+						   &value, 1);
 		if (ret == 1)
 			info->lcd_pwm_pol = value;
 	}
 
-	ret = lcd_fb_script_get_item(primary_key, "lcd_if", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_if", &value, 1);
 	if (ret == 1)
 		info->lcd_if = value;
 
-	ret = lcd_fb_script_get_item(primary_key, "lcd_pixel_fmt", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_qspi_if", &value,
+					   1);
+	if (ret == 1) {
+		info->qspi_if = value;
+		LCDFB_DBG("panel is in qspi mode, qspi_if = %d\n", value);
+	}
+
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_pixel_fmt", &value,
+					   1);
 	if (ret == 1)
 		info->lcd_pixel_fmt = value;
 
-	ret = lcd_fb_script_get_item(primary_key, "lcd_dbi_fmt", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_dbi_fmt", &value,
+					   1);
 	if (ret == 1)
 		info->lcd_dbi_fmt = value;
 
-	ret = lcd_fb_script_get_item(primary_key, "lcd_dbi_clk_mode", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_dbi_clk_mode",
+					   &value, 1);
 	if (ret == 1)
 		info->lcd_dbi_clk_mode = value;
 
-	ret = lcd_fb_script_get_item(primary_key, "lcd_dbi_te", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_dbi_te", &value, 1);
 	if (ret == 1)
 		info->lcd_dbi_te = value;
 
-	ret = lcd_fb_script_get_item(primary_key, "fb_buffer_num", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "fb_buffer_num", &value,
+					   1);
 	if (ret == 1)
 		info->fb_buffer_num = value;
 	else
 		info->fb_buffer_num = 2;
 
-	ret = lcd_fb_script_get_item(primary_key, "lcd_dbi_if", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_dbi_if", &value, 1);
 	if (ret == 1)
 		info->dbi_if = value;
 
-
-	ret = lcd_fb_script_get_item(primary_key, "lcd_rgb_order", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_rgb_order", &value,
+					   1);
 	if (ret == 1)
 		info->lcd_rgb_order = value;
 
-	ret = lcd_fb_script_get_item(primary_key, "lcd_fps", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_fps", &value, 1);
 	if (ret == 1)
 		info->lcd_fps = value;
 	else
 		info->lcd_fps = 25;
 
-	ret = lcd_fb_script_get_item(primary_key, "lcd_spi_bus_num", &value, 1);
-	if (ret == 1)
-		info->lcd_spi_bus_num = value;
-
-	ret = lcd_fb_script_get_item(primary_key, "lcd_frm", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_frm", &value, 1);
 	if (ret == 1)
 		info->lcd_frm = value;
 
-
-	ret = lcd_fb_script_get_item(primary_key, "lcd_gamma_en", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_gamma_en", &value,
+					   1);
 	if (ret == 1)
 		info->lcd_gamma_en = value;
 
-	ret =
-	    lcd_fb_script_get_item(primary_key, "lcd_model_name",
-				     (int *)info->lcd_model_name, 2);
-
-	if (info->lcd_pixel_fmt <= LCDFB_FORMAT_BGR_888) {
-		Bpp = 4;
-	} else if (info->lcd_pixel_fmt == LCDFB_FORMAT_BGR_888 ||
-		   info->lcd_pixel_fmt == LCDFB_FORMAT_RGB_888) {
-		Bpp = 3;
-	} else if (info->lcd_pixel_fmt >= LCDFB_FORMAT_RGB_565) {
-		Bpp = 2;
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_model_name",
+					   (int *)info->lcd_model_name, 2);
+
+	switch (info->lcd_pixel_fmt) {
+	case LCDFB_FORMAT_ARGB_8888:
+	case LCDFB_FORMAT_ABGR_8888:
+	case LCDFB_FORMAT_RGBA_8888:
+	case LCDFB_FORMAT_BGRA_8888:
+	case LCDFB_FORMAT_XRGB_8888:
+	case LCDFB_FORMAT_XBGR_8888:
+	case LCDFB_FORMAT_RGBX_8888:
+	case LCDFB_FORMAT_BGRX_8888:
+		info->bpp = 4;
+		break;
+	case LCDFB_FORMAT_RGB_888:
+	case LCDFB_FORMAT_BGR_888:
+		info->bpp = 3;
+		break;
+	case LCDFB_FORMAT_RGB_565:
+	case LCDFB_FORMAT_BGR_565:
+	case LCDFB_FORMAT_ARGB_4444:
+	case LCDFB_FORMAT_ABGR_4444:
+	case LCDFB_FORMAT_RGBA_4444:
+	case LCDFB_FORMAT_BGRA_4444:
+	case LCDFB_FORMAT_ARGB_1555:
+	case LCDFB_FORMAT_ABGR_1555:
+	case LCDFB_FORMAT_RGBA_5551:
+	case LCDFB_FORMAT_BGRA_5551:
+		info->bpp = 2;
+		break;
+	default:
+		info->bpp = 4;
+		break;
 	}
+
 	info->lines_per_transfer = 1;
-	lines = LCD_SPI_MAX_TRANSFER_BYTE / (info->lcd_x * Bpp);
+	lines = LCD_SPI_MAX_TRANSFER_BYTE / (info->lcd_x * info->bpp);
 	for (; lines > 1; --lines) {
 		if (!(info->lcd_y % lines))
 			break;
@@ -212,17 +257,26 @@ static s32 lcd_parse_panel_para(u32 disp, struct disp_panel_para *info)
 	return 0;
 }
 
-static void lcd_get_sys_config(u32 disp, struct disp_lcd_cfg *lcd_cfg)
+static void
+sunxi_lcd_fb_lcd_get_sys_config(u32 disp,
+				struct sunxi_lcd_fb_disp_lcd_cfg *lcd_cfg)
 {
 	struct disp_gpio_info *gpio_info;
 	int value = 1;
-	char primary_key[20], sub_name[25];
+	char sub_name[25];
 	int i = 0;
 	int ret;
+	struct sunxi_lcd_fb_device *lcd;
+	struct device_node *panel_node;
+
+	lcd = sunxi_lcd_fb_disp_get_lcd(disp);
+	if (lcd == NULL)
+		return;
+
+	panel_node = lcd->panel_node;
 
-	sprintf(primary_key, "lcd_fb%d", disp);
 	/* lcd_used */
-	ret = lcd_fb_script_get_item(primary_key, "lcd_used", &value, 1);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_used", &value, 1);
 	if (ret == 1)
 		lcd_cfg->lcd_used = value;
 
@@ -232,16 +286,14 @@ static void lcd_get_sys_config(u32 disp, struct disp_lcd_cfg *lcd_cfg)
 	/* lcd_bl_en */
 	lcd_cfg->lcd_bl_en_used = 0;
 	gpio_info = &(lcd_cfg->lcd_bl_en);
-	ret =
-	    lcd_fb_script_get_item(primary_key, "lcd_bl_en", (int *)gpio_info,
-				     3);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_bl_en",
+					   (int *)gpio_info, 3);
 	if (ret == 3)
 		lcd_cfg->lcd_bl_en_used = 1;
 
 	sprintf(sub_name, "lcd_bl_en_power");
-	ret =
-	    lcd_fb_script_get_item(primary_key, sub_name,
-				     (int *)lcd_cfg->lcd_bl_en_power, 2);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, sub_name,
+					   (int *)lcd_cfg->lcd_bl_en_power, 2);
 
 	/* lcd fix power */
 	for (i = 0; i < LCD_POWER_NUM; i++) {
@@ -250,10 +302,9 @@ static void lcd_get_sys_config(u32 disp, struct disp_lcd_cfg *lcd_cfg)
 		else
 			sprintf(sub_name, "lcd_fix_power%d", i);
 		lcd_cfg->lcd_power_used[i] = 0;
-		ret =
-		    lcd_fb_script_get_item(primary_key, sub_name,
-					     (int *)(lcd_cfg->lcd_fix_power[i]),
-					     2);
+		ret = sunxi_lcd_fb_script_get_item(
+			panel_node, sub_name,
+			(int *)(lcd_cfg->lcd_fix_power[i]), 2);
 		if (ret == 2)
 			/* str */
 			lcd_cfg->lcd_fix_power_used[i] = 1;
@@ -266,9 +317,9 @@ static void lcd_get_sys_config(u32 disp, struct disp_lcd_cfg *lcd_cfg)
 		else
 			sprintf(sub_name, "lcd_power%d", i);
 		lcd_cfg->lcd_power_used[i] = 0;
-		ret =
-		    lcd_fb_script_get_item(primary_key, sub_name,
-					     (int *)(lcd_cfg->lcd_power[i]), 2);
+		ret = sunxi_lcd_fb_script_get_item(
+			panel_node, sub_name, (int *)(lcd_cfg->lcd_power[i]),
+			2);
 		if (ret == 2)
 			/* str */
 			lcd_cfg->lcd_power_used[i] = 1;
@@ -279,27 +330,23 @@ static void lcd_get_sys_config(u32 disp, struct disp_lcd_cfg *lcd_cfg)
 		sprintf(sub_name, "lcd_gpio_%d", i);
 
 		gpio_info = &(lcd_cfg->lcd_gpio[i]);
-		ret =
-		    lcd_fb_script_get_item(primary_key, sub_name,
-					     (int *)gpio_info, 3);
+		ret = sunxi_lcd_fb_script_get_item(panel_node, sub_name,
+						   (int *)gpio_info, 3);
 		if (!ret)
 			lcd_cfg->lcd_gpio_used[i] = 1;
 	}
 
 	sprintf(sub_name, "lcd_spi_dc_pin");
 	gpio_info = &(lcd_cfg->lcd_spi_dc_pin);
-	ret =
-		lcd_fb_script_get_item(primary_key, sub_name,
-				       (int *)gpio_info, 3);
-
+	ret = sunxi_lcd_fb_script_get_item(panel_node, sub_name,
+					   (int *)gpio_info, 3);
 
 	for (i = 0; i < LCD_GPIO_REGU_NUM; i++) {
 		sprintf(sub_name, "lcd_gpio_power%d", i);
 
-		ret =
-		    lcd_fb_script_get_item(primary_key, sub_name,
-					     (int *)lcd_cfg->lcd_gpio_power[i],
-					     2);
+		ret = sunxi_lcd_fb_script_get_item(
+			panel_node, sub_name, (int *)lcd_cfg->lcd_gpio_power[i],
+			2);
 	}
 
 	for (i = 0; i < LCD_GPIO_REGU_NUM; i++) {
@@ -307,15 +354,14 @@ static void lcd_get_sys_config(u32 disp, struct disp_lcd_cfg *lcd_cfg)
 			sprintf(sub_name, "lcd_pin_power");
 		else
 			sprintf(sub_name, "lcd_pin_power%d", i);
-		ret =
-		    lcd_fb_script_get_item(primary_key, sub_name,
-					     (int *)lcd_cfg->lcd_pin_power[i],
-					     2);
+		ret = sunxi_lcd_fb_script_get_item(
+			panel_node, sub_name, (int *)lcd_cfg->lcd_pin_power[i],
+			2);
 	}
 
 	/* backlight adjust */
 	value = 0;
-	lcd_fb_script_get_item(primary_key, "lcd_pwm_used", &value, 1);
+	sunxi_lcd_fb_script_get_item(panel_node, "lcd_pwm_used", &value, 1);
 	if (value == 1) {
 		for (i = 0; i < 101; i++) {
 			sprintf(sub_name, "lcd_bl_%d_percent", i);
@@ -324,8 +370,8 @@ static void lcd_get_sys_config(u32 disp, struct disp_lcd_cfg *lcd_cfg)
 			if (i == 100)
 				lcd_cfg->backlight_curve_adjust[i] = 255;
 
-			ret =
-				lcd_fb_script_get_item(primary_key, sub_name, &value, 1);
+			ret = sunxi_lcd_fb_script_get_item(panel_node, sub_name,
+							   &value, 1);
 			if (ret == 1) {
 				value = (value > 100) ? 100 : value;
 				value = value * 255 / 100;
@@ -333,7 +379,8 @@ static void lcd_get_sys_config(u32 disp, struct disp_lcd_cfg *lcd_cfg)
 			}
 		}
 		sprintf(sub_name, "lcd_backlight");
-		ret = lcd_fb_script_get_item(primary_key, sub_name, &value, 1);
+		ret = sunxi_lcd_fb_script_get_item(panel_node, sub_name, &value,
+						   1);
 		if (ret == 1) {
 			value = (value > 256) ? 256 : value;
 			lcd_cfg->backlight_bright = value;
@@ -341,47 +388,51 @@ static void lcd_get_sys_config(u32 disp, struct disp_lcd_cfg *lcd_cfg)
 			lcd_cfg->backlight_bright = 197;
 		}
 	}
-
-
 }
 
-static s32 disp_lcd_pin_cfg(struct lcd_fb_device *lcd, u32 bon)
+static s32 sunxi_lcd_fb_disp_lcd_pin_cfg(struct sunxi_lcd_fb_device *lcd,
+					 u32 bon)
 {
 	int i, ret;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
-	char dev_name[25];
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
-	lcd_fb_inf("lcd %d pin config, state %s, %d\n", lcd->disp,
-	       (bon) ? "on" : "off", bon);
+
+	LCDFB_INF("lcd %d pin config, state %s, %d\n", lcd->disp,
+		  (bon) ? "on" : "off", bon);
 
 	/* io-pad */
 	if (bon == 1) {
 		for (i = 0; i < LCD_GPIO_REGU_NUM; i++) {
-			if (!
-				((!strcmp(lcdp->lcd_cfg.lcd_pin_power[i], ""))
-				|| (!strcmp(lcdp->lcd_cfg.lcd_pin_power[i], "none"))))
-			ret = lcd_fb_power_enable(lcdp->lcd_cfg.lcd_pin_power[i]);
+			if (!((!strcmp(lcdp->lcd_cfg.lcd_pin_power[i], "")) ||
+			      (!strcmp(lcdp->lcd_cfg.lcd_pin_power[i], "none"))))
+				ret = sunxi_lcd_fb_power_enable(
+					lcdp->lcd_cfg.lcd_pin_power[i]);
 			if (ret)
 				return DIS_FAIL;
 		}
 	}
 
-	sprintf(dev_name, "lcd_fb%d", lcd->disp);
-	lcd_fb_pin_set_state(dev_name,
-			       (bon == 1) ?
-			       DISP_PIN_STATE_ACTIVE : DISP_PIN_STATE_SLEEP);
+	sunxi_lcd_fb_pin_set_state(lcd, (bon == 1) ? DISP_PIN_STATE_ACTIVE :
+							   DISP_PIN_STATE_SLEEP);
 
 	if (bon)
 		return DIS_SUCCESS;
 
 	for (i = LCD_GPIO_REGU_NUM - 1; i >= 0; i--) {
-		if (!((!strcmp(lcdp->lcd_cfg.lcd_pin_power[i], ""))
-			|| (!strcmp(lcdp->lcd_cfg.lcd_pin_power[i], "none"))))
-		ret = lcd_fb_power_disable(lcdp->lcd_cfg.lcd_pin_power[i]);
+		if (!((!strcmp(lcdp->lcd_cfg.lcd_pin_power[i], "")) ||
+		      (!strcmp(lcdp->lcd_cfg.lcd_pin_power[i], "none"))))
+			ret = sunxi_lcd_fb_power_disable(
+				lcdp->lcd_cfg.lcd_pin_power[i]);
 		if (ret)
 			return DIS_FAIL;
 	}
@@ -389,58 +440,78 @@ static s32 disp_lcd_pin_cfg(struct lcd_fb_device *lcd, u32 bon)
 	return DIS_SUCCESS;
 }
 
-static s32 disp_lcd_pwm_enable(struct lcd_fb_device *lcd)
+static s32 sunxi_lcd_fb_disp_lcd_pwm_enable(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
-	if (disp_lcd_is_used(lcd) && lcdp->pwm_info.dev)
-		return lcd_fb_pwm_enable(lcdp->pwm_info.dev);
-	lcd_fb_wrn("pwm device hdl is NULL\n");
+	if (sunxi_lcd_fb_disp_lcd_is_used(lcd) && lcdp->pwm_info.dev)
+		return sunxi_lcd_fb_pwm_enable(lcdp->pwm_info.dev);
+	LCDFB_WRN("pwm device hdl is NULL\n");
 
 	return -1;
 }
 
-static s32 disp_lcd_pwm_disable(struct lcd_fb_device *lcd)
+static s32 sunxi_lcd_fb_disp_lcd_pwm_disable(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	s32 ret = -1;
 	struct pwm_device *pwm_dev;
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
 		return -1;
 	}
 
-	if (disp_lcd_is_used(lcd) && lcdp->pwm_info.dev) {
-		ret = lcd_fb_pwm_disable(lcdp->pwm_info.dev);
-		pwm_dev = (struct pwm_device *)lcdp->pwm_info.dev;
-		/* following is for reset pwm state purpose */
-		lcd_fb_pwm_config(lcdp->pwm_info.dev,
-				    pwm_dev->state.duty_cycle - 1,
-				    pwm_dev->state.period);
-		lcd_fb_pwm_set_polarity(lcdp->pwm_info.dev,
-					  !lcdp->pwm_info.polarity);
-		return ret;
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
+		return -1;
 	}
-	lcd_fb_wrn("pwm device hdl is NULL\n");
 
-	return -1;
+	if (lcdp->panel_info.lcd_pwm_used) {
+		if (sunxi_lcd_fb_disp_lcd_is_used(lcd) && lcdp->pwm_info.dev) {
+			ret = sunxi_lcd_fb_pwm_disable(lcdp->pwm_info.dev);
+			pwm_dev = (struct pwm_device *)lcdp->pwm_info.dev;
+			/* following is for reset pwm state purpose */
+			sunxi_lcd_fb_pwm_config(lcdp->pwm_info.dev,
+						pwm_dev->state.duty_cycle - 1,
+						pwm_dev->state.period);
+			sunxi_lcd_fb_pwm_set_polarity(lcdp->pwm_info.dev,
+						      !lcdp->pwm_info.polarity);
+			return ret;
+		}
+	}
+
+	return 0;
 }
 
-static s32 disp_lcd_backlight_enable(struct lcd_fb_device *lcd)
+static s32
+sunxi_lcd_fb_disp_lcd_backlight_enable(struct sunxi_lcd_fb_device *lcd)
 {
 	int ret;
 	struct disp_gpio_info gpio_info;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	unsigned long flags;
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
@@ -454,35 +525,43 @@ static s32 disp_lcd_backlight_enable(struct lcd_fb_device *lcd)
 	lcdp->bl_enabled = true;
 	spin_unlock_irqrestore(&lcd_data_lock, flags);
 
-	if (disp_lcd_is_used(lcd)) {
-		unsigned int bl;
+	if (sunxi_lcd_fb_disp_lcd_is_used(lcd)) {
+		u32 bl;
 
 		if (lcdp->lcd_cfg.lcd_bl_en_used) {
 			/* io-pad */
-			ret = lcd_fb_power_enable(lcdp->lcd_cfg.lcd_bl_en_power);
+			ret = sunxi_lcd_fb_power_enable(
+				lcdp->lcd_cfg.lcd_bl_en_power);
 			if (ret)
 				return DIS_FAIL;
 
 			memcpy(&gpio_info, &(lcdp->lcd_cfg.lcd_bl_en),
 			       sizeof(gpio_info));
 
-			lcd_fb_gpio_request(&gpio_info);
+			sunxi_lcd_fb_gpio_request(&gpio_info);
 		}
-		bl = disp_lcd_get_bright(lcd);
-		disp_lcd_set_bright(lcd, bl);
+		bl = sunxi_lcd_fb_disp_lcd_get_bright(lcd);
+		sunxi_lcd_fb_disp_lcd_set_bright(lcd, bl);
 	}
 
 	return 0;
 }
 
-static s32 disp_lcd_backlight_disable(struct lcd_fb_device *lcd)
+static s32
+sunxi_lcd_fb_disp_lcd_backlight_disable(struct sunxi_lcd_fb_device *lcd)
 {
 	int ret;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	unsigned long flags;
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
@@ -495,79 +574,110 @@ static s32 disp_lcd_backlight_disable(struct lcd_fb_device *lcd)
 	lcdp->bl_enabled = false;
 	spin_unlock_irqrestore(&lcd_data_lock, flags);
 
-	if (!disp_lcd_is_used(lcd))
+	if (!sunxi_lcd_fb_disp_lcd_is_used(lcd))
 		return DIS_SUCCESS;
 
 	if (!lcdp->lcd_cfg.lcd_bl_en_used)
 		return DIS_SUCCESS;
 
-	ret = lcd_fb_power_disable(lcdp->lcd_cfg.lcd_bl_en_power);
+	ret = sunxi_lcd_fb_power_disable(lcdp->lcd_cfg.lcd_bl_en_power);
 	if (ret)
 		return DIS_FAIL;
 
 	return DIS_SUCCESS;
 }
 
-static s32 disp_lcd_power_enable(struct lcd_fb_device *lcd, u32 power_id)
+static s32 sunxi_lcd_fb_disp_lcd_power_enable(struct sunxi_lcd_fb_device *lcd,
+					      u32 power_id)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
-	if (disp_lcd_is_used(lcd)) {
+	if (sunxi_lcd_fb_disp_lcd_is_used(lcd)) {
 		if (lcdp->lcd_cfg.lcd_power_used[power_id] == 1) {
 			/* regulator type */
-			lcd_fb_power_enable(lcdp->lcd_cfg.
-			lcd_power[power_id]);
+			sunxi_lcd_fb_power_enable(
+				lcdp->lcd_cfg.lcd_power[power_id]);
+		}
 	}
-}
 
-return 0;
+	return 0;
 }
 
-static s32 disp_lcd_power_disable(struct lcd_fb_device *lcd, u32 power_id)
+static s32 sunxi_lcd_fb_disp_lcd_power_disable(struct sunxi_lcd_fb_device *lcd,
+					       u32 power_id)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
 		return -1;
 	}
 
-	if (disp_lcd_is_used(lcd)) {
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
+		return -1;
+	}
+
+	if (sunxi_lcd_fb_disp_lcd_is_used(lcd)) {
 		if (lcdp->lcd_cfg.lcd_power_used[power_id] == 1) {
 			/* regulator type */
-			lcd_fb_power_disable(lcdp->lcd_cfg.lcd_power[power_id]);
+			sunxi_lcd_fb_power_disable(
+				lcdp->lcd_cfg.lcd_power[power_id]);
 		}
 	}
 
 	return 0;
 }
 
-static s32 disp_lcd_bright_get_adjust_value(struct lcd_fb_device *lcd, u32 bright)
+static s32
+sunxi_lcd_fb_disp_lcd_bright_get_adjust_value(struct sunxi_lcd_fb_device *lcd,
+					      u32 bright)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
 		return -1;
 	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
+		return -1;
+	}
+
 	bright = (bright > 255) ? 255 : bright;
 	return lcdp->panel_extend_info.lcd_bright_curve_tbl[bright];
 }
 
-static s32 disp_lcd_bright_curve_init(struct lcd_fb_device *lcd)
+static s32
+sunxi_lcd_fb_disp_lcd_bright_curve_init(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	u32 i = 0, j = 0;
 	u32 items = 0;
 	u32 lcd_bright_curve_tbl[101][2];
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
@@ -581,44 +691,51 @@ static s32 disp_lcd_bright_curve_init(struct lcd_fb_device *lcd)
 		} else {
 			lcd_bright_curve_tbl[items][0] = 255 * i / 100;
 			lcd_bright_curve_tbl[items][1] =
-			    lcdp->lcd_cfg.backlight_curve_adjust[i];
+				lcdp->lcd_cfg.backlight_curve_adjust[i];
 			items++;
 		}
 	}
 
 	for (i = 0; i < items - 1; i++) {
-		u32 num =
-		    lcd_bright_curve_tbl[i + 1][0] - lcd_bright_curve_tbl[i][0];
+		u32 num = lcd_bright_curve_tbl[i + 1][0] -
+			  lcd_bright_curve_tbl[i][0];
 
 		for (j = 0; j < num; j++) {
 			u32 value = 0;
 
-			value =
-			    lcd_bright_curve_tbl[i][1] +
-			    ((lcd_bright_curve_tbl[i + 1][1] -
-			      lcd_bright_curve_tbl[i][1]) * j) / num;
-			lcdp->panel_extend_info.lcd_bright_curve_tbl[lcd_bright_curve_tbl[i][0] + j]
-				= value;
+			value = lcd_bright_curve_tbl[i][1] +
+				((lcd_bright_curve_tbl[i + 1][1] -
+				  lcd_bright_curve_tbl[i][1]) *
+				 j) / num;
+			lcdp->panel_extend_info.lcd_bright_curve_tbl
+				[lcd_bright_curve_tbl[i][0] + j] = value;
 		}
 	}
 	lcdp->panel_extend_info.lcd_bright_curve_tbl[255] =
-	    lcd_bright_curve_tbl[items - 1][1];
+		lcd_bright_curve_tbl[items - 1][1];
 
 	return 0;
 }
 
-s32 disp_lcd_set_bright(struct lcd_fb_device *lcd, u32 bright)
+s32 sunxi_lcd_fb_disp_lcd_set_bright(struct sunxi_lcd_fb_device *lcd,
+				     u32 bright)
 {
 	u32 duty_ns;
 	__u64 backlight_bright = bright;
 	__u64 backlight_dimming;
 	__u64 period_ns;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	unsigned long flags;
 	bool bright_update = false;
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
@@ -634,117 +751,139 @@ s32 disp_lcd_set_bright(struct lcd_fb_device *lcd, u32 bright)
 		if (backlight_bright != 0)
 			backlight_bright += 1;
 		backlight_bright =
-		    disp_lcd_bright_get_adjust_value(lcd, backlight_bright);
+			sunxi_lcd_fb_disp_lcd_bright_get_adjust_value(
+				lcd, backlight_bright);
 
 		lcdp->lcd_cfg.backlight_dimming =
-		    (lcdp->lcd_cfg.backlight_dimming ==
-		     0) ? 256 : lcdp->lcd_cfg.backlight_dimming;
+			(lcdp->lcd_cfg.backlight_dimming == 0) ?
+				      256 :
+				      lcdp->lcd_cfg.backlight_dimming;
 		backlight_dimming = lcdp->lcd_cfg.backlight_dimming;
 		period_ns = lcdp->pwm_info.period_ns;
-		duty_ns =
-		    (backlight_bright * backlight_dimming * period_ns / 256 +
-		     128) / 256;
+		duty_ns = (backlight_bright * backlight_dimming * period_ns /
+				   256 +
+			   128) /
+			  256;
 		lcdp->pwm_info.duty_ns = duty_ns;
-		lcd_fb_pwm_config(lcdp->pwm_info.dev, duty_ns, period_ns);
+		sunxi_lcd_fb_pwm_config(lcdp->pwm_info.dev, duty_ns, period_ns);
 	}
 
 	if (lcdp->lcd_panel_fun.set_bright && lcdp->enabled) {
-		lcdp->lcd_panel_fun.set_bright(lcd->disp,
-					       disp_lcd_bright_get_adjust_value
-					       (lcd, bright));
+		lcdp->lcd_panel_fun.set_bright(
+			lcd->disp,
+			sunxi_lcd_fb_disp_lcd_bright_get_adjust_value(lcd,
+								      bright));
 	}
 
 	return 0;
 }
 
-s32 disp_lcd_get_bright(struct lcd_fb_device *lcd)
+s32 sunxi_lcd_fb_disp_lcd_get_bright(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
 	return lcdp->lcd_cfg.backlight_bright;
 }
 
-static s32 disp_lcd_set_bright_dimming(struct lcd_fb_device *lcd, u32 dimming)
+static s32
+sunxi_lcd_fb_disp_lcd_set_bright_dimming(struct sunxi_lcd_fb_device *lcd,
+					 u32 dimming)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	u32 bl = 0;
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
 	dimming = dimming > 256 ? 256 : dimming;
 	lcdp->lcd_cfg.backlight_dimming = dimming;
-	bl = disp_lcd_get_bright(lcd);
-	disp_lcd_set_bright(lcd, bl);
+	bl = sunxi_lcd_fb_disp_lcd_get_bright(lcd);
+	sunxi_lcd_fb_disp_lcd_set_bright(lcd, bl);
 
 	return 0;
 }
 
-static s32 disp_lcd_get_panel_info(struct lcd_fb_device *lcd,
-				   struct disp_panel_para *info)
+static s32
+sunxi_lcd_fb_disp_lcd_get_panel_info(struct sunxi_lcd_fb_device *lcd,
+				     struct sunxi_lcd_fb_disp_panel_para *info)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
-	memcpy(info, (struct disp_panel_para *) (&(lcdp->panel_info)),
+	memcpy(info,
+	       (struct sunxi_lcd_fb_disp_panel_para *)(&(lcdp->panel_info)),
 	       sizeof(*info));
 	return 0;
 }
 
-
-
 /* lcd enable except for backlight */
-static s32 disp_lcd_fake_enable(struct lcd_fb_device *lcd)
+static s32 sunxi_lcd_fb_disp_lcd_fake_enable(struct sunxi_lcd_fb_device *lcd)
 {
-	lcd_fb_wrn("To be implement!\n");
+	LCDFB_WRN("To be implement!\n");
 	return 0;
 }
 
-
-
-
-void disp_lcd_vsync_handle(unsigned long data)
+void sunxi_lcd_fb_disp_lcd_vsync_handle(unsigned long data)
 {
 	struct spi_device *spi = (struct spi_device *)data;
-	struct lcd_fb_device *p_lcd = NULL;
+	struct sunxi_lcd_fb_device *p_lcd = NULL;
 	struct disp_lcd_private_data *lcdp = NULL;
 	int i;
 
-	for (i = 0; i < SUPPORT_MAX_LCD; ++i) {
-		p_lcd = disp_get_lcd(i);
+	for (i = 0; i < g_drv_info.lcd_panel_count; ++i) {
+		p_lcd = sunxi_lcd_fb_disp_get_lcd(i);
 		if (p_lcd->spi_device == spi)
 			break;
 	}
-	lcdp = disp_lcd_get_priv(p_lcd);
+	lcdp = sunxi_lcd_fb_disp_lcd_get_priv(p_lcd);
 
 	lcdp->wait_count++;
 	wake_up_interruptible(&lcdp->wait);
 }
 
-enum hrtimer_restart disp_lcd_timer_handle(struct hrtimer *timer)
+enum hrtimer_restart sunxi_lcd_fb_disp_lcd_timer_handle(struct hrtimer *timer)
 {
 	struct disp_lcd_private_data *lcdp =
-	    container_of(timer, struct disp_lcd_private_data, timer);
+		container_of(timer, struct disp_lcd_private_data, timer);
 
 	hrtimer_forward(timer, timer->base->get_time(),
 			ktime_set(0, 1000000000 / lcdp->panel_info.lcd_fps));
-	disp_lcd_vsync_handle((unsigned long)lcdp->spi_device);
+	sunxi_lcd_fb_disp_lcd_vsync_handle((unsigned long)lcdp->spi_device);
 
 	return HRTIMER_RESTART;
 }
 
-void spi_dbi_config_init(struct disp_lcd_private_data *lcdp, struct sunxi_dbi_config *dbi_config)
+void sunxi_lcd_fb_spi_dbi_config_init(struct disp_lcd_private_data *lcdp,
+				      struct sunxi_dbi_config *dbi_config)
 {
 #if defined(SUPPORT_DBI_IF)
 	if (lcdp->panel_info.lcd_if == LCD_FB_IF_DBI) {
@@ -768,40 +907,38 @@ void spi_dbi_config_init(struct disp_lcd_private_data *lcdp, struct sunxi_dbi_co
 		dbi_config->dbi_video_h = lcdp->panel_info.lines_per_transfer;
 		dbi_config->dbi_src_sequence = lcdp->panel_info.lcd_rgb_order;
 		dbi_config->dbi_te_en = 0;
-		dbi_config->dbi_vsync_handle = disp_lcd_vsync_handle;
-		dbi_config->dbi_clk_out_mode = lcdp->panel_info.lcd_dbi_clk_mode;
+		dbi_config->dbi_vsync_handle =
+			sunxi_lcd_fb_disp_lcd_vsync_handle;
+		dbi_config->dbi_clk_out_mode =
+			lcdp->panel_info.lcd_dbi_clk_mode;
 	}
 #endif
 }
 
-static s32 disp_lcd_spi_init(struct lcd_fb_device *lcd)
+static s32 sunxi_lcd_fb_disp_lcd_spi_init(struct sunxi_lcd_fb_device *lcd)
 {
 	int ret = -1;
 	struct spi_master *master;
+#if defined(SUPPORT_DBI_IF)
 	struct sunxi_dbi_config dbi_config;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+#endif
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
 	if (!lcd || !lcdp) {
-		lcd_fb_wrn("Null pointer!\n");
+		LCDFB_WRN("Null pointer!\n");
 		return -1;
 	}
 
-	master = spi_busnum_to_master(lcdp->panel_info.lcd_spi_bus_num);
-	if (!master) {
-		lcd_fb_wrn("fail to get master\n");
-		goto OUT;
-	}
-
-	lcd->spi_device = spi_alloc_device(master);
 	if (!lcd->spi_device) {
-		lcd_fb_wrn("fail to get spi device\n");
+		LCDFB_WRN("fail to get spi device\n");
 		goto OUT;
 	}
 	lcdp->spi_device = lcd->spi_device;
 
 	lcd->spi_device->bits_per_word = 8;
 	lcd->spi_device->max_speed_hz =
-	    lcdp->panel_info.lcd_data_speed * 1000 * 1000;
+		lcdp->panel_info.lcd_data_speed * 1000 * 1000;
 	lcd->spi_device->mode = SPI_MODE_0;
 
 #if defined(SUPPORT_DBI_IF)
@@ -828,23 +965,23 @@ static s32 disp_lcd_spi_init(struct lcd_fb_device *lcd)
 		dbi_config.dbi_video_h = lcdp->panel_info.lines_per_transfer;
 		dbi_config.dbi_src_sequence = lcdp->panel_info.lcd_rgb_order;
 		dbi_config.dbi_te_en = 0;
-		dbi_config.dbi_vsync_handle = disp_lcd_vsync_handle;
+		dbi_config.dbi_vsync_handle =
+			sunxi_lcd_fb_disp_lcd_vsync_handle;
 		dbi_config.dbi_clk_out_mode = lcdp->panel_info.lcd_dbi_clk_mode;
-	}
 
-	sunxi_dbi_set_config(lcd->spi_device, &dbi_config);
+		sunxi_dbi_set_config(lcd->spi_device, &dbi_config);
+	}
 #endif
 
 	ret = spi_setup(lcd->spi_device);
 	if (ret) {
-		lcd_fb_wrn("Faile to setup spi\n");
+		LCDFB_WRN("Faile to setup spi\n");
 		goto FREE;
 	}
 
-	lcd_fb_wrn("Init spi%d:bits_per_word:%d max_speed_hz:%d mode:%d\n",
-		   lcdp->panel_info.lcd_spi_bus_num,
-		   lcd->spi_device->bits_per_word,
-		   lcd->spi_device->max_speed_hz, lcd->spi_device->mode);
+	LCDFB_WRN("Init spi:bits_per_word:%d max_speed_hz:%d mode:%d\n",
+		  lcd->spi_device->bits_per_word, lcd->spi_device->max_speed_hz,
+		  lcd->spi_device->mode);
 
 	ret = 0;
 	goto OUT;
@@ -857,26 +994,34 @@ OUT:
 	return ret;
 }
 
-static s32 disp_lcd_enable(struct lcd_fb_device *lcd)
+static s32 sunxi_lcd_fb_disp_lcd_enable(struct sunxi_lcd_fb_device *lcd)
 {
 	unsigned long flags;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	int i;
 	unsigned bl;
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
-	lcd_fb_inf("lcd %d\n", lcd->disp);
 
-	if (disp_lcd_is_enabled(lcd) == 1)
+	LCDFB_INF("lcd %d\n", lcd->disp);
+
+	if (sunxi_lcd_fb_disp_lcd_is_enabled(lcd) == 1)
 		return 0;
 
 	/* init fix power */
 	for (i = 0; i < LCD_POWER_NUM; i++) {
 		if (lcdp->lcd_cfg.lcd_fix_power_used[i] == 1)
-			lcd_fb_power_enable(lcdp->lcd_cfg.lcd_fix_power[i]);
+			sunxi_lcd_fb_power_enable(
+				lcdp->lcd_cfg.lcd_fix_power[i]);
 	}
 
 	spin_lock_irqsave(&lcd_data_lock, flags);
@@ -885,14 +1030,18 @@ static s32 disp_lcd_enable(struct lcd_fb_device *lcd)
 	spin_unlock_irqrestore(&lcd_data_lock, flags);
 
 	lcdp->panel_extend_info.lcd_gamma_en = lcdp->panel_info.lcd_gamma_en;
-	disp_lcd_gpio_init(lcd);
+	sunxi_lcd_fb_disp_lcd_gpio_init(lcd);
 
-	lcd_fb_pwm_config(lcdp->pwm_info.dev, lcdp->pwm_info.duty_ns,
-			    lcdp->pwm_info.period_ns);
-	lcd_fb_pwm_set_polarity(lcdp->pwm_info.dev, lcdp->pwm_info.polarity);
+	if (lcdp->panel_info.lcd_pwm_used) {
+		sunxi_lcd_fb_pwm_config(lcdp->pwm_info.dev,
+					lcdp->pwm_info.duty_ns,
+					lcdp->pwm_info.period_ns);
+		sunxi_lcd_fb_pwm_set_polarity(lcdp->pwm_info.dev,
+					      lcdp->pwm_info.polarity);
+	}
 
-	if (disp_lcd_spi_init(lcd)) {
-		lcd_fb_wrn("Init spi fail!\n");
+	if (sunxi_lcd_fb_disp_lcd_spi_init(lcd)) {
+		LCDFB_WRN("Init spi fail!\n");
 		return -1;
 	}
 
@@ -901,50 +1050,58 @@ static s32 disp_lcd_enable(struct lcd_fb_device *lcd)
 	if (lcdp->lcd_panel_fun.cfg_open_flow)
 		lcdp->lcd_panel_fun.cfg_open_flow(lcd->disp);
 	else
-		lcd_fb_wrn("lcd_panel_fun[%d].cfg_open_flow is NULL\n", lcd->disp);
+		LCDFB_WRN("lcd_panel_fun[%d].cfg_open_flow is NULL\n",
+			  lcd->disp);
 
 	for (i = 0; i < lcdp->open_flow.func_num; i++) {
 		if (lcdp->open_flow.func[i].func) {
 			lcdp->open_flow.func[i].func(lcd->disp);
-			lcd_fb_inf("open flow:step %d finish, to delay %d\n", i,
-			       lcdp->open_flow.func[i].delay);
+			LCDFB_INF("open flow:step %d finish, to delay %d\n", i,
+				  lcdp->open_flow.func[i].delay);
 			if (lcdp->open_flow.func[i].delay != 0)
-				disp_delay_ms(lcdp->open_flow.func[i].delay);
+				sunxi_lcd_fb_disp_delay_ms(
+					lcdp->open_flow.func[i].delay);
 		}
 	}
 
 	if (lcdp->panel_info.lcd_fps && !lcdp->panel_info.lcd_dbi_te) {
 		hrtimer_init(&lcdp->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
-		lcdp->timer.function = disp_lcd_timer_handle;
-		hrtimer_start(
-		    &lcdp->timer,
-		    ktime_set(0, 1000000000 / lcdp->panel_info.lcd_fps),
-		    HRTIMER_MODE_REL);
+		lcdp->timer.function = sunxi_lcd_fb_disp_lcd_timer_handle;
+		hrtimer_start(&lcdp->timer,
+			      ktime_set(0,
+					1000000000 / lcdp->panel_info.lcd_fps),
+			      HRTIMER_MODE_REL);
 	}
 
 	spin_lock_irqsave(&lcd_data_lock, flags);
 	lcdp->enabled = 1;
 	lcdp->enabling = 0;
 	spin_unlock_irqrestore(&lcd_data_lock, flags);
-	bl = disp_lcd_get_bright(lcd);
-	disp_lcd_set_bright(lcd, bl);
+	bl = sunxi_lcd_fb_disp_lcd_get_bright(lcd);
+	sunxi_lcd_fb_disp_lcd_set_bright(lcd, bl);
 
 	return 0;
 }
 
-static s32 disp_lcd_disable(struct lcd_fb_device *lcd)
+static s32 sunxi_lcd_fb_disp_lcd_disable(struct sunxi_lcd_fb_device *lcd)
 {
 	unsigned long flags;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	int i;
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
 		return -1;
 	}
 
-	lcd_fb_inf("lcd %d\n", lcd->disp);
-	if (disp_lcd_is_enabled(lcd) == 0)
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
+		return -1;
+	}
+
+	LCDFB_INF("lcd %d\n", lcd->disp);
+	if (sunxi_lcd_fb_disp_lcd_is_enabled(lcd) == 0)
 		return 0;
 
 	spin_lock_irqsave(&lcd_data_lock, flags);
@@ -959,23 +1116,26 @@ static s32 disp_lcd_disable(struct lcd_fb_device *lcd)
 	if (lcdp->lcd_panel_fun.cfg_close_flow)
 		lcdp->lcd_panel_fun.cfg_close_flow(lcd->disp);
 	else
-		lcd_fb_wrn("lcd_panel_fun[%d].cfg_close_flow is NULL\n", lcd->disp);
+		LCDFB_WRN("lcd_panel_fun[%d].cfg_close_flow is NULL\n",
+			  lcd->disp);
 
 	for (i = 0; i < lcdp->close_flow.func_num; i++) {
 		if (lcdp->close_flow.func[i].func) {
 			lcdp->close_flow.func[i].func(lcd->disp);
-			lcd_fb_inf("close flow:step %d finish, to delay %d\n", i,
-			       lcdp->close_flow.func[i].delay);
+			LCDFB_INF("close flow:step %d finish, to delay %d\n", i,
+				  lcdp->close_flow.func[i].delay);
 			if (lcdp->close_flow.func[i].delay != 0)
-				disp_delay_ms(lcdp->close_flow.func[i].delay);
+				sunxi_lcd_fb_disp_delay_ms(
+					lcdp->close_flow.func[i].delay);
 		}
 	}
 
-	disp_lcd_gpio_exit(lcd);
+	sunxi_lcd_fb_disp_lcd_gpio_exit(lcd);
 
 	for (i = LCD_POWER_NUM - 1; i >= 0; i--) {
 		if (lcdp->lcd_cfg.lcd_fix_power_used[i] == 1)
-			lcd_fb_power_disable(lcdp->lcd_cfg.lcd_fix_power[i]);
+			sunxi_lcd_fb_power_disable(
+				lcdp->lcd_cfg.lcd_fix_power[i]);
 	}
 
 	if (lcd->spi_device) {
@@ -989,12 +1149,18 @@ static s32 disp_lcd_disable(struct lcd_fb_device *lcd)
 	return 0;
 }
 
-s32 disp_lcd_is_enabled(struct lcd_fb_device *lcd)
+s32 sunxi_lcd_fb_disp_lcd_is_enabled(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
@@ -1002,31 +1168,43 @@ s32 disp_lcd_is_enabled(struct lcd_fb_device *lcd)
 }
 
 /**
- * disp_lcd_check_if_enabled - check lcd if be enabled status
+ * sunxi_lcd_fb_disp_lcd_check_if_enabled - check lcd if be enabled status
  *
  * this function only be used by bsp_disp_sync_with_hw to check
  * the device enabled status when driver init
  */
-s32 disp_lcd_check_if_enabled(struct lcd_fb_device *lcd)
+s32 sunxi_lcd_fb_disp_lcd_check_if_enabled(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	int ret = 1;
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
 	return ret;
 }
 
-static s32 disp_lcd_set_open_func(struct lcd_fb_device *lcd, LCD_FUNC func,
-				  u32 delay)
+static s32 sunxi_lcd_fb_disp_lcd_set_open_func(struct sunxi_lcd_fb_device *lcd,
+					       LCD_FUNC func, u32 delay)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
@@ -1039,13 +1217,19 @@ static s32 disp_lcd_set_open_func(struct lcd_fb_device *lcd, LCD_FUNC func,
 	return 0;
 }
 
-static s32 disp_lcd_set_close_func(struct lcd_fb_device *lcd, LCD_FUNC func,
-				   u32 delay)
+static s32 sunxi_lcd_fb_disp_lcd_set_close_func(struct sunxi_lcd_fb_device *lcd,
+						LCD_FUNC func, u32 delay)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
@@ -1058,44 +1242,55 @@ static s32 disp_lcd_set_close_func(struct lcd_fb_device *lcd, LCD_FUNC func,
 	return 0;
 }
 
-static s32 disp_lcd_set_panel_funs(struct lcd_fb_device *lcd, char *name,
-				   struct disp_lcd_panel_fun *lcd_cfg)
+static s32 sunxi_lcd_fb_disp_lcd_set_panel_funs(
+	struct sunxi_lcd_fb_device *lcd, char *name,
+	struct sunxi_lcd_fb_disp_lcd_panel_fun *lcd_cfg)
 {
-	char primary_key[20], drv_name[32];
+	char drv_name[32];
 	s32 ret;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct device_node *panel_node;
+	struct disp_lcd_private_data *lcdp;
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL)
+		return -1;
+
+	panel_node = lcd->panel_node;
+	lcdp = sunxi_lcd_fb_disp_lcd_get_priv(lcd);
+
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
 		return -1;
 	}
 
-	sprintf(primary_key, "lcd_fb%d", lcd->disp);
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
+		return -1;
+	}
 
-	ret =
-	    lcd_fb_script_get_item(primary_key, "lcd_driver_name",
-				     (int *)drv_name, 2);
-	lcd_fb_inf("lcd %d, driver_name %s,  panel_name %s\n", lcd->disp, drv_name,
-	       name);
+	ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_driver_name",
+					   (int *)drv_name, 2);
+	LCDFB_INF("lcd %d, driver_name %s,  panel_name %s\n", lcd->disp,
+		  drv_name, name);
 	if ((ret == 2) && !strcmp(drv_name, name)) {
-		memset(&lcdp->lcd_panel_fun,
-		       0,
-		       sizeof(lcdp->lcd_panel_fun));
+		memset(&lcdp->lcd_panel_fun, 0, sizeof(lcdp->lcd_panel_fun));
 		lcdp->lcd_panel_fun.cfg_panel_info = lcd_cfg->cfg_panel_info;
 		lcdp->lcd_panel_fun.cfg_open_flow = lcd_cfg->cfg_open_flow;
 		lcdp->lcd_panel_fun.cfg_close_flow = lcd_cfg->cfg_close_flow;
 		lcdp->lcd_panel_fun.lcd_user_defined_func =
-		    lcd_cfg->lcd_user_defined_func;
+			lcd_cfg->lcd_user_defined_func;
 		lcdp->lcd_panel_fun.set_bright = lcd_cfg->set_bright;
 		lcdp->lcd_panel_fun.blank = lcd_cfg->blank;
 		lcdp->lcd_panel_fun.set_var = lcd_cfg->set_var;
 		lcdp->lcd_panel_fun.set_addr_win = lcd_cfg->set_addr_win;
 		if (lcdp->lcd_panel_fun.cfg_panel_info) {
-			lcdp->lcd_panel_fun.cfg_panel_info(&lcdp->panel_extend_info);
+			lcdp->lcd_panel_fun.cfg_panel_info(
+				&lcdp->panel_extend_info);
 			memcpy(&lcdp->panel_extend_info_set,
-				&lcdp->panel_extend_info, sizeof(lcdp->panel_extend_info_set));
+			       &lcdp->panel_extend_info,
+			       sizeof(lcdp->panel_extend_info_set));
 		} else {
-			lcd_fb_wrn("lcd_panel_fun[%d].cfg_panel_info is NULL\n", lcd->disp);
+			LCDFB_WRN("lcd_panel_fun[%d].cfg_panel_info is NULL\n",
+				  lcd->disp);
 		}
 
 		return 0;
@@ -1104,142 +1299,179 @@ static s32 disp_lcd_set_panel_funs(struct lcd_fb_device *lcd, char *name,
 	return -1;
 }
 
-s32 disp_lcd_gpio_init(struct lcd_fb_device *lcd)
+s32 sunxi_lcd_fb_disp_lcd_gpio_init(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	int i = 0;
 	struct disp_gpio_info gpio_info[1];
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
 	/* io-pad */
 	for (i = 0; i < LCD_GPIO_REGU_NUM; i++) {
-		if (!((!strcmp(lcdp->lcd_cfg.lcd_gpio_power[i], ""))
-			|| (!strcmp(lcdp->lcd_cfg.lcd_gpio_power[i], "none"))))
-			lcd_fb_power_enable(lcdp->lcd_cfg.lcd_gpio_power[i]);
+		if (!((!strcmp(lcdp->lcd_cfg.lcd_gpio_power[i], "")) ||
+		      (!strcmp(lcdp->lcd_cfg.lcd_gpio_power[i], "none"))))
+			sunxi_lcd_fb_power_enable(
+				lcdp->lcd_cfg.lcd_gpio_power[i]);
 	}
 
 	for (i = 0; i < LCD_GPIO_NUM; i++) {
 		if (lcdp->lcd_cfg.lcd_gpio_used[i]) {
 			memcpy(gpio_info, &(lcdp->lcd_cfg.lcd_gpio[i]),
-				sizeof(struct disp_gpio_info));
-			lcd_fb_gpio_request(gpio_info);
+			       sizeof(struct disp_gpio_info));
+			sunxi_lcd_fb_gpio_request(gpio_info);
 		}
 	}
 
 	if (strlen(lcdp->lcd_cfg.lcd_spi_dc_pin.name)) {
 		memcpy(gpio_info, &(lcdp->lcd_cfg.lcd_spi_dc_pin),
-					sizeof(struct disp_gpio_info));
-		lcd_fb_gpio_request(gpio_info);
+		       sizeof(struct disp_gpio_info));
+		sunxi_lcd_fb_gpio_request(gpio_info);
 	}
 
 	return 0;
 }
 
-s32 disp_lcd_gpio_exit(struct lcd_fb_device *lcd)
+s32 sunxi_lcd_fb_disp_lcd_gpio_exit(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	int i = 0;
 	struct disp_gpio_info gpio_info[1];
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
 	for (i = 0; i < LCD_GPIO_NUM; i++) {
 		if (lcdp->lcd_cfg.lcd_gpio_used[i]) {
-
-			lcd_fb_gpio_release(&lcdp->lcd_cfg.lcd_gpio[i]);
+			sunxi_lcd_fb_gpio_release(&lcdp->lcd_cfg.lcd_gpio[i]);
 
 			memcpy(gpio_info, &(lcdp->lcd_cfg.lcd_gpio[i]),
-					sizeof(struct disp_gpio_info));
+			       sizeof(struct disp_gpio_info));
 		}
 	}
 
 	/* io-pad */
 	for (i = LCD_GPIO_REGU_NUM - 1; i >= 0; i--) {
-		if (!((!strcmp(lcdp->lcd_cfg.lcd_gpio_power[i], ""))
-			|| (!strcmp(lcdp->lcd_cfg.lcd_gpio_power[i], "none"))))
-			lcd_fb_power_disable(lcdp->lcd_cfg.lcd_gpio_power[i]);
+		if (!((!strcmp(lcdp->lcd_cfg.lcd_gpio_power[i], "")) ||
+		      (!strcmp(lcdp->lcd_cfg.lcd_gpio_power[i], "none"))))
+			sunxi_lcd_fb_power_disable(
+				lcdp->lcd_cfg.lcd_gpio_power[i]);
 	}
 
 	if (strlen(lcdp->lcd_cfg.lcd_spi_dc_pin.name))
-		lcd_fb_gpio_release(&lcdp->lcd_cfg.lcd_spi_dc_pin);
+		sunxi_lcd_fb_gpio_release(&lcdp->lcd_cfg.lcd_spi_dc_pin);
 
 	return 0;
-
 }
 
 /* direction: input(0), output(1) */
-s32 disp_lcd_gpio_set_direction(struct lcd_fb_device *lcd, u32 io_index,
-				u32 direction)
+s32 sunxi_lcd_fb_disp_lcd_gpio_set_direction(struct sunxi_lcd_fb_device *lcd,
+					     u32 io_index, u32 direction)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	char gpio_name[20];
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
 	sprintf(gpio_name, "lcd_gpio_%d", io_index);
-	return lcd_fb_gpio_set_direction(lcdp->lcd_cfg.gpio_hdl[io_index],
-					   direction, gpio_name);
+	return sunxi_lcd_fb_gpio_set_direction(lcdp->lcd_cfg.gpio_hdl[io_index],
+					       direction, gpio_name);
 }
 
-s32 disp_lcd_gpio_get_value(struct lcd_fb_device *lcd, u32 io_index)
+s32 sunxi_lcd_fb_disp_lcd_gpio_get_value(struct sunxi_lcd_fb_device *lcd,
+					 u32 io_index)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	char gpio_name[20];
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
 	sprintf(gpio_name, "lcd_gpio_%d", io_index);
-	return lcd_fb_gpio_get_value(lcdp->lcd_cfg.gpio_hdl[io_index],
-				       gpio_name);
+	return sunxi_lcd_fb_gpio_get_value(lcdp->lcd_cfg.gpio_hdl[io_index],
+					   gpio_name);
 }
 
-s32 disp_lcd_gpio_set_value(struct lcd_fb_device *lcd, u32 io_index, u32 data)
+s32 sunxi_lcd_fb_disp_lcd_gpio_set_value(struct sunxi_lcd_fb_device *lcd,
+					 u32 io_index, u32 data)
 {
 	int gpio;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	char gpio_name[20];
 
 	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+		LCDFB_WRN("NULL hdl!\n");
 		return DIS_FAIL;
 	}
 
 	if (io_index >= LCD_GPIO_NUM) {
-		lcd_fb_wrn("gpio num out of range\n");
+		LCDFB_WRN("gpio num out of range\n");
 		return DIS_FAIL;
 	}
 	sprintf(gpio_name, "lcd_gpio_%d", io_index);
 	gpio = lcdp->lcd_cfg.lcd_gpio[io_index].gpio;
 	if (!gpio_is_valid(gpio)) {
-		lcd_fb_wrn("of_get_named_gpio_flags for %s failed\n", gpio_name);
+		LCDFB_WRN("of_get_named_gpio_flags for %s failed\n", gpio_name);
 		return DIS_FAIL;
 	}
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0))
+	gpio_set_value(gpio, data);
+#else
 	__gpio_set_value(gpio, data);
+#endif
 
 	return DIS_SUCCESS;
 }
 
-static s32 disp_lcd_get_dimensions(struct lcd_fb_device *lcd, u32 *width,
-				   u32 *height)
+static s32 sunxi_lcd_fb_disp_lcd_get_dimensions(struct sunxi_lcd_fb_device *lcd,
+						u32 *width, u32 *height)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
@@ -1252,20 +1484,21 @@ static s32 disp_lcd_get_dimensions(struct lcd_fb_device *lcd, u32 *width,
 	return 0;
 }
 
-
-static s32 disp_lcd_update_gamma_tbl_set(struct lcd_fb_device *lcd)
+static s32
+sunxi_lcd_fb_disp_lcd_update_gamma_tbl_set(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	int i;
-	unsigned int *gamma, *gamma_set;
-	unsigned int r, g, b;
+	u32 *gamma, *gamma_set;
+	u32 r, g, b;
 	s32 color_temperature;
 	u32 color_inverse;
 
 	color_temperature = lcdp->color_temperature;
 	color_inverse = lcdp->color_inverse;
 	memcpy(&lcdp->panel_extend_info_set, &lcdp->panel_extend_info,
-		sizeof(lcdp->panel_extend_info_set));
+	       sizeof(lcdp->panel_extend_info_set));
 	gamma = lcdp->panel_extend_info.lcd_gamma_tbl;
 	gamma_set = lcdp->panel_extend_info_set.lcd_gamma_tbl;
 	if (color_temperature > 0) {
@@ -1300,7 +1533,7 @@ static s32 disp_lcd_update_gamma_tbl_set(struct lcd_fb_device *lcd)
 	}
 	if (color_inverse == 1) {
 		for (i = 0; i < 256; i++)
-			gamma_set[i] = 0xffffffff -  gamma_set[i];
+			gamma_set[i] = 0xffffffff - gamma_set[i];
 	}
 	if (color_inverse != 0)
 		lcdp->panel_extend_info_set.lcd_gamma_en = 1;
@@ -1310,44 +1543,43 @@ static s32 disp_lcd_update_gamma_tbl_set(struct lcd_fb_device *lcd)
 	return 0;
 }
 
-
-static s32 disp_lcd_set_gamma_tbl(struct lcd_fb_device *lcd,
-			unsigned int *gamma_table, unsigned int size)
+static s32 sunxi_lcd_fb_disp_lcd_set_gamma_tbl(struct sunxi_lcd_fb_device *lcd,
+					       u32 *gamma_table, u32 size)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	unsigned long flags;
 
-	if ((lcd == NULL) || (lcdp == NULL)
-	    || (gamma_table == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if ((lcd == NULL) || (lcdp == NULL) || (gamma_table == NULL)) {
+		LCDFB_WRN("NULL hdl!\n");
 		return 0;
 	}
 
-	size = (size > LCD_GAMMA_TABLE_SIZE) ?
-	    LCD_GAMMA_TABLE_SIZE : size;
+	size = (size > LCD_GAMMA_TABLE_SIZE) ? LCD_GAMMA_TABLE_SIZE : size;
 	spin_lock_irqsave(&lcd_data_lock, flags);
 	memcpy(lcdp->panel_extend_info.lcd_gamma_tbl, gamma_table, size);
-	disp_lcd_update_gamma_tbl_set(lcd);
+	sunxi_lcd_fb_disp_lcd_update_gamma_tbl_set(lcd);
 	lcdp->panel_extend_dirty = 1;
 	spin_unlock_irqrestore(&lcd_data_lock, flags);
 
 	return 0;
 }
 
-static s32 disp_lcd_enable_gamma(struct lcd_fb_device *lcd)
+static s32 sunxi_lcd_fb_disp_lcd_enable_gamma(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	unsigned long flags;
 
 	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+		LCDFB_WRN("NULL hdl!\n");
 		return 0;
 	}
 
 	spin_lock_irqsave(&lcd_data_lock, flags);
 	if (lcdp->panel_extend_info.lcd_gamma_en == 0) {
 		lcdp->panel_extend_info.lcd_gamma_en = 1;
-		disp_lcd_update_gamma_tbl_set(lcd);
+		sunxi_lcd_fb_disp_lcd_update_gamma_tbl_set(lcd);
 		lcdp->panel_extend_dirty = 1;
 	}
 	spin_unlock_irqrestore(&lcd_data_lock, flags);
@@ -1355,13 +1587,14 @@ static s32 disp_lcd_enable_gamma(struct lcd_fb_device *lcd)
 	return 0;
 }
 
-static s32 disp_lcd_disable_gamma(struct lcd_fb_device *lcd)
+static s32 sunxi_lcd_fb_disp_lcd_disable_gamma(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	int ret = -1;
 
 	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+		LCDFB_WRN("NULL hdl!\n");
 		return 0;
 	}
 
@@ -1376,34 +1609,43 @@ static s32 disp_lcd_disable_gamma(struct lcd_fb_device *lcd)
 	return ret;
 }
 
-static s32 disp_lcd_set_color_temperature(struct lcd_fb_device *lcd,
-	s32 color_temperature)
+static s32
+sunxi_lcd_fb_disp_lcd_set_color_temperature(struct sunxi_lcd_fb_device *lcd,
+					    s32 color_temperature)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	unsigned long flags;
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
+		return -1;
+	}
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
 		return -1;
 	}
 
 	spin_lock_irqsave(&lcd_data_lock, flags);
 	lcdp->color_temperature = color_temperature;
-	disp_lcd_update_gamma_tbl_set(lcd);
+	sunxi_lcd_fb_disp_lcd_update_gamma_tbl_set(lcd);
 	lcdp->panel_extend_dirty = 1;
 	spin_unlock_irqrestore(&lcd_data_lock, flags);
 
 	return 0;
 }
 
-static s32 disp_lcd_get_color_temperature(struct lcd_fb_device *lcd)
+static s32
+sunxi_lcd_fb_disp_lcd_get_color_temperature(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	unsigned long flags;
 	s32 color_temperature = 0;
 
 	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+		LCDFB_WRN("NULL hdl!\n");
 		return 0;
 	}
 
@@ -1414,33 +1656,39 @@ static s32 disp_lcd_get_color_temperature(struct lcd_fb_device *lcd)
 	return color_temperature;
 }
 
-static int disp_lcd_backlight_update_status(struct backlight_device *bd)
+static int
+sunxi_lcd_fb_disp_lcd_backlight_update_status(struct backlight_device *bd)
 {
-	struct lcd_fb_device *lcd = (struct lcd_fb_device *)bd->dev.driver_data;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct sunxi_lcd_fb_device *lcd =
+		(struct sunxi_lcd_fb_device *)bd->dev.driver_data;
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
-	lcd_fb_inf("updating sunxi_backlight, brightness=%d/%d\n",
-		      bd->props.brightness, bd->props.max_brightness);
+	LCDFB_INF("updating sunxi_backlight, brightness=%d/%d\n",
+		  bd->props.brightness, bd->props.max_brightness);
 
 	mutex_lock(&lcdp->backligt_lock);
 	if (bd->props.power != FB_BLANK_POWERDOWN) {
 		if (!lcdp->bl_enabled)
-			disp_lcd_backlight_enable(lcd);
-		disp_lcd_set_bright(lcd, bd->props.brightness);
+			sunxi_lcd_fb_disp_lcd_backlight_enable(lcd);
+		sunxi_lcd_fb_disp_lcd_set_bright(lcd, bd->props.brightness);
 	} else {
-		disp_lcd_set_bright(lcd, 0);
+		sunxi_lcd_fb_disp_lcd_set_bright(lcd, 0);
 		if (lcdp->bl_enabled)
-			disp_lcd_backlight_disable(lcd);
+			sunxi_lcd_fb_disp_lcd_backlight_disable(lcd);
 	}
 	mutex_unlock(&lcdp->backligt_lock);
 
 	return 0;
 }
 
-static int disp_lcd_backlight_get_brightness(struct backlight_device *bd)
+static int
+sunxi_lcd_fb_disp_lcd_backlight_get_brightness(struct backlight_device *bd)
 {
-	struct lcd_fb_device *lcd = (struct lcd_fb_device *)bd->dev.driver_data;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct sunxi_lcd_fb_device *lcd =
+		(struct sunxi_lcd_fb_device *)bd->dev.driver_data;
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	int ret = -1;
 
 	if (!lcd || !lcdp)
@@ -1455,18 +1703,20 @@ OUT:
 }
 
 static const struct backlight_ops sunxi_backlight_device_ops = {
-	.update_status = disp_lcd_backlight_update_status,
-	.get_brightness = disp_lcd_backlight_get_brightness,
+	.update_status = sunxi_lcd_fb_disp_lcd_backlight_update_status,
+	.get_brightness = sunxi_lcd_fb_disp_lcd_backlight_get_brightness,
 };
 
-static s32 disp_lcd_backlight_register(struct lcd_fb_device *lcd)
+static s32
+sunxi_lcd_fb_disp_lcd_backlight_register(struct sunxi_lcd_fb_device *lcd)
 {
 	struct backlight_properties props;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
-	char sunxi_bl_name[40] = {0};
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
+	char sunxi_bl_name[40] = { 0 };
 
 	if (!lcdp || !lcd->dev) {
-		lcd_fb_wrn("NULL pointer\n");
+		LCDFB_WRN("NULL pointer\n");
 		return -1;
 	}
 
@@ -1483,67 +1733,76 @@ static s32 disp_lcd_backlight_register(struct lcd_fb_device *lcd)
 	props.power = FB_BLANK_UNBLANK;
 	snprintf(sunxi_bl_name, 40, "lcd_fb%d", lcd->disp);
 
-	lcdp->p_bl_dev = backlight_device_register(
-	    sunxi_bl_name, lcd->dev, lcd, &sunxi_backlight_device_ops, &props);
+	lcdp->p_bl_dev =
+		backlight_device_register(sunxi_bl_name, lcd->dev, lcd,
+					  &sunxi_backlight_device_ops, &props);
 
 	if (!lcdp->p_bl_dev) {
-		lcd_fb_wrn("backligt register fail!\n");
+		LCDFB_WRN("backligt register fail!\n");
 		return -2;
 	}
 
 	return 0;
 }
 
-static void disp_lcd_backlight_unregister(struct lcd_fb_device *lcd)
+static void
+sunxi_lcd_fb_disp_lcd_backlight_unregister(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
 	if (lcdp->p_bl_dev) {
 		backlight_device_unregister(lcdp->p_bl_dev);
 		lcdp->p_bl_dev = NULL;
 	} else
-		lcd_fb_wrn("lcd%d:Can not find corresponding backlight device\n", lcd->disp);
+		LCDFB_WRN("lcd%d:Can not find corresponding backlight device\n",
+			  lcd->disp);
 }
 
-
-static s32 disp_lcd_init(struct lcd_fb_device *lcd)
+static s32 sunxi_lcd_fb_disp_lcd_init(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 	struct disp_gpio_info gpio_info;
 	int i;
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
 		return -1;
 	}
-	lcd_fb_inf("lcd %d\n", lcd->disp);
+
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
+		return -1;
+	}
+
+	LCDFB_INF("lcd %d\n", lcd->disp);
 	mutex_init(&lcdp->layer_mlock);
 	mutex_init(&lcdp->backligt_lock);
 	init_waitqueue_head(&lcdp->wait);
 
-	lcd_get_sys_config(lcd->disp, &lcdp->lcd_cfg);
-	if (disp_lcd_is_used(lcd)) {
-		lcd_parse_panel_para(lcd->disp, &lcdp->panel_info);
+	sunxi_lcd_fb_lcd_get_sys_config(lcd->disp, &lcdp->lcd_cfg);
+	if (sunxi_lcd_fb_disp_lcd_is_used(lcd)) {
+		sunxi_lcd_fb_lcd_parse_panel_para(lcd->disp, &lcdp->panel_info);
 	}
-	disp_lcd_bright_curve_init(lcd);
+	sunxi_lcd_fb_disp_lcd_bright_curve_init(lcd);
 
-	if (disp_lcd_is_used(lcd)) {
+	if (sunxi_lcd_fb_disp_lcd_is_used(lcd)) {
 		__u64 backlight_bright;
 		__u64 period_ns, duty_ns;
 
 		if (lcdp->panel_info.lcd_pwm_used) {
 			lcdp->pwm_info.channel = lcdp->panel_info.lcd_pwm_ch;
 			lcdp->pwm_info.polarity = lcdp->panel_info.lcd_pwm_pol;
-			lcdp->pwm_info.dev =
-			    lcd_fb_pwm_request(lcdp->panel_info.lcd_pwm_ch);
+			lcdp->pwm_info.dev = sunxi_lcd_fb_pwm_request(
+				lcdp->panel_info.lcd_pwm_ch);
 
 			if (lcdp->panel_info.lcd_pwm_freq != 0) {
-				period_ns =
-				    1000 * 1000 * 1000 /
-				    lcdp->panel_info.lcd_pwm_freq;
+				period_ns = 1000 * 1000 * 1000 /
+					    lcdp->panel_info.lcd_pwm_freq;
 			} else {
-				lcd_fb_wrn("lcd%d.lcd_pwm_freq is ZERO\n",
-				       lcd->disp);
+				LCDFB_WRN("lcd%d.lcd_pwm_freq is ZERO\n",
+					  lcd->disp);
 				/* default 1khz */
 				period_ns = 1000 * 1000 * 1000 / 1000;
 			}
@@ -1553,7 +1812,7 @@ static s32 disp_lcd_init(struct lcd_fb_device *lcd)
 			duty_ns = (backlight_bright * period_ns) / 256;
 			lcdp->pwm_info.duty_ns = duty_ns;
 			lcdp->pwm_info.period_ns = period_ns;
-			disp_lcd_backlight_register(lcd);
+			sunxi_lcd_fb_disp_lcd_backlight_register(lcd);
 		}
 		for (i = 0; i < 256; i++) {
 			lcdp->panel_extend_info.lcd_gamma_tbl[i] =
@@ -1565,40 +1824,44 @@ static s32 disp_lcd_init(struct lcd_fb_device *lcd)
 
 			memcpy(&gpio_info, &(lcdp->lcd_cfg.lcd_gpio[i]),
 			       sizeof(struct disp_gpio_info));
-			lcd_fb_gpio_request(&gpio_info);
+			sunxi_lcd_fb_gpio_request(&gpio_info);
 		}
 	}
 
 	return 0;
 }
 
-
-
-static s32 disp_lcd_exit(struct lcd_fb_device *lcd)
+static s32 sunxi_lcd_fb_disp_lcd_exit(struct sunxi_lcd_fb_device *lcd)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
-	if ((lcd == NULL) || (lcdp == NULL)) {
-		lcd_fb_wrn("NULL hdl!\n");
+	if (lcd == NULL) {
+		LCDFB_WRN("lcd handle is NULL!\n");
 		return -1;
 	}
 
-	if (lcdp->panel_info.lcd_pwm_used) {
-		disp_lcd_backlight_unregister(lcd);
-		lcd_fb_pwm_free(lcdp->pwm_info.dev);
+	if (lcdp == NULL) {
+		LCDFB_WRN("lcdp handle is NULL!\n");
+		return -1;
 	}
 
+	if (lcdp->panel_info.lcd_pwm_used) {
+		sunxi_lcd_fb_disp_lcd_backlight_unregister(lcd);
+		sunxi_lcd_fb_pwm_free(lcdp->pwm_info.dev);
+	}
 
 	return 0;
 }
 
-s32 disp_lcd_get_resolution(struct lcd_fb_device *dispdev, u32 *xres,
-			       u32 *yres)
+s32 sunxi_lcd_fb_disp_lcd_get_resolution(struct sunxi_lcd_fb_device *dispdev,
+					 u32 *xres, u32 *yres)
 {
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(dispdev);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(dispdev);
 
 	if (dispdev == NULL) {
-		lcd_fb_wrn("NULL hdl!\n");
+		LCDFB_WRN("NULL hdl!\n");
 		return -1;
 	}
 
@@ -1611,28 +1874,32 @@ s32 disp_lcd_get_resolution(struct lcd_fb_device *dispdev, u32 *xres,
 	return 0;
 }
 
-static int disp_lcd_panel_dma_transfer(struct lcd_fb_device *p_lcd, void *buf,
-				       unsigned int len)
+static int
+sunxi_lcd_fb_disp_lcd_panel_dma_transfer(struct sunxi_lcd_fb_device *p_lcd,
+					 void *buf, u32 len)
 {
 	struct spi_transfer t;
 	int ret = 0;
 	struct spi_device *spi_device;
+#if defined(SUPPORT_DBI_IF)
 	struct sunxi_dbi_config dbi_config;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(p_lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(p_lcd);
+#endif
 
 	if (!p_lcd || !p_lcd->spi_device)
 		return -1;
 
 	spi_device = p_lcd->spi_device;
 	if (spi_device == NULL)
-		lcd_fb_wrn("\n");
+		LCDFB_WRN("\n");
 
 	memset(&t, 0, sizeof(t));
 
 #if defined(SUPPORT_DBI_IF)
 	memset(&dbi_config, 0, sizeof(dbi_config));
 	if (lcdp->panel_info.lcd_if == LCD_FB_IF_DBI) {
-		spi_dbi_config_init(lcdp, &dbi_config);
+		sunxi_lcd_fb_spi_dbi_config_init(lcdp, &dbi_config);
 		DBI_WRITE(dbi_config.dbi_mode);
 		DBI_MSB_FIRST(dbi_config.dbi_mode);
 		DBI_TR_VIDEO(dbi_config.dbi_mode);
@@ -1652,23 +1919,121 @@ static int disp_lcd_panel_dma_transfer(struct lcd_fb_device *p_lcd, void *buf,
 	return ret;
 }
 
-static s32 _spi_dc_pin_set(struct disp_lcd_private_data *lcdp, u32 data)
+static int
+sunxi_lcd_fb_disp_qspi_lcd_panel_dma_transfer(struct sunxi_lcd_fb_device *p_lcd,
+					      void *buf, u32 len)
+{
+	struct spi_message msg;
+	struct spi_transfer tr[2];
+	struct spi_device *spi_device;
+	int ret;
+	unsigned char addr_buf[4] = { 0xA2, 0x00, 0x2c, 0x00 };
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(p_lcd);
+
+	if (!p_lcd || !p_lcd->spi_device)
+		return -1;
+
+	spi_device = p_lcd->spi_device;
+	if (spi_device == NULL)
+		LCDFB_WRN("\n");
+
+	memset(&tr, 0, sizeof(struct spi_transfer) * 2);
+
+	if (lcdp->panel_info.qspi_if == LCD_FB_QSPI_LANE2) {
+		addr_buf[0] = 0xA2;
+
+		spi_device->mode |= SPI_TX_DUAL;
+		// First transfer: addr_buf with tx_nbits = 1
+		tr[0].tx_buf = addr_buf;
+		tr[0].rx_buf = NULL;
+		tr[0].len = sizeof(addr_buf);
+		tr[0].speed_hz = spi_device->max_speed_hz;
+		tr[0].tx_nbits = SPI_NBITS_SINGLE; // tx_nbits = 1
+
+		// Second transfer: buf with tx_nbits = 2
+		tr[1].tx_buf = buf;
+		tr[1].rx_buf = NULL;
+		tr[1].len = len;
+		tr[1].speed_hz = spi_device->max_speed_hz;
+		tr[1].tx_nbits = SPI_NBITS_DUAL; // tx_nbits = 2
+
+		spi_message_init(&msg);
+		spi_message_add_tail(&tr[0], &msg);
+		spi_message_add_tail(&tr[1], &msg);
+
+		ret = spi_sync(spi_device, &msg);
+		spi_device->mode &= ~SPI_TX_DUAL;
+	} else if (lcdp->panel_info.qspi_if == LCD_FB_QSPI_LANE4) {
+		addr_buf[0] = 0x32;
+
+		spi_device->mode |= SPI_TX_QUAD;
+		// First transfer: addr_buf with tx_nbits = 1
+		tr[0].tx_buf = addr_buf;
+		tr[0].rx_buf = NULL;
+		tr[0].len = sizeof(addr_buf);
+		tr[0].speed_hz = spi_device->max_speed_hz;
+		tr[0].tx_nbits = SPI_NBITS_SINGLE; // tx_nbits = 1
+
+		// Second transfer: buf with tx_nbits = 4
+		tr[1].tx_buf = buf;
+		tr[1].rx_buf = NULL;
+		tr[1].len = len;
+		tr[1].speed_hz = spi_device->max_speed_hz;
+		tr[1].tx_nbits = SPI_NBITS_QUAD; // tx_nbits = 4
+
+		spi_message_init(&msg);
+		spi_message_add_tail(&tr[0], &msg);
+		spi_message_add_tail(&tr[1], &msg);
+
+		ret = spi_sync(spi_device, &msg);
+		spi_device->mode &= ~SPI_TX_QUAD;
+	} else {
+		addr_buf[0] = 0x02;
+
+		// First transfer: addr_buf with tx_nbits = 1
+		tr[0].tx_buf = addr_buf;
+		tr[0].rx_buf = NULL;
+		tr[0].len = sizeof(addr_buf);
+		tr[0].speed_hz = spi_device->max_speed_hz;
+		tr[0].tx_nbits = SPI_NBITS_SINGLE; // tx_nbits = 1
+
+		// Second transfer: buf with tx_nbits = 1
+		tr[1].tx_buf = buf;
+		tr[1].rx_buf = NULL;
+		tr[1].len = len;
+		tr[1].speed_hz = spi_device->max_speed_hz;
+		tr[1].tx_nbits = SPI_NBITS_SINGLE; // tx_nbits = 1
+
+		spi_message_init(&msg);
+		spi_message_add_tail(&tr[0], &msg);
+		spi_message_add_tail(&tr[1], &msg);
+
+		ret = spi_sync(spi_device, &msg);
+	}
+	return ret;
+}
+
+static s32 sunxi_lcd_fb_spi_dc_pin_set(struct disp_lcd_private_data *lcdp,
+				       u32 data)
 {
 	if (!lcdp)
 		goto OUT;
 
 	if (strlen(lcdp->lcd_cfg.lcd_spi_dc_pin.name))
-		return lcd_fb_gpio_set_value(lcdp->lcd_cfg.lcd_spi_dc_pin.gpio, data,
-					     "lcd_spi_dc_pin");
+		return sunxi_lcd_fb_gpio_set_value(
+			lcdp->lcd_cfg.lcd_spi_dc_pin.gpio, data,
+			"lcd_spi_dc_pin");
 OUT:
 	return -1;
 }
 
-int disp_lcd_wait_for_vsync(struct lcd_fb_device *p_lcd)
+int sunxi_lcd_fb_disp_lcd_wait_for_vsync(struct sunxi_lcd_fb_device *p_lcd)
 {
 	unsigned long count;
 	int ret = -1;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(p_lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(p_lcd);
 
 	count = lcdp->wait_count;
 
@@ -1676,18 +2041,20 @@ int disp_lcd_wait_for_vsync(struct lcd_fb_device *p_lcd)
 		goto OUT;
 
 	ret = wait_event_interruptible_timeout(
-	    lcdp->wait, count != lcdp->wait_count, msecs_to_jiffies(50));
+		lcdp->wait, count != lcdp->wait_count, msecs_to_jiffies(50));
 
 OUT:
 	return ret;
 }
 
-int disp_lcd_set_layer(struct lcd_fb_device *lcd, struct fb_info *p_info)
+int sunxi_lcd_fb_disp_spi_lcd_set_layer(struct sunxi_lcd_fb_device *lcd,
+					struct fb_info *p_info)
 {
 	int ret = -1;
-	unsigned int i = 0, len = 0;
+	u32 i = 0, len = 0;
 	unsigned char *addr = NULL, *end_addr = NULL;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
 	mutex_lock(&lcdp->layer_mlock);
 
@@ -1696,15 +2063,54 @@ int disp_lcd_set_layer(struct lcd_fb_device *lcd, struct fb_info *p_info)
 
 	if (p_info) {
 		addr = (unsigned char *)p_info->screen_base +
-			p_info->var.yoffset * p_info->fix.line_length;
+		       p_info->var.yoffset * p_info->fix.line_length;
 		end_addr = (unsigned char *)addr + p_info->fix.smem_len;
 		for (i = 0; i < p_info->var.yres &&
-		     addr <= end_addr - p_info->fix.line_length;
+			    addr <= end_addr - p_info->fix.line_length;
+		     i += lcdp->panel_info.lines_per_transfer) {
+			ret = sunxi_lcd_fb_disp_lcd_panel_dma_transfer(
+				lcd, (void *)addr, len);
+			addr = (unsigned char *)addr +
+			       p_info->fix.line_length *
+				       lcdp->panel_info.lines_per_transfer;
+		}
+	}
+
+	mutex_unlock(&lcdp->layer_mlock);
+	return ret;
+}
+
+int sunxi_lcd_fb_disp_qspi_lcd_set_layer(struct sunxi_lcd_fb_device *lcd,
+					 struct fb_info *p_info)
+{
+	static int spi_line_lenth;
+	int ret = -1;
+	unsigned int i = 0, len = 0;
+	unsigned char *addr = NULL, *end_addr = NULL;
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
+
+	mutex_lock(&lcdp->layer_mlock);
+
+	if (!spi_line_lenth)
+		spi_line_lenth =
+			p_info->var.xres_virtual * lcdp->panel_info.bpp;
+
+	len = spi_line_lenth;
+	len *= lcdp->panel_info.lines_per_transfer;
+
+	if (p_info) {
+		addr = (unsigned char *)p_info->screen_base +
+		       p_info->var.yoffset * p_info->fix.line_length;
+		end_addr = (unsigned char *)addr + p_info->fix.smem_len;
+		for (i = 0;
+		     i < p_info->var.yres && addr <= end_addr - spi_line_lenth;
 		     i += lcdp->panel_info.lines_per_transfer) {
-			ret = disp_lcd_panel_dma_transfer(lcd, (void *)addr, len);
+			ret = sunxi_lcd_fb_disp_qspi_lcd_panel_dma_transfer(
+				lcd, (void *)addr, len);
 			addr = (unsigned char *)addr +
-				p_info->fix.line_length *
-				lcdp->panel_info.lines_per_transfer;
+			       spi_line_lenth *
+				       lcdp->panel_info.lines_per_transfer;
 		}
 	}
 
@@ -1712,10 +2118,12 @@ int disp_lcd_set_layer(struct lcd_fb_device *lcd, struct fb_info *p_info)
 	return ret;
 }
 
-int disp_lcd_set_var(struct lcd_fb_device *lcd, struct fb_info *p_info)
+int sunxi_lcd_fb_disp_lcd_set_var(struct sunxi_lcd_fb_device *lcd,
+				  struct fb_info *p_info)
 {
 	int ret = -1;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
 	mutex_lock(&lcdp->layer_mlock);
 	if (lcdp->lcd_panel_fun.set_var && p_info)
@@ -1724,22 +2132,28 @@ int disp_lcd_set_var(struct lcd_fb_device *lcd, struct fb_info *p_info)
 	return ret;
 }
 
-int disp_lcd_blank(struct lcd_fb_device *lcd, unsigned int en)
+int sunxi_lcd_fb_disp_lcd_blank(struct sunxi_lcd_fb_device *lcd, u32 en)
 {
 	int ret = -1;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(lcd);
 
 	if (lcdp->lcd_panel_fun.blank)
 		ret = lcdp->lcd_panel_fun.blank(lcd->disp, en);
 	return ret;
 }
 
-static int disp_lcd_cmd_read(struct lcd_fb_device *p_lcd, unsigned char cmd,
-		unsigned char *rx_buf, unsigned char len)
+static int sunxi_lcd_fb_disp_lcd_cmd_read(struct sunxi_lcd_fb_device *p_lcd,
+					  unsigned char cmd,
+					  unsigned char *rx_buf,
+					  unsigned char len)
 {
 	struct spi_transfer t;
+#if defined(SUPPORT_DBI_IF)
 	struct sunxi_dbi_config dbi_config;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(p_lcd);
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(p_lcd);
+#endif
 
 	if (!p_lcd || !p_lcd->spi_device)
 		return -1;
@@ -1748,15 +2162,15 @@ static int disp_lcd_cmd_read(struct lcd_fb_device *p_lcd, unsigned char cmd,
 #if defined(SUPPORT_DBI_IF)
 	memset(&dbi_config, 0, sizeof(dbi_config));
 	if (lcdp->panel_info.lcd_if == LCD_FB_IF_DBI) {
-		spi_dbi_config_init(lcdp, &dbi_config);
+		sunxi_lcd_fb_spi_dbi_config_init(lcdp, &dbi_config);
 		DBI_READ(dbi_config.dbi_mode);
 		DBI_MSB_FIRST(dbi_config.dbi_mode);
 		DBI_TR_COMMAND(dbi_config.dbi_mode);
 		DBI_DCX_COMMAND(dbi_config.dbi_mode);
-		dbi_config.dbi_format = 0;	/* must set rgb111 */
+		dbi_config.dbi_format = 0; /* must set rgb111 */
 		dbi_config.dbi_cmd_data = cmd;
-		dbi_config.dbi_read_bytes = len;	/* read 1 number */
-		dbi_config.dbi_read_dummy = 2;  /* read 2 dummy, modifiable */
+		dbi_config.dbi_read_bytes = len; /* read 1 number */
+		dbi_config.dbi_read_dummy = 2; /* read 2 dummy, modifiable */
 		sunxi_dbi_set_config(p_lcd->spi_device, &dbi_config);
 
 		t.rx_buf = rx_buf;
@@ -1772,11 +2186,53 @@ static int disp_lcd_cmd_read(struct lcd_fb_device *p_lcd, unsigned char cmd,
 	}
 }
 
-static int disp_lcd_para_write(struct lcd_fb_device *p_lcd, unsigned char para)
+static int
+sunxi_lcd_fb_disp_qspi_lcd_cmd_read(struct sunxi_lcd_fb_device *p_lcd,
+				    unsigned char cmd, unsigned char *rx_buf,
+				    unsigned char len)
+{
+	struct spi_message msg;
+	struct spi_transfer tr[2];
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(p_lcd);
+	unsigned char addr_buf[5] = { 0x0B, 0x00, cmd, 0x00, 0x00 };
+
+	if (!p_lcd || !p_lcd->spi_device)
+		return -1;
+
+	memset(&tr, 0, sizeof(struct spi_transfer) * 2);
+
+	sunxi_lcd_fb_spi_dc_pin_set(lcdp, 1);
+
+	tr[0].tx_buf = addr_buf;
+	tr[0].rx_buf = NULL;
+	tr[0].len = 5;
+	tr[0].speed_hz = 5000000;
+	tr[0].tx_nbits = 1;
+	tr[0].rx_nbits = 1;
+
+	tr[1].tx_buf = NULL;
+	tr[1].rx_buf = rx_buf;
+	tr[1].len = len;
+	tr[1].speed_hz = 5000000;
+	tr[1].tx_nbits = 1;
+	tr[1].rx_nbits = 1;
+
+	spi_message_init(&msg);
+	spi_message_add_tail(&tr[0], &msg);
+	spi_message_add_tail(&tr[1], &msg);
+	return spi_sync(p_lcd->spi_device, &msg);
+}
+
+static int sunxi_lcd_fb_disp_lcd_para_write(struct sunxi_lcd_fb_device *p_lcd,
+					    unsigned char para)
 {
 	struct spi_transfer t;
+#if defined(SUPPORT_DBI_IF)
 	struct sunxi_dbi_config dbi_config;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(p_lcd);
+#endif
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(p_lcd);
 
 	if (!p_lcd || !p_lcd->spi_device)
 		return -1;
@@ -1785,17 +2241,17 @@ static int disp_lcd_para_write(struct lcd_fb_device *p_lcd, unsigned char para)
 #if defined(SUPPORT_DBI_IF)
 	memset(&dbi_config, 0, sizeof(dbi_config));
 	if (lcdp->panel_info.lcd_if == LCD_FB_IF_DBI) {
-		spi_dbi_config_init(lcdp, &dbi_config);
+		sunxi_lcd_fb_spi_dbi_config_init(lcdp, &dbi_config);
 		DBI_WRITE(dbi_config.dbi_mode);
 		DBI_MSB_FIRST(dbi_config.dbi_mode);
 		DBI_TR_COMMAND(dbi_config.dbi_mode);
-		dbi_config.dbi_format = 0;	/* must set rgb111 */
+		dbi_config.dbi_format = 0; /* must set rgb111 */
 		DBI_DCX_DATA(dbi_config.dbi_mode);
 		sunxi_dbi_set_config(p_lcd->spi_device, &dbi_config);
 	} else
 #endif
 	{
-		_spi_dc_pin_set(lcdp, 1);
+		sunxi_lcd_fb_spi_dc_pin_set(lcdp, 1);
 	}
 
 	t.tx_buf = &para;
@@ -1805,11 +2261,86 @@ static int disp_lcd_para_write(struct lcd_fb_device *p_lcd, unsigned char para)
 	return spi_sync_transfer(p_lcd->spi_device, &t, 1);
 }
 
-static int disp_lcd_cmd_write(struct lcd_fb_device *p_lcd, unsigned char cmd)
+static int
+sunxi_lcd_fb_disp_qspi_lcd_para_write(struct sunxi_lcd_fb_device *p_lcd,
+				      unsigned char cmd, unsigned char para)
+{
+	struct spi_message msg;
+	struct spi_transfer tr[2];
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(p_lcd);
+	unsigned char addr_buf[4] = { 0x02, 0x00, cmd, 0x00 };
+
+	if (!p_lcd || !p_lcd->spi_device)
+		return -1;
+
+	memset(&tr, 0, sizeof(struct spi_transfer) * 2);
+
+	sunxi_lcd_fb_spi_dc_pin_set(lcdp, 1);
+
+	tr[0].tx_buf = addr_buf;
+	tr[0].len = 4;
+	tr[0].speed_hz = 10000000;
+	tr[0].tx_nbits = 1;
+	tr[0].rx_nbits = 1;
+
+	tr[1].tx_buf = &para;
+	tr[1].len = 1;
+	tr[1].speed_hz = 10000000;
+	tr[1].tx_nbits = 1;
+	tr[1].rx_nbits = 1;
+
+	spi_message_init(&msg);
+	spi_message_add_tail(&tr[0], &msg);
+	spi_message_add_tail(&tr[1], &msg);
+	return spi_sync(p_lcd->spi_device, &msg);
+}
+
+static int
+sunxi_lcd_fb_disp_qspi_lcd_multi_para_write(struct sunxi_lcd_fb_device *p_lcd,
+					    unsigned char cmd,
+					    unsigned char *tx_buf, u32 len)
+{
+	struct spi_message msg;
+	struct spi_transfer tr[2];
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(p_lcd);
+	unsigned char addr_buf[4] = { 0x02, 0x00, cmd, 0x00 };
+
+	if (!p_lcd || !p_lcd->spi_device)
+		return -1;
+
+	memset(&tr, 0, sizeof(struct spi_transfer) * 2);
+
+	sunxi_lcd_fb_spi_dc_pin_set(lcdp, 1);
+
+	tr[0].tx_buf = addr_buf;
+	tr[0].len = 4;
+	tr[0].speed_hz = 10000000;
+	tr[0].tx_nbits = 1;
+	tr[0].rx_nbits = 1;
+
+	tr[1].tx_buf = tx_buf;
+	tr[1].len = len;
+	tr[1].speed_hz = 10000000;
+	tr[1].tx_nbits = 1;
+	tr[1].rx_nbits = 1;
+
+	spi_message_init(&msg);
+	spi_message_add_tail(&tr[0], &msg);
+	spi_message_add_tail(&tr[1], &msg);
+	return spi_sync(p_lcd->spi_device, &msg);
+}
+
+static int sunxi_lcd_fb_disp_lcd_cmd_write(struct sunxi_lcd_fb_device *p_lcd,
+					   unsigned char cmd)
 {
 	struct spi_transfer t;
+#if defined(SUPPORT_DBI_IF)
 	struct sunxi_dbi_config dbi_config;
-	struct disp_lcd_private_data *lcdp = disp_lcd_get_priv(p_lcd);
+#endif
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(p_lcd);
 
 	if (!p_lcd || !p_lcd->spi_device)
 		return -1;
@@ -1817,42 +2348,78 @@ static int disp_lcd_cmd_write(struct lcd_fb_device *p_lcd, unsigned char cmd)
 #if defined(SUPPORT_DBI_IF)
 	memset(&dbi_config, 0, sizeof(dbi_config));
 	if (lcdp->panel_info.lcd_if == LCD_FB_IF_DBI) {
-		spi_dbi_config_init(lcdp, &dbi_config);
+		sunxi_lcd_fb_spi_dbi_config_init(lcdp, &dbi_config);
 		DBI_WRITE(dbi_config.dbi_mode);
 		DBI_MSB_FIRST(dbi_config.dbi_mode);
 		DBI_TR_COMMAND(dbi_config.dbi_mode);
 		DBI_DCX_COMMAND(dbi_config.dbi_mode);
-		dbi_config.dbi_format = 0;	/* must set rgb111 */
+		dbi_config.dbi_format = 0; /* must set rgb111 */
 		sunxi_dbi_set_config(p_lcd->spi_device, &dbi_config);
 	} else
 #endif
 	{
-		_spi_dc_pin_set(lcdp, 0);
+		sunxi_lcd_fb_spi_dc_pin_set(lcdp, 0);
 	}
 	memset(&t, 0, sizeof(t));
 
-	t.tx_buf 	= &cmd;
-	t.len		= 1;
+	t.tx_buf = &cmd;
+	t.len = 1;
 	t.speed_hz = 20000000;
 
 	spi_sync_transfer(p_lcd->spi_device, &t, 1);
 	/* restore to transfer data */
 	if (lcdp->panel_info.lcd_if == LCD_FB_IF_SPI)
-		_spi_dc_pin_set(lcdp, 1);
+		sunxi_lcd_fb_spi_dc_pin_set(lcdp, 1);
 	return 0;
 }
 
-s32 disp_init_lcd(struct dev_lcd_fb_t *p_info)
+static int
+sunxi_lcd_fb_disp_qspi_lcd_cmd_write(struct sunxi_lcd_fb_device *p_lcd,
+				     unsigned char cmd)
+{
+	struct spi_transfer t;
+	struct disp_lcd_private_data *lcdp =
+		sunxi_lcd_fb_disp_lcd_get_priv(p_lcd);
+	unsigned char addr_buf[4] = { 0x02, 0x00, cmd, 0x00 };
+
+	if (!p_lcd || !p_lcd->spi_device)
+		return -1;
+
+	sunxi_lcd_fb_spi_dc_pin_set(lcdp, 0);
+
+	memset(&t, 0, sizeof(struct spi_transfer));
+
+	t.tx_buf = addr_buf;
+	t.len = 4;
+	t.speed_hz = 5000000;
+	t.tx_nbits = 1;
+	t.rx_nbits = 1;
+
+	spi_sync_transfer(p_lcd->spi_device, &t, 1);
+	sunxi_lcd_fb_spi_dc_pin_set(lcdp, 1);
+	return 0;
+}
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0))
+static struct spi_device *of_find_spi_device_by_node(struct device_node *node)
+{
+	struct device *dev = bus_find_device_by_of_node(&spi_bus_type, node);
+	return dev ? to_spi_device(dev) : NULL;
+}
+#endif
+
+s32 sunxi_lcd_fb_disp_init_lcd(struct sunxi_lcd_fb_dev_lcd_fb_t *p_info)
 {
 	u32 disp = 0;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 	struct disp_lcd_private_data *lcdp;
-	u32 hwdev_index = 0;
-	u32 num_devices_support_lcd = SUPPORT_MAX_LCD;
-	char primary_key[20];
+	struct device_node *endpoint_np = NULL, *panel_node = NULL;
+	struct spi_device *spi;
+	struct device_node *np = p_info->device->of_node;
+	u32 hwdev_index = 0, i = 0;
 	int ret = 0, value = 1;
 
-	lcd_fb_inf("disp_init_lcd\n");
+	LCDFB_INF("sunxi_lcd_fb_disp_init_lcd\n");
 
 	spin_lock_init(&lcd_data_lock);
 
@@ -1860,87 +2427,139 @@ s32 disp_init_lcd(struct dev_lcd_fb_t *p_info)
 		kfree(lcds);
 		lcds = NULL;
 	}
-	lcds =
-	    kmalloc_array(num_devices_support_lcd, sizeof(*lcds),
-			  GFP_KERNEL | __GFP_ZERO);
+
+	lcds = kmalloc_array(p_info->lcd_panel_count, sizeof(*lcds),
+			     GFP_KERNEL | __GFP_ZERO);
 	if (lcds == NULL) {
-		lcd_fb_wrn("malloc memory(%d bytes) fail!\n",
-		       (unsigned int)sizeof(struct lcd_fb_device) *
-		       num_devices_support_lcd);
+		LCDFB_WRN("malloc memory(%d bytes) fail!\n",
+			  (u32)sizeof(struct sunxi_lcd_fb_device) *
+				  p_info->lcd_panel_count);
 		goto malloc_err;
 	}
-	lcd_private =
-	    (struct disp_lcd_private_data *)
-	    kmalloc(sizeof(*lcd_private)
-		    * num_devices_support_lcd, GFP_KERNEL | __GFP_ZERO);
+
+	lcd_private = (struct disp_lcd_private_data *)kmalloc(
+		sizeof(*lcd_private) * p_info->lcd_panel_count,
+		GFP_KERNEL | __GFP_ZERO);
+
 	if (lcd_private == NULL) {
-		lcd_fb_wrn("malloc memory(%d bytes) fail!\n",
-		       (unsigned int)sizeof(struct disp_lcd_private_data) *
-		       num_devices_support_lcd);
+		LCDFB_WRN("malloc memory(%d bytes) fail!\n",
+			  (u32)sizeof(struct disp_lcd_private_data) *
+				  p_info->lcd_panel_count);
 		goto malloc_err;
 	}
 
 	disp = 0;
-	for (hwdev_index = 0; hwdev_index < num_devices_support_lcd; hwdev_index++) {
+	for (hwdev_index = 0; hwdev_index < p_info->lcd_panel_count;
+	     hwdev_index++) {
+		endpoint_np = of_graph_get_endpoint_by_regs(np, 0, hwdev_index);
+		if (!endpoint_np) {
+			LCDFB_WRN("failed to get endpoint %d\n", i);
+			continue;
+		}
+		panel_node = of_graph_get_remote_endpoint(endpoint_np);
+		if (!panel_node) {
+			of_node_put(endpoint_np);
+			LCDFB_WRN("failed to get endpoint%d node\n",
+				  hwdev_index);
+			continue;
+		}
+
+		/* check panel is used */
+		ret = sunxi_lcd_fb_script_get_item(panel_node, "lcd_used",
+						   &value, 1);
+		if (ret != 1 || value != 1) {
+			of_node_put(endpoint_np);
+			LCDFB_INF("sunxi_lcd_fb_script_get_item %d value %d\n",
+				  ret, value);
+			continue;
+		}
 
-		sprintf(primary_key, "lcd_fb%d", disp);
-		ret = lcd_fb_script_get_item(primary_key, "lcd_used", &value,
-					       1);
-		if (ret != 1 || value != 1)
+		spi = of_find_spi_device_by_node(panel_node);
+		if (!spi) {
+			of_node_put(panel_node);
+			of_node_put(endpoint_np);
+			LCDFB_WRN(
+				"failed to obtain the spi device of panel%d\n",
+				hwdev_index);
 			continue;
+		}
+
+		LCDFB_INF("get spi panel %d, init for disp %d\n", hwdev_index,
+			  disp);
+
 		lcd = &lcds[disp];
 		lcdp = &lcd_private[disp];
 		lcd->priv_data = (void *)lcdp;
 		++p_info->lcd_fb_num;
 
+		lcd->panel_node = panel_node;
+		lcd->spi_device = spi;
+
 		sprintf(lcd->name, "lcd%d", disp);
 		lcd->disp = disp;
 		lcd->dev = p_info->device;
 
-		lcd->get_resolution = disp_lcd_get_resolution;
-		lcd->enable = disp_lcd_enable;
-		lcd->fake_enable = disp_lcd_fake_enable;
-		lcd->disable = disp_lcd_disable;
-		lcd->is_enabled = disp_lcd_is_enabled;
-		lcd->set_bright = disp_lcd_set_bright;
-		lcd->get_bright = disp_lcd_get_bright;
-		lcd->set_bright_dimming = disp_lcd_set_bright_dimming;
-		lcd->get_panel_info = disp_lcd_get_panel_info;
-
-		lcd->set_panel_func = disp_lcd_set_panel_funs;
-		lcd->set_open_func = disp_lcd_set_open_func;
-		lcd->set_close_func = disp_lcd_set_close_func;
-		lcd->backlight_enable = disp_lcd_backlight_enable;
-		lcd->backlight_disable = disp_lcd_backlight_disable;
-		lcd->pwm_enable = disp_lcd_pwm_enable;
-		lcd->pwm_disable = disp_lcd_pwm_disable;
-		lcd->power_enable = disp_lcd_power_enable;
-		lcd->power_disable = disp_lcd_power_disable;
-		lcd->pin_cfg = disp_lcd_pin_cfg;
-		lcd->gpio_set_value = disp_lcd_gpio_set_value;
-		lcd->gpio_set_direction = disp_lcd_gpio_set_direction;
-		lcd->get_dimensions = disp_lcd_get_dimensions;
-		lcd->set_gamma_tbl = disp_lcd_set_gamma_tbl;
-		lcd->enable_gamma = disp_lcd_enable_gamma;
-		lcd->disable_gamma = disp_lcd_disable_gamma;
-		lcd->set_color_temperature = disp_lcd_set_color_temperature;
-		lcd->get_color_temperature = disp_lcd_get_color_temperature;
-		lcd->set_layer = disp_lcd_set_layer;
-		lcd->blank = disp_lcd_blank;
-		lcd->set_var = disp_lcd_set_var;
-		lcd->para_write = disp_lcd_para_write;
-		lcd->cmd_write = disp_lcd_cmd_write;
-		lcd->cmd_read = disp_lcd_cmd_read;
-		lcd->wait_for_vsync = disp_lcd_wait_for_vsync;
-
-
-		lcd->init = disp_lcd_init;
-		lcd->exit = disp_lcd_exit;
+		lcd->get_resolution = sunxi_lcd_fb_disp_lcd_get_resolution;
+		lcd->enable = sunxi_lcd_fb_disp_lcd_enable;
+		lcd->fake_enable = sunxi_lcd_fb_disp_lcd_fake_enable;
+		lcd->disable = sunxi_lcd_fb_disp_lcd_disable;
+		lcd->is_enabled = sunxi_lcd_fb_disp_lcd_is_enabled;
+		lcd->set_bright = sunxi_lcd_fb_disp_lcd_set_bright;
+		lcd->get_bright = sunxi_lcd_fb_disp_lcd_get_bright;
+		lcd->set_bright_dimming =
+			sunxi_lcd_fb_disp_lcd_set_bright_dimming;
+		lcd->get_panel_info = sunxi_lcd_fb_disp_lcd_get_panel_info;
+
+		lcd->set_panel_func = sunxi_lcd_fb_disp_lcd_set_panel_funs;
+		lcd->set_open_func = sunxi_lcd_fb_disp_lcd_set_open_func;
+		lcd->set_close_func = sunxi_lcd_fb_disp_lcd_set_close_func;
+		lcd->backlight_enable = sunxi_lcd_fb_disp_lcd_backlight_enable;
+		lcd->backlight_disable =
+			sunxi_lcd_fb_disp_lcd_backlight_disable;
+		lcd->pwm_enable = sunxi_lcd_fb_disp_lcd_pwm_enable;
+		lcd->pwm_disable = sunxi_lcd_fb_disp_lcd_pwm_disable;
+		lcd->power_enable = sunxi_lcd_fb_disp_lcd_power_enable;
+		lcd->power_disable = sunxi_lcd_fb_disp_lcd_power_disable;
+		lcd->pin_cfg = sunxi_lcd_fb_disp_lcd_pin_cfg;
+		lcd->gpio_set_value = sunxi_lcd_fb_disp_lcd_gpio_set_value;
+		lcd->gpio_set_direction =
+			sunxi_lcd_fb_disp_lcd_gpio_set_direction;
+		lcd->get_dimensions = sunxi_lcd_fb_disp_lcd_get_dimensions;
+		lcd->set_gamma_tbl = sunxi_lcd_fb_disp_lcd_set_gamma_tbl;
+		lcd->enable_gamma = sunxi_lcd_fb_disp_lcd_enable_gamma;
+		lcd->disable_gamma = sunxi_lcd_fb_disp_lcd_disable_gamma;
+		lcd->set_color_temperature =
+			sunxi_lcd_fb_disp_lcd_set_color_temperature;
+		lcd->get_color_temperature =
+			sunxi_lcd_fb_disp_lcd_get_color_temperature;
+		lcd->blank = sunxi_lcd_fb_disp_lcd_blank;
+		lcd->set_var = sunxi_lcd_fb_disp_lcd_set_var;
+		lcd->para_write = sunxi_lcd_fb_disp_lcd_para_write;
+		lcd->cmd_write = sunxi_lcd_fb_disp_lcd_cmd_write;
+		lcd->cmd_read = sunxi_lcd_fb_disp_lcd_cmd_read;
+		lcd->qspi_para_write = sunxi_lcd_fb_disp_qspi_lcd_para_write;
+		lcd->qspi_multi_para_write =
+			sunxi_lcd_fb_disp_qspi_lcd_multi_para_write;
+		lcd->qspi_cmd_write = sunxi_lcd_fb_disp_qspi_lcd_cmd_write;
+		lcd->qspi_cmd_read = sunxi_lcd_fb_disp_qspi_lcd_cmd_read;
+		lcd->wait_for_vsync = sunxi_lcd_fb_disp_lcd_wait_for_vsync;
+
+		lcd->init = sunxi_lcd_fb_disp_lcd_init;
+		lcd->exit = sunxi_lcd_fb_disp_lcd_exit;
 
 		lcd->init(lcd);
-		lcd_fb_device_register(lcd);
+
+		if (lcdp->panel_info.lcd_if == LCD_FB_IF_QSPI)
+			lcd->set_layer = sunxi_lcd_fb_disp_qspi_lcd_set_layer;
+		else
+			lcd->set_layer = sunxi_lcd_fb_disp_spi_lcd_set_layer;
+
+		sunxi_sunxi_lcd_fb_device_register(lcd);
 
 		disp++;
+
+		of_node_put(panel_node);
+		of_node_put(endpoint_np);
 	}
 
 	return 0;
@@ -1954,27 +2573,22 @@ malloc_err:
 	return -1;
 }
 
-s32 disp_exit_lcd(void)
+s32 sunxi_lcd_fb_disp_exit_lcd(void)
 {
 	u32 hwdev_index = 0, disp = 0;
-	char primary_key[20];
-	int ret = 0, value = 1;
-	struct lcd_fb_device *lcd;
+	struct sunxi_lcd_fb_device *lcd;
 
 	if (!lcds)
 		return 0;
 
-	for (hwdev_index = 0; hwdev_index < SUPPORT_MAX_LCD; hwdev_index++) {
-		sprintf(primary_key, "lcd_fb%d", disp);
-		ret =
-		    lcd_fb_script_get_item(primary_key, "lcd_used", &value, 1);
-		if (ret != 1 || value != 1)
-			continue;
-
+	for (hwdev_index = 0; hwdev_index < g_drv_info.lcd_panel_count;
+	     hwdev_index++) {
 		lcd = &lcds[disp];
-		lcd_fb_device_unregister(lcd);
-		lcd->exit(lcd);
-		disp++;
+		if (lcd) {
+			sunxi_sunxi_lcd_fb_device_unregister(lcd);
+			lcd->exit(lcd);
+			disp++;
+		}
 	}
 
 	kfree(lcds);
diff --git a/drivers/video/sunxi/lcd_fb/disp_lcd.h b/drivers/video/sunxi/lcd_fb/disp_lcd.h
index 117b7171a..c1a7f0cb2 100644
--- a/drivers/video/sunxi/lcd_fb/disp_lcd.h
+++ b/drivers/video/sunxi/lcd_fb/disp_lcd.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Allwinner SoCs display driver.
@@ -10,23 +10,21 @@
  * warranty of any kind, whether express or implied.
  */
 
+#ifndef __DISP_LCD_H__
+#define __DISP_LCD_H__
 
 #include "include.h"
 #include "lcd_fb_intf.h"
 #include "dev_lcd_fb.h"
-#ifndef __DISP_LCD_H__
-#define __DISP_LCD_H__
 
-
-#define SUPPORT_MAX_LCD LCD_FB_MAX
 #define LCD_GPIO_NUM 8
 #define LCD_POWER_NUM 4
 #define LCD_POWER_STR_LEN 32
 #define LCD_GPIO_REGU_NUM 3
-#define LCD_GPIO_SCL (LCD_GPIO_NUM-2)
-#define LCD_GPIO_SDA (LCD_GPIO_NUM-1)
+#define LCD_GPIO_SCL (LCD_GPIO_NUM - 2)
+#define LCD_GPIO_SDA (LCD_GPIO_NUM - 1)
 
-struct disp_lcd_cfg {
+struct sunxi_lcd_fb_disp_lcd_cfg {
 	bool lcd_used;
 
 	bool lcd_bl_en_used;
@@ -64,17 +62,30 @@ struct disp_lcd_cfg {
 	u32 lcd_hue;
 };
 
-s32 disp_init_lcd(struct dev_lcd_fb_t *p_info);
-s32 disp_exit_lcd(void);
-s32 disp_lcd_set_bright(struct lcd_fb_device *lcd, u32 bright);
-s32 disp_lcd_get_bright(struct lcd_fb_device *lcd);
-s32 disp_lcd_gpio_init(struct lcd_fb_device *lcd);
-s32 disp_lcd_gpio_exit(struct lcd_fb_device *lcd);
-s32 disp_lcd_gpio_set_direction(struct lcd_fb_device *lcd, u32 io_index,
-				u32 direction);
-s32 disp_lcd_gpio_get_value(struct lcd_fb_device *lcd, u32 io_index);
-s32 disp_lcd_gpio_set_value(struct lcd_fb_device *lcd, u32 io_index, u32 data);
-s32 disp_lcd_is_enabled(struct lcd_fb_device *lcd);
-struct lcd_fb_device *disp_get_lcd(u32 disp);
+s32 sunxi_lcd_fb_disp_init_lcd(struct sunxi_lcd_fb_dev_lcd_fb_t *p_info);
+
+s32 sunxi_lcd_fb_disp_exit_lcd(void);
+
+s32 sunxi_lcd_fb_disp_lcd_set_bright(struct sunxi_lcd_fb_device *lcd,
+				     u32 bright);
+
+s32 sunxi_lcd_fb_disp_lcd_get_bright(struct sunxi_lcd_fb_device *lcd);
+
+s32 sunxi_lcd_fb_disp_lcd_gpio_init(struct sunxi_lcd_fb_device *lcd);
+
+s32 sunxi_lcd_fb_disp_lcd_gpio_exit(struct sunxi_lcd_fb_device *lcd);
+
+s32 sunxi_lcd_fb_disp_lcd_gpio_set_direction(struct sunxi_lcd_fb_device *lcd,
+					     u32 io_index, u32 direction);
+
+s32 sunxi_lcd_fb_disp_lcd_gpio_get_value(struct sunxi_lcd_fb_device *lcd,
+					 u32 io_index);
+
+s32 sunxi_lcd_fb_disp_lcd_gpio_set_value(struct sunxi_lcd_fb_device *lcd,
+					 u32 io_index, u32 data);
+
+s32 sunxi_lcd_fb_disp_lcd_is_enabled(struct sunxi_lcd_fb_device *lcd);
+
+struct sunxi_lcd_fb_device *sunxi_lcd_fb_disp_get_lcd(u32 disp);
 
 #endif
diff --git a/drivers/video/sunxi/lcd_fb/include.h b/drivers/video/sunxi/lcd_fb/include.h
index de95a0dc1..5a3eef03d 100644
--- a/drivers/video/sunxi/lcd_fb/include.h
+++ b/drivers/video/sunxi/lcd_fb/include.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Copyright (c) 2007-2019 Allwinnertech Co., Ltd.
@@ -48,12 +48,15 @@
 #include <linux/of_device.h>
 #include <linux/of_gpio.h>
 #include <linux/of_iommu.h>
+#include <linux/of.h>
+#include <linux/of_graph.h>
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/platform_device.h>
 #include <linux/pwm.h>
 #include <linux/regulator/consumer.h>
+#include <linux/version.h>
 #include <linux/sched.h> /* wake_up_process() */
 #include <linux/slab.h>
 #include <linux/timer.h>
@@ -63,154 +66,146 @@
 #include <sunxi-clk.h>
 #include <sunxi-gpio.h>
 #include <linux/pinctrl/consumer.h>
+#include <linux/gpio/machine.h>
 #include <linux/clk-provider.h>
 #include <linux/spi/spidev.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/sunxi-spi.h>
 #include "lcd_fb_feature.h"
 
-#define LCD_GAMMA_TABLE_SIZE (256 * sizeof(unsigned int))
+#define LCD_GAMMA_TABLE_SIZE (256 * sizeof(u32))
 #define LCD_FB_DEBUG_LEVEL 0
-#define LCD_FB_MAX 2 /* TODO:auto detect */
 
 #if LCD_FB_DEBUG_LEVEL == 1
-#define lcd_fb_inf(msg...) do { \
-			pr_warn("[LCD_FB] %s,line:%d:", __func__, __LINE__); \
-			pr_warn(msg); \
-	} while (0)
-#define lcd_fb_msg(msg...) do { \
-			pr_warn("[LCD_FB] %s,line:%d:", __func__, __LINE__); \
-			pr_warn(msg); \
-	} while (0)
-#define lcd_fb_here
-#define lcd_fb_dbg(msg...)
+#define LCDFB_INF(fmt, arg...)                                                 \
+	printk("sunxi:lcd_fb:[INFO] %s,line:%d - " fmt, __func__, __LINE__,    \
+	       ##arg)
+#define LCDFB_MSG(fmt, arg...)                                                 \
+	printk("sunxi:lcd_fb:[MSG ] %s,line:%d - " fmt, __func__, __LINE__,    \
+	       ##arg)
+#define LCDFB_HERE printk("[LCD_FB] %s,line:%d", __func__, __LINE__)
+#define LCDFB_DBG(fmt, arg...)                                                 \
+	printk("sunxi:lcd_fb:[DBG ] %s,line:%d - " fmt, __func__, __LINE__,    \
+	       ##arg)
 #elif LCD_FB_DEBUG_LEVEL == 2
-#define lcd_fb_inf(msg...) do { \
-			pr_warn("[LCD_FB] %s,line:%d:", __func__, __LINE__); \
-			pr_warn(msg); \
-	} while (0)
-#define lcd_fb_here do { \
-			pr_warn("[LCD_FB] %s,line:%d\n", __func__, __LINE__);\
-	} while (0)
-#define lcd_fb_dbg(msg...)  do { \
-			pr_warn("[LCD_FB] %s,line:%d:", __func__, __LINE__); \
-			pr_warn(msg); \
-	} while (0)
+#define LCDFB_INF(fmt, arg...)                                                 \
+	printk("sunxi:lcd_fb:[INFO] %s,line:%d - " fmt, __func__, __LINE__,    \
+	       ##arg)
+#define LCDFB_HERE printk("[LCD_FB] %s,line:%d", __func__, __LINE__)
+#define LCDFB_DBG(fmt, arg...)                                                 \
+	printk("sunxi:lcd_fb:[DBG ] %s,line:%d - " fmt, __func__, __LINE__,    \
+	       ##arg)
 #else
-#define lcd_fb_inf(msg...)
-#define lcd_fb_msg(msg...)
-#define lcd_fb_here
-#define lcd_fb_dbg(msg...)
+#define LCDFB_INF(fmt, arg...)
+#define LCDFB_MSG(fmt, arg...)
+#define LCDFB_HERE
+#define LCDFB_DBG(fmt, arg...)
 #endif
 
-#define lcd_fb_wrn(msg...) do { \
-			pr_warn("[LCD_FB] %s,line:%d:", __func__, __LINE__); \
-			pr_warn(msg); \
-		} while (0)
+#define LCDFB_WRN(fmt, arg...) printk("sunxi:lcd_fb:[WARN]: " fmt, ##arg)
 
 #if defined(SUPPORT_DBI_IF)
-#define DBI_READ(dbi_mode)			(dbi_mode |= (SUNXI_DBI_COMMAND_READ))
-#define DBI_WRITE(dbi_mode)			(dbi_mode &= ~(SUNXI_DBI_COMMAND_READ))
-#define DBI_LSB_FIRST(dbi_mode)		(dbi_mode |= SUNXI_DBI_LSB_FIRST)
-#define DBI_MSB_FIRST(dbi_mode)		(dbi_mode &= ~SUNXI_DBI_LSB_FIRST)
-#define	DBI_TR_VIDEO(dbi_mode)		(dbi_mode |= SUNXI_DBI_TRANSMIT_VIDEO)
-#define	DBI_TR_COMMAND(dbi_mode)	(dbi_mode &= ~(SUNXI_DBI_TRANSMIT_VIDEO))
-#define DBI_DCX_DATA(dbi_mode)		(dbi_mode |= SUNXI_DBI_DCX_DATA)
-#define DBI_DCX_COMMAND(dbi_mode)	(dbi_mode &= ~(SUNXI_DBI_DCX_DATA))
+#define DBI_READ(dbi_mode) (dbi_mode |= (SUNXI_DBI_COMMAND_READ))
+#define DBI_WRITE(dbi_mode) (dbi_mode &= ~(SUNXI_DBI_COMMAND_READ))
+#define DBI_LSB_FIRST(dbi_mode) (dbi_mode |= SUNXI_DBI_LSB_FIRST)
+#define DBI_MSB_FIRST(dbi_mode) (dbi_mode &= ~SUNXI_DBI_LSB_FIRST)
+#define DBI_TR_VIDEO(dbi_mode) (dbi_mode |= SUNXI_DBI_TRANSMIT_VIDEO)
+#define DBI_TR_COMMAND(dbi_mode) (dbi_mode &= ~(SUNXI_DBI_TRANSMIT_VIDEO))
+#define DBI_DCX_DATA(dbi_mode) (dbi_mode |= SUNXI_DBI_DCX_DATA)
+#define DBI_DCX_COMMAND(dbi_mode) (dbi_mode &= ~(SUNXI_DBI_DCX_DATA))
 #endif
 
-typedef void (*LCD_FUNC) (unsigned int sel);
-struct disp_lcd_function {
+typedef void (*LCD_FUNC)(u32 sel);
+struct sunxi_lcd_fb_disp_lcd_function {
 	LCD_FUNC func;
-	unsigned int delay;
+	u32 delay;
 };
 
 #define LCD_MAX_SEQUENCES 7
-struct disp_lcd_flow {
-	struct disp_lcd_function func[LCD_MAX_SEQUENCES];
-	unsigned int func_num;
-	unsigned int cur_step;
+struct sunxi_lcd_fb_disp_lcd_flow {
+	struct sunxi_lcd_fb_disp_lcd_function func[LCD_MAX_SEQUENCES];
+	u32 func_num;
+	u32 cur_step;
 };
 
-struct panel_extend_para {
-	unsigned int lcd_gamma_en;
-	unsigned int lcd_gamma_tbl[256];
-	unsigned int lcd_cmap_en;
-	unsigned int lcd_cmap_tbl[2][3][4];
-	unsigned int lcd_bright_curve_tbl[256];
+struct sunxi_lcd_fb_panel_extend_para {
+	u32 lcd_gamma_en;
+	u32 lcd_gamma_tbl[256];
+	u32 lcd_cmap_en;
+	u32 lcd_cmap_tbl[2][3][4];
+	u32 lcd_bright_curve_tbl[256];
 };
 
-struct disp_rect {
+struct sunxi_lcd_fb_disp_rect {
 	int x;
 	int y;
-	unsigned int width;
-	unsigned int height;
+	u32 width;
+	u32 height;
 };
 
-
-struct disp_lcd_panel_fun {
-	void (*cfg_panel_info)(struct panel_extend_para *info);
-	int (*cfg_open_flow)(unsigned int sel);
-	int (*cfg_close_flow)(unsigned int sel);
-	int (*lcd_user_defined_func)(unsigned int sel, unsigned int para1,
-				     unsigned int para2, unsigned int para3);
-	int (*set_bright)(unsigned int sel, unsigned int bright);
-	int (*blank)(unsigned int sel, unsigned int en);
-	int (*set_var)(unsigned int sel, struct fb_info *info);
-	int (*set_addr_win)(unsigned int sel, int x, int y, int width, int height);
+struct sunxi_lcd_fb_disp_lcd_panel_fun {
+	void (*cfg_panel_info)(struct sunxi_lcd_fb_panel_extend_para *info);
+	int (*cfg_open_flow)(u32 sel);
+	int (*cfg_close_flow)(u32 sel);
+	int (*lcd_user_defined_func)(u32 sel, u32 para1, u32 para2, u32 para3);
+	int (*set_bright)(u32 sel, u32 bright);
+	int (*blank)(u32 sel, u32 en);
+	int (*set_var)(u32 sel, struct fb_info *info);
+	int (*set_addr_win)(u32 sel, int x, int y, int width, int height);
 };
 
-
-struct disp_video_timings {
-	unsigned int vic;	/* video information code */
-	unsigned int tv_mode;
-	unsigned int pixel_clk;
-	unsigned int pixel_repeat; /* pixel repeat (pixel_repeat+1) times */
-	unsigned int x_res;
-	unsigned int y_res;
-	unsigned int hor_total_time;
-	unsigned int hor_back_porch;
-	unsigned int hor_front_porch;
-	unsigned int hor_sync_time;
-	unsigned int ver_total_time;
-	unsigned int ver_back_porch;
-	unsigned int ver_front_porch;
-	unsigned int ver_sync_time;
-	unsigned int hor_sync_polarity;	/* 0: negative, 1: positive */
-	unsigned int ver_sync_polarity;	/* 0: negative, 1: positive */
+struct sunxi_lcd_fb_disp_video_timings {
+	u32 vic; /* video information code */
+	u32 tv_mode;
+	u32 pixel_clk;
+	u32 pixel_repeat; /* pixel repeat (pixel_repeat+1) times */
+	u32 x_res;
+	u32 y_res;
+	u32 hor_total_time;
+	u32 hor_back_porch;
+	u32 hor_front_porch;
+	u32 hor_sync_time;
+	u32 ver_total_time;
+	u32 ver_back_porch;
+	u32 ver_front_porch;
+	u32 ver_sync_time;
+	u32 hor_sync_polarity; /* 0: negative, 1: positive */
+	u32 ver_sync_polarity; /* 0: negative, 1: positive */
 	bool b_interlace;
-	unsigned int vactive_space;
-	unsigned int trd_mode;
-	unsigned long      dclk_rate_set; /* unit: hz */
+	u32 vactive_space;
+	u32 trd_mode;
+	unsigned long dclk_rate_set; /* unit: hz */
 	unsigned long long frame_period; /* unit: ns */
-	int                start_delay; /* unit: line */
+	int start_delay; /* unit: line */
 };
 
-enum disp_fb_mode {
+enum sunxi_lcd_fb_disp_fb_mode {
 	FB_MODE_SCREEN0 = 0,
 	FB_MODE_SCREEN1 = 1,
 	FB_MODE_SCREEN2 = 2,
-	FB_MODE_DUAL_SAME_SCREEN_TB = 3,/* two screen, top buffer for screen0, bottom buffer for screen1 */
-	FB_MODE_DUAL_DIFF_SCREEN_SAME_CONTENTS = 4,/* two screen, they have same contents; */
+	FB_MODE_DUAL_SAME_SCREEN_TB =
+		3, /* two screen, top buffer for screen0, bottom buffer for screen1 */
+	FB_MODE_DUAL_DIFF_SCREEN_SAME_CONTENTS =
+		4, /* two screen, they have same contents; */
 };
 
-struct disp_fb_create_info {
-	enum disp_fb_mode fb_mode;
-	unsigned int buffer_num;
-	unsigned int width;
-	unsigned int height;
+struct sunxi_lcd_fb_disp_fb_create_info {
+	enum sunxi_lcd_fb_disp_fb_mode fb_mode;
+	u32 buffer_num;
+	u32 width;
+	u32 height;
 
-	unsigned int output_width;  /* used when scaler mode */
-	unsigned int output_height; /* used when scaler mode */
+	u32 output_width; /* used when scaler mode */
+	u32 output_height; /* used when scaler mode */
 };
 
-
-enum disp_lcd_if {
+enum sunxi_lcd_fb_disp_lcd_if {
 	LCD_FB_IF_SPI = 0,
 	LCD_FB_IF_DBI = 1,
+	LCD_FB_IF_QSPI = 2,
 };
 
-enum lcd_fb_dbi_if {
+enum sunxi_lcd_fb_dbi_if {
 	LCD_FB_L3I1 = 0x0,
 	LCD_FB_L3I2 = 0x1,
 	LCD_FB_L4I1 = 0x2,
@@ -218,8 +213,14 @@ enum lcd_fb_dbi_if {
 	LCD_FB_D2LI = 0x4,
 };
 
-enum lcdfb_pixel_format {
-	LCDFB_FORMAT_ARGB_8888 = 0x00,	/* MSB  A-R-G-B  LSB */
+enum sunxi_lcd_fb_qspi_if {
+	LCD_FB_QSPI_LANE1 = 0x0,
+	LCD_FB_QSPI_LANE2 = 0x1,
+	LCD_FB_QSPI_LANE4 = 0x2,
+};
+
+enum sunxi_lcd_fb_pixel_format {
+	LCDFB_FORMAT_ARGB_8888 = 0x00, /* MSB  A-R-G-B  LSB */
 	LCDFB_FORMAT_ABGR_8888 = 0x01,
 	LCDFB_FORMAT_RGBA_8888 = 0x02,
 	LCDFB_FORMAT_BGRA_8888 = 0x03,
@@ -241,7 +242,7 @@ enum lcdfb_pixel_format {
 	LCDFB_FORMAT_BGRA_5551 = 0x13,
 };
 
-enum lcdfb_dbi_fmt {
+enum sunxi_lcd_fb_dbi_fmt {
 	LCDFB_DBI_RGB111 = 0x0,
 	LCDFB_DBI_RGB444 = 0x1,
 	LCDFB_DBI_RGB565 = 0x2,
@@ -249,130 +250,143 @@ enum lcdfb_dbi_fmt {
 	LCDFB_DBI_RGB888 = 0x4,
 };
 
-struct disp_panel_para {
-	enum disp_lcd_if lcd_if;
-	enum lcd_fb_dbi_if dbi_if;
-	unsigned int lcd_spi_bus_num;
-
-	unsigned int lcd_data_speed;
-	unsigned int lcd_x;	/* horizontal resolution */
-	unsigned int lcd_y;	/* vertical resolution */
-	unsigned int lcd_width;	/* width of lcd in mm */
-	unsigned int lcd_height;	/* height of lcd in mm */
-
-	unsigned int lcd_pwm_used;
-	unsigned int lcd_pwm_ch;
-	unsigned int lcd_pwm_freq;
-	unsigned int lcd_pwm_pol;
-	enum lcdfb_pixel_format lcd_pixel_fmt;
-	enum lcdfb_dbi_fmt lcd_dbi_fmt;
-	unsigned int lcd_dbi_clk_mode;
-	unsigned int lcd_dbi_te;
-	unsigned int fb_buffer_num;
+struct sunxi_lcd_fb_disp_panel_para {
+	enum sunxi_lcd_fb_disp_lcd_if lcd_if;
+	enum sunxi_lcd_fb_dbi_if dbi_if;
+	enum sunxi_lcd_fb_qspi_if qspi_if;
+
+	u32 lcd_data_speed;
+	u32 lcd_x; /* horizontal resolution */
+	u32 lcd_y; /* vertical resolution */
+	u32 lcd_width; /* width of lcd in mm */
+	u32 lcd_height; /* height of lcd in mm */
+
+	u32 lcd_pwm_used;
+	u32 lcd_pwm_ch;
+	u32 lcd_pwm_freq;
+	u32 lcd_pwm_pol;
+	enum sunxi_lcd_fb_pixel_format lcd_pixel_fmt;
+	enum sunxi_lcd_fb_dbi_fmt lcd_dbi_fmt;
+	u32 lcd_dbi_clk_mode;
+	u32 lcd_dbi_te;
+	u32 fb_buffer_num;
 
 	enum sunxi_dbi_src_seq lcd_rgb_order;
-	unsigned int lcd_fps;
+	u32 lcd_fps;
 
-	unsigned int lcd_frm;
-	unsigned int lcd_gamma_en;
-	unsigned int lcd_bright_curve_en;
-	unsigned int lines_per_transfer;
+	u32 lcd_frm;
+	u32 lcd_gamma_en;
+	u32 lcd_bright_curve_en;
+	u32 lines_per_transfer;
 
-	char lcd_size[8];	/* e.g. 7.9, 9.7 */
-	char lcd_model_name[32];
+	u8 bpp;
 
+	char lcd_size[8]; /* e.g. 7.9, 9.7 */
+	char lcd_model_name[32];
 };
 
-
-
-struct lcd_fb_device {
+struct sunxi_lcd_fb_device {
 	struct list_head list;
 	struct device *dev;
+	struct device_node *panel_node;
 	char name[32];
 	u32 disp;
 
 	void *priv_data;
 	struct spi_device *spi_device;
 
-	struct disp_video_timings timings;
-	s32 (*init)(struct lcd_fb_device *p_lcd);
-	s32 (*exit)(struct lcd_fb_device *p_lcd);
-	s32 (*enable)(struct lcd_fb_device *p_lcd);
-	s32 (*fake_enable)(struct lcd_fb_device *p_lcd);
-	s32 (*disable)(struct lcd_fb_device *p_lcd);
-	s32 (*is_enabled)(struct lcd_fb_device *p_lcd);
-	s32 (*get_resolution)(struct lcd_fb_device *p_lcd, u32 *xres,
+	struct sunxi_lcd_fb_disp_video_timings timings;
+	s32 (*init)(struct sunxi_lcd_fb_device *p_lcd);
+	s32 (*exit)(struct sunxi_lcd_fb_device *p_lcd);
+	s32 (*enable)(struct sunxi_lcd_fb_device *p_lcd);
+	s32 (*fake_enable)(struct sunxi_lcd_fb_device *p_lcd);
+	s32 (*disable)(struct sunxi_lcd_fb_device *p_lcd);
+	s32 (*is_enabled)(struct sunxi_lcd_fb_device *p_lcd);
+	s32 (*get_resolution)(struct sunxi_lcd_fb_device *p_lcd, u32 *xres,
 			      u32 *yres);
-	s32 (*get_dimensions)(struct lcd_fb_device *dispdev, u32 *width,
+	s32 (*get_dimensions)(struct sunxi_lcd_fb_device *dispdev, u32 *width,
 			      u32 *height);
-	s32 (*set_color_temperature)(struct lcd_fb_device *dispdev, s32 color_temperature);
-	s32 (*get_color_temperature)(struct lcd_fb_device *dispdev);
-	s32 (*suspend)(struct lcd_fb_device *p_lcd);
-	s32 (*resume)(struct lcd_fb_device *p_lcd);
-	s32 (*set_bright)(struct lcd_fb_device *p_lcd, u32 bright);
-	s32 (*get_bright)(struct lcd_fb_device *p_lcd);
-	s32 (*backlight_enable)(struct lcd_fb_device *p_lcd);
-	s32 (*backlight_disable)(struct lcd_fb_device *p_lcd);
-	s32 (*pwm_enable)(struct lcd_fb_device *p_lcd);
-	s32 (*pwm_disable)(struct lcd_fb_device *p_lcd);
-	s32 (*power_enable)(struct lcd_fb_device *p_lcd, u32 power_id);
-	s32 (*power_disable)(struct lcd_fb_device *p_lcd, u32 power_id);
-	s32 (*pin_cfg)(struct lcd_fb_device *p_lcd, u32 bon);
-	s32 (*set_gamma_tbl)(struct lcd_fb_device *p_lcd, u32 *tbl,
-			      u32 size);
-	s32 (*set_bright_dimming)(struct lcd_fb_device *dispdev, u32 dimming);
-	s32 (*enable_gamma)(struct lcd_fb_device *p_lcd);
-	s32 (*disable_gamma)(struct lcd_fb_device *p_lcd);
-	s32 (*set_panel_func)(struct lcd_fb_device *lcd, char *name,
-			      struct disp_lcd_panel_fun *lcd_cfg);
-	s32 (*set_open_func)(struct lcd_fb_device *lcd, LCD_FUNC func,
+	s32 (*set_color_temperature)(struct sunxi_lcd_fb_device *dispdev,
+				     s32 color_temperature);
+	s32 (*get_color_temperature)(struct sunxi_lcd_fb_device *dispdev);
+	s32 (*suspend)(struct sunxi_lcd_fb_device *p_lcd);
+	s32 (*resume)(struct sunxi_lcd_fb_device *p_lcd);
+	s32 (*set_bright)(struct sunxi_lcd_fb_device *p_lcd, u32 bright);
+	s32 (*get_bright)(struct sunxi_lcd_fb_device *p_lcd);
+	s32 (*backlight_enable)(struct sunxi_lcd_fb_device *p_lcd);
+	s32 (*backlight_disable)(struct sunxi_lcd_fb_device *p_lcd);
+	s32 (*pwm_enable)(struct sunxi_lcd_fb_device *p_lcd);
+	s32 (*pwm_disable)(struct sunxi_lcd_fb_device *p_lcd);
+	s32 (*power_enable)(struct sunxi_lcd_fb_device *p_lcd, u32 power_id);
+	s32 (*power_disable)(struct sunxi_lcd_fb_device *p_lcd, u32 power_id);
+	s32 (*pin_cfg)(struct sunxi_lcd_fb_device *p_lcd, u32 bon);
+	s32 (*set_gamma_tbl)(struct sunxi_lcd_fb_device *p_lcd, u32 *tbl,
+			     u32 size);
+	s32 (*set_bright_dimming)(struct sunxi_lcd_fb_device *dispdev,
+				  u32 dimming);
+	s32 (*enable_gamma)(struct sunxi_lcd_fb_device *p_lcd);
+	s32 (*disable_gamma)(struct sunxi_lcd_fb_device *p_lcd);
+	s32 (*set_panel_func)(struct sunxi_lcd_fb_device *lcd, char *name,
+			      struct sunxi_lcd_fb_disp_lcd_panel_fun *lcd_cfg);
+	s32 (*set_open_func)(struct sunxi_lcd_fb_device *lcd, LCD_FUNC func,
 			     u32 delay);
-	s32 (*set_close_func)(struct lcd_fb_device *lcd, LCD_FUNC func,
+	s32 (*set_close_func)(struct sunxi_lcd_fb_device *lcd, LCD_FUNC func,
 			      u32 delay);
-	int (*gpio_set_value)(struct lcd_fb_device *p_lcd,
-			      unsigned int io_index, u32 value);
-	int (*gpio_set_direction)(struct lcd_fb_device *p_lcd,
-				  unsigned int io_index, u32 direction);
-	int (*get_panel_info)(struct lcd_fb_device *p_lcd,
-			       struct disp_panel_para *info);
-	int (*set_layer)(struct lcd_fb_device *p_lcd, struct fb_info *p_info);
-	int (*set_var)(struct lcd_fb_device *p_lcd, struct fb_info *p_info);
-	int (*blank)(struct lcd_fb_device *p_lcd, unsigned int en);
-	int (*cmd_write)(struct lcd_fb_device *p_lcd, unsigned char cmd);
-	int (*para_write)(struct lcd_fb_device *p_lcd, unsigned char para);
-	int (*cmd_read)(struct lcd_fb_device *p_lcd, unsigned char cmd,
-			unsigned char *rx_buf, unsigned char len);
-	int (*wait_for_vsync)(struct lcd_fb_device *p_lcd);
+	int (*gpio_set_value)(struct sunxi_lcd_fb_device *p_lcd, u32 io_index,
+			      u32 value);
+	int (*gpio_set_direction)(struct sunxi_lcd_fb_device *p_lcd,
+				  u32 io_index, u32 direction);
+	int (*get_panel_info)(struct sunxi_lcd_fb_device *p_lcd,
+			      struct sunxi_lcd_fb_disp_panel_para *info);
+	int (*set_layer)(struct sunxi_lcd_fb_device *p_lcd,
+			 struct fb_info *p_info);
+	int (*set_var)(struct sunxi_lcd_fb_device *p_lcd,
+		       struct fb_info *p_info);
+	int (*blank)(struct sunxi_lcd_fb_device *p_lcd, u32 en);
+	int (*cmd_write)(struct sunxi_lcd_fb_device *p_lcd, u8 cmd);
+	int (*para_write)(struct sunxi_lcd_fb_device *p_lcd, u8 para);
+	int (*cmd_read)(struct sunxi_lcd_fb_device *p_lcd, u8 cmd, u8 *rx_buf,
+			u8 len);
+	int (*qspi_cmd_write)(struct sunxi_lcd_fb_device *p_lcd, u8 cmd);
+	int (*qspi_para_write)(struct sunxi_lcd_fb_device *p_lcd, u8 cmd,
+			       u8 para);
+	int (*qspi_multi_para_write)(struct sunxi_lcd_fb_device *p_lcd, u8 cmd,
+				     u8 *tx_buf, u32 len);
+	int (*qspi_cmd_read)(struct sunxi_lcd_fb_device *p_lcd, u8 cmd,
+			     u8 *rx_buf, u8 len);
+	int (*wait_for_vsync)(struct sunxi_lcd_fb_device *p_lcd);
 };
 
-struct sunxi_disp_source_ops {
-	int (*sunxi_lcd_delay_ms)(unsigned int ms);
-	int (*sunxi_lcd_delay_us)(unsigned int us);
-	int (*sunxi_lcd_backlight_enable)(unsigned int screen_id);
-	int (*sunxi_lcd_backlight_disable)(unsigned int screen_id);
-	int (*sunxi_lcd_pwm_enable)(unsigned int screen_id);
-	int (*sunxi_lcd_pwm_disable)(unsigned int screen_id);
-	int (*sunxi_lcd_power_enable)(unsigned int screen_id,
-				       unsigned int pwr_id);
-	int (*sunxi_lcd_power_disable)(unsigned int screen_id,
-					unsigned int pwr_id);
-	int (*sunxi_lcd_set_panel_funs)(char *drv_name,
-					 struct disp_lcd_panel_fun *lcd_cfg);
-	int (*sunxi_lcd_pin_cfg)(unsigned int screen_id, unsigned int bon);
-	int (*sunxi_lcd_gpio_set_value)(unsigned int screen_id,
-					 unsigned int io_index, u32 value);
-	int (*sunxi_lcd_gpio_set_direction)(unsigned int screen_id,
-					     unsigned int io_index,
-					     u32 direction);
-	int (*sunxi_lcd_cmd_write)(unsigned int screen_id,
-					 unsigned char cmd);
-	int (*sunxi_lcd_para_write)(unsigned int screen_id,
-					 unsigned char para);
-	int (*sunxi_lcd_cmd_read)(unsigned int screen_id,
-					 unsigned char cmd, unsigned char *rx_buf, unsigned char len);
+struct sunxi_lcd_fb_disp_source_ops {
+	int (*sunxi_lcd_fb_delay_ms_ops)(u32 ms);
+	int (*sunxi_lcd_fb_delay_us_ops)(u32 us);
+	int (*sunxi_lcd_fb_backlight_enable_ops)(u32 screen_id);
+	int (*sunxi_lcd_fb_backlight_disable_ops)(u32 screen_id);
+	int (*sunxi_lcd_fb_pwm_enable_ops)(u32 screen_id);
+	int (*sunxi_lcd_fb_pwm_disable_ops)(u32 screen_id);
+	int (*sunxi_lcd_fb_power_enable_ops)(u32 screen_id, u32 pwr_id);
+	int (*sunxi_lcd_fb_power_disable_ops)(u32 screen_id, u32 pwr_id);
+	int (*sunxi_lcd_fb_set_panel_funs_ops)(
+		char *drv_name,
+		struct sunxi_lcd_fb_disp_lcd_panel_fun *lcd_cfg);
+	int (*sunxi_lcd_fb_pin_cfg_ops)(u32 screen_id, u32 bon);
+	int (*sunxi_lcd_fb_gpio_set_value_ops)(u32 screen_id, u32 io_index,
+					       u32 value);
+	int (*sunxi_lcd_fb_gpio_set_direction_ops)(u32 screen_id, u32 io_index,
+						   u32 direction);
+	int (*sunxi_lcd_fb_cmd_write_ops)(u32 screen_id, u8 cmd);
+	int (*sunxi_lcd_fb_para_write_ops)(u32 screen_id, u8 para);
+	int (*sunxi_lcd_fb_cmd_read_ops)(u32 screen_id, u8 cmd, u8 *rx_buf,
+					 u8 len);
+	int (*sunxi_lcd_fb_qspi_cmd_write_ops)(u32 screen_id, u8 cmd);
+	int (*sunxi_lcd_fb_qspi_para_write_ops)(u32 screen_id, u8 cmd, u8 para);
+	int (*sunxi_lcd_fb_qspi_multi_para_write_ops)(u32 screen_id, u8 cmd,
+						      u8 *tx_buf, u32 len);
+	int (*sunxi_lcd_fb_qspi_cmd_read_ops)(u32 screen_id, u8 cmd, u8 *rx_buf,
+					      u8 len);
 };
 
-enum disp_return_value {
+enum sunxi_lcd_fb_disp_return_value {
 	DIS_SUCCESS = 0,
 	DIS_FAIL = -1,
 	DIS_PARA_FAILED = -2,
@@ -387,5 +401,4 @@ enum disp_return_value {
 	DIS_PRIO_COLLSION = -11
 };
 
-
 #endif /* End of file */
diff --git a/drivers/video/sunxi/lcd_fb/lcd_fb_feature.h b/drivers/video/sunxi/lcd_fb/lcd_fb_feature.h
index 1bcbac9ad..ca7de34ca 100644
--- a/drivers/video/sunxi/lcd_fb/lcd_fb_feature.h
+++ b/drivers/video/sunxi/lcd_fb/lcd_fb_feature.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Copyright (c) 2007-2020 Allwinnertech Co., Ltd.
@@ -22,8 +22,9 @@
 extern "C" {
 #endif
 
-#if IS_ENABLED(CONFIG_ARCH_SUN50IW11) || IS_ENABLED(CONFIG_ARCH_SUN8IW20) || IS_ENABLED(CONFIG_ARCH_SUN55IW3) || IS_ENABLED(CONFIG_ARCH_SUN8IW21) \
-	|| IS_ENABLED(CONFIG_ARCH_SUN300IW1)
+#if IS_ENABLED(CONFIG_ARCH_SUN50IW11) || IS_ENABLED(CONFIG_ARCH_SUN8IW20) || \
+	IS_ENABLED(CONFIG_ARCH_SUN55IW3) ||                                  \
+	IS_ENABLED(CONFIG_ARCH_SUN8IW21) || IS_ENABLED(CONFIG_ARCH_SUN300IW1)
 #define SUPPORT_DBI_IF
 #endif
 
diff --git a/drivers/video/sunxi/lcd_fb/lcd_fb_intf.c b/drivers/video/sunxi/lcd_fb/lcd_fb_intf.c
index e9aa6705e..e4d42380e 100644
--- a/drivers/video/sunxi/lcd_fb/lcd_fb_intf.c
+++ b/drivers/video/sunxi/lcd_fb/lcd_fb_intf.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Allwinner SoCs display driver.
@@ -13,175 +13,109 @@
 #include "lcd_fb_intf.h"
 #include "dev_lcd_fb.h"
 
-void *lcd_fb_malloc(u32 size)
+void *sunxi_lcd_fb_malloc(u32 size)
 {
 	return kmalloc(size, GFP_KERNEL | __GFP_ZERO);
 }
 
-/**
- *				lcd_fb_register_irq
- *
- * Description:
- * irq register
- *
- * Parameters:
- *	irqno		input.		irq no
- *	flags		input.
- *	Handler		input.		isr handler
- *	pArg		input.		para
- *	DataSize	input.		len of para
- *	prio		input.		priority
- *
- * Return value:
- *
- *
- * note:
- *	typedef s32 (*ISRCallback)( void *pArg)
- *
- */
-int lcd_fb_register_irq(u32 IrqNo, u32 Flags, void *Handler, void *pArg,
-			  u32 DataSize, u32 Prio)
+int sunxi_lcd_fb_register_irq(u32 irq_num, u32 flags, void *handler,
+			      void *p_arg, u32 data_size, u32 prio)
 {
-	lcd_fb_inf("%s, irqNo=%d, Handler=0x%p, pArg=0x%p\n", __func__, IrqNo,
-	      Handler, pArg);
-	return request_irq(IrqNo, (irq_handler_t) Handler, 0x0,
-			   "dispaly", pArg);
+	LCDFB_INF("%s, irqNo=%d, handler=0x%p, p_arg=0x%p\n", __func__, irq_num,
+		  handler, p_arg);
+	return request_irq(irq_num, (irq_handler_t)handler, 0x0, "dispaly",
+			   p_arg);
 }
 
-/**
- *				lcd_fb_unregister_irq
- *
- * Description:
- *	irq unregister
- *
- * Parameters:
- *	irqno		input.		irq no
- *	handler		input.		isr handler
- *	Argment		input.		para
- *
- * Return value:
- *	void
- *
- * note:
- *	void
- *
- */
-void lcd_fb_unregister_irq(u32 IrqNo, void *Handler, void *pArg)
+void sunxi_lcd_fb_unregister_irq(u32 irq_num, void *handler, void *p_arg)
 {
-	free_irq(IrqNo, pArg);
+	free_irq(irq_num, p_arg);
 }
 
-/**
- *			lcd_fb_enable_irq
- *
- * Description:
- *	enable irq
- *
- * Parameters:
- *	irqno input.  irq no
- *
- * Return value:
- *	void
- *
- * note:
- *	void
- *
- */
-void lcd_fb_enable_irq(u32 IrqNo)
+void sunxi_lcd_fb_enable_irq(u32 irq_num)
 {
-	/* enable_irq(IrqNo); */
 }
 
-/**
- *			lcd_fb_disable_irq
- *
- * Description:
- *	disable irq
- *
- * Parameters:
- *	irqno		input.		irq no
- *
- * Return value:
- *	void
- *
- * note:
- *	void
- *
- */
-void lcd_fb_disable_irq(u32 IrqNo)
+void sunxi_lcd_fb_disable_irq(u32 irq_num)
 {
-	/* disable_irq(IrqNo); */
 }
 
 /* type: 0:invalid, 1: int; 2:str, 3: gpio */
-int lcd_fb_script_get_item(char *main_name, char *sub_name, int value[],
-			     int type)
+int sunxi_lcd_fb_script_get_item(struct device_node *node, char *sub_name,
+				 int value[], int type)
 {
-	char compat[32];
-	u32 len = 0;
-	struct device_node *node;
 	int ret = 0;
+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(6, 2, 0))
 	enum of_gpio_flags flags;
+#else
+	u32 flags = 0;
+#endif
 
-	len = sprintf(compat, "allwinner,sunxi-%s", main_name);
-	if (len > 32)
-		lcd_fb_wrn("size of mian_name is out of range\n");
-
-	node = of_find_compatible_node(NULL, NULL, compat);
 	if (!node) {
-		lcd_fb_wrn("of_find_compatible_node %s fail\n", compat);
-		return ret;
+		LCDFB_WRN("node is null\n");
+		return -EINVAL;
 	}
 
 	if (type == 1) {
 		if (of_property_read_u32_array(node, sub_name, value, 1))
-			lcd_fb_inf("of_property_read_u32_array %s.%s fail\n",
-			      main_name, sub_name);
+			LCDFB_INF("of_property_read_u32_array %s fail\n",
+				  sub_name);
 		else
 			ret = type;
 	} else if (type == 2) {
 		const char *str;
 
 		if (of_property_read_string(node, sub_name, &str))
-			lcd_fb_inf("of_property_read_string %s.%s fail\n", main_name,
-			      sub_name);
+			LCDFB_INF("of_property_read_string %s fail\n",
+				  sub_name);
 		else {
 			ret = type;
 			memcpy((void *)value, str, strlen(str) + 1);
 		}
 	} else if (type == 3) {
 		int gpio;
-		struct disp_gpio_info *gpio_info = (struct disp_gpio_info *)value;
+		struct disp_gpio_info *gpio_info =
+			(struct disp_gpio_info *)value;
 
 		/* gpio is invalid by default */
 		gpio_info->gpio = -1;
 		gpio_info->name[0] = '\0';
-
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(6, 2, 0))
+		gpio = of_get_named_gpio(node, sub_name, 0);
+#else
 		gpio = of_get_named_gpio_flags(node, sub_name, 0, &flags);
+#endif
+
 		if (!gpio_is_valid(gpio))
 			return -EINVAL;
 
 		gpio_info->gpio = gpio;
 		memcpy(gpio_info->name, sub_name, strlen(sub_name) + 1);
+
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(6, 2, 0))
+		of_property_read_u32_index(node, sub_name, 3, &flags);
+		gpio_info->value = (flags == GPIO_ACTIVE_LOW) ? 0 : 1;
+#else
 		gpio_info->value = (flags == OF_GPIO_ACTIVE_LOW) ? 0 : 1;
-		lcd_fb_inf("%s.%s gpio=%d, value:%d\n", main_name, sub_name,
-		      gpio_info->gpio, gpio_info->value);
+#endif
+		LCDFB_INF("%s gpio=%d, value:%d\n", sub_name, gpio_info->gpio,
+			  gpio_info->value);
 	}
 
 	return ret;
 }
 
-int lcd_fb_get_ic_ver(void)
+int sunxi_lcd_fb_get_ic_ver(void)
 {
 	return 0;
 }
 
-int lcd_fb_gpio_request(struct disp_gpio_info *gpio_info)
+int sunxi_lcd_fb_gpio_request(struct disp_gpio_info *gpio_info)
 {
 	int ret = 0;
 
 	if (!gpio_info) {
-		lcd_fb_wrn("%s: gpio_info is null\n", __func__);
+		LCDFB_WRN("%s: gpio_info is null\n", __func__);
 		return -1;
 	}
 
@@ -190,62 +124,36 @@ int lcd_fb_gpio_request(struct disp_gpio_info *gpio_info)
 		return 0;
 
 	if (!gpio_is_valid(gpio_info->gpio)) {
-		lcd_fb_wrn("%s: gpio (%d) is invalid\n", __func__, gpio_info->gpio);
+		LCDFB_WRN("%s: gpio (%d) is invalid\n", __func__,
+			  gpio_info->gpio);
 		return -1;
 	}
 	ret = gpio_direction_output(gpio_info->gpio, gpio_info->value);
 	if (ret) {
-		lcd_fb_wrn("%s failed, gpio_name=%s, gpio=%d, value=%d, ret=%d\n", __func__,
-		      gpio_info->name, gpio_info->gpio, gpio_info->value, ret);
+		LCDFB_WRN(
+			"%s failed, gpio_name=%s, gpio=%d, value=%d, ret=%d\n",
+			__func__, gpio_info->name, gpio_info->gpio,
+			gpio_info->value, ret);
 		return -1;
 	}
-	lcd_fb_inf("%s, gpio_name=%s, gpio=%d, value=%d, ret=%d\n", __func__,
-		gpio_info->name, gpio_info->gpio, gpio_info->value, ret);
+	LCDFB_INF("%s, gpio_name=%s, gpio=%d, value=%d, ret=%d\n", __func__,
+		  gpio_info->name, gpio_info->gpio, gpio_info->value, ret);
 
 	return ret;
 }
 
-int lcd_fb_gpio_request_simple(struct disp_gpio_info *gpio_list,
-				 u32 group_count_max)
-{
-/*
-	int ret = 0;
-	struct gpio_config pin_cfg;
-
-	if (gpio_list == NULL)
-		return 0;
-
-	pin_cfg.gpio = gpio_list->gpio;
-	pin_cfg.mul_sel = gpio_list->mul_sel;
-	pin_cfg.pull = gpio_list->pull;
-	pin_cfg.drv_level = gpio_list->drv_level;
-	pin_cfg.data = gpio_list->data;
-	ret = gpio_request(pin_cfg.gpio, NULL);
-	if (ret != 0) {
-		lcd_fb_wrn("%s failed, gpio_name=%s, gpio=%d, ret=%d\n", __func__,
-		      gpio_list->gpio_name, gpio_list->gpio, ret);
-		return ret;
-	}
-
-	lcd_fb_inf("%s, gpio_name=%s, gpio=%d, ret=%d\n", __func__,
-	      gpio_list->gpio_name, gpio_list->gpio, ret);
-	ret = pin_cfg.gpio;
-
-	return ret;
-*/
-	return 0;
-}
-int lcd_fb_gpio_release(struct disp_gpio_info *gpio_info)
+int sunxi_lcd_fb_gpio_release(struct disp_gpio_info *gpio_info)
 {
 	if (!gpio_info) {
-		lcd_fb_wrn("%s: gpio_info is null\n", __func__);
+		LCDFB_WRN("%s: gpio_info is null\n", __func__);
 		return -1;
 	}
 	if (!strlen(gpio_info->name))
 		return -1;
 
 	if (!gpio_is_valid(gpio_info->gpio)) {
-		lcd_fb_wrn("%s: gpio(%d) is invalid\n", __func__, gpio_info->gpio);
+		LCDFB_WRN("%s: gpio(%d) is invalid\n", __func__,
+			  gpio_info->gpio);
 		return -1;
 	}
 
@@ -254,95 +162,92 @@ int lcd_fb_gpio_release(struct disp_gpio_info *gpio_info)
 }
 
 /* direction: 0:input, 1:output */
-int lcd_fb_gpio_set_direction(u32 p_handler, u32 direction,
-				const char *gpio_name)
+int sunxi_lcd_fb_gpio_set_direction(u32 p_handler, u32 direction,
+				    const char *gpio_name)
 {
 	int ret = -1;
 
 	if (p_handler) {
 		if (direction) {
 			s32 value;
-
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0))
+			value = gpio_get_value(p_handler);
+#else
 			value = __gpio_get_value(p_handler);
+#endif
 			ret = gpio_direction_output(p_handler, value);
 			if (ret != 0)
-				lcd_fb_wrn("gpio_direction_output fail!\n");
+				LCDFB_WRN("gpio_direction_output fail!\n");
 		} else {
 			ret = gpio_direction_input(p_handler);
 			if (ret != 0)
-				lcd_fb_wrn("gpio_direction_input fail!\n");
+				LCDFB_WRN("gpio_direction_input fail!\n");
 		}
 	} else {
-		lcd_fb_wrn("OSAL_GPIO_DevSetONEPIN_IO_STATUS, hdl is NULL\n");
+		LCDFB_WRN("OSAL_GPIO_DevSetONEPIN_IO_STATUS, hdl is NULL\n");
 		ret = -1;
 	}
 	return ret;
 }
 
-int lcd_fb_gpio_get_value(u32 p_handler, const char *gpio_name)
+int sunxi_lcd_fb_gpio_get_value(u32 p_handler, const char *gpio_name)
 {
-	if (p_handler)
+	if (p_handler) {
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0))
+		return gpio_get_value(p_handler);
+#else
 		return __gpio_get_value(p_handler);
-	lcd_fb_wrn("OSAL_GPIO_DevREAD_ONEPIN_DATA, hdl is NULL\n");
+#endif
+	}
+
+	LCDFB_WRN("OSAL_GPIO_DevREAD_ONEPIN_DATA, hdl is NULL\n");
 
 	return -1;
 }
 
-int lcd_fb_gpio_set_value(u32 p_handler, u32 value_to_gpio,
-			    const char *gpio_name)
+int sunxi_lcd_fb_gpio_set_value(u32 p_handler, u32 value_to_gpio,
+				const char *gpio_name)
 {
-	if (p_handler)
+	if (p_handler) {
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0))
+		gpio_set_value(p_handler, value_to_gpio);
+#else
 		__gpio_set_value(p_handler, value_to_gpio);
-	else
-		lcd_fb_wrn("OSAL_GPIO_DevWRITE_ONEPIN_DATA, hdl is NULL\n");
+#endif
+	} else {
+		LCDFB_WRN("OSAL_GPIO_DevWRITE_ONEPIN_DATA, hdl is NULL\n");
+	}
 
 	return 0;
 }
 
-int lcd_fb_pin_set_state(char *dev_name, char *name)
+int sunxi_lcd_fb_pin_set_state(struct sunxi_lcd_fb_device *lcd, char *name)
 {
-	char compat[32];
-	u32 len = 0;
-	struct device_node *node;
-	struct platform_device *pdev;
 	struct pinctrl *pctl;
 	struct pinctrl_state *state;
 	int ret = -1;
 
-	len = sprintf(compat, "allwinner,sunxi-%s", dev_name);
-	if (len > 32)
-		lcd_fb_wrn("size of mian_name is out of range\n");
-
-	node = of_find_compatible_node(NULL, NULL, compat);
-	if (!node) {
-		lcd_fb_wrn("of_find_compatible_node %s fail\n", compat);
-		goto exit;
-	}
-
-	pdev = of_find_device_by_node(node);
-	if (!node) {
-		lcd_fb_wrn("of_find_device_by_node for %s fail\n", compat);
-		goto exit;
-	}
+	if (lcd == NULL)
+		return -1;
 
-	pctl = pinctrl_get(&pdev->dev);
+	pctl = pinctrl_get(lcd->dev);
 	if (IS_ERR(pctl)) {
 		/* not every lcd need pin config */
-		lcd_fb_inf("pinctrl_get for %s fail\n", compat);
+		LCDFB_INF("pinctrl_get fail\n");
 		ret = PTR_ERR(pctl);
 		goto exit;
 	}
 
 	state = pinctrl_lookup_state(pctl, name);
 	if (IS_ERR(state)) {
-		lcd_fb_wrn("pinctrl_lookup_state for %s fail\n", compat);
+		LCDFB_WRN("pinctrl_lookup_state fail\n");
 		ret = PTR_ERR(state);
 		goto exit;
 	}
 
 	ret = pinctrl_select_state(pctl, state);
 	if (ret < 0) {
-		lcd_fb_wrn("pinctrl_select_state(%s) for %s fail\n", name, compat);
+		LCDFB_WRN("pinctrl_select_state(%s) fail\n", name);
 		goto exit;
 	}
 	ret = 0;
@@ -350,29 +255,31 @@ exit:
 	return ret;
 }
 
-int lcd_fb_power_enable(char *name)
+int sunxi_lcd_fb_power_enable(char *name)
 {
 	int ret = 0;
 #if IS_ENABLED(CONFIG_AW_AXP) || IS_ENABLED(CONFIG_REGULATOR)
 	struct regulator *regu = NULL;
 
-#ifdef CONFIG_SUNXI_REGULATOR_DT
+#if IS_ENABLED(CONFIG_SUNXI_REGULATOR_DT)
 	regu = regulator_get(g_drv_info.device, name);
 #else
 	regu = regulator_get(NULL, name);
 #endif
 	if (IS_ERR(regu)) {
-		lcd_fb_wrn("some error happen, fail to get regulator %s\n", name);
+		LCDFB_WRN("some error happen, fail to get regulator %s\n",
+			  name);
 		goto exit;
 	}
 
 	/* enalbe regulator */
 	ret = regulator_enable(regu);
 	if (ret != 0) {
-		lcd_fb_wrn("some error happen, fail to enable regulator %s!\n", name);
+		LCDFB_WRN("some error happen, fail to enable regulator %s!\n",
+			  name);
 		goto exit1;
 	} else {
-		lcd_fb_inf("suceess to enable regulator %s!\n", name);
+		LCDFB_INF("suceess to enable regulator %s!\n", name);
 	}
 
 exit1:
@@ -383,28 +290,30 @@ exit:
 	return ret;
 }
 
-int lcd_fb_power_disable(char *name)
+int sunxi_lcd_fb_power_disable(char *name)
 {
 	int ret = 0;
 #if IS_ENABLED(CONFIG_AW_AXP) || IS_ENABLED(CONFIG_REGULATOR)
 	struct regulator *regu = NULL;
 
-#ifdef CONFIG_SUNXI_REGULATOR_DT
+#if IS_ENABLED(CONFIG_SUNXI_REGULATOR_DT)
 	regu = regulator_get(g_drv_info.device, name);
 #else
 	regu = regulator_get(NULL, name);
 #endif
 	if (IS_ERR(regu)) {
-		lcd_fb_wrn("some error happen, fail to get regulator %s\n", name);
+		LCDFB_WRN("some error happen, fail to get regulator %s\n",
+			  name);
 		goto exit;
 	}
 	/* disalbe regulator */
 	ret = regulator_disable(regu);
 	if (ret != 0) {
-		lcd_fb_wrn("some error happen, fail to disable regulator %s!\n", name);
+		LCDFB_WRN("some error happen, fail to disable regulator %s!\n",
+			  name);
 		goto exit1;
 	} else {
-		lcd_fb_inf("suceess to disable regulator %s!\n", name);
+		LCDFB_INF("suceess to disable regulator %s!\n", name);
 	}
 
 exit1:
@@ -415,7 +324,7 @@ exit:
 	return ret;
 }
 
-s32 disp_delay_ms(u32 ms)
+s32 sunxi_lcd_fb_disp_delay_ms(u32 ms)
 {
 	u32 timeout = msecs_to_jiffies(ms);
 
@@ -424,16 +333,16 @@ s32 disp_delay_ms(u32 ms)
 	return 0;
 }
 
-s32 disp_delay_us(u32 us)
+s32 sunxi_lcd_fb_disp_delay_us(u32 us)
 {
 	udelay(us);
 
 	return 0;
 }
 
-#if IS_ENABLED(CONFIG_PWM_SUNXI) || IS_ENABLED(CONFIG_PWM_SUNXI_NEW) ||              \
+#if IS_ENABLED(CONFIG_PWM_SUNXI) || IS_ENABLED(CONFIG_PWM_SUNXI_NEW) ||        \
 	IS_ENABLED(CONFIG_PWM_SUNXI_GROUP) || IS_ENABLED(CONFIG_AW_PWM)
-uintptr_t lcd_fb_pwm_request(u32 pwm_id)
+uintptr_t sunxi_lcd_fb_pwm_request(u32 pwm_id)
 {
 	uintptr_t ret = 0;
 
@@ -442,84 +351,84 @@ uintptr_t lcd_fb_pwm_request(u32 pwm_id)
 	pwm_dev = pwm_request(pwm_id, "lcd");
 
 	if ((pwm_dev == NULL) || IS_ERR(pwm_dev))
-		lcd_fb_wrn("lcd_fb_pwm_request pwm %d fail!\n", pwm_id);
+		LCDFB_WRN("sunxi_lcd_fb_pwm_request pwm %d fail!\n", pwm_id);
 	else
-		lcd_fb_inf("lcd_fb_pwm_request pwm %d success!\n", pwm_id);
-	ret = (uintptr_t) pwm_dev;
+		LCDFB_INF("sunxi_lcd_fb_pwm_request pwm %d success!\n", pwm_id);
+	ret = (uintptr_t)pwm_dev;
 
 	return ret;
 }
 
-int lcd_fb_pwm_free(uintptr_t p_handler)
+int sunxi_lcd_fb_pwm_free(uintptr_t p_handler)
 {
 	int ret = 0;
 	struct pwm_device *pwm_dev;
 
 	pwm_dev = (struct pwm_device *)p_handler;
 	if ((pwm_dev == NULL) || IS_ERR(pwm_dev)) {
-		lcd_fb_wrn("lcd_fb_pwm_free, handle is NULL!\n");
+		LCDFB_WRN("sunxi_lcd_fb_pwm_free, handle is NULL!\n");
 		ret = -1;
 	} else {
 		pwm_free(pwm_dev);
-		lcd_fb_inf("lcd_fb_pwm_free pwm %d\n", pwm_dev->pwm);
+		LCDFB_INF("sunxi_lcd_fb_pwm_free pwm %d\n", pwm_dev->pwm);
 	}
 
 	return ret;
 }
 
-int lcd_fb_pwm_enable(uintptr_t p_handler)
+int sunxi_lcd_fb_pwm_enable(uintptr_t p_handler)
 {
 	int ret = 0;
 	struct pwm_device *pwm_dev;
 
 	pwm_dev = (struct pwm_device *)p_handler;
 	if ((pwm_dev == NULL) || IS_ERR(pwm_dev)) {
-		lcd_fb_wrn("lcd_fb_pwm_Enable, handle is NULL!\n");
+		LCDFB_WRN("sunxi_lcd_fb_pwm_enable, handle is NULL!\n");
 		ret = -1;
 	} else {
 		ret = pwm_enable(pwm_dev);
-		lcd_fb_inf("lcd_fb_pwm_Enable pwm %d\n", pwm_dev->pwm);
+		LCDFB_INF("sunxi_lcd_fb_pwm_enable pwm %d\n", pwm_dev->pwm);
 	}
 
 	return ret;
 }
 
-int lcd_fb_pwm_disable(uintptr_t p_handler)
+int sunxi_lcd_fb_pwm_disable(uintptr_t p_handler)
 {
 	int ret = 0;
 	struct pwm_device *pwm_dev;
 
 	pwm_dev = (struct pwm_device *)p_handler;
 	if ((pwm_dev == NULL) || IS_ERR(pwm_dev)) {
-		lcd_fb_wrn("lcd_fb_pwm_Disable, handle is NULL!\n");
+		LCDFB_WRN("sunxi_lcd_fb_pwm_disable, handle is NULL!\n");
 		ret = -1;
 	} else {
 		pwm_disable(pwm_dev);
-		lcd_fb_inf("lcd_fb_pwm_Disable pwm %d\n", pwm_dev->pwm);
+		LCDFB_INF("sunxi_lcd_fb_pwm_disable pwm %d\n", pwm_dev->pwm);
 	}
 
 	return ret;
 }
 
-int lcd_fb_pwm_config(uintptr_t p_handler, int duty_ns, int period_ns)
+int sunxi_lcd_fb_pwm_config(uintptr_t p_handler, int duty_ns, int period_ns)
 {
 	int ret = 0;
 	struct pwm_device *pwm_dev;
 
 	pwm_dev = (struct pwm_device *)p_handler;
 	if ((pwm_dev == NULL) || IS_ERR(pwm_dev)) {
-		lcd_fb_wrn("lcd_fb_pwm_Config, handle is NULL!\n");
+		LCDFB_WRN("sunxi_lcd_fb_pwm_config, handle is NULL!\n");
 		ret = -1;
 	} else {
 		ret = pwm_config(pwm_dev, duty_ns, period_ns);
-		lcd_fb_dbg("lcd_fb_pwm_Config pwm %d, <%d / %d>\n",
-			pwm_dev->pwm, duty_ns, period_ns);
+		LCDFB_DBG("sunxi_lcd_fb_pwm_config pwm %d, <%d / %d>\n",
+			  pwm_dev->pwm, duty_ns, period_ns);
 	}
 
 	return ret;
 }
 
-int lcd_fb_pwm_set_polarity(uintptr_t p_handler, int polarity)
+int sunxi_lcd_fb_pwm_set_polarity(uintptr_t p_handler, int polarity)
 {
 	int ret = 0;
 	struct pwm_state state;
@@ -527,56 +436,56 @@ int lcd_fb_pwm_set_polarity(uintptr_t p_handler, int polarity)
 
 	pwm_dev = (struct pwm_device *)p_handler;
 	if ((pwm_dev == NULL) || IS_ERR(pwm_dev)) {
-		lcd_fb_wrn("disp_sys_pwm_Set_Polarity, handle is NULL!\n");
+		LCDFB_WRN("sunxi_lcd_fb_pwm_set_polarity, handle is NULL!\n");
 		ret = -1;
 	} else {
 		memset(&state, 0, sizeof(struct pwm_state));
 		pwm_get_state(pwm_dev, &state);
 		state.polarity = polarity;
 		ret = pwm_apply_state(pwm_dev, &state);
-		lcd_fb_wrn("disp_sys_pwm_Set_Polarity pwm %d, active %s\n",
-		      pwm_dev->pwm, (polarity == 0) ? "high" : "low");
+		LCDFB_WRN("sunxi_lcd_fb_pwm_set_polarity pwm %d, active %s\n",
+			  pwm_dev->pwm, (polarity == 0) ? "high" : "low");
 	}
 
 	return ret;
 }
 #else
-uintptr_t lcd_fb_pwm_request(u32 pwm_id)
+uintptr_t sunxi_lcd_fb_pwm_request(u32 pwm_id)
 {
 	uintptr_t ret = 0;
 
 	return ret;
 }
 
-int lcd_fb_pwm_free(uintptr_t p_handler)
+int sunxi_lcd_fb_pwm_free(uintptr_t p_handler)
 {
 	int ret = 0;
 
 	return ret;
 }
 
-int lcd_fb_pwm_enable(uintptr_t p_handler)
+int sunxi_lcd_fb_pwm_enable(uintptr_t p_handler)
 {
 	int ret = 0;
 
 	return ret;
 }
 
-int lcd_fb_pwm_disable(uintptr_t p_handler)
+int sunxi_lcd_fb_pwm_disable(uintptr_t p_handler)
 {
 	int ret = 0;
 
 	return ret;
 }
 
-int lcd_fb_pwm_config(uintptr_t p_handler, int duty_ns, int period_ns)
+int sunxi_lcd_fb_pwm_config(uintptr_t p_handler, int duty_ns, int period_ns)
 {
 	int ret = 0;
 
 	return ret;
 }
 
-int lcd_fb_pwm_set_polarity(uintptr_t p_handler, int polarity)
+int sunxi_lcd_fb_pwm_set_polarity(uintptr_t p_handler, int polarity)
 {
 	int ret = 0;
 
diff --git a/drivers/video/sunxi/lcd_fb/lcd_fb_intf.h b/drivers/video/sunxi/lcd_fb/lcd_fb_intf.h
index 1782670f6..3d33ac6fb 100644
--- a/drivers/video/sunxi/lcd_fb/lcd_fb_intf.h
+++ b/drivers/video/sunxi/lcd_fb/lcd_fb_intf.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Allwinner SoCs display driver.
@@ -24,42 +24,56 @@ struct disp_gpio_info {
 #define DISP_PIN_STATE_ACTIVE "active"
 #define DISP_PIN_STATE_SLEEP "sleep"
 
-int lcd_fb_register_irq(u32 IrqNo, u32 Flags, void *Handler, void *pArg,
-			  u32 DataSize, u32 Prio);
-void lcd_fb_unregister_irq(u32 IrqNo, void *Handler, void *pArg);
-void lcd_fb_disable_irq(u32 IrqNo);
-void lcd_fb_enable_irq(u32 IrqNo);
+int sunxi_lcd_fb_register_irq(u32 irq_num, u32 flags, void *handler,
+			      void *p_arg, u32 data_size, u32 prio);
+
+void sunxi_lcd_fb_unregister_irq(u32 irq_num, void *handler, void *p_arg);
+
+void sunxi_lcd_fb_disable_irq(u32 irq_num);
+
+void sunxi_lcd_fb_enable_irq(u32 irq_num);
 
 /* returns: 0:invalid, 1: int; 2:str, 3: gpio */
-int lcd_fb_script_get_item(char *main_name, char *sub_name, int value[],
-			     int count);
+int sunxi_lcd_fb_script_get_item(struct device_node *node, char *sub_name, int value[],
+				 int count);
 
-int lcd_fb_get_ic_ver(void);
+int sunxi_lcd_fb_get_ic_ver(void);
 
-int lcd_fb_gpio_request(struct disp_gpio_info *gpio_info);
-int lcd_fb_gpio_request_simple(struct disp_gpio_info *gpio_list,
-				 u32 group_count_max);
-int lcd_fb_gpio_release(struct disp_gpio_info *gpio_info);
+int sunxi_lcd_fb_gpio_request(struct disp_gpio_info *gpio_info);
+
+int sunxi_lcd_fb_gpio_release(struct disp_gpio_info *gpio_info);
 
 /* direction: 0:input, 1:output */
-int lcd_fb_gpio_set_direction(u32 p_handler, u32 direction,
+int sunxi_lcd_fb_gpio_set_direction(u32 p_handler, u32 direction,
+				    const char *gpio_name);
+
+int sunxi_lcd_fb_gpio_get_value(u32 p_handler, const char *gpio_name);
+
+int sunxi_lcd_fb_gpio_set_value(u32 p_handler, u32 value_to_gpio,
 				const char *gpio_name);
-int lcd_fb_gpio_get_value(u32 p_handler, const char *gpio_name);
-int lcd_fb_gpio_set_value(u32 p_handler, u32 value_to_gpio,
-			    const char *gpio_name);
-int lcd_fb_pin_set_state(char *dev_name, char *name);
-
-int lcd_fb_power_enable(char *name);
-int lcd_fb_power_disable(char *name);
-void *lcd_fb_malloc(u32 size);
-
-uintptr_t lcd_fb_pwm_request(u32 pwm_id);
-int lcd_fb_pwm_free(uintptr_t p_handler);
-int lcd_fb_pwm_enable(uintptr_t p_handler);
-int lcd_fb_pwm_disable(uintptr_t p_handler);
-int lcd_fb_pwm_config(uintptr_t p_handler, int duty_ns, int period_ns);
-int lcd_fb_pwm_set_polarity(uintptr_t p_handler, int polarity);
-s32 disp_delay_ms(u32 ms);
-s32 disp_delay_us(u32 us);
+
+int sunxi_lcd_fb_pin_set_state(struct sunxi_lcd_fb_device *lcd, char *name);
+
+int sunxi_lcd_fb_power_enable(char *name);
+
+int sunxi_lcd_fb_power_disable(char *name);
+
+void *sunxi_lcd_fb_malloc(u32 size);
+
+uintptr_t sunxi_lcd_fb_pwm_request(u32 pwm_id);
+
+int sunxi_lcd_fb_pwm_free(uintptr_t p_handler);
+
+int sunxi_lcd_fb_pwm_enable(uintptr_t p_handler);
+
+int sunxi_lcd_fb_pwm_disable(uintptr_t p_handler);
+
+int sunxi_lcd_fb_pwm_config(uintptr_t p_handler, int duty_ns, int period_ns);
+
+int sunxi_lcd_fb_pwm_set_polarity(uintptr_t p_handler, int polarity);
+
+s32 sunxi_lcd_fb_disp_delay_ms(u32 ms);
+
+s32 sunxi_lcd_fb_disp_delay_us(u32 us);
 
 #endif
diff --git a/drivers/video/sunxi/lcd_fb/logo.c b/drivers/video/sunxi/lcd_fb/logo.c
index db86acbb0..a9d50506c 100644
--- a/drivers/video/sunxi/lcd_fb/logo.c
+++ b/drivers/video/sunxi/lcd_fb/logo.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * logo.c
@@ -28,26 +28,9 @@ static u32 disp_reserve_size;
 static u32 disp_reserve_base;
 
 #ifndef MODULE
-int disp_reserve_mem(bool reserve)
-{
-	if (!disp_reserve_size || !disp_reserve_base)
-		return -EINVAL;
-
-	if (reserve)
-		memblock_reserve(disp_reserve_base, disp_reserve_size);
-	else
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
-		memblock_free(__va(disp_reserve_base), disp_reserve_size);
-#else
-		memblock_free(disp_reserve_base, disp_reserve_size);
-#endif
-
-	return 0;
-}
-
 static int __init early_disp_reserve(char *str)
 {
-	u32 temp[3] = {0};
+	u32 temp[3] = { 0 };
 
 	if (!str)
 		return -EINVAL;
@@ -60,16 +43,17 @@ static int __init early_disp_reserve(char *str)
 		return -EINVAL;
 
 	/* arch_mem_end = memblock_end_of_DRAM(); */
-	disp_reserve_mem(true);
-	pr_info("disp reserve base 0x%x ,size 0x%x\n",
-					disp_reserve_base, disp_reserve_size);
+	memblock_reserve(disp_reserve_base, disp_reserve_size);
+	pr_info("disp reserve base 0x%x ,size 0x%x\n", disp_reserve_base,
+		disp_reserve_size);
 	return 0;
 }
 early_param("disp_reserve", early_disp_reserve);
 #endif
 
-static int bmp_to_fb(const void *psrc, struct bmp_header *bmp_header,
-			  struct fb_info *info, void *pdst)
+static int sunxi_lcd_fb_bmp_to_fb(const void *psrc,
+				  struct bmp_header *bmp_header,
+				  struct fb_info *info, void *pdst)
 {
 	int srclinesize, dstlinesize, w, h;
 	const unsigned char *psrcline = NULL, *psrcdot = NULL;
@@ -78,18 +62,20 @@ static int bmp_to_fb(const void *psrc, struct bmp_header *bmp_header,
 	int BppBmp = 3;
 
 	if (!psrc || !pdst || !bmp_header || !info) {
-		lcd_fb_wrn("Invalid parameter\n");
+		LCDFB_WRN("Invalid parameter\n");
 		return -1;
 	}
 
 	if (bmp_header->bit_count == 24)
 		zero_num = (4 - ((3 * bmp_header->width) % 4)) & 3;
 
-	w = (info->var.xres < bmp_header->width) ? info->var.xres
-						 : bmp_header->width;
-	bmp_real_height = (bmp_header->height & 0x80000000) ? (-bmp_header->
-						 height) : (bmp_header->height);
-	h = (info->var.yres < bmp_real_height) ? info->var.yres : bmp_real_height;
+	w = (info->var.xres < bmp_header->width) ? info->var.xres :
+							 bmp_header->width;
+	bmp_real_height = (bmp_header->height & 0x80000000) ?
+					(-bmp_header->height) :
+					(bmp_header->height);
+	h = (info->var.yres < bmp_real_height) ? info->var.yres :
+						       bmp_real_height;
 
 	BppBmp = bmp_header->bit_count >> 3;
 	srclinesize = bmp_header->width * BppBmp + zero_num;
@@ -107,20 +93,31 @@ static int bmp_to_fb(const void *psrc, struct bmp_header *bmp_header,
 				for (j = 0; j < w; ++j) {
 					if (info->var.bits_per_pixel == 32 &&
 					    bmp_header->bit_count == 24) {
-						*pdstdot++ = psrcdot[j * BppBmp];
-						*pdstdot++ = psrcdot[j * BppBmp + 1];
-						*pdstdot++ = psrcdot[j * BppBmp + 2];
+						*pdstdot++ =
+							psrcdot[j * BppBmp];
+						*pdstdot++ =
+							psrcdot[j * BppBmp + 1];
+						*pdstdot++ =
+							psrcdot[j * BppBmp + 2];
 						*pdstdot++ = 0xff;
-					} else if (info->var.bits_per_pixel == 16 &&
-						   bmp_header->bit_count >= 24) {
+					} else if (info->var.bits_per_pixel ==
+							   16 &&
+						   bmp_header->bit_count >=
+							   24) {
 						/* little endian */
 						*pdstdot++ =
-							((psrcdot[j * BppBmp + 1] << 3) &
+							((psrcdot[j * BppBmp + 1]
+							  << 3) &
 							 0xe0) +
-							((psrcdot[j * BppBmp] >> 3) & 0x1f);
+							((psrcdot[j * BppBmp] >>
+							  3) &
+							 0x1f);
 						*pdstdot++ =
-							(psrcdot[j * BppBmp + 2] & 0xf8) +
-							((psrcdot[j * BppBmp + 1] >> 5) &
+							(psrcdot[j * BppBmp + 2] &
+							 0xf8) +
+							((psrcdot[j * BppBmp +
+								  1] >>
+							  5) &
 							 0x07);
 					}
 				}
@@ -141,20 +138,31 @@ static int bmp_to_fb(const void *psrc, struct bmp_header *bmp_header,
 				for (j = 0; j < w; ++j) {
 					if (info->var.bits_per_pixel == 32 &&
 					    bmp_header->bit_count == 24) {
-						*pdstdot++ = psrcdot[j * BppBmp];
-						*pdstdot++ = psrcdot[j * BppBmp + 1];
-						*pdstdot++ = psrcdot[j * BppBmp + 2];
+						*pdstdot++ =
+							psrcdot[j * BppBmp];
+						*pdstdot++ =
+							psrcdot[j * BppBmp + 1];
+						*pdstdot++ =
+							psrcdot[j * BppBmp + 2];
 						*pdstdot++ = 0xff;
-					} else if (info->var.bits_per_pixel == 16 &&
-						   bmp_header->bit_count >= 24) {
+					} else if (info->var.bits_per_pixel ==
+							   16 &&
+						   bmp_header->bit_count >=
+							   24) {
 						/* little endian */
 						*pdstdot++ =
-							((psrcdot[j * BppBmp + 1] << 3) &
+							((psrcdot[j * BppBmp + 1]
+							  << 3) &
 							 0xe0) +
-							((psrcdot[j * BppBmp] >> 3) & 0x1f);
+							((psrcdot[j * BppBmp] >>
+							  3) &
+							 0x1f);
 						*pdstdot++ =
-							(psrcdot[j * BppBmp + 2] & 0xf8) +
-							((psrcdot[j * BppBmp + 1] >> 5) &
+							(psrcdot[j * BppBmp + 2] &
+							 0xf8) +
+							((psrcdot[j * BppBmp +
+								  1] >>
+							  5) &
 							 0x07);
 					}
 				}
@@ -167,7 +175,8 @@ static int bmp_to_fb(const void *psrc, struct bmp_header *bmp_header,
 	return 0;
 }
 
-static void *Fb_map_kernel(unsigned long phys_addr, unsigned long size)
+static void *sunxi_lcd_fb_fb_map_kernel(unsigned long phys_addr,
+					unsigned long size)
 {
 	int npages = PAGE_ALIGN(size) / PAGE_SIZE;
 	struct page **pages = vmalloc(sizeof(struct page *) * npages);
@@ -190,26 +199,13 @@ static void *Fb_map_kernel(unsigned long phys_addr, unsigned long size)
 	return vaddr;
 }
 
-static void Fb_unmap_kernel(void *vaddr)
+static void sunxi_lcd_fb_unmap_kernel(void *vaddr)
 {
 	vunmap(vaddr);
 }
 
 #if IS_ENABLED(CONFIG_DECOMPRESS_LZMA)
-struct lzma_header {
-	char signature[4];
-	u32 file_size;
-	u32 original_file_size;
-};
-
-struct sunxi_bmp_store {
-	int x;
-	int y;
-	int bit;
-	void *buffer;
-};
-
-int lzma_decode(uintptr_t paddr, struct fb_info *info)
+int sunxi_lcd_fb_lzma_decode(uintptr_t paddr, struct fb_info *info)
 {
 	void *vaddr = NULL;
 	long pos = 0;
@@ -226,14 +222,16 @@ int lzma_decode(uintptr_t paddr, struct fb_info *info)
 	char *bmp_data = NULL;
 
 	if (!paddr || !info) {
-		lcd_fb_wrn("Null pointer\n");
+		LCDFB_WRN("Null pointer\n");
 		goto OUT;
 	}
 
-	vaddr = (void *)Fb_map_kernel(paddr, sizeof(struct lzma_header));
+	vaddr = (void *)sunxi_lcd_fb_fb_map_kernel(paddr,
+						   sizeof(struct lzma_header));
 	if (vaddr == NULL) {
-		lcd_fb_wrn("fb_map_kernel failed, paddr=0x%p,size=0x%x\n",
-		      (void *)paddr, (unsigned int)sizeof(struct lzma_header));
+		LCDFB_WRN("fb_map_kernel failed, paddr=0x%p,size=0x%x\n",
+			  (void *)paddr,
+			  (unsigned int)sizeof(struct lzma_header));
 		goto OUT;
 	}
 
@@ -243,33 +241,33 @@ int lzma_decode(uintptr_t paddr, struct fb_info *info)
 	    (lzma_head.signature[1] != 'Z') ||
 	    (lzma_head.signature[2] != 'M') ||
 	    (lzma_head.signature[3] != 'A')) {
-		lcd_fb_wrn("this is not a LZMA file\n");
-		Fb_unmap_kernel(vaddr);
+		LCDFB_WRN("this is not a LZMA file\n");
+		sunxi_lcd_fb_unmap_kernel(vaddr);
 		goto OUT;
 	}
 
-	Fb_unmap_kernel(vaddr);
+	sunxi_lcd_fb_unmap_kernel(vaddr);
 
 	out = kmalloc(lzma_head.original_file_size, GFP_KERNEL | __GFP_ZERO);
 	if (!out) {
-		lcd_fb_wrn("kmalloc outbuffer fail\n");
+		LCDFB_WRN("kmalloc outbuffer fail\n");
 		goto OUT;
 	}
 
-	vaddr = (void *)Fb_map_kernel(paddr, lzma_head.file_size +
-						 sizeof(struct lzma_header));
+	vaddr = (void *)sunxi_lcd_fb_fb_map_kernel(
+		paddr, lzma_head.file_size + sizeof(struct lzma_header));
 	if (vaddr == NULL) {
-		lcd_fb_wrn("fb_map_kernel failed, paddr=0x%p,size=0x%x\n",
-		      (void *)paddr,
-		      (unsigned int)(lzma_head.file_size +
-				     sizeof(struct lzma_header)));
+		LCDFB_WRN("fb_map_kernel failed, paddr=0x%p,size=0x%x\n",
+			  (void *)paddr,
+			  (unsigned int)(lzma_head.file_size +
+					 sizeof(struct lzma_header)));
 		goto FREE_OUT;
 	}
 
 	ret = unlzma((unsigned char *)(vaddr + sizeof(struct lzma_header)),
 		     lzma_head.file_size, NULL, NULL, out, &pos, NULL);
 	if (ret) {
-		lcd_fb_wrn("unlzma fail:%d\n", ret);
+		LCDFB_WRN("unlzma fail:%d\n", ret);
 		goto UMAPKERNEL;
 	}
 
@@ -277,20 +275,20 @@ int lzma_decode(uintptr_t paddr, struct fb_info *info)
 
 	if ((bmp_header.signature[0] != 'B') ||
 	    (bmp_header.signature[1] != 'M')) {
-		lcd_fb_wrn("this is not a bmp picture\n");
+		LCDFB_WRN("this is not a bmp picture\n");
 		goto UMAPKERNEL;
 	}
 
 	bmp_bpix = bmp_header.bit_count / 8;
 
 	if ((bmp_bpix != 3) && (bmp_bpix != 4)) {
-		lcd_fb_wrn("not support bmp format:%d\n", bmp_bpix);
+		LCDFB_WRN("not support bmp format:%d\n", bmp_bpix);
 		goto UMAPKERNEL;
 	}
 
 	x = bmp_header.width;
-	y = (bmp_header.height & 0x80000000) ? (-bmp_header.height)
-					     : (bmp_header.height);
+	y = (bmp_header.height & 0x80000000) ? (-bmp_header.height) :
+						     (bmp_header.height);
 	if (bmp_bpix == 3)
 		zero_num = (4 - ((3 * x) % 4)) & 3;
 	fb_width = info->var.xres;
@@ -309,8 +307,8 @@ int lzma_decode(uintptr_t paddr, struct fb_info *info)
 
 	tmp_buffer = (char *)bmp_info.buffer;
 	screen_offset = (void *)bmp_info.buffer;
-	bmp_data =
-	    (char *)(out + bmp_header.data_offset + sizeof(struct lzma_header));
+	bmp_data = (char *)(out + bmp_header.data_offset +
+			    sizeof(struct lzma_header));
 	image_offset = (void *)bmp_data;
 	effective_width = (fb_width < x) ? fb_width : x;
 	effective_height = (fb_height < y) ? fb_height : y;
@@ -318,49 +316,45 @@ int lzma_decode(uintptr_t paddr, struct fb_info *info)
 	if (bmp_header.height & 0x80000000) {
 		screen_offset =
 			(void *)((void *__force)info->screen_base +
-					(fb_width * (abs(fb_height - y) / 2) +
-					abs(fb_width - x) / 2) *
-					(info->var.bits_per_pixel >> 3));
+				 (fb_width * (abs(fb_height - y) / 2) +
+				  abs(fb_width - x) / 2) *
+					 (info->var.bits_per_pixel >> 3));
 		for (i = 0; i < effective_height; i++) {
 			memcpy((void *)screen_offset, image_offset,
-					effective_width *
-					(info->var.bits_per_pixel >> 3));
+			       effective_width *
+				       (info->var.bits_per_pixel >> 3));
 			screen_offset =
 				(void *)(screen_offset +
-						fb_width *
-						(info->var.bits_per_pixel >>
-						3));
-			image_offset =
-				(void *)image_offset +
-				x * (info->var.bits_per_pixel >> 3);
+					 fb_width * (info->var.bits_per_pixel >>
+						     3));
+			image_offset = (void *)image_offset +
+				       x * (info->var.bits_per_pixel >> 3);
 		}
 	} else {
 		screen_offset =
 			(void *)((void *__force)info->screen_base +
-					(fb_width * (abs(fb_height - y) / 2) +
-					abs(fb_width - x) / 2) *
-					(info->var.bits_per_pixel >> 3));
+				 (fb_width * (abs(fb_height - y) / 2) +
+				  abs(fb_width - x) / 2) *
+					 (info->var.bits_per_pixel >> 3));
 
 		image_offset = (void *)bmp_data +
-					(effective_height - 1) * x *
-					(info->var.bits_per_pixel >> 3);
+			       (effective_height - 1) * x *
+				       (info->var.bits_per_pixel >> 3);
 		for (i = effective_height - 1; i >= 0; i--) {
 			memcpy((void *)screen_offset, image_offset,
-					effective_width *
-					(info->var.bits_per_pixel >> 3));
+			       effective_width *
+				       (info->var.bits_per_pixel >> 3));
 			screen_offset =
 				(void *)(screen_offset +
-						fb_width *
-						(info->var.bits_per_pixel >>
-						3));
-			image_offset =
-				(void *)bmp_data +
-				i * x * (info->var.bits_per_pixel >> 3);
+					 fb_width * (info->var.bits_per_pixel >>
+						     3));
+			image_offset = (void *)bmp_data +
+				       i * x * (info->var.bits_per_pixel >> 3);
 		}
 	}
 
 UMAPKERNEL:
-	Fb_unmap_kernel(vaddr);
+	sunxi_lcd_fb_unmap_kernel(vaddr);
 FREE_OUT:
 	kfree(out);
 OUT:
@@ -368,7 +362,7 @@ OUT:
 }
 #endif
 
-static int Fb_map_kernel_logo(struct fb_info *info)
+static int sunxi_lcd_fb_map_kernel_logo(struct fb_info *info)
 {
 	void *vaddr = NULL;
 	uintptr_t paddr = 0;
@@ -382,29 +376,31 @@ static int Fb_map_kernel_logo(struct fb_info *info)
 
 	paddr = disp_reserve_base;
 	if (!paddr || !disp_reserve_size || !info || !info->screen_base) {
-		lcd_fb_wrn("Fb_map_kernel_logo failed!");
+		LCDFB_INF("sunxi_lcd_fb_map_kernel_logo failed! skip mapping.");
 		return -1;
 	}
 
 	/* parser bmp header */
 	offset = paddr & ~PAGE_MASK;
-	vaddr = (void *)Fb_map_kernel(paddr, sizeof(struct bmp_header));
+	vaddr = (void *)sunxi_lcd_fb_fb_map_kernel(paddr,
+						   sizeof(struct bmp_header));
 	if (vaddr == NULL) {
-		lcd_fb_wrn("fb_map_kernel failed, paddr=0x%p,size=0x%x\n",
-		      (void *)paddr, (unsigned int)sizeof(struct bmp_header));
+		LCDFB_WRN("fb_map_kernel failed, paddr=0x%p,size=0x%x\n",
+			  (void *)paddr,
+			  (unsigned int)sizeof(struct bmp_header));
 		return -1;
 	}
 
 	memcpy(&bmp_pad_header.signature[0], vaddr + offset,
 	       sizeof(struct bmp_header));
-	bmp_header = (struct bmp_header *) &bmp_pad_header.signature[0];
-	if ((bmp_header->signature[0] != 'B')
-	    || (bmp_header->signature[1] != 'M')) {
-		Fb_unmap_kernel(vaddr);
+	bmp_header = (struct bmp_header *)&bmp_pad_header.signature[0];
+	if ((bmp_header->signature[0] != 'B') ||
+	    (bmp_header->signature[1] != 'M')) {
+		sunxi_lcd_fb_unmap_kernel(vaddr);
 #if IS_ENABLED(CONFIG_DECOMPRESS_LZMA)
-		return lzma_decode(paddr, info);
+		return sunxi_lcd_fb_lzma_decode(paddr, info);
 #else
-		lcd_fb_wrn("this is not a bmp picture.\n");
+		LCDFB_WRN("this is not a bmp picture.\n");
 		return -1;
 
 #endif
@@ -413,36 +409,34 @@ static int Fb_map_kernel_logo(struct fb_info *info)
 	bmp_bpix = bmp_header->bit_count / 8;
 
 	if ((bmp_bpix != 3) && (bmp_bpix != 4)) {
-		lcd_fb_wrn("Only bmp24 and bmp32 is supported!\n");
+		LCDFB_WRN("Only bmp24 and bmp32 is supported!\n");
 		return -1;
 	}
 
 	x = bmp_header->width;
-	y = (bmp_header->height & 0x80000000) ? (-bmp_header->
-						 height) : (bmp_header->height);
+	y = (bmp_header->height & 0x80000000) ? (-bmp_header->height) :
+						      (bmp_header->height);
 	if (x != info->var.xres || y != info->var.yres) {
-		Fb_unmap_kernel(vaddr);
-		lcd_fb_wrn("Bmp  [%u x %u] is not equal to fb[%d x %d]\n", x, y,
-			   info->var.xres, info->var.yres);
+		sunxi_lcd_fb_unmap_kernel(vaddr);
+		LCDFB_WRN("Bmp  [%u x %u] is not equal to fb[%d x %d]\n", x, y,
+			  info->var.xres, info->var.yres);
 		return -1;
 	}
 
 	if ((paddr <= 0) || x <= 1 || y <= 1) {
-		lcd_fb_wrn("kernel logo para error!\n");
+		LCDFB_WRN("kernel logo para error!\n");
 		return -EINVAL;
 	}
 
-	Fb_unmap_kernel(vaddr);
+	sunxi_lcd_fb_unmap_kernel(vaddr);
 
 	/* map the total bmp buffer */
-	vaddr =
-	    (void *)Fb_map_kernel(paddr,
-				  disp_reserve_size);
+	vaddr = (void *)sunxi_lcd_fb_fb_map_kernel(paddr, disp_reserve_size);
 	if (vaddr == NULL) {
-		lcd_fb_wrn("fb_map_kernel failed, paddr=0x%p,size=0x%x\n",
-		      (void *)paddr,
-		      (unsigned int)(x * y * bmp_bpix +
-		       sizeof(struct bmp_header)));
+		LCDFB_WRN("fb_map_kernel failed, paddr=0x%p,size=0x%x\n",
+			  (void *)paddr,
+			  (unsigned int)(x * y * bmp_bpix +
+					 sizeof(struct bmp_header)));
 		return -1;
 	}
 
@@ -450,24 +444,29 @@ static int Fb_map_kernel_logo(struct fb_info *info)
 	image_offset = (void *)bmp_data;
 	effective_width = x;
 	effective_height = y;
-	screen_offset =
-		(void *__force)info->screen_base;
+	screen_offset = (void *__force)info->screen_base;
 
-	bmp_to_fb(image_offset, bmp_header, info,
-		  screen_offset);
+	sunxi_lcd_fb_bmp_to_fb(image_offset, bmp_header, info, screen_offset);
 
-	Fb_unmap_kernel(vaddr);
+	sunxi_lcd_fb_unmap_kernel(vaddr);
 	return 0;
 }
 
-int logo_parse(struct fb_info *info)
+int sunxi_lcd_fb_logo_parse(struct fb_info *info)
 {
 	int ret = -1;
 
-	ret = Fb_map_kernel_logo(info);
+	ret = sunxi_lcd_fb_map_kernel_logo(info);
 
-#ifndef MODULE
-	disp_reserve_mem(false);
+#if !defined(MODULE)
+	if (!disp_reserve_size || !disp_reserve_base)
+		return -EINVAL;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) && !defined(MODULE)
+	memblock_free(__va(disp_reserve_base), disp_reserve_size);
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0) && \
+	defined(CONFIG_ARCH_KEEP_MEMBLOCK)
+	memblock_free(disp_reserve_base, disp_reserve_size);
 #endif
-	return ret;;
+#endif
+	return ret;
 }
diff --git a/drivers/video/sunxi/lcd_fb/logo.h b/drivers/video/sunxi/lcd_fb/logo.h
index baf9b7cb9..37f1158ef 100644
--- a/drivers/video/sunxi/lcd_fb/logo.h
+++ b/drivers/video/sunxi/lcd_fb/logo.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * logo/logo.h
@@ -26,7 +26,7 @@ extern "C" {
 #include "include.h"
 
 struct bmp_pad_header {
-	char data[2];		/* pading 2 byte */
+	char data[2]; /* pading 2 byte */
 	char signature[2];
 	u32 file_size;
 	u32 reserved;
@@ -66,7 +66,22 @@ struct bmp_header {
 	/* ColorTable */
 } __packed;
 
-int logo_parse(struct fb_info *info);
+#if IS_ENABLED(CONFIG_DECOMPRESS_LZMA)
+struct lzma_header {
+	char signature[4];
+	u32 file_size;
+	u32 original_file_size;
+};
+
+struct sunxi_bmp_store {
+	int x;
+	int y;
+	int bit;
+	void *buffer;
+};
+#endif
+
+int sunxi_lcd_fb_logo_parse(struct fb_info *info);
 
 #ifdef __cplusplus
 }
diff --git a/drivers/video/sunxi/lcd_fb/panels/kld2844b.c b/drivers/video/sunxi/lcd_fb/panels/kld2844b.c
index 671bdc094..8ccb7bb7f 100644
--- a/drivers/video/sunxi/lcd_fb/panels/kld2844b.c
+++ b/drivers/video/sunxi/lcd_fb/panels/kld2844b.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Copyright (c) 2007-2019 Allwinnertech Co., Ltd.
@@ -56,7 +56,6 @@ static void LCD_bl_close(u32 sel);
 static void LCD_panel_init(u32 sel);
 static void LCD_panel_exit(u32 sel);
 #define RESET(s, v) sunxi_lcd_gpio_set_value(s, 0, v)
-static struct disp_panel_para info[LCD_FB_MAX];
 
 static void address(unsigned int sel, int x, int y, int width, int height)
 {
@@ -75,11 +74,11 @@ static void address(unsigned int sel, int x, int y, int width, int height)
 static void LCD_panel_init(unsigned int sel)
 {
 	unsigned int rotate;
-	/* unsigned char result[4] = {0x0}; */
+	struct sunxi_lcd_fb_disp_panel_para info;
+	memset(&info, 0, sizeof(info));
 
-
-	if (bsp_disp_get_panel_info(sel, &info[sel])) {
-		lcd_fb_wrn("get panel info fail!\n");
+	if (sunxi_lcd_fb_bsp_disp_get_panel_info(sel, &info)) {
+		LCDFB_WRN("get panel info fail!\n");
 		return;
 	}
 
@@ -97,45 +96,44 @@ static void LCD_panel_init(unsigned int sel)
 	sunxi_lcd_para_write(sel, 0x75);
 
 	/* MY MX MV ML RGB MH 0 0 */
-	if (info[sel].lcd_x > info[sel].lcd_y)
+	if (info.lcd_x > info.lcd_y)
 		rotate = 0xa0;
 	else
 		rotate = 0xC0;
 
-
 	sunxi_lcd_cmd_write(sel, 0x3A); /* Interface Pixel Format */
 	/* 55----RGB565;66---RGB666 */
-	if (info[sel].lcd_pixel_fmt == LCDFB_FORMAT_RGB_565 ||
-	    info[sel].lcd_pixel_fmt == LCDFB_FORMAT_BGR_565) {
+	if (info.lcd_pixel_fmt == LCDFB_FORMAT_RGB_565 ||
+	    info.lcd_pixel_fmt == LCDFB_FORMAT_BGR_565) {
 		sunxi_lcd_para_write(sel, 0x55);
-		if (info[sel].lcd_pixel_fmt == LCDFB_FORMAT_RGB_565)
+		if (info.lcd_pixel_fmt == LCDFB_FORMAT_RGB_565)
 			rotate &= 0xf7;
 		else
 			rotate |= 0x08;
-	} else if (info[sel].lcd_pixel_fmt < LCDFB_FORMAT_RGB_888) {
+	} else if (info.lcd_pixel_fmt < LCDFB_FORMAT_RGB_888) {
 		sunxi_lcd_para_write(sel, 0x66);
-		if (info[sel].lcd_pixel_fmt == LCDFB_FORMAT_BGRA_8888 ||
-		    info[sel].lcd_pixel_fmt == LCDFB_FORMAT_BGRX_8888 ||
-		    info[sel].lcd_pixel_fmt == LCDFB_FORMAT_ABGR_8888 ||
-		    info[sel].lcd_pixel_fmt == LCDFB_FORMAT_XBGR_8888) {
+		if (info.lcd_pixel_fmt == LCDFB_FORMAT_BGRA_8888 ||
+		    info.lcd_pixel_fmt == LCDFB_FORMAT_BGRX_8888 ||
+		    info.lcd_pixel_fmt == LCDFB_FORMAT_ABGR_8888 ||
+		    info.lcd_pixel_fmt == LCDFB_FORMAT_XBGR_8888) {
 			rotate |= 0x08;
 		}
 	} else {
 		sunxi_lcd_para_write(sel, 0x66);
 	}
 
-	if (info[sel].lcd_if == LCD_FB_IF_SPI) {
+	if (info.lcd_if == LCD_FB_IF_SPI) {
 		sunxi_lcd_cmd_write(sel, 0xb0);
 		sunxi_lcd_para_write(sel, 0x03);
 		sunxi_lcd_para_write(sel, 0xc8); /* Little endian */
 	}
 
-	sunxi_lcd_cmd_write(sel, 0x36); /* Memory sunxi_lcd_para_write Access Control */
+	sunxi_lcd_cmd_write(
+		sel, 0x36); /* Memory sunxi_lcd_para_write Access Control */
 
 	sunxi_lcd_para_write(sel, rotate);
 
-	if (info[sel].lcd_if == LCD_FB_IF_DBI &&
-	    info[sel].dbi_if == LCD_FB_D2LI) {
+	if (info.lcd_if == LCD_FB_IF_DBI && info.dbi_if == LCD_FB_D2LI) {
 		/* two data lane */
 		sunxi_lcd_cmd_write(sel, 0xE7);
 		sunxi_lcd_para_write(sel, 0x10);
@@ -192,13 +190,12 @@ static void LCD_panel_init(unsigned int sel)
 	sunxi_lcd_para_write(sel, 0x19);
 	sunxi_lcd_para_write(sel, 0x1D);
 
-	address(sel, 0, 0, info[sel].lcd_x - 1, info[sel].lcd_y - 1);
+	address(sel, 0, 0, info.lcd_x - 1, info.lcd_y - 1);
 
 	sunxi_lcd_cmd_write(sel, 0x11); /* Sleep Out */
 	sunxi_lcd_delay_ms(120);
 	sunxi_lcd_cmd_write(sel, 0x29); /* Display ON */
 	sunxi_lcd_cmd_write(sel, 0x2c); /* Display ON */
-
 }
 
 static void LCD_panel_exit(unsigned int sel)
@@ -216,13 +213,13 @@ static void LCD_panel_exit(unsigned int sel)
 
 static s32 LCD_open_flow(u32 sel)
 {
-	lcd_fb_here;
+	LCDFB_HERE;
 	/* open lcd power, and delay 50ms */
 	LCD_OPEN_FUNC(sel, LCD_power_on, 50);
 	/* open lcd power, than delay 200ms */
 	LCD_OPEN_FUNC(sel, LCD_panel_init, 20);
 
-	LCD_OPEN_FUNC(sel, lcd_fb_black_screen, 50);
+	LCD_OPEN_FUNC(sel, sunxi_lcd_fb_black_screen, 50);
 	/* open lcd backlight, and delay 0ms */
 	LCD_OPEN_FUNC(sel, LCD_bl_open, 0);
 
@@ -231,7 +228,7 @@ static s32 LCD_open_flow(u32 sel)
 
 static s32 LCD_close_flow(u32 sel)
 {
-	lcd_fb_here;
+	LCDFB_HERE;
 	/* close lcd backlight, and delay 0ms */
 	LCD_CLOSE_FUNC(sel, LCD_bl_close, 50);
 	/* open lcd power, than delay 200ms */
@@ -245,7 +242,7 @@ static s32 LCD_close_flow(u32 sel)
 static void LCD_power_on(u32 sel)
 {
 	/* config lcd_power pin to open lcd power0 */
-	lcd_fb_here;
+	LCDFB_HERE;
 
 	sunxi_lcd_power_enable(sel, 0);
 
@@ -259,7 +256,7 @@ static void LCD_power_on(u32 sel)
 
 static void LCD_power_off(u32 sel)
 {
-	lcd_fb_here;
+	LCDFB_HERE;
 	/* config lcd_power pin to close lcd power0 */
 	sunxi_lcd_power_disable(sel, 0);
 }
@@ -269,7 +266,7 @@ static void LCD_bl_open(u32 sel)
 	sunxi_lcd_pwm_enable(sel);
 	/* config lcd_bl_en pin to open lcd backlight */
 	sunxi_lcd_backlight_enable(sel);
-	lcd_fb_here;
+	LCDFB_HERE;
 }
 
 static void LCD_bl_close(u32 sel)
@@ -277,7 +274,7 @@ static void LCD_bl_close(u32 sel)
 	/* config lcd_bl_en pin to close lcd backlight */
 	sunxi_lcd_backlight_disable(sel);
 	sunxi_lcd_pwm_disable(sel);
-	lcd_fb_here;
+	LCDFB_HERE;
 }
 
 static int lcd_set_var(unsigned int sel, struct fb_info *p_info)
@@ -296,7 +293,8 @@ static int lcd_blank(unsigned int sel, unsigned int en)
 	return 0;
 }
 
-static int lcd_set_addr_win(unsigned int sel, int x, int y, int width, int height)
+static int lcd_set_addr_win(unsigned int sel, int x, int y, int width,
+			    int height)
 {
 	address(sel, x, y, width, height);
 	sunxi_lcd_cmd_write(sel, 0x2c); /* Display ON */
@@ -312,5 +310,5 @@ struct __lcd_panel kld2844b_panel = {
 		.blank = lcd_blank,
 		.set_var = lcd_set_var,
 		.set_addr_win = lcd_set_addr_win,
-		},
+	},
 };
diff --git a/drivers/video/sunxi/lcd_fb/panels/kld2844b.h b/drivers/video/sunxi/lcd_fb/panels/kld2844b.h
index f31a8f55e..4bf9454c0 100644
--- a/drivers/video/sunxi/lcd_fb/panels/kld2844b.h
+++ b/drivers/video/sunxi/lcd_fb/panels/kld2844b.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Copyright (c) 2007-2019 Allwinnertech Co., Ltd.
diff --git a/drivers/video/sunxi/lcd_fb/panels/kld35512.c b/drivers/video/sunxi/lcd_fb/panels/kld35512.c
index b0d421944..0033330f0 100644
--- a/drivers/video/sunxi/lcd_fb/panels/kld35512.c
+++ b/drivers/video/sunxi/lcd_fb/panels/kld35512.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Copyright (c) 2007-2019 Allwinnertech Co., Ltd.
@@ -56,9 +56,6 @@ static void LCD_panel_exit(u32 sel);
 
 #define RESET(s, v) sunxi_lcd_gpio_set_value(s, 0, v)
 
-
-static struct disp_panel_para info[LCD_FB_MAX];
-
 static void address(unsigned int sel, int x, int y, int width, int height)
 {
 	sunxi_lcd_cmd_write(sel, 0x2B); /* Set row address */
@@ -73,10 +70,9 @@ static void address(unsigned int sel, int x, int y, int width, int height)
 	sunxi_lcd_para_write(sel, width & 0xff);
 }
 
-
 static void reset_panel(unsigned int sel)
 {
-	lcd_fb_here;
+	LCDFB_HERE;
 
 	sunxi_lcd_pin_cfg(sel, 1);
 	RESET(sel, 1);
@@ -89,10 +85,11 @@ static void reset_panel(unsigned int sel)
 static void LCD_panel_init(unsigned int sel)
 {
 	unsigned int rotate;
+	struct sunxi_lcd_fb_disp_panel_para info;
+	memset(&info, 0, sizeof(info));
 
-
-	if (bsp_disp_get_panel_info(sel, &info[sel])) {
-		lcd_fb_wrn("get panel info fail!\n");
+	if (sunxi_lcd_fb_bsp_disp_get_panel_info(sel, &info)) {
+		LCDFB_WRN("get panel info fail!\n");
 		return;
 	}
 
@@ -103,11 +100,12 @@ static void LCD_panel_init(unsigned int sel)
 	sunxi_lcd_para_write(sel, 0x96);
 
 	sunxi_lcd_cmd_write(sel, 0xB4); /* Display Inversion Control */
-	sunxi_lcd_para_write(sel, 0x01);  /* 1-dot */
+	sunxi_lcd_para_write(sel, 0x01); /* 1-dot */
 
 	sunxi_lcd_cmd_write(sel, 0xB7);
 	sunxi_lcd_para_write(sel, 0xC6);
-	sunxi_lcd_cmd_write(sel, 0xe6); /* Fixed SPI 50MHz and 60MHz LCD display problems */
+	sunxi_lcd_cmd_write(
+		sel, 0xe6); /* Fixed SPI 50MHz and 60MHz LCD display problems */
 	sunxi_lcd_para_write(sel, 0xff);
 	sunxi_lcd_para_write(sel, 0xc2);
 
@@ -187,8 +185,7 @@ static void LCD_panel_init(unsigned int sel)
 	sunxi_lcd_para_write(sel, 0x50);
 	sunxi_lcd_para_write(sel, 0x10);
 
-	if (info[sel].lcd_if == LCD_FB_IF_DBI &&
-	    info[sel].dbi_if == LCD_FB_D2LI) {
+	if (info.lcd_if == LCD_FB_IF_DBI && info.dbi_if == LCD_FB_D2LI) {
 		/* two data lane */
 		sunxi_lcd_cmd_write(sel, 0xB9);
 		sunxi_lcd_para_write(sel, 0x00);
@@ -196,7 +193,7 @@ static void LCD_panel_init(unsigned int sel)
 	}
 	sunxi_lcd_cmd_write(sel, 0x36);
 	/* MY MX MV ML RGB MH 0 0 */
-	if (info[sel].lcd_x > info[sel].lcd_y)
+	if (info.lcd_x > info.lcd_y)
 		rotate = 0x20;
 	else
 		rotate = 0x40;
@@ -204,21 +201,25 @@ static void LCD_panel_init(unsigned int sel)
 
 	sunxi_lcd_cmd_write(sel, 0x3A);
 	/* 55----RGB565;66---RGB666 */
-	if (info[sel].lcd_pixel_fmt == LCDFB_FORMAT_RGB_565 ||
-	    info[sel].lcd_pixel_fmt == LCDFB_FORMAT_BGR_565) {
+	if (info.lcd_pixel_fmt == LCDFB_FORMAT_RGB_565 ||
+	    info.lcd_pixel_fmt == LCDFB_FORMAT_BGR_565) {
 		sunxi_lcd_para_write(sel, 0x55);
-		sunxi_lcd_cmd_write(sel, 0x36); /* Memory sunxi_lcd_para_write Access Control */
-		if (info[sel].lcd_pixel_fmt == LCDFB_FORMAT_RGB_565)
+		sunxi_lcd_cmd_write(
+			sel,
+			0x36); /* Memory sunxi_lcd_para_write Access Control */
+		if (info.lcd_pixel_fmt == LCDFB_FORMAT_RGB_565)
 			sunxi_lcd_para_write(sel, rotate | 0x08);
 		else
 			sunxi_lcd_para_write(sel, rotate & 0xf7);
-	} else if (info[sel].lcd_pixel_fmt < LCDFB_FORMAT_RGB_888) {
+	} else if (info.lcd_pixel_fmt < LCDFB_FORMAT_RGB_888) {
 		sunxi_lcd_para_write(sel, 0x77);
-		if (info[sel].lcd_pixel_fmt == LCDFB_FORMAT_RGBA_8888 ||
-		    info[sel].lcd_pixel_fmt == LCDFB_FORMAT_RGBX_8888 ||
-		    info[sel].lcd_pixel_fmt == LCDFB_FORMAT_ARGB_8888 ||
-		    info[sel].lcd_pixel_fmt == LCDFB_FORMAT_XRGB_8888) {
-			sunxi_lcd_cmd_write(sel, 0x36); /* Memory sunxi_lcd_para_write Access Control */
+		if (info.lcd_pixel_fmt == LCDFB_FORMAT_RGBA_8888 ||
+		    info.lcd_pixel_fmt == LCDFB_FORMAT_RGBX_8888 ||
+		    info.lcd_pixel_fmt == LCDFB_FORMAT_ARGB_8888 ||
+		    info.lcd_pixel_fmt == LCDFB_FORMAT_XRGB_8888) {
+			sunxi_lcd_cmd_write(
+				sel,
+				0x36); /* Memory sunxi_lcd_para_write Access Control */
 			sunxi_lcd_para_write(sel, rotate | 0x08);
 		}
 
@@ -226,8 +227,7 @@ static void LCD_panel_init(unsigned int sel)
 		sunxi_lcd_para_write(sel, 0x66);
 	}
 
-
-	address(sel, 0, 0, info[sel].lcd_x - 1, info[sel].lcd_y - 1);
+	address(sel, 0, 0, info.lcd_x - 1, info.lcd_y - 1);
 	sunxi_lcd_cmd_write(sel, 0xF0);
 	sunxi_lcd_para_write(sel, 0x3c);
 
@@ -238,7 +238,6 @@ static void LCD_panel_init(unsigned int sel)
 	sunxi_lcd_delay_ms(120);
 	sunxi_lcd_cmd_write(sel, 0x29);
 	sunxi_lcd_cmd_write(sel, 0x2c); /* Display ON */
-
 }
 
 static void LCD_panel_exit(unsigned int sel)
@@ -252,7 +251,6 @@ static void LCD_panel_exit(unsigned int sel)
 	sunxi_lcd_delay_ms(10);
 
 	sunxi_lcd_pin_cfg(sel, 0);
-
 }
 
 static int lcd_blank(unsigned int sel, unsigned int en)
@@ -265,16 +263,15 @@ static int lcd_blank(unsigned int sel, unsigned int en)
 	return 0;
 }
 
-
 static s32 LCD_open_flow(u32 sel)
 {
-	lcd_fb_here;
+	LCDFB_HERE;
 	/* open lcd power, and delay 50ms */
 	LCD_OPEN_FUNC(sel, LCD_power_on, 50);
 	/* open lcd power, than delay 200ms */
 	LCD_OPEN_FUNC(sel, LCD_panel_init, 20);
 
-	LCD_OPEN_FUNC(sel, lcd_fb_black_screen, 20);
+	LCD_OPEN_FUNC(sel, sunxi_lcd_fb_black_screen, 20);
 	/* open lcd backlight, and delay 0ms */
 	LCD_OPEN_FUNC(sel, LCD_bl_open, 0);
 
@@ -283,7 +280,7 @@ static s32 LCD_open_flow(u32 sel)
 
 static s32 LCD_close_flow(u32 sel)
 {
-	lcd_fb_here;
+	LCDFB_HERE;
 	/* close lcd backlight, and delay 0ms */
 	LCD_CLOSE_FUNC(sel, LCD_bl_close, 50);
 	/* open lcd power, than delay 200ms */
@@ -297,14 +294,14 @@ static s32 LCD_close_flow(u32 sel)
 static void LCD_power_on(u32 sel)
 {
 	/* config lcd_power pin to open lcd power0 */
-	lcd_fb_here;
+	LCDFB_HERE;
 	sunxi_lcd_power_enable(sel, 0);
 	reset_panel(sel);
 }
 
 static void LCD_power_off(u32 sel)
 {
-	lcd_fb_here;
+	LCDFB_HERE;
 	/* config lcd_power pin to close lcd power0 */
 	sunxi_lcd_power_disable(sel, 0);
 }
@@ -314,7 +311,7 @@ static void LCD_bl_open(u32 sel)
 	sunxi_lcd_pwm_enable(sel);
 	/* config lcd_bl_en pin to open lcd backlight */
 	sunxi_lcd_backlight_enable(sel);
-	lcd_fb_here;
+	LCDFB_HERE;
 }
 
 static void LCD_bl_close(u32 sel)
@@ -322,16 +319,16 @@ static void LCD_bl_close(u32 sel)
 	/* config lcd_bl_en pin to close lcd backlight */
 	sunxi_lcd_backlight_disable(sel);
 	sunxi_lcd_pwm_disable(sel);
-	lcd_fb_here;
+	LCDFB_HERE;
 }
 
-
 static int lcd_set_var(unsigned int sel, struct fb_info *p_info)
 {
 	return 0;
 }
 
-static int lcd_set_addr_win(unsigned int sel, int x, int y, int width, int height)
+static int lcd_set_addr_win(unsigned int sel, int x, int y, int width,
+			    int height)
 {
 	address(sel, x, y, width, height);
 	sunxi_lcd_cmd_write(sel, 0x2c); /* Display ON */
@@ -347,5 +344,5 @@ struct __lcd_panel kld35512_panel = {
 		.blank = lcd_blank,
 		.set_var = lcd_set_var,
 		.set_addr_win = lcd_set_addr_win,
-		},
+	},
 };
diff --git a/drivers/video/sunxi/lcd_fb/panels/kld35512.h b/drivers/video/sunxi/lcd_fb/panels/kld35512.h
index 36886d6ba..b8a2ff52e 100644
--- a/drivers/video/sunxi/lcd_fb/panels/kld35512.h
+++ b/drivers/video/sunxi/lcd_fb/panels/kld35512.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Copyright (c) 2007-2019 Allwinnertech Co., Ltd.
diff --git a/drivers/video/sunxi/lcd_fb/panels/kld39501.c b/drivers/video/sunxi/lcd_fb/panels/kld39501.c
index e01e8c74f..be03b695a 100644
--- a/drivers/video/sunxi/lcd_fb/panels/kld39501.c
+++ b/drivers/video/sunxi/lcd_fb/panels/kld39501.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Copyright (c) 2007-2019 Allwinnertech Co., Ltd.
@@ -54,10 +54,6 @@ static void LCD_panel_init(u32 sel);
 static void LCD_panel_exit(u32 sel);
 #define RESET(s, v) sunxi_lcd_gpio_set_value(s, 0, v)
 
-
-static struct disp_panel_para info[LCD_FB_MAX];
-
-
 static void address(unsigned int sel, int x, int y, int width, int height)
 {
 	sunxi_lcd_cmd_write(sel, 0x2B); /* Set row address */
@@ -72,18 +68,17 @@ static void address(unsigned int sel, int x, int y, int width, int height)
 	sunxi_lcd_para_write(sel, width & 0xff);
 }
 
-
 void LCD_panel_init(unsigned int sel)
 {
 	unsigned int rotate;
+	struct sunxi_lcd_fb_disp_panel_para info;
+	memset(&info, 0, sizeof(info));
 
-
-	if (bsp_disp_get_panel_info(sel, &info[sel])) {
-		lcd_fb_wrn("get panel info fail!\n");
+	if (sunxi_lcd_fb_bsp_disp_get_panel_info(sel, &info)) {
+		LCDFB_WRN("get panel info fail!\n");
 		return;
 	}
 
-
 	sunxi_lcd_cmd_write(sel, 0xf0); /* sunxi_lcd_cmd_write Set Control */
 	sunxi_lcd_para_write(sel, 0xc3);
 	sunxi_lcd_cmd_write(sel, 0xf0); /* */
@@ -93,10 +88,11 @@ void LCD_panel_init(unsigned int sel)
 	sunxi_lcd_para_write(sel, 0x00);
 	sunxi_lcd_para_write(sel, 0x00);
 
-	sunxi_lcd_cmd_write(sel, 0x36); /* Memory sunxi_lcd_para_write Access Control */
+	sunxi_lcd_cmd_write(
+		sel, 0x36); /* Memory sunxi_lcd_para_write Access Control */
 
 	/* MY MX MV ML RGB MH 0 0 */
-	if (info[sel].lcd_x > info[sel].lcd_y)
+	if (info.lcd_x > info.lcd_y)
 		rotate = 0x20;
 	else
 		rotate = 0x40;
@@ -117,28 +113,33 @@ void LCD_panel_init(unsigned int sel)
 
 	sunxi_lcd_cmd_write(sel, 0x3A); /* Interface Pixel Format */
 	/* 55----RGB565;66---RGB666 */
-	if (info[sel].lcd_pixel_fmt == LCDFB_FORMAT_RGB_565 ||
-	    info[sel].lcd_pixel_fmt == LCDFB_FORMAT_BGR_565) {
+	if (info.lcd_pixel_fmt == LCDFB_FORMAT_RGB_565 ||
+	    info.lcd_pixel_fmt == LCDFB_FORMAT_BGR_565) {
 		sunxi_lcd_para_write(sel, 0x55);
-		sunxi_lcd_cmd_write(sel, 0x36); /* Memory sunxi_lcd_para_write Access Control */
-		if (info[sel].lcd_pixel_fmt == LCDFB_FORMAT_RGB_565)
+		sunxi_lcd_cmd_write(
+			sel,
+			0x36); /* Memory sunxi_lcd_para_write Access Control */
+		if (info.lcd_pixel_fmt == LCDFB_FORMAT_RGB_565)
 			sunxi_lcd_para_write(sel, rotate | 0x08);
 		else
 			sunxi_lcd_para_write(sel, rotate & 0xf7);
-	} else if (info[sel].lcd_pixel_fmt == LCDFB_FORMAT_ARGB_8888) {
+	} else if (info.lcd_pixel_fmt == LCDFB_FORMAT_ARGB_8888) {
 		sunxi_lcd_para_write(sel, 0x77);
-		sunxi_lcd_cmd_write(sel, 0x36); /* Memory sunxi_lcd_para_write Access Control */
+		sunxi_lcd_cmd_write(
+			sel,
+			0x36); /* Memory sunxi_lcd_para_write Access Control */
 		sunxi_lcd_para_write(sel, rotate | 0x08);
 	} else
 		sunxi_lcd_para_write(sel, 0x66);
 
 	sunxi_lcd_cmd_write(sel, 0xB4); /* Display Inversion Control */
-	sunxi_lcd_para_write(sel, 0x01);  /* 1-dot */
+	sunxi_lcd_para_write(sel, 0x01); /* 1-dot */
 
 	sunxi_lcd_cmd_write(sel, 0xB7); /* Entry Mode Set */
-	sunxi_lcd_para_write(sel, 0x46);  /* c6 */
+	sunxi_lcd_para_write(sel, 0x46); /* c6 */
 
-	sunxi_lcd_cmd_write(sel, 0xe6); /* Fixed SPI 50MHz and 60MHz LCD display problems */
+	sunxi_lcd_cmd_write(
+		sel, 0xe6); /* Fixed SPI 50MHz and 60MHz LCD display problems */
 	sunxi_lcd_para_write(sel, 0xff);
 	sunxi_lcd_para_write(sel, 0xc2);
 
@@ -193,16 +194,14 @@ void LCD_panel_init(unsigned int sel)
 	sunxi_lcd_para_write(sel, 0x20);
 	sunxi_lcd_para_write(sel, 0x23);
 
-
-	if (info[sel].lcd_if == LCD_FB_IF_DBI &&
-	    info[sel].dbi_if == LCD_FB_D2LI) {
+	if (info.lcd_if == LCD_FB_IF_DBI && info.dbi_if == LCD_FB_D2LI) {
 		/* two data lane */
 		sunxi_lcd_cmd_write(sel, 0xB9);
 		sunxi_lcd_para_write(sel, 0x00);
 		sunxi_lcd_para_write(sel, 0x01);
 	}
 
-	address(sel, 0, 0, info[sel].lcd_x - 1, info[sel].lcd_y - 1);
+	address(sel, 0, 0, info.lcd_x - 1, info.lcd_y - 1);
 	sunxi_lcd_cmd_write(sel, 0xf0);
 	sunxi_lcd_para_write(sel, 0x3c);
 	sunxi_lcd_cmd_write(sel, 0xf0);
@@ -212,7 +211,6 @@ void LCD_panel_init(unsigned int sel)
 	sunxi_lcd_delay_ms(120);
 	sunxi_lcd_cmd_write(sel, 0x29); /* Display ON */
 	sunxi_lcd_cmd_write(sel, 0x2c); /* Display ON */
-
 }
 
 void LCD_panel_exit(unsigned int sel)
@@ -226,7 +224,6 @@ void LCD_panel_exit(unsigned int sel)
 	sunxi_lcd_delay_ms(10);
 
 	sunxi_lcd_pin_cfg(sel, 0);
-
 }
 
 int lcd_blank(unsigned int sel, unsigned int en)
@@ -238,16 +235,15 @@ int lcd_blank(unsigned int sel, unsigned int en)
 	return 0;
 }
 
-
 static s32 LCD_open_flow(u32 sel)
 {
-	lcd_fb_here;
+	LCDFB_HERE;
 	/* open lcd power, and delay 50ms */
 	LCD_OPEN_FUNC(sel, LCD_power_on, 50);
 	/* open lcd power, than delay 200ms */
 	LCD_OPEN_FUNC(sel, LCD_panel_init, 50);
 	/* open lcd power, than delay 200ms */
-	LCD_OPEN_FUNC(sel, lcd_fb_black_screen, 20);
+	LCD_OPEN_FUNC(sel, sunxi_lcd_fb_black_screen, 20);
 	/* open lcd backlight, and delay 0ms */
 	LCD_OPEN_FUNC(sel, LCD_bl_open, 0);
 
@@ -256,7 +252,7 @@ static s32 LCD_open_flow(u32 sel)
 
 static s32 LCD_close_flow(u32 sel)
 {
-	lcd_fb_here;
+	LCDFB_HERE;
 	/* close lcd backlight, and delay 0ms */
 	LCD_CLOSE_FUNC(sel, LCD_bl_close, 50);
 	/* open lcd power, than delay 200ms */
@@ -270,9 +266,9 @@ static s32 LCD_close_flow(u32 sel)
 static void LCD_power_on(u32 sel)
 {
 	/* config lcd_power pin to open lcd power0 */
-	lcd_fb_here;
+	LCDFB_HERE;
 	sunxi_lcd_power_enable(sel, 0);
-	lcd_fb_here;
+	LCDFB_HERE;
 
 	sunxi_lcd_pin_cfg(sel, 1);
 	RESET(sel, 1);
@@ -284,7 +280,7 @@ static void LCD_power_on(u32 sel)
 
 static void LCD_power_off(u32 sel)
 {
-	lcd_fb_here;
+	LCDFB_HERE;
 	/* config lcd_power pin to close lcd power0 */
 	sunxi_lcd_power_disable(sel, 0);
 }
@@ -294,7 +290,7 @@ static void LCD_bl_open(u32 sel)
 	sunxi_lcd_pwm_enable(sel);
 	/* config lcd_bl_en pin to open lcd backlight */
 	sunxi_lcd_backlight_enable(sel);
-	lcd_fb_here;
+	LCDFB_HERE;
 }
 
 static void LCD_bl_close(u32 sel)
@@ -302,16 +298,16 @@ static void LCD_bl_close(u32 sel)
 	/* config lcd_bl_en pin to close lcd backlight */
 	sunxi_lcd_backlight_disable(sel);
 	sunxi_lcd_pwm_disable(sel);
-	lcd_fb_here;
+	LCDFB_HERE;
 }
 
-
 static int lcd_set_var(unsigned int sel, struct fb_info *p_info)
 {
 	return 0;
 }
 
-static int lcd_set_addr_win(unsigned int sel, int x, int y, int width, int height)
+static int lcd_set_addr_win(unsigned int sel, int x, int y, int width,
+			    int height)
 {
 	address(sel, x, y, width, height);
 	return 0;
@@ -326,5 +322,5 @@ struct __lcd_panel kld39501_panel = {
 		.blank = lcd_blank,
 		.set_var = lcd_set_var,
 		.set_addr_win = lcd_set_addr_win,
-		},
+	},
 };
diff --git a/drivers/video/sunxi/lcd_fb/panels/kld39501.h b/drivers/video/sunxi/lcd_fb/panels/kld39501.h
index df1d4feca..566b81b1c 100644
--- a/drivers/video/sunxi/lcd_fb/panels/kld39501.h
+++ b/drivers/video/sunxi/lcd_fb/panels/kld39501.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Copyright (c) 2007-2019 Allwinnertech Co., Ltd.
diff --git a/drivers/video/sunxi/lcd_fb/panels/lcd_source.c b/drivers/video/sunxi/lcd_fb/panels/lcd_source.c
deleted file mode 100644
index 597fa5805..000000000
--- a/drivers/video/sunxi/lcd_fb/panels/lcd_source.c
+++ /dev/null
@@ -1,204 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
-/*
- * Allwinner SoCs display driver.
- *
- * Copyright (C) 2016 Allwinner.
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#include "lcd_source.h"
-
-/**
- * sunxi_lcd_delay_ms.
- * @ms: Delay time, unit: millisecond.
- */
-s32 sunxi_lcd_delay_ms(u32 ms)
-{
-	return g_lcd_drv.src_ops.sunxi_lcd_delay_ms(ms);
-
-	return -1;
-}
-
-/**
- * sunxi_lcd_delay_us.
- * @us: Delay time, unit: microsecond.
- */
-s32 sunxi_lcd_delay_us(u32 us)
-{
-	return g_lcd_drv.src_ops.sunxi_lcd_delay_us(us);
-
-	return -1;
-}
-
-
-/**
- * sunxi_lcd_backlight_enable - enable the backlight of panel.
- * @screen_id: The index of screen.
- */
-void sunxi_lcd_backlight_enable(u32 screen_id)
-{
-	if (g_lcd_drv.src_ops.sunxi_lcd_backlight_enable)
-		g_lcd_drv.src_ops.sunxi_lcd_backlight_enable(screen_id);
-}
-
-/**
- * sunxi_lcd_backlight_disable - disable the backlight of panel.
- * @screen_id: The index of screen.
- */
-void sunxi_lcd_backlight_disable(u32 screen_id)
-{
-	if (g_lcd_drv.src_ops.sunxi_lcd_backlight_disable)
-		g_lcd_drv.src_ops.sunxi_lcd_backlight_disable(screen_id);
-}
-
-/**
- * sunxi_lcd_power_enable - enable the power of panel.
- * @screen_id: The index of screen.
- * @pwr_id:     The index of power
- */
-void sunxi_lcd_power_enable(u32 screen_id, u32 pwr_id)
-{
-	if (g_lcd_drv.src_ops.sunxi_lcd_power_enable)
-		g_lcd_drv.src_ops.sunxi_lcd_power_enable(screen_id, pwr_id);
-}
-
-/**
- * sunxi_lcd_power_disable - disable the power of panel.
- * @screen_id: The index of screen.
- * @pwr_id:     The index of power
- */
-void sunxi_lcd_power_disable(u32 screen_id, u32 pwr_id)
-{
-	if (g_lcd_drv.src_ops.sunxi_lcd_power_disable)
-		g_lcd_drv.src_ops.sunxi_lcd_power_disable(screen_id, pwr_id);
-}
-
-/**
- * sunxi_lcd_pwm_enable - enable pwm modules, start output pwm wave.
- * @screen_id: The index of screen.
- *
- * need to conifg gpio for pwm function
- */
-s32 sunxi_lcd_pwm_enable(u32 screen_id)
-{
-	if (g_lcd_drv.src_ops.sunxi_lcd_pwm_enable)
-		return g_lcd_drv.src_ops.sunxi_lcd_pwm_enable(screen_id);
-
-	return -1;
-}
-
-/**
- * sunxi_lcd_pwm_disable - disable pwm modules, stop output pwm wave.
- * @screen_id: The index of screen.
- */
-s32 sunxi_lcd_pwm_disable(u32 screen_id)
-{
-	if (g_lcd_drv.src_ops.sunxi_lcd_pwm_disable)
-		return g_lcd_drv.src_ops.sunxi_lcd_pwm_disable(screen_id);
-
-	return -1;
-}
-
-
-/**
- * sunxi_lcd_set_panel_funs -  set panel functions.
- * @name: The panel driver name.
- * @lcd_cfg: The functions.
- */
-s32 sunxi_lcd_set_panel_funs(char *name, struct disp_lcd_panel_fun *lcd_cfg)
-{
-	if (g_lcd_drv.src_ops.sunxi_lcd_set_panel_funs)
-		return g_lcd_drv.src_ops.sunxi_lcd_set_panel_funs(name,
-								  lcd_cfg);
-
-	return -1;
-}
-
-/**
- * sunxi_lcd_pin_cfg - config pin panel used
- * @screen_id: The index of screen.
- * @bon:     1: config pin according to sys_config, 0: set disable state
- */
-s32 sunxi_lcd_pin_cfg(u32 screen_id, u32 bon)
-{
-	if (g_lcd_drv.src_ops.sunxi_lcd_pin_cfg)
-		return g_lcd_drv.src_ops.sunxi_lcd_pin_cfg(screen_id, bon);
-
-	return -1;
-}
-
-/**
- * sunxi_lcd_gpio_set_value
- * @screen_id: The index of screen.
- * @io_index:  the index of gpio
- * @value: value of gpio to be set
- */
-s32 sunxi_lcd_gpio_set_value(u32 screen_id, u32 io_index, u32 value)
-{
-	if (g_lcd_drv.src_ops.sunxi_lcd_gpio_set_value)
-		return g_lcd_drv.src_ops.sunxi_lcd_gpio_set_value(screen_id,
-								  io_index,
-								  value);
-
-	return -1;
-}
-
-/**
- * sunxi_lcd_gpio_set_direction
- * @screen_id: The index of screen.
- * @io_index:  the index of gpio
- * @direct: value of gpio to be set
- */
-s32 sunxi_lcd_gpio_set_direction(u32 screen_id, u32 io_index, u32 direct)
-{
-	if (g_lcd_drv.src_ops.sunxi_lcd_gpio_set_direction)
-		return g_lcd_drv.src_ops.sunxi_lcd_gpio_set_direction(screen_id,
-								      io_index,
-								      direct);
-
-	return -1;
-}
-
-/**
- * sunxi_lcd_cmd_write
- * @screen_id: The index of screen.
- * @cmd:  command to be send
- */
-s32 sunxi_lcd_cmd_write(u32 screen_id, u8 cmd)
-{
-	if (g_lcd_drv.src_ops.sunxi_lcd_cmd_write)
-		return g_lcd_drv.src_ops.sunxi_lcd_cmd_write(screen_id, cmd);
-
-	return -1;
-}
-
-/**
- * sunxi_lcd_para_write
- * @screen_id: The index of screen.
- * @para:  para to be writed
- */
-s32 sunxi_lcd_para_write(u32 screen_id, u8 para)
-{
-	if (g_lcd_drv.src_ops.sunxi_lcd_para_write)
-		return g_lcd_drv.src_ops.sunxi_lcd_para_write(screen_id, para);
-
-	return -1;
-}
-
-/**
- * sunxi_lcd_para_write
- * @screen_id: The index of screen.
- * @cmd:  command to be read
- * @len:  length of bytes to be read
- */
-s32 sunxi_lcd_cmd_read(u32 screen_id, u8 cmd, u8 *rx_buf, u8 len)
-{
-	if (g_lcd_drv.src_ops.sunxi_lcd_cmd_read)
-		return g_lcd_drv.src_ops.sunxi_lcd_cmd_read(screen_id, cmd, rx_buf, len);
-
-	return -1;
-}
diff --git a/drivers/video/sunxi/lcd_fb/panels/lcd_source.h b/drivers/video/sunxi/lcd_fb/panels/lcd_source.h
index b5e6d91e5..9c4995689 100644
--- a/drivers/video/sunxi/lcd_fb/panels/lcd_source.h
+++ b/drivers/video/sunxi/lcd_fb/panels/lcd_source.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Allwinner SoCs display driver.
@@ -9,115 +9,286 @@
  * License version 2.  This program is licensed "as is" without any
  * warranty of any kind, whether express or implied.
  */
+#ifndef _LCD_SOURCE_H_
+#define _LCD_SOURCE_H_
 
 #include "panels.h"
 
-extern struct sunxi_lcd_drv g_lcd_drv;
+struct sunxi_lcd_drv {
+	struct sunxi_lcd_fb_disp_source_ops src_ops;
+};
+
+extern struct sunxi_lcd_drv g_lcd_fb_drv;
 
 /**
  * sunxi_lcd_delay_ms.
  * @ms: Delay time, unit: millisecond.
  */
-s32 sunxi_lcd_delay_ms(u32 ms);
+static inline s32 sunxi_lcd_panel_delay_ms(u32 ms)
+{
+	return g_lcd_fb_drv.src_ops.sunxi_lcd_fb_delay_ms_ops(ms);
+
+	return -1;
+}
 
 /**
- * sunxi_lcd_delay_us.
- * @us: Delay time, unit: microsecond.
- */
-s32 sunxi_lcd_delay_us(u32 us);
+  * sunxi_lcd_delay_us.
+  * @us: Delay time, unit: microsecond.
+  */
+static inline s32 sunxi_lcd_panel_delay_us(u32 us)
+{
+	return g_lcd_fb_drv.src_ops.sunxi_lcd_fb_delay_us_ops(us);
 
+	return -1;
+}
 
 /**
- * sunxi_lcd_backlight_enable - enable the backlight of panel.
- * @screen_id: The index of screen.
- */
-void sunxi_lcd_backlight_enable(u32 screen_id);
+  * sunxi_lcd_backlight_enable - enable the backlight of panel.
+  * @screen_id: The index of screen.
+  */
+static inline void sunxi_lcd_panel_backlight_enable(u32 screen_id)
+{
+	if (g_lcd_fb_drv.src_ops.sunxi_lcd_fb_backlight_enable_ops)
+		g_lcd_fb_drv.src_ops.sunxi_lcd_fb_backlight_enable_ops(
+			screen_id);
+}
 
 /**
- * sunxi_lcd_backlight_disable - disable the backlight of panel.
- * @screen_id: The index of screen.
- */
-void sunxi_lcd_backlight_disable(u32 screen_id);
+  * sunxi_lcd_backlight_disable - disable the backlight of panel.
+  * @screen_id: The index of screen.
+  */
+static inline void sunxi_lcd_panel_backlight_disable(u32 screen_id)
+{
+	if (g_lcd_fb_drv.src_ops.sunxi_lcd_fb_backlight_disable_ops)
+		g_lcd_fb_drv.src_ops.sunxi_lcd_fb_backlight_disable_ops(
+			screen_id);
+}
 
 /**
- * sunxi_lcd_power_enable - enable the power of panel.
- * @screen_id: The index of screen.
- * @pwr_id:     The index of power
- */
-void sunxi_lcd_power_enable(u32 screen_id, u32 pwr_id);
+  * sunxi_lcd_power_enable - enable the power of panel.
+  * @screen_id: The index of screen.
+  * @pwr_id:     The index of power
+  */
+static inline void sunxi_lcd_panel_power_enable(u32 screen_id, u32 pwr_id)
+{
+	if (g_lcd_fb_drv.src_ops.sunxi_lcd_fb_power_enable_ops)
+		g_lcd_fb_drv.src_ops.sunxi_lcd_fb_power_enable_ops(screen_id,
+								   pwr_id);
+}
 
 /**
- * sunxi_lcd_power_disable - disable the power of panel.
- * @screen_id: The index of screen.
- * @pwr_id:     The index of power
- */
-void sunxi_lcd_power_disable(u32 screen_id, u32 pwr_id);
+  * sunxi_lcd_power_disable - disable the power of panel.
+  * @screen_id: The index of screen.
+  * @pwr_id:     The index of power
+  */
+static inline void sunxi_lcd_panel_power_disable(u32 screen_id, u32 pwr_id)
+{
+	if (g_lcd_fb_drv.src_ops.sunxi_lcd_fb_power_disable_ops)
+		g_lcd_fb_drv.src_ops.sunxi_lcd_fb_power_disable_ops(screen_id,
+								    pwr_id);
+}
 
 /**
- * sunxi_pwm_enable - enable pwm modules, start output pwm wave.
- * @pwm_channel: The index of pwm channel.
- *
- * need to conifg gpio for pwm function
- */
-s32 sunxi_lcd_pwm_enable(u32 pwm_channel);
+  * sunxi_lcd_pwm_enable - enable pwm modules, start output pwm wave.
+  * @screen_id: The index of screen.
+  *
+  * need to conifg gpio for pwm function
+  */
+static inline s32 sunxi_lcd_panel_pwm_enable(u32 screen_id)
+{
+	if (g_lcd_fb_drv.src_ops.sunxi_lcd_fb_pwm_enable_ops)
+		return g_lcd_fb_drv.src_ops.sunxi_lcd_fb_pwm_enable_ops(
+			screen_id);
 
-/**
- * sunxi_pwm_disable - disable pwm modules, stop output pwm wave.
- * @pwm_channel: The index of pwm channel.
- */
-s32 sunxi_lcd_pwm_disable(u32 pwm_channel);
+	return -1;
+}
 
+/**
+  * sunxi_lcd_pwm_disable - disable pwm modules, stop output pwm wave.
+  * @screen_id: The index of screen.
+  */
+static inline s32 sunxi_lcd_panel_pwm_disable(u32 screen_id)
+{
+	if (g_lcd_fb_drv.src_ops.sunxi_lcd_fb_pwm_disable_ops)
+		return g_lcd_fb_drv.src_ops.sunxi_lcd_fb_pwm_disable_ops(
+			screen_id);
 
+	return -1;
+}
 
 /**
- * sunxi_lcd_pin_cfg - config pin panel used
- * @screen_id: The index of screen.
- * @bon:     1: config pin according to sys_config, 0: set disable state
- */
-s32 sunxi_lcd_pin_cfg(u32 screen_id, u32 bon);
+  * sunxi_lcd_set_panel_funs -  set panel functions.
+  * @name: The panel driver name.
+  * @lcd_cfg: The functions.
+  */
+static inline s32
+sunxi_lcd_panel_set_panel_funs(char *name,
+			       struct sunxi_lcd_fb_disp_lcd_panel_fun *lcd_cfg)
+{
+	if (g_lcd_fb_drv.src_ops.sunxi_lcd_fb_set_panel_funs_ops)
+		return g_lcd_fb_drv.src_ops.sunxi_lcd_fb_set_panel_funs_ops(
+			name, lcd_cfg);
+
+	return -1;
+}
 
 /**
- * sunxi_lcd_set_panel_funs -  set panel functions.
- * @name: The panel driver name.
- * @lcd_cfg: The functions.
- */
-s32 sunxi_lcd_set_panel_funs(char *name, struct disp_lcd_panel_fun *lcd_cfg);
+  * sunxi_lcd_pin_cfg - config pin panel used
+  * @screen_id: The index of screen.
+  * @bon:     1: config pin according to sys_config, 0: set disable state
+  */
+static inline s32 sunxi_lcd_panel_pin_cfg(u32 screen_id, u32 bon)
+{
+	if (g_lcd_fb_drv.src_ops.sunxi_lcd_fb_pin_cfg_ops)
+		return g_lcd_fb_drv.src_ops.sunxi_lcd_fb_pin_cfg_ops(screen_id,
+								     bon);
+
+	return -1;
+}
 
 /**
- * sunxi_lcd_gpio_set_value
- * @screen_id: The index of screen.
- * @io_index:  the index of gpio
- * @value: value of gpio to be set
- */
-s32 sunxi_lcd_gpio_set_value(u32 screen_id, u32 io_index, u32 value);
+  * sunxi_lcd_gpio_set_value
+  * @screen_id: The index of screen.
+  * @io_index:  the index of gpio
+  * @value: value of gpio to be set
+  */
+static inline s32 sunxi_lcd_panel_gpio_set_value(u32 screen_id, u32 io_index,
+						 u32 value)
+{
+	if (g_lcd_fb_drv.src_ops.sunxi_lcd_fb_gpio_set_value_ops)
+		return g_lcd_fb_drv.src_ops.sunxi_lcd_fb_gpio_set_value_ops(
+			screen_id, io_index, value);
+
+	return -1;
+}
 
 /**
- * sunxi_lcd_gpio_set_direction
- * @screen_id: The index of screen.
- * @io_index:  the index of gpio
- * @direction: value of gpio to be set
- */
-s32 sunxi_lcd_gpio_set_direction(u32 screen_id, u32 io_index, u32 direction);
+  * sunxi_lcd_gpio_set_direction
+  * @screen_id: The index of screen.
+  * @io_index:  the index of gpio
+  * @direct: value of gpio to be set
+  */
+static inline s32 sunxi_lcd_panel_gpio_set_direction(u32 screen_id,
+						     u32 io_index, u32 direct)
+{
+	if (g_lcd_fb_drv.src_ops.sunxi_lcd_fb_gpio_set_direction_ops)
+		return g_lcd_fb_drv.src_ops.sunxi_lcd_fb_gpio_set_direction_ops(
+			screen_id, io_index, direct);
+
+	return -1;
+}
 
 /**
- * sunxi_lcd_cmd_write
- * @screen_id: The index of screen.
- * @cmd:  command to be send
- */
-s32 sunxi_lcd_cmd_write(u32 screen_id, u8 cmd);
+  * sunxi_lcd_cmd_write
+  * @screen_id: The index of screen.
+  * @cmd:  command to be send
+  */
+static inline s32 sunxi_lcd_panel_cmd_write(u32 screen_id, u8 cmd)
+{
+	if (g_lcd_fb_drv.src_ops.sunxi_lcd_fb_cmd_write_ops)
+		return g_lcd_fb_drv.src_ops.sunxi_lcd_fb_cmd_write_ops(
+			screen_id, cmd);
+
+	return -1;
+}
 
 /**
- * sunxi_lcd_para_write
- * @screen_id: The index of screen.
- * @cmd:  command to be send
- */
-s32 sunxi_lcd_para_write(u32 screen_id, u8 para);
+  * sunxi_lcd_para_write
+  * @screen_id: The index of screen.
+  * @para:  para to be writed
+  */
+static inline s32 sunxi_lcd_panel_para_write(u32 screen_id, u8 para)
+{
+	if (g_lcd_fb_drv.src_ops.sunxi_lcd_fb_para_write_ops)
+		return g_lcd_fb_drv.src_ops.sunxi_lcd_fb_para_write_ops(
+			screen_id, para);
+
+	return -1;
+}
 
 /**
- * sunxi_lcd_para_write
- * @screen_id: The index of screen.
- * @cmd:  command to be send
- */
-s32 sunxi_lcd_cmd_read(u32 screen_id, u8 cmd, u8 *rx_buf, u8 len);
+  * sunxi_lcd_para_write
+  * @screen_id: The index of screen.
+  * @cmd:  command to be read
+  * @len:  length of bytes to be read
+  */
+static inline s32 sunxi_lcd_panel_cmd_read(u32 screen_id, u8 cmd, u8 *rx_buf,
+					   u8 len)
+{
+	if (g_lcd_fb_drv.src_ops.sunxi_lcd_fb_cmd_read_ops)
+		return g_lcd_fb_drv.src_ops.sunxi_lcd_fb_cmd_read_ops(
+			screen_id, cmd, rx_buf, len);
+
+	return -1;
+}
+
+/* For back port to old Panel Driver */
+#ifndef sunxi_lcd_delay_ms
+#define sunxi_lcd_delay_ms sunxi_lcd_panel_delay_ms
+#endif
+
+#ifndef sunxi_lcd_delay_us
+#define sunxi_lcd_delay_us sunxi_lcd_panel_delay_us
+#endif
+
+#ifndef sunxi_lcd_backlight_enable
+#define sunxi_lcd_backlight_enable sunxi_lcd_panel_backlight_enable
+#endif
+
+#ifndef sunxi_lcd_backlight_disable
+#define sunxi_lcd_backlight_disable sunxi_lcd_panel_backlight_disable
+#endif
+
+#ifndef sunxi_lcd_power_enable
+#define sunxi_lcd_power_enable sunxi_lcd_panel_power_enable
+#endif
+
+#ifndef sunxi_lcd_power_disable
+#define sunxi_lcd_power_disable sunxi_lcd_panel_power_disable
+#endif
+
+#ifndef sunxi_lcd_pwm_enable
+#define sunxi_lcd_pwm_enable sunxi_lcd_panel_pwm_enable
+#endif
+
+#ifndef sunxi_lcd_pwm_disable
+#define sunxi_lcd_pwm_disable sunxi_lcd_panel_pwm_disable
+#endif
+
+#ifndef sunxi_lcd_set_panel_funs
+#define sunxi_lcd_set_panel_funs sunxi_lcd_panel_set_panel_funs
+#endif
+
+#ifndef sunxi_lcd_pin_cfg
+#define sunxi_lcd_pin_cfg sunxi_lcd_panel_pin_cfg
+#endif
+
+#ifndef sunxi_lcd_gpio_set_value
+#define sunxi_lcd_gpio_set_value sunxi_lcd_panel_gpio_set_value
+#endif
+
+#ifndef sunxi_lcd_gpio_set_direction
+#define sunxi_lcd_gpio_set_direction sunxi_lcd_panel_gpio_set_direction
+#endif
+
+#ifndef sunxi_lcd_cmd_write
+#define sunxi_lcd_cmd_write sunxi_lcd_panel_cmd_write
+#endif
+
+#ifndef sunxi_lcd_para_write
+#define sunxi_lcd_para_write sunxi_lcd_panel_para_write
+#endif
+
+#ifndef sunxi_lcd_cmd_read
+#define sunxi_lcd_cmd_read sunxi_lcd_panel_cmd_read
+#endif
+
+#ifndef LCD_OPEN_FUNC
+#define LCD_OPEN_FUNC LCD_FB_OPEN_FUNC
+#endif
+
+#ifndef LCD_CLOSE_FUNC
+#define LCD_CLOSE_FUNC LCD_FB_CLOSE_FUNC
+#endif
 
-extern struct sunxi_lcd_drv g_lcd_drv;
+#endif /* _LCD_SOURCE_H_ */
diff --git a/drivers/video/sunxi/lcd_fb/panels/nv3029s.c b/drivers/video/sunxi/lcd_fb/panels/nv3029s.c
index ba5707ab7..8e77bacea 100644
--- a/drivers/video/sunxi/lcd_fb/panels/nv3029s.c
+++ b/drivers/video/sunxi/lcd_fb/panels/nv3029s.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Copyright (c) 2007-2019 Allwinnertech Co., Ltd.
@@ -58,8 +58,6 @@ static void LCD_panel_exit(u32 sel);
 #define RESET(s, v) sunxi_lcd_gpio_set_value(s, 0, v)
 #define power_en(sel, val) sunxi_lcd_gpio_set_value(sel, 0, val)
 
-static struct disp_panel_para info[LCD_FB_MAX];
-
 static void address(unsigned int sel, int x, int y, int width, int height)
 {
 	sunxi_lcd_cmd_write(sel, 0x2B); /* Set row address */
@@ -77,10 +75,11 @@ static void address(unsigned int sel, int x, int y, int width, int height)
 static void LCD_panel_init(unsigned int sel)
 {
 	unsigned int rotate;
+	struct sunxi_lcd_fb_disp_panel_para info;
+	memset(&info, 0, sizeof(info));
 
-
-	if (bsp_disp_get_panel_info(sel, &info[sel])) {
-		lcd_fb_wrn("get panel info fail!\n");
+	if (sunxi_lcd_fb_bsp_disp_get_panel_info(sel, &info)) {
+		LCDFB_WRN("get panel info fail!\n");
 		return;
 	}
 
@@ -141,13 +140,13 @@ static void LCD_panel_init(unsigned int sel)
 
 	/* NV3029S GAMMA */
 	sunxi_lcd_cmd_write(sel, 0xe0); /* gmama set 2.2 */
-	sunxi_lcd_para_write(sel, 0x10);  /* PKP0[4:0]V3 */
-	sunxi_lcd_para_write(sel, 0x17);  /* PKP1[4:0]V4 */
-	sunxi_lcd_para_write(sel, 0x09);  /* PKP2[4:0]V10 */
-	sunxi_lcd_para_write(sel, 0x1a);  /* PKP3[4:0]V21 */
-	sunxi_lcd_para_write(sel, 0x05);  /* PKP4[4:0]V27 */
-	sunxi_lcd_para_write(sel, 0x0E);  /* PKP5[4:0]V28 */
-	sunxi_lcd_para_write(sel, 0x15);  /* PKP6[4:0]V15 */
+	sunxi_lcd_para_write(sel, 0x10); /* PKP0[4:0]V3 */
+	sunxi_lcd_para_write(sel, 0x17); /* PKP1[4:0]V4 */
+	sunxi_lcd_para_write(sel, 0x09); /* PKP2[4:0]V10 */
+	sunxi_lcd_para_write(sel, 0x1a); /* PKP3[4:0]V21 */
+	sunxi_lcd_para_write(sel, 0x05); /* PKP4[4:0]V27 */
+	sunxi_lcd_para_write(sel, 0x0E); /* PKP5[4:0]V28 */
+	sunxi_lcd_para_write(sel, 0x15); /* PKP6[4:0]V15 */
 	sunxi_lcd_cmd_write(sel, 0xe3);
 	sunxi_lcd_para_write(sel, 0x09); /* PKN0[4:0]V3 */
 	sunxi_lcd_para_write(sel, 0x17); /* PKN1[4:0]V4 */
@@ -190,51 +189,49 @@ static void LCD_panel_init(unsigned int sel)
 	sunxi_lcd_cmd_write(sel, 0x35);
 	sunxi_lcd_para_write(sel, 0x00);
 
-
 	/* MY MX MV ML RGB MH 0 0 */
-	if (info[sel].lcd_x > info[sel].lcd_y)
+	if (info.lcd_x > info.lcd_y)
 		rotate = 0xa0;
 	else
 		rotate = 0xC0;
 
-
 	sunxi_lcd_cmd_write(sel, 0x3A); /* Interface Pixel Format */
 	/* 55----RGB565;66---RGB666 */
-	if (info[sel].lcd_pixel_fmt == LCDFB_FORMAT_RGB_565 ||
-	    info[sel].lcd_pixel_fmt == LCDFB_FORMAT_BGR_565) {
+	if (info.lcd_pixel_fmt == LCDFB_FORMAT_RGB_565 ||
+	    info.lcd_pixel_fmt == LCDFB_FORMAT_BGR_565) {
 		sunxi_lcd_para_write(sel, 0x65);
-		if (info[sel].lcd_pixel_fmt == LCDFB_FORMAT_RGB_565)
+		if (info.lcd_pixel_fmt == LCDFB_FORMAT_RGB_565)
 			rotate &= 0xf7;
 		else
 			rotate |= 0x08;
-	} else if (info[sel].lcd_pixel_fmt < LCDFB_FORMAT_RGB_888) {
+	} else if (info.lcd_pixel_fmt < LCDFB_FORMAT_RGB_888) {
 		sunxi_lcd_para_write(sel, 0x66);
-		if (info[sel].lcd_pixel_fmt == LCDFB_FORMAT_BGRA_8888 ||
-		    info[sel].lcd_pixel_fmt == LCDFB_FORMAT_BGRX_8888 ||
-		    info[sel].lcd_pixel_fmt == LCDFB_FORMAT_ABGR_8888 ||
-		    info[sel].lcd_pixel_fmt == LCDFB_FORMAT_XBGR_8888) {
+		if (info.lcd_pixel_fmt == LCDFB_FORMAT_BGRA_8888 ||
+		    info.lcd_pixel_fmt == LCDFB_FORMAT_BGRX_8888 ||
+		    info.lcd_pixel_fmt == LCDFB_FORMAT_ABGR_8888 ||
+		    info.lcd_pixel_fmt == LCDFB_FORMAT_XBGR_8888) {
 			rotate |= 0x08;
 		}
 	} else {
 		sunxi_lcd_para_write(sel, 0x66);
 	}
 
-	if (info[sel].lcd_if == LCD_FB_IF_SPI) {
+	if (info.lcd_if == LCD_FB_IF_SPI) {
 		sunxi_lcd_cmd_write(sel, 0xb0);
 		sunxi_lcd_para_write(sel, 0x03);
 		sunxi_lcd_para_write(sel, 0xc8); /* Little endian */
 	}
 
-	sunxi_lcd_cmd_write(sel, 0x36); /* Memory sunxi_lcd_para_write Access Control */
+	sunxi_lcd_cmd_write(
+		sel, 0x36); /* Memory sunxi_lcd_para_write Access Control */
 	sunxi_lcd_para_write(sel, rotate);
 
-	address(sel, 0, 0, info[sel].lcd_x - 1, info[sel].lcd_y - 1);
+	address(sel, 0, 0, info.lcd_x - 1, info.lcd_y - 1);
 
 	sunxi_lcd_cmd_write(sel, 0x11);
 	sunxi_lcd_delay_ms(120);
 	sunxi_lcd_cmd_write(sel, 0x29);
 	sunxi_lcd_cmd_write(sel, 0x2c); /* Display ON */
-
 }
 
 static void LCD_panel_exit(unsigned int sel)
@@ -248,7 +245,6 @@ static void LCD_panel_exit(unsigned int sel)
 	sunxi_lcd_delay_ms(10);
 
 	sunxi_lcd_pin_cfg(sel, 0);
-
 }
 
 static int lcd_blank(unsigned int sel, unsigned int en)
@@ -261,16 +257,15 @@ static int lcd_blank(unsigned int sel, unsigned int en)
 	return 0;
 }
 
-
 static s32 LCD_open_flow(u32 sel)
 {
-	lcd_fb_here;
+	LCDFB_HERE;
 	/* open lcd power, and delay 50ms */
 	LCD_OPEN_FUNC(sel, LCD_power_on, 50);
 	/* open lcd power, than delay 200ms */
 	LCD_OPEN_FUNC(sel, LCD_panel_init, 20);
 
-	LCD_OPEN_FUNC(sel, lcd_fb_black_screen, 50);
+	LCD_OPEN_FUNC(sel, sunxi_lcd_fb_black_screen, 50);
 	/* open lcd backlight, and delay 0ms */
 	LCD_OPEN_FUNC(sel, LCD_bl_open, 0);
 
@@ -279,7 +274,7 @@ static s32 LCD_open_flow(u32 sel)
 
 static s32 LCD_close_flow(u32 sel)
 {
-	lcd_fb_here;
+	LCDFB_HERE;
 	/* close lcd backlight, and delay 0ms */
 	LCD_CLOSE_FUNC(sel, LCD_bl_close, 50);
 	/* open lcd power, than delay 200ms */
@@ -293,7 +288,7 @@ static s32 LCD_close_flow(u32 sel)
 static void LCD_power_on(u32 sel)
 {
 	/* config lcd_power pin to open lcd power0 */
-	lcd_fb_here;
+	LCDFB_HERE;
 	power_en(sel, 1);
 
 	sunxi_lcd_power_enable(sel, 0);
@@ -308,7 +303,7 @@ static void LCD_power_on(u32 sel)
 
 static void LCD_power_off(u32 sel)
 {
-	lcd_fb_here;
+	LCDFB_HERE;
 	/* config lcd_power pin to close lcd power0 */
 	sunxi_lcd_power_disable(sel, 0);
 	power_en(sel, 0);
@@ -319,7 +314,7 @@ static void LCD_bl_open(u32 sel)
 	sunxi_lcd_pwm_enable(sel);
 	/* config lcd_bl_en pin to open lcd backlight */
 	sunxi_lcd_backlight_enable(sel);
-	lcd_fb_here;
+	LCDFB_HERE;
 }
 
 static void LCD_bl_close(u32 sel)
@@ -327,14 +322,13 @@ static void LCD_bl_close(u32 sel)
 	/* config lcd_bl_en pin to close lcd backlight */
 	sunxi_lcd_backlight_disable(sel);
 	sunxi_lcd_pwm_disable(sel);
-	lcd_fb_here;
+	LCDFB_HERE;
 }
 
-
 /* sel: 0:lcd0; 1:lcd1 */
 static s32 LCD_user_defined_func(u32 sel, u32 para1, u32 para2, u32 para3)
 {
-	lcd_fb_here;
+	LCDFB_HERE;
 	return 0;
 }
 
@@ -343,7 +337,8 @@ static int lcd_set_var(unsigned int sel, struct fb_info *p_info)
 	return 0;
 }
 
-static int lcd_set_addr_win(unsigned int sel, int x, int y, int width, int height)
+static int lcd_set_addr_win(unsigned int sel, int x, int y, int width,
+			    int height)
 {
 	address(sel, x, y, width, height);
 	sunxi_lcd_cmd_write(sel, 0x2c);
@@ -360,5 +355,5 @@ struct __lcd_panel nv3029s_panel = {
 		.blank = lcd_blank,
 		.set_var = lcd_set_var,
 		.set_addr_win = lcd_set_addr_win,
-		},
+	},
 };
diff --git a/drivers/video/sunxi/lcd_fb/panels/nv3029s.h b/drivers/video/sunxi/lcd_fb/panels/nv3029s.h
index 6214cf4c8..428f00418 100644
--- a/drivers/video/sunxi/lcd_fb/panels/nv3029s.h
+++ b/drivers/video/sunxi/lcd_fb/panels/nv3029s.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Copyright (c) 2007-2019 Allwinnertech Co., Ltd.
diff --git a/drivers/video/sunxi/lcd_fb/panels/panels.c b/drivers/video/sunxi/lcd_fb/panels/panels.c
index 36e84ed22..03f7da0a4 100644
--- a/drivers/video/sunxi/lcd_fb/panels/panels.c
+++ b/drivers/video/sunxi/lcd_fb/panels/panels.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Allwinner SoCs display driver.
@@ -12,39 +12,32 @@
 
 #include "panels.h"
 
-struct sunxi_lcd_drv g_lcd_drv;
+struct sunxi_lcd_drv g_lcd_fb_drv;
 
-struct __lcd_panel *panel_array[] = {
-#ifdef CONFIG_LCD_SUPPORT_KLD35512
+struct __lcd_panel *g_lcd_fb_panel_array[] = {
+#if IS_ENABLED(CONFIG_LCD_SUPPORT_KLD35512)
 	&kld35512_panel,
 #endif
-#ifdef CONFIG_LCD_SUPPORT_KLD39501
+#if IS_ENABLED(CONFIG_LCD_SUPPORT_KLD39501)
 	&kld39501_panel,
 #endif
-#ifdef CONFIG_LCD_SUPPORT_KLD2844B
+#if IS_ENABLED(CONFIG_LCD_SUPPORT_KLD2844B)
 	&kld2844b_panel,
 #endif
 
-#ifdef CONFIG_LCD_SUPPORT_NV3029S
+#if IS_ENABLED(CONFIG_LCD_SUPPORT_NV3029S)
 	&nv3029s_panel,
 #endif
 	NULL,
 };
 
-static void lcd_set_panel_funs(void)
+int sunxi_lcd_fb_lcd_panel_init(void)
 {
 	int i;
-
-	for (i = 0; panel_array[i] != NULL; i++) {
-		sunxi_lcd_set_panel_funs(panel_array[i]->name,
-					 &panel_array[i]->func);
+	sunxi_lcd_fb_disp_get_source_ops(&g_lcd_fb_drv.src_ops);
+	for (i = 0; g_lcd_fb_panel_array[i] != NULL; i++) {
+		sunxi_lcd_set_panel_funs(g_lcd_fb_panel_array[i]->name,
+					 &g_lcd_fb_panel_array[i]->func);
 	}
-}
-
-int lcd_init(void)
-{
-	sunxi_disp_get_source_ops(&g_lcd_drv.src_ops);
-	lcd_set_panel_funs();
-
 	return 0;
 }
diff --git a/drivers/video/sunxi/lcd_fb/panels/panels.h b/drivers/video/sunxi/lcd_fb/panels/panels.h
index bf4324c40..5279ec640 100644
--- a/drivers/video/sunxi/lcd_fb/panels/panels.h
+++ b/drivers/video/sunxi/lcd_fb/panels/panels.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
 /*
  * Allwinner SoCs display driver.
@@ -12,6 +12,7 @@
 
 #ifndef __PANEL_H__
 #define __PANEL_H__
+
 #include "../include.h"
 #include "lcd_source.h"
 #include "../disp_display.h"
@@ -19,32 +20,30 @@
 
 struct __lcd_panel {
 	char name[32];
-	struct disp_lcd_panel_fun func;
+	struct sunxi_lcd_fb_disp_lcd_panel_fun func;
 };
 
-extern struct __lcd_panel *panel_array[];
+extern struct __lcd_panel *g_lcd_fb_panel_array[];
 
-struct sunxi_lcd_drv {
-	struct sunxi_disp_source_ops src_ops;
-};
+extern int
+sunxi_lcd_fb_disp_get_source_ops(struct sunxi_lcd_fb_disp_source_ops *src_ops);
 
-extern int sunxi_disp_get_source_ops(struct sunxi_disp_source_ops *src_ops);
-int lcd_init(void);
-#ifdef CONFIG_LCD_SUPPORT_KLD35512
+int sunxi_lcd_fb_lcd_panel_init(void);
+
+#if IS_ENABLED(CONFIG_LCD_SUPPORT_KLD35512)
 extern struct __lcd_panel kld35512_panel;
 #endif
 
-#ifdef CONFIG_LCD_SUPPORT_KLD39501
+#if IS_ENABLED(CONFIG_LCD_SUPPORT_KLD39501)
 extern struct __lcd_panel kld39501_panel;
 #endif
 
-#ifdef CONFIG_LCD_SUPPORT_KLD2844B
+#if IS_ENABLED(CONFIG_LCD_SUPPORT_KLD2844B)
 extern struct __lcd_panel kld2844b_panel;
 #endif
 
-#ifdef CONFIG_LCD_SUPPORT_NV3029S
+#if IS_ENABLED(CONFIG_LCD_SUPPORT_NV3029S)
 extern struct __lcd_panel nv3029s_panel;
 #endif
 
-
 #endif
diff --git a/drivers/video/sunxi/lcd_fb/panels/spi_panel.c b/drivers/video/sunxi/lcd_fb/panels/spi_panel.c
new file mode 100644
index 000000000..4c85ef4b9
--- /dev/null
+++ b/drivers/video/sunxi/lcd_fb/panels/spi_panel.c
@@ -0,0 +1,78 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
+/*
+* Allwinner SoCs display driver.
+*
+* Copyright (C) 2016 Allwinner.
+*
+* This file is licensed under the terms of the GNU General Public
+* License version 2.  This program is licensed "as is" without any
+* warranty of any kind, whether express or implied.
+*/
+
+#include "../include.h"
+
+#define SPIDEV_MODULE_NAME "lcd_fb_panel_device"
+
+static int spi_dev_probe(struct spi_device *spi)
+{
+	LCDFB_HERE;
+	return 0;
+}
+
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(6, 1, 0))
+static void spi_dev_remove(struct spi_device *spi)
+#else
+static int spi_dev_remove(struct spi_device *spi)
+#endif
+{
+	LCDFB_HERE;
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(6, 1, 0))
+	return;
+#else
+	return 0;
+#endif
+}
+
+static const struct of_device_id spidev_match[] = {
+	{
+		.compatible = "allwinner,spi-panel",
+	},
+	{},
+};
+
+static struct spi_driver spidev_driver = {
+	.probe = spi_dev_probe,
+	.remove = spi_dev_remove,
+	.driver = {
+		.owner = THIS_MODULE,
+		.name = SPIDEV_MODULE_NAME,
+		.of_match_table = spidev_match,
+	},
+};
+
+static int __init spi_panel_init(void)
+{
+	int ret;
+
+	ret = spi_register_driver(&spidev_driver);
+	if (ret) {
+		LCDFB_WRN("spi panel register driver failed!\n");
+		return ret;
+	}
+
+	return ret;
+}
+
+static void __exit spi_panel_exit(void)
+{
+	spi_unregister_driver(&spidev_driver);
+}
+
+module_init(spi_panel_init);
+module_exit(spi_panel_exit);
+
+MODULE_AUTHOR("zhangyuanjing <zhangyuanjing@allwinnertech.com>");
+MODULE_LICENSE("GPL");
+MODULE_VERSION("1.0.0");
+MODULE_DESCRIPTION("Register SPI Panel device for Allwinner LCD FB");
-- 
2.25.1

