高通lcd移植文档(部分)

版权声明:本文为博主原创文章,欢迎转载,转载请注明转载地址 https://blog.csdn.net/u012839187/article/details/83996568

环境:IC 8937

高通关于lcd提供的完整的工具包

kernel部分

1.excel :80-NH713-1_R_DSI_Timing_Parameters_User_Interactive_Spreadsheet

2.xml     :  device/qcom/common/display/tools/panel_xxx_xxx_xx_.xml

主要修改画红圈部分。h_porch以及v_porch,以及屏幕分辨率。

ctrl+j  ;ctrl+k;重新计算t_clk_zero。

这里面需要DSI PHY registers填充 PanelTimings

[第一次修改:DSIPHY_TIMING_CTRL_3在正确生成的时候必然是0,如果不是0则TIMING时序必然有误]

;另外还要填充TClkPost以及TCIkPre。

TClkPost以及TCIkPre在DSI PHY timing setting里面

<!-- Panel Timing -->
<PanelTimings>"0xDA, 0x34, 0x24, 0x00, 0x64, 0x68,
0x28, 0x38, 0x2A, 0x03, 0x04, 0x00"</PanelTimings>
<TClkPost>0x03</TClkPost>
<TClkPre>0x41</TClkPre>

需要注意的是CTRL_3一定是0.并且CTRL_11是第二块屏幕的参数.如果没有第二块屏幕,置零。

将excel里面的参数正确填写并通过ctrl+j;ctrl+k生成完整数据;将数据按需填入xml;

<!-- Panel configuration -->
<PanelType>0</PanelType> // 0 stands for video mode panel, 1 stands for
command mode panel
<PanelFrameRate>60</PanelFrameRate>
<!-- Panel Resolution -->
<PanelWidth>720</PanelWidth>
<PanelHeight>1280</PanelHeight>
<HFrontPorch>140</HFrontPorch>
<HBackPorch>164</HBackPorch>
<HPulseWidth>8</HPulseWidth>
<HSyncSkew>0</HSyncSkew>
<VBackPorch>4</VBackPorch>
<VFrontPorch>8</VFrontPorch>
<VPulseWidth>4</VPulseWidth>
<!-- Panel Color Information -->
<ColorFormat>24</ColorFormat> // 24bpp
<!-- Panel Command information -->
<OnCommand>"0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0xEE,
0x29, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFB, 0x01,
... ... ...
0x29, 0x01, 0x00, 0x00, 0x78, 0x00, 0x02, 0x29, 0x00"
</OnCommand> // add your panel on commands from LCD vendor
<OffCommand>"0x05, 0x01, 0x00, 0x00, 0x32, 0x00, 0x02, 0x28, 0x00,
... ... ...
0x05, 0x01, 0x00, 0x00, 0x78, 0x00, 0x02, 0x10, 0x00"
</OffCommand> // add your panel off commands from LCD vendor
<OnCommandState>0</OnCommandState> // 0
stands for lp mode
<OffCommandState>1</OffCommandState> // 1 stands for hs mode
<!-- Video mode panel information -->
<HSyncPulse>1</HSyncPulse>
<BLLPEOFPowerMode>1</BLLPEOFPowerMode>
<BLLPPowerMode>1</BLLPPowerMode>
<TrafficMode>2</TrafficMode>
<!-- Panel Reset Sequence -->
<ResetSequence>
<PinState1>1</PinState1>
<PulseWidth1>20</PulseWidth1>
<PinState2>0</PinState2>
<PulseWidth2>2</PulseWidth2>
<PinState3>1</PinState3>
<PulseWidth3>20</PulseWidth3>
</ResetSequence>

通过命令:perl parser.pl <sourec xml file OEM edit> panel                                        ---->生成dsi-panel<vendor>-xxx-xxx.dtsi 和 panel_<vendor>_xxx_xxx.h

修改xxx-xxx.dtsi里面 &mdss_dsi0里面的qcom,dsi_pref_prim_pan 参数为&dsi_xx_xx_xx。

修改xxx-mdss-panels.dtsi。往里面include perl生成的xxx.dtsi文件。

 

##########################################################################

lk部分

将perl工具生成的dsi-panel-xxx-xxx-xxx.h复制到bootable/bootloader/lk/dev/gcdb/display/include文件夹下面

在bootable/bootloader/lk/target/msm8xxx/oem_panel.c里面加入

#include “include/dsi-panel-xxx-xxx-xxx.h”
 

enum {

TOSHIBA_720P_VIDEO_PANEL,
NT35590_720P_CMD_PANEL,
NT35590_720P_VIDEO_PANEL,
HX8394A_720P_VIDEO_PANEL,
+NT35521_720P_VIDEO_PANEL,
UNKNOWN_PANEL
};

static struct panel_list supp_panels[] = {
{"toshiba_720p_video", TOSHIBA_720P_VIDEO_PANEL},
{"nt35590_720p_cmd", NT35590_720P_CMD_PANEL},
{"nt35590_720p_video", NT35590_720P_VIDEO_PANEL},
{"hx8394a_720p_video", HX8394A_720P_VIDEO_PANEL},
+{"nt35521_720p_video", NT35521_720P_VIDEO_PANEL},
};

static void init_panel_data(struct panel_struct *panelstruct,
struct msm_panel_info *pinfo,
struct mdss_dsi_phy_ctrl *phy_db)
{
switch (panel_id) {
+case NT35521_720P_VIDEO_PANEL:
+ panelstruct->paneldata = &nt35521_720p_video_panel_data;
+ panelstruct->panelres = &nt35521_720p_video_panel_res;
+ panelstruct->color = &nt35521_720p_video_color;
+ panelstruct->videopanel = &nt35521_720p_video_video_panel;
+ panelstruct->commandpanel = &nt35521_720p_video_command_panel;
+ panelstruct->state = &nt35521_720p_video_state;
+ panelstruct->laneconfig = &nt35521_720p_video_lane_config;
+ panelstruct->paneltiminginfo = &nt35521_720p_video_timing_info;
+ panelstruct->panelresetseq = &nt35521_720p_video_panel_reset_seq;
+ panelstruct->backlightinfo = &nt35521_720p_video_backlight;
+ pinfo->mipi.panel_cmds = nt35521_720p_video_on_command;
+ pinfo->mipi.num_of_panel_cmds
+ memcpy(phy_db->timing, = NT35521_720P_VIDEO_ON_COMMAND;
nt35521_720p_video_timings, TIMING_SIZE);


switch (hw_id) {//这里应该是具体的probe逻辑。确认lcd的选择。代码可能不完全一样。但是要自己改好逻辑
case HW_PLATFORM_MTP:
case HW_PLATFORM_QRD:
if (hw_subtype == HW_PLATFORM_SUBTYPE_720P)
+
panel_id = NT35521_720P_VIDEO_PANEL;
else
panel_id = nt35590_panel_id;
break;
default:
dprintf(CRITICAL, "Display not enabled for %d HW type\n"
, hw_id);
return false;

 

对于mipi而言.需要注意的是.数据lane越多.mipi信号clock相对越低.四路数据mipi信号是两路是数据的一半.

 

展开阅读全文

没有更多推荐了,返回首页