当前位置:网站首页>LCD之MIPI协议的一些说明
LCD之MIPI协议的一些说明
2022-07-02 05:47:00 【Croxd】
MIPI:LCD液晶屏的MIPI接口是Mobile Industry Processor Interface的缩写。MIPI(移动行业处理器接口)是MIPI联盟发起的为移动应用处理器制定的开放标准。MIPI是一个比较新的标准,其规范也在不断修改和改进,目前比较成熟的接口应用有DSI(显示接口)和CSI(摄像头接口)。CSI/DSI分别是指其承载的是针对Camera或Display显示应用,都有复杂的协议结构。
MIPI—DSI是一种Lane可扩展的接口,1个时钟通道/1-4个数据通道。最多4个通道,每个通道都支持单向高速通信,0通道可选低速双向通信。DSI一般有两个操作模式:
- 命令模式:Command Mode。一般高速或者低功耗传输模式都行,对应MCU接口。
- 视频模式:Video Mode。必须使用高速模式传输,对应RGB接口(但LCD设为Video Mode时,通常调用Command Mode读写操作寄存器,来完成LCD模组的初始化, 图像数据则使用Video Mode)视频传输模式又有三种模式:
- Burst mode
- Non-burst Mode Sync event (同步事件模式)
- Non-burst Mode Sync pulses(同步脉冲模式)
DSI协议可分为4层:主要分为四个层:应用层(显示屏)、协议层(dsi协议)、通道管理层、物理层(D-PHY)。(主机)cpu->应用层(DDR)->协议层(DSI)->通道管理层->物理层(DPHY)物理层->通道管理层->协议层->应用层->显示模块。
MIPI-DSI属于MIPI子协议,为 Display工作组制定的关于显示模组接口的规范标准。MIPI-DSI使用D-PHY作为物理层传输。D-PHY有分为两种传输模式
- LP,低功耗传输模式 (单信号)。只适用于0通道,一般用于传输控制命令,低速下数据不容易出错并且容易测量。10Mbps传输速度,电压一般在 0-1.2V。
- HS:高速传输模式 (差分信号)。4个通道都可使用,传输高速图像数据。80M~1Gbps传输速度,电压一般在100~300mv,一般使用200mv 。
MIPI-DSI数据传输格式:
一般的命令传输类型的组成:包类型、延时、数据个数(寄存器+值)、寄存器、值。不同平台定义组成顺序都不一致。如sprd:0x29, 0x00, 0x00, 0x02, 0x4B, 0x1D。包类型:0x29、延时0x00, 0x00、数据个数0x02(寄存器+值)、寄存器0x4B、值0x1D
包类型0x29 和 0x39 都可以表示多参,0x03 和 0x05 都可以表示无参,0x13 和 0x15 都可以表示单参。DSI 协议中 ,0x29 和 0x39 区别:在 Mipi 协议中,它俩都表示 长包(Long Packet)数据类型。但是 Mipi DSI 的 Spec 中写着两者的区别 0x29 属于 Generic long write ,0x39 属于 DCS long write。
- DCS 系的读写命令,可带参数,常用于 LCD 初始化参数命令。
- Generic 系读写命令,是协议规范外的命令,通常是一些 IC 定制的,只要确保主机和外设同意这些数据格式即可,通常和 DCS 通用。
MIPI host dts的配置
## MIPI Host配置
disp_mipi_init: mipi_dsi_init{
compatible = "rockchip,mipi_dsi_init";
rockchip,screen_init = <1>; /* 是否要在 dtsi 中初始化 1 0 */
rockchip,dsi_lane = <4>; /* 要⼏条数据 lane ,根据原理图和 mipi 规格书*/
/* ddr clk ⼀条 lane 的传输速率 Mbits/s */
/* 100 + H_total×V_total×fps×3(⼀个rgb为3字节)×8(8bits)/lanes */
/* 这⾥的 total 指的是 sync + front + back + active */
/* ⽐如 H_total = Hsync + HFP(hfront-proch) + HBP(hback-porch) + Hactive */
rockchip,dsi_hs_clk = <1000>
rockchip,mipi_dsi_num = <1>; /* 单mipi 还是双 mipi*/
};
## 屏电源控制配置
disp_mipi_power_ctr: mipi_power_ctr {
compatible = "rockchip,mipi_power_ctr";
mipi_lcd_rst:mipi_lcd_rst{
compatible = "rockchip,lcd_rst";
rockchip,gpios = <&gpio2 GPIO_B7 GPIO_ACTIVE_LOW>;
rockchip,delay = <100>;
};
/*
// 配置 lcd_en GPIO 哪⼀路,有可能没有 LCD_EN 那么就是 VCC 常供电
mipi_lcd_en:mipi_lcd_en {
compatible = "rockchip,lcd_en";
rockchip,gpios = <&gpio0 GPIO_C1 GPIO_ACTIVE_HIGH>;
rockchip,delay = <100>;
};
*/
//还可能有⽚选 cs
};
## 屏初始化序列
disp_mipi_init_cmds: screen-on-cmds {
compatible = "rockchip,screen-on-cmds";
rockchip,cmd_debug = <1>;
rockchip,on-cmds1 { //指的是⼀条初始化命令
compatible = "rockchip,on-cmds";
rockchip,cmd_type = <LPDT>; //命令是在 low power(LPDT)还是 high speed(HSDT)下发送
rockchip,dsi_id = <2>;//选择通过哪个mipi发送 0==》单mipi0 1==》mipi1 2==》双mipi0+1
rockchip,cmd = <0x05 0x01>; //初始化命令
//第⼀个字节 DSI 数据类型; 第⼆个字节为 LCD 的 CMD; 后⾯为指令内容
rockchip,cmd_delay = <0>;
};
mipi速率
mipi_clk = resH * resW * 24 * 1.25 * fps / lane_num
边栏推荐
- How matlab marks' a 'in the figure and how matlab marks points and solid points in the figure
- idea开发工具常用的插件合集汇总
- Record sentry's path of stepping on the pit
- Youth training camp -- database operation project
- Technologists talk about open source: This is not just using love to generate electricity
- Installation du tutoriel MySQL 8.0.22 par centos8
- Grbl software: basic knowledge of simple explanation
- 2022-2-14 learning xiangniuke project - section 23, section 5, development login and exit functions
- 中小型项目手撸过滤器实现认证与授权
- 数据挖掘方向研究生常用网站
猜你喜欢
OLED12864 液晶屏
Gee series: unit 10 creating a graphical user interface using Google Earth engine [GUI development]
Gee series: unit 6 building various remote sensing indexes in Google Earth engine
mysql事务和隔离级别
7. Eleven state sets of TCP
《CGNF: CONDITIONAL GRAPH NEURAL FIELDS》阅读笔记
Gee: use of common mask functions in remote sensing image processing [updatemask]
2022-2-15 learning xiangniuke project - Section 8 check login status
文件包含漏洞(二)
Opencv LBP features
随机推荐
Minimum value ruler method for the length of continuous subsequences whose sum is not less than s
Zzuli:1065 count the number of numeric characters
I want to understand the swift code before I learn it. I understand it
Alibaba: open source and self-developed liquid cooling data center technology
XSS basic content learning (continuous update)
Fabric. JS compact JSON
idea开发工具常用的插件合集汇总
如何写出好代码 — 防御式编程指南
Gee series: Unit 2 explore datasets
数据挖掘方向研究生常用网站
软件测试答疑篇
Zzuli:1067 faulty odometer
H5 jump applet
Pytorch Basics
Fabric. JS round brush
Gee series: Unit 3 raster remote sensing image band characteristics and rendering visualization
15 C language advanced dynamic memory management
Opencv LBP features
brew install * 失败,解决方法
2022-2-14 learning xiangniuke project - section 23, section 5, development login and exit functions