lcd_extern: update mipi_tv070wsm init_table
authorWeiming Liu <weiming.liu@amlogic.com>
Thu, 29 Mar 2018 08:39:25 +0000 (16:39 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Tue, 10 Apr 2018 07:14:26 +0000 (23:14 -0800)
PD#163292: lcd_extern: update mipi init code for boe panel on g12a board

Change-Id: I8a9aea07b23423c268943c754d4f64131e0c4c6f
Signed-off-by: Weiming Liu <weiming.liu@amlogic.com>
arch/arm64/boot/dts/amlogic/mesong12a_skt-panel.dtsi
drivers/amlogic/media/vout/lcd/lcd_extern/lcd_extern.c
drivers/amlogic/media/vout/lcd/lcd_extern/mipi_TV070WSM.c
drivers/amlogic/media/vout/lcd/lcd_tablet/mipi_dsi_util.c
drivers/amlogic/media/vout/lcd/lcd_tablet/mipi_dsi_util.h

index d7d6897..ecad668 100644 (file)
                        model_name = "TL050FHV02CT";
                        interface = "mipi";
                        basic_setting = <1080 1920 /*h_active, v_active*/
-                               1125 2200 /*h_period, v_period*/
+                               1125 2100 /*h_period, v_period*/
                                8 /*lcd_bits*/
                                65 119>; /*screen_widht, screen_height*/
                        lcd_timing = <5 30 0 /*hs_width,hs_bp,hs_pol*/
-                               88 148 0>; /*vs_width,vs_bp,vs_pol*/
+                               44 108 0>; /*vs_width,vs_bp,vs_pol*/
                        clk_attr = <0 /*fr_adj_type(0=clock,1=htotal,2=vtotal)*/
                                0 /*clk_ss_level*/
                                1 /*clk_auto_generate*/
-                               148500000>; /*pixel_clk(unit in Hz)*/
+                               118125000>; /*pixel_clk(unit in Hz)*/
                        mipi_attr = <4 /*lane_num*/
-                               900 /*bit_rate_max(MHz)*/
+                               960 /*bit_rate_max(MHz)*/
                                0 /*factor(*100, default 0 for auto)*/
                                1 /*operation_mode_init(0=video, 1=command)*/
                                0 /*operation_mode_display(0=video, 1=command)*/
index 1e1397c..3f23867 100644 (file)
@@ -1367,7 +1367,7 @@ static int lcd_extern_add_driver(struct lcd_extern_config_s *extconf)
  * debug function
  * *********************************************************
  */
-#define EXT_LEN_MAX   200
+#define EXT_LEN_MAX   2000
 static void lcd_extern_init_table_dynamic_size_print(
                struct lcd_extern_config_s *econf, int flag)
 {
index c15558c..5559209 100644 (file)
@@ -38,6 +38,7 @@
  *             data0=gpio_index, data1=gpio_value, data2=delay.
  */
 static unsigned char mipi_init_on_table[] = {
+       0xff, 100,   /* delay */
        0x15, 2, 0x62, 0x01,
        0x39, 5, 0xff, 0xaa, 0x55, 0x25, 0x01,
        0x15, 2, 0xfc, 0x08,
@@ -56,9 +57,6 @@ static unsigned char mipi_init_on_table[] = {
        0x39, 6, 0xbd, 0x03, 0x02, 0x19, 0x17, 0x00,
        0x15, 2, 0xc8, 0x80,
        0x39, 6, 0xf0, 0x55, 0xaa, 0x52, 0x08, 0x01,
-
-       0x39, 4, 0xC7, 0x05, 0x80, 0x00,
-
        0x39, 3, 0xB2, 0x01, 0x01,
        0x39, 3, 0xB3, 0x28, 0x28,
        0x39, 3, 0xB4, 0x14, 0x14,
@@ -67,30 +65,50 @@ static unsigned char mipi_init_on_table[] = {
        0x39, 3, 0xBA, 0x25, 0x25,
        0x39, 3, 0xBC, 0x88, 0x00,
        0x39, 3, 0xBD, 0x88, 0x00,
-       0x15, 2, 0xBE, 0x4B,
        0x39, 6, 0xF0, 0x55, 0xAA, 0x52, 0x08, 0x02,
-       0x15, 2, 0xEE, 0x03,
-       0x39, 17, 0xB0, 0x00, 0x41, 0x00, 0x56, 0x00, 0x78, 0x00, 0x8F, 0x00,
-               0xA6, 0x00, 0xC9, 0x00, 0xE5, 0x01, 0x13,
-       0x39, 17, 0xB1, 0x01, 0x37, 0x01, 0x73, 0x01, 0xA0, 0x01, 0xE5, 0x02,
-               0x1D, 0x02, 0x1E, 0x02, 0x51, 0x02, 0x88,
-       0x39, 17, 0xB2, 0x02, 0xAD, 0x02, 0xDE, 0x02, 0xFE, 0x03, 0x29, 0x03,
-               0x46, 0x03, 0x6E, 0x03, 0x8E, 0x03, 0x95,
-       0x39, 5, 0xB3, 0x03, 0xC5, 0x03, 0xD4,
-       0x39, 17, 0xB4, 0x00, 0x41, 0x00, 0x56, 0x00, 0x78, 0x00, 0x8F, 0x00,
-               0xA6, 0x00, 0xC9, 0x00, 0xE5, 0x01, 0x13,
-       0x39, 17, 0xB5, 0x01, 0x37, 0x01, 0x73, 0x01, 0xA0, 0x01, 0xE5, 0x02,
-               0x1D, 0x02, 0x1E, 0x02, 0x51, 0x02, 0x88,
-       0x39, 17, 0xB6, 0x02, 0xAD, 0x02, 0xDE, 0x02, 0xFE, 0x03, 0x29, 0x03,
-               0x46, 0x03, 0x6E, 0x03, 0x8E, 0x03, 0x95,
-       0x39, 5, 0xB7, 0x03, 0xC5, 0x03, 0xD4,
-       0x39, 17, 0xB8, 0x01, 0x18, 0x01, 0x1D, 0x01, 0x26, 0x01, 0x2F, 0x01,
-               0x38, 0x01, 0x48, 0x01, 0x56, 0x01, 0x6D,
-       0x39, 17, 0xB9, 0x01, 0x84, 0x01, 0xA7, 0x01, 0xCC, 0x02, 0x04, 0x02,
-               0x33, 0x02, 0x34, 0x02, 0x62, 0x02, 0x9A,
-       0x39, 17, 0xBA, 0x02, 0xBB, 0x02, 0xE5, 0x03, 0x07, 0x03, 0x35, 0x03,
-               0x4C, 0x03, 0x6E, 0x03, 0x8E, 0x03, 0x95,
-       0x39, 5, 0xBB, 0x03, 0xC5, 0x03, 0xD4,
+       0x15, 2, 0xEE, 0x00,
+       0x39, 17, 0xB0, 0x00, 0x4B, 0x00, 0x5C, 0x00, 0x79, 0x00, 0x94, 0x00,
+               0xA6, 0x00, 0xD8, 0x00, 0xF2, 0x01, 0x19,
+       0x39, 17, 0xB1, 0x01, 0x39, 0x01, 0x77, 0x01, 0xA2, 0x01, 0xF2, 0x02,
+               0x32, 0x02, 0x34, 0x02, 0x6D, 0x02, 0xA2,
+       0x39, 17, 0xB2, 0x02, 0xC7, 0x02, 0xF2, 0x03, 0x18, 0x03, 0x43, 0x03,
+               0x65, 0x03, 0x86, 0x03, 0x8F, 0x03, 0x94,
+       0x39, 5, 0xB3, 0x03, 0x96, 0x03, 0x98,
+       0x39, 17, 0xB4, 0x00, 0x84, 0x00, 0x91, 0x00, 0xA4, 0x00, 0xB6, 0x00,
+               0xCA, 0x00, 0xE9, 0x01, 0x02, 0x01, 0x2A,
+       0x39, 17, 0xB5, 0x01, 0x49, 0x01, 0x82, 0x01, 0xAF, 0x01, 0xF7, 0x02,
+               0x36, 0x02, 0x38, 0x02, 0x70, 0x02, 0xA6,
+       0x39, 17, 0xB6, 0x02, 0xC8, 0x02, 0xF5, 0x03, 0x1A, 0x03, 0x43, 0x03,
+               0x62, 0x03, 0x82, 0x03, 0x8F, 0x03, 0x94,
+       0x39, 5, 0xB7, 0x03, 0x96, 0x03, 0x98,
+       0x39, 17, 0xB8, 0x01, 0x22, 0x01, 0x27, 0x01, 0x2E, 0x01, 0x38, 0x01,
+               0x40, 0x01, 0x53, 0x01, 0x60, 0x01, 0x7B,
+       0x39, 17, 0xB9, 0x01, 0x8C, 0x01, 0xB5, 0x01, 0xD3, 0x02, 0x11, 0x02,
+               0x49, 0x02, 0x4A, 0x02, 0x7F, 0x02, 0xB1,
+       0x39, 17, 0xBA, 0x02, 0xD1, 0x03, 0x00, 0x03, 0x22, 0x03, 0x49, 0x03,
+               0x60, 0x03, 0x7A, 0x03, 0x8B, 0x03, 0x8F,
+       0x39, 5, 0xBB, 0x03, 0x93, 0x03, 0x9A,
+       0x39, 17, 0xBC, 0x00, 0x37, 0x00, 0x48, 0x00, 0x65, 0x00, 0x80, 0x00,
+               0x92, 0x00, 0xC4, 0x00, 0xDE, 0x01, 0x05,
+       0x39, 17, 0xBD, 0x01, 0x31, 0x01, 0x6F, 0x01, 0x9E, 0x01, 0xEE, 0x02,
+               0x32, 0x02, 0x34, 0x02, 0x71, 0x02, 0xA7,
+       0x39, 17, 0xBE, 0x02, 0xD3, 0x02, 0xFE, 0x03, 0x24, 0x03, 0x4F, 0x03,
+               0x71, 0x03, 0x92, 0x03, 0x9B, 0x03, 0xA0,
+       0x39, 5, 0xBF, 0x03, 0xA6, 0x03, 0xA8,
+       0x39, 17, 0xC0, 0x00, 0x70, 0x00, 0x7D, 0x00, 0x90, 0x00, 0xA4, 0x00,
+               0xB6, 0x00, 0xD5, 0x00, 0xEE, 0x01, 0x16,
+       0x39, 17, 0xC1, 0x01, 0x41, 0x01, 0x7A, 0x01, 0xAB, 0x01, 0xF3, 0x02,
+               0x36, 0x02, 0x38, 0x02, 0x74, 0x02, 0xAA,
+       0x39, 17, 0xC2, 0x02, 0xD4, 0x03, 0x01, 0x03, 0x26, 0x03, 0x4F, 0x03,
+               0x6E, 0x03, 0x8E, 0x03, 0x9B, 0x03, 0xA0,
+       0x39, 5, 0xC3, 0x03, 0xA6, 0x03, 0xA8,
+       0x39, 17, 0xC4, 0x01, 0x0E, 0x01, 0x13, 0x01, 0x1A, 0x01, 0x24, 0x01,
+               0x2C, 0x01, 0x3F, 0x01, 0x4C, 0x01, 0x67,
+       0x39, 17, 0xC5, 0x01, 0x84, 0x01, 0xAD, 0x01, 0xCF, 0x02, 0x0D, 0x02,
+               0x49, 0x02, 0x4A, 0x02, 0x83, 0x02, 0xB5,
+       0x39, 17, 0xC6, 0x02, 0xDD, 0x03, 0x0C, 0x03, 0x2E, 0x03, 0x55, 0x03,
+               0x6B, 0x03, 0x86, 0x03, 0x97, 0x03, 0x9B,
+       0x39, 5, 0xC7, 0x03, 0xA1, 0x03, 0xA8,
        0x39, 6, 0xF0, 0x55, 0xAA, 0x52, 0x08, 0x04,
        0x39, 6, 0xB1, 0x03, 0x02, 0x02, 0x02, 0x00,
        0x39, 6, 0xF0, 0x55, 0xAA, 0x52, 0x08, 0x06,
@@ -134,14 +152,12 @@ static unsigned char mipi_init_on_table[] = {
        0x39, 6, 0xB3, 0x03, 0x00, 0x00, 0x00, 0x00,
        0x39, 6, 0xBA, 0x31, 0x00, 0x00, 0x00, 0x00,
        0x15, 2, 0x35, 0x00,
-       0x15, 2, 0x51, 0xAA,
+       0x15, 2, 0x51, 0xFF,
        0x15, 2, 0x53, 0x2C,
-       0x15, 2, 0x55, 0x00,
-
+       0x15, 2, 0x55, 0x03,
        0x05, 1, 0x11,
        0xff, 120,  /* delay 120ms */
        0x05, 1, 0x29,
-       0xff, 130,   /* delay 130ms */
        0xff, 0xff, /* ending flag */
 };
 
index 603557b..d58cf50 100644 (file)
@@ -1198,6 +1198,8 @@ int dsi_write_cmd(unsigned char *payload)
 #ifdef DSI_CMD_READ_VALID
        int k = 0, n = 0;
        unsigned char rd_data[100];
+       unsigned char str[200];
+       int len;
 #endif
        struct dsi_cmd_request_s dsi_cmd_req;
        unsigned char vc_id = MIPI_DSI_VIRTUAL_CHAN_ID;
@@ -1280,14 +1282,18 @@ int dsi_write_cmd(unsigned char *payload)
                                        2 : dsi_cmd_req.pld_count;
                                n = dsi_generic_read_packet(&dsi_cmd_req,
                                                &rd_data[0]);
-                               LCDPR("generic read data");
+                               len = 0;
                                for (k = 0; k < dsi_cmd_req.pld_count; k++) {
-                                       pr_info(" 0x%02x",
+                                       len += sprintf(str+len, " 0x%02x",
                                                dsi_cmd_req.payload[k+2]);
                                }
-                               for (k = 0; k < n; k++)
-                                       pr_info("0x%02x ", rd_data[k]);
-                               pr_info("\n");
+                               pr_info("generic read data%s:\n", str);
+                               len = 0;
+                               for (k = 0; k < n; k++) {
+                                       len += sprintf(str+len, "0x%02x ",
+                                               rd_data[k]);
+                               }
+                               pr_info("  %s\n", str);
                                break;
                        case DT_DCS_RD_0:
                                /* need BTA ack */
@@ -1296,9 +1302,12 @@ int dsi_write_cmd(unsigned char *payload)
                                        &rd_data[0]);
                                pr_info("dcs read data 0x%02x:\n",
                                        dsi_cmd_req.payload[2]);
-                               for (k = 0; k < n; k++)
-                                       pr_info("0x%02x ", rd_data[k]);
-                               pr_info("\n");
+                               len = 0;
+                               for (k = 0; k < n; k++) {
+                                       len += sprintf(str+len, "0x%02x ",
+                                               rd_data[k]);
+                               }
+                               pr_info("  %s\n", str);
                                break;
 #endif
                        default:
index 01ee119..d72f4ce 100644 (file)
@@ -531,7 +531,7 @@ struct dsi_vid_s {
        unsigned int vact;
 };
 
-#define DSI_CMD_SIZE_MAX               2000
+#define DSI_CMD_SIZE_MAX               3000
 #define DSI_CMD_READ_VALID
 
 extern void mipi_dsi_print_info(struct lcd_config_s *pconf);