0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

RK3588-MIPI屏幕调试笔记:RK3588-MIPI-DSI之LCD上电初始化时序

jf_30051736 来源:jf_30051736 作者:jf_30051736 2023-06-10 10:32 次阅读

一. 简介

  • mipi屏调试一般都要在RK平台的dts中配置屏幕上电初始化时序 :panel-init-sequence和下电初始化时序:panel-exit-sequence。本文讲解如何配置屏幕的这些初始化时序。
  • 专栏总目录

二. 数据类型:Data Type

2.1 常见数据类型 1 :DCS Write

注意:这里的parameter并不是指数据字节个数

0x05 命令类型: 单字节数据    (DCS Short Write, no parameters)
0x15 命令类型: 双字节数据    (DCS Short Write, 1 parameter)


0x39 命令类型: 多字节数据    (DCS Long Write, n parameters n > 2)

0x05 命令类型:(DCS Short Write, no parameters)

05 95 01 11
05 95 01 29

0x15 命令类型:(DCS Short Write, 1 parameter)

15 00 02 80 77
|  |  | |  |
|  |  | |  数据
|  |  | | 寄存器地址
|  |  数据长度
|  延时
命令类型(0x05: 单字节数据 0x15: 双字节数据 0x39: 多字节数据)
	
解析:
Data Type:0x15       ( 0x15格式的数据类型 DCS Short Write, 1 parameter)
Delay:0x00           ( 延时,表示当前 Packet 发送完成之后,需要延时多少 ms,再开始发送下一条命令 )
Payload Length:0x02  ( Packet 的有效负载长度为2 Bytes,数据字节个数为2 )
Payload: 0x80 0x77    ( Payload 数据 )

0x39 命令类型是带多个参数,大于两个参数 (DCS Long Write / write_LUT Command Packet)

39 00 06 FF 77 01 00 00 10
39 00 03 C0 63 00
39 00 03 C1 11 02

2.2 常见数据类型 2 :Generic Write

注意:这里的parameter并不是指数据字节个数

0x03 命令类型:  单字节数据 (Generic Short Write, no parameters)
0x13 命令类型:  双字节数据 (Generic Short Write, 1 parameter)


0x23 命令类型:  三字节数据 (Generic Short Write, 2 parameters)


0x29 命令类型:  多字节数据 (Generic Long Write, n parameters n > 2)

三. RK平台上电初始化时序配置

屏厂给的MIPI屏初始化代码:

params- >dsi.vertical_sync_active=2
params- >dsi.vertical_backporch=10
params- >dsi.vertical_frontporch=14
params- >dsi.horizontal_sync_active=24
params- >dsi.horizontal_backporch=80
params- >dsi.horizontal_frontporch=60
params- >dsi.PLL_CLOCK=478
 
LCD_nReset=1;
Delayms(5);
LCD_nReset=0;
Delayms(20);//10
LCD_nReset=1;
Delayms(200);//120

