之前有点亮过23.6寸的双8液晶屏,这次手上刚好有块10.1寸屏幕,记录一下过程。
屏幕的型号。
百升达10.1寸组装-BP101WX1-206-BSD_YB181019.pdf
修改firefly-rk3288.dts 设备树信息
&fb {
rockchip,disp-mode = <DUAL>;
rockchip,uboot-logo-on = <0>;
rockchip,disp-policy = <DISPLAY_POLICY_BOX_TEMP>;
};
&disp_timings {
native-mode = <&timing3>;
timing3:timing3 {
screen-type = <SCREEN_LVDS>;
lvds-format = <LVDS_8BIT_1>;
out-face = <OUT_D888_P666>;
color-mode = <COLOR_RGB>;
clock-frequency = <65000000>;
hactive = <1280>;
vactive = <800>;
hback-porch = <60>;
hfront-porch = <40>;
vback-porch = <12>;
vfront-porch = <8>;
hsync-len = <4>;
vsync-len = <1>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <0x0>;
pixelclk-active = <0x0>;
swap-rb = <0x0>;
swap-rg = <0x0>;
swap-gb = <0x0>;
};
};
&rk_screen {
display-timings = <&disp_timings>;
};
vga_ddc@50 {
compatible = "firefly,vga_ddc";
reg = <0x50>;
gpio-pwn = <&gpio0 GPIO_C1 GPIO_ACTIVE_HIGH>;
rockchip,source = <0>; //0: LCDC0; 1: LCDC1
rockchip,prop = <PRMRY>;//<EXTEND>
//status = "okay";
status = "disabled";
};
一个通道,16.7M=2^24,即r,g,b各8位信号宽度
lvds电源3.0-3.6v,屏幕背光3-18v
这张表格给出了4对差分信号和一对时钟信号,那么对应rk3288的D0-D3和时钟C0,显然这是一对单8的lvds信号的屏幕
如何从屏幕规格书中来区分是单路还是双路?
有的规格书会简述,如:LVDS(1 ch,8 bit),表示LVDS接口类型是单通道,8bit的信号带宽(RGB每色有8阶色彩,总色为28*28*2^8=1677W色)。
最直观简单的方式就是从屏的引脚定义分析,通常双路LVDS屏都会有odd(or first) input channel和even(or second) input channel
时序参考这张表,可以看出屏幕分辨率1280 * 800。hactive 的值是 1280, vactive 的值是 800。同时我们也能知道这是一块 “横屏屏幕”。频率典型值为65MHZ
hback-porch + hfront-porch +hsync-len = 1330-1280=50
hfront-porch +vsync-len+vsync-active=812-800=12
这张表也可以看出每种颜色使用8位传输
下面其他要注意的参数:
clock-frequency
双路LVDS时,clocks要取LCD规格书中典型值的2倍
单路LVDS时,clocks取LCD规格书中的典型值即可
out-face
屏幕采用多少位的接线方式。(16.7M可知用24位连接,OUT_P888或者OUT_D888_P666)
lvds_format
lvds-format表示LVDS的数据方式(LVDS_8BIT_1、LVDS_8BIT_2、LVDS_8BIT_3、
LVDS_6BIT。)
screen_type
screen-type表示屏幕类型(RGB,LVDS,EDP,MIPI,HDMI,MCU)
SCREEN_LVDS又细分为(SCREEN_DUAL_LVDS,SCREEN_LVDS_10BIT,SCREEN_DUAL_LVDS_10BIT)
这里附上一张成功点亮的图片。