msm8917:LCD移植 LK+Kernel

LK阶段:

Index: dev/gcdb/display/include/panel_ili9881_800p_video.h
===================================================================
--- dev/gcdb/display/include/panel_ili9881_800p_video.h    (不存在的)
+++ dev/gcdb/display/include/panel_ili9881_800p_video.h    (版本 40374)
@@ -0,0 +1,1311 @@
+#ifndef _PANEL_ILI9881_800P_VIDEO_H_
+#define _PANEL_ILI9881_800P_VIDEO_H_
+/*---------------------------------------------------------------------------*/
+/* HEADER files                                                              */
+/*---------------------------------------------------------------------------*/
+#include "panel.h"
+
+/*---------------------------------------------------------------------------*/
+/* Panel configuration                                                       */
+/*---------------------------------------------------------------------------*/
+static struct panel_config ili9881_800p_video_panel_data = {
+    "qcom,mdss_dsi_ili9881_800p_video", "dsi:0:", "qcom,mdss-dsi-panel",
+    10, 0, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL
+};
+
+/*---------------------------------------------------------------------------*/
+/* Panel resolution                                                          */
+/*---------------------------------------------------------------------------*/
+static struct panel_resolution ili9881_800p_video_panel_res = {
+    800, 1280, 42, 42, 8, 18, 18, 12, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/*---------------------------------------------------------------------------*/
+/* Panel color information                                                   */
+/*---------------------------------------------------------------------------*/
+static struct color_info ili9881_800p_video_color = {
+    24, 0, 0xff, 0, 0, 0
+};
+
+/*---------------------------------------------------------------------------*/
+/* Panel on/off command information                                          */
+/*---------------------------------------------------------------------------*/
    ......
+
+static struct mipi_dsi_cmd ili9881_800p_video_on_command[] = {
    ......
+};
+
+#define ILI9881_800P_VIDEO_ON_COMMAND 195
+
+
+static char ili9881_800p_videooff_cmd0[] = {
+    0x28, 0x00, 0x05, 0x80
+};
+
+static char ili9881_800p_videooff_cmd1[] = {
+    0x10, 0x00, 0x05, 0x80
+};
+
+static struct mipi_dsi_cmd ili9881_800p_video_off_command[] = {
+    {0x4, ili9881_800p_videooff_cmd0, 0x32},
+    {0x4, ili9881_800p_videooff_cmd1, 0x78}
+};
+
+#define ILI9881_800P_VIDEO_OFF_COMMAND 2
+
+
+static struct command_state ili9881_800p_video_state = {
+    0, 1
+};
+
+/*---------------------------------------------------------------------------*/
+/* Command mode panel information                                            */
+/*---------------------------------------------------------------------------*/
+static struct commandpanel_info ili9881_800p_video_command_panel = {
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/*---------------------------------------------------------------------------*/
+/* Video mode panel information                                              */
+/*---------------------------------------------------------------------------*/
+static struct videopanel_info ili9881_800p_video_video_panel = {
+    1, 0, 0, 0, 1, 1, 2, 0, 0x9
+};
+
+/*---------------------------------------------------------------------------*/
+/* Lane configuration                                                        */
+/*---------------------------------------------------------------------------*/
+static struct lane_configuration ili9881_800p_video_lane_config = {
+    4, 0, 1, 1, 1, 1, 0
+};
+
+/*---------------------------------------------------------------------------*/
+/* Panel timing                                                              */
+/*---------------------------------------------------------------------------*/
+static const uint32_t ili9881_800p_video_timings[] = {
+    0xf9, 0x3d, 0x34, 0x00, 0x58, 0x4d, 0x36, 0x3f, 0x53, 0x03, 0x04, 0x00
+};
+
+static struct panel_timing ili9881_800p_video_timing_info = {
+    0, 4, 0x1e, 0x38
+};
+
+/*---------------------------------------------------------------------------*/
+/* Panel reset sequence                                                      */
+/*---------------------------------------------------------------------------*/
+static struct panel_reset_sequence ili9881_800p_video_reset_seq = {
+    {1, 0, 1, }, {20, 2, 20, }, 2
+};
+
+/*---------------------------------------------------------------------------*/
+/* Backlight setting                                                         */
+/*---------------------------------------------------------------------------*/
+static struct backlight ili9881_800p_video_backlight = {
+    1, 1, 4095, 100, 1, "PMIC_8941"
+};
+
+#define ILI9881_800P_VIDEO_SIGNATURE 0xFFFF
+#endif /*_PANEL_ILI9881_800P_VIDEO_H_*/
    
    
    
Index: target/msm8952/oem_panel.c
===================================================================
--- target/msm8952/oem_panel.c    (版本 40373)
+++ target/msm8952/oem_panel.c    (版本 40374)
@@ -64,7 +64,7 @@
 #include "include/panel_truly_720p_cmd.h"
 #include "include/panel_lead_fl10802_fwvga_video.h"
 #include "include/panel_jd9365_800p_video.h"
+#include "include/panel_ili9881_800p_video.h"
 /*---------------------------------------------------------------------------*/
 /* static panel selection variable                                           */
 /*---------------------------------------------------------------------------*/
@@ -88,6 +88,7 @@
     TRULY_720P_CMD_PANEL,
     LEAD_FL10802_FWVGA_VIDEO_PANEL,
     JD9365_800P_VIDEO_PANEL,
+    ILI9881_800P_VIDEO_PANEL,
     UNKNOWN_PANEL
 };
 
@@ -119,9 +120,11 @@
     {"truly_720p_cmd", TRULY_720P_CMD_PANEL},
     {"lead_fl10802_fwvga_video", LEAD_FL10802_FWVGA_VIDEO_PANEL},
     {"jd9365_800p_video", JD9365_800P_VIDEO_PANEL},
+    {"ili9881_800p_video", ILI9881_800P_VIDEO_PANEL},
 };+extern uint32_t lk_lcd_id;
 
