当前位置:首页 >资讯 > 正文

RK3588-MIPI屏幕调试笔记:RK3588-MIPI-DSI之LCD上电初始化时序
2023-06-11 10:22:48    jf_30051736


(资料图)

一. 简介

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 1105 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,再开始发送下一条命令 )PayloadLength: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 1039 00 03 C0 63 0039 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=2params- >dsi.vertical_backporch=10params- >dsi.vertical_frontporch=14params- >dsi.horizontal_sync_active=24params- >dsi.horizontal_backporch=80params- >dsi.horizontal_frontporch=60params- >dsi.PLL_CLOCK=478 LCD_nReset=1;Delayms(5);LCD_nReset=0;Delayms(20);//10LCD_nReset=1;Delayms(200);//120Generic_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  37Generic_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,0x8FBA 表示寄存器地址0xBA8F 表示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 1105 32 01 29解析:05 表示0x05数据类型的指令C8 表示延时为200 转换成16进制为0xC801 表示1个数据长度 :0x1111 表示数据:0x11

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

panel-init-sequence = [13 00 02 B0 0113 00 02 C0 2613 00 02 C1 1013 00 02 C2 0E13 00 02 C3 0013 00 02 C4 0013 00 02 C5 2313 00 02 C6 1113 00 02 C7 2213 00 02 C8 2013 00 02 C9 1E13 00 02 CA 1C13 00 02 CB 0C13 00 02 CC 0A13 00 02 CD 0813 00 02 CE 0613 00 02 CF 1813 00 02 D0 0213 00 02 D1 0013 00 02 D2 0013 00 02 D3 0013 00 02 D4 2613 00 02 D5 0F13 00 02 D6 0D13 00 02 D7 0013 00 02 D8 0013 00 02 D9 2313 00 02 DA 1113 00 02 DB 2113 00 02 DC 1F13 00 02 DD 1D13 00 02 DE 1B13 00 02 DF 0B13 00 02 E0 0913 00 02 E1 0713 00 02 E2 0513 00 02 E3 1713 00 02 E4 0113 00 02 E5 0013 00 02 E6 0013 00 02 E7 0013 00 02 B0 0313 00 02 BE 0413 00 02 B9 4013 00 02 CC 8813 00 02 C8 0C13 00 02 C9 0713 00 02 CD 0113 00 02 CA 4013 00 02 CE 1A13 00 02 CF 6013 00 02 D2 0813 00 02 D3 0813 00 02 DB 0113 00 02 D9 0613 00 02 D4 0013 00 02 D5 0113 00 02 D6 0413 00 02 D7 0313 00 02 C2 0013 00 02 C3 0E13 00 02 C4 0013 00 02 C5 0E13 00 02 DD 0013 00 02 DE 0E13 00 02 E6 0013 00 02 E7 0E13 00 02 C2 0013 00 02 C3 0E13 00 02 C4 0013 00 02 C5 0E13 00 02 DD 0013 00 02 DE 0E13 00 02 E6 0013 00 02 E7 0E13 00 02 B0 0613 00 02 C0 A513 00 02 D5 1C13 00 02 C0 0013 00 02 B0 0013 00 02 BD 3013 00 02 F9 5C13 00 02 C2 1413 00 02 C4 1413 00 02 BF 1513 00 02 C0 0C13 00 02 B0 0013 00 02 B1 7913 00 02 BA 8F05 C8 01 1105 32 01 29];panel-exit-sequence = [05 00 01 2805 00 01 10];

审核编辑:汤梓红

关键词:

下一篇: 热门看点:美国亚裔高考近满分被六大名校拒绝 为何常青藤“不认”亚裔做题家?
上一篇: 美债野蛮生长 国防开支节节攀升 当前消息

天天时讯:沃尔德:累计回购约86万股,占比0.56%

明冠新材(688560.SH)已耗资1.88亿元回购3.13%股份

每日速看!风趣的近义词是什么(风趣的近义词是什么呀)

秦川集团:举办“走进常州”系列产品推介会

非沪籍上海买房2020_非沪籍上海买房政策

定点描写法

今年以来我国高温日数创62年来新高

打造城市“金边银角” 方寸之美“兜住”百姓幸福生活-每日报道

世界周刊丨美国“毒”病难有尽头

每日精选:无糖饮料中的阿斯巴甜被曝致癌,喝前需了解这些危害!

豆粕期货涨停 带动豆粕ETF领涨

“锌”是男性之王,年过40,多吃3种高锌食物,精力旺身体强壮|天天资讯

7月3日人民币兑美元中间价上调101个基点

全球微头条丨青岛签订山东首笔海洋碳汇交易!​“碳”路海洋,更多尝试从青岛启航

环球即时:AI大模型,教育智能硬件新突围点?

健康知识 | 重症中暑很危险 可以这样预防 环球最资讯

世界要闻:两条对接武汉高速同日通车,孝感迈入都市圈“半小时通勤圈”

曝光屡禁不止屡罚不改经营主体

美国非法扩张域外管辖权严重扰乱国际秩序|全球热闻

联通iphone4s用电信卡(联通iphone4s)-当前观察

OPPOK11x,带给消费者4年流畅用机体验 环球今日报

上市时间久的空调能买吗_上市时间

【环球热闻】“港车北上”政策正式实施 日均可单向通关逾万辆次

怎么修改本机ip地址和名字_怎么修改本机ip地址

天天新消息丨又喊口号?中情局长称对华“脱钩”愚蠢,却又声称美国应“去风险”

珠算是什么时候申遗成功,有什么意义_珠算申遗相关内容简介介绍 环球消息

环球看点!清远封闭学校在哪 清远有哪些封闭式学校

环球焦点!高温又双叒叕来了,煤超疯将重现江湖

搜索者2 全球快消息

温网明日开打,中国五将首日出战,美小黑夺首冠,阿新星问鼎|新视野

“最忙乘组”任务结束后首次同框!揭秘“太空出差”那些事儿

人大毕业生盗取全校学生信息建颜值打分网站?校方:正核实,校领导牵头处理 当前要闻

快当爹了!加纳乔甜蜜亲吻女友孕肚,孩子恩佐不久后将出生_世界快资讯

水处理定制化服务专家英普环境IPO,向美国杜邦下属公司采购额占比超四成 世界百事通

老少皆宜的10道家常菜,都是平价菜,却百吃不腻,越吃越过瘾 环球时讯

光大证券:复合铜箔首张订单落地,路线尚有分歧但技术迭代空间广阔