Xipeng Gu | 5affb81 | 2019-06-18 14:59:17 +0800 | [diff] [blame] | 1 | /* Copyright (c) 2015-2016, 2018-2019 The Linux Foundation. All rights reserved. |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 2 | * |
| 3 | * Redistribution and use in source and binary forms, with or without |
| 4 | * modification, are permitted provided that the following conditions |
| 5 | * are met: |
| 6 | * * Redistributions of source code must retain the above copyright |
| 7 | * notice, this list of conditions and the following disclaimer. |
| 8 | * * Redistributions in binary form must reproduce the above copyright |
| 9 | * notice, this list of conditions and the following disclaimer in |
| 10 | * the documentation and/or other materials provided with the |
| 11 | * distribution. |
| 12 | * * Neither the name of The Linux Foundation nor the names of its |
| 13 | * contributors may be used to endorse or promote products derived |
| 14 | * from this software without specific prior written permission. |
| 15 | * |
| 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 17 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 18 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 19 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
| 20 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| 22 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS |
| 23 | * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
| 24 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 25 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
| 26 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 27 | * SUCH DAMAGE. |
| 28 | */ |
| 29 | |
| 30 | #include <debug.h> |
| 31 | #include <string.h> |
| 32 | #include <err.h> |
| 33 | #include <smem.h> |
| 34 | #include <msm_panel.h> |
| 35 | #include <board.h> |
feifanz | 525046b | 2015-06-01 20:31:06 +0800 | [diff] [blame] | 36 | #include <qtimer.h> |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 37 | #include <mipi_dsi.h> |
Sandeep Panda | ed08292 | 2015-08-03 12:18:25 +0530 | [diff] [blame] | 38 | #include <mdp5.h> |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 39 | #include <target/display.h> |
| 40 | |
Ujwal Patel | 41a665a | 2015-07-17 13:51:30 -0700 | [diff] [blame] | 41 | #include "gcdb_display.h" |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 42 | #include "include/panel.h" |
| 43 | #include "panel_display.h" |
| 44 | |
| 45 | /*---------------------------------------------------------------------------*/ |
| 46 | /* GCDB Panel Database */ |
| 47 | /*---------------------------------------------------------------------------*/ |
| 48 | #include "include/panel_truly_1080p_video.h" |
Jayant Shekhar | 9ea8dcd | 2015-04-20 15:18:37 +0530 | [diff] [blame] | 49 | #include "include/panel_truly_1080p_cmd.h" |
feifanz | 174c82c | 2015-04-15 18:57:07 +0800 | [diff] [blame] | 50 | #include "include/panel_otm1906c_1080p_cmd.h" |
Vishnuvardhan Prodduturi | 16eb20f | 2015-06-05 18:03:54 +0530 | [diff] [blame] | 51 | #include "include/panel_sharp_1080p_cmd.h" |
Padmanabhan Komanduru | 49a86cf | 2015-06-08 18:24:30 +0530 | [diff] [blame] | 52 | #include "include/panel_nt35597_wqxga_dualdsi_video.h" |
Vishnuvardhan Prodduturi | c1a46c5 | 2015-06-29 16:35:23 +0530 | [diff] [blame] | 53 | #include "include/panel_nt35597_wqxga_dualdsi_cmd.h" |
Ray Zhang | f95f5b9 | 2015-06-25 15:34:29 +0800 | [diff] [blame] | 54 | #include "include/panel_hx8399a_1080p_video.h" |
Sandeep Panda | ed08292 | 2015-08-03 12:18:25 +0530 | [diff] [blame] | 55 | #include "include/panel_nt35597_wqxga_dsc_video.h" |
| 56 | #include "include/panel_nt35597_wqxga_dsc_cmd.h" |
Padmanabhan Komanduru | 4927c2c | 2015-08-21 14:55:16 +0530 | [diff] [blame] | 57 | #include "include/panel_hx8394d_720p_video.h" |
Sujeev Dias | 6bc9fa3 | 2015-08-03 23:13:44 -0700 | [diff] [blame] | 58 | #include "include/panel_byd_1200p_video.h" |
Ray Zhang | 4bbc7b0 | 2015-12-04 16:07:20 +0800 | [diff] [blame] | 59 | #include "include/panel_r69006_1080p_cmd.h" |
| 60 | #include "include/panel_r69006_1080p_video.h" |
| 61 | #include "include/panel_hx8394f_720p_video.h" |
Padmanabhan Komanduru | e108ed0 | 2015-12-21 12:43:07 +0530 | [diff] [blame] | 62 | #include "include/panel_truly_720p_video.h" |
Padmanabhan Komanduru | 7460e44 | 2016-01-21 12:30:34 +0530 | [diff] [blame] | 63 | #include "include/panel_truly_wuxga_video.h" |
Vishnuvardhan Prodduturi | a0989b3 | 2016-02-15 18:07:44 +0530 | [diff] [blame] | 64 | #include "include/panel_truly_720p_cmd.h" |
Ray Zhang | fb6025a | 2016-04-08 10:57:30 +0800 | [diff] [blame] | 65 | #include "include/panel_lead_fl10802_fwvga_video.h" |
Padmanabhan Komanduru | c570f30 | 2018-04-30 09:32:31 +0530 | [diff] [blame] | 66 | #include "include/panel_hx8399c_fhd_pluse_video.h" |
Padmanabhan Komanduru | 1963632 | 2018-04-30 16:52:59 +0530 | [diff] [blame] | 67 | #include "include/panel_hx8399c_hd_plus_video.h" |
Xipeng Gu | 5affb81 | 2019-06-18 14:59:17 +0800 | [diff] [blame] | 68 | #include "include/panel_edo_rm67162_qvga_cmd.h" |
Xipeng Gu | dd4f96d | 2019-07-17 16:44:09 +0800 | [diff] [blame] | 69 | #include "include/panel_truly_rm69090_qvga_cmd.h" |
Padmanabhan Komanduru | b596828 | 2018-05-07 14:07:54 +0530 | [diff] [blame] | 70 | #include "include/panel_nt35695b_truly_fhd_video.h" |
| 71 | #include "include/panel_nt35695b_truly_fhd_cmd.h" |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 72 | |
| 73 | /*---------------------------------------------------------------------------*/ |
| 74 | /* static panel selection variable */ |
| 75 | /*---------------------------------------------------------------------------*/ |
| 76 | enum { |
| 77 | TRULY_1080P_VIDEO_PANEL, |
Jayant Shekhar | 9ea8dcd | 2015-04-20 15:18:37 +0530 | [diff] [blame] | 78 | TRULY_1080P_CMD_PANEL, |
feifanz | 174c82c | 2015-04-15 18:57:07 +0800 | [diff] [blame] | 79 | OTM1906C_1080P_CMD_PANEL, |
Vishnuvardhan Prodduturi | 16eb20f | 2015-06-05 18:03:54 +0530 | [diff] [blame] | 80 | SHARP_1080P_CMD_PANEL, |
Padmanabhan Komanduru | 49a86cf | 2015-06-08 18:24:30 +0530 | [diff] [blame] | 81 | NT35597_WQXGA_DUALDSI_VIDEO_PANEL, |
Vishnuvardhan Prodduturi | c1a46c5 | 2015-06-29 16:35:23 +0530 | [diff] [blame] | 82 | NT35597_WQXGA_DUALDSI_CMD_PANEL, |
Ray Zhang | f95f5b9 | 2015-06-25 15:34:29 +0800 | [diff] [blame] | 83 | HX8399A_1080P_VIDEO_PANEL, |
Sandeep Panda | ed08292 | 2015-08-03 12:18:25 +0530 | [diff] [blame] | 84 | NT35597_WQXGA_DSC_VIDEO_PANEL, |
| 85 | NT35597_WQXGA_DSC_CMD_PANEL, |
Padmanabhan Komanduru | 4927c2c | 2015-08-21 14:55:16 +0530 | [diff] [blame] | 86 | HX8394D_720P_VIDEO_PANEL, |
Sujeev Dias | 6bc9fa3 | 2015-08-03 23:13:44 -0700 | [diff] [blame] | 87 | BYD_1200P_VIDEO_PANEL, |
Ray Zhang | 4bbc7b0 | 2015-12-04 16:07:20 +0800 | [diff] [blame] | 88 | R69006_1080P_CMD_PANEL, |
| 89 | R69006_1080P_VIDEO_PANEL, |
| 90 | HX8394F_720P_VIDEO_PANEL, |
Padmanabhan Komanduru | e108ed0 | 2015-12-21 12:43:07 +0530 | [diff] [blame] | 91 | TRULY_720P_VIDEO_PANEL, |
Padmanabhan Komanduru | 7460e44 | 2016-01-21 12:30:34 +0530 | [diff] [blame] | 92 | TRULY_WUXGA_VIDEO_PANEL, |
Vishnuvardhan Prodduturi | a0989b3 | 2016-02-15 18:07:44 +0530 | [diff] [blame] | 93 | TRULY_720P_CMD_PANEL, |
Ray Zhang | fb6025a | 2016-04-08 10:57:30 +0800 | [diff] [blame] | 94 | LEAD_FL10802_FWVGA_VIDEO_PANEL, |
Padmanabhan Komanduru | c570f30 | 2018-04-30 09:32:31 +0530 | [diff] [blame] | 95 | HX8399C_FHD_PLUSE_VIDEO_PANEL, |
Padmanabhan Komanduru | 1963632 | 2018-04-30 16:52:59 +0530 | [diff] [blame] | 96 | HX8399C_HD_PLUS_VIDEO_PANEL, |
Padmanabhan Komanduru | b596828 | 2018-05-07 14:07:54 +0530 | [diff] [blame] | 97 | NT35695B_TRULY_FHD_VIDEO_PANEL, |
| 98 | NT35695B_TRULY_FHD_CMD_PANEL, |
Xipeng Gu | 5affb81 | 2019-06-18 14:59:17 +0800 | [diff] [blame] | 99 | RM67162_QVGA_CMD_PANEL, |
Xipeng Gu | dd4f96d | 2019-07-17 16:44:09 +0800 | [diff] [blame] | 100 | RM69090_QVGA_CMD_PANEL, |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 101 | UNKNOWN_PANEL |
| 102 | }; |
| 103 | |
| 104 | uint32_t panel_regulator_settings[] = { |
| 105 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
| 106 | }; |
| 107 | |
| 108 | /* |
| 109 | * The list of panels that are supported on this target. |
| 110 | * Any panel in this list can be selected using fastboot oem command. |
| 111 | */ |
| 112 | static struct panel_list supp_panels[] = { |
| 113 | {"truly_1080p_video", TRULY_1080P_VIDEO_PANEL}, |
Jayant Shekhar | 9ea8dcd | 2015-04-20 15:18:37 +0530 | [diff] [blame] | 114 | {"truly_1080p_cmd", TRULY_1080P_CMD_PANEL}, |
Vishnuvardhan Prodduturi | 16eb20f | 2015-06-05 18:03:54 +0530 | [diff] [blame] | 115 | {"sharp_1080p_cmd", SHARP_1080P_CMD_PANEL}, |
Padmanabhan Komanduru | 49a86cf | 2015-06-08 18:24:30 +0530 | [diff] [blame] | 116 | {"nt35597_wqxga_dualdsi_video", NT35597_WQXGA_DUALDSI_VIDEO_PANEL}, |
Vishnuvardhan Prodduturi | c1a46c5 | 2015-06-29 16:35:23 +0530 | [diff] [blame] | 117 | {"nt35597_wqxga_dualdsi_cmd", NT35597_WQXGA_DUALDSI_CMD_PANEL}, |
Ray Zhang | f95f5b9 | 2015-06-25 15:34:29 +0800 | [diff] [blame] | 118 | {"otm1906c_1080p_cmd", OTM1906C_1080P_CMD_PANEL}, |
| 119 | {"hx8399a_1080p_video", HX8399A_1080P_VIDEO_PANEL}, |
Sandeep Panda | ed08292 | 2015-08-03 12:18:25 +0530 | [diff] [blame] | 120 | {"nt35597_wqxga_dsc_video", NT35597_WQXGA_DSC_VIDEO_PANEL}, |
| 121 | {"nt35597_wqxga_dsc_cmd", NT35597_WQXGA_DSC_CMD_PANEL}, |
Padmanabhan Komanduru | 4927c2c | 2015-08-21 14:55:16 +0530 | [diff] [blame] | 122 | {"hx8394d_720p_video", HX8394D_720P_VIDEO_PANEL}, |
Sujeev Dias | 6bc9fa3 | 2015-08-03 23:13:44 -0700 | [diff] [blame] | 123 | {"byd_1200p_video", BYD_1200P_VIDEO_PANEL}, |
Ray Zhang | 4bbc7b0 | 2015-12-04 16:07:20 +0800 | [diff] [blame] | 124 | {"r69006_1080p_cmd",R69006_1080P_CMD_PANEL}, |
| 125 | {"r69006_1080p_video",R69006_1080P_VIDEO_PANEL}, |
Padmanabhan Komanduru | e108ed0 | 2015-12-21 12:43:07 +0530 | [diff] [blame] | 126 | {"hx8394f_720p_video", HX8394F_720P_VIDEO_PANEL}, |
Padmanabhan Komanduru | 7460e44 | 2016-01-21 12:30:34 +0530 | [diff] [blame] | 127 | {"truly_720p_video", TRULY_720P_VIDEO_PANEL}, |
Vishnuvardhan Prodduturi | a0989b3 | 2016-02-15 18:07:44 +0530 | [diff] [blame] | 128 | {"truly_wuxga_video", TRULY_WUXGA_VIDEO_PANEL}, |
| 129 | {"truly_720p_cmd", TRULY_720P_CMD_PANEL}, |
Ray Zhang | fb6025a | 2016-04-08 10:57:30 +0800 | [diff] [blame] | 130 | {"lead_fl10802_fwvga_video", LEAD_FL10802_FWVGA_VIDEO_PANEL}, |
Padmanabhan Komanduru | 1963632 | 2018-04-30 16:52:59 +0530 | [diff] [blame] | 131 | {"hx8399c_fhd_plus_video", HX8399C_FHD_PLUSE_VIDEO_PANEL}, |
| 132 | {"hx8399c_hd_plus_video", HX8399C_HD_PLUS_VIDEO_PANEL}, |
Padmanabhan Komanduru | b596828 | 2018-05-07 14:07:54 +0530 | [diff] [blame] | 133 | {"nt35695b_truly_fhd_video", NT35695B_TRULY_FHD_VIDEO_PANEL}, |
| 134 | {"nt35695b_truly_fhd_cmd", NT35695B_TRULY_FHD_CMD_PANEL}, |
Xipeng Gu | 5affb81 | 2019-06-18 14:59:17 +0800 | [diff] [blame] | 135 | {"rm67162_qvga_cmd", RM67162_QVGA_CMD_PANEL}, |
Xipeng Gu | dd4f96d | 2019-07-17 16:44:09 +0800 | [diff] [blame] | 136 | {"rm69090_qvga_cmd", RM69090_QVGA_CMD_PANEL}, |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 137 | }; |
| 138 | |
| 139 | static uint32_t panel_id; |
| 140 | |
Sandeep Panda | 75fddaa | 2015-07-06 11:38:25 +0530 | [diff] [blame] | 141 | #define TRULY_1080P_PANEL_ON_DELAY 40 |
Sandeep Panda | c797d54 | 2015-06-12 14:37:55 +0530 | [diff] [blame] | 142 | |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 143 | int oem_panel_rotation() |
| 144 | { |
| 145 | return NO_ERROR; |
| 146 | } |
| 147 | |
| 148 | int oem_panel_on() |
| 149 | { |
| 150 | /* |
| 151 | *OEM can keep their panel specific on instructions in this |
| 152 | *function |
feifanz | 525046b | 2015-06-01 20:31:06 +0800 | [diff] [blame] | 153 | */ |
| 154 | if (panel_id == OTM1906C_1080P_CMD_PANEL) { |
| 155 | /* needs extra delay to avoid unexpected artifacts */ |
| 156 | mdelay(OTM1906C_1080P_CMD_PANEL_ON_DELAY); |
Sandeep Panda | 75fddaa | 2015-07-06 11:38:25 +0530 | [diff] [blame] | 157 | } else if (panel_id == TRULY_1080P_CMD_PANEL || |
| 158 | panel_id == TRULY_1080P_VIDEO_PANEL) { |
| 159 | mdelay(TRULY_1080P_PANEL_ON_DELAY); |
Ray Zhang | 6ec437c | 2015-12-04 16:08:08 +0800 | [diff] [blame] | 160 | }else if (panel_id == R69006_1080P_CMD_PANEL) { |
| 161 | mdelay(R69006_1080P_CMD_PANEL_ON_DELAY); |
feifanz | 525046b | 2015-06-01 20:31:06 +0800 | [diff] [blame] | 162 | } |
Sandeep Panda | c797d54 | 2015-06-12 14:37:55 +0530 | [diff] [blame] | 163 | |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 164 | return NO_ERROR; |
| 165 | } |
| 166 | |
| 167 | int oem_panel_off() |
| 168 | { |
| 169 | /* OEM can keep their panel specific off instructions |
| 170 | * in this function |
| 171 | */ |
| 172 | return NO_ERROR; |
| 173 | } |
| 174 | |
| 175 | static int init_panel_data(struct panel_struct *panelstruct, |
| 176 | struct msm_panel_info *pinfo, |
| 177 | struct mdss_dsi_phy_ctrl *phy_db) |
| 178 | { |
| 179 | int pan_type = PANEL_TYPE_DSI; |
Ujwal Patel | 41a665a | 2015-07-17 13:51:30 -0700 | [diff] [blame] | 180 | struct oem_panel_data *oem_data = mdss_dsi_get_oem_data_ptr(); |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 181 | |
| 182 | switch (panel_id) { |
| 183 | case TRULY_1080P_VIDEO_PANEL: |
| 184 | panelstruct->paneldata = &truly_1080p_video_panel_data; |
Padmanabhan Komanduru | 799dfd0 | 2018-06-18 20:00:29 +0530 | [diff] [blame] | 185 | panelstruct->backlightinfo = &truly_1080p_video_backlight; |
| 186 | if (platform_is_sdm439() || platform_is_sdm429()) { |
| 187 | panelstruct->paneldata->panel_with_enable_gpio = 0; |
| 188 | panelstruct->backlightinfo->bl_interface_type = 0; |
| 189 | } else { |
| 190 | panelstruct->paneldata->panel_with_enable_gpio = 1; |
| 191 | } |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 192 | panelstruct->panelres = &truly_1080p_video_panel_res; |
| 193 | panelstruct->color = &truly_1080p_video_color; |
| 194 | panelstruct->videopanel = &truly_1080p_video_video_panel; |
| 195 | panelstruct->commandpanel = &truly_1080p_video_command_panel; |
| 196 | panelstruct->state = &truly_1080p_video_state; |
| 197 | panelstruct->laneconfig = &truly_1080p_video_lane_config; |
| 198 | panelstruct->paneltiminginfo |
| 199 | = &truly_1080p_video_timing_info; |
| 200 | panelstruct->panelresetseq |
| 201 | = &truly_1080p_video_panel_reset_seq; |
Padmanabhan Komanduru | 799dfd0 | 2018-06-18 20:00:29 +0530 | [diff] [blame] | 202 | pinfo->labibb = &truly_1080p_video_labibb; |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 203 | pinfo->mipi.panel_on_cmds |
| 204 | = truly_1080p_video_on_command; |
| 205 | pinfo->mipi.num_of_panel_on_cmds |
| 206 | = TRULY_1080P_VIDEO_ON_COMMAND; |
| 207 | pinfo->mipi.panel_off_cmds |
| 208 | = truly_1080p_video_off_command; |
| 209 | pinfo->mipi.num_of_panel_off_cmds |
| 210 | = TRULY_1080P_VIDEO_OFF_COMMAND; |
Padmanabhan Komanduru | 799dfd0 | 2018-06-18 20:00:29 +0530 | [diff] [blame] | 211 | if (phy_db->pll_type == DSI_PLL_TYPE_12NM) |
| 212 | memcpy(phy_db->timing, |
| 213 | truly_1080p_video_12nm_timings, |
| 214 | TIMING_SIZE_12NM); |
| 215 | else |
| 216 | memcpy(phy_db->timing, |
| 217 | truly_1080p_video_timings, TIMING_SIZE); |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 218 | pinfo->mipi.signature = TRULY_1080P_VIDEO_SIGNATURE; |
| 219 | break; |
Jayant Shekhar | 9ea8dcd | 2015-04-20 15:18:37 +0530 | [diff] [blame] | 220 | case TRULY_1080P_CMD_PANEL: |
| 221 | panelstruct->paneldata = &truly_1080p_cmd_panel_data; |
Padmanabhan Komanduru | 799dfd0 | 2018-06-18 20:00:29 +0530 | [diff] [blame] | 222 | panelstruct->backlightinfo = &truly_1080p_cmd_backlight; |
| 223 | if (platform_is_sdm439() || platform_is_sdm429()) { |
| 224 | panelstruct->paneldata->panel_with_enable_gpio = 0; |
| 225 | panelstruct->backlightinfo->bl_interface_type = 0; |
| 226 | } else { |
| 227 | panelstruct->paneldata->panel_with_enable_gpio = 1; |
| 228 | } |
Jayant Shekhar | 9ea8dcd | 2015-04-20 15:18:37 +0530 | [diff] [blame] | 229 | panelstruct->panelres = &truly_1080p_cmd_panel_res; |
| 230 | panelstruct->color = &truly_1080p_cmd_color; |
| 231 | panelstruct->videopanel = &truly_1080p_cmd_video_panel; |
| 232 | panelstruct->commandpanel = &truly_1080p_cmd_command_panel; |
| 233 | panelstruct->state = &truly_1080p_cmd_state; |
| 234 | panelstruct->laneconfig = &truly_1080p_cmd_lane_config; |
| 235 | panelstruct->paneltiminginfo |
| 236 | = &truly_1080p_cmd_timing_info; |
| 237 | panelstruct->panelresetseq |
| 238 | = &truly_1080p_cmd_panel_reset_seq; |
Padmanabhan Komanduru | 799dfd0 | 2018-06-18 20:00:29 +0530 | [diff] [blame] | 239 | pinfo->labibb = &truly_1080p_cmd_labibb; |
Jayant Shekhar | 9ea8dcd | 2015-04-20 15:18:37 +0530 | [diff] [blame] | 240 | pinfo->mipi.panel_on_cmds |
| 241 | = truly_1080p_cmd_on_command; |
| 242 | pinfo->mipi.num_of_panel_on_cmds |
| 243 | = TRULY_1080P_CMD_ON_COMMAND; |
| 244 | pinfo->mipi.panel_off_cmds |
| 245 | = truly_1080p_cmd_off_command; |
| 246 | pinfo->mipi.num_of_panel_off_cmds |
| 247 | = TRULY_1080P_CMD_OFF_COMMAND; |
Padmanabhan Komanduru | 799dfd0 | 2018-06-18 20:00:29 +0530 | [diff] [blame] | 248 | if (phy_db->pll_type == DSI_PLL_TYPE_12NM) |
| 249 | memcpy(phy_db->timing, |
| 250 | truly_1080p_cmd_12nm_timings, |
| 251 | TIMING_SIZE_12NM); |
| 252 | else |
| 253 | memcpy(phy_db->timing, |
| 254 | truly_1080p_cmd_timings, TIMING_SIZE); |
Jayant Shekhar | 9ea8dcd | 2015-04-20 15:18:37 +0530 | [diff] [blame] | 255 | pinfo->mipi.signature = TRULY_1080P_CMD_SIGNATURE; |
| 256 | break; |
feifanz | 174c82c | 2015-04-15 18:57:07 +0800 | [diff] [blame] | 257 | case OTM1906C_1080P_CMD_PANEL: |
| 258 | panelstruct->paneldata = &otm1906c_1080p_cmd_panel_data; |
| 259 | panelstruct->paneldata->panel_with_enable_gpio = 1; |
| 260 | panelstruct->panelres = &otm1906c_1080p_cmd_panel_res; |
| 261 | panelstruct->color = &otm1906c_1080p_cmd_color; |
| 262 | panelstruct->videopanel = &otm1906c_1080p_cmd_video_panel; |
| 263 | panelstruct->commandpanel = &otm1906c_1080p_cmd_command_panel; |
| 264 | panelstruct->state = &otm1906c_1080p_cmd_state; |
| 265 | panelstruct->laneconfig = &otm1906c_1080p_cmd_lane_config; |
| 266 | panelstruct->paneltiminginfo |
| 267 | = &otm1906c_1080p_cmd_timing_info; |
| 268 | panelstruct->panelresetseq |
| 269 | = &otm1906c_1080p_cmd_panel_reset_seq; |
| 270 | panelstruct->backlightinfo = &otm1906c_1080p_cmd_backlight; |
| 271 | pinfo->mipi.panel_on_cmds |
| 272 | = otm1906c_1080p_cmd_on_command; |
| 273 | pinfo->mipi.num_of_panel_on_cmds |
| 274 | = OTM1906C_1080P_CMD_ON_COMMAND; |
| 275 | pinfo->mipi.panel_off_cmds |
| 276 | = otm1906c_1080p_cmd_off_command; |
| 277 | pinfo->mipi.num_of_panel_off_cmds |
| 278 | = OTM1906C_1080P_CMD_OFF_COMMAND; |
| 279 | memcpy(phy_db->timing, |
| 280 | otm1906c_1080p_cmd_timings, TIMING_SIZE); |
| 281 | pinfo->mipi.signature = OTM1906C_1080P_CMD_SIGNATURE; |
| 282 | break; |
Ray Zhang | f95f5b9 | 2015-06-25 15:34:29 +0800 | [diff] [blame] | 283 | case HX8399A_1080P_VIDEO_PANEL: |
| 284 | panelstruct->paneldata = &hx8399a_1080p_video_panel_data; |
| 285 | panelstruct->panelres = &hx8399a_1080p_video_panel_res; |
| 286 | panelstruct->color = &hx8399a_1080p_video_color; |
| 287 | panelstruct->videopanel = &hx8399a_1080p_video_video_panel; |
| 288 | panelstruct->commandpanel = &hx8399a_1080p_video_command_panel; |
| 289 | panelstruct->state = &hx8399a_1080p_video_state; |
| 290 | panelstruct->laneconfig = &hx8399a_1080p_video_lane_config; |
| 291 | panelstruct->paneltiminginfo |
| 292 | = &hx8399a_1080p_video_timing_info; |
| 293 | panelstruct->panelresetseq |
| 294 | = &hx8399a_1080p_video_reset_seq; |
| 295 | panelstruct->backlightinfo = &hx8399a_1080p_video_backlight; |
| 296 | pinfo->mipi.panel_on_cmds |
| 297 | = hx8399a_1080p_video_on_command; |
| 298 | pinfo->mipi.num_of_panel_on_cmds |
| 299 | = HX8399A_1080P_VIDEO_ON_COMMAND; |
| 300 | pinfo->mipi.panel_off_cmds |
| 301 | = hx8399a_1080p_video_off_command; |
| 302 | pinfo->mipi.num_of_panel_off_cmds |
| 303 | = HX8399A_1080P_VIDEO_OFF_COMMAND; |
| 304 | memcpy(phy_db->timing, |
| 305 | hx8399a_1080p_video_timings, TIMING_SIZE); |
| 306 | pinfo->mipi.signature = HX8399A_1080P_VIDEO_SIGNATURE; |
| 307 | break; |
Vishnuvardhan Prodduturi | 16eb20f | 2015-06-05 18:03:54 +0530 | [diff] [blame] | 308 | case SHARP_1080P_CMD_PANEL: |
| 309 | panelstruct->paneldata = &sharp_1080p_cmd_panel_data; |
| 310 | panelstruct->panelres = &sharp_1080p_cmd_panel_res; |
| 311 | panelstruct->paneldata->panel_with_enable_gpio = 1; |
| 312 | panelstruct->color = &sharp_1080p_cmd_color; |
| 313 | panelstruct->videopanel = &sharp_1080p_cmd_video_panel; |
| 314 | panelstruct->commandpanel = &sharp_1080p_cmd_command_panel; |
| 315 | panelstruct->state = &sharp_1080p_cmd_state; |
| 316 | panelstruct->laneconfig = &sharp_1080p_cmd_lane_config; |
| 317 | panelstruct->paneltiminginfo |
| 318 | = &sharp_1080p_cmd_timing_info; |
| 319 | panelstruct->panelresetseq |
| 320 | = &sharp_1080p_cmd_panel_reset_seq; |
| 321 | panelstruct->backlightinfo = &sharp_1080p_cmd_backlight; |
| 322 | pinfo->mipi.panel_on_cmds |
| 323 | = sharp_1080p_cmd_on_command; |
| 324 | pinfo->mipi.num_of_panel_on_cmds |
| 325 | = SHARP_1080P_CMD_ON_COMMAND; |
| 326 | pinfo->mipi.panel_off_cmds |
| 327 | = sharp_1080p_cmd_off_command; |
| 328 | pinfo->mipi.num_of_panel_off_cmds |
| 329 | = SHARP_1080P_CMD_OFF_COMMAND; |
| 330 | memcpy(phy_db->timing, |
| 331 | sharp_1080p_cmd_timings, TIMING_SIZE); |
| 332 | break; |
Padmanabhan Komanduru | 49a86cf | 2015-06-08 18:24:30 +0530 | [diff] [blame] | 333 | case NT35597_WQXGA_DUALDSI_VIDEO_PANEL: |
| 334 | panelstruct->paneldata = &nt35597_wqxga_dualdsi_video_panel_data; |
| 335 | panelstruct->paneldata->panel_operating_mode = DST_SPLIT_FLAG | |
| 336 | SPLIT_DISPLAY_FLAG | DUAL_DSI_FLAG; |
| 337 | panelstruct->paneldata->panel_with_enable_gpio = 0; |
| 338 | |
| 339 | panelstruct->panelres = &nt35597_wqxga_dualdsi_video_panel_res; |
| 340 | panelstruct->color = &nt35597_wqxga_dualdsi_video_color; |
| 341 | panelstruct->videopanel = &nt35597_wqxga_dualdsi_video_video_panel; |
| 342 | panelstruct->commandpanel = &nt35597_wqxga_dualdsi_video_command_panel; |
| 343 | panelstruct->state = &nt35597_wqxga_dualdsi_video_state; |
| 344 | panelstruct->laneconfig = &nt35597_wqxga_dualdsi_video_lane_config; |
| 345 | panelstruct->paneltiminginfo |
| 346 | = &nt35597_wqxga_dualdsi_video_timing_info; |
| 347 | panelstruct->panelresetseq |
| 348 | = &nt35597_wqxga_dualdsi_video_reset_seq; |
| 349 | panelstruct->backlightinfo = &nt35597_wqxga_dualdsi_video_backlight; |
| 350 | pinfo->labibb = &nt35597_wqxga_dualdsi_video_labibb; |
| 351 | |
| 352 | pinfo->mipi.panel_on_cmds |
| 353 | = nt35597_wqxga_dualdsi_video_on_command; |
| 354 | pinfo->mipi.num_of_panel_on_cmds |
| 355 | = NT35597_WQXGA_DUALDSI_VIDEO_ON_COMMAND; |
| 356 | pinfo->mipi.panel_off_cmds |
| 357 | = nt35597_wqxga_dualdsi_video_off_command; |
| 358 | pinfo->mipi.num_of_panel_off_cmds |
| 359 | = NT35597_WQXGA_DUALDSI_VIDEO_OFF_COMMAND; |
| 360 | memcpy(phy_db->timing, nt35597_wqxga_dualdsi_video_timings, |
| 361 | TIMING_SIZE); |
| 362 | pinfo->mipi.tx_eot_append = true; |
| 363 | break; |
Vishnuvardhan Prodduturi | c1a46c5 | 2015-06-29 16:35:23 +0530 | [diff] [blame] | 364 | case NT35597_WQXGA_DUALDSI_CMD_PANEL: |
| 365 | panelstruct->paneldata = &nt35597_wqxga_dualdsi_cmd_panel_data; |
| 366 | panelstruct->paneldata->panel_operating_mode = DST_SPLIT_FLAG | |
| 367 | SPLIT_DISPLAY_FLAG | DUAL_DSI_FLAG; |
| 368 | panelstruct->paneldata->panel_with_enable_gpio = 0; |
| 369 | |
| 370 | panelstruct->panelres = &nt35597_wqxga_dualdsi_cmd_panel_res; |
| 371 | panelstruct->color = &nt35597_wqxga_dualdsi_cmd_color; |
| 372 | panelstruct->videopanel = &nt35597_wqxga_dualdsi_cmd_video_panel; |
| 373 | panelstruct->commandpanel = &nt35597_wqxga_dualdsi_cmd_command_panel; |
| 374 | panelstruct->state = &nt35597_wqxga_dualdsi_cmd_state; |
| 375 | panelstruct->laneconfig = &nt35597_wqxga_dualdsi_cmd_lane_config; |
| 376 | panelstruct->paneltiminginfo |
| 377 | = &nt35597_wqxga_dualdsi_cmd_timing_info; |
Padmanabhan Komanduru | 58fc57e | 2015-07-07 21:36:14 +0530 | [diff] [blame] | 378 | /* Clkout timings are different for this panel on 8956 */ |
| 379 | panelstruct->paneltiminginfo->tclk_post = 0x2b; |
| 380 | panelstruct->paneltiminginfo->tclk_pre = 0x28; |
Vishnuvardhan Prodduturi | c1a46c5 | 2015-06-29 16:35:23 +0530 | [diff] [blame] | 381 | panelstruct->panelresetseq |
| 382 | = &nt35597_wqxga_dualdsi_cmd_reset_seq; |
| 383 | panelstruct->backlightinfo = &nt35597_wqxga_dualdsi_cmd_backlight; |
| 384 | |
| 385 | pinfo->labibb = &nt35597_wqxga_dualdsi_cmd_labibb; |
| 386 | |
| 387 | pinfo->mipi.panel_on_cmds |
| 388 | = nt35597_wqxga_dualdsi_cmd_on_command; |
| 389 | pinfo->mipi.num_of_panel_on_cmds |
| 390 | = NT35597_WQXGA_DUALDSI_CMD_ON_COMMAND; |
| 391 | pinfo->mipi.panel_off_cmds |
| 392 | = nt35597_wqxga_dualdsi_cmd_off_command; |
| 393 | pinfo->mipi.num_of_panel_off_cmds |
| 394 | = NT35597_WQXGA_DUALDSI_CMD_OFF_COMMAND; |
| 395 | memcpy(phy_db->timing, nt35597_wqxga_dualdsi_cmd_timings, |
| 396 | TIMING_SIZE); |
| 397 | pinfo->mipi.tx_eot_append = true; |
| 398 | break; |
Sandeep Panda | ed08292 | 2015-08-03 12:18:25 +0530 | [diff] [blame] | 399 | case NT35597_WQXGA_DSC_VIDEO_PANEL: |
| 400 | panelstruct->paneldata = &nt35597_wqxga_dsc_video_panel_data; |
| 401 | panelstruct->paneldata->panel_with_enable_gpio = 0; |
| 402 | panelstruct->paneldata->panel_operating_mode = USE_DSI1_PLL_FLAG; |
| 403 | panelstruct->panelres = &nt35597_wqxga_dsc_video_panel_res; |
| 404 | panelstruct->color = &nt35597_wqxga_dsc_video_color; |
| 405 | panelstruct->videopanel = &nt35597_wqxga_dsc_video_video_panel; |
| 406 | panelstruct->commandpanel = &nt35597_wqxga_dsc_video_command_panel; |
| 407 | panelstruct->state = &nt35597_wqxga_dsc_video_state; |
| 408 | panelstruct->laneconfig = &nt35597_wqxga_dsc_video_lane_config; |
| 409 | panelstruct->paneltiminginfo |
| 410 | = &nt35597_wqxga_dsc_video_timing_info; |
| 411 | panelstruct->panelresetseq |
| 412 | = &nt35597_wqxga_dsc_video_reset_seq; |
| 413 | panelstruct->backlightinfo = &nt35597_wqxga_dsc_video_backlight; |
| 414 | pinfo->labibb = &nt35597_wqxga_dsc_video_labibb; |
| 415 | |
| 416 | pinfo->mipi.panel_on_cmds |
| 417 | = nt35597_wqxga_dsc_video_on_command; |
| 418 | pinfo->mipi.num_of_panel_on_cmds |
| 419 | = NT35597_WQXGA_DSC_VIDEO_ON_COMMAND; |
| 420 | pinfo->mipi.panel_off_cmds |
| 421 | = nt35597_wqxga_dsc_video_off_command; |
| 422 | pinfo->mipi.num_of_panel_off_cmds |
| 423 | = NT35597_WQXGA_DSC_VIDEO_OFF_COMMAND; |
| 424 | memcpy(phy_db->timing, nt35597_wqxga_dsc_video_timings, |
| 425 | TIMING_SIZE); |
| 426 | /* Clkout timings are different for this panel on 8956 */ |
| 427 | panelstruct->paneltiminginfo->tclk_post = 0x04; |
| 428 | panelstruct->paneltiminginfo->tclk_pre = 0x20; |
| 429 | pinfo->mipi.tx_eot_append = true; |
Ujwal Patel | 41a665a | 2015-07-17 13:51:30 -0700 | [diff] [blame] | 430 | |
| 431 | panelstruct->paneldata->panel_operating_mode &= ~DUAL_PIPE_FLAG; |
| 432 | panelstruct->config = &nt35597_wqxga_dsc_video_config0; |
| 433 | if (oem_data) { |
| 434 | switch (oem_data->cfg_num[0]) { |
| 435 | case -1: /* default */ |
| 436 | case 0: |
| 437 | panelstruct->config = |
| 438 | &nt35597_wqxga_dsc_video_config0; |
| 439 | break; |
| 440 | default: |
| 441 | dprintf(CRITICAL, "topology config%d not supported. fallback to default config0\n", |
| 442 | oem_data->cfg_num[0]); |
| 443 | panelstruct->config = &nt35597_wqxga_dsc_video_config0; |
| 444 | } |
| 445 | } |
| 446 | pinfo->lm_split[0] = panelstruct->config->lm_split[0]; |
| 447 | pinfo->lm_split[1] = panelstruct->config->lm_split[1]; |
| 448 | pinfo->num_dsc_enc = panelstruct->config->num_dsc_enc; |
Sandeep Panda | ed08292 | 2015-08-03 12:18:25 +0530 | [diff] [blame] | 449 | pinfo->compression_mode = COMPRESSION_DSC; |
Ujwal Patel | 41a665a | 2015-07-17 13:51:30 -0700 | [diff] [blame] | 450 | |
Sandeep Panda | ed08292 | 2015-08-03 12:18:25 +0530 | [diff] [blame] | 451 | pinfo->dsc.parameter_calc = mdss_dsc_parameters_calc; |
| 452 | pinfo->dsc.dsc2buf = mdss_dsc_to_buf; |
| 453 | pinfo->dsc.dsi_dsc_config = mdss_dsc_dsi_config; |
| 454 | pinfo->dsc.mdp_dsc_config = mdss_dsc_mdp_config; |
| 455 | break; |
| 456 | case NT35597_WQXGA_DSC_CMD_PANEL: |
| 457 | panelstruct->paneldata = &nt35597_wqxga_dsc_cmd_panel_data; |
| 458 | panelstruct->paneldata->panel_with_enable_gpio = 0; |
| 459 | panelstruct->paneldata->panel_operating_mode = USE_DSI1_PLL_FLAG; |
| 460 | panelstruct->panelres = &nt35597_wqxga_dsc_cmd_panel_res; |
| 461 | panelstruct->color = &nt35597_wqxga_dsc_cmd_color; |
| 462 | panelstruct->videopanel = &nt35597_wqxga_dsc_cmd_video_panel; |
| 463 | panelstruct->commandpanel = &nt35597_wqxga_dsc_cmd_command_panel; |
| 464 | panelstruct->state = &nt35597_wqxga_dsc_cmd_state; |
| 465 | panelstruct->laneconfig = &nt35597_wqxga_dsc_cmd_lane_config; |
| 466 | panelstruct->paneltiminginfo |
| 467 | = &nt35597_wqxga_dsc_cmd_timing_info; |
| 468 | panelstruct->panelresetseq |
| 469 | = &nt35597_wqxga_dsc_cmd_reset_seq; |
| 470 | panelstruct->backlightinfo = &nt35597_wqxga_dsc_cmd_backlight; |
| 471 | pinfo->labibb = &nt35597_wqxga_dsc_cmd_labibb; |
| 472 | |
| 473 | pinfo->mipi.panel_on_cmds |
| 474 | = nt35597_wqxga_dsc_cmd_on_command; |
| 475 | pinfo->mipi.num_of_panel_on_cmds |
| 476 | = NT35597_WQXGA_DSC_CMD_ON_COMMAND; |
| 477 | pinfo->mipi.panel_off_cmds |
| 478 | = nt35597_wqxga_dsc_cmd_off_command; |
| 479 | pinfo->mipi.num_of_panel_off_cmds |
| 480 | = NT35597_WQXGA_DSC_CMD_OFF_COMMAND; |
| 481 | memcpy(phy_db->timing, nt35597_wqxga_dsc_cmd_timings, |
| 482 | TIMING_SIZE); |
| 483 | /* Clkout timings are different for this panel on 8956 */ |
| 484 | panelstruct->paneltiminginfo->tclk_post = 0x04; |
| 485 | panelstruct->paneltiminginfo->tclk_pre = 0x20; |
| 486 | pinfo->mipi.tx_eot_append = true; |
Ujwal Patel | 41a665a | 2015-07-17 13:51:30 -0700 | [diff] [blame] | 487 | |
| 488 | panelstruct->paneldata->panel_operating_mode &= ~DUAL_PIPE_FLAG; |
| 489 | panelstruct->config = &nt35597_wqxga_dsc_cmd_config0; |
| 490 | if (oem_data) { |
| 491 | switch (oem_data->cfg_num[0]) { |
| 492 | case -1: /* default */ |
| 493 | case 0: |
| 494 | panelstruct->config = |
| 495 | &nt35597_wqxga_dsc_cmd_config0; |
| 496 | break; |
| 497 | default: |
| 498 | dprintf(CRITICAL, "topology config%d not supported. fallback to default config0\n", |
| 499 | oem_data->cfg_num[0]); |
| 500 | panelstruct->config = &nt35597_wqxga_dsc_cmd_config0; |
| 501 | } |
| 502 | } |
| 503 | pinfo->lm_split[0] = panelstruct->config->lm_split[0]; |
| 504 | pinfo->lm_split[1] = panelstruct->config->lm_split[1]; |
| 505 | pinfo->num_dsc_enc = panelstruct->config->num_dsc_enc; |
Sandeep Panda | ed08292 | 2015-08-03 12:18:25 +0530 | [diff] [blame] | 506 | pinfo->compression_mode = COMPRESSION_DSC; |
Ujwal Patel | 41a665a | 2015-07-17 13:51:30 -0700 | [diff] [blame] | 507 | |
Sandeep Panda | ed08292 | 2015-08-03 12:18:25 +0530 | [diff] [blame] | 508 | pinfo->dsc.parameter_calc = mdss_dsc_parameters_calc; |
| 509 | pinfo->dsc.dsc2buf = mdss_dsc_to_buf; |
| 510 | pinfo->dsc.dsi_dsc_config = mdss_dsc_dsi_config; |
| 511 | pinfo->dsc.mdp_dsc_config = mdss_dsc_mdp_config; |
| 512 | break; |
Padmanabhan Komanduru | 4927c2c | 2015-08-21 14:55:16 +0530 | [diff] [blame] | 513 | case HX8394D_720P_VIDEO_PANEL: |
| 514 | panelstruct->paneldata = &hx8394d_720p_video_panel_data; |
| 515 | panelstruct->panelres = &hx8394d_720p_video_panel_res; |
| 516 | panelstruct->color = &hx8394d_720p_video_color; |
| 517 | panelstruct->videopanel = &hx8394d_720p_video_video_panel; |
| 518 | panelstruct->commandpanel = &hx8394d_720p_video_command_panel; |
| 519 | panelstruct->state = &hx8394d_720p_video_state; |
| 520 | panelstruct->laneconfig = &hx8394d_720p_video_lane_config; |
| 521 | panelstruct->paneltiminginfo |
| 522 | = &hx8394d_720p_video_timing_info; |
| 523 | panelstruct->panelresetseq |
| 524 | = &hx8394d_720p_video_panel_reset_seq; |
| 525 | panelstruct->backlightinfo = &hx8394d_720p_video_backlight; |
| 526 | pinfo->mipi.panel_on_cmds |
| 527 | = hx8394d_720p_video_on_command; |
| 528 | pinfo->mipi.num_of_panel_on_cmds |
| 529 | = HX8394D_720P_VIDEO_ON_COMMAND; |
| 530 | pinfo->mipi.panel_off_cmds |
| 531 | = hx8394d_720p_video_off_command; |
| 532 | pinfo->mipi.num_of_panel_off_cmds |
| 533 | = HX8394D_720P_VIDEO_OFF_COMMAND; |
| 534 | memcpy(phy_db->timing, |
| 535 | hx8394d_720p_video_timings, TIMING_SIZE); |
| 536 | pinfo->mipi.signature = HX8394D_720P_VIDEO_SIGNATURE; |
| 537 | break; |
Ray Zhang | 4bbc7b0 | 2015-12-04 16:07:20 +0800 | [diff] [blame] | 538 | case R69006_1080P_CMD_PANEL: |
| 539 | panelstruct->paneldata = &r69006_1080p_cmd_panel_data; |
| 540 | panelstruct->panelres = &r69006_1080p_cmd_panel_res; |
| 541 | panelstruct->color = &r69006_1080p_cmd_color; |
| 542 | panelstruct->videopanel = &r69006_1080p_cmd_video_panel; |
| 543 | panelstruct->commandpanel = &r69006_1080p_cmd_command_panel; |
| 544 | panelstruct->state = &r69006_1080p_cmd_state; |
| 545 | panelstruct->laneconfig = &r69006_1080p_cmd_lane_config; |
| 546 | panelstruct->paneltiminginfo |
| 547 | = &r69006_1080p_cmd_timing_info; |
| 548 | panelstruct->panelresetseq |
| 549 | = &r69006_1080p_cmd_reset_seq; |
| 550 | panelstruct->backlightinfo = &r69006_1080p_cmd_backlight; |
Ray Zhang | e9e3b69 | 2015-12-18 18:03:30 +0800 | [diff] [blame] | 551 | pinfo->labibb = &r69006_1080p_cmd_labibb; |
Ray Zhang | 4bbc7b0 | 2015-12-04 16:07:20 +0800 | [diff] [blame] | 552 | pinfo->mipi.panel_on_cmds |
| 553 | = r69006_1080p_cmd_on_command; |
| 554 | pinfo->mipi.num_of_panel_on_cmds |
| 555 | = R69006_1080P_CMD_ON_COMMAND; |
| 556 | pinfo->mipi.panel_off_cmds |
| 557 | = r69006_1080p_cmd_off_command; |
| 558 | pinfo->mipi.num_of_panel_off_cmds |
| 559 | = R69006_1080P_CMD_OFF_COMMAND; |
| 560 | memcpy(phy_db->timing, |
| 561 | r69006_1080p_cmd_timings, TIMING_SIZE); |
| 562 | pinfo->mipi.signature = R69006_1080P_CMD_SIGNATURE; |
Ray Zhang | c8fd363 | 2015-12-23 14:01:13 +0800 | [diff] [blame] | 563 | pinfo->mipi.tx_eot_append = true; |
| 564 | pinfo->mipi.rx_eot_ignore = true; |
Ray Zhang | 4bbc7b0 | 2015-12-04 16:07:20 +0800 | [diff] [blame] | 565 | break; |
| 566 | case R69006_1080P_VIDEO_PANEL: |
| 567 | panelstruct->paneldata = &r69006_1080p_video_panel_data; |
| 568 | panelstruct->panelres = &r69006_1080p_video_panel_res; |
| 569 | panelstruct->color = &r69006_1080p_video_color; |
| 570 | panelstruct->videopanel = &r69006_1080p_video_video_panel; |
| 571 | panelstruct->commandpanel = &r69006_1080p_video_command_panel; |
| 572 | panelstruct->state = &r69006_1080p_video_state; |
| 573 | panelstruct->laneconfig = &r69006_1080p_video_lane_config; |
| 574 | panelstruct->paneltiminginfo |
| 575 | = &r69006_1080p_video_timing_info; |
| 576 | panelstruct->panelresetseq |
| 577 | = &r69006_1080p_video_reset_seq; |
| 578 | panelstruct->backlightinfo = &r69006_1080p_video_backlight; |
Ray Zhang | e9e3b69 | 2015-12-18 18:03:30 +0800 | [diff] [blame] | 579 | pinfo->labibb = &r69006_1080p_video_labibb; |
Ray Zhang | 4bbc7b0 | 2015-12-04 16:07:20 +0800 | [diff] [blame] | 580 | pinfo->mipi.panel_on_cmds |
| 581 | = r69006_1080p_video_on_command; |
| 582 | pinfo->mipi.num_of_panel_on_cmds |
| 583 | = R69006_1080P_VIDEO_ON_COMMAND; |
| 584 | pinfo->mipi.panel_off_cmds |
| 585 | = r69006_1080p_video_off_command; |
| 586 | pinfo->mipi.num_of_panel_off_cmds |
| 587 | = R69006_1080P_VIDEO_OFF_COMMAND; |
| 588 | memcpy(phy_db->timing, |
| 589 | r69006_1080p_video_timings, TIMING_SIZE); |
| 590 | pinfo->mipi.signature = R69006_1080P_VIDEO_SIGNATURE; |
| 591 | break; |
| 592 | case HX8394F_720P_VIDEO_PANEL: |
| 593 | panelstruct->paneldata = &hx8394f_720p_video_panel_data; |
| 594 | panelstruct->panelres = &hx8394f_720p_video_panel_res; |
| 595 | panelstruct->color = &hx8394f_720p_video_color; |
| 596 | panelstruct->videopanel = &hx8394f_720p_video_video_panel; |
| 597 | panelstruct->commandpanel = &hx8394f_720p_video_command_panel; |
| 598 | panelstruct->state = &hx8394f_720p_video_state; |
| 599 | panelstruct->laneconfig = &hx8394f_720p_video_lane_config; |
| 600 | panelstruct->paneltiminginfo |
| 601 | = &hx8394f_720p_video_timing_info; |
| 602 | panelstruct->panelresetseq |
| 603 | = &hx8394f_720p_video_reset_seq; |
| 604 | panelstruct->backlightinfo = &hx8394f_720p_video_backlight; |
| 605 | pinfo->mipi.panel_on_cmds |
| 606 | = hx8394f_720p_video_on_command; |
| 607 | pinfo->mipi.num_of_panel_on_cmds |
| 608 | = HX8394F_720P_VIDEO_ON_COMMAND; |
| 609 | pinfo->mipi.panel_off_cmds |
| 610 | = hx8394f_720p_video_off_command; |
| 611 | pinfo->mipi.num_of_panel_off_cmds |
| 612 | = HX8394F_720P_VIDEO_OFF_COMMAND; |
| 613 | memcpy(phy_db->timing, |
| 614 | hx8394f_720p_video_timings, TIMING_SIZE); |
| 615 | pinfo->mipi.signature = HX8394F_720P_VIDEO_SIGNATURE; |
raghavendra ambadas | dd10652 | 2018-07-13 11:11:50 +0530 | [diff] [blame] | 616 | if ((board_platform_id() == SDM429) || (board_platform_id() == SDM439) || |
| 617 | (board_platform_id() == SDA429) || (board_platform_id() == SDA439)) |
| 618 | pinfo->disable_wled_labibb = true; |
Ray Zhang | 4bbc7b0 | 2015-12-04 16:07:20 +0800 | [diff] [blame] | 619 | break; |
Sujeev Dias | 6bc9fa3 | 2015-08-03 23:13:44 -0700 | [diff] [blame] | 620 | case BYD_1200P_VIDEO_PANEL: |
| 621 | panelstruct->paneldata = &byd_1200p_video_panel_data; |
| 622 | panelstruct->paneldata->panel_with_enable_gpio = 1; |
| 623 | panelstruct->panelres = &byd_1200p_video_panel_res; |
| 624 | panelstruct->color = &byd_1200p_video_color; |
| 625 | panelstruct->videopanel = &byd_1200p_video_video_panel; |
| 626 | panelstruct->commandpanel = &byd_1200p_video_command_panel; |
| 627 | panelstruct->state = &byd_1200p_video_state; |
| 628 | panelstruct->laneconfig = &byd_1200p_video_lane_config; |
| 629 | panelstruct->paneltiminginfo |
| 630 | = &byd_1200p_video_timing_info; |
| 631 | panelstruct->panelresetseq |
| 632 | = &byd_1200p_video_panel_reset_seq; |
| 633 | panelstruct->backlightinfo = &byd_1200p_video_backlight; |
| 634 | pinfo->mipi.panel_on_cmds |
| 635 | = byd_1200p_video_on_command; |
| 636 | pinfo->mipi.num_of_panel_on_cmds |
| 637 | = BYD_1200P_VIDEO_ON_COMMAND; |
| 638 | pinfo->mipi.panel_off_cmds |
| 639 | = byd_1200p_video_off_command; |
| 640 | pinfo->mipi.num_of_panel_off_cmds |
| 641 | = BYD_1200P_VIDEO_OFF_COMMAND; |
| 642 | memcpy(phy_db->timing, |
| 643 | byd_1200p_video_timings, TIMING_SIZE); |
| 644 | pinfo->mipi.signature = BYD_1200P_VIDEO_SIGNATURE; |
| 645 | phy_db->regulator_mode = DSI_PHY_REGULATOR_LDO_MODE; |
| 646 | break; |
Padmanabhan Komanduru | e108ed0 | 2015-12-21 12:43:07 +0530 | [diff] [blame] | 647 | case TRULY_720P_VIDEO_PANEL: |
| 648 | panelstruct->paneldata = &truly_720p_video_panel_data; |
| 649 | panelstruct->paneldata->panel_with_enable_gpio = 1; |
| 650 | panelstruct->panelres = &truly_720p_video_panel_res; |
| 651 | panelstruct->color = &truly_720p_video_color; |
| 652 | panelstruct->videopanel = &truly_720p_video_video_panel; |
| 653 | panelstruct->commandpanel = &truly_720p_video_command_panel; |
| 654 | panelstruct->state = &truly_720p_video_state; |
| 655 | panelstruct->laneconfig = &truly_720p_video_lane_config; |
| 656 | panelstruct->paneltiminginfo |
| 657 | = &truly_720p_video_timing_info; |
| 658 | panelstruct->panelresetseq |
| 659 | = &truly_720p_video_panel_reset_seq; |
| 660 | panelstruct->backlightinfo = &truly_720p_video_backlight; |
| 661 | pinfo->mipi.panel_on_cmds |
| 662 | = truly_720p_video_on_command; |
| 663 | pinfo->mipi.num_of_panel_on_cmds |
| 664 | = TRULY_720P_VIDEO_ON_COMMAND; |
| 665 | pinfo->mipi.panel_off_cmds |
| 666 | = truly_720p_video_off_command; |
| 667 | pinfo->mipi.num_of_panel_off_cmds |
| 668 | = TRULY_720P_VIDEO_OFF_COMMAND; |
| 669 | memcpy(phy_db->timing, |
| 670 | truly_720p_video_timings, TIMING_SIZE); |
| 671 | pinfo->mipi.signature = TRULY_720P_VIDEO_SIGNATURE; |
| 672 | pinfo->mipi.tx_eot_append = true; |
| 673 | break; |
Padmanabhan Komanduru | 7460e44 | 2016-01-21 12:30:34 +0530 | [diff] [blame] | 674 | case TRULY_WUXGA_VIDEO_PANEL: |
| 675 | panelstruct->paneldata = &truly_wuxga_video_panel_data; |
| 676 | panelstruct->paneldata->panel_with_enable_gpio = 1; |
| 677 | panelstruct->panelres = &truly_wuxga_video_panel_res; |
| 678 | panelstruct->color = &truly_wuxga_video_color; |
| 679 | panelstruct->videopanel = &truly_wuxga_video_video_panel; |
| 680 | panelstruct->commandpanel = &truly_wuxga_video_command_panel; |
| 681 | panelstruct->state = &truly_wuxga_video_state; |
| 682 | panelstruct->laneconfig = &truly_wuxga_video_lane_config; |
| 683 | panelstruct->paneltiminginfo |
| 684 | = &truly_wuxga_video_timing_info; |
| 685 | panelstruct->panelresetseq |
| 686 | = &truly_wuxga_video_panel_reset_seq; |
| 687 | panelstruct->backlightinfo = &truly_wuxga_video_backlight; |
| 688 | pinfo->mipi.panel_on_cmds |
| 689 | = truly_wuxga_video_on_command; |
| 690 | pinfo->mipi.num_of_panel_on_cmds |
| 691 | = TRULY_WUXGA_VIDEO_ON_COMMAND; |
| 692 | pinfo->mipi.panel_off_cmds |
| 693 | = truly_wuxga_video_off_command; |
| 694 | pinfo->mipi.num_of_panel_off_cmds |
| 695 | = TRULY_WUXGA_VIDEO_OFF_COMMAND; |
| 696 | memcpy(phy_db->timing, |
| 697 | truly_wuxga_video_timings, TIMING_SIZE); |
| 698 | pinfo->mipi.signature = TRULY_WUXGA_VIDEO_SIGNATURE; |
| 699 | break; |
Vishnuvardhan Prodduturi | a0989b3 | 2016-02-15 18:07:44 +0530 | [diff] [blame] | 700 | case TRULY_720P_CMD_PANEL: |
| 701 | panelstruct->paneldata = &truly_720p_cmd_panel_data; |
| 702 | panelstruct->paneldata->panel_with_enable_gpio = 1; |
| 703 | panelstruct->panelres = &truly_720p_cmd_panel_res; |
| 704 | panelstruct->color = &truly_720p_cmd_color; |
| 705 | panelstruct->videopanel = &truly_720p_cmd_video_panel; |
| 706 | panelstruct->commandpanel = &truly_720p_cmd_command_panel; |
| 707 | panelstruct->state = &truly_720p_cmd_state; |
| 708 | panelstruct->laneconfig = &truly_720p_cmd_lane_config; |
| 709 | panelstruct->paneltiminginfo |
| 710 | = &truly_720p_cmd_timing_info; |
| 711 | panelstruct->panelresetseq |
| 712 | = &truly_720p_cmd_panel_reset_seq; |
| 713 | panelstruct->backlightinfo = &truly_720p_cmd_backlight; |
| 714 | pinfo->mipi.panel_on_cmds |
| 715 | = truly_720p_cmd_on_command; |
| 716 | pinfo->mipi.num_of_panel_on_cmds |
| 717 | = TRULY_720P_CMD_ON_COMMAND; |
| 718 | pinfo->mipi.panel_off_cmds |
| 719 | = truly_720p_cmd_off_command; |
| 720 | pinfo->mipi.num_of_panel_off_cmds |
| 721 | = TRULY_720P_CMD_OFF_COMMAND; |
| 722 | memcpy(phy_db->timing, |
| 723 | truly_720p_cmd_timings, TIMING_SIZE); |
| 724 | pinfo->mipi.signature = TRULY_720P_CMD_SIGNATURE; |
| 725 | pinfo->mipi.tx_eot_append = true; |
| 726 | break; |
Ray Zhang | fb6025a | 2016-04-08 10:57:30 +0800 | [diff] [blame] | 727 | case LEAD_FL10802_FWVGA_VIDEO_PANEL: |
| 728 | panelstruct->paneldata = &lead_fl10802_fwvga_video_panel_data; |
| 729 | panelstruct->panelres = &lead_fl10802_fwvga_video_panel_res; |
| 730 | panelstruct->color = &lead_fl10802_fwvga_video_color; |
| 731 | panelstruct->videopanel = &lead_fl10802_fwvga_video_video_panel; |
| 732 | panelstruct->commandpanel |
| 733 | = &lead_fl10802_fwvga_video_command_panel; |
| 734 | panelstruct->state = &lead_fl10802_fwvga_video_state; |
| 735 | panelstruct->laneconfig = &lead_fl10802_fwvga_video_lane_config; |
| 736 | panelstruct->paneltiminginfo |
| 737 | = &lead_fl10802_fwvga_video_timing_info; |
| 738 | panelstruct->panelresetseq |
| 739 | = &lead_fl10802_fwvga_video_reset_seq; |
| 740 | panelstruct->backlightinfo |
| 741 | = &lead_fl10802_fwvga_video_backlight; |
| 742 | pinfo->mipi.panel_on_cmds |
| 743 | = lead_fl10802_fwvga_video_on_command; |
| 744 | pinfo->mipi.num_of_panel_on_cmds |
| 745 | = LEAD_FL10802_FWVGA_VIDEO_ON_COMMAND; |
| 746 | pinfo->mipi.panel_off_cmds |
| 747 | = lead_fl10802_fwvga_video_off_command; |
| 748 | pinfo->mipi.num_of_panel_off_cmds |
| 749 | = LEAD_FL10802_FWVGA_VIDEO_OFF_COMMAND; |
| 750 | memcpy(phy_db->timing, |
| 751 | lead_fl10802_fwvga_video_timings, TIMING_SIZE); |
| 752 | pinfo->mipi.signature = LEAD_FL10802_FWVGA_VIDEO_SIGNATURE; |
Ray Zhang | e3eba40 | 2016-05-13 10:33:18 +0800 | [diff] [blame] | 753 | pinfo->mipi.cmds_post_tg = 1; |
Ray Zhang | fb6025a | 2016-04-08 10:57:30 +0800 | [diff] [blame] | 754 | break; |
Padmanabhan Komanduru | c570f30 | 2018-04-30 09:32:31 +0530 | [diff] [blame] | 755 | case HX8399C_FHD_PLUSE_VIDEO_PANEL: |
| 756 | panelstruct->paneldata = &hx8399c_fhd_pluse_video_panel_data; |
| 757 | panelstruct->panelres = &hx8399c_fhd_pluse_video_panel_res; |
| 758 | panelstruct->color = &hx8399c_fhd_pluse_video_color; |
| 759 | panelstruct->videopanel = |
| 760 | &hx8399c_fhd_pluse_video_video_panel; |
| 761 | panelstruct->commandpanel = |
| 762 | &hx8399c_fhd_pluse_video_command_panel; |
| 763 | panelstruct->state = &hx8399c_fhd_pluse_video_state; |
| 764 | panelstruct->laneconfig = |
| 765 | &hx8399c_fhd_pluse_video_lane_config; |
| 766 | panelstruct->paneltiminginfo |
| 767 | = &hx8399c_fhd_pluse_video_timing_info; |
| 768 | panelstruct->panelresetseq |
| 769 | = &hx8399c_fhd_pluse_video_panel_reset_seq; |
| 770 | panelstruct->backlightinfo = &hx8399c_fhd_pluse_video_backlight; |
| 771 | pinfo->labibb = &hx8399c_fhd_pluse_video_labibb; |
| 772 | pinfo->mipi.panel_on_cmds |
| 773 | = hx8399c_fhd_pluse_video_on_command; |
| 774 | pinfo->mipi.num_of_panel_on_cmds |
| 775 | = HX8399C_FHD_PLUSE_VIDEO_ON_COMMAND; |
| 776 | pinfo->mipi.panel_off_cmds |
| 777 | = hx8399c_fhd_pluse_video_off_command; |
| 778 | pinfo->mipi.num_of_panel_off_cmds |
| 779 | = HX8399C_FHD_PLUSE_VIDEO_OFF_COMMAND; |
| 780 | if (phy_db->pll_type == DSI_PLL_TYPE_12NM) |
| 781 | memcpy(phy_db->timing, |
| 782 | hx8399c_fhd_pluse_video_12nm_timings, |
| 783 | TIMING_SIZE_12NM); |
| 784 | else |
| 785 | memcpy(phy_db->timing, hx8399c_fhd_pluse_video_timings, |
| 786 | TIMING_SIZE); |
| 787 | pinfo->mipi.signature = HX8399C_FHD_PLUSE_VIDEO_SIGNATURE; |
| 788 | break; |
Padmanabhan Komanduru | 1963632 | 2018-04-30 16:52:59 +0530 | [diff] [blame] | 789 | case HX8399C_HD_PLUS_VIDEO_PANEL: |
| 790 | panelstruct->paneldata = &hx8399c_hd_plus_video_panel_data; |
| 791 | panelstruct->panelres = &hx8399c_hd_plus_video_panel_res; |
| 792 | panelstruct->color = &hx8399c_hd_plus_video_color; |
| 793 | panelstruct->videopanel = |
| 794 | &hx8399c_hd_plus_video_video_panel; |
| 795 | panelstruct->commandpanel = |
| 796 | &hx8399c_hd_plus_video_command_panel; |
| 797 | panelstruct->state = &hx8399c_hd_plus_video_state; |
| 798 | panelstruct->laneconfig = |
| 799 | &hx8399c_hd_plus_video_lane_config; |
| 800 | panelstruct->paneltiminginfo |
| 801 | = &hx8399c_hd_plus_video_timing_info; |
| 802 | panelstruct->panelresetseq |
| 803 | = &hx8399c_hd_plus_video_panel_reset_seq; |
| 804 | panelstruct->backlightinfo = &hx8399c_hd_plus_video_backlight; |
| 805 | pinfo->labibb = &hx8399c_hd_plus_video_labibb; |
| 806 | pinfo->mipi.panel_on_cmds |
| 807 | = hx8399c_hd_plus_video_on_command; |
| 808 | pinfo->mipi.num_of_panel_on_cmds |
| 809 | = HX8399C_HD_PLUS_VIDEO_ON_COMMAND; |
| 810 | pinfo->mipi.panel_off_cmds |
| 811 | = hx8399c_hd_plus_video_off_command; |
| 812 | pinfo->mipi.num_of_panel_off_cmds |
| 813 | = HX8399C_HD_PLUS_VIDEO_OFF_COMMAND; |
| 814 | if (phy_db->pll_type == DSI_PLL_TYPE_12NM) |
| 815 | memcpy(phy_db->timing, |
| 816 | hx8399c_hd_plus_video_12nm_timings, |
| 817 | TIMING_SIZE_12NM); |
| 818 | else |
| 819 | memcpy(phy_db->timing, hx8399c_hd_plus_video_timings, |
| 820 | TIMING_SIZE); |
| 821 | pinfo->mipi.signature = HX8399C_HD_PLUS_VIDEO_SIGNATURE; |
| 822 | pinfo->mipi.tx_eot_append = true; |
| 823 | break; |
Xipeng Gu | 5affb81 | 2019-06-18 14:59:17 +0800 | [diff] [blame] | 824 | case RM67162_QVGA_CMD_PANEL: |
| 825 | panelstruct->paneldata = &edo_rm67162_qvga_cmd_panel_data; |
| 826 | panelstruct->panelres = &edo_rm67162_qvga_cmd_panel_res; |
| 827 | panelstruct->color = &edo_rm67162_qvga_cmd_color; |
| 828 | panelstruct->videopanel = |
| 829 | &edo_rm67162_qvga_cmd_video_panel; |
| 830 | panelstruct->commandpanel = |
| 831 | &edo_rm67162_qvga_cmd_command_panel; |
| 832 | panelstruct->state = &edo_rm67162_qvga_cmd_state; |
| 833 | panelstruct->laneconfig = |
| 834 | &edo_rm67162_qvga_cmd_lane_config; |
| 835 | panelstruct->paneltiminginfo |
| 836 | = &edo_rm67162_qvga_cmd_timing_info; |
| 837 | panelstruct->panelresetseq |
| 838 | = &edo_rm67162_qvga_cmd_reset_seq; |
| 839 | panelstruct->backlightinfo = &edo_rm67162_qvga_cmd_backlight; |
| 840 | pinfo->labibb = NULL; |
| 841 | pinfo->mipi.panel_on_cmds |
| 842 | = edo_rm67162_qvga_cmd_on_command; |
| 843 | pinfo->mipi.num_of_panel_on_cmds |
| 844 | = EDO_RM67162_QVGA_CMD_ON_COMMAND; |
| 845 | pinfo->mipi.panel_off_cmds |
| 846 | = edo_rm67162_qvga_cmd_off_command; |
| 847 | pinfo->mipi.num_of_panel_off_cmds |
| 848 | = EDO_RM67162_QVGA_CMD_OFF_COMMAND; |
| 849 | if (phy_db->pll_type == DSI_PLL_TYPE_12NM) |
| 850 | memcpy(phy_db->timing, |
| 851 | edo_rm67162_qvga_cmd_12nm_timings, |
| 852 | TIMING_SIZE_12NM); |
| 853 | pinfo->mipi.tx_eot_append = true; |
| 854 | break; |
Xipeng Gu | dd4f96d | 2019-07-17 16:44:09 +0800 | [diff] [blame] | 855 | case RM69090_QVGA_CMD_PANEL: |
| 856 | panelstruct->paneldata = &truly_rm69090_qvga_cmd_panel_data; |
| 857 | panelstruct->panelres = &truly_rm69090_qvga_cmd_panel_res; |
| 858 | panelstruct->color = &truly_rm69090_qvga_cmd_color; |
| 859 | panelstruct->videopanel = |
| 860 | &truly_rm69090_qvga_cmd_video_panel; |
| 861 | panelstruct->commandpanel = |
| 862 | &truly_rm69090_qvga_cmd_command_panel; |
| 863 | panelstruct->state = &truly_rm69090_qvga_cmd_state; |
| 864 | panelstruct->laneconfig = |
| 865 | &truly_rm69090_qvga_cmd_lane_config; |
| 866 | panelstruct->paneltiminginfo |
| 867 | = &truly_rm69090_qvga_cmd_timing_info; |
| 868 | panelstruct->panelresetseq |
| 869 | = &truly_rm69090_qvga_cmd_reset_seq; |
| 870 | panelstruct->backlightinfo = &truly_rm69090_qvga_cmd_backlight; |
| 871 | pinfo->labibb = NULL; |
| 872 | pinfo->mipi.panel_on_cmds |
| 873 | = truly_rm69090_qvga_cmd_on_command; |
| 874 | pinfo->mipi.num_of_panel_on_cmds |
| 875 | = TRULY_RM69090_QVGA_CMD_ON_COMMAND; |
| 876 | pinfo->mipi.panel_off_cmds |
| 877 | = truly_rm69090_qvga_cmd_off_command; |
| 878 | pinfo->mipi.num_of_panel_off_cmds |
| 879 | = TRULY_RM69090_QVGA_CMD_OFF_COMMAND; |
| 880 | if (phy_db->pll_type == DSI_PLL_TYPE_12NM) |
| 881 | memcpy(phy_db->timing, |
| 882 | truly_rm69090_qvga_cmd_12nm_timings, |
| 883 | TIMING_SIZE_12NM); |
| 884 | pinfo->mipi.tx_eot_append = true; |
| 885 | break; |
Padmanabhan Komanduru | b596828 | 2018-05-07 14:07:54 +0530 | [diff] [blame] | 886 | case NT35695B_TRULY_FHD_VIDEO_PANEL: |
| 887 | panelstruct->paneldata = &nt35695b_truly_fhd_video_panel_data; |
| 888 | panelstruct->panelres = &nt35695b_truly_fhd_video_panel_res; |
| 889 | panelstruct->color = &nt35695b_truly_fhd_video_color; |
| 890 | panelstruct->videopanel = |
| 891 | &nt35695b_truly_fhd_video_video_panel; |
| 892 | panelstruct->commandpanel = |
| 893 | &nt35695b_truly_fhd_video_command_panel; |
| 894 | panelstruct->state = &nt35695b_truly_fhd_video_state; |
| 895 | panelstruct->laneconfig = |
| 896 | &nt35695b_truly_fhd_video_lane_config; |
| 897 | panelstruct->paneltiminginfo |
| 898 | = &nt35695b_truly_fhd_video_timing_info; |
| 899 | panelstruct->panelresetseq |
| 900 | = &nt35695b_truly_fhd_video_panel_reset_seq; |
| 901 | panelstruct->backlightinfo = &nt35695b_truly_fhd_video_backlight; |
| 902 | pinfo->labibb = &nt35695b_truly_fhd_video_labibb; |
| 903 | pinfo->mipi.panel_on_cmds |
| 904 | = nt35695b_truly_fhd_video_on_command; |
| 905 | pinfo->mipi.num_of_panel_on_cmds |
| 906 | = NT35695B_TRULY_FHD_VIDEO_ON_COMMAND; |
| 907 | pinfo->mipi.panel_off_cmds |
| 908 | = nt35695b_truly_fhd_video_off_command; |
| 909 | pinfo->mipi.num_of_panel_off_cmds |
| 910 | = NT35695B_TRULY_FHD_VIDEO_OFF_COMMAND; |
| 911 | if (phy_db->pll_type == DSI_PLL_TYPE_12NM) |
| 912 | memcpy(phy_db->timing, |
| 913 | nt35695b_truly_fhd_video_12nm_timings, |
| 914 | TIMING_SIZE_12NM); |
| 915 | else |
| 916 | memcpy(phy_db->timing, nt35695b_truly_fhd_video_timings, |
| 917 | TIMING_SIZE); |
| 918 | pinfo->mipi.signature = NT35695B_TRULY_FHD_VIDEO_SIGNATURE; |
| 919 | pinfo->mipi.tx_eot_append = true; |
| 920 | break; |
| 921 | case NT35695B_TRULY_FHD_CMD_PANEL: |
| 922 | panelstruct->paneldata = &nt35695b_truly_fhd_cmd_panel_data; |
| 923 | panelstruct->panelres = &nt35695b_truly_fhd_cmd_panel_res; |
| 924 | panelstruct->color = &nt35695b_truly_fhd_cmd_color; |
| 925 | panelstruct->videopanel = |
| 926 | &nt35695b_truly_fhd_cmd_video_panel; |
| 927 | panelstruct->commandpanel = |
| 928 | &nt35695b_truly_fhd_cmd_command_panel; |
| 929 | panelstruct->state = &nt35695b_truly_fhd_cmd_state; |
| 930 | panelstruct->laneconfig = |
| 931 | &nt35695b_truly_fhd_cmd_lane_config; |
| 932 | panelstruct->paneltiminginfo |
| 933 | = &nt35695b_truly_fhd_cmd_timing_info; |
| 934 | panelstruct->panelresetseq |
| 935 | = &nt35695b_truly_fhd_cmd_panel_reset_seq; |
| 936 | panelstruct->backlightinfo = &nt35695b_truly_fhd_cmd_backlight; |
| 937 | pinfo->labibb = &nt35695b_truly_fhd_cmd_labibb; |
| 938 | pinfo->mipi.panel_on_cmds |
| 939 | = nt35695b_truly_fhd_cmd_on_command; |
| 940 | pinfo->mipi.num_of_panel_on_cmds |
| 941 | = NT35695B_TRULY_FHD_CMD_ON_COMMAND; |
| 942 | pinfo->mipi.panel_off_cmds |
| 943 | = nt35695b_truly_fhd_cmd_off_command; |
| 944 | pinfo->mipi.num_of_panel_off_cmds |
| 945 | = NT35695B_TRULY_FHD_CMD_OFF_COMMAND; |
| 946 | if (phy_db->pll_type == DSI_PLL_TYPE_12NM) |
| 947 | memcpy(phy_db->timing, |
| 948 | nt35695b_truly_fhd_cmd_12nm_timings, |
| 949 | TIMING_SIZE_12NM); |
| 950 | else |
| 951 | memcpy(phy_db->timing, nt35695b_truly_fhd_cmd_timings, |
| 952 | TIMING_SIZE); |
| 953 | pinfo->mipi.signature = NT35695B_TRULY_FHD_CMD_SIGNATURE; |
| 954 | pinfo->mipi.tx_eot_append = true; |
| 955 | break; |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 956 | case UNKNOWN_PANEL: |
| 957 | default: |
| 958 | memset(panelstruct, 0, sizeof(struct panel_struct)); |
| 959 | memset(pinfo->mipi.panel_on_cmds, 0, |
| 960 | sizeof(struct mipi_dsi_cmd)); |
| 961 | pinfo->mipi.num_of_panel_on_cmds = 0; |
| 962 | memset(pinfo->mipi.panel_off_cmds, 0, |
| 963 | sizeof(struct mipi_dsi_cmd)); |
| 964 | pinfo->mipi.num_of_panel_off_cmds = 0; |
| 965 | memset(phy_db->timing, 0, TIMING_SIZE); |
| 966 | pan_type = PANEL_TYPE_UNKNOWN; |
| 967 | break; |
| 968 | } |
Ujwal Patel | 41a665a | 2015-07-17 13:51:30 -0700 | [diff] [blame] | 969 | |
| 970 | dprintf(SPEW, "lm_split[0]=%d lm_split[1]=%d mode=0x%x\n", |
| 971 | pinfo->lm_split[0], pinfo->lm_split[1], |
| 972 | panelstruct->paneldata->panel_operating_mode); |
| 973 | |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 974 | return pan_type; |
| 975 | } |
| 976 | |
Ray Zhang | f95f5b9 | 2015-06-25 15:34:29 +0800 | [diff] [blame] | 977 | #define DISPLAY_MAX_PANEL_DETECTION 2 |
| 978 | static uint32_t auto_pan_loop = 0; |
| 979 | |
| 980 | uint32_t oem_panel_max_auto_detect_panels() |
| 981 | { |
| 982 | return target_panel_auto_detect_enabled() ? |
| 983 | DISPLAY_MAX_PANEL_DETECTION : 0; |
| 984 | } |
| 985 | |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 986 | int oem_panel_select(const char *panel_name, struct panel_struct *panelstruct, |
| 987 | struct msm_panel_info *pinfo, |
| 988 | struct mdss_dsi_phy_ctrl *phy_db) |
| 989 | { |
| 990 | uint32_t hw_id = board_hardware_id(); |
Sujeev Dias | 6bc9fa3 | 2015-08-03 23:13:44 -0700 | [diff] [blame] | 991 | uint32_t hw_subtype = board_hardware_subtype(); |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 992 | int32_t panel_override_id; |
feifanz | 028544e | 2015-07-28 20:58:57 +0800 | [diff] [blame] | 993 | uint32_t target_id, plat_hw_ver_major; |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 994 | |
| 995 | if (panel_name) { |
| 996 | panel_override_id = panel_name_to_id(supp_panels, |
| 997 | ARRAY_SIZE(supp_panels), panel_name); |
| 998 | |
| 999 | if (panel_override_id < 0) { |
| 1000 | dprintf(CRITICAL, "Not able to search the panel:%s\n", |
Padmanabhan Komanduru | bccbcdc | 2015-06-30 16:19:24 +0530 | [diff] [blame] | 1001 | panel_name); |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 1002 | } else if (panel_override_id < UNKNOWN_PANEL) { |
| 1003 | /* panel override using fastboot oem command */ |
| 1004 | panel_id = panel_override_id; |
| 1005 | |
| 1006 | dprintf(INFO, "OEM panel override:%s\n", |
Padmanabhan Komanduru | bccbcdc | 2015-06-30 16:19:24 +0530 | [diff] [blame] | 1007 | panel_name); |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 1008 | goto panel_init; |
| 1009 | } |
| 1010 | } |
| 1011 | |
| 1012 | switch (hw_id) { |
| 1013 | case HW_PLATFORM_MTP: |
Padmanabhan Komanduru | 49a86cf | 2015-06-08 18:24:30 +0530 | [diff] [blame] | 1014 | if (platform_is_msm8956()) |
| 1015 | panel_id = NT35597_WQXGA_DUALDSI_VIDEO_PANEL; |
Padmanabhan Komanduru | c570f30 | 2018-04-30 09:32:31 +0530 | [diff] [blame] | 1016 | else if (platform_is_msm8917()) |
Jayant Shekhar | 9c0533e | 2016-01-28 11:17:18 +0530 | [diff] [blame] | 1017 | panel_id = TRULY_720P_VIDEO_PANEL; |
Padmanabhan Komanduru | c570f30 | 2018-04-30 09:32:31 +0530 | [diff] [blame] | 1018 | else if (platform_is_sdm439()) |
| 1019 | panel_id = HX8399C_FHD_PLUSE_VIDEO_PANEL; |
Padmanabhan Komanduru | 1963632 | 2018-04-30 16:52:59 +0530 | [diff] [blame] | 1020 | else if (platform_is_sdm429()) |
| 1021 | panel_id = HX8399C_HD_PLUS_VIDEO_PANEL; |
Padmanabhan Komanduru | 49a86cf | 2015-06-08 18:24:30 +0530 | [diff] [blame] | 1022 | else |
| 1023 | panel_id = TRULY_1080P_VIDEO_PANEL; |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 1024 | break; |
| 1025 | case HW_PLATFORM_SURF: |
Vishnuvardhan Prodduturi | e116c00 | 2015-07-14 17:14:25 +0530 | [diff] [blame] | 1026 | case HW_PLATFORM_RCM: |
Padmanabhan Komanduru | 49a86cf | 2015-06-08 18:24:30 +0530 | [diff] [blame] | 1027 | if (platform_is_msm8956()) |
| 1028 | panel_id = NT35597_WQXGA_DUALDSI_VIDEO_PANEL; |
Padmanabhan Komanduru | c570f30 | 2018-04-30 09:32:31 +0530 | [diff] [blame] | 1029 | else if (platform_is_msm8917()) |
Jayant Shekhar | 9c0533e | 2016-01-28 11:17:18 +0530 | [diff] [blame] | 1030 | panel_id = TRULY_720P_VIDEO_PANEL; |
Padmanabhan Komanduru | c570f30 | 2018-04-30 09:32:31 +0530 | [diff] [blame] | 1031 | else if (platform_is_sdm439()) |
| 1032 | panel_id = HX8399C_FHD_PLUSE_VIDEO_PANEL; |
Padmanabhan Komanduru | 1963632 | 2018-04-30 16:52:59 +0530 | [diff] [blame] | 1033 | else if (platform_is_sdm429()) |
| 1034 | panel_id = HX8399C_HD_PLUS_VIDEO_PANEL; |
Padmanabhan Komanduru | 49a86cf | 2015-06-08 18:24:30 +0530 | [diff] [blame] | 1035 | else |
| 1036 | panel_id = TRULY_1080P_VIDEO_PANEL; |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 1037 | break; |
feifanz | 174c82c | 2015-04-15 18:57:07 +0800 | [diff] [blame] | 1038 | case HW_PLATFORM_QRD: |
Vishnuvardhan Prodduturi | a84a0e8 | 2018-10-25 12:55:55 +0530 | [diff] [blame] | 1039 | if (platform_is_qm215()) { |
| 1040 | panel_id = HX8399C_HD_PLUS_VIDEO_PANEL; |
| 1041 | break; |
| 1042 | } |
| 1043 | |
Sujeev Dias | 6bc9fa3 | 2015-08-03 23:13:44 -0700 | [diff] [blame] | 1044 | if (hw_subtype == HW_PLATFORM_SUBTYPE_POLARIS) { |
| 1045 | panel_id = BYD_1200P_VIDEO_PANEL; |
| 1046 | break; |
| 1047 | } |
| 1048 | |
feifanz | 028544e | 2015-07-28 20:58:57 +0800 | [diff] [blame] | 1049 | target_id = board_target_id(); |
| 1050 | plat_hw_ver_major = ((target_id >> 16) & 0xFF); |
| 1051 | |
| 1052 | /* |
| 1053 | * 8952 SKUM DVT2 - HX8399A 1080p video panel |
| 1054 | * 8952 SKUM EVT1/EVT2 - OTM1906C 1080p cmd panel |
| 1055 | */ |
| 1056 | if (plat_hw_ver_major >= 4) |
| 1057 | panel_id = HX8399A_1080P_VIDEO_PANEL; |
| 1058 | else |
| 1059 | panel_id = OTM1906C_1080P_CMD_PANEL; |
Ray Zhang | f95f5b9 | 2015-06-25 15:34:29 +0800 | [diff] [blame] | 1060 | |
Ray Zhang | 4bbc7b0 | 2015-12-04 16:07:20 +0800 | [diff] [blame] | 1061 | if (platform_is_msm8937()){ |
Ray Zhang | 49cfcc8 | 2016-08-09 19:08:37 +0800 | [diff] [blame] | 1062 | if (hw_subtype == 0x80) { |
| 1063 | /* 8940 SKU7 uses HX8394F */ |
Ray Zhang | 4bbc7b0 | 2015-12-04 16:07:20 +0800 | [diff] [blame] | 1064 | panel_id = HX8394F_720P_VIDEO_PANEL; |
Ray Zhang | 49cfcc8 | 2016-08-09 19:08:37 +0800 | [diff] [blame] | 1065 | } else { |
| 1066 | /* 8937 SKU1 uses R69006, SKU2 uses HX8394F */ |
| 1067 | if (plat_hw_ver_major > 16) |
| 1068 | panel_id = HX8394F_720P_VIDEO_PANEL; |
| 1069 | else |
| 1070 | panel_id = R69006_1080P_CMD_PANEL; |
| 1071 | } |
Ray Zhang | 4bbc7b0 | 2015-12-04 16:07:20 +0800 | [diff] [blame] | 1072 | } |
| 1073 | |
Lei Chen | 4b58d6d | 2018-03-15 17:52:11 +0800 | [diff] [blame] | 1074 | if (platform_is_sdm439()) { |
| 1075 | panel_id = HX8399C_FHD_PLUSE_VIDEO_PANEL; |
| 1076 | } |
| 1077 | |
Meng Jiang | 289a981 | 2019-10-23 15:25:26 +0800 | [diff] [blame] | 1078 | if (platform_is_sdm429() || platform_is_sdm429w() || platform_is_sda429w()) { |
Bo Zhang | a1a44c4 | 2019-08-13 09:12:46 +0800 | [diff] [blame] | 1079 | if (hw_subtype == HW_PLATFORM_SUBTYPE_429W_PM660) /* WTP 2700 DVT */ |
| 1080 | panel_id = RM67162_QVGA_CMD_PANEL; |
| 1081 | else if (hw_subtype == HW_PLATFORM_SUBTYPE_429W_PM660_WDP) /* WDP 2700 */ |
| 1082 | panel_id = RM69090_QVGA_CMD_PANEL; |
| 1083 | else |
Xipeng Gu | 5affb81 | 2019-06-18 14:59:17 +0800 | [diff] [blame] | 1084 | panel_id = HX8399C_HD_PLUS_VIDEO_PANEL; |
Lei Chen | 4b58d6d | 2018-03-15 17:52:11 +0800 | [diff] [blame] | 1085 | } |
| 1086 | |
Ray Zhang | 4bbc7b0 | 2015-12-04 16:07:20 +0800 | [diff] [blame] | 1087 | /* QRD EVT1 uses OTM1906C, and EVT2 uses HX8394F */ |
Ray Zhang | f95f5b9 | 2015-06-25 15:34:29 +0800 | [diff] [blame] | 1088 | if (platform_is_msm8956()) { |
| 1089 | switch (auto_pan_loop) { |
| 1090 | case 0: |
| 1091 | panel_id = HX8399A_1080P_VIDEO_PANEL; |
| 1092 | break; |
| 1093 | case 1: |
| 1094 | panel_id = OTM1906C_1080P_CMD_PANEL; |
| 1095 | break; |
| 1096 | default: |
| 1097 | panel_id = UNKNOWN_PANEL; |
| 1098 | dprintf(CRITICAL, "Unknown panel\n"); |
| 1099 | return PANEL_TYPE_UNKNOWN; |
| 1100 | } |
| 1101 | auto_pan_loop++; |
Ray Zhang | fb6025a | 2016-04-08 10:57:30 +0800 | [diff] [blame] | 1102 | } else if (platform_is_msm8917()) { |
| 1103 | if (hw_subtype == 0x0A) /* TMO target */ |
| 1104 | panel_id = LEAD_FL10802_FWVGA_VIDEO_PANEL; |
| 1105 | else |
| 1106 | panel_id = HX8394F_720P_VIDEO_PANEL; |
Ray Zhang | f95f5b9 | 2015-06-25 15:34:29 +0800 | [diff] [blame] | 1107 | } |
| 1108 | |
feifanz | 174c82c | 2015-04-15 18:57:07 +0800 | [diff] [blame] | 1109 | break; |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 1110 | default: |
| 1111 | dprintf(CRITICAL, "Display not enabled for %d HW type\n", |
| 1112 | hw_id); |
| 1113 | return PANEL_TYPE_UNKNOWN; |
| 1114 | } |
| 1115 | |
| 1116 | panel_init: |
| 1117 | /* |
| 1118 | * Update all data structures after 'panel_init' label. Only panel |
| 1119 | * selection is supposed to happen before that. |
| 1120 | */ |
Meng Jiang | 289a981 | 2019-10-23 15:25:26 +0800 | [diff] [blame] | 1121 | if (platform_is_sdm439() || platform_is_sdm429() || platform_is_sdm429w() || platform_is_sda429w()) { |
Padmanabhan Komanduru | 2ab03a6 | 2018-05-17 14:38:59 +0530 | [diff] [blame] | 1122 | phy_db->pll_type = DSI_PLL_TYPE_12NM; |
| 1123 | pinfo->lane_config = mdss_dsi_lane_config; |
| 1124 | goto end; |
| 1125 | } |
| 1126 | |
Padmanabhan Komanduru | 0e19a36 | 2015-06-08 13:29:32 +0530 | [diff] [blame] | 1127 | if (platform_is_msm8956()) |
| 1128 | memcpy(panel_regulator_settings, |
| 1129 | dcdc_regulator_settings_hpm, REGULATOR_SIZE); |
| 1130 | else |
| 1131 | memcpy(panel_regulator_settings, |
| 1132 | dcdc_regulator_settings_lpm, REGULATOR_SIZE); |
Padmanabhan Komanduru | 2ab03a6 | 2018-05-17 14:38:59 +0530 | [diff] [blame] | 1133 | end: |
Padmanabhan Komanduru | 9d49f89 | 2015-04-10 12:58:46 -0700 | [diff] [blame] | 1134 | pinfo->pipe_type = MDSS_MDP_PIPE_TYPE_RGB; |
| 1135 | return init_panel_data(panelstruct, pinfo, phy_db); |
| 1136 | } |