前言
今天拿到一个群创的8寸LVDS屏(VI080IA52),分辨率1,024*768,目前的问题是显示不正常,如下图:
正常应该是这样的:
调试
本次T113 SDK用的是原厂的Tina5.0,SDK中设备树中已经定义好了lcd节点,下面看看具体要修改哪些参数,打开内核设备树<SDK>/device/config/chips/t113/configs/evb1_auto/linux-5.4/board.dts
:
/* board.dts */
...
...
&lcd0 {
lcd_used = <1>;
lcd_driver_name = "default_lcd";
lcd_backlight = <50>;
lcd_if = <3>;
lcd_x = <1024>;
lcd_y = <768>;
lcd_width = <150>;
lcd_height = <94>;
lcd_dclk_freq = <65>;
lcd_pwm_used = <1>;
lcd_pwm_ch = <7>;
lcd_pwm_freq = <50000>;
lcd_pwm_pol = <1>;
lcd_pwm_max_limit = <255>;
lcd_hbp = <75>;
lcd_ht = <1344>;
lcd_hspw = <94>;
lcd_vbp = <23>;
lcd_vt = <806>;
lcd_vspw = <8>;
lcd_lvds_if = <0>;
lcd_lvds_colordepth = <0>;
lcd_lvds_mode = <1>;
lcd_frm = <1>;
lcd_hv_clk_phase = <0>;
lcd_hv_sync_polarity= <0>;
lcd_gamma_en = <0>;
lcd_bright_curve_en = <0>;
lcd_cmap_en = <0>;
deu_mode = <0>;
lcdgamma4iep = <22>;
smart_color = <90>;
pinctrl-0 = <&lvds0_pins_a>;
pinctrl-1 = <&lvds0_pins_b>;
};
...
...
LCD屏和LVDS屏所关注的参数略微不同,本次调试的是LVDS屏,只需关注以下参数:
lcd_if = <3>; // 0:hv(sync+de) 1:8080 2:ttl 3:lvds 4:dsi 5:edp 6:extend dsi
lcd_x = <1024>; // x方向分辨率
lcd_y = <768>; // y方向分辨率
lcd_dclk_freq = <65>; // lcd_ht * lcd_vt * fps(60),单位MHz
lcd_hbp = <75>; // 对应屏厂HBP+HSW
lcd_ht = <1344>; // 对应屏厂Width + HSW + HBP + HFP
lcd_hspw = <94>; // 对应屏厂HSW
lcd_vbp = <23>; // 对应屏厂VBP+VSW
lcd_vt = <806>; // 对应屏厂Height + VSW + VBP + VFP
lcd_vspw = <8>; // 对应屏厂VSW
lcd_lvds_if = <0>; // 0:single link 1:dual link
lcd_lvds_colordepth = <0>; // 0:8bit 1:6bit
lcd_lvds_mode = <1>; // 0:NS mode 1:JEIDA mode
pinctrl-0 = <&lvds0_pins_a>; //
pinctrl-1 = <&lvds0_pins_b>; //
本次调试主要卡在lcd_lvds_mode
值的选择,LVDS接口电路中,将像素的并行数据转换为串行数据的格式主要有两种标准:VESA和JEIDA。
VSEA标准格式如下图所示:
JEIDA标准格式如下图所示:
具体屏幕使用的是哪种格式,数据手册一般会说明。