Generic_Short_Write_1P(0xB0,0x01);	
Generic_Short_Write_1P(0xC0,0x26);	
Generic_Short_Write_1P(0xC1,0x10);	
Generic_Short_Write_1P(0xC2,0x0E);	
Generic_Short_Write_1P(0xC3,0x00);	
Generic_Short_Write_1P(0xC4,0x00);	
Generic_Short_Write_1P(0xC5,0x23);	
Generic_Short_Write_1P(0xC6,0x11);	
Generic_Short_Write_1P(0xC7,0x22);	
Generic_Short_Write_1P(0xC8,0x20);	
Generic_Short_Write_1P(0xC9,0x1E);	
Generic_Short_Write_1P(0xCA,0x1C);	
Generic_Short_Write_1P(0xCB,0x0C);	
Generic_Short_Write_1P(0xCC,0x0A);	
Generic_Short_Write_1P(0xCD,0x08);	
Generic_Short_Write_1P(0xCE,0x06);	
Generic_Short_Write_1P(0xCF,0x18);	
Generic_Short_Write_1P(0xD0,0x02);	
Generic_Short_Write_1P(0xD1,0x00);	
Generic_Short_Write_1P(0xD2,0x00);	
Generic_Short_Write_1P(0xD3,0x00);	
Generic_Short_Write_1P(0xD4,0x26);	
Generic_Short_Write_1P(0xD5,0x0F);	
Generic_Short_Write_1P(0xD6,0x0D);	
Generic_Short_Write_1P(0xD7,0x00);	
Generic_Short_Write_1P(0xD8,0x00);	
Generic_Short_Write_1P(0xD9,0x23);	
Generic_Short_Write_1P(0xDA,0x11);	
Generic_Short_Write_1P(0xDB,0x21);	
Generic_Short_Write_1P(0xDC,0x1F);	
Generic_Short_Write_1P(0xDD,0x1D);	
Generic_Short_Write_1P(0xDE,0x1B);	
Generic_Short_Write_1P(0xDF,0x0B);	
Generic_Short_Write_1P(0xE0,0x09);	
Generic_Short_Write_1P(0xE1,0x07);	
Generic_Short_Write_1P(0xE2,0x05);	
Generic_Short_Write_1P(0xE3,0x17);	
Generic_Short_Write_1P(0xE4,0x01);	
Generic_Short_Write_1P(0xE5,0x00);	
Generic_Short_Write_1P(0xE6,0x00);	
Generic_Short_Write_1P(0xE7,0x00);	
Generic_Short_Write_1P(0xB0,0x03);	
Generic_Short_Write_1P(0xBE,0x04);	
Generic_Short_Write_1P(0xB9,0x40);	
Generic_Short_Write_1P(0xCC,0x88);	
Generic_Short_Write_1P(0xC8,0x0C);	
Generic_Short_Write_1P(0xC9,0x07);	
Generic_Short_Write_1P(0xCD,0x01);	
Generic_Short_Write_1P(0xCA,0x40);	
Generic_Short_Write_1P(0xCE,0x1A);	
Generic_Short_Write_1P(0xCF,0x60);	
Generic_Short_Write_1P(0xD2,0x08);	
Generic_Short_Write_1P(0xD3,0x08);	
Generic_Short_Write_1P(0xDB,0x01);	
Generic_Short_Write_1P(0xD9,0x06);	
Generic_Short_Write_1P(0xD4,0x00);	
Generic_Short_Write_1P(0xD5,0x01);	
Generic_Short_Write_1P(0xD6,0x04);	
Generic_Short_Write_1P(0xD7,0x03);	
Generic_Short_Write_1P(0xC2,0x00);	
Generic_Short_Write_1P(0xC3,0x0E);	
Generic_Short_Write_1P(0xC4,0x00);	
Generic_Short_Write_1P(0xC5,0x0E);	
Generic_Short_Write_1P(0xDD,0x00);	
Generic_Short_Write_1P(0xDE,0x0E);	
Generic_Short_Write_1P(0xE6,0x00);	
Generic_Short_Write_1P(0xE7,0x0E);	
Generic_Short_Write_1P(0xC2,0x00);	
Generic_Short_Write_1P(0xC3,0x0E);	
Generic_Short_Write_1P(0xC4,0x00);	
Generic_Short_Write_1P(0xC5,0x0E);	
Generic_Short_Write_1P(0xDD,0x00);	
Generic_Short_Write_1P(0xDE,0x0E);	
Generic_Short_Write_1P(0xE6,0x00);	
Generic_Short_Write_1P(0xE7,0x0E);	
Generic_Short_Write_1P(0xB0,0x06);	
Generic_Short_Write_1P(0xC0,0xA5);	
Generic_Short_Write_1P(0xD5,0x1C);	
Generic_Short_Write_1P(0xC0,0x00);	
Generic_Short_Write_1P(0xB0,0x00);
Generic_Short_Write_1P(0xBD,0x30);//VCOM	  37
	
Generic_Short_Write_1P(0xF9,0x5C);	
Generic_Short_Write_1P(0xC2,0x14);	
Generic_Short_Write_1P(0xC4,0x14);	
Generic_Short_Write_1P(0xBF,0x15);	
Generic_Short_Write_1P(0xC0,0x0C);	


Generic_Short_Write_1P(0xB0,0x00);
Generic_Short_Write_1P(0xB1,0x79);
Generic_Short_Write_1P(0xBA,0x8F);//

     DCS_Short_Write_NP(0x11);	
     Delay(200);
     DCS_Short_Write_NP(0x29);
     Delay(50);

3.1 分析客户给的mipi屏初始化代码:

Generic_Short_Write_1P(0xBA,0x8F);

Generic_Short_Write_1P表示:发送Generic命令,带1个参数,数据字节个数为2(Generic Short Write, 1 parameter)
0xBA:寄存器地址
0x8F:数据1为0x8F
  • 在DTS上转成RK上的mipi屏初始化格式
13 00 02 BA 8F

解析:
13 表示0x13数据类型的指令
00 表示没有延时
02 表示两个数据长度 :0xBA,0x8F
BA 表示寄存器地址0xBA
8F 表示0x8F这个数据
  • 分析客户给的mipi屏初始化代码:
