概述
显示时序
首先需要了解这几个参数,并从显示屏的规格书找到这些值。
名称 | 解释 | 缩写 | 单位 |
Clock Frequency | 像素时钟 | cf | hz |
Horizontal Back Porch | 水平后肩,水平同步信号之后的时延 | hbp | clk |
Horizontal Front Porch | 水平前肩,水平同步信号之前的时延 | hfp | clk |
Horizontal Pulse Width | 水平同步信号的长度 | hsync | clk |
Vertical Back Porch | 垂直后肩,垂直同步信号之后的时延 | vbp | line |
Vertical Front Porch | 垂直前肩,垂直同步信号之前的时延 | vfp | line |
Vertical Pulse Width | 垂直同步信号长度 | vsync | line |
这里clk
= 1 / cf,line
=(hbp + hfp + hsync)* clk,假如显示屏的像素时钟规定为65000000hz,则clk = 1 / 65000000s
屏幕datasheet
Main clock = clock-frequency = 72300000hz
Hor Blanking = hbp + hfb + hsync = 160
H Sync Pulse Width = hsync = 32
H Sync Offset = hbp = 48
所以 hfp = 160 - 32 - 48 = 80
Ver Blanking = vbp + vfp + vsync = 22
V Sync Pulse Width = vsync = 6
V Sync Offset = vbp = 3
所以vfp = 22 - 6 - 3 = 13
所以对应dts
#if 1
&edp {
//vcc-supply = <&vdd10_lcd>;
//vccio-supply = <&vcc18_lcd>;
status = "okay";
};
&edp_phy {
status = "okay";
};
&edp {
status = "okay";
};
&edp_phy {
status = "okay";
};
&route_edp {
status = "okay";
};
&edp_in_vopb {
status = "okay";
};
&edp_in_vopl {
status = "disabled";
};
&edp_panel {
compatible ="lg,lp079qx1-sp0v", "simple-panel";
backlight = <&backlight>;
enable-gpios = <&gpio7 14 GPIO_ACTIVE_HIGH>;
enable-delay-ms = <120>;
pinctrl-0 = <&lcd_cs>;
power-supply = <&vcc_lcd>;
status = "okay";
display_timings: display-timings {
native-mode = <&timing_edp>;
timing_edp: timing0 {
clock-frequency = <72300000>;
hactive = <1366>;
vactive = <768>;
hfront-porch = <80>; //H blanking 160
hsync-len = <32>;
hback-porch = <48>;
vfront-porch = <13>; //V blanking 22
vsync-len = <6>;
vback-porch = <3>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <0>;
pixelclk-active = <0>;
};
};
};
#endif
&hdmi{
status = "disabled";
};
有的datasheet 会直接给出屏参 如下图
可以看到,此款 LCD 可以用 DE 和 SYNC 两种模式去驱动,我们常用的是 SYNC 模式,
从软件上来说, DE 模式和 SYNC 模式是一样的,软件上不做区分。从表中我们可以得
到如下参数:
Left_margin = HBP(Horizontal Back Porch) = 16;
Right_margin = HFP(Horizontal Front Porch) = 210;
Hsync = HPW(Horizontal Pulse Width ) = 30;
Xres = HVD(Horizontal Valid) = 800;
Upper_margin = VBP(Vertical Back Porch) = 10;
low_margin = VFP(Vertical Front Porch) = 22;
Vsync = VPW(Vertical Pulse Width) = 13;
Yres = VVD(Vertical Valid) = 480;
而且这些参数满足如下公式:
Left_margin + right_margin + hsync + xres = horizontal period
Upper_margin + low_margin + vsync + yres = vertical period
最后
以上就是不安大象为你收集整理的Rk 平台显示屏调试的全部内容,希望文章能够帮你解决Rk 平台显示屏调试所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复