msm8916 lcd 相关调试点指导
主要代码:
LINUX\android\kernel\arch\arm\boot\dts\qcom\dsi-panel-trust-hx8379c-fwvga-video.dtsi
LINUX\android\kernel\arch\arm\boot\dts\qcom\msm8916-qrd-skum.dtsi
LINUX/android/bootable/bootloader/lk/dev/pmic/pm8x41/pm8x41_adc.c
LINUX/android/bootable/bootloader/lk/dev/pmic/pm8x41/include/pm8x41_adc.h
LINUX/android/bootable/bootloader/lk/target/msm8916/include/target/display.h
LINUX/android/bootable/bootloader/lk/target/msm8916/init.c
LINUX\android\bootable\bootloader\lk\dev\gcdb\display\include\panel_trust_hx8379c_fwvga_video.h
\\192.168.142.144\chenhaibing\MSM8916_R113502NEW\LINUX\android\bootable\bootloader\lk\target\msm8916\oem_panel.c
1.Lk :
Adc 兼容
android/bootable/bootloader/lk/dev/pmic/pm8x41/include/pm8x41_adc.h
#defineMPP_2_CHAN_ID 33//chenhaibing 20140925 定义相应的adc通道
voidpm8x41_enable_mpp_as_adc_for_mpp2(uint16_tmpp_num);//chenhaibing 20140925 add for lcm adc
android/bootable/bootloader/lk/dev/pmic/pm8x41/pm8x41_adc.c
Static struct adc_conf adc_data[]={ CHAN_INIT(VADC_USR1_BASE,VADC_BAT_CHAN_ID,VADC_MODE_NORMAL,VADC_DECIM_RATIO_VAL,HW_SET_DELAY_100US,FAST_AVG_SAMP_1,CALIB_RATIO),CHAN_INIT(VADC_USR1_BASE,VADC_BAT_VOL_CHAN_ID,VADC_MODE_NORMAL,VADC_DECIM_RATIO_VAL,HW_SET_DELAY_100US,FAST_AVG_SAMP_1,CALIB_ABS),CHAN_INIT(VADC_USR1_BASE, MPP_2_CHAN_ID,VADC_MODE_NORMAL,VADC_DECIM_RATIO_VAL,HW_SET_DELA
Y_100US,FAST_AVG_SAMP_1,CALIB_ABS),
添加到adc_data初始化数组
读adc数据前,需要使能此接口
/*begin:add by chenhaibing for pm8x41 mpp2 adc enable 20140925*/
voidpm8x41_enable_mpp_as_adc_for_mpp2(uint16_tmpp_num)
{ uint32_tval;
if(mpp_num >MPP_MAX_NUM)
{dprintf(CRITICAL,"Error: The MPP pin number is unavailable\n");
return;}
/* set the MPP mode as AIN */
val =(MPP_MODE_AIN <<Q_REG_MODE_SEL_SHIFT)\ |(0x1<<Q_REG_OUT_INVERT_SHIFT)\ |(0x0<<Q_REG_SRC_SEL_SHIFT);
REG_WRITE((MPP_REG_BASE +mpp_num *MPP_REG_RANGE +Q_REG_MODE_CTL),val);
/* Enable the MPP */
val =(MPP_MASTER_ENABLE <<Q_REG_MASTER_EN_SHIFT);
REG_WRITE((MPP_REG_BASE +mpp_num *MPP_REG_RANGE +Q_REG_EN_CTL),val);
/* AIN route to AMUX8 */
val =(0x1<<Q_REG_AIN_ROUTE_SHIFT);//AMUX1
REG_WRITE((MPP_REG_BASE +mpp_num *MPP_REG_RANGE +Q_REG_AIN_CTL),val);
}
android/bootable/bootloader/lk/target/msm8916/oem_panel.c
#include"include/panel_trust_hx8379c_fwvga_video.h"//chenhaibing add 0923
主要接口:
oem_panel_select: 主要是根据adc判断lcd兼容
pm8x41_enable_mpp_as_adc_for_mpp2(0x01);
lcm_type =get_vendor_from_adc(MPP_2_CHAN_ID);
if(LCM_TYPE_HS==lcm_type)
{
panel_id =ILI9806E_FWVGA_VIDEO_PANEL;//chenhaibing add
}
elseif(LCM_TYPE_TS==lcm_type)
{
panel_id =HX8379C_FWVGA_VIDEO_PANEL;
}
Else
{
panel_id =UNKNOWN_PANEL;
ret =false;
Return ret;
}
oem_panel_on负责把.h相关宏和指令,时序设置等,根据oem_panel_select:指定的panel_id给屏驱动所使用的结构体。
kernel篇.
Panel id 会通过command line的方式传递到kernel层, kernel video mdss驱动会通过调用dtsi相关节点信息进行访问,使得lcm被正常驱动。
dtsi相关节点信息:
时序设置:
qcom,mdss-dsi-panel-timings = [4D 1A 12 00 40 42 16 1E 14 03 04 00];
80-NH713-1_DSI_TIMING_PARAMETERS_USER_INTERACTIVE_SPREADSHEET.xlsm
DSI and MDP registers sheet 页写入下面信息:
frame rate ,lane config,pixel format BPP,Active Width,Active Height
Hsync Pulse Width,Hori. Back Porch,Hori. Front Porch,Vsync Pulse Width,Vert. Back Porch,Vert. Front Porch
拷贝下面的值填入上面数组。
2. DSI PHY registers
PHY Registers value in hex
DSIPHY_TIMING_CTRL_0 #VALUE!
DSIPHY_TIMING_CTRL_1 1A
DSIPHY_TIMING_CTRL_2 12
DSIPHY_TIMING_CTRL_3 0
DSIPHY_TIMING_CTRL_4 40
DSIPHY_TIMING_CTRL_5 42
DSIPHY_TIMING_CTRL_6 16
DSIPHY_TIMING_CTRL_7 1E
DSIPHY_TIMING_CTRL_8 14
DSIPHY_TIMING_CTRL_9 3
DSIPHY_TIMING_CTRL_10 4
ESD:
qcom,mdss-dsi-panel-status-command = [06 01 00 01 05 00 02 09 08];
qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode";
qcom,mdss-dsi-panel-status-check-mode = "reg_read";
qcom,mdss-dsi-panel-status-value = <0x90>;
qcom,esd-check-enabled;
比如:
若需要返回多个参数,需要改写代码:
Mdss_dsi_host.c
static int mdss_dsi_read_status(struct mdss_dsi_ctrl_pdata *ctrl)
{
struct dcs_cmd_req cmdreq;
memset(&cmdreq, 0, sizeof(cmdreq));
cmdreq.cmds = ctrl->status_cmds.cmds;
cmdreq.cmds_cnt = ctrl->status_cmds.cmd_cnt;
cmdreq.flags = CMD_REQ_COMMIT | CMD_CLK_CTRL | CMD_REQ_RX;
cmdreq.rlen =0;
cmdreq.cb = NULL;
cmdreq.rbuf = ctrl->status_buf.data;
return mdss_dsi_cmdlist_put(ctrl, &cmdreq);
}
/*begin: add by chenhaibing for hx8379c read status 20141021*/
static int mdss_dsi_read_status_for_trust(struct mdss_dsi_ctrl_pdata *ctrl)
{
struct dcs_cmd_req cmdreq;
memset(&cmdreq, 0, sizeof(cmdreq));
cmdreq.cmds = ctrl->status_cmds.cmds;
cmdreq.cmds_cnt = ctrl->status_cmds.cmd_cnt;
cmdreq.flags = CMD_REQ_COMMIT | CMD_CLK_CTRL | CMD_REQ_RX;
cmdreq.rlen = 4; //modified 4 这个会发送37指令,指定返回4个参数.
cmdreq.cb = NULL;
cmdreq.rbuf = ctrl->status_buf.data;
return mdss_dsi_cmdlist_put(ctrl, &cmdreq);
}
/*end: add by chenhaibing for hx8379c read status 20141021*/
mdss_dsi_reg_status_check添加相关军客制化判断逻辑.
在msm8916调试 Himax 8379C 时遇到功耗问题:
原因分析:
量测试开机或唤醒的波形图,是因为此IC不能自己进入ulps模式,msm8916默认的source code 也没有开启ulps.导致上面实测试波满足与IC spec不符。
引起屏漏电.
解决方案在dtsi配置下面节点.
qcom,mdss-dsi-lp11-init; //确保reset 信号拉低时,clock和data都要及时被拉高,某些IC时序有此要求.
qcom,suspend-ulps-enabled;
上面节点打开后,还需要高通释放相关patch合入才能最终解决此问题。
客制化启动logo方法
How to customize splash image
ntroduction and Background:
For LK display (boot loader) logo, there are two methods:
a) Read the splash image data from splash.h file.
b) Get the splash image data from Splash Partition.
Solution Statement:
For a), please see the below source codes:
bootable/bootloader/lk/platform/msm_shared/include/splash.h
bootable/bootloader/lk/dev/fbcon/fbcon.c
When fbimg is NULL, LK display data gets from imageBuffer_rgb888 arrays. Please see the below snippet codes.
void display_image_on_screen()
{
struct fbimage default_fbimg, *fbimg;
bool flag = true;
fbcon_clear();
fbimg = fetch_image_from_partition(); // Splash image from partition
if(!fbimg) {
flag = false;
fbimg = &default_fbimg;
fbimg->header.width = SPLASH_IMAGE_HEIGHT;
fbimg->header.height = SPLASH_IMAGE_WIDTH;
#if DISPLAY_TYPE_MIPI
fbimg->image = (unsigned char *)imageBuffer_rgb888;
#else
fbimg->image = (unsigned char *)imageBuffer;
#endif
}
fbcon_putImage(fbimg, flag);
}
For b), the steps to generate the splash.img:
1). Install the python on Linux desktop OS.
sudo apt-get install python-imaging
2). Prepare the logo picture with the PNG format in "device/qcom/common/display/logo" folder, such as "test.png".
python ./logo_gen.py test.png
3). Add splash partition on your partition.xml, such as
<partition label="splash" size_in_kb="10240" type="20117f86-E985-4357-B9EE-374BC1D8487D" bootable="false" readonly="false" filename=""/>
4). Check if have "splash.img", and then flash splash image to your device.
fastboot flash splash splash.img
第二种:python ./logo_gen.py test.png (MSM8916平台没有看到logo_gen.py) ,flash.img4).
Check if have "splash.img", and then flash splash image to your device.
msm8916 lcd 相关调试点指导的更多相关文章
- 高通平台 lcd driver 调试小结
一.概述 1.1 简介 本文档主要包括LCD模块的驱动流程分析.Framebuffer相关知识.Gralloc等相关内容,以及LCD调试的一些经验和相关bug的分析和讲解. 1.2 开发环境 And ...
- LCD 调试总结
转自:http://blog.csdn.net/qikaibinglan/article/details/5630246 (1) 液晶显示模式 并行:MCU接口.RGB接口.Vysnc接口 串行:SP ...
- 高通LCD驱动调试
本文转载自:http://www.itgo.me/a/x6305658852004979994/lcd%20qcom 来自 :http://blog.csdn.net/dacaozuo/article ...
- LCD相关知识点
1.LCD即液晶显示器,控制原理是控制其中的电子枪,在n行*n列的屏幕上投射不同颜色从而形成图像 2.编程步骤: ①打开LCD背光将LCD背光对应的GPIO设置为禁止上拉(GPxUP相应位写入1),选 ...
- 【转贴】gdb中的信号(signal)相关调试技巧
一篇不错的帖子,讲的是gdb中的信号(signal)相关调试技巧 转自Magic C++论坛 http://www.magicunix.com/index_ch.html http://www.m ...
- 【转】Android LCD(四):LCD驱动调试篇
关键词:android LCD TFTSN75LVDS83B TTL-LVDS LCD电压背光电压 平台信息:内核:linux2.6/linux3.0系统:android/android4.0 平台 ...
- MIPI接口LCD屏调试心得(转)
源: MIPI接口LCD屏调试心得
- android系统平台显示驱动开发简要:LCD驱动调试篇『四』
平台信息: 内核:linux3.4.39系统:android4.4 平台:S5P4418(cortex a9) 作者:瘋耔(欢迎转载,请注明作者) 欢迎指正错误,共同学习.共同进步!! 关注博主新浪博 ...
- ARM LCD屏调试3--屏的应用编程
2011-06-25 19:20:47 驱动自己写完了,应用函数自己就不写了,找了一点代码参考,移植并修改了一下,配合之前的定义的接口文档,我贴出部分代码.目录: 一,开发环境... 1 二,底层函数 ...
随机推荐
- 夺命雷公狗---node.js---9实现页面的跳转
废话不多说,我们先来看看项目的文件结构,如下所示: 然后我们创建一个index.js的文件让他来做端口监听,代码如下所示: var http = require('http'); var fs = r ...
- 夺命雷公狗---DEDECMS----13dedecms首页的完成
我们的dedecms搭建起来后直接复制templets的目录复制一份,如下所示: 然后进入templets目录里面,然后再将default里面的东西都给干掉,然后将我们预先准备好的首页放进来,代码如下 ...
- Python 入門語法和類型(转载学习)
http://www.cnblogs.com/mcdou/archive/2011/08/02/2125016.html Python的设计目标之一是让源代码具备高度的可读性.它设计时尽量使用其它语言 ...
- 转:myeclipse 8.x 插件安装方法终极总结
原文地址:http://shaomeng95.iteye.com/blog/945062 最近因为要指导新人顺便整理文档,懒得折腾eclipse,需要装的插件太多,于是乎装myeclipse 8.5吧 ...
- T-sql语句中GO的作用及语法【转】
1. 作用: 向 SQL Server 实用工具发出一批 Transact-SQL 语句结束的信号.2. 语法:一批 Transact-SQL 语句GO如Select 1Select 2Select ...
- dota玩家与英雄契合度的计算器,python语言scrapy爬虫的使用
首发:个人博客,更新&纠错&回复 演示地址在这里,代码在这里. 一个dota玩家与英雄契合度的计算器(查看效果),包括两部分代码: 1.python的scrapy爬虫,总体思路是pag ...
- Android之自定义生成彩色二维码
先导个zxing.jar包 下面是xml布局 activity_main.xml <RelativeLayout xmlns:android="http://schemas.andro ...
- Qunar实习回顾总结
今天教师节,陪老师喝点小酒,回来难得抽空,整理一下实习阶段的那些零零碎碎却很有用的知识. 1.关于页面中嵌入js代码 (1)有时为了精确控制代码执行顺序流,会将js代码嵌入到网页之中.优点:改变代码触 ...
- Spring JDBC保存枚举对象含关键字报错原因之一
报错信息: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized S ...
- 模数转换器(ADC)的基本原理【转】
模数转换器(ADC)的基本原理 模拟信号转换为数字信号,一般分为四个步骤进行,即取样.保持.量化和编码.前两个步骤在取样-保持电路中完成,后两步骤则在ADC中完成. 常用的ADC有积分型.逐次逼近型. ...