高通SDM450+android9.0读显示屏ID
发布日期:2021-06-30 21:46:54 浏览次数:2 分类:技术文章

本文共 1090 字,大约阅读时间需要 3 分钟。

1.读屏厂OTP时写入DA寄存器的值

1)    确定驱动IC厂家指定的读取ID的命令

static char id_cmd[] = {0xDA, 0x00, 0x06, 0xA0}; 
static struct mipi_dsi_cmd sc600_800p_id_command =
   {sizeof(id_cmd), id_cmd, 0x00};

#define ILI9881C_0D_800P_VIDEO_SIGNATURE 0x005A //读出来ID和厂家写入的ID值来比较

2)    让读ID的结构体指针指向上面的读ID指令
pinfo->mipi.panel_read_cmd = &sc600_800p_id_command;
pinfo->mipi.signature     = ILI9881C_0D_800P_VIDEO_SIGNATURE;
3)    mdss_dsi_read_panel_signature()从LCM读出ID并比较
// panel_read_cmds指向读ID的命令结构体sc600_800p_id_command
ret = mdss_dsi_cmds_tx(mipi, mipi->panel_read_cmds, 1, 0);
if (ret)
    goto exit_read_signature;
//实际都回来的*lp是4个字节,比如0x27005a21
result = mdss_dsi_cmds_rx(mipi, &lp, 1, 1);

if (!result)
    goto exit_read_signature;
    
data = ntohl(*lp);
data = data >> 8;//取高8位
data = data & 0xffff;//取读出来的2个字节,比如时0x005a
if (data != panel_signature)
    ret = 1;
 

2.读驱动IC的ID

打印的信息如下:

[1300] mdss_dsi_read_panel_signature()--->*rp=0x98983500,ID4[00]=0x98,device_id=0x980000

[1330] mdss_dsi_read_panel_signature()--->*rp=0x81813500,ID4[01]=0x81,device_id=0x988100
[1350] mdss_dsi_read_panel_signature()--->*rp=0x1c1c3500,ID4[02]=0x1c,device_id=0x98811c

 

 

 

转载地址:https://loongembedded.blog.csdn.net/article/details/114988994 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:linux系统/proc/interrupts中断节点
下一篇:人工智能相关概念

发表评论

最新留言

很好
[***.229.124.182]2024年04月20日 03时48分16秒