DCS_Short_Write_NP(0x11);	
 Delay(200);
 DCS_Short_Write_NP(0x29);
 Delay(50);
 
 解析:
 DCS_Short_Write_NP表示:只发送DCS命令,不带参数,数据字节个数为1。(DCS Short Write, no parameters)
 0x11:数据1为0x11
 Delay(200):延迟为200
  • 在DTS上转成RK上的mipi屏初始化格式
05 C8 01 11
05 32 01 29

解析:
05 表示0x05数据类型的指令
C8 表示延时为200 转换成16进制为0xC8
01 表示1个数据长度 :0x11
11 表示数据:0x11

3.2 将屏厂的初始化代码转换成RK平台的屏幕上电初始化时序DTS配置:

panel-init-sequence = [
			13 00 02 B0 01
			13 00 02 C0 26
			13 00 02 C1 10
			13 00 02 C2 0E
			13 00 02 C3 00
			13 00 02 C4 00
			13 00 02 C5 23
			13 00 02 C6 11
			13 00 02 C7 22
			13 00 02 C8 20
			13 00 02 C9 1E
			13 00 02 CA 1C
			13 00 02 CB 0C
			13 00 02 CC 0A
			13 00 02 CD 08
			13 00 02 CE 06
			13 00 02 CF 18
			13 00 02 D0 02
			13 00 02 D1 00
			13 00 02 D2 00
			13 00 02 D3 00
			13 00 02 D4 26
			13 00 02 D5 0F
			13 00 02 D6 0D
			13 00 02 D7 00
			13 00 02 D8 00
			13 00 02 D9 23
			13 00 02 DA 11
			13 00 02 DB 21
			13 00 02 DC 1F
			13 00 02 DD 1D
			13 00 02 DE 1B
			13 00 02 DF 0B
			13 00 02 E0 09
			13 00 02 E1 07
			13 00 02 E2 05
			13 00 02 E3 17
			13 00 02 E4 01
			13 00 02 E5 00
			13 00 02 E6 00
			13 00 02 E7 00
			13 00 02 B0 03
			13 00 02 BE 04
			13 00 02 B9 40
			13 00 02 CC 88
			13 00 02 C8 0C
			13 00 02 C9 07
			13 00 02 CD 01
			13 00 02 CA 40
			13 00 02 CE 1A
			13 00 02 CF 60
			13 00 02 D2 08
			13 00 02 D3 08
			13 00 02 DB 01
			13 00 02 D9 06
			13 00 02 D4 00
			13 00 02 D5 01
			13 00 02 D6 04
			13 00 02 D7 03
			13 00 02 C2 00
			13 00 02 C3 0E
			13 00 02 C4 00
			13 00 02 C5 0E
			13 00 02 DD 00
			13 00 02 DE 0E
			13 00 02 E6 00
			13 00 02 E7 0E
			13 00 02 C2 00
			13 00 02 C3 0E
			13 00 02 C4 00
			13 00 02 C5 0E
			13 00 02 DD 00
			13 00 02 DE 0E
			13 00 02 E6 00
			13 00 02 E7 0E
			13 00 02 B0 06
			13 00 02 C0 A5
			13 00 02 D5 1C
			13 00 02 C0 00
			13 00 02 B0 00
			13 00 02 BD 30

			13 00 02 F9 5C
			13 00 02 C2 14
			13 00 02 C4 14
			13 00 02 BF 15
			13 00 02 C0 0C


			13 00 02 B0 00
			13 00 02 B1 79
			13 00 02 BA 8F

			05 C8 01 11
			05 32 01 29
		];

		panel-exit-sequence = [
			05 00 01 28
			05 00 01 10
		];

审核编辑:汤梓红

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
  • lcd
    lcd
    +关注

    关注

    34

    文章

    4421

    浏览量

    167379
  • 调试
    +关注

    关注

    7

    文章

    576

    浏览量

    33919
  • 开发板
    +关注

    关注

    25

    文章

    5024

    浏览量

    97354
  • MIPI
    +关注

    关注

    11

    文章

    310

    浏览量

    48608
  • RK3588
    +关注

    关注

    6

    文章

    323

    浏览量

    4308
