导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页
    1. 主页
    2. ZZZZ_
    Z
    • 资料
    • 关注 0
    • 粉丝 0
    • 我的积分 497
    • 主题 4
    • 帖子 13
    • 最佳 1
    • 群组 0

    ZZZZ_LV 3

    @ZZZZ_

    497
    积分
    1
    声望
    3
    资料浏览
    13
    帖子
    0
    粉丝
    0
    关注
    注册时间 最后登录

    ZZZZ_ 取消关注 关注

    ZZZZ_ 发布的最佳帖子

    • a133的mipi屏幕点不亮

      uboot的驱动代码:

      /*
       * drivers/video/sunxi/disp2/disp/lcd/K080_IM2HYL802R_800X1280.c
       *
       * Copyright (c) 2007-2018 Allwinnertech Co., Ltd.
       *
       * This software is licensed under the terms of the GNU General Public
       * License version 2, as published by the Free Software Foundation, and
       * may be copied, distributed, and modified under those terms.
       *
       * This program is distributed in the hope that it will be useful,
       * but WITHOUT ANY WARRANTY; without even the implied warranty of
       * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       * GNU General Public License for more details.
       *
       */
      
      #include "K080_IM2HYL802R_800X1280.h"
      //#include <mach/sys_config.h>
      #include "panels.h"
      
      
      /*
      &lcd0 {
      	lcd_used            = <1>;
      	status              = "okay";
      	lcd_driver_name     = "K080_IM2HYL802R_800X1280";
      	lcd_backlight       = <50>;
      	lcd_if              = <4>;
      
      	lcd_x               = <800>;
      	lcd_y               = <1280>;
      	lcd_width           = <135>;
      	lcd_height          = <216>;
      	lcd_dclk_freq       = <75>;
      
      	lcd_pwm_used        = <1>;
      	lcd_pwm_ch          = <0>;
      	lcd_pwm_freq        = <50000>;
      	lcd_pwm_pol         = <1>;
      	lcd_pwm_max_limit   = <255>;
      
      	lcd_hbp             = <88>;
      	lcd_ht              = <960>;
      	lcd_hspw            = <4>;
      	lcd_vbp             = <12>;
      	lcd_vt              = <1300>;
      	lcd_vspw            = <4>;
      
      	lcd_frm             = <0>;
      	lcd_gamma_en        = <0>;
      	lcd_bright_curve_en = <0>;
      	lcd_cmap_en         = <0>;
      
      	deu_mode            = <0>;
      	lcdgamma4iep        = <22>;
      	smart_color         = <90>;
      
      	lcd_dsi_if          = <0>;
      	lcd_dsi_lane        = <4>;
      	lcd_dsi_format      = <0>;
      	lcd_dsi_te          = <0>;
      	lcd_dsi_eotp        = <0>;
      
      	lcd_pin_power = "dcdc1";
      	lcd_pin_power1 = "eldo3";
      
      	lcd_power = "eldo3";
      
      	lcd_power1 = "dcdc1";
      	lcd_power2 = "dc1sw";
      
      	lcd_gpio_1 = <&pio PD 22 1 0 3 1>;
      
      	pinctrl-0 = <&dsi4lane_pins_a>;
      	pinctrl-1 = <&dsi4lane_pins_b>;
      
      	lcd_bl_en = <&pio PB 8 1 0 3 1>;
      	lcd_bl_0_percent	= <15>;
      	lcd_bl_100_percent  = <100>;
      };
      
      */
      
      
      extern s32 bsp_disp_get_panel_info(u32 screen_id, disp_panel_para *info);
      static void LCD_power_on(u32 sel);
      static void LCD_power_off(u32 sel);
      static void LCD_bl_open(u32 sel);
      static void LCD_bl_close(u32 sel);
      
      //static void LCD_panel_try_switch(u32 sel);
      static void LCD_panel_init(u32 sel);
      static void LCD_panel_exit(u32 sel);
      
      //static u8 const mipi_dcs_pixel_format[4] = {0x77,0x66,0x66,0x55};
      #define panel_reset(val) sunxi_lcd_gpio_set_value(sel, 1, val)
      #define power_en(val) sunxi_lcd_gpio_set_value(sel, 0, val)
      
      static void LCD_cfg_panel_info(panel_extend_para *info)
      {
      	u32 i = 0, j = 0;
      	u32 items;
      	u8 lcd_gamma_tbl[][2] = {
      		//{input value, corrected value}
      		{0, 0},
      		{15, 15},
      		{30, 30},
      		{45, 45},
      		{60, 60},
      		{75, 75},
      		{90, 90},
      		{105, 105},
      		{120, 120},
      		{135, 135},
      		{150, 150},
      		{165, 165},
      		{180, 180},
      		{195, 195},
      		{210, 210},
      		{225, 225},
      		{240, 240},
      		{255, 255},
      	};
      
      	u32 lcd_cmap_tbl[2][3][4] = {
      	{
      		{LCD_CMAP_G0, LCD_CMAP_B1, LCD_CMAP_G2, LCD_CMAP_B3},
      		{LCD_CMAP_B0, LCD_CMAP_R1, LCD_CMAP_B2, LCD_CMAP_R3},
      		{LCD_CMAP_R0, LCD_CMAP_G1, LCD_CMAP_R2, LCD_CMAP_G3},
      		},
      		{
      		{LCD_CMAP_B3, LCD_CMAP_G2, LCD_CMAP_B1, LCD_CMAP_G0},
      		{LCD_CMAP_R3, LCD_CMAP_B2, LCD_CMAP_R1, LCD_CMAP_B0},
      		{LCD_CMAP_G3, LCD_CMAP_R2, LCD_CMAP_G1, LCD_CMAP_R0},
      		},
      	};
      
      	items = sizeof(lcd_gamma_tbl) / 2;
      	for (i = 0; i < items - 1; i++) {
      		u32 num = lcd_gamma_tbl[i + 1][0] - lcd_gamma_tbl[i][0];
      
      		for (j = 0; j < num; j++) {
      			u32 value = 0;
      
      			value = lcd_gamma_tbl[i][1] + ((lcd_gamma_tbl[i + 1][1] - lcd_gamma_tbl[i][1]) * j) / num;
      			info->lcd_gamma_tbl[lcd_gamma_tbl[i][0] + j] = (value << 16) + (value << 8) + value;
      		}
      	}
      	info->lcd_gamma_tbl[255] = (lcd_gamma_tbl[items - 1][1] << 16) + (lcd_gamma_tbl[items - 1][1] << 8) + lcd_gamma_tbl[items - 1][1];
      
      	memcpy(info->lcd_cmap_tbl, lcd_cmap_tbl, sizeof(lcd_cmap_tbl));
      
      }
      
      static s32 LCD_open_flow(u32 sel)
      {
          pr_info("[LCD] %s: screen %u\n", __func__, sel);
          
      	LCD_OPEN_FUNC(sel, LCD_power_on, 100);   //open lcd power, and delay 100ms
      	LCD_OPEN_FUNC(sel, LCD_panel_init, 200); //open lcd power, than delay 200ms
      	LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 50); //open lcd controller, and delay 50ms
      	LCD_OPEN_FUNC(sel, LCD_bl_open, 0);     //open lcd backlight, and delay 0ms
      
      	return 0;
      }
      
      static s32 LCD_close_flow(u32 sel)
      {
          pr_info("[LCD] %s: screen %u\n", __func__, sel);
      	LCD_CLOSE_FUNC(sel, LCD_bl_close, 200);       //close lcd backlight, and delay 0ms
      	LCD_CLOSE_FUNC(sel, sunxi_lcd_tcon_disable, 20);         //close lcd controller, and delay 0ms
      	LCD_CLOSE_FUNC(sel, LCD_panel_exit,	10);   //open lcd power, than delay 200ms
      	LCD_CLOSE_FUNC(sel, LCD_power_off, 500);   //close lcd power, and delay 500ms
      
      	return 0;
      }
      
      static void LCD_power_on(u32 sel)
      {
          pr_info("[LCD] %s: start, screen %u\n", __func__, sel);
      	// 1. 复位引脚拉低(复位触发)
      	panel_reset(0);
      	sunxi_lcd_delay_ms(20);
          
          // 2. 电源开启(严格按联发科顺序:3.3V → 1.8V → AVDD)
          sunxi_lcd_power_enable(sel, 0);
          sunxi_lcd_delay_ms(20);
          
          sunxi_lcd_power_enable(sel, 1);
          sunxi_lcd_delay_ms(10);
          
          sunxi_lcd_power_enable(sel, 2);
          sunxi_lcd_delay_ms(5);
          
          // 3. 电源使能GPIO置高
          power_en(1);
          sunxi_lcd_delay_ms(10);
          
          // 4. 复位引脚拉高(释放复位)
          panel_reset(1);
          sunxi_lcd_delay_ms(50);
      
          sunxi_lcd_pin_cfg(sel, 1);
      	pr_info("[LCD] %s: finish, screen %u\n", __func__, sel);
      }
      
      static void LCD_power_off(u32 sel)
      {
          pr_info("[LCD] %s: start, screen %u\n", __func__, sel);
      	sunxi_lcd_pin_cfg(sel, 0);
      	power_en(0);
      	sunxi_lcd_delay_ms(20);
      	panel_reset(0);
      	sunxi_lcd_delay_ms(5);
      	// 电源关闭顺序:反向关闭(AVDD → 1.8V → 3.3V),匹配上电顺序
      	sunxi_lcd_power_disable(sel, 2);
      	sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_disable(sel, 1);
      	sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_disable(sel, 0);
          pr_info("[LCD] %s: finish, screen %u\n", __func__, sel);
      }
      
      static void LCD_bl_open(u32 sel)
      {
          pr_info("[LCD] %s: screen %u\n", __func__, sel);
      	sunxi_lcd_pwm_enable(sel);
      	sunxi_lcd_delay_ms(50);
      	sunxi_lcd_backlight_enable(sel);//config lcd_bl_en pin to open lcd backlight
      }
      
      static void LCD_bl_close(u32 sel)
      {
          pr_info("[LCD] %s: screen %u\n", __func__, sel);
      	sunxi_lcd_backlight_disable(sel);//config lcd_bl_en pin to close lcd backlight
      	sunxi_lcd_delay_ms(20);
      	sunxi_lcd_pwm_disable(sel);
      }
      
      #define REGFLAG_DELAY             						0XFE
      #define REGFLAG_END_OF_TABLE      						0xFD   // END OF REGISTERS MARKER
      
      struct LCM_setting_table {
          u8 cmd;
          u32 count;
          u8 para_list[64];
      };
      
      /*add panel initialization below*/
      
      
      static struct LCM_setting_table lcm_initialization_setting[] = {
      	{REGFLAG_DELAY, REGFLAG_DELAY, {120}},            /* 120 ms after reset  */
      
      	/* Page-1  (0x3001) */
      	{0xFF, 1, {0x30}},
      	{0xFF, 1, {0x52}},
      	{0xFF, 1, {0x01}},
      	{0xE3, 1, {0x04}},
      	{0x08, 1, {0x0E}},
      	{0x25, 1, {0x10}},
      	{0x28, 1, {0x5F}},
      	{0x2C, 1, {0x22}},
      	{0x30, 1, {0x58}},
      	{0x45, 1, {0x91}},
      	{0x37, 1, {0x9C}},
      	{0x38, 1, {0xA7}},
      	{0x39, 1, {0x27}},
      	{0x44, 1, {0x00}},
      	{0x49, 1, {0x1C}},
      	{0x59, 1, {0xFE}},
      	{0x5C, 1, {0x00}},
      	{0x91, 1, {0x77}},
      	{0x92, 1, {0x77}},
      	{0xA0, 1, {0x55}},
      	{0xA1, 1, {0x50}},
      	{0xA3, 1, {0x58}},
      	{0xA4, 1, {0x9C}},
      	{0xA7, 1, {0x02}},
      	{0xA8, 1, {0x01}},
      	{0xA9, 1, {0x01}},
      	{0xAA, 1, {0xFC}},
      	{0xAB, 1, {0x28}},
      	{0xAC, 1, {0x06}},
      	{0xAD, 1, {0x06}},
      	{0xAE, 1, {0x06}},
      	{0xAF, 1, {0x03}},
      	{0xB0, 1, {0x08}},
      	{0xB1, 1, {0x26}},
      	{0xB2, 1, {0x28}},
      	{0xB3, 1, {0x28}},
      	{0xB4, 1, {0x03}},
      	{0xB5, 1, {0x08}},
      	{0xB6, 1, {0x26}},
      	{0xB7, 1, {0x08}},
      	{0xB8, 1, {0x26}},
      
      	{0xC0, 1, {0x00}},
      	{0xC1, 1, {0x00}},
      	{0xC3, 1, {0x0F}},
      
      	/* Page-2  (0x3002) */
      	{0xFF, 1, {0x30}},
      	{0xFF, 1, {0x52}},
      	{0xFF, 1, {0x02}},
      	{0xB0, 1, {0x00}},
      	{0xB1, 1, {0x05}},
      	{0xB2, 1, {0x02}},
      	{0xB3, 1, {0x24}},
      	{0xB4, 1, {0x25}},
      	{0xB5, 1, {0x30}},
      	{0xB6, 1, {0x0C}},
      	{0xB7, 1, {0x27}},
      	{0xB8, 1, {0x0F}},
      	{0xB9, 1, {0x05}},
      	{0xBA, 1, {0x11}},
      	{0xBB, 1, {0x10}},
      	{0xBC, 1, {0x11}},
      	{0xBD, 1, {0x12}},
      	{0xBE, 1, {0x17}},
      	{0xBF, 1, {0x0C}},
      	{0xC0, 1, {0x14}},
      	{0xC1, 1, {0x0A}},
      	{0xD0, 1, {0x08}},
      	{0xD1, 1, {0x0F}},
      	{0xD2, 1, {0x09}},
      	{0xD3, 1, {0x35}},
      	{0xD4, 1, {0x38}},
      	{0xD5, 1, {0x3D}},
      	{0xD6, 1, {0x1B}},
      	{0xD7, 1, {0x3B}},
      	{0xD8, 1, {0x0F}},
      	{0xD9, 1, {0x05}},
      	{0xDA, 1, {0x11}},
      	{0xDB, 1, {0x10}},
      	{0xDC, 1, {0x11}},
      	{0xDD, 1, {0x14}},
      	{0xDE, 1, {0x19}},
      	{0xDF, 1, {0x11}},
      	{0xE0, 1, {0x19}},
      	{0xE1, 1, {0x09}},
      
      	/* Page-3  (0x3003) */
      	{0xFF, 1, {0x30}},
      	{0xFF, 1, {0x52}},
      	{0xFF, 1, {0x03}},
      	{0x08, 1, {0x8B}},
      	{0x09, 1, {0x8A}},
      	{0x0A, 1, {0x89}},
      	{0x0B, 1, {0x88}},
      	{0x34, 1, {0x61}},
      	{0x35, 1, {0xD4}},
      	{0x36, 1, {0x24}},
      	{0x37, 1, {0x03}},
      	{0x40, 1, {0x8B}},
      	{0x41, 1, {0x8A}},
      	{0x42, 1, {0x89}},
      	{0x43, 1, {0x88}},
      	{0x45, 1, {0x01}},
      	{0x46, 1, {0x02}},
      	{0x48, 1, {0x03}},
      	{0x49, 1, {0x04}},
      	{0x50, 1, {0x87}},
      	{0x51, 1, {0x86}},
      	{0x52, 1, {0x85}},
      	{0x53, 1, {0x84}},
      	{0x55, 1, {0x05}},
      	{0x56, 1, {0x06}},
      	{0x58, 1, {0x07}},
      	{0x59, 1, {0x08}},
      	{0x80, 1, {0x0F}},
      	{0x81, 1, {0x0E}},
      	{0x82, 1, {0x07}},
      	{0x83, 1, {0x06}},
      	{0x84, 1, {0x05}},
      	{0x85, 1, {0x04}},
      	{0x92, 1, {0x0E}},
      	{0x93, 1, {0x0F}},
      	{0x94, 1, {0x01}},
      	{0x95, 1, {0x00}},
      	{0x96, 1, {0x0F}},
      	{0x97, 1, {0x0E}},
      	{0x98, 1, {0x07}},
      	{0x99, 1, {0x06}},
      	{0x9A, 1, {0x05}},
      	{0x9B, 1, {0x04}},
      	{0xA8, 1, {0x0E}},
      	{0xA9, 1, {0x0F}},
      	{0xAA, 1, {0x01}},
      	{0xAB, 1, {0x00}},
      	{0xE0, 1, {0x02}},
      	{0xE1, 1, {0x52}},
      
      	/* Page-0  (0x3000) */
      	{0xFF, 1, {0x30}},
      	{0xFF, 1, {0x52}},
      	{0xFF, 1, {0x00}},
      	{0x35, 1, {0x00}},
      	{0x36, 1, {0x02}},
      	{0x53, 1, {0x2C}},
      
      	/* Display ON sequence */
      	//SLP OUT
      	{0x11,     0,     {0x00} },  	// SLPOUT
      	{REGFLAG_DELAY, REGFLAG_DELAY, {120} },
      
      	//DISP ON
      	{0x29,     0,     {0x00} },  	// DSPON
      	{REGFLAG_DELAY, REGFLAG_DELAY, {100} },
      
      	{REGFLAG_END_OF_TABLE, REGFLAG_END_OF_TABLE, {} }
      };
      
      
      /*static void LCD_panel_try_switch(u32 sel)
      {
      	u8 result[16] = {0};
      	u32 num = 0;
      	
      
      	sunxi_lcd_delay_ms(100);
      	sunxi_lcd_dsi_dcs_read(sel, 0x04, result, &num);
      	printf("get lcd id 0x%x\n", result[0]);
      	if (result[0] == 0x93) {
      		LCD_power_off(sel);
      		sunxi_lcd_switch_compat_panel(sel, 1);
      		return;
      	}
      }*/
      
      
      
      static void LCD_panel_init(u32 sel)
      {
      	__u32 i;
      
          pr_info("[LCD] %s: screen %u - start init table\n", __func__, sel);
      	sunxi_lcd_dsi_clk_enable(sel);
      	sunxi_lcd_delay_ms(20);
          pr_info("[LCD] %s: sending SW reset\n", __func__);
      	sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_SOFT_RESET);
      	//sunxi_lcd_delay_ms(10);
      	sunxi_lcd_delay_ms(120);
      
          pr_info("[LCD] %s: entering init table loop\n", __func__);
      
      	for (i = 0; ; i++) {
      			if (lcm_initialization_setting[i].count == REGFLAG_END_OF_TABLE)
      				break;
      			else if (lcm_initialization_setting[i].count == REGFLAG_DELAY)
      				sunxi_lcd_delay_ms(lcm_initialization_setting[i].para_list[0]);
      #ifdef SUPPORT_DSI
      			else
      				dsi_dcs_wr(sel, lcm_initialization_setting[i].cmd, lcm_initialization_setting[i].para_list, lcm_initialization_setting[i].count);
      #endif
      		//break;
      	}
      
          pr_info("[LCD] %s: screen %u - init table done\n", __func__, sel);
      	return;
      }
      
      static void LCD_panel_exit(u32 sel)
      {
          pr_info("[LCD] %s: screen %u\n", __func__, sel);
      	sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_SET_DISPLAY_OFF);
      	sunxi_lcd_delay_ms(20);
      	sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_ENTER_SLEEP_MODE);
      	sunxi_lcd_delay_ms(80);
      
      	return ;
      }
      
      //sel: 0:lcd0; 1:lcd1
      static s32 LCD_user_defined_func(u32 sel, u32 para1, u32 para2, u32 para3)
      {
      	return 0;
      }
      
      //sel: 0:lcd0; 1:lcd1
      /*static s32 LCD_set_bright(u32 sel, u32 bright)
      {
      	sunxi_lcd_dsi_dcs_write_1para(sel,0x51,bright);
      	return 0;
      }*/
      
      __lcd_panel_t K080_IM2HYL802R_800X1280_mipi_panel = {
      	/* panel driver name, must mach the name of lcd_drv_name in sys_config.fex */
      	.name = "K080_IM2HYL802R_800X1280",
      	.func = {
      		.cfg_panel_info = LCD_cfg_panel_info,
      		.cfg_open_flow = LCD_open_flow,
      		.cfg_close_flow = LCD_close_flow,
      		.lcd_user_defined_func = LCD_user_defined_func,
      		//.set_bright = LCD_set_bright,
      	},
      };
      

      设备树:

      disp: disp@06000000 {
      			disp_init_enable         = <1>;
      			disp_mode                = <0>;
      
      			screen0_output_type      = <1>;
      			screen0_output_mode      = <4>;
      
      			screen1_output_type      = <1>;
      			screen1_output_mode      = <4>;
      
      			screen1_output_format    = <0>;
      			screen1_output_bits      = <0>;
      			screen1_output_eotf      = <4>;
      			screen1_output_cs        = <257>;
      			screen1_output_dvi_hdmi  = <2>;
      			screen1_output_range     = <2>;
      			screen1_output_scan      = <0>;
      			screen1_output_aspect_ratio = <8>;
      
      			dev0_output_type         = <1>;
      			dev0_output_mode         = <4>;
      			dev0_screen_id           = <0>;
      			dev0_do_hpd              = <0>;
      
      			dev1_output_type         = <4>;
      			dev1_output_mode         = <10>;
      			dev1_screen_id           = <1>;
      			dev1_do_hpd              = <1>;
      
      			def_output_dev           = <0>;
      			hdmi_mode_check          = <1>;
      
      			fb0_format               = <0>;
      			fb0_width                = <720>;
      			fb0_height               = <1280>;
      
      			fb1_format               = <0>;
      			fb1_width                = <0>;
      			fb1_height               = <0>;
      			chn_cfg_mode             = <1>;
      
      			disp_para_zone           = <1>;
      			
      			/*VCC-LCD*/
      			cldo4-supply = <&reg_cldo4>;
      			/*VCC-LVDS-1.8V*/
      			cldo1-supply = <&reg_cldo1>;
      			/*VCC-DSI*/
                  
      			/*VCC-PD-3.3V*/
      			cldo3-supply = <&reg_cldo3>;
      		};
      /*----------------------------------------------------------------------------------
      ;lcd0 configuration
      
      ;lcd_if:               0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp; 6:extend dsi
      ;lcd_hv_if             0:Parallel RGB; 8:Serial RGB; 10:Dummy RGB; 11: RGB Dummy;12:CCIR656
      ;lcd_hv_clk_phase      0:0 degree;1:90 degree;2:180 degree;3:270 degree
      ;lcd_hv_sync_polarity  0:vs low,hs low; 1:vs high,hslow; 2:vs low,hs high; 3:vs high,hs high
      ;lcd_hv_syuv_seq       0:YUYV; 1:YVYU; 2:UYVY; 3:VYUY
      ;lcd_cpu_if            0:18bit/1 cycle parallel(RGB666); 4:16bit/1cycle parallel (RGB565)
      ;                      6:18bit/3 cycle parallel(RGB666); 7:16bit/2cycle parallel (RGB565)
      ;lcd_cpu_te            0:frame auto trigger; 1:frame triggered by te rising edge; 2:frame triggered by te falling edge;
      ;lcd_dsi_if            0:video mode; 1: Command mode; 2:video burst mode
      ;lcd_dsi_te            0:frame auto trigger; 1:frame triggered by te rising edge; 2:frame triggered by te falling edge;
      ;lcd_x:                lcd horizontal resolution
      ;lcd_y:                lcd vertical resolution
      ;lcd_width:            width of lcd in mm
      ;lcd_height:           height of lcd in mm
      ;lcd_dclk_freq:        in MHZ unit
      ;lcd_pwm_freq:         in HZ unit
      ;lcd_pwm_pol:          lcd backlight PWM polarity
      ;lcd_pwm_max_limit     lcd backlight PWM max limit(<=255)
      ;lcd_hbp:              hsync back porch(pixel) + hsync plus width(pixel);
      ;lcd_ht:               hsync total cycle(pixel)
      ;lcd_vbp:              vsync back porch(line) + vysnc plus width(line)
      ;lcd_vt:               vysnc total cycle(line)
      ;lcd_hspw:             hsync plus width(pixel)
      ;lcd_vspw:             vysnc plus width(pixel)
      ;lcd_lvds_if:          0:single link;  1:dual link
      ;lcd_lvds_colordepth:  0:8bit; 1:6bit
      ;lcd_lvds_mode:        0:NS mode; 1:JEIDA mode
      ;lcd_frm:              0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither
      ;lcd_io_phase:         0:noraml; 1:intert phase(0~3bit: vsync phase; 4~7bit:hsync phase;
      ;                      8~11bit:dclk phase; 12~15bit:de phase)
      ;lcd_gamma_en          lcd gamma correction enable
      ;lcd_bright_curve_en   lcd bright curve correction enable
      ;lcd_cmap_en           lcd color map function enable
      ;deu_mode              0:smoll lcd screen; 1:large lcd screen(larger than 10inch)
      ;lcdgamma4iep:         Smart Backlight parameter, lcd gamma vale * 10;
      ;                      decrease it while lcd is not bright enough; increase while lcd is too bright
      ;smart_color           90:normal lcd screen 65:retina lcd screen(9.7inch)
      ;Pin setting for special function ie.LVDS, RGB data or vsync
      ;   name(donot care) = port:PD12<pin function><pull up or pull down><drive ability><output level>
      ;Pin setting for gpio:
      ;   lcd_gpio_X     = port:PD12<pin function><pull up or pull down><drive ability><output level>
      ;Pin setting for backlight enable pin
      ;   lcd_bl_en     = port:PD12<pin function><pull up or pull down><drive ability><output level>
      ;fsync setting, pulse to csi
      ;lcd_fsync_en          (0:disable fsync,1:enable)
      ;lcd_fsync_act_time    (active time of fsync, unit:pixel)
      ;lcd_fsync_dis_time    (disactive time of fsync, unit:pixel)
      ;lcd_fsync_pol         (0:positive;1:negative)
      ;gpio config: <&pio for cpu or &r_pio for cpus, port, port num, pio function,
      pull up or pull down(default 0), driver level(default 1), data>
      ;For dual link lvds: use lvds2link_pins_a  and lvds2link_pins_b instead
      ;For rgb24: use rgb24_pins_a  and rgb24_pins_b instead
      ;For lvds1: use lvds1_pins_a  and lvds1_pins_b instead
      ;For lvds0: use lvds0_pins_a  and lvds0_pins_b instead
      ;----------------------------------------------------------------------------------*/
      		lcd0: lcd0@01c0c000 {
      			lcd_used            = <1>;
      			lcd_driver_name     = "K080_IM2HYL802R_800X1280";
      			lcd_backlight       = <50>;
      			lcd_if              = <4>;
      
      			lcd_x               = <720>;
      			lcd_y               = <1280>;
      			lcd_width           = <150>;
      			lcd_height          = <36>;
      			lcd_dclk_freq       = <58>;
      
      			lcd_pwm_used        = <1>;
      			lcd_pwm_ch          = <0>;
      			lcd_pwm_freq        = <50000>;
      			lcd_pwm_pol         = <1>;
      			lcd_pwm_max_limit   = <255>;
      
      			lcd_hbp             = <30>;
      			lcd_ht              = <770>;
      			lcd_hspw            = <6>;
      
      			lcd_vbp             = <16>;
      			lcd_vt              = <1311>;
      			lcd_vspw            = <4>;
      
      			lcd_frm             = <0>;
      			lcd_gamma_en        = <0>;
      			lcd_bright_curve_en = <0>;
      			lcd_cmap_en         = <0>;
      
      			deu_mode            = <0>;
      			lcdgamma4iep        = <22>;
      			smart_color         = <90>;
      
      			lcd_dsi_if          = <0>;
      			lcd_dsi_lane        = <4>;
      			lcd_dsi_format      = <0>;
      			lcd_dsi_te          = <0>;
      			lcd_dsi_eotp        = <0>;
      
      			lcd_pin_power       = "cldo3";      /* VCC-PD   (3.3 V) */
      			lcd_power1          = "cldo1";      /* VCC-LVDS (1.8 V) */
      			lcd_power2          = "cldo4";      /* VCC-LCD  (3.3 V) */
      			
      			lcd_gpio_1          = <&pio PD 22 1 0 3 1>;    /* RESET */
       
      			pinctrl-0           = <&dsi4lane_pins_a>;
      			pinctrl-1           = <&dsi4lane_pins_b>;
      
      			lcd_bl_en           = <&pio PD 23 1 1 0 3 1>;  /* backlight */
      			lcd_bl_0_percent    = <15>;
      			lcd_bl_100_percent  = <100>;
      		};
      

      参考mtk的驱动参数:

      /*
       * Copyright (C) 2016 MediaTek Inc.
       *
       * This program is free software; you can redistribute it and/or modify
       * it under the terms of the GNU General Public License version 2 as
       * published by the Free Software Foundation.
       *
       * This program is distributed in the hope that it will be useful,
       * but WITHOUT ANY WARRANTY; without even the implied warranty of
       * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
       * See http://www.gnu.org/licenses/gpl-2.0.html for more details.
       */
      
      #ifdef BUILD_LK
      #include <string.h>
      #include <platform/mt_gpio.h>
      #include <platform/mt_pmic.h>
      #include <platform/sync_write.h>
      #include <platform/ddp_hal.h>
      #else
      #include <linux/string.h>
      #include <linux/wait.h>
      #include <linux/platform_device.h>
      #include <linux/gpio.h>
      #include <linux/pinctrl/consumer.h>
      #include <linux/of_gpio.h>
      #include <asm-generic/gpio.h>
      
      #include <linux/kernel.h>
      #include <linux/mm.h>
      #include <linux/mm_types.h>
      #include <linux/module.h>
      #include <linux/types.h>
      #include <linux/slab.h>
      #include <linux/vmalloc.h>
      
      #ifdef CONFIG_OF
      #include <linux/of.h>
      #include <linux/of_irq.h>
      #include <linux/of_address.h>
      #include <linux/of_device.h>
      #include <linux/regulator/consumer.h>
      #endif
      #endif
      #include "lcm_drv.h"
      
      #ifndef BUILD_LK 
      extern int inettek_gpio_set(const char *name);
      extern int lcm_vgp_supply_enable(void);
      extern int lcm_vgp_supply_disable(void);
      extern int lcm_get_vgp_supply(struct device *dev);
      #endif
      
      #ifdef BUILD_LK
      #define LCD_2V8_EN                 (38 | 0x80000000)
      #define LCD_RST_PIN                (66 | 0x80000000)
      #define LCD_3V3_RST_PIN            (70 | 0x80000000)
      #define LCD_AVDD_EN                (20 | 0x80000000)  // VSN +VSP
      #define LCD_GAMA_EN                (0  | 0x80000000)  // AVDD + VGL + VGH
      #endif
      
      /* --------------------------------------------------------------- */
      /*  Local Constants */
      /* --------------------------------------------------------------- */
      #define FRAME_WIDTH        (720)
      #define FRAME_HEIGHT       (1280)
      #define GPIO_OUT_ONE        1
      #define GPIO_OUT_ZERO       0
      
      #define REGFLAG_DELAY            0xFE
      #define REGFLAG_END_OF_TABLE     0x00
      
      #define LCM_ID_NV3052            (0x3052)
      /* --------------------------------------------------------------- */
      /*  Local Variables */
      /* --------------------------------------------------------------- */
      
      #ifndef BUILD_LK
      static unsigned int GPIO_LCD_PWR;
      static unsigned int GPIO_LCD_RST;
      static unsigned int GPIO_3V3_LCD_RST;
      
      static void lcm_request_gpio_control(struct device *dev)
      {
          GPIO_LCD_PWR = of_get_named_gpio(dev->of_node, "gpio_lcd_pwr", 0);
          gpio_request(GPIO_LCD_PWR, "GPIO_LCD_PWR");
      
          GPIO_LCD_RST = of_get_named_gpio(dev->of_node, "gpio_lcd_rst", 0);
          gpio_request(GPIO_LCD_PWR, "GPIO_LCD_RST");
      
          GPIO_3V3_LCD_RST = of_get_named_gpio(dev->of_node, "gpio_3v3_lcd_rst", 0);
          gpio_request(GPIO_LCD_PWR, "GPIO_3V3_LCD_RST");
      }
      
      static int lcm_driver_probe(struct device *dev, void const *data)
      {
          lcm_request_gpio_control(dev);
          lcm_get_vgp_supply(dev);
          lcm_vgp_supply_enable();
      
          return 0;
      }
      
      static const struct of_device_id lcm_platform_of_match[] = {
          {
              .compatible = "mickey,nv3052_bv055hdl_nb6",
              .data = 0,
          }, {
              /* sentinel */
          }
      };
      
      MODULE_DEVICE_TABLE(of, platform_of_match);
      
      static int lcm_platform_probe(struct platform_device *pdev)
      {
          const struct of_device_id *id;
      
          id = of_match_node(lcm_platform_of_match, pdev->dev.of_node);
          if (!id)
              return -ENODEV;
      
          return lcm_driver_probe(&pdev->dev, id->data);
      }
      
      static struct platform_driver lcm_driver = {
          .probe = lcm_platform_probe,
          .driver = {
                 .name = "nv3052_bv055hdl_nb6",
                 .owner = THIS_MODULE,
                 .of_match_table = lcm_platform_of_match,
          },
      };
      
      static int __init lcm_drv_init(void)
      {
          if (platform_driver_register(&lcm_driver)) {
              pr_err("LCM: failed to register this driver!\n");
              return -ENODEV;
          }
      
          return 0;
      }
      
      static void __exit lcm_drv_exit(void)
      {
          platform_driver_unregister(&lcm_driver);
      }
      
      late_initcall(lcm_drv_init);
      module_exit(lcm_drv_exit);
      MODULE_AUTHOR("mediatek");
      MODULE_DESCRIPTION("LCM display subsystem driver");
      MODULE_LICENSE("GPL");
      #endif
      
      
      extern void mdelay(unsigned long msec);
      
      #ifdef BUILD_LK
      static LCM_UTIL_FUNCS lcm_util = {
          .set_reset_pin = NULL,
          .udelay = NULL,
          .mdelay = NULL,
      };
      #else
      static LCM_UTIL_FUNCS lcm_util = { 0 };
      
      #endif
      
      #define SET_RESET_PIN(v)        (lcm_util.set_reset_pin((v)))
      
      #define UDELAY(n)                (lcm_util.udelay(n))
      #define MDELAY(n)                (lcm_util.mdelay(n))
      
      /* --------------------------------------------------------------- */
      /* Local Functions */
      /* --------------------------------------------------------------- */
      #define dsi_set_cmdq_V2(cmd, count, ppara, force_update) \
               (lcm_util.dsi_set_cmdq_V2(cmd, count, ppara, force_update))
      #define dsi_set_cmdq(pdata, queue_size, force_update) \
               (lcm_util.dsi_set_cmdq(pdata, queue_size, force_update))
      #define wrtie_cmd(cmd) \
               (lcm_util.dsi_write_cmd(cmd))
      #define write_regs(addr, pdata, byte_nums) \
               (lcm_util.dsi_write_regs(addr, pdata, byte_nums))
      #define read_reg \
               (lcm_util.dsi_read_reg())
      #define read_reg_v2(cmd, buffer, buffer_size) \
               (lcm_util.dsi_dcs_read_lcm_reg_v2(cmd, buffer, buffer_size))
      
      #ifdef BUILD_LK
      static void pmic_vgp2_enable(bool en, int vol_mv)
      {
          unsigned int val;
          if (!en)
              mt6392_upmu_set_rg_vgp2_en(0x0);
          else {
              switch (vol_mv) {
                  case 1200:
                      val = 0x00;
                      break;
                  case 1300:
                      val = 0x01;
                      break;
                  case 1500:
                      val = 0x02;
                      break;
                  case 1800:
                      val = 0x03;
                      break;
                  case 2000:
                      val = 0x04;
                      break;
                  case 2800:
                      val = 0x05;
                      break;
                  case 3000:
                      val = 0x06;
                      break;
                  case 3300:
                      val = 0x07;
                      break;
                  default:
                      val = 0x05;
                      break;
              }
              //VGP2 0x00=1.2V, 0x01=1.3V, 0x02=1.5V, 0x03=1.8V, 0x04=2.0V, 0x05=2.8V, 0x06=3.0V, 0x07=3.3V
              mt6392_upmu_set_rg_vgp2_vosel(val);
              mt6392_upmu_set_rg_vgp2_en(0x1);
          }
      }
      #endif
      
      /* --------------------------------------------------------------------------- */
      /* Local Functions */
      /* --------------------------------------------------------------------------- */
      #ifdef BUILD_LK
      static void lcm_set_gpio_output(unsigned int GPIO, unsigned int output)
      {
          mt_set_gpio_mode(GPIO, GPIO_MODE_00);
          mt_set_gpio_dir(GPIO, GPIO_DIR_OUT);
          mt_set_gpio_out(GPIO, output);
      }
      #endif
      
      struct LCM_setting_table {
          unsigned char cmd;
          unsigned char count;
          unsigned char para_list[4];
      };
      
      //update initial param for IC boe_nt71391_dsi_vdo 0.01
      static struct LCM_setting_table lcm_initialization_setting[] = 
      {
      
      //----------NV305F+BOE5.5(BV055HDL-NB6) Initial------------------
          {REGFLAG_DELAY, 120, {}},
      
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x01}},
          {0xE3,0x01,{0x04}},
          {0x08,0x01,{0x0e}},
          {0x25,0x01,{0x10}},
          {0x28,0x01,{0x5F}},
          {0x2C,0x01,{0x22}},
          {0x30,0x01,{0x58}},
          {0x45,0x01,{0x91}},
          {0x37,0x01,{0x9C}},
          {0x38,0x01,{0xA7}},
          {0x39,0x01,{0x27}},
          {0x44,0x01,{0x00}},
          {0x49,0x01,{0x1C}},
          {0x59,0x01,{0xFE}},
          {0x5C,0x01,{0x00}},
          {0x91,0x01,{0x77}},
          {0x92,0x01,{0x77}},
          {0xA0,0x01,{0x55}},
          {0xA1,0x01,{0x50}},
          {0xA3,0x01,{0x58}},
          {0xA4,0x01,{0x9C}},
          {0xA7,0x01,{0x02}},
          {0xA8,0x01,{0x01}},
          {0xA9,0x01,{0x01}},
          {0xAA,0x01,{0xFC}},
          {0xAB,0x01,{0x28}},
          {0xAC,0x01,{0x06}},
          {0xAD,0x01,{0x06}},
          {0xAE,0x01,{0x06}},
          {0xAF,0x01,{0x03}},
          {0xB0,0x01,{0x08}},
          {0xB1,0x01,{0x26}},
          {0xB2,0x01,{0x28}},
          {0xB3,0x01,{0x28}},
          {0xB4,0x01,{0x03}},
          {0xB5,0x01,{0x08}},
          {0xB6,0x01,{0x26}},
          {0xB7,0x01,{0x08}},
          {0xB8,0x01,{0x26}},
      
          {0xc0,0x01,{0x00}},
          {0xc1,0x01,{0x00}},
          {0xc3,0x01,{0x0F}},
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x02}},
          {0xB0,0x01,{0x00}},
          {0xB1,0x01,{0x05}},
          {0xB2,0x01,{0x02}},
          {0xB3,0x01,{0x24}},
          {0xB4,0x01,{0x25}},
          {0xB5,0x01,{0x30}},
          {0xB6,0x01,{0x0C}},
          {0xB7,0x01,{0x27}},
          {0xB8,0x01,{0x0F}},
          {0xB9,0x01,{0x05}},
          {0xBA,0x01,{0x11}},
          {0xBB,0x01,{0x10}},
          {0xBC,0x01,{0x11}},
          {0xBD,0x01,{0x12}},
          {0xBE,0x01,{0x17}},
          {0xBF,0x01,{0x0C}},
          {0xC0,0x01,{0x14}},
          {0xC1,0x01,{0x0A}},
          {0xD0,0x01,{0x08}},
          {0xD1,0x01,{0x0F}},
          {0xD2,0x01,{0x09}},
          {0xD3,0x01,{0x35}},
          {0xD4,0x01,{0x38}},
          {0xD5,0x01,{0x3D}},
          {0xD6,0x01,{0x1B}},
          {0xD7,0x01,{0x3B}},
          {0xD8,0x01,{0x0F}},
          {0xD9,0x01,{0x05}},
          {0xDA,0x01,{0x11}},
          {0xDB,0x01,{0x10}},
          {0xDC,0x01,{0x11}},
          {0xDD,0x01,{0x14}},
          {0xDE,0x01,{0x19}},
          {0xDF,0x01,{0x11}},
          {0xE0,0x01,{0x19}},
          {0xE1,0x01,{0x09}},
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x03}},
          {0x08,0x01,{0x8B}},
          {0x09,0x01,{0x8A}},
          {0x0A,0x01,{0x89}},
          {0x0B,0x01,{0x88}},
          {0x34,0x01,{0x61}},
          {0x35,0x01,{0xD4}},
          {0x36,0x01,{0x24}},
          {0x37,0x01,{0x03}},
          {0x40,0x01,{0x8B}},
          {0x41,0x01,{0x8A}},
          {0x42,0x01,{0x89}},
          {0x43,0x01,{0x88}},
          {0x45,0x01,{0x01}},
          {0x46,0x01,{0x02}},
          {0x48,0x01,{0x03}},
          {0x49,0x01,{0x04}},
          {0x50,0x01,{0x87}},
          {0x51,0x01,{0x86}},
          {0x52,0x01,{0x85}},
          {0x53,0x01,{0x84}},
          {0x55,0x01,{0x05}},
          {0x56,0x01,{0x06}},
          {0x58,0x01,{0x07}},
          {0x59,0x01,{0x08}},
          {0x80,0x01,{0x0F}},
          {0x81,0x01,{0x0E}},
          {0x82,0x01,{0x07}},
          {0x83,0x01,{0x06}},
          {0x84,0x01,{0x05}},
          {0x85,0x01,{0x04}},
          {0x92,0x01,{0x0E}},
          {0x93,0x01,{0x0F}},
          {0x94,0x01,{0x01}},
          {0x95,0x01,{0x00}},
          {0x96,0x01,{0x0F}},
          {0x97,0x01,{0x0E}},
          {0x98,0x01,{0x07}},
          {0x99,0x01,{0x06}},
          {0x9A,0x01,{0x05}},
          {0x9B,0x01,{0x04}},
          {0xA8,0x01,{0x0E}},
          {0xA9,0x01,{0x0F}},
          {0xAA,0x01,{0x01}},
          {0xAB,0x01,{0x00}},
          {0xE0,0x01,{0x02}},
          {0xE1,0x01,{0x52}},
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x00}},
          {0x35,0x01,{0x00}},
          {0x36,0x01,{0x02}},
          {0x53,0x01,{0x2C}},
      
          {0x11,0x01,{0x00}},
          {REGFLAG_DELAY, 200, {}},
          {0x29,0x01,{0x00}}, //Display ON
          {REGFLAG_DELAY, 100, {}},
      
          {REGFLAG_END_OF_TABLE, 0x00, {}},
      };
      
      static void push_table(struct LCM_setting_table *table, unsigned int count, unsigned char force_update)
      {
          unsigned int i;
          for(i = 0; i < count; i++) {
              unsigned cmd;
              cmd = table[i].cmd;
              switch (cmd) {
                  case REGFLAG_DELAY :
                      MDELAY(table[i].count);
                      break;
                  case REGFLAG_END_OF_TABLE :
                      break;
                  default:
                      dsi_set_cmdq_V2(cmd, table[i].count, table[i].para_list, force_update);
                      //MDELAY(10);//soso add or it will fail to send register
                 }
          }
      }
      
      /* --------------------------------------------------------------- */
      /*  LCM Driver Implementations */
      /* --------------------------------------------------------------- */
      #ifdef BUILD_LK
      static void lcm_set_util_funcs(const LCM_UTIL_FUNCS *util)
      {
          memcpy(&lcm_util, util, sizeof(LCM_UTIL_FUNCS));
      }
      #else
      static void lcm_set_util_funcs(const LCM_UTIL_FUNCS *util)
      {
          memcpy(&lcm_util, util, sizeof(LCM_UTIL_FUNCS));
      }
      #endif
      
      static void lcm_get_params(LCM_PARAMS *params)
      {
          memset(params, 0, sizeof(LCM_PARAMS));
      
          params->type   = LCM_TYPE_DSI;
          params->width  = FRAME_WIDTH;
          params->height = FRAME_HEIGHT;
          params->dsi.mode = SYNC_EVENT_VDO_MODE;
          params->dsi.LANE_NUM                = LCM_FOUR_LANE;
          params->dsi.data_format.color_order = LCM_COLOR_ORDER_RGB;
          params->dsi.data_format.trans_seq   = LCM_DSI_TRANS_SEQ_MSB_FIRST;
          params->dsi.data_format.padding     = LCM_DSI_PADDING_ON_LSB;
          params->dsi.data_format.format      = LCM_DSI_FORMAT_RGB888;
          /* Highly depends on LCD driver capability. */
          params->dsi.packet_size = 256;
          /* Video mode setting */
          params->dsi.intermediat_buffer_num = 0;
          params->dsi.PS = LCM_PACKED_PS_24BIT_RGB888;
          params->dsi.word_count=FRAME_WIDTH*3;
      
          params->dsi.vertical_sync_active        = 2;
          params->dsi.vertical_backporch            = 14;
          params->dsi.vertical_frontporch            = 16;
          params->dsi.vertical_active_line        = FRAME_HEIGHT;
      
          params->dsi.horizontal_sync_active        = 2;
          params->dsi.horizontal_backporch        = 44;
          params->dsi.horizontal_frontporch        = 46;
          params->dsi.horizontal_active_pixel        = FRAME_WIDTH;
      
          params->dsi.ssc_disable    = 1;    //0表示开展频,1表示关展频
          params->dsi.ssc_range     = 6;    //6为展频幅度6%,此值可以修改
      
          params->dsi.PLL_CLOCK     = 205;
          
        params->dsi.esd_check_enable = 1; //enable ESD check
      	params->dsi.customization_esd_check_enable = 1; //0 TE ESD CHECK  1 LCD REG CHECK
      	params->dsi.lcm_esd_check_table[0].cmd          = 0x0F;//0X0A
      	params->dsi.lcm_esd_check_table[0].count        = 1;
      	params->dsi.lcm_esd_check_table[0].para_list[0] = 0xC0;//0X9C
        params->dsi.cont_clock    = 0;
        params->dsi.clk_lp_per_line_enable = 1;
      }
      
      static unsigned int lcm_compare_id(void);
      
      static void lcm_reset(void)
      {
          #ifdef BUILD_LK
          printf("[LK/LCM]xxxxxxx %s enter\n", __func__);
          #else
          printk("[Kernel/LCM] %s enter\n", __func__);
          #endif
      
          #ifdef BUILD_LK
          lcm_set_gpio_output(LCD_RST_PIN, GPIO_OUT_ONE);
          lcm_set_gpio_output(LCD_3V3_RST_PIN, GPIO_OUT_ONE);
          MDELAY(20);
          lcm_set_gpio_output(LCD_RST_PIN, GPIO_OUT_ZERO);
          lcm_set_gpio_output(LCD_3V3_RST_PIN, GPIO_OUT_ZERO);
          MDELAY(10);
          lcm_set_gpio_output(LCD_RST_PIN, GPIO_OUT_ONE);
          lcm_set_gpio_output(LCD_3V3_RST_PIN, GPIO_OUT_ONE);
          MDELAY(50);
      
          #else
          inettek_gpio_set("lcm_rst_en1");
          inettek_gpio_set("lcm_3v3_rst_en1");
          MDELAY(20);
          inettek_gpio_set("lcm_rst_en0");
          inettek_gpio_set("lcm_3v3_rst_en0");
          MDELAY(10);
          inettek_gpio_set("lcm_rst_en1");
          inettek_gpio_set("lcm_3v3_rst_en1");
          MDELAY(20);
          #endif
      }
      
      static void lcm_init(void)
      {
          #ifdef BUILD_LK
          printf("[LK/LCM]xxxxxxx %s enter\n", __func__);
          #else
          printk("[Kernel/LCM] %s enter\n", __func__);
          #endif
          lcm_reset();
          push_table(lcm_initialization_setting, sizeof(lcm_initialization_setting) / sizeof(struct LCM_setting_table), 1); 
      }
      
      static void lcm_resume(void)
      {
          #ifdef BUILD_LK
          printf("[LK/LCM]xxxxxxx %s enter\n", __func__);
          #else
          printk("[Kernel/LCM] %s enter\n", __func__);
          #endif
          lcm_reset();
      
          push_table(lcm_initialization_setting, sizeof(lcm_initialization_setting) / sizeof(struct LCM_setting_table), 1); 
      }
      
      static void lcm_init_power(void)
      {
          #ifdef BUILD_LK
          printf("[LK/LCM]xxxxxxx %s enter\n", __func__);
          #else
          printk("[Kernel/LCM] %s enter\n", __func__);
          #endif
      
          #ifdef BUILD_LK
          pmic_vgp2_enable(false, 1800);    //VCC_LCD8_1V8
          lcm_set_gpio_output(LCD_2V8_EN, GPIO_OUT_ONE);    //VCC_LCD_3V3
          MDELAY(20);
          pmic_vgp2_enable(true, 1800);    //VCC_LCD8_1V8
          MDELAY(10);
          lcm_set_gpio_output(LCD_AVDD_EN, GPIO_OUT_ONE);
          lcm_set_gpio_output(LCD_GAMA_EN, GPIO_OUT_ZERO);
          #else
          inettek_gpio_set("lcm_vcc_en1");
          inettek_gpio_set("lcm_avdd_en1");
          inettek_gpio_set("lcm_gama_en0");
          lcm_vgp_supply_enable();
          #endif
      }
      
      static void lcm_resume_power(void)
      {
          #ifdef BUILD_LK
          printf("[LK/LCM]xxxxxxx %s enter\n", __func__);
          #else
          printk("[Kernel/LCM] %s enter\n", __func__);
          #endif
      
          #ifdef BUILD_LK
          lcm_set_gpio_output(LCD_2V8_EN, GPIO_OUT_ONE);    //VCC_LCD_3V3
          pmic_vgp2_enable(true, 1800);    //VCC_LCD8_1V8
          lcm_set_gpio_output(LCD_AVDD_EN, GPIO_OUT_ONE);
          lcm_set_gpio_output(LCD_GAMA_EN, GPIO_OUT_ZERO);
          #else
          inettek_gpio_set("lcm_vcc_en1");
          lcm_vgp_supply_enable();
          inettek_gpio_set("lcm_avdd_en1");
          inettek_gpio_set("lcm_gama_en0");
          #endif
      }
      
      static void lcm_suspend(void)
      {
          #ifndef BUILD_LK
          //unsigned int data_array[16];
          printk("[Kernel/LCM] %s enter\n", __func__);
          // data_array[0] = 0x00280500; /* Display Off */
          // dsi_set_cmdq(data_array, 1, 1);
          // MDELAY(10);
          // data_array[0] = 0x00100500; /* Sleep In */
          // dsi_set_cmdq(data_array, 1, 1);
          // MDELAY(120);
          #endif
      }
      
      static void lcm_suspend_power(void)
      {
          #ifdef BUILD_LK
          printf("[LK/LCM]xxxxxxx %s enter\n", __func__);
          #else
          printk("[Kernel/LCM] %s enter\n", __func__);
          #endif
      
          #ifdef BUILD_LK
          lcm_set_gpio_output(LCD_2V8_EN, GPIO_OUT_ZERO);    //VCC_LCD_3V3
          pmic_vgp2_enable(false,1800);
          MDELAY(10);
          lcm_set_gpio_output(LCD_AVDD_EN, GPIO_OUT_ZERO);
          lcm_set_gpio_output(LCD_GAMA_EN, GPIO_OUT_ZERO);
          lcm_set_gpio_output(LCD_RST_PIN, GPIO_OUT_ZERO);
          lcm_set_gpio_output(LCD_3V3_RST_PIN, GPIO_OUT_ZERO);
          #else
          inettek_gpio_set("lcm_rst_en0");
          inettek_gpio_set("lcm_3v3_rst_en0");
          MDELAY(10);
          inettek_gpio_set("lcm_avdd_en0");
          inettek_gpio_set("lcm_gama_en0");
          lcm_vgp_supply_disable();
          inettek_gpio_set("lcm_vcc_en0");
          MDELAY(10);
          #endif
      }
      
      static unsigned int lcm_compare_id(void)
      {
          unsigned int id = 0xffff;
          unsigned int version_id = 0xff;
          unsigned char buffer[3];
          unsigned int hw_ver = 0;    
          unsigned int array[16];
          buffer[0] = 0xff;
          buffer[1] = 0xff;
          buffer[2] = 0xff;
      
          lcm_init_power();
          lcm_reset();
      
          // array[0] = 0x00023700;// read id return two byte,version and id
          array[0] = 0x00033700;// read id return two byte,version and id
          dsi_set_cmdq(array, 1, 1);
          read_reg_v2(0x04, buffer, 3);
      
          id = buffer[1]|(buffer[0]<<8);;    //we only need ID
          version_id = buffer[2];
      
      #ifdef BUILD_LK
          extern int g_hw_ver;
          hw_ver = g_hw_ver;
          //Read NV3052 ID, ID=0x3052, version_id=0x2, hw_ver=0x1
          printf("Read NV3052 ID, ID=0x%x, version_id=0x%x, hw_ver=0x%x\n", id , version_id , hw_ver);
          printf("[LK/LCM] %s %s is nv3052_bv055hdl_nb6! \n", __func__,hw_ver?"i50_lcm":"i70Plus_lcm");
      #else
          printk("Read NV3052 ID, ID=0x%x, version_id=0x%x, hw_ver=0x%x\n", id , version_id , hw_ver);
          printk("[Kernel/LCM] %s %s is nv3052_bv055hdl_nb6! \n", __func__,hw_ver?"i50_lcm":"i70Plus_lcm");
      #endif 
          if (hw_ver && (LCM_ID_NV3052 == id))
              return 1;
          else
              return 0;
      }
      
      LCM_DRIVER nv3052_bv055hdl_nb6_dsi_vdo_lcm_drv = {
          .name            = "nv3052_bv055hdl_nb6_dsi_vdo",
          .set_util_funcs = lcm_set_util_funcs,
          .get_params     = lcm_get_params,
          .init           = lcm_init,
          .init_power     = lcm_init_power,
          .suspend        = lcm_suspend,
          .resume         = lcm_resume,
          .resume_power    = lcm_resume_power,
          .suspend_power    = lcm_suspend_power,
          .compare_id     = lcm_compare_id,
      };
      
      发布在 其它全志芯片讨论区
      Z
      ZZZZ_

    ZZZZ_ 发布的最新帖子

    • 回复: 【已解决】D1s 调试 MIPI LCD 不亮

      @zzzz_后面解决了吗 我现在也是uboot点不亮

      发布在 MR Series
      Z
      ZZZZ_
    • 回复: t113 mipi点不亮

      @zzz555 最后怎么解决的

      发布在 其它全志芯片讨论区
      Z
      ZZZZ_
    • 全志a133的mipi屏幕 读到了id却不亮屏是怎么回事

      kernel的驱动:

      /*
       * Allwinner SoCs display driver.
       *
       * Copyright (c) 2020 Allwinnertech Co., Ltd.
       *
       * Author: libairong <libairong@allwinnertech.com>
       *
       * NV3052_BV055HDL_NB6_720X1280 panel driver
       *
       * 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 "NV3052_BV055HDL_NB6_720X1280.h"
      #include "panels.h"
      
      static void LCD_power_on(u32 sel);
      static void LCD_power_off(u32 sel);
      static void LCD_bl_open(u32 sel);
      static void LCD_bl_close(u32 sel);
      
      static void LCD_panel_init(u32 sel);
      static void LCD_panel_exit(u32 sel);
      
      #define panel_reset(val)     sunxi_lcd_gpio_set_value(sel, 0, val)  /* PD22 - RESET */
      #define power_1v8(val)       sunxi_lcd_gpio_set_value(sel, 1, val)  /* PB7  - 1.8V */
      #define power_3v3(val)       sunxi_lcd_gpio_set_value(sel, 2, val)  /* PB5  - 3.3V */
      #define power_vspvsn(val)    sunxi_lcd_gpio_set_value(sel, 3, val)  /* PB6  - VSP/VSN */
      
      static void
      LCD_cfg_panel_info(struct panel_extend_para *info)
      {
          printk("[LCD] %s: enter\n", __func__);
      	u32 i = 0, j = 0;
      	u32 items;
      	u8 lcd_gamma_tbl[][2] = {
      		{0, 0},
      		{15, 15},
      		{30, 30},
      		{45, 45},
      		{60, 60},
      		{75, 75},
      		{90, 90},
      		{105, 105},
      		{120, 120},
      		{135, 135},
      		{150, 150},
      		{165, 165},
      		{180, 180},
      		{195, 195},
      		{210, 210},
      		{225, 225},
      		{240, 240},
      		{255, 255},
      	};
      
      	u32 lcd_cmap_tbl[2][3][4] = {
      		{
      			{LCD_CMAP_G0, LCD_CMAP_B1, LCD_CMAP_G2, LCD_CMAP_B3},
      			{LCD_CMAP_B0, LCD_CMAP_R1, LCD_CMAP_B2, LCD_CMAP_R3},
      			{LCD_CMAP_R0, LCD_CMAP_G1, LCD_CMAP_R2, LCD_CMAP_G3},
      		},
      		{
      			{LCD_CMAP_B3, LCD_CMAP_G2, LCD_CMAP_B1, LCD_CMAP_G0},
      			{LCD_CMAP_R3, LCD_CMAP_B2, LCD_CMAP_R1, LCD_CMAP_B0},
      			{LCD_CMAP_G3, LCD_CMAP_R2, LCD_CMAP_G1, LCD_CMAP_R0},
      		},
      	};
      
      	items = sizeof(lcd_gamma_tbl) / 2;
      
      	for (i = 0; i < items - 1; i++) {
      		u32 num = lcd_gamma_tbl[i + 1][0] - lcd_gamma_tbl[i][0];
      
      		for (j = 0; j < num; j++) {
      			u32 value = 0;
      
      			value = lcd_gamma_tbl[i][1] + ((lcd_gamma_tbl[i + 1][1]
      						- lcd_gamma_tbl[i][1]) * j) / num;
      			info->lcd_gamma_tbl[lcd_gamma_tbl[i][0] + j] =
      									(value << 16) + (value << 8) + value;
      		}
      	}
      
      	info->lcd_gamma_tbl[255] = (lcd_gamma_tbl[items - 1][1] << 16)
      								+ (lcd_gamma_tbl[items - 1][1] << 8)
      								+ lcd_gamma_tbl[items - 1][1];
      
      	memcpy(info->lcd_cmap_tbl, lcd_cmap_tbl, sizeof(lcd_cmap_tbl));
          printk("[LCD] %s: exit\n", __func__);
      }
      
      static s32 LCD_open_flow(u32 sel)
      {
          printk("[LCD] %s: sel=%d\n", __func__, sel);
      	LCD_OPEN_FUNC(sel, LCD_power_on, 100); // open lcd power, and delay 50ms
      	LCD_OPEN_FUNC(sel, LCD_panel_init, 200); // open lcd power, than delay 200ms
      	LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 50); // open lcd controller, and delay 100ms
      	LCD_OPEN_FUNC(sel, LCD_bl_open, 0); // open lcd backlight, and delay 0ms
      
      	return 0;
      }
      
      static s32 LCD_close_flow(u32 sel)
      {
          printk("LCD_close_flow\n");
      	LCD_CLOSE_FUNC(sel, LCD_bl_close, 200); // close lcd backlight, and delay 0ms
      	LCD_CLOSE_FUNC(sel, sunxi_lcd_tcon_disable, 20); // close lcd controller, and delay 0ms
      	LCD_CLOSE_FUNC(sel, LCD_panel_exit, 10); // open lcd power, than delay 200ms
      	LCD_CLOSE_FUNC(sel, LCD_power_off, 500); // close lcd power, and delay 500ms
      
      	return 0;
      }
      
      static void LCD_power_on(u32 sel)
      {
          printk("LCD_power_on\n");
      
      	panel_reset(0);
      	sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_enable(sel, 0); // config lcd_power pin to open lcd power
          sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_enable(sel, 1); // config lcd_power pin to open lcd power1
          sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_enable(sel, 2); // config lcd_power pin to open lcd power2
      	sunxi_lcd_delay_ms(5);
      	panel_reset(0);
      	power_vspvsn(0);
      	power_1v8(0);
      	sunxi_lcd_delay_ms(50);
      	power_3v3(1);
      	power_1v8(1);
      	sunxi_lcd_delay_ms(10);
      	power_vspvsn(1);
      	panel_reset(1);
      	sunxi_lcd_delay_ms(50);
      	panel_reset(0);
      	sunxi_lcd_delay_ms(50);
      	panel_reset(1);
      	sunxi_lcd_delay_ms(50);
      	sunxi_lcd_pin_cfg(sel, 1);
      }
      
      static void LCD_power_off(u32 sel)
      {
          printk("LCD_power_off\n");
      	sunxi_lcd_pin_cfg(sel, 0);
      	power_vspvsn(0);
      	power_1v8(0);
      	power_3v3(0);
      	sunxi_lcd_delay_ms(20);
      	panel_reset(0);
          sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_disable(sel, 2); // config lcd_power pin to close lcd power2
          sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_disable(sel, 1); // config lcd_power pin to close lcd power1
          sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_disable(sel, 0); // config lcd_power pin to close lcd power
      }
      
      static void LCD_bl_open(u32 sel)
      {
          printk("[LCD] %s: PWM enable\n", __func__);
      	sunxi_lcd_pwm_enable(sel);
          sunxi_lcd_delay_ms(50);
      	sunxi_lcd_backlight_enable(sel); // config lcd_bl_en pin to open lcd backlight
      }
      
      static void LCD_bl_close(u32 sel)
      {
          printk("LCD_bl_close\n");
      	sunxi_lcd_backlight_disable(sel); // config lcd_bl_en pin to close lcd backlight
      	sunxi_lcd_pwm_disable(sel);
      }
      
      #define REGFLAG_DELAY						0XFE
      #define REGFLAG_END_OF_TABLE				0xFD   // END OF REGISTERS MARKER
      
      struct LCM_setting_table {
      	u8 cmd;
      	u32 count;
      	u8 para_list[64];
      };
      
      /* add panel initialization below */
      static struct LCM_setting_table lcm_initialization_setting[] = {
      //----------NV305F+BOE5.5(BV055HDL-NB6) Initial------------------
          {REGFLAG_DELAY, REGFLAG_DELAY, {120}},
      
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x01}},
          {0xE3,0x01,{0x04}},
          {0x08,0x01,{0x0e}},
          {0x25,0x01,{0x10}},
          {0x28,0x01,{0x5F}},
          {0x2C,0x01,{0x22}},
          {0x30,0x01,{0x58}},
          {0x45,0x01,{0x91}},
          {0x37,0x01,{0x9C}},
          {0x38,0x01,{0xA7}},
          {0x39,0x01,{0x27}},
          {0x44,0x01,{0x00}},
          {0x49,0x01,{0x1C}},
          {0x59,0x01,{0xFE}},
          {0x5C,0x01,{0x00}},
          {0x91,0x01,{0x77}},
          {0x92,0x01,{0x77}},
          {0xA0,0x01,{0x55}},
          {0xA1,0x01,{0x50}},
          {0xA3,0x01,{0x58}},
          {0xA4,0x01,{0x9C}},
          {0xA7,0x01,{0x02}},
          {0xA8,0x01,{0x01}},
          {0xA9,0x01,{0x01}},
          {0xAA,0x01,{0xFC}},
          {0xAB,0x01,{0x28}},
          {0xAC,0x01,{0x06}},
          {0xAD,0x01,{0x06}},
          {0xAE,0x01,{0x06}},
          {0xAF,0x01,{0x03}},
          {0xB0,0x01,{0x08}},
          {0xB1,0x01,{0x26}},
          {0xB2,0x01,{0x28}},
          {0xB3,0x01,{0x28}},
          {0xB4,0x01,{0x03}},
          {0xB5,0x01,{0x08}},
          {0xB6,0x01,{0x26}},
          {0xB7,0x01,{0x08}},
          {0xB8,0x01,{0x26}},
      
          {0xc0,0x01,{0x00}},
          {0xc1,0x01,{0x00}},
          {0xc3,0x01,{0x0F}},
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x02}},
          {0xB0,0x01,{0x00}},
          {0xB1,0x01,{0x05}},
          {0xB2,0x01,{0x02}},
          {0xB3,0x01,{0x24}},
          {0xB4,0x01,{0x25}},
          {0xB5,0x01,{0x30}},
          {0xB6,0x01,{0x0C}},
          {0xB7,0x01,{0x27}},
          {0xB8,0x01,{0x0F}},
          {0xB9,0x01,{0x05}},
          {0xBA,0x01,{0x11}},
          {0xBB,0x01,{0x10}},
          {0xBC,0x01,{0x11}},
          {0xBD,0x01,{0x12}},
          {0xBE,0x01,{0x17}},
          {0xBF,0x01,{0x0C}},
          {0xC0,0x01,{0x14}},
          {0xC1,0x01,{0x0A}},
          {0xD0,0x01,{0x08}},
          {0xD1,0x01,{0x0F}},
          {0xD2,0x01,{0x09}},
          {0xD3,0x01,{0x35}},
          {0xD4,0x01,{0x38}},
          {0xD5,0x01,{0x3D}},
          {0xD6,0x01,{0x1B}},
          {0xD7,0x01,{0x3B}},
          {0xD8,0x01,{0x0F}},
          {0xD9,0x01,{0x05}},
          {0xDA,0x01,{0x11}},
          {0xDB,0x01,{0x10}},
          {0xDC,0x01,{0x11}},
          {0xDD,0x01,{0x14}},
          {0xDE,0x01,{0x19}},
          {0xDF,0x01,{0x11}},
          {0xE0,0x01,{0x19}},
          {0xE1,0x01,{0x09}},
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x03}},
          {0x08,0x01,{0x8B}},
          {0x09,0x01,{0x8A}},
          {0x0A,0x01,{0x89}},
          {0x0B,0x01,{0x88}},
          {0x34,0x01,{0x61}},
          {0x35,0x01,{0xD4}},
          {0x36,0x01,{0x24}},
          {0x37,0x01,{0x03}},
          {0x40,0x01,{0x8B}},
          {0x41,0x01,{0x8A}},
          {0x42,0x01,{0x89}},
          {0x43,0x01,{0x88}},
          {0x45,0x01,{0x01}},
          {0x46,0x01,{0x02}},
          {0x48,0x01,{0x03}},
          {0x49,0x01,{0x04}},
          {0x50,0x01,{0x87}},
          {0x51,0x01,{0x86}},
          {0x52,0x01,{0x85}},
          {0x53,0x01,{0x84}},
          {0x55,0x01,{0x05}},
          {0x56,0x01,{0x06}},
          {0x58,0x01,{0x07}},
          {0x59,0x01,{0x08}},
          {0x80,0x01,{0x0F}},
          {0x81,0x01,{0x0E}},
          {0x82,0x01,{0x07}},
          {0x83,0x01,{0x06}},
          {0x84,0x01,{0x05}},
          {0x85,0x01,{0x04}},
          {0x92,0x01,{0x0E}},
          {0x93,0x01,{0x0F}},
          {0x94,0x01,{0x01}},
          {0x95,0x01,{0x00}},
          {0x96,0x01,{0x0F}},
          {0x97,0x01,{0x0E}},
          {0x98,0x01,{0x07}},
          {0x99,0x01,{0x06}},
          {0x9A,0x01,{0x05}},
          {0x9B,0x01,{0x04}},
          {0xA8,0x01,{0x0E}},
          {0xA9,0x01,{0x0F}},
          {0xAA,0x01,{0x01}},
          {0xAB,0x01,{0x00}},
          {0xE0,0x01,{0x02}},
          {0xE1,0x01,{0x52}},
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x00}},
          {0x35,0x01,{0x00}},
          {0x36,0x01,{0x02}},
          {0x53,0x01,{0x2C}},
      
      	{0x11, 0, {0x00}},
      	{REGFLAG_DELAY, REGFLAG_DELAY, {200}},
      
      	{0x29, 0, {0x00}},
      	{REGFLAG_DELAY, REGFLAG_DELAY, {100}},
      
      	{REGFLAG_END_OF_TABLE, REGFLAG_END_OF_TABLE, {0x00}}
      
      };
      
      static void LCD_panel_init(u32 sel)
      {
          printk("[LCD] %s: uboot, first cmd=0x%02X\n", __func__,
                 lcm_initialization_setting[0].cmd);
      	__u32 i;
      	char model_name[25];
      
      	disp_sys_script_get_item("lcd0", "lcd_model_name", (int *) model_name, 25);
      	sunxi_lcd_dsi_clk_enable(sel);
      	sunxi_lcd_delay_ms(20);
          sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_SOFT_RESET);
      	sunxi_lcd_delay_ms(10);
      
      	for (i = 0; ; i++) {
      		if (lcm_initialization_setting[i].count == REGFLAG_END_OF_TABLE)
      			break;
      		else if (lcm_initialization_setting[i].count == REGFLAG_DELAY)
      			sunxi_lcd_delay_ms(lcm_initialization_setting[i].para_list[0]);
      
      #ifdef SUPPORT_DSI
      		else
      			dsi_dcs_wr(sel, lcm_initialization_setting[i].cmd,
      						lcm_initialization_setting[i].para_list,
      						lcm_initialization_setting[i].count);
      #endif
      		//break;
      	}
          printk("[LCD] %s: finish\n", __func__);
      	return;
      }
      
      static void LCD_panel_exit(u32 sel)
      {
      	sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_SET_DISPLAY_OFF);
          sunxi_lcd_delay_ms(20);
      	sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_ENTER_SLEEP_MODE);
          sunxi_lcd_delay_ms(80);
      
          return ;
      }
      
      // sel: 0:lcd0; 1:lcd1
      static s32 LCD_user_defined_func(u32 sel, u32 para1, u32 para2, u32 para3)
      {
      	return 0;
      }
      
      // sel: 0:lcd0; 1:lcd1
      /*
       * static s32 LCD_set_bright(u32 sel, u32 bright)
       * {
       *	sunxi_lcd_dsi_dcs_write_1para(sel, 0x51, bright);
       *	return 0;
       * }
       */
      
      struct __lcd_panel NV3052_BV055HDL_NB6_720X1280_mipi_panel = {
      	/* panel driver name, must mach the name of lcd_drv_name in sys_config.fex */
      	.name = "NV3052_BV055HDL_NB6_720X1280",
      	.func = {
      		.cfg_panel_info = LCD_cfg_panel_info,
      		.cfg_open_flow = LCD_open_flow,
      		.cfg_close_flow = LCD_close_flow,
      		.lcd_user_defined_func = LCD_user_defined_func,
      		// .set_bright = LCD_set_bright,
      	},
      };
      

      uboot的驱动:

      /*
       * Allwinner SoCs display driver.
       *
       * Copyright (c) 2020 Allwinnertech Co., Ltd.
       *
       * Author: libairong <libairong@allwinnertech.com>
       *
       * NV3052_BV055HDL_NB6_720X1280 panel driver
       *
       * 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 "NV3052_BV055HDL_NB6_720X1280.h"
      #include "panels.h"
      
      static void LCD_power_on(u32 sel);
      static void LCD_power_off(u32 sel);
      static void LCD_bl_open(u32 sel);
      static void LCD_bl_close(u32 sel);
      
      static void LCD_panel_init(u32 sel);
      static void LCD_panel_exit(u32 sel);
      
      #define panel_reset(val)     sunxi_lcd_gpio_set_value(sel, 0, val)  /* PD22 - RESET */
      #define power_1v8(val)       sunxi_lcd_gpio_set_value(sel, 1, val)  /* PB7  - 1.8V */
      #define power_3v3(val)       sunxi_lcd_gpio_set_value(sel, 2, val)  /* PB5  - 3.3V */
      #define power_vspvsn(val)    sunxi_lcd_gpio_set_value(sel, 3, val)  /* PB6  - VSP/VSN */
      
      static void
      LCD_cfg_panel_info(panel_extend_para *info)
      {
          printf("[LCD] %s: enter\n", __func__);
      	u32 i = 0, j = 0;
      	u32 items;
      	u8 lcd_gamma_tbl[][2] = {
      		{0, 0},
      		{15, 15},
      		{30, 30},
      		{45, 45},
      		{60, 60},
      		{75, 75},
      		{90, 90},
      		{105, 105},
      		{120, 120},
      		{135, 135},
      		{150, 150},
      		{165, 165},
      		{180, 180},
      		{195, 195},
      		{210, 210},
      		{225, 225},
      		{240, 240},
      		{255, 255},
      	};
      
      	u32 lcd_cmap_tbl[2][3][4] = {
      		{
      			{LCD_CMAP_G0, LCD_CMAP_B1, LCD_CMAP_G2, LCD_CMAP_B3},
      			{LCD_CMAP_B0, LCD_CMAP_R1, LCD_CMAP_B2, LCD_CMAP_R3},
      			{LCD_CMAP_R0, LCD_CMAP_G1, LCD_CMAP_R2, LCD_CMAP_G3},
      		},
      		{
      			{LCD_CMAP_B3, LCD_CMAP_G2, LCD_CMAP_B1, LCD_CMAP_G0},
      			{LCD_CMAP_R3, LCD_CMAP_B2, LCD_CMAP_R1, LCD_CMAP_B0},
      			{LCD_CMAP_G3, LCD_CMAP_R2, LCD_CMAP_G1, LCD_CMAP_R0},
      		},
      	};
      
      	items = sizeof(lcd_gamma_tbl) / 2;
      
      	for (i = 0; i < items - 1; i++) {
      		u32 num = lcd_gamma_tbl[i + 1][0] - lcd_gamma_tbl[i][0];
      
      		for (j = 0; j < num; j++) {
      			u32 value = 0;
      
      			value = lcd_gamma_tbl[i][1] + ((lcd_gamma_tbl[i + 1][1]
      						- lcd_gamma_tbl[i][1]) * j) / num;
      			info->lcd_gamma_tbl[lcd_gamma_tbl[i][0] + j] =
      									(value << 16) + (value << 8) + value;
      		}
      	}
      
      	info->lcd_gamma_tbl[255] = (lcd_gamma_tbl[items - 1][1] << 16)
      								+ (lcd_gamma_tbl[items - 1][1] << 8)
      								+ lcd_gamma_tbl[items - 1][1];
      
      	memcpy(info->lcd_cmap_tbl, lcd_cmap_tbl, sizeof(lcd_cmap_tbl));
      
          printf("[LCD] %s: exit\n", __func__);
      }
      
      static s32 LCD_open_flow(u32 sel)
      {
          printf("[LCD] %s: sel=%d\n", __func__, sel);
      	LCD_OPEN_FUNC(sel, LCD_power_on, 0);
      	// LCD_OPEN_FUNC(sel, LCD_panel_init1, 20);
      	LCD_OPEN_FUNC(sel, LCD_panel_init, 200); // open lcd power, than delay 200ms
      	LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 50);
      	LCD_OPEN_FUNC(sel, LCD_bl_open, 0);
      
      	return 0;
      }
      
      static s32 LCD_close_flow(u32 sel)
      {
          printf("LCD_close_flow\n");
      	LCD_CLOSE_FUNC(sel, LCD_bl_close, 200); // close lcd backlight, and delay 0ms
      	LCD_CLOSE_FUNC(sel, sunxi_lcd_tcon_disable, 20); // close lcd controller, and delay 0ms
      	LCD_CLOSE_FUNC(sel, LCD_panel_exit, 10); // open lcd power, than delay 200ms
      	LCD_CLOSE_FUNC(sel, LCD_power_off, 500); // close lcd power, and delay 500ms
      
      	return 0;
      }
      
      static void LCD_power_on(u32 sel)
      {
          printf("LCD_power_on\n");
      	// panel_reset(0);
      	// sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_enable(sel, 0); // config lcd_power pin to open lcd power
          sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_enable(sel, 1); // config lcd_power pin to open lcd power1
          sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_enable(sel, 2); // config lcd_power pin to open lcd power2
      	sunxi_lcd_delay_ms(5);
      	panel_reset(0);
      	power_vspvsn(0);
      	power_1v8(0);
      	sunxi_lcd_delay_ms(10);
      
      	power_3v3(1);
      	power_1v8(1);
      	sunxi_lcd_delay_ms(50);
      	power_vspvsn(1);
      
      	panel_reset(1);
      	sunxi_lcd_delay_ms(50);
      	panel_reset(0);
      	sunxi_lcd_delay_ms(50);
      	panel_reset(1);
      	sunxi_lcd_delay_ms(50);
      	sunxi_lcd_pin_cfg(sel, 1);
      }
      
      static void LCD_power_off(u32 sel)
      {
          printf("LCD_power_off\n");
      	sunxi_lcd_pin_cfg(sel, 0);
      	power_vspvsn(0);
      	power_1v8(0);
      	power_3v3(0);
      	sunxi_lcd_delay_ms(20);
      	panel_reset(0);
          sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_disable(sel, 2); // config lcd_power pin to close lcd power2
          sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_disable(sel, 1); // config lcd_power pin to close lcd power1
          sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_disable(sel, 0); // config lcd_power pin to close lcd power
      }
      
      static void LCD_bl_open(u32 sel)
      {
          printf("[LCD] %s: PWM enable\n", __func__);
      	sunxi_lcd_pwm_enable(sel);
          sunxi_lcd_delay_ms(50);
      	sunxi_lcd_backlight_enable(sel); // config lcd_bl_en pin to open lcd backlight
      }
      
      static void LCD_bl_close(u32 sel)
      {
          printf("LCD_bl_close\n");
      	sunxi_lcd_backlight_disable(sel); // config lcd_bl_en pin to close lcd backlight
          sunxi_lcd_delay_ms(20);
      	sunxi_lcd_pwm_disable(sel);
      }
      
      #define REGFLAG_DELAY						0XFE
      #define REGFLAG_END_OF_TABLE      			0xFD   // END OF REGISTERS MARKER
      
      struct LCM_setting_table {
      	u8 cmd;
      	u32 count;
      	u8 para_list[64];
      };
      
      /* add panel initialization below */
      static struct LCM_setting_table lcm_initialization_setting[] = {
      //----------NV305F+BOE5.5(BV055HDL-NB6) Initial------------------
          {REGFLAG_DELAY, REGFLAG_DELAY, {120}},
      
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x01}},
          {0xE3,0x01,{0x04}},
          {0x08,0x01,{0x0e}},
          {0x25,0x01,{0x10}},
          {0x28,0x01,{0x5F}},
          {0x2C,0x01,{0x22}},
          {0x30,0x01,{0x58}},
          {0x45,0x01,{0x91}},
          {0x37,0x01,{0x9C}},
          {0x38,0x01,{0xA7}},
          {0x39,0x01,{0x27}},
          {0x44,0x01,{0x00}},
          {0x49,0x01,{0x1C}},
          {0x59,0x01,{0xFE}},
          {0x5C,0x01,{0x00}},
          {0x91,0x01,{0x77}},
          {0x92,0x01,{0x77}},
          {0xA0,0x01,{0x55}},
          {0xA1,0x01,{0x50}},
          {0xA3,0x01,{0x58}},
          {0xA4,0x01,{0x9C}},
          {0xA7,0x01,{0x02}},
          {0xA8,0x01,{0x01}},
          {0xA9,0x01,{0x01}},
          {0xAA,0x01,{0xFC}},
          {0xAB,0x01,{0x28}},
          {0xAC,0x01,{0x06}},
          {0xAD,0x01,{0x06}},
          {0xAE,0x01,{0x06}},
          {0xAF,0x01,{0x03}},
          {0xB0,0x01,{0x08}},
          {0xB1,0x01,{0x26}},
          {0xB2,0x01,{0x28}},
          {0xB3,0x01,{0x28}},
          {0xB4,0x01,{0x03}},
          {0xB5,0x01,{0x08}},
          {0xB6,0x01,{0x26}},
          {0xB7,0x01,{0x08}},
          {0xB8,0x01,{0x26}},
      
          {0xc0,0x01,{0x00}},
          {0xc1,0x01,{0x00}},
          {0xc3,0x01,{0x0F}},
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x02}},
          {0xB0,0x01,{0x00}},
          {0xB1,0x01,{0x05}},
          {0xB2,0x01,{0x02}},
          {0xB3,0x01,{0x24}},
          {0xB4,0x01,{0x25}},
          {0xB5,0x01,{0x30}},
          {0xB6,0x01,{0x0C}},
          {0xB7,0x01,{0x27}},
          {0xB8,0x01,{0x0F}},
          {0xB9,0x01,{0x05}},
          {0xBA,0x01,{0x11}},
          {0xBB,0x01,{0x10}},
          {0xBC,0x01,{0x11}},
          {0xBD,0x01,{0x12}},
          {0xBE,0x01,{0x17}},
          {0xBF,0x01,{0x0C}},
          {0xC0,0x01,{0x14}},
          {0xC1,0x01,{0x0A}},
          {0xD0,0x01,{0x08}},
          {0xD1,0x01,{0x0F}},
          {0xD2,0x01,{0x09}},
          {0xD3,0x01,{0x35}},
          {0xD4,0x01,{0x38}},
          {0xD5,0x01,{0x3D}},
          {0xD6,0x01,{0x1B}},
          {0xD7,0x01,{0x3B}},
          {0xD8,0x01,{0x0F}},
          {0xD9,0x01,{0x05}},
          {0xDA,0x01,{0x11}},
          {0xDB,0x01,{0x10}},
          {0xDC,0x01,{0x11}},
          {0xDD,0x01,{0x14}},
          {0xDE,0x01,{0x19}},
          {0xDF,0x01,{0x11}},
          {0xE0,0x01,{0x19}},
          {0xE1,0x01,{0x09}},
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x03}},
          {0x08,0x01,{0x8B}},
          {0x09,0x01,{0x8A}},
          {0x0A,0x01,{0x89}},
          {0x0B,0x01,{0x88}},
          {0x34,0x01,{0x61}},
          {0x35,0x01,{0xD4}},
          {0x36,0x01,{0x24}},
          {0x37,0x01,{0x03}},
          {0x40,0x01,{0x8B}},
          {0x41,0x01,{0x8A}},
          {0x42,0x01,{0x89}},
          {0x43,0x01,{0x88}},
          {0x45,0x01,{0x01}},
          {0x46,0x01,{0x02}},
          {0x48,0x01,{0x03}},
          {0x49,0x01,{0x04}},
          {0x50,0x01,{0x87}},
          {0x51,0x01,{0x86}},
          {0x52,0x01,{0x85}},
          {0x53,0x01,{0x84}},
          {0x55,0x01,{0x05}},
          {0x56,0x01,{0x06}},
          {0x58,0x01,{0x07}},
          {0x59,0x01,{0x08}},
          {0x80,0x01,{0x0F}},
          {0x81,0x01,{0x0E}},
          {0x82,0x01,{0x07}},
          {0x83,0x01,{0x06}},
          {0x84,0x01,{0x05}},
          {0x85,0x01,{0x04}},
          {0x92,0x01,{0x0E}},
          {0x93,0x01,{0x0F}},
          {0x94,0x01,{0x01}},
          {0x95,0x01,{0x00}},
          {0x96,0x01,{0x0F}},
          {0x97,0x01,{0x0E}},
          {0x98,0x01,{0x07}},
          {0x99,0x01,{0x06}},
          {0x9A,0x01,{0x05}},
          {0x9B,0x01,{0x04}},
          {0xA8,0x01,{0x0E}},
          {0xA9,0x01,{0x0F}},
          {0xAA,0x01,{0x01}},
          {0xAB,0x01,{0x00}},
          {0xE0,0x01,{0x02}},
          {0xE1,0x01,{0x52}},
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x00}},
          {0x35,0x01,{0x00}},
          {0x36,0x01,{0x02}},
          {0x53,0x01,{0x2C}},
      
      	{0x11, 0, {0x00}},
      	{REGFLAG_DELAY, REGFLAG_DELAY, {200}},
      
      	{0x29, 0, {0x00}},
      	{REGFLAG_DELAY, REGFLAG_DELAY, {100}},
      
      	{REGFLAG_END_OF_TABLE, REGFLAG_END_OF_TABLE, {0x00}}
      
      };
      
      static void LCD_panel_init(u32 sel)
      {
          printf("[LCD] %s: uboot, first cmd=0x%02X\n", __func__,
                 lcm_initialization_setting[0].cmd);
      	__u32 i;
      	char model_name[25];
      
      	disp_sys_script_get_item("lcd0", "lcd_model_name", (int *) model_name, 25);
      	sunxi_lcd_dsi_clk_enable(sel);
      	sunxi_lcd_delay_ms(20);
          sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_SOFT_RESET);
      	sunxi_lcd_delay_ms(10);
      
      	for (i = 0; ; i++) {
      		if (lcm_initialization_setting[i].count == REGFLAG_END_OF_TABLE)
      			break;
      		else if (lcm_initialization_setting[i].count == REGFLAG_DELAY)
      			sunxi_lcd_delay_ms(lcm_initialization_setting[i].para_list[0]);
      
      #ifdef SUPPORT_DSI
      		else
      			dsi_dcs_wr(sel, lcm_initialization_setting[i].cmd,
      						lcm_initialization_setting[i].para_list,
      						lcm_initialization_setting[i].count);
      #endif
      		//break;
      	}
      
          printf("[LCD] %s: finish\n", __func__);
      	return;
      }
      
      static void LCD_panel_exit(u32 sel)
      {
      	sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_SET_DISPLAY_OFF);
          sunxi_lcd_delay_ms(20);
      	sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_ENTER_SLEEP_MODE);
          sunxi_lcd_delay_ms(80);
      
          return ;
      }
      
      // sel: 0:lcd0; 1:lcd1
      static s32 LCD_user_defined_func(u32 sel, u32 para1, u32 para2, u32 para3)
      {
      	return 0;
      }
      
      // sel: 0:lcd0; 1:lcd1
      /*
       * static s32 LCD_set_bright(u32 sel, u32 bright)
       * {
       *	sunxi_lcd_dsi_dcs_write_1para(sel, 0x51, bright);
       *	return 0;
       * }
       */
      
      __lcd_panel_t NV3052_BV055HDL_NB6_720X1280_mipi_panel = {
      	/* panel driver name, must mach the name of lcd_drv_name in sys_config.fex */
      	.name = "NV3052_BV055HDL_NB6_720X1280",
      	.func = {
      		.cfg_panel_info = LCD_cfg_panel_info,
      		.cfg_open_flow = LCD_open_flow,
      		.cfg_close_flow = LCD_close_flow,
      		.lcd_user_defined_func = LCD_user_defined_func,
      		// .set_bright = LCD_set_bright,
      	},
      };
      

      设备树:

      lcd0_1: lcd0_1@01c0c00f {
      			lcd_used            = <1>;
      			lcd_driver_name     = "NV3052_BV055HDL_NB6_720X1280";
      			lcd_backlight       = <50>;
      			lcd_if              = <4>;
      
      			lcd_x               = <720>;
      			lcd_y               = <1280>;
      			lcd_width           = <108>;
      			lcd_height          = <172>;
      			lcd_dclk_freq       = <64>;
      
      			lcd_pwm_used        = <0>;
      			lcd_pwm_ch          = <0>;
      			lcd_pwm_freq        = <50000>;
      			lcd_pwm_pol         = <1>;
      			lcd_pwm_max_limit   = <255>;
      
      
      			lcd_hbp             = <44>;
      			lcd_ht              = <814>;
      			lcd_hspw            = <4>;
      			lcd_vbp             = <14>;
      			lcd_vt              = <1314>;
      			lcd_vspw            = <4>;
      
      			lcd_frm             = <0>;
      			lcd_gamma_en        = <0>;
      			lcd_bright_curve_en = <0>;
      			lcd_cmap_en         = <0>;
      
      			deu_mode            = <0>;
      			lcdgamma4iep        = <22>;
      			smart_color         = <90>;
      
      			lcd_dsi_if          = <0>;
      			lcd_dsi_lane        = <4>;
      			lcd_dsi_format      = <0>;
      			lcd_dsi_te          = <0>;
      			lcd_dsi_eotp        = <0>;
      
      			//lcd_pin_power = "dcdc1";
      
      			lcd_power = "cldo4";
      			lcd_power1 = "cldo3";
      			lcd_power2 = "cldo1";
      
      	
      			lcd_gpio_0 = <&pio PD 22 1 0 3 1>; /* RESET - gpio_index=0 */
      			lcd_gpio_1 = <&pio PB 7 1 0 3 1>;  /* 1.8V  - gpio_index=1 */
      			lcd_gpio_2 = <&pio PB 5 1 0 3 1>;  /* 3.3V  - gpio_index=2 */
      			lcd_gpio_3 = <&pio PB 6 1 0 3 1>;  /* VSP/VSN - gpio_index=3 */
      
      			pinctrl-0           = <&dsi4lane_pins_a>;
      			pinctrl-1           = <&dsi4lane_pins_b>;
      
      			//lcd_bl_en 			= <&pio PD 23 1 0 3 1>;
      			lcd_bl_0_percent    = <15>;
      			lcd_bl_100_percent  = <100>;
      		};
      

      日志:

      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_cfg_panel_info: enter
      [LCD] LCD_cfg_panel_info: enter
      [LCD] LCD_cfg_panel_info: exit
      [LCD] LCD_cfg_panel_info: exit
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_open_flow: sel=0
      LCD_power_on
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_panel_try_switch: screen 0 - reading panel ID via DCS
      [LCD] LCD_panel_try_switch: screen 0 - reading panel ID via DCS
      [LCD] LCD_panel_try_switch: ID bytes = 30 52 02 (0x305202)
      [LCD] LCD_panel_try_switch: ID bytes = 30 52 02 (0x305202)
      [LCD] LCD_panel_try_switch: screen 0 - switch compat panel (id mismatch)
      [LCD] LCD_panel_try_switch: screen 0 - switch compat panel (id mismatch)
      LCD_power_off
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_cfg_panel_info: enter
      [LCD] LCD_cfg_panel_info: enter
      [LCD] LCD_cfg_panel_info: exit
      [LCD] LCD_cfg_panel_info: exit
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_open_flow: sel=0
      LCD_power_on
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_panel_init: uboot, first cmd=0xFE
      [LCD] LCD_panel_init: uboot, first cmd=0xFE
      [LCD] LCD_panel_init: finish
      [LCD] LCD_panel_init: finish
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_bl_open: PWM enable
      [LCD] LCD_bl_open: PWM enable
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_open_flow: sel=0
      [LCD] LCD_open_flow: sel=0
      [06.956]LCD open finish
      [    1.393981] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.smartbl_low_limit fail
      [    1.403208] [DISP] disp_init_lcd,line:3243:disp_init_lcd
      [    1.403208] [DISP] disp_init_lcd,line:3243:disp_init_lcd
      [    1.408480] [DISP] disp_init_lcd,line:3317:total number of clk in dsi:1
      [    1.414884] [DISP] disp_init_lcd,line:3320:lcd 0, irq_no=362, irq_no_dsi=364
      [    1.414884] [DISP] disp_init_lcd,line:3320:lcd 0, irq_no=362, irq_no_dsi=364
      [    1.421905] [DISP] disp_lcd_init,line:2710:lcd 0
      [    1.421905] [DISP] disp_lcd_init,line:2710:lcd 0
      [    1.426487] [DISP] lcd_get_sys_config,line:360:lcd0 get sys config begin
      [    1.426487] [DISP] lcd_get_sys_config,line:360:lcd0 get sys config begin
      [    1.433526] [DISP] disp_sys_script_get_item,line:237:lcd0.lcd_bl_en gpio=119,mul_sel=1,data:1
      [    1.433526] [DISP] disp_sys_script_get_item,line:237:lcd0.lcd_bl_en gpio=119,mul_sel=1,data:1
      [    1.441832] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_bl_en_power fail
      [    1.441832] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_bl_en_power fail
      [    1.451105] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_fix_power fail
      [    1.451105] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_fix_power fail
      [    1.460205] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_fix_power1 fail
      [    1.460205] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_fix_power1 fail
      [    1.469394] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_fix_power2 fail
      [    1.469394] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_fix_power2 fail
      [    1.478578] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_fix_power3 fail
      [    1.478578] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_fix_power3 fail
      [    1.488284] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_power3 fail
      [    1.488284] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_power3 fail
      [    1.496614] [DISP] disp_sys_script_get_item,line:237:lcd0.lcd_gpio_0 gpio=118,mul_sel=1,data:1
      [    1.496614] [DISP] disp_sys_script_get_item,line:237:lcd0.lcd_gpio_0 gpio=118,mul_sel=1,data:1
      [    1.505193] [DISP] disp_sys_script_get_item,line:237:lcd0.lcd_gpio_1 gpio=39,mul_sel=1,data:1
      [    1.505193] [DISP] disp_sys_script_get_item,line:237:lcd0.lcd_gpio_1 gpio=39,mul_sel=1,data:1
      [    1.513690] [DISP] disp_sys_script_get_item,line:237:lcd0.lcd_gpio_2 gpio=37,mul_sel=1,data:1
      [    1.513690] [DISP] disp_sys_script_get_item,line:237:lcd0.lcd_gpio_2 gpio=37,mul_sel=1,data:1
      [    1.522185] [DISP] disp_sys_script_get_item,line:237:lcd0.lcd_gpio_3 gpio=38,mul_sel=1,data:1
      [    1.522185] [DISP] disp_sys_script_get_item,line:237:lcd0.lcd_gpio_3 gpio=38,mul_sel=1,data:1
      [    1.531342] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_gpio_power0 fail
      [    1.531342] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_gpio_power0 fail
      [    1.539940] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_gpio_power1 fail
      [    1.539940] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_gpio_power1 fail
      [    1.549215] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_gpio_power2 fail
      [    1.549215] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_gpio_power2 fail
      [    1.558483] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_pin_power fail
      [    1.558483] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_pin_power fail
      [    1.567585] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_pin_power1 fail
      [    1.567585] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_pin_power1 fail
      [    1.576779] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_pin_power2 fail
      [    1.576779] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_pin_power2 fail
      [    1.586128] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_1_percent fail
      [    1.586128] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_1_percent fail
      [    1.595581] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_2_percent fail
      [    1.595581] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_2_percent fail
      [    1.605198] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_3_percent fail
      [    1.605198] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_3_percent fail
      [    1.614831] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_4_percent fail
      [    1.614831] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_4_percent fail
      [    1.624439] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_5_percent fail
      [    1.624439] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_5_percent fail
      [    1.634060] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_6_percent fail
      [    1.634060] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_6_percent fail
      [    1.643679] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_7_percent fail
      [    1.643679] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_7_percent fail
      [    1.653299] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_8_percent fail
      [    1.653299] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_8_percent fail
      [    1.662919] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_9_percent fail
      [    1.662919] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_9_percent fail
      [    1.672538] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_10_percent fail
      [    1.672538] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_10_percent fail
      [    1.682246] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_11_percent fail
      [    1.682246] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_11_percent fail
      [    1.691952] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_12_percent fail
      [    1.691952] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_12_percent fail
      [    1.701658] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_13_percent fail
      [    1.701658] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_13_percent fail
      [    1.711376] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_14_percent fail
      [    1.711376] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_14_percent fail
      [    1.721073] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_15_percent fail
      [    1.721073] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_15_percent fail
      [    1.730778] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_16_percent fail
      [    1.730778] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_16_percent fail
      [    1.740486] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_17_percent fail
      [    1.740486] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_17_percent fail
      [    1.750192] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_18_percent fail
      [    1.750192] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_18_percent fail
      [    1.759899] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_19_percent fail
      [    1.759899] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_19_percent fail
      [    1.769605] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_20_percent fail
      [    1.769605] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_20_percent fail
      [    1.779312] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_21_percent fail
      [    1.779312] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_21_percent fail
      [    1.789020] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_22_percent fail
      [    1.789020] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_22_percent fail
      [    1.798725] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_23_percent fail
      [    1.798725] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_23_percent fail
      [    1.808434] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_24_percent fail
      [    1.808434] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_24_percent fail
      [    1.818153] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_25_percent fail
      [    1.818153] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_25_percent fail
      [    1.827845] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_26_percent fail
      [    1.827845] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_26_percent fail
      [    1.837553] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_27_percent fail
      [    1.837553] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_27_percent fail
      [    1.847261] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_28_percent fail
      [    1.847261] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_28_percent fail
      [    1.856965] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_29_percent fail
      [    1.856965] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_29_percent fail
      [    1.866673] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_30_percent fail
      [    1.866673] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_30_percent fail
      [    1.876380] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_31_percent fail
      [    1.876380] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_31_percent fail
      [    1.886086] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_32_percent fail
      [    1.886086] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_32_percent fail
      [    1.895794] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_33_percent fail
      [    1.895794] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_33_percent fail
      [    1.905498] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_34_percent fail
      [    1.905498] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_34_percent fail
      [    1.915206] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_35_percent fail
      [    1.915206] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_35_percent fail
      [    1.924915] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_36_percent fail
      [    1.924915] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_36_percent fail
      [    1.934619] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_37_percent fail
      [    1.934619] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_37_percent fail
      [    1.944325] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_38_percent fail
      [    1.944325] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_38_percent fail
      [    1.954031] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_39_percent fail
      [    1.954031] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_39_percent fail
      [    1.963738] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_40_percent fail
      [    1.963738] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_40_percent fail
      [    1.973447] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_41_percent fail
      [    1.973447] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_41_percent fail
      [    1.983153] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_42_percent fail
      [    1.983153] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_42_percent fail
      [    1.992860] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_43_percent fail
      [    1.992860] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_43_percent fail
      [    2.002564] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_44_percent fail
      [    2.002564] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_44_percent fail
      [    2.012272] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_45_percent fail
      [    2.012272] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_45_percent fail
      [    2.021978] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_46_percent fail
      [    2.021978] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_46_percent fail
      [    2.031685] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_47_percent fail
      [    2.031685] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_47_percent fail
      [    2.041404] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_48_percent fail
      [    2.041404] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_48_percent fail
      [    2.051100] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_49_percent fail
      [    2.051100] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_49_percent fail
      [    2.060806] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_50_percent fail
      [    2.060806] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_50_percent fail
      [    2.070512] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_51_percent fail
      [    2.070512] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_51_percent fail
      [    2.080219] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_52_percent fail
      [    2.080219] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_52_percent fail
      [    2.089932] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_53_percent fail
      [    2.089932] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_53_percent fail
      [    2.099633] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_54_percent fail
      [    2.099633] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_54_percent fail
      [    2.109340] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_55_percent fail
      [    2.109340] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_55_percent fail
      [    2.119045] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_56_percent fail
      [    2.119045] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_56_percent fail
      [    2.128751] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_57_percent fail
      [    2.128751] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_57_percent fail
      [    2.138459] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_58_percent fail
      [    2.138459] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_58_percent fail
      [    2.148177] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_59_percent fail
      [    2.148177] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_59_percent fail
      [    2.157873] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_60_percent fail
      [    2.157873] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_60_percent fail
      [    2.167580] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_61_percent fail
      [    2.167580] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_61_percent fail
      [    2.177287] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_62_percent fail
      [    2.177287] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_62_percent fail
      [    2.186992] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_63_percent fail
      [    2.186992] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_63_percent fail
      [    2.196699] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_64_percent fail
      [    2.196699] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_64_percent fail
      [    2.206405] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_65_percent fail
      [    2.206405] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_65_percent fail
      [    2.216112] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_66_percent fail
      [    2.216112] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_66_percent fail
      [    2.225820] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_67_percent fail
      [    2.225820] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_67_percent fail
      [    2.235525] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_68_percent fail
      [    2.235525] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_68_percent fail
      [    2.245233] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_69_percent fail
      [    2.245233] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_69_percent fail
      [    2.254941] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_70_percent fail
      [    2.254941] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_70_percent fail
      [    2.264646] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_71_percent fail
      [    2.264646] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_71_percent fail
      [    2.274353] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_72_percent fail
      [    2.274353] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_72_percent fail
      [    2.284060] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_73_percent fail
      [    2.284060] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_73_percent fail
      [    2.293768] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_74_percent fail
      [    2.293768] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_74_percent fail
      [    2.303472] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_75_percent fail
      [    2.303472] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_75_percent fail
      [    2.313178] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_76_percent fail
      [    2.313178] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_76_percent fail
      [    2.322886] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_77_percent fail
      [    2.322886] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_77_percent fail
      [    2.332592] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_78_percent fail
      [    2.332592] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_78_percent fail
      [    2.342298] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_79_percent fail
      [    2.342298] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_79_percent fail
      [    2.352008] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_80_percent fail
      [    2.352008] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_80_percent fail
      [    2.361713] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_81_percent fail
      [    2.361713] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_81_percent fail
      [    2.371447] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_82_percent fail
      [    2.371447] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_82_percent fail
      [    2.381131] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_83_percent fail
      [    2.381131] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_83_percent fail
      [    2.390836] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_84_percent fail
      [    2.390836] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_84_percent fail
      [    2.400538] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_85_percent fail
      [    2.400538] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_85_percent fail
      [    2.410245] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_86_percent fail
      [    2.410245] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_86_percent fail
      [    2.419952] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_87_percent fail
      [    2.419952] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_87_percent fail
      [    2.429660] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_88_percent fail
      [    2.429660] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_88_percent fail
      [    2.439366] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_89_percent fail
      [    2.439366] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_89_percent fail
      [    2.449073] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_90_percent fail
      [    2.449073] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_90_percent fail
      [    2.458780] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_91_percent fail
      [    2.458780] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_91_percent fail
      [    2.468485] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_92_percent fail
      [    2.468485] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_92_percent fail
      [    2.478200] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_93_percent fail
      [    2.478200] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_93_percent fail
      [    2.487898] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_94_percent fail
      [    2.487898] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_94_percent fail
      [    2.497607] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_95_percent fail
      [    2.497607] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_95_percent fail
      [    2.507312] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_96_percent fail
      [    2.507312] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_96_percent fail
      [    2.517020] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_97_percent fail
      [    2.517020] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_97_percent fail
      [    2.526727] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_98_percent fail
      [    2.526727] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_98_percent fail
      [    2.536432] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_99_percent fail
      [    2.536432] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_bl_99_percent fail
      [    2.546306] [DISP] lcd_get_sys_config,line:490:lcd0 sys config: used=1, bl_en_used=1, bl_en_power=, backlight=50
      [    2.546306] [DISP] lcd_get_sys_config,line:490:lcd0 sys config: used=1, bl_en_used=1, bl_en_power=, backlight=50
      [    2.556111] [DISP] lcd_get_sys_config,line:496:lcd0 power[0]: used=1 name=cldo4, fix_used=0 fix=
      [    2.556111] [DISP] lcd_get_sys_config,line:496:lcd0 power[0]: used=1 name=cldo4, fix_used=0 fix=
      [    2.564863] [DISP] lcd_get_sys_config,line:496:lcd0 power[1]: used=1 name=cldo3, fix_used=0 fix=
      [    2.564863] [DISP] lcd_get_sys_config,line:496:lcd0 power[1]: used=1 name=cldo3, fix_used=0 fix=
      [    2.573616] [DISP] lcd_get_sys_config,line:496:lcd0 power[2]: used=1 name=cldo1, fix_used=0 fix=
      [    2.573616] [DISP] lcd_get_sys_config,line:496:lcd0 power[2]: used=1 name=cldo1, fix_used=0 fix=
      [    2.582370] [DISP] lcd_get_sys_config,line:496:lcd0 power[3]: used=0 name=, fix_used=0 fix=
      [    2.582370] [DISP] lcd_get_sys_config,line:496:lcd0 power[3]: used=0 name=, fix_used=0 fix=
      [    2.590690] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[0] used=1
      [    2.590690] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[0] used=1
      [    2.596832] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[1] used=1
      [    2.596832] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[1] used=1
      [    2.603001] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[2] used=1
      [    2.603001] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[2] used=1
      [    2.609149] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[3] used=1
      [    2.609149] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[3] used=1
      [    2.615303] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[4] used=0
      [    2.615303] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[4] used=0
      [    2.621456] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[5] used=0
      [    2.621456] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[5] used=0
      [    2.627599] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[6] used=0
      [    2.627599] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[6] used=0
      [    2.633752] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[7] used=0
      [    2.633752] [DISP] lcd_get_sys_config,line:501:lcd0 gpio[7] used=0
      [    2.639905] [DISP] lcd_get_sys_config,line:507:lcd0 gpio_power[0]= pin_power[0]=
      [    2.639905] [DISP] lcd_get_sys_config,line:507:lcd0 gpio_power[0]= pin_power[0]=
      [    2.647283] [DISP] lcd_get_sys_config,line:507:lcd0 gpio_power[1]= pin_power[1]=
      [    2.647283] [DISP] lcd_get_sys_config,line:507:lcd0 gpio_power[1]= pin_power[1]=
      [    2.654639] [DISP] lcd_get_sys_config,line:507:lcd0 gpio_power[2]= pin_power[2]=
      [    2.654639] [DISP] lcd_get_sys_config,line:507:lcd0 gpio_power[2]= pin_power[2]=
      [    2.663854] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_tcon_div fail
      [    2.663854] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_tcon_div fail
      [    2.672137] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_hv_if fail
      [    2.672137] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_hv_if fail
      [    2.680801] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_lvds_if fail
      [    2.680801] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_lvds_if fail
      [    2.689659] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_lvds_mode fail
      [    2.689659] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_lvds_mode fail
      [    2.699018] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_lvds_colordepth fail
      [    2.699018] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_lvds_colordepth fail
      [    2.708899] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_lvds_io_polarity fail
      [    2.708899] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_lvds_io_polarity fail
      [    2.718867] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_cpu_if fail
      [    2.718867] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_cpu_if fail
      [    2.727964] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_cpu_te fail
      [    2.727964] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_cpu_te fail
      [    2.737067] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_cpu_mode fail
      [    2.737067] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_cpu_mode fail
      [    2.747342] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_dsi_port_num fail
      [    2.747342] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_dsi_port_num fail
      [    2.755961] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_tcon_mode fail
      [    2.755961] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_tcon_mode fail
      [    2.765320] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_slave_tcon_num fail
      [    2.765320] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_slave_tcon_num fail
      [    2.775112] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_slave_stop_pos fail
      [    2.775112] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_slave_stop_pos fail
      [    2.784904] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_sync_pixel_num fail
      [    2.784904] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_sync_pixel_num fail
      [    2.794711] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_sync_line_num fail
      [    2.794711] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_sync_line_num fail
      [    2.804406] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_tcon_en_odd_even_div fail
      [    2.804406] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_tcon_en_odd_even_div fail
      [    2.814729] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_fsync_en fail
      [    2.814729] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_fsync_en fail
      [    2.823993] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_fsync_act_time fail
      [    2.823993] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_fsync_act_time fail
      [    2.833785] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_fsync_dis_time fail
      [    2.833785] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_fsync_dis_time fail
      [    2.843579] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_fsync_pol fail
      [    2.843579] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_fsync_pol fail
      [    2.852940] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_hv_clk_phase fail
      [    2.852940] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_hv_clk_phase fail
      [    2.862563] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_hv_sync_polarity fail
      [    2.862563] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_hv_sync_polarity fail
      [    2.872525] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_hv_srgb_seq fail
      [    2.872525] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_hv_srgb_seq fail
      [    2.882060] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_rb_swap fail
      [    2.882060] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_rb_swap fail
      [    2.891245] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_hv_syuv_seq fail
      [    2.891245] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_hv_syuv_seq fail
      [    2.900778] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_hv_syuv_fdly fail
      [    2.900778] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_hv_syuv_fdly fail
      [    2.910734] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_xtal_freq fail
      [    2.910734] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd0.lcd_xtal_freq fail
      [    2.919758] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_size fail
      [    2.919758] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_size fail
      [    2.928423] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_model_name fail
      [    2.928423] [DISP] disp_sys_script_get_item,line:214:of_property_read_string lcd0.lcd_model_name fail
      [    2.937447] [DISP] lcd_clk_init,line:521:lcd 0 clk init
      [    2.937447] [DISP] lcd_clk_init,line:521:lcd 0 clk init
      [    2.942819] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd1.lcd_used fail
      [    2.942819] [DISP] disp_sys_script_get_item,line:206:of_property_read_u32_array lcd1.lcd_used fail
      [    3.184001] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name default_lcd
      [    3.184001] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name default_lcd
      [    3.184001] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name default_lcd
      [    3.195272] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name lt070me05000
      [    3.195272] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name lt070me05000
      [    3.206625] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name wtq05027d01
      [    3.206625] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name wtq05027d01
      [    3.217894] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name t27p06
      [    3.217894] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name t27p06
      [    3.228726] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name dx0960be40a1
      [    3.228726] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name dx0960be40a1
      [    3.240078] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name tft720x1280
      [    3.240078] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name tft720x1280
      [    3.251344] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name S6D7AA0X01
      [    3.251344] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name S6D7AA0X01
      [    3.262525] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name gg1p4062utsw
      [    3.262525] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name gg1p4062utsw
      [    3.273877] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name ls029b3sx02
      [    3.273877] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name ls029b3sx02
      [    3.285146] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name he0801a068
      [    3.285146] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name he0801a068
      [    3.296324] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name inet_dsi_panel
      [    3.296324] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name inet_dsi_panel
      [    3.307851] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name lq101r1sx03
      [    3.307851] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name lq101r1sx03
      [    3.319119] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name WilliamLcd
      [    3.319119] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name WilliamLcd
      [    3.319119] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name WilliamLcd
      [    3.330298] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name fx070
      [    3.330298] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name fx070
      [    3.341044] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name FX070_DHM18BOEL2_1024X600
      [    3.341044] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name FX070_DHM18BOEL2_1024X600
      [    3.353526] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name bp101wx1
      [    3.353526] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name bp101wx1
      [    3.364531] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name m133x56
      [    3.364531] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name m133x56
      [    3.375454] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name m133x56_two
      [    3.375454] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name m133x56_two
      [    3.386719] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name k101im2qa04
      [    3.386719] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name k101im2qa04
      [    3.397985] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name k101im2byl02l
      [    3.397985] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name k101im2byl02l
      [    3.409425] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name lt8911ex
      [    3.409425] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name lt8911ex
      [    3.420431] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name K101_IM2BYL02_L_800X1280
      [    3.420431] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name K101_IM2BYL02_L_800X1280
      [    3.432824] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name kd080d24
      [    3.432824] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name kd080d24
      [    3.443830] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name k080_im2b801_h
      [    3.443830] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name k080_im2b801_h
      [    3.455358] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name K080_IM2HYL802R_800X1280
      [    3.455358] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name K080_IM2HYL802R_800X1280
      [    3.467751] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name CC08021801_310_800X1280
      [    3.467751] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name CC08021801_310_800X1280
      [    3.480057] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name AXS1832_055FS01_720X1280
      [    3.480057] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name AXS1832_055FS01_720X1280
      [    3.492451] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name NV3052_BV055HDL_NB6_720X1280
      [    3.492451] [DISP] disp_lcd_set_panel_funs,line:2328:lcd 0, driver_name NV3052_BV055HDL_NB6_720X1280,  panel_name NV3052_BV055HDL_NB6_720X1280
      [    3.505024] [LCD] LCD_cfg_panel_info: enter
      [    3.505024] [LCD] LCD_cfg_panel_info: enter
      [    3.509186] [LCD] LCD_cfg_panel_info: exit
      [    3.509186] [LCD] LCD_cfg_panel_info: exit
      [    3.513259] [DISP] bsp_disp_lcd_set_panel_funs,line:1565:panel driver NV3052_BV055HDL_NB6_720X1280 register
      [    3.932621] [DISP] lcd_clk_config,line:684:clk_set_rate:dsi's 0 th clk with 150000000
      [    3.932670] [DISP] cal_real_frame_period,line:605:lcd frame period:16712437
      [    3.937758] [DISP] disp_sys_gpio_request,line:280:disp_sys_gpio_request, gpio_name=lcd_gpio_0, gpio=118, <1,0,3,1>ret=0
      [    3.937811] [DISP] disp_sys_gpio_request,line:280:disp_sys_gpio_request, gpio_name=lcd_gpio_1, gpio=39, <1,0,3,1>ret=0
      [    3.937835] [DISP] disp_sys_gpio_request,line:280:disp_sys_gpio_request, gpio_name=lcd_gpio_2, gpio=37, <1,0,3,1>ret=0
      [    3.937859] [DISP] disp_sys_gpio_request,line:280:disp_sys_gpio_request, gpio_name=lcd_gpio_3, gpio=38, <1,0,3,1>ret=0
      [    3.937884] [DISP] disp_sys_gpio_request,line:280:disp_sys_gpio_request, gpio_name=lcd_bl_en, gpio=119, <1,0,3,1>ret=0
      
      发布在 A Series
      Z
      ZZZZ_
    • a133的mipi屏幕点不亮

      uboot的驱动代码:

      /*
       * drivers/video/sunxi/disp2/disp/lcd/K080_IM2HYL802R_800X1280.c
       *
       * Copyright (c) 2007-2018 Allwinnertech Co., Ltd.
       *
       * This software is licensed under the terms of the GNU General Public
       * License version 2, as published by the Free Software Foundation, and
       * may be copied, distributed, and modified under those terms.
       *
       * This program is distributed in the hope that it will be useful,
       * but WITHOUT ANY WARRANTY; without even the implied warranty of
       * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       * GNU General Public License for more details.
       *
       */
      
      #include "K080_IM2HYL802R_800X1280.h"
      //#include <mach/sys_config.h>
      #include "panels.h"
      
      
      /*
      &lcd0 {
      	lcd_used            = <1>;
      	status              = "okay";
      	lcd_driver_name     = "K080_IM2HYL802R_800X1280";
      	lcd_backlight       = <50>;
      	lcd_if              = <4>;
      
      	lcd_x               = <800>;
      	lcd_y               = <1280>;
      	lcd_width           = <135>;
      	lcd_height          = <216>;
      	lcd_dclk_freq       = <75>;
      
      	lcd_pwm_used        = <1>;
      	lcd_pwm_ch          = <0>;
      	lcd_pwm_freq        = <50000>;
      	lcd_pwm_pol         = <1>;
      	lcd_pwm_max_limit   = <255>;
      
      	lcd_hbp             = <88>;
      	lcd_ht              = <960>;
      	lcd_hspw            = <4>;
      	lcd_vbp             = <12>;
      	lcd_vt              = <1300>;
      	lcd_vspw            = <4>;
      
      	lcd_frm             = <0>;
      	lcd_gamma_en        = <0>;
      	lcd_bright_curve_en = <0>;
      	lcd_cmap_en         = <0>;
      
      	deu_mode            = <0>;
      	lcdgamma4iep        = <22>;
      	smart_color         = <90>;
      
      	lcd_dsi_if          = <0>;
      	lcd_dsi_lane        = <4>;
      	lcd_dsi_format      = <0>;
      	lcd_dsi_te          = <0>;
      	lcd_dsi_eotp        = <0>;
      
      	lcd_pin_power = "dcdc1";
      	lcd_pin_power1 = "eldo3";
      
      	lcd_power = "eldo3";
      
      	lcd_power1 = "dcdc1";
      	lcd_power2 = "dc1sw";
      
      	lcd_gpio_1 = <&pio PD 22 1 0 3 1>;
      
      	pinctrl-0 = <&dsi4lane_pins_a>;
      	pinctrl-1 = <&dsi4lane_pins_b>;
      
      	lcd_bl_en = <&pio PB 8 1 0 3 1>;
      	lcd_bl_0_percent	= <15>;
      	lcd_bl_100_percent  = <100>;
      };
      
      */
      
      
      extern s32 bsp_disp_get_panel_info(u32 screen_id, disp_panel_para *info);
      static void LCD_power_on(u32 sel);
      static void LCD_power_off(u32 sel);
      static void LCD_bl_open(u32 sel);
      static void LCD_bl_close(u32 sel);
      
      //static void LCD_panel_try_switch(u32 sel);
      static void LCD_panel_init(u32 sel);
      static void LCD_panel_exit(u32 sel);
      
      //static u8 const mipi_dcs_pixel_format[4] = {0x77,0x66,0x66,0x55};
      #define panel_reset(val) sunxi_lcd_gpio_set_value(sel, 1, val)
      #define power_en(val) sunxi_lcd_gpio_set_value(sel, 0, val)
      
      static void LCD_cfg_panel_info(panel_extend_para *info)
      {
      	u32 i = 0, j = 0;
      	u32 items;
      	u8 lcd_gamma_tbl[][2] = {
      		//{input value, corrected value}
      		{0, 0},
      		{15, 15},
      		{30, 30},
      		{45, 45},
      		{60, 60},
      		{75, 75},
      		{90, 90},
      		{105, 105},
      		{120, 120},
      		{135, 135},
      		{150, 150},
      		{165, 165},
      		{180, 180},
      		{195, 195},
      		{210, 210},
      		{225, 225},
      		{240, 240},
      		{255, 255},
      	};
      
      	u32 lcd_cmap_tbl[2][3][4] = {
      	{
      		{LCD_CMAP_G0, LCD_CMAP_B1, LCD_CMAP_G2, LCD_CMAP_B3},
      		{LCD_CMAP_B0, LCD_CMAP_R1, LCD_CMAP_B2, LCD_CMAP_R3},
      		{LCD_CMAP_R0, LCD_CMAP_G1, LCD_CMAP_R2, LCD_CMAP_G3},
      		},
      		{
      		{LCD_CMAP_B3, LCD_CMAP_G2, LCD_CMAP_B1, LCD_CMAP_G0},
      		{LCD_CMAP_R3, LCD_CMAP_B2, LCD_CMAP_R1, LCD_CMAP_B0},
      		{LCD_CMAP_G3, LCD_CMAP_R2, LCD_CMAP_G1, LCD_CMAP_R0},
      		},
      	};
      
      	items = sizeof(lcd_gamma_tbl) / 2;
      	for (i = 0; i < items - 1; i++) {
      		u32 num = lcd_gamma_tbl[i + 1][0] - lcd_gamma_tbl[i][0];
      
      		for (j = 0; j < num; j++) {
      			u32 value = 0;
      
      			value = lcd_gamma_tbl[i][1] + ((lcd_gamma_tbl[i + 1][1] - lcd_gamma_tbl[i][1]) * j) / num;
      			info->lcd_gamma_tbl[lcd_gamma_tbl[i][0] + j] = (value << 16) + (value << 8) + value;
      		}
      	}
      	info->lcd_gamma_tbl[255] = (lcd_gamma_tbl[items - 1][1] << 16) + (lcd_gamma_tbl[items - 1][1] << 8) + lcd_gamma_tbl[items - 1][1];
      
      	memcpy(info->lcd_cmap_tbl, lcd_cmap_tbl, sizeof(lcd_cmap_tbl));
      
      }
      
      static s32 LCD_open_flow(u32 sel)
      {
          pr_info("[LCD] %s: screen %u\n", __func__, sel);
          
      	LCD_OPEN_FUNC(sel, LCD_power_on, 100);   //open lcd power, and delay 100ms
      	LCD_OPEN_FUNC(sel, LCD_panel_init, 200); //open lcd power, than delay 200ms
      	LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 50); //open lcd controller, and delay 50ms
      	LCD_OPEN_FUNC(sel, LCD_bl_open, 0);     //open lcd backlight, and delay 0ms
      
      	return 0;
      }
      
      static s32 LCD_close_flow(u32 sel)
      {
          pr_info("[LCD] %s: screen %u\n", __func__, sel);
      	LCD_CLOSE_FUNC(sel, LCD_bl_close, 200);       //close lcd backlight, and delay 0ms
      	LCD_CLOSE_FUNC(sel, sunxi_lcd_tcon_disable, 20);         //close lcd controller, and delay 0ms
      	LCD_CLOSE_FUNC(sel, LCD_panel_exit,	10);   //open lcd power, than delay 200ms
      	LCD_CLOSE_FUNC(sel, LCD_power_off, 500);   //close lcd power, and delay 500ms
      
      	return 0;
      }
      
      static void LCD_power_on(u32 sel)
      {
          pr_info("[LCD] %s: start, screen %u\n", __func__, sel);
      	// 1. 复位引脚拉低(复位触发)
      	panel_reset(0);
      	sunxi_lcd_delay_ms(20);
          
          // 2. 电源开启(严格按联发科顺序:3.3V → 1.8V → AVDD)
          sunxi_lcd_power_enable(sel, 0);
          sunxi_lcd_delay_ms(20);
          
          sunxi_lcd_power_enable(sel, 1);
          sunxi_lcd_delay_ms(10);
          
          sunxi_lcd_power_enable(sel, 2);
          sunxi_lcd_delay_ms(5);
          
          // 3. 电源使能GPIO置高
          power_en(1);
          sunxi_lcd_delay_ms(10);
          
          // 4. 复位引脚拉高(释放复位)
          panel_reset(1);
          sunxi_lcd_delay_ms(50);
      
          sunxi_lcd_pin_cfg(sel, 1);
      	pr_info("[LCD] %s: finish, screen %u\n", __func__, sel);
      }
      
      static void LCD_power_off(u32 sel)
      {
          pr_info("[LCD] %s: start, screen %u\n", __func__, sel);
      	sunxi_lcd_pin_cfg(sel, 0);
      	power_en(0);
      	sunxi_lcd_delay_ms(20);
      	panel_reset(0);
      	sunxi_lcd_delay_ms(5);
      	// 电源关闭顺序:反向关闭(AVDD → 1.8V → 3.3V),匹配上电顺序
      	sunxi_lcd_power_disable(sel, 2);
      	sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_disable(sel, 1);
      	sunxi_lcd_delay_ms(5);
      	sunxi_lcd_power_disable(sel, 0);
          pr_info("[LCD] %s: finish, screen %u\n", __func__, sel);
      }
      
      static void LCD_bl_open(u32 sel)
      {
          pr_info("[LCD] %s: screen %u\n", __func__, sel);
      	sunxi_lcd_pwm_enable(sel);
      	sunxi_lcd_delay_ms(50);
      	sunxi_lcd_backlight_enable(sel);//config lcd_bl_en pin to open lcd backlight
      }
      
      static void LCD_bl_close(u32 sel)
      {
          pr_info("[LCD] %s: screen %u\n", __func__, sel);
      	sunxi_lcd_backlight_disable(sel);//config lcd_bl_en pin to close lcd backlight
      	sunxi_lcd_delay_ms(20);
      	sunxi_lcd_pwm_disable(sel);
      }
      
      #define REGFLAG_DELAY             						0XFE
      #define REGFLAG_END_OF_TABLE      						0xFD   // END OF REGISTERS MARKER
      
      struct LCM_setting_table {
          u8 cmd;
          u32 count;
          u8 para_list[64];
      };
      
      /*add panel initialization below*/
      
      
      static struct LCM_setting_table lcm_initialization_setting[] = {
      	{REGFLAG_DELAY, REGFLAG_DELAY, {120}},            /* 120 ms after reset  */
      
      	/* Page-1  (0x3001) */
      	{0xFF, 1, {0x30}},
      	{0xFF, 1, {0x52}},
      	{0xFF, 1, {0x01}},
      	{0xE3, 1, {0x04}},
      	{0x08, 1, {0x0E}},
      	{0x25, 1, {0x10}},
      	{0x28, 1, {0x5F}},
      	{0x2C, 1, {0x22}},
      	{0x30, 1, {0x58}},
      	{0x45, 1, {0x91}},
      	{0x37, 1, {0x9C}},
      	{0x38, 1, {0xA7}},
      	{0x39, 1, {0x27}},
      	{0x44, 1, {0x00}},
      	{0x49, 1, {0x1C}},
      	{0x59, 1, {0xFE}},
      	{0x5C, 1, {0x00}},
      	{0x91, 1, {0x77}},
      	{0x92, 1, {0x77}},
      	{0xA0, 1, {0x55}},
      	{0xA1, 1, {0x50}},
      	{0xA3, 1, {0x58}},
      	{0xA4, 1, {0x9C}},
      	{0xA7, 1, {0x02}},
      	{0xA8, 1, {0x01}},
      	{0xA9, 1, {0x01}},
      	{0xAA, 1, {0xFC}},
      	{0xAB, 1, {0x28}},
      	{0xAC, 1, {0x06}},
      	{0xAD, 1, {0x06}},
      	{0xAE, 1, {0x06}},
      	{0xAF, 1, {0x03}},
      	{0xB0, 1, {0x08}},
      	{0xB1, 1, {0x26}},
      	{0xB2, 1, {0x28}},
      	{0xB3, 1, {0x28}},
      	{0xB4, 1, {0x03}},
      	{0xB5, 1, {0x08}},
      	{0xB6, 1, {0x26}},
      	{0xB7, 1, {0x08}},
      	{0xB8, 1, {0x26}},
      
      	{0xC0, 1, {0x00}},
      	{0xC1, 1, {0x00}},
      	{0xC3, 1, {0x0F}},
      
      	/* Page-2  (0x3002) */
      	{0xFF, 1, {0x30}},
      	{0xFF, 1, {0x52}},
      	{0xFF, 1, {0x02}},
      	{0xB0, 1, {0x00}},
      	{0xB1, 1, {0x05}},
      	{0xB2, 1, {0x02}},
      	{0xB3, 1, {0x24}},
      	{0xB4, 1, {0x25}},
      	{0xB5, 1, {0x30}},
      	{0xB6, 1, {0x0C}},
      	{0xB7, 1, {0x27}},
      	{0xB8, 1, {0x0F}},
      	{0xB9, 1, {0x05}},
      	{0xBA, 1, {0x11}},
      	{0xBB, 1, {0x10}},
      	{0xBC, 1, {0x11}},
      	{0xBD, 1, {0x12}},
      	{0xBE, 1, {0x17}},
      	{0xBF, 1, {0x0C}},
      	{0xC0, 1, {0x14}},
      	{0xC1, 1, {0x0A}},
      	{0xD0, 1, {0x08}},
      	{0xD1, 1, {0x0F}},
      	{0xD2, 1, {0x09}},
      	{0xD3, 1, {0x35}},
      	{0xD4, 1, {0x38}},
      	{0xD5, 1, {0x3D}},
      	{0xD6, 1, {0x1B}},
      	{0xD7, 1, {0x3B}},
      	{0xD8, 1, {0x0F}},
      	{0xD9, 1, {0x05}},
      	{0xDA, 1, {0x11}},
      	{0xDB, 1, {0x10}},
      	{0xDC, 1, {0x11}},
      	{0xDD, 1, {0x14}},
      	{0xDE, 1, {0x19}},
      	{0xDF, 1, {0x11}},
      	{0xE0, 1, {0x19}},
      	{0xE1, 1, {0x09}},
      
      	/* Page-3  (0x3003) */
      	{0xFF, 1, {0x30}},
      	{0xFF, 1, {0x52}},
      	{0xFF, 1, {0x03}},
      	{0x08, 1, {0x8B}},
      	{0x09, 1, {0x8A}},
      	{0x0A, 1, {0x89}},
      	{0x0B, 1, {0x88}},
      	{0x34, 1, {0x61}},
      	{0x35, 1, {0xD4}},
      	{0x36, 1, {0x24}},
      	{0x37, 1, {0x03}},
      	{0x40, 1, {0x8B}},
      	{0x41, 1, {0x8A}},
      	{0x42, 1, {0x89}},
      	{0x43, 1, {0x88}},
      	{0x45, 1, {0x01}},
      	{0x46, 1, {0x02}},
      	{0x48, 1, {0x03}},
      	{0x49, 1, {0x04}},
      	{0x50, 1, {0x87}},
      	{0x51, 1, {0x86}},
      	{0x52, 1, {0x85}},
      	{0x53, 1, {0x84}},
      	{0x55, 1, {0x05}},
      	{0x56, 1, {0x06}},
      	{0x58, 1, {0x07}},
      	{0x59, 1, {0x08}},
      	{0x80, 1, {0x0F}},
      	{0x81, 1, {0x0E}},
      	{0x82, 1, {0x07}},
      	{0x83, 1, {0x06}},
      	{0x84, 1, {0x05}},
      	{0x85, 1, {0x04}},
      	{0x92, 1, {0x0E}},
      	{0x93, 1, {0x0F}},
      	{0x94, 1, {0x01}},
      	{0x95, 1, {0x00}},
      	{0x96, 1, {0x0F}},
      	{0x97, 1, {0x0E}},
      	{0x98, 1, {0x07}},
      	{0x99, 1, {0x06}},
      	{0x9A, 1, {0x05}},
      	{0x9B, 1, {0x04}},
      	{0xA8, 1, {0x0E}},
      	{0xA9, 1, {0x0F}},
      	{0xAA, 1, {0x01}},
      	{0xAB, 1, {0x00}},
      	{0xE0, 1, {0x02}},
      	{0xE1, 1, {0x52}},
      
      	/* Page-0  (0x3000) */
      	{0xFF, 1, {0x30}},
      	{0xFF, 1, {0x52}},
      	{0xFF, 1, {0x00}},
      	{0x35, 1, {0x00}},
      	{0x36, 1, {0x02}},
      	{0x53, 1, {0x2C}},
      
      	/* Display ON sequence */
      	//SLP OUT
      	{0x11,     0,     {0x00} },  	// SLPOUT
      	{REGFLAG_DELAY, REGFLAG_DELAY, {120} },
      
      	//DISP ON
      	{0x29,     0,     {0x00} },  	// DSPON
      	{REGFLAG_DELAY, REGFLAG_DELAY, {100} },
      
      	{REGFLAG_END_OF_TABLE, REGFLAG_END_OF_TABLE, {} }
      };
      
      
      /*static void LCD_panel_try_switch(u32 sel)
      {
      	u8 result[16] = {0};
      	u32 num = 0;
      	
      
      	sunxi_lcd_delay_ms(100);
      	sunxi_lcd_dsi_dcs_read(sel, 0x04, result, &num);
      	printf("get lcd id 0x%x\n", result[0]);
      	if (result[0] == 0x93) {
      		LCD_power_off(sel);
      		sunxi_lcd_switch_compat_panel(sel, 1);
      		return;
      	}
      }*/
      
      
      
      static void LCD_panel_init(u32 sel)
      {
      	__u32 i;
      
          pr_info("[LCD] %s: screen %u - start init table\n", __func__, sel);
      	sunxi_lcd_dsi_clk_enable(sel);
      	sunxi_lcd_delay_ms(20);
          pr_info("[LCD] %s: sending SW reset\n", __func__);
      	sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_SOFT_RESET);
      	//sunxi_lcd_delay_ms(10);
      	sunxi_lcd_delay_ms(120);
      
          pr_info("[LCD] %s: entering init table loop\n", __func__);
      
      	for (i = 0; ; i++) {
      			if (lcm_initialization_setting[i].count == REGFLAG_END_OF_TABLE)
      				break;
      			else if (lcm_initialization_setting[i].count == REGFLAG_DELAY)
      				sunxi_lcd_delay_ms(lcm_initialization_setting[i].para_list[0]);
      #ifdef SUPPORT_DSI
      			else
      				dsi_dcs_wr(sel, lcm_initialization_setting[i].cmd, lcm_initialization_setting[i].para_list, lcm_initialization_setting[i].count);
      #endif
      		//break;
      	}
      
          pr_info("[LCD] %s: screen %u - init table done\n", __func__, sel);
      	return;
      }
      
      static void LCD_panel_exit(u32 sel)
      {
          pr_info("[LCD] %s: screen %u\n", __func__, sel);
      	sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_SET_DISPLAY_OFF);
      	sunxi_lcd_delay_ms(20);
      	sunxi_lcd_dsi_dcs_write_0para(sel, DSI_DCS_ENTER_SLEEP_MODE);
      	sunxi_lcd_delay_ms(80);
      
      	return ;
      }
      
      //sel: 0:lcd0; 1:lcd1
      static s32 LCD_user_defined_func(u32 sel, u32 para1, u32 para2, u32 para3)
      {
      	return 0;
      }
      
      //sel: 0:lcd0; 1:lcd1
      /*static s32 LCD_set_bright(u32 sel, u32 bright)
      {
      	sunxi_lcd_dsi_dcs_write_1para(sel,0x51,bright);
      	return 0;
      }*/
      
      __lcd_panel_t K080_IM2HYL802R_800X1280_mipi_panel = {
      	/* panel driver name, must mach the name of lcd_drv_name in sys_config.fex */
      	.name = "K080_IM2HYL802R_800X1280",
      	.func = {
      		.cfg_panel_info = LCD_cfg_panel_info,
      		.cfg_open_flow = LCD_open_flow,
      		.cfg_close_flow = LCD_close_flow,
      		.lcd_user_defined_func = LCD_user_defined_func,
      		//.set_bright = LCD_set_bright,
      	},
      };
      

      设备树:

      disp: disp@06000000 {
      			disp_init_enable         = <1>;
      			disp_mode                = <0>;
      
      			screen0_output_type      = <1>;
      			screen0_output_mode      = <4>;
      
      			screen1_output_type      = <1>;
      			screen1_output_mode      = <4>;
      
      			screen1_output_format    = <0>;
      			screen1_output_bits      = <0>;
      			screen1_output_eotf      = <4>;
      			screen1_output_cs        = <257>;
      			screen1_output_dvi_hdmi  = <2>;
      			screen1_output_range     = <2>;
      			screen1_output_scan      = <0>;
      			screen1_output_aspect_ratio = <8>;
      
      			dev0_output_type         = <1>;
      			dev0_output_mode         = <4>;
      			dev0_screen_id           = <0>;
      			dev0_do_hpd              = <0>;
      
      			dev1_output_type         = <4>;
      			dev1_output_mode         = <10>;
      			dev1_screen_id           = <1>;
      			dev1_do_hpd              = <1>;
      
      			def_output_dev           = <0>;
      			hdmi_mode_check          = <1>;
      
      			fb0_format               = <0>;
      			fb0_width                = <720>;
      			fb0_height               = <1280>;
      
      			fb1_format               = <0>;
      			fb1_width                = <0>;
      			fb1_height               = <0>;
      			chn_cfg_mode             = <1>;
      
      			disp_para_zone           = <1>;
      			
      			/*VCC-LCD*/
      			cldo4-supply = <&reg_cldo4>;
      			/*VCC-LVDS-1.8V*/
      			cldo1-supply = <&reg_cldo1>;
      			/*VCC-DSI*/
                  
      			/*VCC-PD-3.3V*/
      			cldo3-supply = <&reg_cldo3>;
      		};
      /*----------------------------------------------------------------------------------
      ;lcd0 configuration
      
      ;lcd_if:               0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp; 6:extend dsi
      ;lcd_hv_if             0:Parallel RGB; 8:Serial RGB; 10:Dummy RGB; 11: RGB Dummy;12:CCIR656
      ;lcd_hv_clk_phase      0:0 degree;1:90 degree;2:180 degree;3:270 degree
      ;lcd_hv_sync_polarity  0:vs low,hs low; 1:vs high,hslow; 2:vs low,hs high; 3:vs high,hs high
      ;lcd_hv_syuv_seq       0:YUYV; 1:YVYU; 2:UYVY; 3:VYUY
      ;lcd_cpu_if            0:18bit/1 cycle parallel(RGB666); 4:16bit/1cycle parallel (RGB565)
      ;                      6:18bit/3 cycle parallel(RGB666); 7:16bit/2cycle parallel (RGB565)
      ;lcd_cpu_te            0:frame auto trigger; 1:frame triggered by te rising edge; 2:frame triggered by te falling edge;
      ;lcd_dsi_if            0:video mode; 1: Command mode; 2:video burst mode
      ;lcd_dsi_te            0:frame auto trigger; 1:frame triggered by te rising edge; 2:frame triggered by te falling edge;
      ;lcd_x:                lcd horizontal resolution
      ;lcd_y:                lcd vertical resolution
      ;lcd_width:            width of lcd in mm
      ;lcd_height:           height of lcd in mm
      ;lcd_dclk_freq:        in MHZ unit
      ;lcd_pwm_freq:         in HZ unit
      ;lcd_pwm_pol:          lcd backlight PWM polarity
      ;lcd_pwm_max_limit     lcd backlight PWM max limit(<=255)
      ;lcd_hbp:              hsync back porch(pixel) + hsync plus width(pixel);
      ;lcd_ht:               hsync total cycle(pixel)
      ;lcd_vbp:              vsync back porch(line) + vysnc plus width(line)
      ;lcd_vt:               vysnc total cycle(line)
      ;lcd_hspw:             hsync plus width(pixel)
      ;lcd_vspw:             vysnc plus width(pixel)
      ;lcd_lvds_if:          0:single link;  1:dual link
      ;lcd_lvds_colordepth:  0:8bit; 1:6bit
      ;lcd_lvds_mode:        0:NS mode; 1:JEIDA mode
      ;lcd_frm:              0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither
      ;lcd_io_phase:         0:noraml; 1:intert phase(0~3bit: vsync phase; 4~7bit:hsync phase;
      ;                      8~11bit:dclk phase; 12~15bit:de phase)
      ;lcd_gamma_en          lcd gamma correction enable
      ;lcd_bright_curve_en   lcd bright curve correction enable
      ;lcd_cmap_en           lcd color map function enable
      ;deu_mode              0:smoll lcd screen; 1:large lcd screen(larger than 10inch)
      ;lcdgamma4iep:         Smart Backlight parameter, lcd gamma vale * 10;
      ;                      decrease it while lcd is not bright enough; increase while lcd is too bright
      ;smart_color           90:normal lcd screen 65:retina lcd screen(9.7inch)
      ;Pin setting for special function ie.LVDS, RGB data or vsync
      ;   name(donot care) = port:PD12<pin function><pull up or pull down><drive ability><output level>
      ;Pin setting for gpio:
      ;   lcd_gpio_X     = port:PD12<pin function><pull up or pull down><drive ability><output level>
      ;Pin setting for backlight enable pin
      ;   lcd_bl_en     = port:PD12<pin function><pull up or pull down><drive ability><output level>
      ;fsync setting, pulse to csi
      ;lcd_fsync_en          (0:disable fsync,1:enable)
      ;lcd_fsync_act_time    (active time of fsync, unit:pixel)
      ;lcd_fsync_dis_time    (disactive time of fsync, unit:pixel)
      ;lcd_fsync_pol         (0:positive;1:negative)
      ;gpio config: <&pio for cpu or &r_pio for cpus, port, port num, pio function,
      pull up or pull down(default 0), driver level(default 1), data>
      ;For dual link lvds: use lvds2link_pins_a  and lvds2link_pins_b instead
      ;For rgb24: use rgb24_pins_a  and rgb24_pins_b instead
      ;For lvds1: use lvds1_pins_a  and lvds1_pins_b instead
      ;For lvds0: use lvds0_pins_a  and lvds0_pins_b instead
      ;----------------------------------------------------------------------------------*/
      		lcd0: lcd0@01c0c000 {
      			lcd_used            = <1>;
      			lcd_driver_name     = "K080_IM2HYL802R_800X1280";
      			lcd_backlight       = <50>;
      			lcd_if              = <4>;
      
      			lcd_x               = <720>;
      			lcd_y               = <1280>;
      			lcd_width           = <150>;
      			lcd_height          = <36>;
      			lcd_dclk_freq       = <58>;
      
      			lcd_pwm_used        = <1>;
      			lcd_pwm_ch          = <0>;
      			lcd_pwm_freq        = <50000>;
      			lcd_pwm_pol         = <1>;
      			lcd_pwm_max_limit   = <255>;
      
      			lcd_hbp             = <30>;
      			lcd_ht              = <770>;
      			lcd_hspw            = <6>;
      
      			lcd_vbp             = <16>;
      			lcd_vt              = <1311>;
      			lcd_vspw            = <4>;
      
      			lcd_frm             = <0>;
      			lcd_gamma_en        = <0>;
      			lcd_bright_curve_en = <0>;
      			lcd_cmap_en         = <0>;
      
      			deu_mode            = <0>;
      			lcdgamma4iep        = <22>;
      			smart_color         = <90>;
      
      			lcd_dsi_if          = <0>;
      			lcd_dsi_lane        = <4>;
      			lcd_dsi_format      = <0>;
      			lcd_dsi_te          = <0>;
      			lcd_dsi_eotp        = <0>;
      
      			lcd_pin_power       = "cldo3";      /* VCC-PD   (3.3 V) */
      			lcd_power1          = "cldo1";      /* VCC-LVDS (1.8 V) */
      			lcd_power2          = "cldo4";      /* VCC-LCD  (3.3 V) */
      			
      			lcd_gpio_1          = <&pio PD 22 1 0 3 1>;    /* RESET */
       
      			pinctrl-0           = <&dsi4lane_pins_a>;
      			pinctrl-1           = <&dsi4lane_pins_b>;
      
      			lcd_bl_en           = <&pio PD 23 1 1 0 3 1>;  /* backlight */
      			lcd_bl_0_percent    = <15>;
      			lcd_bl_100_percent  = <100>;
      		};
      

      参考mtk的驱动参数:

      /*
       * Copyright (C) 2016 MediaTek Inc.
       *
       * This program is free software; you can redistribute it and/or modify
       * it under the terms of the GNU General Public License version 2 as
       * published by the Free Software Foundation.
       *
       * This program is distributed in the hope that it will be useful,
       * but WITHOUT ANY WARRANTY; without even the implied warranty of
       * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
       * See http://www.gnu.org/licenses/gpl-2.0.html for more details.
       */
      
      #ifdef BUILD_LK
      #include <string.h>
      #include <platform/mt_gpio.h>
      #include <platform/mt_pmic.h>
      #include <platform/sync_write.h>
      #include <platform/ddp_hal.h>
      #else
      #include <linux/string.h>
      #include <linux/wait.h>
      #include <linux/platform_device.h>
      #include <linux/gpio.h>
      #include <linux/pinctrl/consumer.h>
      #include <linux/of_gpio.h>
      #include <asm-generic/gpio.h>
      
      #include <linux/kernel.h>
      #include <linux/mm.h>
      #include <linux/mm_types.h>
      #include <linux/module.h>
      #include <linux/types.h>
      #include <linux/slab.h>
      #include <linux/vmalloc.h>
      
      #ifdef CONFIG_OF
      #include <linux/of.h>
      #include <linux/of_irq.h>
      #include <linux/of_address.h>
      #include <linux/of_device.h>
      #include <linux/regulator/consumer.h>
      #endif
      #endif
      #include "lcm_drv.h"
      
      #ifndef BUILD_LK 
      extern int inettek_gpio_set(const char *name);
      extern int lcm_vgp_supply_enable(void);
      extern int lcm_vgp_supply_disable(void);
      extern int lcm_get_vgp_supply(struct device *dev);
      #endif
      
      #ifdef BUILD_LK
      #define LCD_2V8_EN                 (38 | 0x80000000)
      #define LCD_RST_PIN                (66 | 0x80000000)
      #define LCD_3V3_RST_PIN            (70 | 0x80000000)
      #define LCD_AVDD_EN                (20 | 0x80000000)  // VSN +VSP
      #define LCD_GAMA_EN                (0  | 0x80000000)  // AVDD + VGL + VGH
      #endif
      
      /* --------------------------------------------------------------- */
      /*  Local Constants */
      /* --------------------------------------------------------------- */
      #define FRAME_WIDTH        (720)
      #define FRAME_HEIGHT       (1280)
      #define GPIO_OUT_ONE        1
      #define GPIO_OUT_ZERO       0
      
      #define REGFLAG_DELAY            0xFE
      #define REGFLAG_END_OF_TABLE     0x00
      
      #define LCM_ID_NV3052            (0x3052)
      /* --------------------------------------------------------------- */
      /*  Local Variables */
      /* --------------------------------------------------------------- */
      
      #ifndef BUILD_LK
      static unsigned int GPIO_LCD_PWR;
      static unsigned int GPIO_LCD_RST;
      static unsigned int GPIO_3V3_LCD_RST;
      
      static void lcm_request_gpio_control(struct device *dev)
      {
          GPIO_LCD_PWR = of_get_named_gpio(dev->of_node, "gpio_lcd_pwr", 0);
          gpio_request(GPIO_LCD_PWR, "GPIO_LCD_PWR");
      
          GPIO_LCD_RST = of_get_named_gpio(dev->of_node, "gpio_lcd_rst", 0);
          gpio_request(GPIO_LCD_PWR, "GPIO_LCD_RST");
      
          GPIO_3V3_LCD_RST = of_get_named_gpio(dev->of_node, "gpio_3v3_lcd_rst", 0);
          gpio_request(GPIO_LCD_PWR, "GPIO_3V3_LCD_RST");
      }
      
      static int lcm_driver_probe(struct device *dev, void const *data)
      {
          lcm_request_gpio_control(dev);
          lcm_get_vgp_supply(dev);
          lcm_vgp_supply_enable();
      
          return 0;
      }
      
      static const struct of_device_id lcm_platform_of_match[] = {
          {
              .compatible = "mickey,nv3052_bv055hdl_nb6",
              .data = 0,
          }, {
              /* sentinel */
          }
      };
      
      MODULE_DEVICE_TABLE(of, platform_of_match);
      
      static int lcm_platform_probe(struct platform_device *pdev)
      {
          const struct of_device_id *id;
      
          id = of_match_node(lcm_platform_of_match, pdev->dev.of_node);
          if (!id)
              return -ENODEV;
      
          return lcm_driver_probe(&pdev->dev, id->data);
      }
      
      static struct platform_driver lcm_driver = {
          .probe = lcm_platform_probe,
          .driver = {
                 .name = "nv3052_bv055hdl_nb6",
                 .owner = THIS_MODULE,
                 .of_match_table = lcm_platform_of_match,
          },
      };
      
      static int __init lcm_drv_init(void)
      {
          if (platform_driver_register(&lcm_driver)) {
              pr_err("LCM: failed to register this driver!\n");
              return -ENODEV;
          }
      
          return 0;
      }
      
      static void __exit lcm_drv_exit(void)
      {
          platform_driver_unregister(&lcm_driver);
      }
      
      late_initcall(lcm_drv_init);
      module_exit(lcm_drv_exit);
      MODULE_AUTHOR("mediatek");
      MODULE_DESCRIPTION("LCM display subsystem driver");
      MODULE_LICENSE("GPL");
      #endif
      
      
      extern void mdelay(unsigned long msec);
      
      #ifdef BUILD_LK
      static LCM_UTIL_FUNCS lcm_util = {
          .set_reset_pin = NULL,
          .udelay = NULL,
          .mdelay = NULL,
      };
      #else
      static LCM_UTIL_FUNCS lcm_util = { 0 };
      
      #endif
      
      #define SET_RESET_PIN(v)        (lcm_util.set_reset_pin((v)))
      
      #define UDELAY(n)                (lcm_util.udelay(n))
      #define MDELAY(n)                (lcm_util.mdelay(n))
      
      /* --------------------------------------------------------------- */
      /* Local Functions */
      /* --------------------------------------------------------------- */
      #define dsi_set_cmdq_V2(cmd, count, ppara, force_update) \
               (lcm_util.dsi_set_cmdq_V2(cmd, count, ppara, force_update))
      #define dsi_set_cmdq(pdata, queue_size, force_update) \
               (lcm_util.dsi_set_cmdq(pdata, queue_size, force_update))
      #define wrtie_cmd(cmd) \
               (lcm_util.dsi_write_cmd(cmd))
      #define write_regs(addr, pdata, byte_nums) \
               (lcm_util.dsi_write_regs(addr, pdata, byte_nums))
      #define read_reg \
               (lcm_util.dsi_read_reg())
      #define read_reg_v2(cmd, buffer, buffer_size) \
               (lcm_util.dsi_dcs_read_lcm_reg_v2(cmd, buffer, buffer_size))
      
      #ifdef BUILD_LK
      static void pmic_vgp2_enable(bool en, int vol_mv)
      {
          unsigned int val;
          if (!en)
              mt6392_upmu_set_rg_vgp2_en(0x0);
          else {
              switch (vol_mv) {
                  case 1200:
                      val = 0x00;
                      break;
                  case 1300:
                      val = 0x01;
                      break;
                  case 1500:
                      val = 0x02;
                      break;
                  case 1800:
                      val = 0x03;
                      break;
                  case 2000:
                      val = 0x04;
                      break;
                  case 2800:
                      val = 0x05;
                      break;
                  case 3000:
                      val = 0x06;
                      break;
                  case 3300:
                      val = 0x07;
                      break;
                  default:
                      val = 0x05;
                      break;
              }
              //VGP2 0x00=1.2V, 0x01=1.3V, 0x02=1.5V, 0x03=1.8V, 0x04=2.0V, 0x05=2.8V, 0x06=3.0V, 0x07=3.3V
              mt6392_upmu_set_rg_vgp2_vosel(val);
              mt6392_upmu_set_rg_vgp2_en(0x1);
          }
      }
      #endif
      
      /* --------------------------------------------------------------------------- */
      /* Local Functions */
      /* --------------------------------------------------------------------------- */
      #ifdef BUILD_LK
      static void lcm_set_gpio_output(unsigned int GPIO, unsigned int output)
      {
          mt_set_gpio_mode(GPIO, GPIO_MODE_00);
          mt_set_gpio_dir(GPIO, GPIO_DIR_OUT);
          mt_set_gpio_out(GPIO, output);
      }
      #endif
      
      struct LCM_setting_table {
          unsigned char cmd;
          unsigned char count;
          unsigned char para_list[4];
      };
      
      //update initial param for IC boe_nt71391_dsi_vdo 0.01
      static struct LCM_setting_table lcm_initialization_setting[] = 
      {
      
      //----------NV305F+BOE5.5(BV055HDL-NB6) Initial------------------
          {REGFLAG_DELAY, 120, {}},
      
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x01}},
          {0xE3,0x01,{0x04}},
          {0x08,0x01,{0x0e}},
          {0x25,0x01,{0x10}},
          {0x28,0x01,{0x5F}},
          {0x2C,0x01,{0x22}},
          {0x30,0x01,{0x58}},
          {0x45,0x01,{0x91}},
          {0x37,0x01,{0x9C}},
          {0x38,0x01,{0xA7}},
          {0x39,0x01,{0x27}},
          {0x44,0x01,{0x00}},
          {0x49,0x01,{0x1C}},
          {0x59,0x01,{0xFE}},
          {0x5C,0x01,{0x00}},
          {0x91,0x01,{0x77}},
          {0x92,0x01,{0x77}},
          {0xA0,0x01,{0x55}},
          {0xA1,0x01,{0x50}},
          {0xA3,0x01,{0x58}},
          {0xA4,0x01,{0x9C}},
          {0xA7,0x01,{0x02}},
          {0xA8,0x01,{0x01}},
          {0xA9,0x01,{0x01}},
          {0xAA,0x01,{0xFC}},
          {0xAB,0x01,{0x28}},
          {0xAC,0x01,{0x06}},
          {0xAD,0x01,{0x06}},
          {0xAE,0x01,{0x06}},
          {0xAF,0x01,{0x03}},
          {0xB0,0x01,{0x08}},
          {0xB1,0x01,{0x26}},
          {0xB2,0x01,{0x28}},
          {0xB3,0x01,{0x28}},
          {0xB4,0x01,{0x03}},
          {0xB5,0x01,{0x08}},
          {0xB6,0x01,{0x26}},
          {0xB7,0x01,{0x08}},
          {0xB8,0x01,{0x26}},
      
          {0xc0,0x01,{0x00}},
          {0xc1,0x01,{0x00}},
          {0xc3,0x01,{0x0F}},
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x02}},
          {0xB0,0x01,{0x00}},
          {0xB1,0x01,{0x05}},
          {0xB2,0x01,{0x02}},
          {0xB3,0x01,{0x24}},
          {0xB4,0x01,{0x25}},
          {0xB5,0x01,{0x30}},
          {0xB6,0x01,{0x0C}},
          {0xB7,0x01,{0x27}},
          {0xB8,0x01,{0x0F}},
          {0xB9,0x01,{0x05}},
          {0xBA,0x01,{0x11}},
          {0xBB,0x01,{0x10}},
          {0xBC,0x01,{0x11}},
          {0xBD,0x01,{0x12}},
          {0xBE,0x01,{0x17}},
          {0xBF,0x01,{0x0C}},
          {0xC0,0x01,{0x14}},
          {0xC1,0x01,{0x0A}},
          {0xD0,0x01,{0x08}},
          {0xD1,0x01,{0x0F}},
          {0xD2,0x01,{0x09}},
          {0xD3,0x01,{0x35}},
          {0xD4,0x01,{0x38}},
          {0xD5,0x01,{0x3D}},
          {0xD6,0x01,{0x1B}},
          {0xD7,0x01,{0x3B}},
          {0xD8,0x01,{0x0F}},
          {0xD9,0x01,{0x05}},
          {0xDA,0x01,{0x11}},
          {0xDB,0x01,{0x10}},
          {0xDC,0x01,{0x11}},
          {0xDD,0x01,{0x14}},
          {0xDE,0x01,{0x19}},
          {0xDF,0x01,{0x11}},
          {0xE0,0x01,{0x19}},
          {0xE1,0x01,{0x09}},
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x03}},
          {0x08,0x01,{0x8B}},
          {0x09,0x01,{0x8A}},
          {0x0A,0x01,{0x89}},
          {0x0B,0x01,{0x88}},
          {0x34,0x01,{0x61}},
          {0x35,0x01,{0xD4}},
          {0x36,0x01,{0x24}},
          {0x37,0x01,{0x03}},
          {0x40,0x01,{0x8B}},
          {0x41,0x01,{0x8A}},
          {0x42,0x01,{0x89}},
          {0x43,0x01,{0x88}},
          {0x45,0x01,{0x01}},
          {0x46,0x01,{0x02}},
          {0x48,0x01,{0x03}},
          {0x49,0x01,{0x04}},
          {0x50,0x01,{0x87}},
          {0x51,0x01,{0x86}},
          {0x52,0x01,{0x85}},
          {0x53,0x01,{0x84}},
          {0x55,0x01,{0x05}},
          {0x56,0x01,{0x06}},
          {0x58,0x01,{0x07}},
          {0x59,0x01,{0x08}},
          {0x80,0x01,{0x0F}},
          {0x81,0x01,{0x0E}},
          {0x82,0x01,{0x07}},
          {0x83,0x01,{0x06}},
          {0x84,0x01,{0x05}},
          {0x85,0x01,{0x04}},
          {0x92,0x01,{0x0E}},
          {0x93,0x01,{0x0F}},
          {0x94,0x01,{0x01}},
          {0x95,0x01,{0x00}},
          {0x96,0x01,{0x0F}},
          {0x97,0x01,{0x0E}},
          {0x98,0x01,{0x07}},
          {0x99,0x01,{0x06}},
          {0x9A,0x01,{0x05}},
          {0x9B,0x01,{0x04}},
          {0xA8,0x01,{0x0E}},
          {0xA9,0x01,{0x0F}},
          {0xAA,0x01,{0x01}},
          {0xAB,0x01,{0x00}},
          {0xE0,0x01,{0x02}},
          {0xE1,0x01,{0x52}},
          {0xFF,0x01,{0x30}},
          {0xFF,0x01,{0x52}},
          {0xFF,0x01,{0x00}},
          {0x35,0x01,{0x00}},
          {0x36,0x01,{0x02}},
          {0x53,0x01,{0x2C}},
      
          {0x11,0x01,{0x00}},
          {REGFLAG_DELAY, 200, {}},
          {0x29,0x01,{0x00}}, //Display ON
          {REGFLAG_DELAY, 100, {}},
      
          {REGFLAG_END_OF_TABLE, 0x00, {}},
      };
      
      static void push_table(struct LCM_setting_table *table, unsigned int count, unsigned char force_update)
      {
          unsigned int i;
          for(i = 0; i < count; i++) {
              unsigned cmd;
              cmd = table[i].cmd;
              switch (cmd) {
                  case REGFLAG_DELAY :
                      MDELAY(table[i].count);
                      break;
                  case REGFLAG_END_OF_TABLE :
                      break;
                  default:
                      dsi_set_cmdq_V2(cmd, table[i].count, table[i].para_list, force_update);
                      //MDELAY(10);//soso add or it will fail to send register
                 }
          }
      }
      
      /* --------------------------------------------------------------- */
      /*  LCM Driver Implementations */
      /* --------------------------------------------------------------- */
      #ifdef BUILD_LK
      static void lcm_set_util_funcs(const LCM_UTIL_FUNCS *util)
      {
          memcpy(&lcm_util, util, sizeof(LCM_UTIL_FUNCS));
      }
      #else
      static void lcm_set_util_funcs(const LCM_UTIL_FUNCS *util)
      {
          memcpy(&lcm_util, util, sizeof(LCM_UTIL_FUNCS));
      }
      #endif
      
      static void lcm_get_params(LCM_PARAMS *params)
      {
          memset(params, 0, sizeof(LCM_PARAMS));
      
          params->type   = LCM_TYPE_DSI;
          params->width  = FRAME_WIDTH;
          params->height = FRAME_HEIGHT;
          params->dsi.mode = SYNC_EVENT_VDO_MODE;
          params->dsi.LANE_NUM                = LCM_FOUR_LANE;
          params->dsi.data_format.color_order = LCM_COLOR_ORDER_RGB;
          params->dsi.data_format.trans_seq   = LCM_DSI_TRANS_SEQ_MSB_FIRST;
          params->dsi.data_format.padding     = LCM_DSI_PADDING_ON_LSB;
          params->dsi.data_format.format      = LCM_DSI_FORMAT_RGB888;
          /* Highly depends on LCD driver capability. */
          params->dsi.packet_size = 256;
          /* Video mode setting */
          params->dsi.intermediat_buffer_num = 0;
          params->dsi.PS = LCM_PACKED_PS_24BIT_RGB888;
          params->dsi.word_count=FRAME_WIDTH*3;
      
          params->dsi.vertical_sync_active        = 2;
          params->dsi.vertical_backporch            = 14;
          params->dsi.vertical_frontporch            = 16;
          params->dsi.vertical_active_line        = FRAME_HEIGHT;
      
          params->dsi.horizontal_sync_active        = 2;
          params->dsi.horizontal_backporch        = 44;
          params->dsi.horizontal_frontporch        = 46;
          params->dsi.horizontal_active_pixel        = FRAME_WIDTH;
      
          params->dsi.ssc_disable    = 1;    //0表示开展频,1表示关展频
          params->dsi.ssc_range     = 6;    //6为展频幅度6%,此值可以修改
      
          params->dsi.PLL_CLOCK     = 205;
          
        params->dsi.esd_check_enable = 1; //enable ESD check
      	params->dsi.customization_esd_check_enable = 1; //0 TE ESD CHECK  1 LCD REG CHECK
      	params->dsi.lcm_esd_check_table[0].cmd          = 0x0F;//0X0A
      	params->dsi.lcm_esd_check_table[0].count        = 1;
      	params->dsi.lcm_esd_check_table[0].para_list[0] = 0xC0;//0X9C
        params->dsi.cont_clock    = 0;
        params->dsi.clk_lp_per_line_enable = 1;
      }
      
      static unsigned int lcm_compare_id(void);
      
      static void lcm_reset(void)
      {
          #ifdef BUILD_LK
          printf("[LK/LCM]xxxxxxx %s enter\n", __func__);
          #else
          printk("[Kernel/LCM] %s enter\n", __func__);
          #endif
      
          #ifdef BUILD_LK
          lcm_set_gpio_output(LCD_RST_PIN, GPIO_OUT_ONE);
          lcm_set_gpio_output(LCD_3V3_RST_PIN, GPIO_OUT_ONE);
          MDELAY(20);
          lcm_set_gpio_output(LCD_RST_PIN, GPIO_OUT_ZERO);
          lcm_set_gpio_output(LCD_3V3_RST_PIN, GPIO_OUT_ZERO);
          MDELAY(10);
          lcm_set_gpio_output(LCD_RST_PIN, GPIO_OUT_ONE);
          lcm_set_gpio_output(LCD_3V3_RST_PIN, GPIO_OUT_ONE);
          MDELAY(50);
      
          #else
          inettek_gpio_set("lcm_rst_en1");
          inettek_gpio_set("lcm_3v3_rst_en1");
          MDELAY(20);
          inettek_gpio_set("lcm_rst_en0");
          inettek_gpio_set("lcm_3v3_rst_en0");
          MDELAY(10);
          inettek_gpio_set("lcm_rst_en1");
          inettek_gpio_set("lcm_3v3_rst_en1");
          MDELAY(20);
          #endif
      }
      
      static void lcm_init(void)
      {
          #ifdef BUILD_LK
          printf("[LK/LCM]xxxxxxx %s enter\n", __func__);
          #else
          printk("[Kernel/LCM] %s enter\n", __func__);
          #endif
          lcm_reset();
          push_table(lcm_initialization_setting, sizeof(lcm_initialization_setting) / sizeof(struct LCM_setting_table), 1); 
      }
      
      static void lcm_resume(void)
      {
          #ifdef BUILD_LK
          printf("[LK/LCM]xxxxxxx %s enter\n", __func__);
          #else
          printk("[Kernel/LCM] %s enter\n", __func__);
          #endif
          lcm_reset();
      
          push_table(lcm_initialization_setting, sizeof(lcm_initialization_setting) / sizeof(struct LCM_setting_table), 1); 
      }
      
      static void lcm_init_power(void)
      {
          #ifdef BUILD_LK
          printf("[LK/LCM]xxxxxxx %s enter\n", __func__);
          #else
          printk("[Kernel/LCM] %s enter\n", __func__);
          #endif
      
          #ifdef BUILD_LK
          pmic_vgp2_enable(false, 1800);    //VCC_LCD8_1V8
          lcm_set_gpio_output(LCD_2V8_EN, GPIO_OUT_ONE);    //VCC_LCD_3V3
          MDELAY(20);
          pmic_vgp2_enable(true, 1800);    //VCC_LCD8_1V8
          MDELAY(10);
          lcm_set_gpio_output(LCD_AVDD_EN, GPIO_OUT_ONE);
          lcm_set_gpio_output(LCD_GAMA_EN, GPIO_OUT_ZERO);
          #else
          inettek_gpio_set("lcm_vcc_en1");
          inettek_gpio_set("lcm_avdd_en1");
          inettek_gpio_set("lcm_gama_en0");
          lcm_vgp_supply_enable();
          #endif
      }
      
      static void lcm_resume_power(void)
      {
          #ifdef BUILD_LK
          printf("[LK/LCM]xxxxxxx %s enter\n", __func__);
          #else
          printk("[Kernel/LCM] %s enter\n", __func__);
          #endif
      
          #ifdef BUILD_LK
          lcm_set_gpio_output(LCD_2V8_EN, GPIO_OUT_ONE);    //VCC_LCD_3V3
          pmic_vgp2_enable(true, 1800);    //VCC_LCD8_1V8
          lcm_set_gpio_output(LCD_AVDD_EN, GPIO_OUT_ONE);
          lcm_set_gpio_output(LCD_GAMA_EN, GPIO_OUT_ZERO);
          #else
          inettek_gpio_set("lcm_vcc_en1");
          lcm_vgp_supply_enable();
          inettek_gpio_set("lcm_avdd_en1");
          inettek_gpio_set("lcm_gama_en0");
          #endif
      }
      
      static void lcm_suspend(void)
      {
          #ifndef BUILD_LK
          //unsigned int data_array[16];
          printk("[Kernel/LCM] %s enter\n", __func__);
          // data_array[0] = 0x00280500; /* Display Off */
          // dsi_set_cmdq(data_array, 1, 1);
          // MDELAY(10);
          // data_array[0] = 0x00100500; /* Sleep In */
          // dsi_set_cmdq(data_array, 1, 1);
          // MDELAY(120);
          #endif
      }
      
      static void lcm_suspend_power(void)
      {
          #ifdef BUILD_LK
          printf("[LK/LCM]xxxxxxx %s enter\n", __func__);
          #else
          printk("[Kernel/LCM] %s enter\n", __func__);
          #endif
      
          #ifdef BUILD_LK
          lcm_set_gpio_output(LCD_2V8_EN, GPIO_OUT_ZERO);    //VCC_LCD_3V3
          pmic_vgp2_enable(false,1800);
          MDELAY(10);
          lcm_set_gpio_output(LCD_AVDD_EN, GPIO_OUT_ZERO);
          lcm_set_gpio_output(LCD_GAMA_EN, GPIO_OUT_ZERO);
          lcm_set_gpio_output(LCD_RST_PIN, GPIO_OUT_ZERO);
          lcm_set_gpio_output(LCD_3V3_RST_PIN, GPIO_OUT_ZERO);
          #else
          inettek_gpio_set("lcm_rst_en0");
          inettek_gpio_set("lcm_3v3_rst_en0");
          MDELAY(10);
          inettek_gpio_set("lcm_avdd_en0");
          inettek_gpio_set("lcm_gama_en0");
          lcm_vgp_supply_disable();
          inettek_gpio_set("lcm_vcc_en0");
          MDELAY(10);
          #endif
      }
      
      static unsigned int lcm_compare_id(void)
      {
          unsigned int id = 0xffff;
          unsigned int version_id = 0xff;
          unsigned char buffer[3];
          unsigned int hw_ver = 0;    
          unsigned int array[16];
          buffer[0] = 0xff;
          buffer[1] = 0xff;
          buffer[2] = 0xff;
      
          lcm_init_power();
          lcm_reset();
      
          // array[0] = 0x00023700;// read id return two byte,version and id
          array[0] = 0x00033700;// read id return two byte,version and id
          dsi_set_cmdq(array, 1, 1);
          read_reg_v2(0x04, buffer, 3);
      
          id = buffer[1]|(buffer[0]<<8);;    //we only need ID
          version_id = buffer[2];
      
      #ifdef BUILD_LK
          extern int g_hw_ver;
          hw_ver = g_hw_ver;
          //Read NV3052 ID, ID=0x3052, version_id=0x2, hw_ver=0x1
          printf("Read NV3052 ID, ID=0x%x, version_id=0x%x, hw_ver=0x%x\n", id , version_id , hw_ver);
          printf("[LK/LCM] %s %s is nv3052_bv055hdl_nb6! \n", __func__,hw_ver?"i50_lcm":"i70Plus_lcm");
      #else
          printk("Read NV3052 ID, ID=0x%x, version_id=0x%x, hw_ver=0x%x\n", id , version_id , hw_ver);
          printk("[Kernel/LCM] %s %s is nv3052_bv055hdl_nb6! \n", __func__,hw_ver?"i50_lcm":"i70Plus_lcm");
      #endif 
          if (hw_ver && (LCM_ID_NV3052 == id))
              return 1;
          else
              return 0;
      }
      
      LCM_DRIVER nv3052_bv055hdl_nb6_dsi_vdo_lcm_drv = {
          .name            = "nv3052_bv055hdl_nb6_dsi_vdo",
          .set_util_funcs = lcm_set_util_funcs,
          .get_params     = lcm_get_params,
          .init           = lcm_init,
          .init_power     = lcm_init_power,
          .suspend        = lcm_suspend,
          .resume         = lcm_resume,
          .resume_power    = lcm_resume_power,
          .suspend_power    = lcm_suspend_power,
          .compare_id     = lcm_compare_id,
      };
      
      发布在 其它全志芯片讨论区
      Z
      ZZZZ_
    • 回复: A133 Android10 启动很慢

      @memory 您好 我想问一下a133的mipi lcd为什么点不亮

      发布在 其它全志芯片讨论区
      Z
      ZZZZ_
    • 回复: A133 BOARD_HAS_SECURE_OS

      @tigger 怎么开机的 为啥我开不了机

      发布在 其它全志芯片讨论区
      Z
      ZZZZ_
    • 回复: 【已解决】D1s 调试 MIPI LCD 不亮

      @smiletiger 是怎么显示正常的 我这边mipi lcd点不亮

      发布在 MR Series
      Z
      ZZZZ_
    • 回复: 【已解决】D1s 调试 MIPI LCD 不亮

      @yuzukitsuru 我没有看uboot下面有这个啊

      发布在 MR Series
      Z
      ZZZZ_
    • 回复: 关于V851S的LCD 5.5寸MIPI屏幕驱动分享

      @wellschan 我现在用的a133的mipi lcd屏幕点不亮是什么情况,现在只有背光

      发布在 V Series
      Z
      ZZZZ_
    • a133 mipi lcd点不亮

      a133的mipi lcd点不亮是什么情况 现在只有背光

      发布在 其它全志芯片讨论区
      Z
      ZZZZ_