​
 
@@ -741,6 +744,25 @@
+        case ILI9881_800P_VIDEO_PANEL:
+        panelstruct->paneldata         = &ili9881_800p_video_panel_data;
+        panelstruct->panelres          = &ili9881_800p_video_panel_res;
+        panelstruct->color              = &ili9881_800p_video_color;
+        panelstruct->videopanel      = &ili9881_800p_video_video_panel;
+        panelstruct->commandpanel    = &ili9881_800p_video_command_panel;
+        panelstruct->state              = &ili9881_800p_video_state;
+        panelstruct->laneconfig      = &ili9881_800p_video_lane_config;
+        panelstruct->paneltiminginfo = &ili9881_800p_video_timing_info;
+        panelstruct->panelresetseq     = &ili9881_800p_video_reset_seq;
+        panelstruct->backlightinfo   = &ili9881_800p_video_backlight;
+        pinfo->mipi.panel_on_cmds     = ili9881_800p_video_on_command;
+        pinfo->mipi.num_of_panel_on_cmds = ILI9881_800P_VIDEO_ON_COMMAND;
+        pinfo->mipi.panel_off_cmds          = ili9881_800p_video_off_command;
+        pinfo->mipi.num_of_panel_off_cmds= ILI9881_800P_VIDEO_OFF_COMMAND;
+        memcpy(phy_db->timing,
+                ili9881_800p_video_timings, TIMING_SIZE);
+        pinfo->mipi.signature = ILI9881_800P_VIDEO_SIGNATURE;
+        break;   
​
​
     switch (hw_id) {
     case HW_PLATFORM_MTP:
         if (platform_is_msm8956())
             panel_id = NT35597_WQXGA_DUALDSI_VIDEO_PANEL;
         else if (platform_is_msm8917())
+            panel_id = ILI9881_800P_VIDEO_PANEL;
         else
            panel_id = JD9365_800P_VIDEO_PANEL;

Kernel阶段:


Index: dsi-panel-ili9881-800p-video.dtsi
===================================================================
--- dsi-panel-ili9881-800p-video.dtsi   (不存在的)
+++ dsi-panel-ili9881-800p-video.dtsi   (版本 40113)
@@ -0,0 +1,262 @@
+ *---------------------------------------------------------------------------*/
+&mdss_mdp {
+   dsi_ili9881_800p_video: qcom,mdss_dsi_ili9881_800p_video {
+       qcom,mdss-dsi-panel-name = "ili9881 800p 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-framerate = <60>;
+       qcom,mdss-dsi-virtual-channel-id = <0>;
+       qcom,mdss-dsi-stream = <0>;
+       qcom,mdss-dsi-panel-width = <800>;
+       qcom,mdss-dsi-panel-height = <1280>;
+       qcom,mdss-dsi-h-front-porch = <42>;
+       qcom,mdss-dsi-h-back-porch = <42>;
+       qcom,mdss-dsi-h-pulse-width = <8>;
+       qcom,mdss-dsi-h-sync-skew = <18>;
+       qcom,mdss-dsi-v-back-porch = <12>;
+       qcom,mdss-dsi-v-front-porch = <18>;
+       qcom,mdss-dsi-v-pulse-width = <4>;
+       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-color-order = "rgb_swap_rgb";
+       qcom,mdss-dsi-underflow-color = <0xff>;
+       qcom,mdss-dsi-border-color = <0>;
+       qcom,mdss-dsi-on-command = [
+                   ......
+           29 01 00 00 00 00 02 35 00
+           05 01 00 00 78 00 02 11 00
+           05 01 00 00 05 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_hs_mode";
+       qcom,mdss-dsi-h-sync-pulse = <1>;
+       qcom,mdss-dsi-traffic-mode = "burst_mode";
+       qcom,mdss-dsi-lane-map = "lane_map_0123";
+       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-lane-2-state;
+       qcom,mdss-dsi-lane-3-state;
+       qcom,mdss-dsi-panel-timings = [f9 3d 34 00 58 4d 36 3f 53 03 04 00];
+       qcom,mdss-dsi-t-clk-post = <0x1e>;
+       qcom,mdss-dsi-t-clk-pre = <0x38>;
+       qcom,mdss-dsi-bl-min-level = <1>;
+       qcom,mdss-dsi-bl-max-level = <4095>;
+       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 2>, <1 20>;
+   };
+};
Index: msm8917-mtp.dtsi
===================================================================
--- msm8917-mtp.dtsi    (版本 40112)
+++ msm8917-mtp.dtsi    (版本 40113)
@@ -272,7 +272,7 @@
 &mdss_dsi0 {
-   qcom,dsi-pref-prim-pan = <&dsi_jd9365_800p_video>;
+   qcom,dsi-pref-prim-pan = <&dsi_ili9881_800p_video>;
    pinctrl-names = "mdss_default", "mdss_sleep";
    pinctrl-0 = <&mdss_dsi_active &mdss_te_active>;
    pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>;
@@ -282,8 +282,8 @@
 };
 
+&dsi_ili9881_800p_video {
+   qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
+   //qcom,mdss-dsi-pan-enable-dynamic-fps;
+   //qcom,mdss-dsi-pan-fps-update = "dfps_immediate_porch_mode_vfp";
+   }
    
Index: msm8937-mdss-panels.dtsi
===================================================================
--- msm8937-mdss-panels.dtsi    (版本 40112)
+++ msm8937-mdss-panels.dtsi    (版本 40113)
@@ -26,6 +26,7 @@
 #include "dsi-panel-icn9706-720-1440p-video.dtsi"
 #include "dsi-panel-r61350_1440_video.dtsi"
 #include "dsi-panel-jd9365-800p-video.dtsi"
+#include "dsi-panel-ili9881-800p-video.dtsi"


  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值