From 9cafce62c1654b784ec818fb6dc09875c8be8c28 Mon Sep 17 00:00:00 2001 From: Shaochan Liu Date: Tue, 5 Mar 2019 10:58:00 +0800 Subject: [PATCH] lcd: add more panel clk ss step for tl1 [2/2] PD#SWPL-5290 Problem: add more panel clk ss step for tl1 Solution: change 5000ppm to 2000ppm for a step Verify: verify by t962x2-x301 Change-Id: Id8e6795f657cc4edf1fa0411721f741e87a0fcba Signed-off-by: Shaochan Liu --- arch/arm/boot/dts/amlogic/mesontl1_t309-panel.dtsi | 24 +++---- arch/arm/boot/dts/amlogic/mesontl1_x301-panel.dtsi | 24 +++---- .../boot/dts/amlogic/mesontl1_t309-panel.dtsi | 24 +++---- .../boot/dts/amlogic/mesontl1_x301-panel.dtsi | 24 +++---- drivers/amlogic/media/vout/lcd/lcd_clk_ctrl.h | 76 ++++++++++++++++++---- drivers/amlogic/media/vout/lcd/lcd_common.h | 3 +- 6 files changed, 114 insertions(+), 61 deletions(-) diff --git a/arch/arm/boot/dts/amlogic/mesontl1_t309-panel.dtsi b/arch/arm/boot/dts/amlogic/mesontl1_t309-panel.dtsi index 244e0b6..04ac1249 100644 --- a/arch/arm/boot/dts/amlogic/mesontl1_t309-panel.dtsi +++ b/arch/arm/boot/dts/amlogic/mesontl1_t309-panel.dtsi @@ -78,7 +78,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 6 /*clk_ss_level*/ + 15 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ lvds_attr = < @@ -163,7 +163,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 6 /*clk_ss_level*/ + 15 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ lvds_attr = < @@ -205,7 +205,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -247,7 +247,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -335,7 +335,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -381,7 +381,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -429,7 +429,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -478,7 +478,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -526,7 +526,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -574,7 +574,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -622,7 +622,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ minilvds_attr = < @@ -667,7 +667,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ minilvds_attr = < diff --git a/arch/arm/boot/dts/amlogic/mesontl1_x301-panel.dtsi b/arch/arm/boot/dts/amlogic/mesontl1_x301-panel.dtsi index 4ef780f..00b4c73 100644 --- a/arch/arm/boot/dts/amlogic/mesontl1_x301-panel.dtsi +++ b/arch/arm/boot/dts/amlogic/mesontl1_x301-panel.dtsi @@ -81,7 +81,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 6 /*clk_ss_level*/ + 15 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ lvds_attr = < @@ -166,7 +166,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 6 /*clk_ss_level*/ + 15 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ lvds_attr = < @@ -208,7 +208,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -250,7 +250,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -338,7 +338,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -384,7 +384,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -432,7 +432,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -481,7 +481,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -529,7 +529,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -577,7 +577,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -625,7 +625,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ minilvds_attr = < @@ -670,7 +670,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ minilvds_attr = < diff --git a/arch/arm64/boot/dts/amlogic/mesontl1_t309-panel.dtsi b/arch/arm64/boot/dts/amlogic/mesontl1_t309-panel.dtsi index 86d619f..906c6c5 100644 --- a/arch/arm64/boot/dts/amlogic/mesontl1_t309-panel.dtsi +++ b/arch/arm64/boot/dts/amlogic/mesontl1_t309-panel.dtsi @@ -78,7 +78,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 6 /*clk_ss_level*/ + 15 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ lvds_attr = < @@ -163,7 +163,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 6 /*clk_ss_level*/ + 15 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ lvds_attr = < @@ -205,7 +205,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -247,7 +247,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -335,7 +335,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -381,7 +381,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -429,7 +429,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -478,7 +478,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -526,7 +526,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -574,7 +574,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -622,7 +622,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ minilvds_attr = < @@ -667,7 +667,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ minilvds_attr = < diff --git a/arch/arm64/boot/dts/amlogic/mesontl1_x301-panel.dtsi b/arch/arm64/boot/dts/amlogic/mesontl1_x301-panel.dtsi index 028d173..c75c6c7b 100644 --- a/arch/arm64/boot/dts/amlogic/mesontl1_x301-panel.dtsi +++ b/arch/arm64/boot/dts/amlogic/mesontl1_x301-panel.dtsi @@ -81,7 +81,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 6 /*clk_ss_level*/ + 15 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ lvds_attr = < @@ -166,7 +166,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 6 /*clk_ss_level*/ + 15 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ lvds_attr = < @@ -208,7 +208,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -250,7 +250,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -338,7 +338,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -384,7 +384,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 1 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ vbyone_attr = < @@ -432,7 +432,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -481,7 +481,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -529,7 +529,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -577,7 +577,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ p2p_attr = < @@ -625,7 +625,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ minilvds_attr = < @@ -670,7 +670,7 @@ *(0=clk, 1=htotal, 2=vtotal, 3=auto_range, * 4=hdmi_mode) */ - 0 /*clk_ss_level*/ + 3 /*clk_ss_level*/ 1 /*clk_auto_generate*/ 0>; /*pixel_clk(unit in Hz)*/ minilvds_attr = < diff --git a/drivers/amlogic/media/vout/lcd/lcd_clk_ctrl.h b/drivers/amlogic/media/vout/lcd/lcd_clk_ctrl.h index e9b2777..cc52650 100644 --- a/drivers/amlogic/media/vout/lcd/lcd_clk_ctrl.h +++ b/drivers/amlogic/media/vout/lcd/lcd_clk_ctrl.h @@ -259,18 +259,36 @@ static char *lcd_ss_level_table_txlx[] = { static char *lcd_ss_level_table_tl1[] = { "0, disable", - "1, 5000ppm", - "2, 10000ppm", - "3, 15000ppm", - "4, 20000ppm", - "5, 25000ppm", - "6, 30000ppm", - "7, 35000ppm", - "8, 40000ppm", - "9, 45000ppm", - "10, 50000ppm", - "11, 55000ppm", - "12, 60000ppm", + "1, 2000ppm", + "2, 4000ppm", + "3, 6000ppm", + "4, 8000ppm", + "5, 10000ppm", + "6, 12000ppm", + "7, 14000ppm", + "8, 16000ppm", + "9, 18000ppm", + "10, 20000ppm", + "11, 22000ppm", + "12, 24000ppm", + "13, 25000ppm", + "14, 28000ppm", + "15, 30000ppm", + "16, 32000ppm", + "17, 33000ppm", + "18, 36000ppm", + "19, 38500ppm", + "20, 40000ppm", + "21, 42000ppm", + "22, 44000ppm", + "23, 45000ppm", + "24, 48000ppm", + "25, 50000ppm", + "26, 50000ppm", + "27, 54000ppm", + "28, 55000ppm", + "29, 55000ppm", + "30, 60000ppm", }; static char *lcd_ss_freq_table_tl1[] = { @@ -311,6 +329,7 @@ static unsigned int pll_ss_reg_txlx[][3] = { static unsigned int pll_ss_reg_tl1[][2] = { /* dep_sel, str_m */ +#if 0 { 0, 0}, /* 0: disable */ {10, 1}, /* 1: +/-0.25% */ {10, 2}, /* 2: +/-0.50% */ @@ -324,6 +343,39 @@ static unsigned int pll_ss_reg_tl1[][2] = { {10, 10}, /* 10: +/-2.50% */ {11, 10}, /* 11: +/-2.75% */ {12, 10}, /* 12: +/-3.00% */ +#else + { 0, 0}, /* 0: disable */ + { 4, 1}, /* 1: +/-0.1% */ + { 4, 2}, /* 2: +/-0.2% */ + { 4, 3}, /* 3: +/-0.3% */ + { 4, 4}, /* 4: +/-0.4% */ + { 4, 5}, /* 5: +/-0.5% */ + { 4, 6}, /* 6: +/-0.6% */ + { 4, 7}, /* 7: +/-0.7% */ + { 4, 8}, /* 8: +/-0.8% */ + { 4, 9}, /* 9: +/-0.9% */ + { 4, 10}, /* 10: +/-1.0% */ + { 11, 4}, /* 11: +/-1.1% */ + { 12, 4}, /* 12: +/-1.2% */ + { 10, 5}, /* 13: +/-1.25% */ + { 8, 7}, /* 14: +/-1.4% */ + { 6, 10}, /* 15: +/-1.5% */ + { 8, 8}, /* 16: +/-1.6% */ + { 11, 6}, /* 17: +/-1.65% */ + { 8, 9}, /* 18: +/-1.8% */ + { 11, 7}, /* 19: +/-1.925% */ + { 10, 8}, /* 20: +/-2.0% */ + { 12, 7}, /* 21: +/-2.1% */ + { 11, 8}, /* 22: +/-2.2% */ + { 9, 10}, /* 23: +/-2.25% */ + { 12, 8}, /* 24: +/-2.4% */ + { 10, 10}, /* 25: +/-2.5% */ + { 10, 10}, /* 26: +/-2.5% */ + { 12, 9}, /* 27: +/-2.7% */ + { 11, 10}, /* 28: +/-2.75% */ + { 11, 10}, /* 29: +/-2.75% */ + { 12, 10}, /* 30: +/-3.0% */ +#endif }; /* ********************************** diff --git a/drivers/amlogic/media/vout/lcd/lcd_common.h b/drivers/amlogic/media/vout/lcd/lcd_common.h index 175b191..1c571c1 100644 --- a/drivers/amlogic/media/vout/lcd/lcd_common.h +++ b/drivers/amlogic/media/vout/lcd/lcd_common.h @@ -38,7 +38,8 @@ /* 20190108: tl1 support tablet mode */ /* 20190115: tl1 tcon all interface support */ /* 20190225: optimize unifykey read flow to avoid crash */ -#define LCD_DRV_VERSION "20190225" +/* 20190308: add more panel clk_ss_level step for tl1 */ +#define LCD_DRV_VERSION "20190308" #define VPP_OUT_SATURATE (1 << 0) -- 2.7.4