Jayant Shekhar | 0e0a577 | 2016-01-19 12:46:11 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. |
Padmanabhan Komanduru | ba17e05 | 2015-02-27 18:39: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 | #ifndef _PANEL_TRULY_1080P_VIDEO_H_ |
| 31 | |
| 32 | #define _PANEL_TRULY_1080P_VIDEO_H_ |
| 33 | /*---------------------------------------------------------------------------*/ |
| 34 | /* HEADER files */ |
| 35 | /*---------------------------------------------------------------------------*/ |
| 36 | #include "panel.h" |
| 37 | |
| 38 | /*---------------------------------------------------------------------------*/ |
| 39 | /* Panel configuration */ |
| 40 | /*---------------------------------------------------------------------------*/ |
| 41 | |
| 42 | static struct panel_config truly_1080p_video_panel_data = { |
| 43 | "qcom,mdss_dsi_truly_1080p_video", "dsi:0:", "qcom,mdss-dsi-panel", |
| 44 | 10, 0, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, NULL |
| 45 | }; |
| 46 | |
| 47 | /*---------------------------------------------------------------------------*/ |
| 48 | /* Panel resolution */ |
| 49 | /*---------------------------------------------------------------------------*/ |
| 50 | static struct panel_resolution truly_1080p_video_panel_res = { |
| 51 | 1080, 1920, 96, 64, 16, 0, 4, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| 52 | }; |
| 53 | |
| 54 | /*---------------------------------------------------------------------------*/ |
| 55 | /* Panel Color Information */ |
| 56 | /*---------------------------------------------------------------------------*/ |
| 57 | static struct color_info truly_1080p_video_color = { |
| 58 | 24, 0, 0xff, 0, 0, 0 |
| 59 | }; |
| 60 | |
| 61 | /*---------------------------------------------------------------------------*/ |
| 62 | /* Panel Command information */ |
| 63 | /*---------------------------------------------------------------------------*/ |
| 64 | static char truly_1080p_video_on_cmd0[] = { |
| 65 | 0x35, 0x00, 0x015, 0x80, }; |
| 66 | |
| 67 | |
| 68 | static char truly_1080p_video_on_cmd1[] = { |
| 69 | 0x51, 0xff, 0x15, 0x80, }; |
| 70 | |
| 71 | |
| 72 | static char truly_1080p_video_on_cmd2[] = { |
| 73 | 0x53, 0x2c, 0x15, 0x80, }; |
| 74 | |
| 75 | |
| 76 | static char truly_1080p_video_on_cmd3[] = { |
Sandeep Panda | 9c9fc31 | 2015-06-30 16:20:30 +0530 | [diff] [blame] | 77 | 0x55, 0x00, 0x15, 0x80, }; |
Padmanabhan Komanduru | ba17e05 | 2015-02-27 18:39:18 +0530 | [diff] [blame] | 78 | |
| 79 | |
| 80 | static char truly_1080p_video_on_cmd4[] = { |
Sandeep Panda | 9c9fc31 | 2015-06-30 16:20:30 +0530 | [diff] [blame] | 81 | 0x11, 0x00, 0x05, 0x80, }; |
Padmanabhan Komanduru | ba17e05 | 2015-02-27 18:39:18 +0530 | [diff] [blame] | 82 | |
| 83 | |
| 84 | static char truly_1080p_video_on_cmd5[] = { |
| 85 | 0xb0, 0x00, 0x23, 0x80, }; |
| 86 | |
| 87 | |
| 88 | static char truly_1080p_video_on_cmd6[] = { |
| 89 | 0x07, 0x00, 0x29, 0xC0, |
| 90 | 0xb3, 0x14, 0x00, 0x00, |
| 91 | 0x00, 0x00, 0x00, 0xFF, }; |
| 92 | |
| 93 | |
| 94 | static char truly_1080p_video_on_cmd7[] = { |
| 95 | 0x03, 0x00, 0x29, 0xC0, |
| 96 | 0xb6, 0x3a, 0xd3, 0xFF, }; |
| 97 | |
| 98 | |
| 99 | static char truly_1080p_video_on_cmd8[] = { |
| 100 | 0x03, 0x00, 0x29, 0xc0, |
| 101 | 0xc0, 0x00, 0x00, 0xff, }; |
| 102 | |
| 103 | |
| 104 | static char truly_1080p_video_on_cmd9[] = { |
| 105 | 0x23, 0x00, 0x29, 0xC0, |
| 106 | 0xc1, 0x84, 0x60, 0x10, |
| 107 | 0xeb, 0xff, 0x6f, 0xce, |
| 108 | 0xff, 0xff, 0x17, 0x02, |
| 109 | 0x58, 0x73, 0xae, 0xb1, |
| 110 | 0x20, 0xc6, 0xff, 0xff, |
| 111 | 0x1f, 0xf3, 0xff, 0x5f, |
| 112 | 0x10, 0x10, 0x10, 0x10, |
| 113 | 0x00, 0x02, 0x01, 0x22, |
| 114 | 0x22, 0x00, 0x01, 0xff, }; |
| 115 | |
| 116 | |
| 117 | static char truly_1080p_video_on_cmd10[] = { |
| 118 | 0x08, 0x00, 0x29, 0xC0, |
| 119 | 0xc2, 0x31, 0xf7, 0x80, |
| 120 | 0x06, 0x08, 0x00, 0x00, }; |
| 121 | |
| 122 | |
| 123 | static char truly_1080p_video_on_cmd11[] = { |
| 124 | 0x17, 0x00, 0x29, 0xC0, |
| 125 | 0xc4, 0x70, 0x00, 0x00, |
| 126 | 0x00, 0x00, 0x04, 0x00, |
| 127 | 0x00, 0x00, 0x0c, 0x06, |
| 128 | 0x00, 0x00, 0x00, 0x00, |
| 129 | 0x00, 0x04, 0x00, 0x00, |
| 130 | 0x00, 0x0c, 0x06, 0xff, }; |
| 131 | |
| 132 | |
| 133 | static char truly_1080p_video_on_cmd12[] = { |
| 134 | 0x29, 0x00, 0x29, 0xC0, |
| 135 | 0xc6, 0x00, 0x69, 0x00, |
| 136 | 0x69, 0x00, 0x69, 0x00, |
| 137 | 0x00, 0x00, 0x00, 0x00, |
| 138 | 0x69, 0x00, 0x69, 0x00, |
| 139 | 0x69, 0x10, 0x19, 0x07, |
| 140 | 0x00, 0x01, 0x00, 0x69, |
| 141 | 0x00, 0x69, 0x00, 0x69, |
| 142 | 0x00, 0x00, 0x00, 0x00, |
| 143 | 0x00, 0x69, 0x00, 0x69, |
| 144 | 0x00, 0x69, 0x10, 0x19, |
| 145 | 0x07, 0xff, 0xff, 0xff, }; |
| 146 | |
| 147 | |
| 148 | static char truly_1080p_video_on_cmd13[] = { |
| 149 | 0x0a, 0x00, 0x29, 0xC0, |
| 150 | 0xcb, 0x31, 0xfc, 0x3f, |
| 151 | 0x8c, 0x00, 0x00, 0x00, |
| 152 | 0x00, 0xc0, 0xff, 0xff, }; |
| 153 | |
| 154 | |
| 155 | static char truly_1080p_video_on_cmd14[] = { |
| 156 | 0xcc, 0x0b, 0x23, 0x80, }; |
| 157 | |
| 158 | |
| 159 | static char truly_1080p_video_on_cmd15[] = { |
| 160 | 0x0b, 0x00, 0x29, 0xc0, |
| 161 | 0xd0, 0x11, 0x81, 0xbb, |
| 162 | 0x1e, 0x1e, 0x4c, 0x19, |
| 163 | 0x19, 0x0c, 0x00, 0xff, }; |
| 164 | |
| 165 | |
| 166 | static char truly_1080p_video_on_cmd16[] = { |
| 167 | 0x1a, 0x00, 0x29, 0xC0, |
| 168 | 0xd3, 0x1b, 0x33, 0xbb, |
| 169 | 0xbb, 0xb3, 0x33, 0x33, |
| 170 | 0x33, 0x00, 0x01, 0x00, |
| 171 | 0xa0, 0xd8, 0xa0, 0x0d, |
| 172 | 0x4e, 0x4e, 0x33, 0x3b, |
| 173 | 0x22, 0x72, 0x07, 0x3d, |
| 174 | 0xbf, 0x33, 0xff, 0xff, }; |
| 175 | |
| 176 | |
| 177 | static char truly_1080p_video_on_cmd17[] = { |
| 178 | 0x08, 0x00, 0x29, 0xc0, |
| 179 | 0xd5, 0x06, 0x00, 0x00, |
| 180 | 0x01, 0x51, 0x01, 0x32, }; |
| 181 | |
| 182 | |
| 183 | static char truly_1080p_video_on_cmd18[] = { |
| 184 | 0x1f, 0x00, 0x29, 0xC0, |
| 185 | 0xc7, 0x01, 0x0a, 0x11, |
| 186 | 0x18, 0x26, 0x33, 0x3e, |
| 187 | 0x50, 0x38, 0x42, 0x52, |
| 188 | 0x60, 0x67, 0x6e, 0x77, |
| 189 | 0x01, 0x0a, 0x11, 0x18, |
| 190 | 0x26, 0x33, 0x3e, 0x50, |
| 191 | 0x38, 0x42, 0x52, 0x60, |
| 192 | 0x67, 0x6e, 0x77, 0xff, }; |
| 193 | |
| 194 | |
| 195 | static char truly_1080p_video_on_cmd19[] = { |
| 196 | 0x14, 0x00, 0x29, 0xC0, |
| 197 | 0xc8, 0x01, 0x00, 0x00, |
| 198 | 0x00, 0x00, 0xfc, 0x00, |
| 199 | 0x00, 0x00, 0x00, 0x00, |
| 200 | 0xfc, 0x00, 0x00, 0x00, |
| 201 | 0x00, 0x00, 0xfc, 0x00, }; |
| 202 | |
| 203 | |
| 204 | static char truly_1080p_video_on_cmd20[] = { |
Sandeep Panda | 9c9fc31 | 2015-06-30 16:20:30 +0530 | [diff] [blame] | 205 | 0x29, 0x00, 0x05, 0x80, }; |
Padmanabhan Komanduru | ba17e05 | 2015-02-27 18:39:18 +0530 | [diff] [blame] | 206 | |
| 207 | |
| 208 | static struct mipi_dsi_cmd truly_1080p_video_on_command[] = { |
| 209 | { 0x4 , truly_1080p_video_on_cmd0, 0x00}, |
| 210 | { 0x4 , truly_1080p_video_on_cmd1, 0x00}, |
| 211 | { 0x4 , truly_1080p_video_on_cmd2, 0x00}, |
| 212 | { 0x4 , truly_1080p_video_on_cmd3, 0x00}, |
| 213 | { 0x4 , truly_1080p_video_on_cmd4, 0xc8}, |
| 214 | { 0x4 , truly_1080p_video_on_cmd5, 0x00}, |
| 215 | { 0xc , truly_1080p_video_on_cmd6, 0x00}, |
| 216 | { 0x8 , truly_1080p_video_on_cmd7, 0x00}, |
| 217 | { 0x8 , truly_1080p_video_on_cmd8, 0x00}, |
| 218 | { 0x28 , truly_1080p_video_on_cmd9, 0x00}, |
| 219 | { 0xc , truly_1080p_video_on_cmd10, 0x00}, |
| 220 | { 0x1c , truly_1080p_video_on_cmd11, 0x00}, |
| 221 | { 0x30 , truly_1080p_video_on_cmd12, 0x00}, |
| 222 | { 0x10 , truly_1080p_video_on_cmd13, 0x00}, |
| 223 | { 0x4 , truly_1080p_video_on_cmd14, 0x00}, |
| 224 | { 0x10 , truly_1080p_video_on_cmd15, 0x00}, |
| 225 | { 0x20 , truly_1080p_video_on_cmd16, 0x00}, |
| 226 | { 0xc , truly_1080p_video_on_cmd17, 0x00}, |
| 227 | { 0x24 , truly_1080p_video_on_cmd18, 0x00}, |
| 228 | { 0x18 , truly_1080p_video_on_cmd19, 0xc8}, |
| 229 | { 0x4 , truly_1080p_video_on_cmd20, 0xc8}, |
| 230 | }; |
| 231 | #define TRULY_1080P_VIDEO_ON_COMMAND 21 |
| 232 | |
| 233 | |
| 234 | static char truly_1080p_video_off_cmd0[] = { |
| 235 | 0x28, 0x00, 0x05, 0x80 }; |
| 236 | |
| 237 | |
| 238 | static char truly_1080p_video_off_cmd1[] = { |
| 239 | 0x10, 0x00, 0x05, 0x80 }; |
| 240 | |
| 241 | |
| 242 | static struct mipi_dsi_cmd truly_1080p_video_off_command[] = { |
| 243 | { 0x4 , truly_1080p_video_off_cmd0, 0x0}, |
| 244 | { 0x4 , truly_1080p_video_off_cmd1, 0x0} |
| 245 | }; |
| 246 | #define TRULY_1080P_VIDEO_OFF_COMMAND 2 |
| 247 | |
| 248 | |
| 249 | static struct command_state truly_1080p_video_state = { |
| 250 | 0, 1 |
| 251 | }; |
| 252 | |
| 253 | /*---------------------------------------------------------------------------*/ |
| 254 | /* Command mode panel information */ |
| 255 | /*---------------------------------------------------------------------------*/ |
| 256 | |
| 257 | static struct commandpanel_info truly_1080p_video_command_panel = { |
| 258 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| 259 | }; |
| 260 | |
| 261 | /*---------------------------------------------------------------------------*/ |
| 262 | /* Video mode panel information */ |
| 263 | /*---------------------------------------------------------------------------*/ |
| 264 | |
| 265 | static struct videopanel_info truly_1080p_video_video_panel = { |
| 266 | 0, 0, 0, 0, 1, 1, 1, 0, 0x9 |
| 267 | }; |
| 268 | |
| 269 | /*---------------------------------------------------------------------------*/ |
| 270 | /* Lane Configuration */ |
| 271 | /*---------------------------------------------------------------------------*/ |
| 272 | |
| 273 | static struct lane_configuration truly_1080p_video_lane_config = { |
| 274 | 4, 0, 1, 1, 1, 1, 0 |
| 275 | }; |
| 276 | |
| 277 | |
| 278 | /*---------------------------------------------------------------------------*/ |
| 279 | /* Panel Timing */ |
| 280 | /*---------------------------------------------------------------------------*/ |
| 281 | const uint32_t truly_1080p_video_timings[] = { |
| 282 | 0xE6, 0x38, 0x26, 0x00, 0x68, 0x6e, 0x2A, 0x3c, 0x44, 0x03, 0x04, 0x00 |
| 283 | }; |
| 284 | |
Jayant Shekhar | 0e0a577 | 2016-01-19 12:46:11 +0530 | [diff] [blame] | 285 | static const uint32_t truly_1080p_14nm_video_timings[] = { |
| 286 | 0x23, 0x1e, 0x8, 0x9, 0x5, 0x3, 0x4, 0xa0, |
| 287 | 0x23, 0x1e, 0x8, 0x9, 0x5, 0x3, 0x4, 0xa0, |
| 288 | 0x23, 0x1e, 0x8, 0x9, 0x5, 0x3, 0x4, 0xa0, |
| 289 | 0x23, 0x1e, 0x8, 0x9, 0x5, 0x3, 0x4, 0xa0, |
| 290 | 0x23, 0x1a, 0x8, 0x9, 0x5, 0x3, 0x4, 0xa0, |
| 291 | }; |
| 292 | |
Padmanabhan Komanduru | ba17e05 | 2015-02-27 18:39:18 +0530 | [diff] [blame] | 293 | static struct panel_timing truly_1080p_video_timing_info = { |
| 294 | 0, 4, 0x02, 0x2d |
| 295 | }; |
| 296 | |
| 297 | static struct panel_reset_sequence truly_1080p_video_panel_reset_seq = { |
| 298 | { 1, 0, 1, }, { 200, 200, 200, }, 2 |
| 299 | }; |
| 300 | |
| 301 | /*---------------------------------------------------------------------------*/ |
Padmanabhan Komanduru | 9acf5a6 | 2016-01-22 16:34:40 +0530 | [diff] [blame] | 302 | /* Dynamic fps supported frequencies by panel */ |
| 303 | /*---------------------------------------------------------------------------*/ |
| 304 | static const struct dfps_panel_info truly_1080p_video_dfps = { |
Padmanabhan Komanduru | bf4f540 | 2016-02-11 18:59:31 +0530 | [diff] [blame^] | 305 | 1, 10, {48, 49, 50, 51, 52, 54, 56, 57, 58, 60} |
Padmanabhan Komanduru | 9acf5a6 | 2016-01-22 16:34:40 +0530 | [diff] [blame] | 306 | }; |
| 307 | |
| 308 | /*---------------------------------------------------------------------------*/ |
Padmanabhan Komanduru | ba17e05 | 2015-02-27 18:39:18 +0530 | [diff] [blame] | 309 | /* Backlight Settings */ |
| 310 | /*---------------------------------------------------------------------------*/ |
| 311 | |
| 312 | static struct backlight truly_1080p_video_backlight = { |
| 313 | 1, 1, 4095, 100, 1, "PMIC_8941" |
| 314 | }; |
| 315 | |
| 316 | #define TRULY_1080P_VIDEO_SIGNATURE 0xFFFF |
| 317 | |
| 318 | #endif /*_TRULY_1080P_VIDEO_H_*/ |