收藏 人收藏

    评论

    相关推荐

    瑞芯微RK3588开发板RK3588 EVB和RK3588S EVB解读

    瑞芯微RK3588开发板RK3588 EVB和RK3588S EVB解读 瑞芯微旗舰芯RK3588系列开发板受到广大开发者伙伴的关注和问询。针对相关的开发板功能、操作指南等问题,我们一
    的头像 发表于 09-22 15:54 1.8w次阅读
    瑞芯微<b class='flag-5'>RK3588</b>开发板<b class='flag-5'>RK3588</b> EVB和<b class='flag-5'>RK3588</b>S EVB解读

    RK3588-Camera:MIPI-CSI调试通路解析

    RK3588-Camera:MIPI-CSI调试通路解析
    的头像 发表于 06-10 10:29 5167次阅读
    <b class='flag-5'>RK3588</b>-Camera:<b class='flag-5'>MIPI</b>-CSI<b class='flag-5'>调试</b><b class='flag-5'>之</b>通路解析

    RK3588-MIPI屏幕调试笔记:RK3588-MIPI-DSI屏参配置

    RK3588-MIPI屏幕调试笔记:RK3588-MIPI-DSI屏参配置
    的头像 发表于 06-10 10:36 2251次阅读
    <b class='flag-5'>RK3588-MIPI</b><b class='flag-5'>屏幕</b><b class='flag-5'>调试笔记</b>:<b class='flag-5'>RK3588-MIPI-DSI</b><b class='flag-5'>之</b>屏参配置

    RK3588-HDMIRX

    HDMI IN功能可以通过桥接芯⽚的⽅式实现,将HDMI信号转换成MIPI信号接收,RK3588芯⽚平台⾃带
    的头像 发表于 06-13 10:45 1557次阅读
    <b class='flag-5'>RK3588</b>-HDMIRX

    Banana Pi BPI-W3 ArmSoM-W3RK3588-MIPI-DSI屏幕调试笔记

    本文是基于RK3588平台,MIPI调试总结。硬件环境: ArmSoM-W3 RK3588开发板、MIPI-DSI显示屏( ArmSoM官
    的头像 发表于 11-02 09:27 1445次阅读
    Banana Pi BPI-W3 ArmSoM-W3<b class='flag-5'>之</b><b class='flag-5'>RK3588-MIPI-DSI</b><b class='flag-5'>屏幕</b><b class='flag-5'>调试笔记</b>

    RK3588 EVB 开发板介绍

    MIPI TX、VGA、SATA、PCIe30x4、TYPEC、2xRJ45 等外设接口,尺寸为18cmX18cm。RK3588 EVB 系统框图RK3588 EVB配备的丰富外设接口(如图),适用于各类
    发表于 03-16 16:39

    基于RK3588芯片方案开发ARM PC项目

    的UI交互,可提供非常清晰流畅的显示效果,可满足日常办公、高端影音和游戏需求。RK3588的点评能力十分强大,支持eDP、MIPI等主流的中小尺寸接口,也可以拓展V-by-One、LVDS等屏幕接口
    发表于 07-27 16:05

    RK3588J和RK3588是什么关系?

    RK3588J是不是一个开发板的名字,里面的SOC是RK3588?还是RK3588J属于RK3588的子系列?
    发表于 03-13 14:22

    Banana Pi BPI-W3 ArmSoM-W3RK3588-MIPI-DSI屏幕调试笔记

    屏幕初始化时序的配置教程见 RK3588-MIPI屏幕
    发表于 11-02 09:29

    RK3588RK3588S之间的区别是什么

    RK3588RK3588S的区别: RK3588S是RK3588的低配版,其区别类似RK3568跟RK
    发表于 03-10 19:22 2.7w次阅读

    RK3588-MIPI屏幕调试笔记:RK3588-MIPI-DSI

    RK3588-MIPI屏幕调试笔记:RK3588-MIPI-DSI
    的头像 发表于 06-10 10:31 3920次阅读
    <b class='flag-5'>RK3588-MIPI</b><b class='flag-5'>屏幕</b><b class='flag-5'>调试笔记</b>:<b class='flag-5'>RK3588-MIPI-DSI</b>

    rk3588rk3588s的区别

    rk3588rk3588s的区别 Rockchip是一家专业的半导体公司,成立于2001年,总部位于中国深圳,主要从事集成电路的设计、开发和销售。他们的热门产品RK3588RK3588
    的头像 发表于 08-15 16:44 1.4w次阅读

    RK35883588s的区别

    RK35883588s的区别 Rockchip RK3588RK3588s是两种功能强大且广受欢迎的片系统(SoC)解决方案,用于一系
    的头像 发表于 08-15 17:03 2.3w次阅读

    迅为电子RK3588S与RK3588硬件性能区别及板卡选型

    迅为电子RK3588S与RK3588硬件性能区别及板卡选型
    的头像 发表于 06-25 15:30 3269次阅读
    迅为电子<b class='flag-5'>RK3588</b>S与<b class='flag-5'>RK3588</b>硬件性能区别及板卡选型

    RK3588!黑神话悟空,启动?-迅为电子RK3588开发板

    RK3588!黑神话悟空,启动?-迅为电子RK3588开发板
    的头像 发表于 08-30 14:13 582次阅读
    <b class='flag-5'>RK3588</b>!黑神话悟空,启动?-迅为电子<b class='flag-5'>RK3588</b>开发板