主要代码:
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 相关调试点指导的更多相关文章

  1. 高通平台 lcd driver 调试小结

    一.概述 1.1 简介 本文档主要包括LCD模块的驱动流程分析.Framebuffer相关知识.Gralloc等相关内容,以及LCD调试的一些经验和相关bug的分析和讲解. 1.2  开发环境 And ...

  2. LCD&nbsp;调试总结

    转自:http://blog.csdn.net/qikaibinglan/article/details/5630246 (1) 液晶显示模式 并行:MCU接口.RGB接口.Vysnc接口 串行:SP ...

  3. 高通LCD驱动调试

    本文转载自:http://www.itgo.me/a/x6305658852004979994/lcd%20qcom 来自 :http://blog.csdn.net/dacaozuo/article ...

  4. LCD相关知识点

    1.LCD即液晶显示器,控制原理是控制其中的电子枪,在n行*n列的屏幕上投射不同颜色从而形成图像 2.编程步骤: ①打开LCD背光将LCD背光对应的GPIO设置为禁止上拉(GPxUP相应位写入1),选 ...

  5. 【转贴】gdb中的信号(signal)相关调试技巧

    一篇不错的帖子,讲的是gdb中的信号(signal)相关调试技巧 转自Magic C++论坛  http://www.magicunix.com/index_ch.html  http://www.m ...

  6. 【转】Android LCD(四):LCD驱动调试篇

    关键词:android LCD TFTSN75LVDS83B  TTL-LVDS LCD电压背光电压 平台信息:内核:linux2.6/linux3.0系统:android/android4.0 平台 ...

  7. MIPI接口LCD屏调试心得(转)

    源: MIPI接口LCD屏调试心得

  8. android系统平台显示驱动开发简要:LCD驱动调试篇『四』

    平台信息: 内核:linux3.4.39系统:android4.4 平台:S5P4418(cortex a9) 作者:瘋耔(欢迎转载,请注明作者) 欢迎指正错误,共同学习.共同进步!! 关注博主新浪博 ...

  9. ARM LCD屏调试3--屏的应用编程

    2011-06-25 19:20:47 驱动自己写完了,应用函数自己就不写了,找了一点代码参考,移植并修改了一下,配合之前的定义的接口文档,我贴出部分代码.目录: 一,开发环境... 1 二,底层函数 ...

随机推荐

  1. 夺命雷公狗---Thinkphp----10之后台登录.注销一条龙

    首先我们还是还是写一个控制器名字叫LoginController.class.php的控制器,首先来写一个code的方法来让验证码先显示出来: public function Code(){ //创建 ...

  2. spring的事务回滚

    @Transactional(rollbackFor = { Exception.class }) 需要把异常抛出到带有@Transactional(rollbackFor = { Exception ...

  3. android- Auto Monitor Logcat

    启动模拟器的时候弹出窗体: 它实在询问你是否显示logcat视图以便显示此工作空间中的程序信息. 因为如何程序错误,可以从logcat中看到错误的原因,建议选择yes. 单击确定,你会发现多了一个Lo ...

  4. 为archlinux安装mplayer

    很简单的一条命令: pacman -S mplayer 安装完之后是字符界面的,所以你还需要一个图形前端: pacman -S gnome-mplayer

  5. zw版【转发·台湾nvp系列Delphi例程】HALCON ClipRegion

    zw版[转发·台湾nvp系列Delphi例程]HALCON ClipRegion procedure TForm1.Button1Click(Sender: TObject);var img : HI ...

  6. 1行代码,删除svn文件夹

    引用:http://www.cnblogs.com/Alexander-Lee/archive/2010/02/23/1671905.html linux操作系统: find -name .svn | ...

  7. android:layout_gravity和android:gravity属性的区别

    一.介绍: gravity的中文意思就是”重心“,就是表示view横向和纵向的停靠位置 (1).android:gravity:是对view控件本身来说的,是用来设置view本身的内容应该显示在vie ...

  8. 使用phpmyadmin导入SQL数据报错:#1062 - Duplicate entry '...

    使用phpmyadmin导入SQL数据报错: MySQL 返回: #1062 - Duplicate entry '0' for key 'PRIMARY' 出现此错误的原因是数据的主键重复了,错误信 ...

  9. GHOST出错

    error 15:file not found grub问题VFS:Cannot open root device "sda" or unknow-block 可能是磁盘驱动程序问 ...

  10. Asp.net mvc5 解析route源码实现自己的route系统

    url route 路由系统的责任是找到匹配的路由,创建路由数据,并将请求分配给一个处理程序. 选择动作是 MVC 的处理程序的实现细节.它使用路由数据和从传入请求其他信息来选择要执行的操作 实例 源 ...