1. 一些描述
8x12平台和8x25平台的代码结构上还是有一些不同的,在kernel中8x12平台的屏和TP都是通过 .dtsi文件管理的,在LK中通过添加.h文件。
在LK中增加一块新屏,首先在在路径下添加如下文件bootable/bootloader/lk/dev/gcdb/display/include/panel_nt35510_wvga_video.h
#ifndef _PANEL_NT35510_WVGA_VIDEO_H_
#define _PANEL_NT35510_WVGA_VIDEO_H_
/*---------------------------------------------------------------------------*/
/* HEADER files */
/*---------------------------------------------------------------------------*/
#include "panel.h"
/*---------------------------------------------------------------------------*/
/* Panel configuration */
/*---------------------------------------------------------------------------*/
static struct panel_config nt35510_wvga_video_panel_data = {
"qcom,mdss_dsi_nt35510_wvga_video", "dsi:0:", "qcom,mdss-dsi-panel",
10, 0, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
/*---------------------------------------------------------------------------*/
/* Panel resolution */
/*---------------------------------------------------------------------------*/
static struct panel_resolution nt35510_wvga_video_panel_res = {
480, 800, 40, 40, 20, 0, 30, 30, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
/*---------------------------------------------------------------------------*/
/* Panel color information */
/*---------------------------------------------------------------------------*/
static struct color_info nt35510_wvga_video_color = {
24, 0, 0xff, 0, 0, 0
};
/*---------------------------------------------------------------------------*/
/* Panel on/off command information */
/*---------------------------------------------------------------------------*/
static char nt35510_wvga_video_on_cmd0[] = {
0x06, 0x00, 0x29, 0xC0,
0xF0, 0x55, 0xAA, 0x52,
0x08, 0x01, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd1[] = {
0x02, 0x00, 0x29, 0xC0,
0xB0, 0x0D, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd2[] = {
0x02, 0x00, 0x29, 0xC0,
0xB6, 0x36, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd3[] = {
0x02, 0x00, 0x29, 0xC0,
0xB1, 0x0D, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd4[] = {
0x02, 0x00, 0x29, 0xC0,
0xB7, 0x36, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd5[] = {
0x02, 0x00, 0x29, 0xC0,
0xB2, 0x00, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd6[] = {
0x02, 0x00, 0x29, 0xC0,
0xB8, 0x26, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd7[] = {
0x02, 0x00, 0x29, 0xC0,
0xB9, 0x36, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd8[] = {
0x02, 0x00, 0x29, 0xC0,
0xB5, 0x08, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd9[] = {
0x02, 0x00, 0x29, 0xC0,
0xC2, 0x03, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd10[] = {
0x02, 0x00, 0x29, 0xC0,
0xBA, 0x26, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd11[] = {
0x04, 0x00, 0x29, 0xC0,
0xBC, 0x00, 0x80, 0x00,
};
static char nt35510_wvga_video_on_cmd12[] = {
0x04, 0x00, 0x29, 0xC0,
0xBD, 0x00, 0x80, 0x00,
};
static char nt35510_wvga_video_on_cmd13[] = {
0x03, 0x00, 0x29, 0xC0,
0xBE, 0x00, 0x40, 0xFF,
};
static char nt35510_wvga_video_on_cmd14[] = {
0x35, 0x00, 0x29, 0xC0,
0xD1, 0x00, 0x2D, 0x00,
0x3C, 0x00, 0x58, 0x00,
0x6F, 0x00, 0x84, 0x00,
0xA6, 0x00, 0xC2, 0x00,
0xF3, 0x01, 0x1A, 0x01,
0x58, 0x01, 0x8A, 0x01,
0xD9, 0x02, 0x1A, 0x02,
0x1C, 0x02, 0x56, 0x02,
0x94, 0x02, 0xB8, 0x02,
0xE6, 0x03, 0x04, 0x03,
0x29, 0x03, 0x3F, 0x03,
0x58, 0x03, 0x65, 0x03,
0x97, 0x03, 0xF6, 0x03,
0xFF, 0xFF, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd15[] = {
0x35, 0x00, 0x29, 0xC0,
0xD2, 0x00, 0x2D, 0x00,
0x3C, 0x00, 0x58, 0x00,
0x6F, 0x00, 0x84, 0x00,
0xA6, 0x00, 0xC2, 0x00,
0xF3, 0x01, 0x1A, 0x01,
0x58, 0x01, 0x8A, 0x01,
0xD9, 0x02, 0x1A, 0x02,
0x1C, 0x02, 0x56, 0x02,
0x94, 0x02, 0xB8, 0x02,
0xE6, 0x03, 0x04, 0x03,
0x29, 0x03, 0x3F, 0x03,
0x58, 0x03, 0x65, 0x03,
0x97, 0x03, 0xF6, 0x03,
0xFF, 0xFF, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd16[] = {
0x35, 0x00, 0x29, 0xC0,
0xD3, 0x00, 0x2D, 0x00,
0x3C, 0x00, 0x58, 0x00,
0x6F, 0x00, 0x84, 0x00,
0xA6, 0x00, 0xC2, 0x00,
0xF3, 0x01, 0x1A, 0x01,
0x58, 0x01, 0x8A, 0x01,
0xD9, 0x02, 0x1A, 0x02,
0x1C, 0x02, 0x56, 0x02,
0x94, 0x02, 0xB8, 0x02,
0xE6, 0x03, 0x04, 0x03,
0x29, 0x03, 0x3F, 0x03,
0x58, 0x03, 0x65, 0x03,
0x97, 0x03, 0xF6, 0x03,
0xFF, 0xFF, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd17[] = {
0x35, 0x00, 0x29, 0xC0,
0xD4, 0x00, 0x2D, 0x00,
0x3C, 0x00, 0x58, 0x00,
0x6F, 0x00, 0x84, 0x00,
0xA6, 0x00, 0xC2, 0x00,
0xF3, 0x01, 0x1A, 0x01,
0x58, 0x01, 0x8A, 0x01,
0xD9, 0x02, 0x1A, 0x02,
0x1C, 0x02, 0x56, 0x02,
0x94, 0x02, 0xB8, 0x02,
0xE6, 0x03, 0x04, 0x03,
0x29, 0x03, 0x3F, 0x03,
0x58, 0x03, 0x65, 0x03,
0x97, 0x03, 0xF6, 0x03,
0xFF, 0xFF, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd18[] = {
0x35, 0x00, 0x29, 0xC0,
0xD5, 0x00, 0x2D, 0x00,
0x3C, 0x00, 0x58, 0x00,
0x6F, 0x00, 0x84, 0x00,
0xA6, 0x00, 0xC2, 0x00,
0xF3, 0x01, 0x1A, 0x01,
0x58, 0x01, 0x8A, 0x01,
0xD9, 0x02, 0x1A, 0x02,
0x1C, 0x02, 0x56, 0x02,
0x94, 0x02, 0xB8, 0x02,
0xE6, 0x03, 0x04, 0x03,
0x29, 0x03, 0x3F, 0x03,
0x58, 0x03, 0x65, 0x03,
0x97, 0x03, 0xF6, 0x03,
0xFF, 0xFF, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd19[] = {
0x35, 0x00, 0x29, 0xC0,
0xD6, 0x00, 0x2D, 0x00,
0x3C, 0x00, 0x58, 0x00,
0x6F, 0x00, 0x84, 0x00,
0xA6, 0x00, 0xC2, 0x00,
0xF3, 0x01, 0x1A, 0x01,
0x58, 0x01, 0x8A, 0x01,
0xD9, 0x02, 0x1A, 0x02,
0x1C, 0x02, 0x56, 0x02,
0x94, 0x02, 0xB8, 0x02,
0xE6, 0x03, 0x04, 0x03,
0x29, 0x03, 0x3F, 0x03,
0x58, 0x03, 0x65, 0x03,
0x97, 0x03, 0xF6, 0x03,
0xFF, 0xFF, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd20[] = {
0x06, 0x00, 0x29, 0xC0,
0xF0, 0x55, 0xAA, 0x52,
0x08, 0x00, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd21[] = {
0x03, 0x00, 0x29, 0xC0,
0xB1, 0xF8, 0x06, 0xFF,
};
static char nt35510_wvga_video_on_cmd22[] = {
0x02, 0x00, 0x29, 0xC0,
0xB6, 0x0A, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd23[] = {
0x03, 0x00, 0x29, 0xC0,
0xB7, 0x00, 0x00, 0xFF,
};
static char nt35510_wvga_video_on_cmd24[] = {
0x05, 0x00, 0x29, 0xC0,
0xB8, 0x01, 0x05, 0x05,
0x05, 0xFF, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd25[] = {
0x04, 0x00, 0x29, 0xC0,
0xBC, 0x00, 0x00, 0x00,
};
static char nt35510_wvga_video_on_cmd26[] = {
0x04, 0x00, 0x29, 0xC0,
0xCC, 0x03, 0x00, 0x00,
};
static char nt35510_wvga_video_on_cmd27[] = {
0x02, 0x00, 0x29, 0xC0,
0xBA, 0x01, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd28[] = {
0x02, 0x00, 0x29, 0xC0,
0x35, 0x00, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd29[] = {
0x02, 0x00, 0x29, 0xC0,
0x3A, 0x77, 0xFF, 0xFF,
};
static char nt35510_wvga_video_on_cmd30[] = {
0x11, 0x00, 0x05, 0x80
};
static char nt35510_wvga_video_on_cmd31[] = {
0x29, 0x00, 0x05, 0x80
};
static struct mipi_dsi_cmd nt35510_wvga_video_on_command[] = {
{0xC, nt35510_wvga_video_on_cmd0, 0x00},
{0x8, nt35510_wvga_video_on_cmd1, 0x00},
{0x8, nt35510_wvga_video_on_cmd2, 0x00},
{0x8, nt35510_wvga_video_on_cmd3, 0x00},
{0x8, nt35510_wvga_video_on_cmd4, 0x00},
{0x8, nt35510_wvga_video_on_cmd5, 0x00},
{0x8, nt35510_wvga_video_on_cmd6, 0x00},
{0x8, nt35510_wvga_video_on_cmd7, 0x00},
{0x8, nt35510_wvga_video_on_cmd8, 0x00},
{0x8, nt35510_wvga_video_on_cmd9, 0x00},
{0x8, nt35510_wvga_video_on_cmd10, 0x00},
{0x8, nt35510_wvga_video_on_cmd11, 0x00},
{0x8, nt35510_wvga_video_on_cmd12, 0x00},
{0x8, nt35510_wvga_video_on_cmd13, 0x00},
{0x3C, nt35510_wvga_video_on_cmd14, 0x00},
{0x3C, nt35510_wvga_video_on_cmd15, 0x00},
{0x3C, nt35510_wvga_video_on_cmd16, 0x00},
{0x3C, nt35510_wvga_video_on_cmd17, 0x00},
{0x3C, nt35510_wvga_video_on_cmd18, 0x00},
{0x3C, nt35510_wvga_video_on_cmd19, 0x00},
{0xC, nt35510_wvga_video_on_cmd20, 0x00},
{0x8, nt35510_wvga_video_on_cmd21, 0x00},
{0x8, nt35510_wvga_video_on_cmd22, 0x00},
{0x8, nt35510_wvga_video_on_cmd23, 0x00},
{0xC, nt35510_wvga_video_on_cmd24, 0x00},
{0x8, nt35510_wvga_video_on_cmd25, 0x00},
{0x8, nt35510_wvga_video_on_cmd26, 0x00},
{0x8, nt35510_wvga_video_on_cmd27, 0x00},
{0x8, nt35510_wvga_video_on_cmd28, 0x00},
{0x8, nt35510_wvga_video_on_cmd29, 0x00},
{0x4, nt35510_wvga_video_on_cmd30, 0x78},
{0x4, nt35510_wvga_video_on_cmd31, 0x32},
};
#define NT35510_WVGA_VIDEO_ON_COMMAND 32
static char nt35510_wvga_videooff_cmd0[] = {
0x28, 0x00, 0x05, 0x80
};
static char nt35510_wvga_videooff_cmd1[] = {
0x10, 0x00, 0x05, 0x80
};
static struct mipi_dsi_cmd nt35510_wvga_video_off_command[] = {
{0x4, nt35510_wvga_videooff_cmd0, 0x00},
{0x4, nt35510_wvga_videooff_cmd1, 0x00}
};
#define NT35510_WVGA_VIDEO_OFF_COMMAND 2
static struct command_state nt35510_wvga_video_state = {
0, 0
};
/*---------------------------------------------------------------------------*/
/* Command mode panel information */
/*---------------------------------------------------------------------------*/
static struct commandpanel_info nt35510_wvga_video_command_panel = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
/*---------------------------------------------------------------------------*/
/* Video mode panel information */
/*---------------------------------------------------------------------------*/
static struct videopanel_info nt35510_wvga_video_video_panel = {
1, 0, 0, 0, 1, 1, 2, 0, 0x9
};
/*---------------------------------------------------------------------------*/
/* Lane configuration */
/*---------------------------------------------------------------------------*/
static struct lane_configuration nt35510_wvga_video_lane_config = {
2, 0, 1, 1, 0, 0
};
/*---------------------------------------------------------------------------*/
/* Panel timing */
/*---------------------------------------------------------------------------*/
static const uint32_t nt35510_wvga_video_timings[] = {
0x6A, 0x16, 0x0E, 0x00, 0x38, 0x3C, 0x12, 0x18, 0x2A, 0x03, 0x04, 0x00
};
static struct panel_timing nt35510_wvga_video_timing_info = {
0x00, 0x04, 0x1F, 0x2D
};
/*---------------------------------------------------------------------------*/
/* Panel reset sequence */
/*---------------------------------------------------------------------------*/
static struct panel_reset_sequence nt35510_wvga_video_reset_seq = {
{2, 0, 2, }, {20, 20, 30, }, 2
};
/*---------------------------------------------------------------------------*/
/* Backlight setting */
/*---------------------------------------------------------------------------*/
static struct backlight nt35510_wvga_video_backlight = {
0, 1, 255, 0, 1, 0
};
#endif /*_PANEL_NT35510_WVGA_VIDEO_H_*/
1. 上面的 .h文件是第一个需要更改的地方,比较重要的几个参数: lane_config,video_timings, video_command的格式,这些地方如果出错可能导致屏不亮
video_timings 是根据屏幕的具体参数(帧率、各种porch值、位深等)用高通的timing计算工具计算出来的,如果这个timing计算错误的话,可能导致屏幕出现条纹等
现象,计算出来的值一般与屏的spec中的默认pclk、bitclk基本相等。
2. 第二个需要修改的地方是QRD8X12_1935/bootable/bootloader/lk/target/msm8610/oem_panel.c,之前的8x25平台应该是没有这个文件的,这个文件会调用上面写好的 .h文件,按照里面的格式添加一块新屏,需要注意的地方是,看你的平台走的什么版本(QCT QRD)等,因为默认加载的屏也是不同的(可以通过打log看看是什么版本的)
在这个函数中添加你的屏
static bool init_panel_data(struct panel_struct *panelstruct,
<span style="white-space:pre"> </span>struct msm_panel_info *pinfo,
<span style="white-space:pre"> </span>struct mdss_dsi_phy_ctrl *phy_db)
{
<span style="white-space:pre"> </span>switch (panel_id) {case NT35510_WVGA_VIDEO_PANEL:
<span style="white-space:pre"> </span>panelstruct->paneldata = &nt35510_wvga_video_panel_data;
<span style="white-space:pre"> </span>panelstruct->paneldata->panel_with_enable_gpio = 1;
<span style="white-space:pre"> </span>panelstruct->panelres = &nt35510_wvga_video_panel_res;
<span style="white-space:pre"> </span>panelstruct->color = &nt35510_wvga_video_color;
<span style="white-space:pre"> </span>panelstruct->videopanel = &nt35510_wvga_video_video_panel;
<span style="white-space:pre"> </span>panelstruct->commandpanel = &nt35510_wvga_video_command_panel;
<span style="white-space:pre"> </span>panelstruct->state = &nt35510_wvga_video_state;
<span style="white-space:pre"> </span>panelstruct->laneconfig = &nt35510_wvga_video_lane_config;
<span style="white-space:pre"> </span>panelstruct->paneltiminginfo
<span style="white-space:pre"> </span> = &nt35510_wvga_video_timing_info;
<span style="white-space:pre"> </span>panelstruct->panelresetseq
<span style="white-space:pre"> </span> = &nt35510_wvga_video_reset_seq;
<span style="white-space:pre"> </span>panelstruct->backlightinfo = &nt35510_wvga_video_backlight;
<span style="white-space:pre"> </span>pinfo->mipi.panel_cmds
<span style="white-space:pre"> </span>= nt35510_wvga_video_on_command;
<span style="white-space:pre"> </span>pinfo->mipi.num_of_panel_cmds
<span style="white-space:pre"> </span>= NT35510_WVGA_VIDEO_ON_COMMAND;
<span style="white-space:pre"> </span>memcpy(phy_db->timing,
<span style="white-space:pre"> </span>nt35510_wvga_video_timings, TIMING_SIZE);
}
3. 第三个需要更改的地方是 QRD8X12_1935/kernel/arch/arm/boot/dts/dsi-panel-nt35510-wvga-video.dtsi ,这个文件里面的参数跟上边的.h文件内参数是对应的.t
添加代码如下:
&mdss_mdp {
dsi_nt35510_wvga_vid: qcom,mdss_dsi_nt35510_wvga_video {
qcom,mdss-dsi-panel-name = "NT35510 WVGA video mode dsi panel";
qcom,mdss-dsi-panel-controller = <&mdss_dsi0>;
qcom,mdss-dsi-panel-type = "dsi_video_mode";
qcom,mdss-dsi-panel-destination = "display_1";
qcom,mdss-dsi-panel-mode-gpio-state = "not_valid";
qcom,mdss-dsi-panel-framerate = <60>;
qcom,mdss-dsi-virtual-channel-id = <0>;
qcom,mdss-dsi-stream = <0>;
qcom,mdss-dsi-panel-width = <480>;
qcom,mdss-dsi-panel-height = <800>;
qcom,mdss-dsi-h-front-porch = <40>;
qcom,mdss-dsi-h-back-porch = <40>;
qcom,mdss-dsi-h-pulse-width = <20>;
qcom,mdss-dsi-h-sync-skew = <0>;
qcom,mdss-dsi-v-back-porch = <30>;
qcom,mdss-dsi-v-front-porch = <30>;
qcom,mdss-dsi-v-pulse-width = <8>;
qcom,mdss-dsi-h-left-border = <0>;
qcom,mdss-dsi-h-right-border = <0>;
qcom,mdss-dsi-v-top-border = <0>;
qcom,mdss-dsi-v-bottom-border = <0>;
qcom,mdss-dsi-bpp = <24>;
qcom,mdss-dsi-underflow-color = <0xff>;
qcom,mdss-dsi-border-color = <0>;
qcom,mdss-dsi-on-command = [
29 01 00 00 00 00 06
F0 55 AA 52
08 01
29 01 00 00 00 00 02
B0 0D
29 01 00 00 00 00 02
B6 36
29 01 00 00 00 00 02
B1 0D
29 01 00 00 00 00 02
B7 36
29 01 00 00 00 00 02
B2 00
29 01 00 00 00 00 02
B8 26
29 01 00 00 00 00 02
B9 36
29 01 00 00 00 00 02
B5 08
29 01 00 00 00 00 02
C2 03
29 01 00 00 00 00 02
BA 26
29 01 00 00 00 00 04
BC 00 80 00
29 01 00 00 00 00 04
BD 00 80 00
29 01 00 00 00 00 03
BE 00 40
29 01 00 00 00 00 35
D1 00 2D 00
3C 00 58 00
6F 00 84 00
A6 00 C2 00
F3 01 1A 01
58 01 8A 01
D9 02 1A 02
1C 02 56 02
94 02 B8 02
E6 03 04 03
29 03 3F 03
58 03 65 03
97 03 F6 03
FF
29 01 00 00 00 00 35
D2 00 2D 00
3C 00 58 00
6F 00 84 00
A6 00 C2 00
F3 01 1A 01
58 01 8A 01
D9 02 1A 02
1C 02 56 02
94 02 B8 02
E6 03 04 03
29 03 3F 03
58 03 65 03
97 03 F6 03
FF
29 01 00 00 00 00 35
D3 00 2D 00
3C 00 58 00
6F 00 84 00
A6 00 C2 00
F3 01 1A 01
58 01 8A 01
D9 02 1A 02
1C 02 56 02
94 02 B8 02
E6 03 04 03
29 03 3F 03
58 03 65 03
97 03 F6 03
FF
29 01 00 00 00 00 35
D4 00 2D 00
3C 00 58 00
6F 00 84 00
A6 00 C2 00
F3 01 1A 01
58 01 8A 01
D9 02 1A 02
1C 02 56 02
94 02 B8 02
E6 03 04 03
29 03 3F 03
58 03 65 03
97 03 F6 03
FF
29 01 00 00 00 00 35
D5 00 2D 00
3C 00 58 00
6F 00 84 00
A6 00 C2 00
F3 01 1A 01
58 01 8A 01
D9 02 1A 02
1C 02 56 02
94 02 B8 02
E6 03 04 03
29 03 3F 03
58 03 65 03
97 03 F6 03
FF
29 01 00 00 00 00 35
D6 00 2D 00
3C 00 58 00
6F 00 84 00
A6 00 C2 00
F3 01 1A 01
58 01 8A 01
D9 02 1A 02
1C 02 56 02
94 02 B8 02
E6 03 04 03
29 03 3F 03
58 03 65 03
97 03 F6 03
FF
29 01 00 00 00 00 06
F0 55 AA 52
08 00
29 01 00 00 00 00 03
B1 F8 06
29 01 00 00 00 00 02
B6 0A
29 01 00 00 00 00 03
B7 00 00
29 01 00 00 00 00 05
B8 01 05 05
05
29 01 00 00 00 00 04
BC 00 00 00
29 01 00 00 00 00 04
CC 03 00 00
29 01 00 00 00 00 02
BA 01
29 01 00 00 00 00 02
35 00
29 01 00 00 00 00 02
3A 77
05 01 00 00 78 00 02
11 00
05 01 00 00 00 00 02
29 00
];
qcom,mdss-dsi-off-command = [
05 01 00 00 32 00 02 28 00
05 01 00 00 78 00 02 10 00
];
qcom,mdss-dsi-on-command-state = "dsi_lp_mode";
qcom,mdss-dsi-off-command-state = "dsi_lp_mode";
qcom,mdss-dsi-h-sync-pulse = <0>;
qcom,mdss-dsi-traffic-mode = "non_burst_sync_event";
qcom,mdss-dsi-bllp-eof-power-mode;
qcom,mdss-dsi-bllp-power-mode;
qcom,mdss-dsi-lane-0-state;
qcom,mdss-dsi-lane-1-state;
qcom,mdss-dsi-panel-timings = [6A 16 0E 00 38 3C 12 18 2A 03 04 00];
qcom,mdss-dsi-t-clk-post = <0x1F>;
qcom,mdss-dsi-t-clk-pre = <0x2D>;
qcom,mdss-dsi-bl-min-level = <1>;
qcom,mdss-dsi-bl-max-level = <255>;
qcom,mdss-dsi-dma-trigger = "trigger_sw";
qcom,mdss-dsi-mdp-trigger = "none";
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
qcom,mdss-dsi-reset-sequence = <1 20>, <0 20>, <1 30>;
};
};
注意写命令时候用的dcs write的命令格式:,高通的command 格式
qcom,mdss-dsi-on-command:A byte stream formed by multiple dcs packets base on qcom dsi controller protocol.
byte 0: dcs data type
byte 1: set to indicate this is an individual packet (no chain)
byte 2: virtual channel number
byte 3: expect ack from client (dcs read command)
byte 4: wait number of specified ms after dcs command transmitted
byte 5, 6: 16 bits length in network byte order
byte 7 and beyond: number byte of payload
4. 第四个需要修改的地方是将kernel中屏的.dtsi文件include进msm8610-mdss-panel.dtsi中,否则编译过程中会提示错误。
/include/ "dsi-panel-truly-wvga-video.dtsi"
/include/ "dsi-panel-truly-wvga-cmd.dtsi"
/include/ "dsi-panel-nt35590-720p-video.dtsi"
/include/ "dsi-panel-otm8018b-fwvga-video.dtsi"
/include/ "dsi-panel-hx8379a-wvga-video.dtsi"
/include/ "dsi-panel-hx8389b-qhd-video.dtsi"
/include/ "dsi-panel-nt35510-wvga-video.dtsi"
5. 在例如msm8610-mtp.dtsi文件中加入屏的dsi_nt35510_wvga_vid,否则编译过程中也会报错。
&mdss_dsi0 {
qcom,dsi-pref-prim-pan = <&dsi_nt35510_wvga_vid>;
qcom,platform-enable-gpio = <&msmgpio 76 0>;
//qcom,platform-blk-gpio = <&msmgpio 75 0>;
};
&dsi_nt35510_wvga_vid {
qcom,cont-splash-enabled;
};
总结:
1. 屏的驱动注意几点:
上电和复位。有些屏的driver ic对上电和复位时序要求的比较严格,特别是在读写command的时候,屏的初始化序列如果不能正常下载(如果下载出现错误,log信息中会有报错,因为cmd是需要校验的),请认真对照屏的spec检查上电和复位时序。
初始化过程。这个过程中容易出现的几点问题,屏幕花屏(一般是初始化寄存器下的有问题,请好好检查寄存器是否出现错误),屏幕条纹或者上下错屏、左右错屏,一般是porch值与相应的panel_timing不匹配造成的。
--------2014/06/25
还有一些其他问题待续。。。。。