完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
概述
平台:RK3288 板型:Firefly-RK3288 Host:Ubuntu 16.04 LCD:BP101WX1-206 Firefly Linux SDK: 由于Firefly-RK3288这块板默认没有开启LVDS输出,所以编写了这份文档,记录LVDS屏幕如何驱动。 核心概念 视觉输出处理器vop(Visual Output Processor) vop是一个把frame buffer数据传输到指定显示设备(RGB LCD Panel,LVDS,MIPI,eDP,HDMI等)的接口,它还包含了显示处理和图层处理等功能,传统意义上就是一个显示控制器(Display Controller)。rk3288内部有两个vop单元,分别是vopb和vopl。具体可参考《rk3288-chapter-27-visual-output-processor-(vop)》 视频信号传输接口LVDS(Low-Voltage Differential Signaling) LVDS接口把vop输出的CMOS信号为低压差分信号,以此减少噪声对视频信号的干扰,同时减少了线路数量,RGB接口的线路比LVDS要多很多。具体参考《rk3288-chapter-33-lvds》。 显示面板Panel 主要用来把RGB信号转为视觉画面展示出来。 显示时序 有几个重要参数必须要了解的,这些参数都可以在显示屏的datasheet里面找到。 [tr]名称解释缩写单位[/tr]
这里clk = 1 / cf,line =(hbp + hfp + hsync)* clk,假如显示屏的像素时钟规定为65000000hz,则clk = 1 / 65000000s(具体我就不算了)。 内核DTS修改 1、屏幕datasheet第32页显示的关键参数 从屏幕datasheet可知道 Main clock = clock-frequency = 65000000hz Hor Blanking = hbp + hfb + hsync = 50 H Sync Pulse Width = hsync = 32 H Sync Offset = hbp = 10 所以 hfp = 50 - 32 - 10 = 8 Ver Blanking = vbp + vfp + vsync = 12 V Sync Pulse Width = vsync = 6 V Sync Offset = vbp = 3 所以vfp = 12 - 6 - 3 = 3 2、屏幕datasheet第20页显示的时序图 可知道在DCLK(这里就是我指的cf)下降沿采集数据,DE为高电平时数据有效。而hsync和vsync都是低电平触发。 3、进入arch/arm/boot/dts,修改rk3288-firefly.dts cd arch/arm/boot/dts/ vi rk3288-firefly.dts 4、增加使用LVDS相关节点 #include ...... &route_hdmi { status = "okay"; }; &route_lvds { // 使能lvds路由,使显示子系统的数据能够经过vopl传输到lvds status = "okay"; }; ...... &lvds_in_vopb { // 我们屏幕是1280x800使用vopl输入即可,所以关闭vopb的输入 status = "disabled"; }; &lvds { // 使能lvds接口 status = "okay"; }; &lvds_panel { status = "okay"; compatible ="simple-panel"; // 使用4.x内核的simple panel框架 // power-supply = <&vcc_lcd>; // 因为屏幕不使用gpio供电,所以注释掉 // backlight = <&backlight>; // 因为屏幕不使用背光调节,所以注释掉 bus-format = enable-delay-ms = <10>; rockchip,data-mapping = "vesa"; // lvds数据格式 rockchip,data-width = <24>; // 24位 rockchip,output = "lvds"; // lvds接口输出 display-timings { native-mode = <&timing0>; timing0: timing0 { clock-frequency = <65000000>; // 参考第1点 hactive = <1280>; // 这里填分辨率即可 vactive = <800>; hback-porch = <10>; // 参考第1点 hfront-porch = <8>; // 参考第1点 vback-porch = <3>; // 参考第1点 vfront-porch = <3>; // 参考第1点 hsync-len = <32>; // 参考第1点 vsync-len = <6>; // 参考第1点 hsync-active = <0>; // 参考第2点 vsync-active = <0>; // 参考第2点 de-active = <1>; // 参考第2点 pixelclk-active = <0>; // 参考第2点 }; }; }; 5、相关dts节点查看 文件rk3288-linux.dtsi display-subsystem { status = "okay"; ports = <&vopb_out>, <&vopl_out>; logo-memory-region = <&drm_logo>; route { route_hdmi: route-hdmi { status = "disabled"; logo,uboot = "logo.bmp"; logo,kernel = "logo_kernel.bmp"; logo,mode = "center"; charge_logo,mode = "center"; connect = <&vopb_out_hdmi>; }; route_edp: route-edp { status = "disabled"; logo,uboot = "logo.bmp"; logo,kernel = "logo_kernel.bmp"; logo,mode = "center"; charge_logo,mode = "center"; connect = <&vopl_out_edp>; }; route_dsi0: route-dsi0 { status = "disabled"; logo,uboot = "logo.bmp"; logo,kernel = "logo_kernel.bmp"; logo,mode = "center"; charge_logo,mode = "center"; connect = <&vopl_out_dsi0>; }; route_lvds: route-lvds { status = "disabled"; logo,uboot = "logo.bmp"; logo,kernel = "logo_kernel.bmp"; logo,mode = "center"; charge_logo,mode = "center"; connect = <&vopl_out_lvds>; // 这里连接到vopl输出lvds的链路 }; }; 文件rk3288.dtsi vopl: vop@ff940000 { compatible = "rockchip,rk3288-vop-lit"; rockchip,grf = <&grf>; reg = <0x0 0xff940000 0x0 0x19c>, <0x0 0xff941000 0x0 0x1000>; reg-names = "regs", "gamma_lut"; interrupts = clocks = <&cru ACLK_VOP1>, <&cru DCLK_VOP1>, <&cru HCLK_VOP1>; clock-names = "aclk_vop", "dclk_vop", "hclk_vop"; power-domains = <&power RK3288_PD_VIO>; resets = <&cru SRST_LCDC1_AXI>, <&cru SRST_LCDC1_AHB>, <&cru SRST_LCDC1_DCLK>; reset-names = "axi", "ahb", "dclk"; iommus = <&vopl_mmu>; status = "disabled"; vopl_out: port { #address-cells = <1>; #size-cells = <0>; vopl_out_hdmi: endpoint@0 { reg = <0>; remote-endpoint = <&hdmi_in_vopl>; }; vopl_out_edp: endpoint@1 { reg = <1>; remote-endpoint = <&edp_in_vopl>; }; vopl_out_dsi0: endpoint@2 { reg = <2>; remote-endpoint = <&dsi0_in_vopl>; }; vopl_out_lvds: endpoint@3 { // 端点3 reg = <3>; remote-endpoint = <&lvds_in_vopl>; // 连接到lvds的输入端 }; vopl_out_dsi1: endpoint@4 { reg = <4>; remote-endpoint = <&dsi1_in_vopl>; }; }; }; lvds: lvds@ff96c000 { compatible = "rockchip,rk3288-lvds"; reg = <0x0 0xff96c000 0x0 0x4000>; clocks = <&cru PCLK_LVDS_PHY>; clock-names = "pclk_lvds"; power-domains = <&power RK3288_PD_VIO>; rockchip,grf = <&grf>; status = "disabled"; ports { #address-cells = <1>; #size-cells = <0>; lvds_in: port@0 { // 两个端点 reg = <0>; #address-cells = <1>; #size-cells = <0>; lvds_in_vopb: endpoint@0 { // 连接到vopb的输出端 reg = <0>; remote-endpoint = <&vopb_out_lvds>; }; lvds_in_vopl: endpoint@1 { // 连接到vopl的输出端 reg = <1>; remote-endpoint = <&vopl_out_lvds>; }; }; }; |
|||
|
|||
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1906 浏览 1 评论
synopsys 的design ware:DW_fpv_div,浮点数除法器,默认32位下,想提升覆盖率(TMAX),如果用功能case去提升覆盖率呢?
2382 浏览 1 评论
RK3588 GStreamer调试四路鱼眼摄像头四宫格显示报错
5175 浏览 1 评论
【飞凌嵌入式OK3576-C开发板体验】RKNN神经网络-YOLO图像识别
254 浏览 0 评论
【飞凌嵌入式OK3576-C开发板体验】SSH远程登录网络配置及CAN通讯
1336 浏览 0 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-21 22:49 , Processed in 0.567239 second(s), Total 41, Slave 34 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号