Shuo Yan | a935c30 | 2015-01-06 18:23:24 +0800 | [diff] [blame] | 1 | /* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [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 <err.h> |
| 32 | #include <smem.h> |
| 33 | #include <msm_panel.h> |
| 34 | #include <board.h> |
| 35 | #include <mipi_dsi.h> |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 36 | #include <target/display.h> |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 37 | |
| 38 | #include "include/panel.h" |
| 39 | #include "panel_display.h" |
| 40 | |
| 41 | /*---------------------------------------------------------------------------*/ |
| 42 | /* GCDB Panel Database */ |
| 43 | /*---------------------------------------------------------------------------*/ |
| 44 | #include "include/panel_jdi_1080p_video.h" |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 45 | #include "include/panel_nt35590_720p_video.h" |
| 46 | #include "include/panel_nt35590_720p_cmd.h" |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 47 | #include "include/panel_innolux_720p_video.h" |
Shuo Yan | 40c660c | 2014-04-24 15:58:43 +0800 | [diff] [blame] | 48 | #include "include/panel_otm8019a_fwvga_video.h" |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 49 | #include "include/panel_otm1283a_720p_video.h" |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 50 | #include "include/panel_nt35596_1080p_skuk_video.h" |
Vineet Bajaj | 7339d0b | 2014-07-24 21:51:44 +0530 | [diff] [blame] | 51 | #include "include/panel_sharp_wqxga_dualdsi_video.h" |
Sandeep Panda | 230cb72 | 2014-08-20 11:46:27 +0530 | [diff] [blame] | 52 | #include "include/panel_jdi_fhd_video.h" |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 53 | #include "include/panel_hx8379a_fwvga_video.h" |
Sandeep Panda | 230cb72 | 2014-08-20 11:46:27 +0530 | [diff] [blame] | 54 | #include "include/panel_hx8394d_720p_video.h" |
Gustavo Solaira | fb6fdd6 | 2014-09-30 08:15:32 -0300 | [diff] [blame] | 55 | #include "include/panel_nt35521_wxga_video.h" |
Gustavo Solaira | 80c274c | 2014-10-22 16:21:27 -0300 | [diff] [blame] | 56 | #include "include/panel_samsung_wxga_video.h" |
Gustavo Solaira | 48aa56d | 2014-10-22 16:26:49 -0300 | [diff] [blame] | 57 | #include "include/panel_hx8279a_wsvga_video.h" |
Shuo Yan | a935c30 | 2015-01-06 18:23:24 +0800 | [diff] [blame] | 58 | #include "include/panel_r61318_hd_video.h" |
Shuo Yan | 959d5c1 | 2015-01-21 17:31:30 +0800 | [diff] [blame] | 59 | #include "include/panel_r63417_1080p_video.h" |
Vineet Bajaj | cc9f057 | 2015-02-02 13:54:10 +0530 | [diff] [blame] | 60 | #include "include/panel_jdi_a216_fhd_video.h" |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 61 | |
| 62 | #define DISPLAY_MAX_PANEL_DETECTION 2 |
Shuo Yan | 4f57eb2 | 2014-05-27 10:57:17 +0800 | [diff] [blame] | 63 | #define OTM8019A_FWVGA_VIDEO_PANEL_ON_DELAY 50 |
Padmanabhan Komanduru | 21e465e | 2014-09-01 13:51:38 +0530 | [diff] [blame] | 64 | #define NT35590_720P_CMD_PANEL_ON_DELAY 40 |
Gustavo Solaira | 80c274c | 2014-10-22 16:21:27 -0300 | [diff] [blame] | 65 | #define SAMSUNG_WXGA_VIDEO_PANEL_ON_DELAY 100 |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 66 | |
| 67 | /*---------------------------------------------------------------------------*/ |
| 68 | /* static panel selection variable */ |
| 69 | /*---------------------------------------------------------------------------*/ |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 70 | static uint32_t auto_pan_loop = 0; |
| 71 | |
Padmanabhan Komanduru | b088f92 | 2014-10-28 23:55:20 +0530 | [diff] [blame] | 72 | uint32_t panel_regulator_settings[] = { |
| 73 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
| 74 | }; |
| 75 | |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 76 | /* |
| 77 | * The list of panels that are supported on this target. |
| 78 | * Any panel in this list can be selected using fastboot oem command. |
| 79 | */ |
| 80 | static struct panel_list supp_panels[] = { |
| 81 | {"jdi_1080p_video", JDI_1080P_VIDEO_PANEL}, |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 82 | {"nt35590_720p_video", NT35590_720P_VIDEO_PANEL}, |
| 83 | {"nt35590_720p_cmd", NT35590_720P_CMD_PANEL}, |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 84 | {"innolux_720p_video", INNOLUX_720P_VIDEO_PANEL}, |
Shuo Yan | 40c660c | 2014-04-24 15:58:43 +0800 | [diff] [blame] | 85 | {"otm8019a_fwvga_video", OTM8019A_FWVGA_VIDEO_PANEL}, |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 86 | {"otm1283a_720p_video", OTM1283A_720P_VIDEO_PANEL}, |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 87 | {"nt35596_1080p_video", NT35596_1080P_VIDEO_PANEL}, |
Vineet Bajaj | 7339d0b | 2014-07-24 21:51:44 +0530 | [diff] [blame] | 88 | {"sharp_wqxga_dualdsi_video",SHARP_WQXGA_DUALDSI_VIDEO_PANEL}, |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 89 | {"jdi_fhd_video", JDI_FHD_VIDEO_PANEL}, |
| 90 | {"hx8379a_wvga_video", HX8379A_FWVGA_VIDEO_PANEL}, |
Gustavo Solaira | fb6fdd6 | 2014-09-30 08:15:32 -0300 | [diff] [blame] | 91 | {"hx8394d_720p_video", HX8394D_720P_VIDEO_PANEL}, |
Gustavo Solaira | 80c274c | 2014-10-22 16:21:27 -0300 | [diff] [blame] | 92 | {"nt35521_wxga_video", NT35521_WXGA_VIDEO_PANEL}, |
Gustavo Solaira | 48aa56d | 2014-10-22 16:26:49 -0300 | [diff] [blame] | 93 | {"samsung_wxga_video", SAMSUNG_WXGA_VIDEO_PANEL}, |
Shuo Yan | a935c30 | 2015-01-06 18:23:24 +0800 | [diff] [blame] | 94 | {"hx8279a_wsvga_video", HX8279A_WSVGA_VIDEO_PANEL}, |
| 95 | {"r61318_hd_video", R61318_HD_VIDEO_PANEL}, |
Shuo Yan | 959d5c1 | 2015-01-21 17:31:30 +0800 | [diff] [blame] | 96 | {"r63417_1080p_video", R63417_1080P_VIDEO_PANEL}, |
Vineet Bajaj | cc9f057 | 2015-02-02 13:54:10 +0530 | [diff] [blame] | 97 | {"jdi_a216_fhd_video", JDI_A216_FHD_VIDEO_PANEL}, |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 98 | }; |
| 99 | |
| 100 | static uint32_t panel_id; |
| 101 | |
| 102 | int oem_panel_rotation() |
| 103 | { |
| 104 | return NO_ERROR; |
| 105 | } |
| 106 | |
| 107 | int oem_panel_on() |
| 108 | { |
Shuo Yan | 4f57eb2 | 2014-05-27 10:57:17 +0800 | [diff] [blame] | 109 | /* |
Padmanabhan Komanduru | 21e465e | 2014-09-01 13:51:38 +0530 | [diff] [blame] | 110 | *OEM can keep their panel specific on instructions in this |
Shuo Yan | 4f57eb2 | 2014-05-27 10:57:17 +0800 | [diff] [blame] | 111 | *function |
| 112 | */ |
| 113 | if (panel_id == OTM8019A_FWVGA_VIDEO_PANEL) { |
| 114 | /* needs extra delay to avoid unexpected artifacts */ |
| 115 | mdelay(OTM8019A_FWVGA_VIDEO_PANEL_ON_DELAY); |
Padmanabhan Komanduru | 21e465e | 2014-09-01 13:51:38 +0530 | [diff] [blame] | 116 | } else if (panel_id == NT35590_720P_CMD_PANEL) { |
| 117 | /* needs extra delay to avoid snow screen artifacts */ |
| 118 | mdelay(NT35590_720P_CMD_PANEL_ON_DELAY); |
Gustavo Solaira | 80c274c | 2014-10-22 16:21:27 -0300 | [diff] [blame] | 119 | } else if (panel_id == SAMSUNG_WXGA_VIDEO_PANEL) { |
| 120 | /* needs extra delay to avoid unexpected artifacts */ |
| 121 | mdelay(SAMSUNG_WXGA_VIDEO_PANEL_ON_DELAY); |
Shuo Yan | 4f57eb2 | 2014-05-27 10:57:17 +0800 | [diff] [blame] | 122 | } |
| 123 | |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 124 | return NO_ERROR; |
| 125 | } |
| 126 | |
| 127 | int oem_panel_off() |
| 128 | { |
| 129 | /* OEM can keep their panel specific off instructions |
| 130 | * in this function |
| 131 | */ |
| 132 | return NO_ERROR; |
| 133 | } |
| 134 | |
Kuogee Hsieh | 80b8a6c | 2014-06-09 17:25:38 -0700 | [diff] [blame] | 135 | static int init_panel_data(struct panel_struct *panelstruct, |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 136 | struct msm_panel_info *pinfo, |
| 137 | struct mdss_dsi_phy_ctrl *phy_db) |
| 138 | { |
Kuogee Hsieh | 80b8a6c | 2014-06-09 17:25:38 -0700 | [diff] [blame] | 139 | int pan_type = PANEL_TYPE_DSI; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 140 | |
| 141 | switch (panel_id) { |
| 142 | case JDI_1080P_VIDEO_PANEL: |
| 143 | panelstruct->paneldata = &jdi_1080p_video_panel_data; |
| 144 | panelstruct->paneldata->panel_with_enable_gpio = 1; |
| 145 | panelstruct->panelres = &jdi_1080p_video_panel_res; |
| 146 | panelstruct->color = &jdi_1080p_video_color; |
| 147 | panelstruct->videopanel = &jdi_1080p_video_video_panel; |
| 148 | panelstruct->commandpanel = &jdi_1080p_video_command_panel; |
| 149 | panelstruct->state = &jdi_1080p_video_state; |
| 150 | panelstruct->laneconfig = &jdi_1080p_video_lane_config; |
| 151 | panelstruct->paneltiminginfo |
| 152 | = &jdi_1080p_video_timing_info; |
| 153 | panelstruct->panelresetseq |
| 154 | = &jdi_1080p_video_panel_reset_seq; |
| 155 | panelstruct->backlightinfo = &jdi_1080p_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 156 | pinfo->mipi.panel_on_cmds |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 157 | = jdi_1080p_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 158 | pinfo->mipi.num_of_panel_on_cmds |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 159 | = JDI_1080P_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 160 | pinfo->mipi.panel_off_cmds |
| 161 | = jdi_1080p_video_off_command; |
| 162 | pinfo->mipi.num_of_panel_off_cmds |
| 163 | = JDI_1080P_VIDEO_OFF_COMMAND; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 164 | memcpy(phy_db->timing, |
| 165 | jdi_1080p_video_timings, TIMING_SIZE); |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 166 | pinfo->mipi.signature = JDI_1080P_VIDEO_SIGNATURE; |
| 167 | break; |
| 168 | case NT35590_720P_VIDEO_PANEL: |
| 169 | panelstruct->paneldata = &nt35590_720p_video_panel_data; |
| 170 | panelstruct->panelres = &nt35590_720p_video_panel_res; |
| 171 | panelstruct->color = &nt35590_720p_video_color; |
| 172 | panelstruct->videopanel = &nt35590_720p_video_video_panel; |
| 173 | panelstruct->commandpanel = &nt35590_720p_video_command_panel; |
| 174 | panelstruct->state = &nt35590_720p_video_state; |
| 175 | panelstruct->laneconfig = &nt35590_720p_video_lane_config; |
| 176 | panelstruct->paneltiminginfo |
| 177 | = &nt35590_720p_video_timing_info; |
| 178 | panelstruct->panelresetseq |
| 179 | = &nt35590_720p_video_panel_reset_seq; |
| 180 | panelstruct->backlightinfo = &nt35590_720p_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 181 | pinfo->mipi.panel_on_cmds |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 182 | = nt35590_720p_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 183 | pinfo->mipi.num_of_panel_on_cmds |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 184 | = NT35590_720P_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 185 | pinfo->mipi.panel_off_cmds |
| 186 | = nt35590_720p_video_off_command; |
| 187 | pinfo->mipi.num_of_panel_off_cmds |
| 188 | = NT35590_720P_VIDEO_OFF_COMMAND; |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 189 | memcpy(phy_db->timing, |
| 190 | nt35590_720p_video_timings, TIMING_SIZE); |
| 191 | pinfo->mipi.signature = NT35590_720P_VIDEO_SIGNATURE; |
| 192 | break; |
| 193 | case NT35590_720P_CMD_PANEL: |
| 194 | panelstruct->paneldata = &nt35590_720p_cmd_panel_data; |
| 195 | panelstruct->panelres = &nt35590_720p_cmd_panel_res; |
| 196 | panelstruct->color = &nt35590_720p_cmd_color; |
| 197 | panelstruct->videopanel = &nt35590_720p_cmd_video_panel; |
| 198 | panelstruct->commandpanel = &nt35590_720p_cmd_command_panel; |
| 199 | panelstruct->state = &nt35590_720p_cmd_state; |
| 200 | panelstruct->laneconfig = &nt35590_720p_cmd_lane_config; |
| 201 | panelstruct->paneltiminginfo = &nt35590_720p_cmd_timing_info; |
| 202 | panelstruct->panelresetseq |
| 203 | = &nt35590_720p_cmd_panel_reset_seq; |
| 204 | panelstruct->backlightinfo = &nt35590_720p_cmd_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 205 | pinfo->mipi.panel_on_cmds |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 206 | = nt35590_720p_cmd_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 207 | pinfo->mipi.num_of_panel_on_cmds |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 208 | = NT35590_720P_CMD_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 209 | pinfo->mipi.panel_off_cmds |
| 210 | = nt35590_720p_cmd_off_command; |
| 211 | pinfo->mipi.num_of_panel_off_cmds |
| 212 | = NT35590_720P_CMD_OFF_COMMAND; |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 213 | memcpy(phy_db->timing, |
| 214 | nt35590_720p_cmd_timings, TIMING_SIZE); |
| 215 | pinfo->mipi.signature = NT35590_720P_CMD_SIGNATURE; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 216 | break; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 217 | case INNOLUX_720P_VIDEO_PANEL: |
| 218 | panelstruct->paneldata = &innolux_720p_video_panel_data; |
| 219 | panelstruct->panelres = &innolux_720p_video_panel_res; |
| 220 | panelstruct->color = &innolux_720p_video_color; |
| 221 | panelstruct->videopanel = &innolux_720p_video_video_panel; |
| 222 | panelstruct->commandpanel = &innolux_720p_video_command_panel; |
| 223 | panelstruct->state = &innolux_720p_video_state; |
| 224 | panelstruct->laneconfig = &innolux_720p_video_lane_config; |
| 225 | panelstruct->paneltiminginfo |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 226 | = &innolux_720p_video_timing_info; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 227 | panelstruct->panelresetseq |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 228 | = &innolux_720p_video_reset_seq; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 229 | panelstruct->backlightinfo = &innolux_720p_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 230 | pinfo->mipi.panel_on_cmds |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 231 | = innolux_720p_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 232 | pinfo->mipi.num_of_panel_on_cmds |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 233 | = INNOLUX_720P_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 234 | pinfo->mipi.panel_off_cmds |
| 235 | = innolux_720p_video_off_command; |
| 236 | pinfo->mipi.num_of_panel_off_cmds |
| 237 | = INNOLUX_720P_VIDEO_OFF_COMMAND; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 238 | memcpy(phy_db->timing, |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 239 | innolux_720p_video_timings, TIMING_SIZE); |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 240 | break; |
Shuo Yan | 40c660c | 2014-04-24 15:58:43 +0800 | [diff] [blame] | 241 | case OTM8019A_FWVGA_VIDEO_PANEL: |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 242 | panelstruct->paneldata = &otm8019a_fwvga_video_panel_data; |
| 243 | panelstruct->panelres = &otm8019a_fwvga_video_panel_res; |
| 244 | panelstruct->color = &otm8019a_fwvga_video_color; |
| 245 | panelstruct->videopanel = &otm8019a_fwvga_video_video_panel; |
| 246 | panelstruct->commandpanel = &otm8019a_fwvga_video_command_panel; |
| 247 | panelstruct->state = &otm8019a_fwvga_video_state; |
| 248 | panelstruct->laneconfig = &otm8019a_fwvga_video_lane_config; |
| 249 | panelstruct->paneltiminginfo |
| 250 | = &otm8019a_fwvga_video_timing_info; |
| 251 | panelstruct->panelresetseq |
| 252 | = &otm8019a_fwvga_video_reset_seq; |
| 253 | panelstruct->backlightinfo = &otm8019a_fwvga_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 254 | pinfo->mipi.panel_on_cmds |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 255 | = otm8019a_fwvga_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 256 | pinfo->mipi.num_of_panel_on_cmds |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 257 | = OTM8019A_FWVGA_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 258 | pinfo->mipi.panel_off_cmds |
| 259 | = otm8019a_fwvga_video_off_command; |
| 260 | pinfo->mipi.num_of_panel_off_cmds |
| 261 | = OTM8019A_FWVGA_VIDEO_OFF_COMMAND; |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 262 | memcpy(phy_db->timing, |
| 263 | otm8019a_fwvga_video_timings, TIMING_SIZE); |
| 264 | break; |
| 265 | case OTM1283A_720P_VIDEO_PANEL: |
| 266 | panelstruct->paneldata = &otm1283a_720p_video_panel_data; |
| 267 | panelstruct->panelres = &otm1283a_720p_video_panel_res; |
| 268 | panelstruct->color = &otm1283a_720p_video_color; |
| 269 | panelstruct->videopanel = &otm1283a_720p_video_video_panel; |
| 270 | panelstruct->commandpanel = &otm1283a_720p_video_command_panel; |
| 271 | panelstruct->state = &otm1283a_720p_video_state; |
| 272 | panelstruct->laneconfig = &otm1283a_720p_video_lane_config; |
| 273 | panelstruct->paneltiminginfo |
| 274 | = &otm1283a_720p_video_timing_info; |
| 275 | panelstruct->panelresetseq |
| 276 | = &otm1283a_720p_video_reset_seq; |
| 277 | panelstruct->backlightinfo = &otm1283a_720p_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 278 | pinfo->mipi.panel_on_cmds |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 279 | = otm1283a_720p_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 280 | pinfo->mipi.num_of_panel_on_cmds |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 281 | = OTM1283A_720P_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 282 | pinfo->mipi.panel_off_cmds |
| 283 | = otm1283a_720p_video_off_command; |
| 284 | pinfo->mipi.num_of_panel_off_cmds |
| 285 | = OTM1283A_720P_VIDEO_OFF_COMMAND; |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 286 | memcpy(phy_db->timing, |
| 287 | otm1283a_720p_video_timings, TIMING_SIZE); |
| 288 | break; |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 289 | case NT35596_1080P_VIDEO_PANEL: |
| 290 | panelstruct->paneldata = &nt35596_1080p_skuk_video_panel_data; |
| 291 | panelstruct->panelres = &nt35596_1080p_skuk_video_panel_res; |
| 292 | panelstruct->color = &nt35596_1080p_skuk_video_color; |
| 293 | panelstruct->videopanel = &nt35596_1080p_skuk_video_video_panel; |
| 294 | panelstruct->commandpanel = &nt35596_1080p_skuk_video_command_panel; |
| 295 | panelstruct->state = &nt35596_1080p_skuk_video_state; |
| 296 | panelstruct->laneconfig = &nt35596_1080p_skuk_video_lane_config; |
| 297 | panelstruct->paneltiminginfo |
| 298 | = &nt35596_1080p_skuk_video_timing_info; |
| 299 | panelstruct->panelresetseq |
| 300 | = &nt35596_1080p_skuk_video_reset_seq; |
| 301 | panelstruct->backlightinfo = &nt35596_1080p_skuk_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 302 | pinfo->mipi.panel_on_cmds |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 303 | = nt35596_1080p_skuk_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 304 | pinfo->mipi.num_of_panel_on_cmds |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 305 | = NT35596_1080P_SKUK_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 306 | pinfo->mipi.panel_off_cmds |
| 307 | = nt35596_1080p_skuk_video_off_command; |
| 308 | pinfo->mipi.num_of_panel_off_cmds |
| 309 | = NT35596_1080P_SKUK_VIDEO_OFF_COMMAND; |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 310 | memcpy(phy_db->timing, |
| 311 | nt35596_1080p_skuk_video_timings, TIMING_SIZE); |
| 312 | break; |
Vineet Bajaj | 7339d0b | 2014-07-24 21:51:44 +0530 | [diff] [blame] | 313 | case SHARP_WQXGA_DUALDSI_VIDEO_PANEL: |
| 314 | panelstruct->paneldata = &sharp_wqxga_dualdsi_video_panel_data; |
| 315 | panelstruct->panelres = &sharp_wqxga_dualdsi_video_panel_res; |
| 316 | panelstruct->color = &sharp_wqxga_dualdsi_video_color; |
| 317 | panelstruct->videopanel = &sharp_wqxga_dualdsi_video_video_panel; |
| 318 | panelstruct->commandpanel = &sharp_wqxga_dualdsi_video_command_panel; |
| 319 | panelstruct->state = &sharp_wqxga_dualdsi_video_state; |
| 320 | panelstruct->laneconfig = &sharp_wqxga_dualdsi_video_lane_config; |
| 321 | panelstruct->paneltiminginfo |
| 322 | = &sharp_wqxga_dualdsi_video_timing_info; |
| 323 | panelstruct->panelresetseq |
| 324 | = &sharp_wqxga_dualdsi_video_reset_seq; |
| 325 | panelstruct->backlightinfo = &sharp_wqxga_dualdsi_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 326 | pinfo->mipi.panel_on_cmds |
Vineet Bajaj | 7339d0b | 2014-07-24 21:51:44 +0530 | [diff] [blame] | 327 | = sharp_wqxga_dualdsi_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 328 | pinfo->mipi.num_of_panel_on_cmds |
Vineet Bajaj | 7339d0b | 2014-07-24 21:51:44 +0530 | [diff] [blame] | 329 | = SHARP_WQXGA_DUALDSI_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 330 | pinfo->mipi.panel_off_cmds |
| 331 | = sharp_wqxga_dualdsi_video_off_command; |
| 332 | pinfo->mipi.num_of_panel_off_cmds |
| 333 | = SHARP_WQXGA_DUALDSI_VIDEO_OFF_COMMAND; |
Vineet Bajaj | 7339d0b | 2014-07-24 21:51:44 +0530 | [diff] [blame] | 334 | memcpy(phy_db->timing, |
| 335 | sharp_wqxga_dualdsi_video_timings, TIMING_SIZE); |
| 336 | pinfo->mipi.signature = SHARP_WQXGA_DUALDSI_VIDEO_SIGNATURE; |
| 337 | break; |
Vineet Bajaj | f4fcc71 | 2014-08-04 17:38:55 +0530 | [diff] [blame] | 338 | case JDI_FHD_VIDEO_PANEL: |
| 339 | panelstruct->paneldata = &jdi_fhd_video_panel_data; |
| 340 | panelstruct->panelres = &jdi_fhd_video_panel_res; |
| 341 | panelstruct->color = &jdi_fhd_video_color; |
| 342 | panelstruct->videopanel = &jdi_fhd_video_video_panel; |
| 343 | panelstruct->commandpanel = &jdi_fhd_video_command_panel; |
| 344 | panelstruct->state = &jdi_fhd_video_state; |
| 345 | panelstruct->laneconfig = &jdi_fhd_video_lane_config; |
| 346 | panelstruct->paneltiminginfo |
| 347 | = &jdi_fhd_video_timing_info; |
| 348 | panelstruct->panelresetseq |
| 349 | = &jdi_fhd_video_reset_seq; |
| 350 | panelstruct->backlightinfo = &jdi_fhd_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 351 | pinfo->mipi.panel_on_cmds |
Vineet Bajaj | f4fcc71 | 2014-08-04 17:38:55 +0530 | [diff] [blame] | 352 | = jdi_fhd_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 353 | pinfo->mipi.num_of_panel_on_cmds |
Vineet Bajaj | f4fcc71 | 2014-08-04 17:38:55 +0530 | [diff] [blame] | 354 | = JDI_FHD_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 355 | pinfo->mipi.panel_off_cmds |
| 356 | = jdi_fhd_video_off_command; |
| 357 | pinfo->mipi.num_of_panel_off_cmds |
| 358 | = JDI_FHD_VIDEO_OFF_COMMAND; |
Vineet Bajaj | f4fcc71 | 2014-08-04 17:38:55 +0530 | [diff] [blame] | 359 | memcpy(phy_db->timing, |
| 360 | jdi_fhd_video_timings, TIMING_SIZE); |
| 361 | break; |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 362 | case HX8379A_FWVGA_VIDEO_PANEL: |
| 363 | panelstruct->paneldata = &hx8379a_fwvga_video_panel_data; |
| 364 | panelstruct->panelres = &hx8379a_fwvga_video_panel_res; |
| 365 | panelstruct->color = &hx8379a_fwvga_video_color; |
| 366 | panelstruct->videopanel = &hx8379a_fwvga_video_video_panel; |
| 367 | panelstruct->commandpanel = &hx8379a_fwvga_video_command_panel; |
| 368 | panelstruct->state = &hx8379a_fwvga_video_state; |
| 369 | panelstruct->laneconfig = &hx8379a_fwvga_video_lane_config; |
| 370 | panelstruct->paneltiminginfo |
| 371 | = &hx8379a_fwvga_video_timing_info; |
| 372 | panelstruct->panelresetseq |
| 373 | = &hx8379a_fwvga_video_reset_seq; |
| 374 | panelstruct->backlightinfo = &hx8379a_fwvga_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 375 | pinfo->mipi.panel_on_cmds |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 376 | = hx8379a_fwvga_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 377 | pinfo->mipi.num_of_panel_on_cmds |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 378 | = HX8379A_FWVGA_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 379 | pinfo->mipi.panel_off_cmds |
| 380 | = hx8379a_fwvga_video_off_command; |
| 381 | pinfo->mipi.num_of_panel_off_cmds |
| 382 | = HX8379A_FWVGA_VIDEO_OFF_COMMAND; |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 383 | memcpy(phy_db->timing, |
| 384 | hx8379a_fwvga_video_timings, TIMING_SIZE); |
| 385 | break; |
Sandeep Panda | 230cb72 | 2014-08-20 11:46:27 +0530 | [diff] [blame] | 386 | case HX8394D_720P_VIDEO_PANEL: |
| 387 | panelstruct->paneldata = &hx8394d_720p_video_panel_data; |
| 388 | panelstruct->panelres = &hx8394d_720p_video_panel_res; |
| 389 | panelstruct->color = &hx8394d_720p_video_color; |
| 390 | panelstruct->videopanel = &hx8394d_720p_video_video_panel; |
| 391 | panelstruct->commandpanel = &hx8394d_720p_video_command_panel; |
| 392 | panelstruct->state = &hx8394d_720p_video_state; |
| 393 | panelstruct->laneconfig = &hx8394d_720p_video_lane_config; |
| 394 | panelstruct->paneltiminginfo |
| 395 | = &hx8394d_720p_video_timing_info; |
| 396 | panelstruct->panelresetseq |
| 397 | = &hx8394d_720p_video_panel_reset_seq; |
| 398 | panelstruct->backlightinfo = &hx8394d_720p_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 399 | pinfo->mipi.panel_on_cmds |
Sandeep Panda | 230cb72 | 2014-08-20 11:46:27 +0530 | [diff] [blame] | 400 | = hx8394d_720p_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 401 | pinfo->mipi.num_of_panel_on_cmds |
Sandeep Panda | 230cb72 | 2014-08-20 11:46:27 +0530 | [diff] [blame] | 402 | = HX8394D_720P_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 403 | pinfo->mipi.panel_off_cmds |
| 404 | = hx8394d_720p_video_off_command; |
| 405 | pinfo->mipi.num_of_panel_off_cmds |
| 406 | = HX8394D_720P_VIDEO_OFF_COMMAND; |
Sandeep Panda | 230cb72 | 2014-08-20 11:46:27 +0530 | [diff] [blame] | 407 | memcpy(phy_db->timing, |
| 408 | hx8394d_720p_video_timings, TIMING_SIZE); |
| 409 | pinfo->mipi.signature = HX8394D_720P_VIDEO_SIGNATURE; |
| 410 | break; |
Gustavo Solaira | fb6fdd6 | 2014-09-30 08:15:32 -0300 | [diff] [blame] | 411 | case NT35521_WXGA_VIDEO_PANEL: |
| 412 | panelstruct->paneldata = &nt35521_wxga_video_panel_data; |
| 413 | panelstruct->panelres = &nt35521_wxga_video_panel_res; |
| 414 | panelstruct->color = &nt35521_wxga_video_color; |
| 415 | panelstruct->videopanel = &nt35521_wxga_video_video_panel; |
| 416 | panelstruct->commandpanel = &nt35521_wxga_video_command_panel; |
| 417 | panelstruct->state = &nt35521_wxga_video_state; |
| 418 | panelstruct->laneconfig = &nt35521_wxga_video_lane_config; |
| 419 | panelstruct->paneltiminginfo |
| 420 | = &nt35521_wxga_video_timing_info; |
| 421 | panelstruct->panelresetseq |
| 422 | = &nt35521_wxga_video_reset_seq; |
| 423 | panelstruct->backlightinfo = &nt35521_wxga_video_backlight; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 424 | pinfo->mipi.panel_on_cmds |
Gustavo Solaira | fb6fdd6 | 2014-09-30 08:15:32 -0300 | [diff] [blame] | 425 | = nt35521_wxga_video_on_command; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 426 | pinfo->mipi.num_of_panel_on_cmds |
Gustavo Solaira | fb6fdd6 | 2014-09-30 08:15:32 -0300 | [diff] [blame] | 427 | = NT35521_WXGA_VIDEO_ON_COMMAND; |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 428 | pinfo->mipi.panel_off_cmds |
| 429 | = nt35521_wxga_video_off_command; |
| 430 | pinfo->mipi.num_of_panel_off_cmds |
| 431 | = NT35521_WXGA_VIDEO_OFF_COMMAND; |
Gustavo Solaira | fb6fdd6 | 2014-09-30 08:15:32 -0300 | [diff] [blame] | 432 | memcpy(phy_db->timing, |
| 433 | nt35521_wxga_video_timings, TIMING_SIZE); |
| 434 | break; |
Gustavo Solaira | 80c274c | 2014-10-22 16:21:27 -0300 | [diff] [blame] | 435 | case SAMSUNG_WXGA_VIDEO_PANEL: |
| 436 | panelstruct->paneldata = &samsung_wxga_video_panel_data; |
| 437 | panelstruct->panelres = &samsung_wxga_video_panel_res; |
| 438 | panelstruct->color = &samsung_wxga_video_color; |
| 439 | panelstruct->videopanel = &samsung_wxga_video_video_panel; |
| 440 | panelstruct->commandpanel = &samsung_wxga_video_command_panel; |
| 441 | panelstruct->state = &samsung_wxga_video_state; |
| 442 | panelstruct->laneconfig = &samsung_wxga_video_lane_config; |
| 443 | panelstruct->paneltiminginfo |
| 444 | = &samsung_wxga_video_timing_info; |
| 445 | panelstruct->panelresetseq |
| 446 | = &samsung_wxga_video_reset_seq; |
| 447 | panelstruct->backlightinfo = &samsung_wxga_video_backlight; |
| 448 | pinfo->mipi.panel_on_cmds |
| 449 | = samsung_wxga_video_on_command; |
| 450 | pinfo->mipi.num_of_panel_on_cmds |
| 451 | = SAMSUNG_WXGA_VIDEO_ON_COMMAND; |
| 452 | pinfo->mipi.panel_off_cmds |
| 453 | = samsung_wxga_video_off_command; |
| 454 | pinfo->mipi.num_of_panel_off_cmds |
| 455 | = SAMSUNG_WXGA_VIDEO_OFF_COMMAND; |
| 456 | memcpy(phy_db->timing, |
| 457 | samsung_wxga_video_timings, TIMING_SIZE); |
| 458 | break; |
Gustavo Solaira | 48aa56d | 2014-10-22 16:26:49 -0300 | [diff] [blame] | 459 | case HX8279A_WSVGA_VIDEO_PANEL: |
| 460 | panelstruct->paneldata = &hx8279a_wsvga_video_panel_data; |
| 461 | panelstruct->panelres = &hx8279a_wsvga_video_panel_res; |
| 462 | panelstruct->color = &hx8279a_wsvga_video_color; |
| 463 | panelstruct->videopanel = &hx8279a_wsvga_video_video_panel; |
| 464 | panelstruct->commandpanel = &hx8279a_wsvga_video_command_panel; |
| 465 | panelstruct->state = &hx8279a_wsvga_video_state; |
| 466 | panelstruct->laneconfig = &hx8279a_wsvga_video_lane_config; |
| 467 | panelstruct->paneltiminginfo |
| 468 | = &hx8279a_wsvga_video_timing_info; |
| 469 | panelstruct->panelresetseq |
| 470 | = &hx8279a_wsvga_video_reset_seq; |
| 471 | panelstruct->backlightinfo = &hx8279a_wsvga_video_backlight; |
| 472 | pinfo->mipi.panel_on_cmds |
| 473 | = hx8279a_wsvga_video_on_command; |
| 474 | pinfo->mipi.num_of_panel_on_cmds |
| 475 | = HX8279A_WSVGA_VIDEO_ON_COMMAND; |
| 476 | pinfo->mipi.panel_off_cmds |
| 477 | = hx8279a_wsvga_video_off_command; |
| 478 | pinfo->mipi.num_of_panel_off_cmds |
| 479 | = HX8279A_WSVGA_VIDEO_OFF_COMMAND; |
| 480 | memcpy(phy_db->timing, |
| 481 | hx8279a_wsvga_video_timings, TIMING_SIZE); |
| 482 | break; |
Shuo Yan | a935c30 | 2015-01-06 18:23:24 +0800 | [diff] [blame] | 483 | case R61318_HD_VIDEO_PANEL: |
| 484 | panelstruct->paneldata = & r61318_hd_video_panel_data; |
| 485 | panelstruct->panelres = & r61318_hd_video_panel_res; |
| 486 | panelstruct->color = & r61318_hd_video_color; |
| 487 | panelstruct->videopanel = & r61318_hd_video_video_panel; |
| 488 | panelstruct->commandpanel = & r61318_hd_video_command_panel; |
| 489 | panelstruct->state = & r61318_hd_video_state; |
| 490 | panelstruct->laneconfig = & r61318_hd_video_lane_config; |
| 491 | panelstruct->paneltiminginfo |
| 492 | = & r61318_hd_video_timing_info; |
| 493 | panelstruct->panelresetseq |
| 494 | = & r61318_hd_video_reset_seq; |
| 495 | panelstruct->backlightinfo = & r61318_hd_video_backlight; |
| 496 | pinfo->mipi.panel_on_cmds |
| 497 | = r61318_hd_video_on_command; |
| 498 | pinfo->mipi.num_of_panel_on_cmds |
| 499 | = R61318_HD_VIDEO_ON_COMMAND; |
| 500 | pinfo->mipi.panel_off_cmds |
| 501 | = r61318_hd_video_off_command; |
| 502 | pinfo->mipi.num_of_panel_off_cmds |
| 503 | = R61318_HD_VIDEO_OFF_COMMAND; |
| 504 | memcpy(phy_db->timing, |
| 505 | r61318_hd_video_timings, TIMING_SIZE); |
| 506 | break; |
Shuo Yan | 959d5c1 | 2015-01-21 17:31:30 +0800 | [diff] [blame] | 507 | case R63417_1080P_VIDEO_PANEL: |
| 508 | panelstruct->paneldata = & r63417_1080p_video_panel_data; |
| 509 | panelstruct->panelres = & r63417_1080p_video_panel_res; |
| 510 | panelstruct->color = & r63417_1080p_video_color; |
| 511 | panelstruct->videopanel = & r63417_1080p_video_video_panel; |
| 512 | panelstruct->commandpanel = & r63417_1080p_video_command_panel; |
| 513 | panelstruct->state = & r63417_1080p_video_state; |
| 514 | panelstruct->laneconfig = & r63417_1080p_video_lane_config; |
| 515 | panelstruct->paneltiminginfo |
| 516 | = & r63417_1080p_video_timing_info; |
| 517 | panelstruct->panelresetseq |
| 518 | = & r63417_1080p_video_reset_seq; |
| 519 | panelstruct->backlightinfo = & r63417_1080p_video_backlight; |
| 520 | pinfo->mipi.panel_on_cmds |
| 521 | = r63417_1080p_video_on_command; |
| 522 | pinfo->mipi.num_of_panel_on_cmds |
| 523 | = R63417_1080P_VIDEO_ON_COMMAND; |
| 524 | pinfo->mipi.panel_off_cmds |
| 525 | = r63417_1080p_video_off_command; |
| 526 | pinfo->mipi.num_of_panel_off_cmds |
| 527 | = R63417_1080P_VIDEO_OFF_COMMAND; |
| 528 | memcpy(phy_db->timing, |
| 529 | r63417_1080p_video_timings, TIMING_SIZE); |
| 530 | break; |
Vineet Bajaj | cc9f057 | 2015-02-02 13:54:10 +0530 | [diff] [blame] | 531 | case JDI_A216_FHD_VIDEO_PANEL: |
| 532 | panelstruct->paneldata = &jdi_a216_fhd_video_panel_data; |
| 533 | panelstruct->panelres = &jdi_a216_fhd_video_panel_res; |
| 534 | panelstruct->color = &jdi_a216_fhd_video_color; |
| 535 | panelstruct->videopanel = &jdi_a216_fhd_video_video_panel; |
| 536 | panelstruct->commandpanel = &jdi_a216_fhd_video_command_panel; |
| 537 | panelstruct->state = &jdi_a216_fhd_video_state; |
| 538 | panelstruct->laneconfig = &jdi_a216_fhd_video_lane_config; |
| 539 | panelstruct->paneltiminginfo |
| 540 | = &jdi_a216_fhd_video_timing_info; |
| 541 | panelstruct->panelresetseq |
| 542 | = &jdi_a216_fhd_video_reset_seq; |
| 543 | panelstruct->backlightinfo = &jdi_a216_fhd_video_backlight; |
| 544 | pinfo->mipi.panel_cmds |
| 545 | = jdi_a216_fhd_video_on_command; |
| 546 | pinfo->mipi.num_of_panel_cmds |
| 547 | = JDI_A216_FHD_VIDEO_ON_COMMAND; |
| 548 | memcpy(phy_db->timing, |
| 549 | jdi_a216_fhd_video_timings, TIMING_SIZE); |
| 550 | break; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 551 | case UNKNOWN_PANEL: |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 552 | default: |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 553 | memset(panelstruct, 0, sizeof(struct panel_struct)); |
Padmanabhan Komanduru | b3d3184 | 2014-11-04 15:47:53 +0530 | [diff] [blame] | 554 | memset(pinfo->mipi.panel_on_cmds, 0, |
| 555 | sizeof(struct mipi_dsi_cmd)); |
| 556 | pinfo->mipi.num_of_panel_on_cmds = 0; |
| 557 | memset(pinfo->mipi.panel_off_cmds, 0, |
| 558 | sizeof(struct mipi_dsi_cmd)); |
| 559 | pinfo->mipi.num_of_panel_off_cmds = 0; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 560 | memset(phy_db->timing, 0, TIMING_SIZE); |
Kuogee Hsieh | 80b8a6c | 2014-06-09 17:25:38 -0700 | [diff] [blame] | 561 | pan_type = PANEL_TYPE_UNKNOWN; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 562 | break; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 563 | } |
Kuogee Hsieh | 80b8a6c | 2014-06-09 17:25:38 -0700 | [diff] [blame] | 564 | return pan_type; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 565 | } |
| 566 | |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 567 | uint32_t oem_panel_max_auto_detect_panels() |
| 568 | { |
| 569 | return target_panel_auto_detect_enabled() ? |
| 570 | DISPLAY_MAX_PANEL_DETECTION : 0; |
| 571 | } |
| 572 | |
Kuogee Hsieh | 80b8a6c | 2014-06-09 17:25:38 -0700 | [diff] [blame] | 573 | int oem_panel_select(const char *panel_name, struct panel_struct *panelstruct, |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 574 | struct msm_panel_info *pinfo, |
| 575 | struct mdss_dsi_phy_ctrl *phy_db) |
| 576 | { |
| 577 | uint32_t hw_id = board_hardware_id(); |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 578 | uint32_t hw_subtype = board_hardware_subtype(); |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 579 | int32_t panel_override_id; |
Mao Flynn | 67d5c59 | 2014-06-17 16:41:02 +0800 | [diff] [blame] | 580 | uint32_t target_id, plat_hw_ver_major; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 581 | |
| 582 | if (panel_name) { |
| 583 | panel_override_id = panel_name_to_id(supp_panels, |
| 584 | ARRAY_SIZE(supp_panels), panel_name); |
| 585 | |
| 586 | if (panel_override_id < 0) { |
| 587 | dprintf(CRITICAL, "Not able to search the panel:%s\n", |
| 588 | panel_name + strspn(panel_name, " ")); |
| 589 | } else if (panel_override_id < UNKNOWN_PANEL) { |
| 590 | /* panel override using fastboot oem command */ |
| 591 | panel_id = panel_override_id; |
| 592 | |
| 593 | dprintf(INFO, "OEM panel override:%s\n", |
| 594 | panel_name + strspn(panel_name, " ")); |
| 595 | goto panel_init; |
| 596 | } |
| 597 | } |
| 598 | |
| 599 | switch (hw_id) { |
| 600 | case HW_PLATFORM_MTP: |
Vineet Bajaj | d3db158 | 2015-02-05 15:55:22 +0530 | [diff] [blame] | 601 | if (platform_is_msm8939() && |
| 602 | hw_subtype == HW_PLATFORM_SUBTYPE_MTP_3) { |
Vineet Bajaj | c122141 | 2014-11-07 18:15:34 +0530 | [diff] [blame] | 603 | panel_id = JDI_FHD_VIDEO_PANEL; |
Vineet Bajaj | d3db158 | 2015-02-05 15:55:22 +0530 | [diff] [blame] | 604 | } else { |
| 605 | panel_id = JDI_1080P_VIDEO_PANEL; |
| 606 | switch (auto_pan_loop) { |
| 607 | case 0: |
| 608 | panel_id = JDI_1080P_VIDEO_PANEL; |
| 609 | break; |
| 610 | case 1: |
| 611 | panel_id = HX8394D_720P_VIDEO_PANEL; |
| 612 | break; |
| 613 | default: |
| 614 | panel_id = UNKNOWN_PANEL; |
| 615 | dprintf(CRITICAL, "Unknown panel\n"); |
| 616 | return PANEL_TYPE_UNKNOWN; |
| 617 | } |
| 618 | auto_pan_loop++; |
| 619 | } |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 620 | break; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 621 | case HW_PLATFORM_SURF: |
Vineet Bajaj | c122141 | 2014-11-07 18:15:34 +0530 | [diff] [blame] | 622 | if (hw_subtype == HW_PLATFORM_SUBTYPE_CDP_1) { |
| 623 | panel_id = JDI_FHD_VIDEO_PANEL; |
Vineet Bajaj | d3d0465 | 2015-02-02 14:43:36 +0530 | [diff] [blame] | 624 | } else if (hw_subtype == HW_PLATFORM_SUBTYPE_CDP_2) { |
| 625 | panel_id = JDI_A216_FHD_VIDEO_PANEL; |
Vineet Bajaj | c122141 | 2014-11-07 18:15:34 +0530 | [diff] [blame] | 626 | } else { |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 627 | panel_id = JDI_1080P_VIDEO_PANEL; |
Vineet Bajaj | c122141 | 2014-11-07 18:15:34 +0530 | [diff] [blame] | 628 | switch (auto_pan_loop) { |
| 629 | case 0: |
| 630 | panel_id = JDI_1080P_VIDEO_PANEL; |
| 631 | break; |
| 632 | case 1: |
| 633 | panel_id = NT35590_720P_VIDEO_PANEL; |
| 634 | break; |
| 635 | default: |
| 636 | panel_id = UNKNOWN_PANEL; |
| 637 | dprintf(CRITICAL, "Unknown panel\n"); |
| 638 | return PANEL_TYPE_UNKNOWN; |
| 639 | } |
| 640 | auto_pan_loop++; |
Padmanabhan Komanduru | 1869a76 | 2014-04-01 20:12:05 +0530 | [diff] [blame] | 641 | } |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 642 | break; |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 643 | case HW_PLATFORM_QRD: |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 644 | target_id = board_target_id(); |
| 645 | plat_hw_ver_major = ((target_id >> 16) & 0xFF); |
| 646 | |
vijay kumar | dd51c59 | 2015-01-05 12:46:28 +0530 | [diff] [blame^] | 647 | if (platform_is_msm8939() || platform_is_msm8929()) { |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 648 | switch (hw_subtype) { |
| 649 | case HW_PLATFORM_SUBTYPE_SKUK: |
Shuo Yan | a935c30 | 2015-01-06 18:23:24 +0800 | [diff] [blame] | 650 | if ((plat_hw_ver_major >> 4) == 0x1) |
| 651 | panel_id = R61318_HD_VIDEO_PANEL; |
Shuo Yan | 959d5c1 | 2015-01-21 17:31:30 +0800 | [diff] [blame] | 652 | else if ((plat_hw_ver_major >> 4) == 0x2) |
| 653 | panel_id = R63417_1080P_VIDEO_PANEL; |
Shuo Yan | a935c30 | 2015-01-06 18:23:24 +0800 | [diff] [blame] | 654 | else |
| 655 | panel_id = NT35596_1080P_VIDEO_PANEL; |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 656 | break; |
| 657 | default: |
| 658 | dprintf(CRITICAL, "Invalid subtype id %d for QRD HW\n", |
| 659 | hw_subtype); |
| 660 | return PANEL_TYPE_UNKNOWN; |
| 661 | } |
| 662 | } else { |
| 663 | switch (hw_subtype) { |
| 664 | case HW_PLATFORM_SUBTYPE_SKUH: |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 665 | /* qrd SKUIC */ |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 666 | if ((plat_hw_ver_major >> 4) == 0x1) |
| 667 | panel_id = OTM1283A_720P_VIDEO_PANEL; |
| 668 | else |
| 669 | panel_id = INNOLUX_720P_VIDEO_PANEL; |
| 670 | break; |
| 671 | case HW_PLATFORM_SUBTYPE_SKUI: |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 672 | /* qrd SKUIC */ |
Shuo Yan | 14ac901 | 2014-09-18 16:39:48 +0800 | [diff] [blame] | 673 | if ((plat_hw_ver_major >> 4) == 0) |
Shuo Yan | 2616adc | 2014-08-13 08:22:27 +0800 | [diff] [blame] | 674 | panel_id = OTM8019A_FWVGA_VIDEO_PANEL; |
Shuo Yan | 14ac901 | 2014-09-18 16:39:48 +0800 | [diff] [blame] | 675 | else |
| 676 | panel_id = HX8379A_FWVGA_VIDEO_PANEL; |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 677 | break; |
Gustavo Solaira | fb6fdd6 | 2014-09-30 08:15:32 -0300 | [diff] [blame] | 678 | case HW_PLATFORM_SUBTYPE_SKUT1: |
Gustavo Solaira | 80c274c | 2014-10-22 16:21:27 -0300 | [diff] [blame] | 679 | if ((plat_hw_ver_major & 0x0F) == 0x1) |
| 680 | /* qrd SKUT1 */ |
| 681 | panel_id = NT35521_WXGA_VIDEO_PANEL; |
Gustavo Solaira | 48aa56d | 2014-10-22 16:26:49 -0300 | [diff] [blame] | 682 | else if ((plat_hw_ver_major & 0x0F) == 0x2) |
Gustavo Solaira | 80c274c | 2014-10-22 16:21:27 -0300 | [diff] [blame] | 683 | /* qrd SKUT2 */ |
| 684 | panel_id = SAMSUNG_WXGA_VIDEO_PANEL; |
Gustavo Solaira | 48aa56d | 2014-10-22 16:26:49 -0300 | [diff] [blame] | 685 | else if ((plat_hw_ver_major & 0x0F) == 0x3) |
| 686 | /* qrd SKUT3 */ |
| 687 | panel_id = HX8279A_WSVGA_VIDEO_PANEL; |
Gustavo Solaira | fb6fdd6 | 2014-09-30 08:15:32 -0300 | [diff] [blame] | 688 | break; |
Mao Flynn | 732e3c2 | 2014-07-02 17:39:02 +0800 | [diff] [blame] | 689 | default: |
| 690 | dprintf(CRITICAL, "Invalid subtype id %d for QRD HW\n", |
| 691 | hw_subtype); |
| 692 | return PANEL_TYPE_UNKNOWN; |
| 693 | } |
Mao Flynn | 8140947 | 2014-04-10 15:01:30 +0800 | [diff] [blame] | 694 | } |
| 695 | break; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 696 | default: |
| 697 | dprintf(CRITICAL, "Display not enabled for %d HW type\n", |
| 698 | hw_id); |
Kuogee Hsieh | 80b8a6c | 2014-06-09 17:25:38 -0700 | [diff] [blame] | 699 | return PANEL_TYPE_UNKNOWN; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 700 | } |
| 701 | |
| 702 | panel_init: |
Padmanabhan Komanduru | b088f92 | 2014-10-28 23:55:20 +0530 | [diff] [blame] | 703 | /* |
| 704 | * Update all data structures after 'panel_init' label. Only panel |
| 705 | * selection is supposed to happen before that. |
| 706 | */ |
vijay kumar | dd51c59 | 2015-01-05 12:46:28 +0530 | [diff] [blame^] | 707 | if (platform_is_msm8939() || platform_is_msm8929() || (hw_id == HW_PLATFORM_QRD)) { |
Radhika Ranjan Soni | 7ea9855 | 2014-06-11 17:01:12 +0530 | [diff] [blame] | 708 | phy_db->regulator_mode = DSI_PHY_REGULATOR_LDO_MODE; |
Padmanabhan Komanduru | b088f92 | 2014-10-28 23:55:20 +0530 | [diff] [blame] | 709 | memcpy(panel_regulator_settings, |
| 710 | ldo_regulator_settings, REGULATOR_SIZE); |
| 711 | } else { |
| 712 | memcpy(panel_regulator_settings, |
| 713 | dcdc_regulator_settings, REGULATOR_SIZE); |
| 714 | } |
Radhika Ranjan Soni | 7ea9855 | 2014-06-11 17:01:12 +0530 | [diff] [blame] | 715 | |
Jayant Shekhar | b130da2 | 2014-05-29 12:47:51 +0530 | [diff] [blame] | 716 | pinfo->pipe_type = MDSS_MDP_PIPE_TYPE_RGB; |
Padmanabhan Komanduru | cd5645e | 2014-03-25 20:34:18 +0530 | [diff] [blame] | 717 | return init_panel_data(panelstruct, pinfo, phy_db); |
| 718 | } |