Shuo Yan | df53bef | 2015-01-06 18:22:19 +0800 | [diff] [blame] | 1 | /* Copyright (c) 2015, The Linux Foundation. All rights reserved. |
| 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 | /*--------------------------------------------------------------------------- |
| 31 | * This file is autogenerated file using gcdb parser. Please do not edit it. |
| 32 | * Update input XML file to add a new entry or update variable in this file |
| 33 | * VERSION = "1.0" |
| 34 | *---------------------------------------------------------------------------*/ |
| 35 | |
| 36 | #ifndef _PANEL_R61318_HD_VIDEO_H_ |
| 37 | #define _PANEL_R61318_HD_VIDEO_H_ |
| 38 | /*---------------------------------------------------------------------------*/ |
| 39 | /* HEADER files */ |
| 40 | /*---------------------------------------------------------------------------*/ |
| 41 | #include "panel.h" |
| 42 | |
| 43 | /*---------------------------------------------------------------------------*/ |
| 44 | /* Panel configuration */ |
| 45 | /*---------------------------------------------------------------------------*/ |
| 46 | static struct panel_config r61318_hd_video_panel_data = { |
| 47 | "qcom,mdss_dsi_r61318_hd_video", "dsi:0:", "qcom,mdss-dsi-panel", |
| 48 | 10, 0, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| 49 | }; |
| 50 | |
| 51 | /*---------------------------------------------------------------------------*/ |
| 52 | /* Panel resolution */ |
| 53 | /*---------------------------------------------------------------------------*/ |
| 54 | static struct panel_resolution r61318_hd_video_panel_res = { |
| 55 | 720, 1280, 40, 30, 12, 0, 18, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| 56 | }; |
| 57 | |
| 58 | /*---------------------------------------------------------------------------*/ |
| 59 | /* Panel color information */ |
| 60 | /*---------------------------------------------------------------------------*/ |
| 61 | static struct color_info r61318_hd_video_color = { |
| 62 | 24, 0, 0xff, 0, 0, 0 |
| 63 | }; |
| 64 | |
| 65 | /*---------------------------------------------------------------------------*/ |
| 66 | /* Panel on/off command information */ |
| 67 | /*---------------------------------------------------------------------------*/ |
| 68 | static char r61318_hd_video_on_cmd0[] = { |
| 69 | 0x02, 0x00, 0x29, 0xC0, |
| 70 | 0xB0, 0x00, 0xFF, 0xFF, |
| 71 | }; |
| 72 | |
| 73 | static char r61318_hd_video_on_cmd1[] = { |
| 74 | 0x02, 0x00, 0x29, 0xC0, |
| 75 | 0xB3, 0x00, 0xFF, 0xFF, |
| 76 | }; |
| 77 | |
| 78 | static char r61318_hd_video_on_cmd2[] = { |
| 79 | 0x02, 0x00, 0x29, 0xC0, |
| 80 | 0xB6, 0x32, 0xFF, 0xFF, |
| 81 | }; |
| 82 | |
| 83 | static char r61318_hd_video_on_cmd3[] = { |
| 84 | 0x02, 0x00, 0x39, 0xC0, |
| 85 | 0x36, 0x0A, 0xFF, 0xFF, |
| 86 | }; |
| 87 | |
| 88 | static char r61318_hd_video_on_cmd4[] = { |
| 89 | 0x07, 0x00, 0x29, 0xC0, |
| 90 | 0xC0, 0x20, 0xB2, 0x0D, |
| 91 | 0x10, 0x02, 0x80, 0xFF, |
| 92 | }; |
| 93 | |
| 94 | static char r61318_hd_video_on_cmd5[] = { |
| 95 | 0x08, 0x00, 0x29, 0xC0, |
| 96 | 0xC1, 0x35, 0x85, 0x85, |
| 97 | 0x85, 0x10, 0x10, 0x33, |
| 98 | |
| 99 | }; |
| 100 | |
| 101 | static char r61318_hd_video_on_cmd6[] = { |
| 102 | 0x04, 0x00, 0x29, 0xC0, |
| 103 | 0xC3, 0x20, 0x0F, 0x00, |
| 104 | |
| 105 | }; |
| 106 | |
| 107 | static char r61318_hd_video_on_cmd7[] = { |
| 108 | 0x04, 0x00, 0x29, 0xC0, |
| 109 | 0xC4, 0xBC, 0xD2, 0x00, |
| 110 | |
| 111 | }; |
| 112 | |
| 113 | static char r61318_hd_video_on_cmd8[] = { |
| 114 | 0x04, 0x00, 0x29, 0xC0, |
| 115 | 0xC5, 0x06, 0x03, 0x1D, |
| 116 | |
| 117 | }; |
| 118 | |
| 119 | static char r61318_hd_video_on_cmd9[] = { |
| 120 | 0x02, 0x00, 0x29, 0xC0, |
| 121 | 0xC6, 0x21, 0xFF, 0xFF, |
| 122 | }; |
| 123 | |
| 124 | static char r61318_hd_video_on_cmd10[] = { |
| 125 | 0x1D, 0x00, 0x29, 0xC0, |
| 126 | 0xC8, 0x60, 0x0E, 0x08, |
| 127 | 0x62, 0x90, 0x52, 0x95, |
| 128 | 0x54, 0x49, 0x29, 0x84, |
| 129 | 0x90, 0xA2, 0x4A, 0x29, |
| 130 | 0x45, 0x15, 0x42, 0x48, |
| 131 | 0xA9, 0xA4, 0xA4, 0xAA, |
| 132 | 0x85, 0x0c, 0x11, 0xc0, |
| 133 | 0x31, 0xFF, 0xFF, 0xFF, |
| 134 | }; |
| 135 | |
| 136 | static char r61318_hd_video_on_cmd11[] = { |
| 137 | 0x1F, 0x00, 0x29, 0xC0, |
| 138 | 0xCA, 0x02, 0x0A, 0x0F, |
| 139 | 0x15, 0x1B, 0x20, 0x23, |
| 140 | 0x1F, 0x24, 0x24, 0x21, |
| 141 | 0x1A, 0x15, 0x0F, 0x01, |
| 142 | 0x02, 0x0A, 0x0F, 0x15, |
| 143 | 0x1B, 0x20, 0x23, 0x1F, |
| 144 | 0x24, 0x24, 0x21, 0x1A, |
| 145 | 0x15, 0x0F, 0x01, 0xFF, |
| 146 | }; |
| 147 | |
| 148 | static char r61318_hd_video_on_cmd12[] = { |
| 149 | 0x02, 0x00, 0x29, 0xC0, |
| 150 | 0xCD, 0x00, 0xFF, 0xFF, |
| 151 | }; |
| 152 | |
| 153 | static char r61318_hd_video_on_cmd13[] = { |
| 154 | 0x02, 0x00, 0x29, 0xC0, |
| 155 | 0xE5, 0x02, 0xFF, 0xFF, |
| 156 | }; |
| 157 | |
| 158 | static char r61318_hd_video_on_cmd14[] = { |
| 159 | 0x04, 0x00, 0x29, 0xC0, |
| 160 | 0xD0, 0x05, 0x89, 0x1A, |
| 161 | }; |
| 162 | |
| 163 | static char r61318_hd_video_on_cmd15[] = { |
| 164 | 0x02, 0x00, 0x29, 0xC0, |
| 165 | 0xD1, 0x03, 0xFF, 0xFF, |
| 166 | }; |
| 167 | |
| 168 | static char r61318_hd_video_on_cmd16[] = { |
| 169 | 0x03, 0x00, 0x29, 0xC0, |
| 170 | 0xD2, 0x81, 0x1F, 0xFF, |
| 171 | }; |
| 172 | |
| 173 | static char r61318_hd_video_on_cmd17[] = { |
| 174 | 0x02, 0x00, 0x29, 0xC0, |
Shuo Yan | 8300b7e | 2015-03-13 18:56:59 +0800 | [diff] [blame] | 175 | 0xD4, 0x4D, 0xFF, 0xFF, |
Shuo Yan | df53bef | 2015-01-06 18:22:19 +0800 | [diff] [blame] | 176 | }; |
| 177 | |
| 178 | static char r61318_hd_video_on_cmd18[] = { |
| 179 | 0x03, 0x00, 0x29, 0xC0, |
| 180 | 0xD5, 0x34, 0x34, 0xFF, |
| 181 | }; |
| 182 | |
| 183 | static char r61318_hd_video_on_cmd19[] = { |
Shuo Yan | 08fbbd7 | 2015-03-03 17:47:54 +0800 | [diff] [blame] | 184 | 0x02, 0x00, 0x29, 0xC0, |
| 185 | 0xBB, 0x2E, 0xFF, 0xFF |
Shuo Yan | df53bef | 2015-01-06 18:22:19 +0800 | [diff] [blame] | 186 | }; |
| 187 | |
| 188 | static char r61318_hd_video_on_cmd20[] = { |
| 189 | 0x02, 0x00, 0x39, 0xC0, |
Shuo Yan | 08fbbd7 | 2015-03-03 17:47:54 +0800 | [diff] [blame] | 190 | 0x53, 0x2C, 0xFF, 0xFF |
Shuo Yan | df53bef | 2015-01-06 18:22:19 +0800 | [diff] [blame] | 191 | }; |
| 192 | |
| 193 | static char r61318_hd_video_on_cmd21[] = { |
Shuo Yan | 08fbbd7 | 2015-03-03 17:47:54 +0800 | [diff] [blame] | 194 | 0x02, 0x00, 0x39, 0xC0, |
| 195 | 0x51, 0xff, 0xFF, 0xFF, |
Shuo Yan | df53bef | 2015-01-06 18:22:19 +0800 | [diff] [blame] | 196 | }; |
| 197 | |
| 198 | static char r61318_hd_video_on_cmd22[] = { |
Shuo Yan | 08fbbd7 | 2015-03-03 17:47:54 +0800 | [diff] [blame] | 199 | 0x11, 0x00, 0x05, 0x80 |
| 200 | }; |
| 201 | |
| 202 | static char r61318_hd_video_on_cmd23[] = { |
Shuo Yan | df53bef | 2015-01-06 18:22:19 +0800 | [diff] [blame] | 203 | 0x29, 0x00, 0x05, 0x80 |
| 204 | }; |
| 205 | |
| 206 | static struct mipi_dsi_cmd r61318_hd_video_on_command[] = { |
| 207 | {0x8, r61318_hd_video_on_cmd0, 0x00}, |
| 208 | {0x8, r61318_hd_video_on_cmd1, 0x00}, |
| 209 | {0x8, r61318_hd_video_on_cmd2, 0x00}, |
| 210 | {0x8, r61318_hd_video_on_cmd3, 0x00}, |
| 211 | {0xc, r61318_hd_video_on_cmd4, 0x00}, |
| 212 | {0xc, r61318_hd_video_on_cmd5, 0x00}, |
| 213 | {0x8, r61318_hd_video_on_cmd6, 0x00}, |
| 214 | {0x8, r61318_hd_video_on_cmd7, 0x00}, |
| 215 | {0x8, r61318_hd_video_on_cmd8, 0x00}, |
| 216 | {0x8, r61318_hd_video_on_cmd9, 0x00}, |
| 217 | {0x24, r61318_hd_video_on_cmd10, 0x00}, |
| 218 | {0x24, r61318_hd_video_on_cmd11, 0x00}, |
| 219 | {0x8, r61318_hd_video_on_cmd12, 0x00}, |
| 220 | {0x8, r61318_hd_video_on_cmd13, 0x00}, |
| 221 | {0x8, r61318_hd_video_on_cmd14, 0x00}, |
| 222 | {0x8, r61318_hd_video_on_cmd15, 0x00}, |
| 223 | {0x8, r61318_hd_video_on_cmd16, 0x00}, |
| 224 | {0x8, r61318_hd_video_on_cmd17, 0x00}, |
| 225 | {0x8, r61318_hd_video_on_cmd18, 0x00}, |
| 226 | {0x8, r61318_hd_video_on_cmd19, 0x00}, |
| 227 | {0x8, r61318_hd_video_on_cmd20, 0x00}, |
Shuo Yan | 08fbbd7 | 2015-03-03 17:47:54 +0800 | [diff] [blame] | 228 | {0x8, r61318_hd_video_on_cmd21, 0x00}, |
| 229 | {0x4, r61318_hd_video_on_cmd22, 0x78}, |
| 230 | {0x4, r61318_hd_video_on_cmd23, 0x32} |
Shuo Yan | df53bef | 2015-01-06 18:22:19 +0800 | [diff] [blame] | 231 | }; |
| 232 | |
Shuo Yan | 08fbbd7 | 2015-03-03 17:47:54 +0800 | [diff] [blame] | 233 | #define R61318_HD_VIDEO_ON_COMMAND 24 |
Shuo Yan | df53bef | 2015-01-06 18:22:19 +0800 | [diff] [blame] | 234 | |
| 235 | |
| 236 | static char r61318_hd_videooff_cmd0[] = { |
| 237 | 0x28, 0x00, 0x05, 0x80 |
| 238 | }; |
| 239 | |
| 240 | static char r61318_hd_videooff_cmd1[] = { |
| 241 | 0x10, 0x00, 0x05, 0x80 |
| 242 | }; |
| 243 | |
| 244 | static struct mipi_dsi_cmd r61318_hd_video_off_command[] = { |
| 245 | {0x4, r61318_hd_videooff_cmd0, 0x32}, |
| 246 | {0x4, r61318_hd_videooff_cmd1, 0x78} |
| 247 | }; |
| 248 | |
| 249 | #define R61318_HD_VIDEO_OFF_COMMAND 2 |
| 250 | |
| 251 | |
| 252 | static struct command_state r61318_hd_video_state = { |
| 253 | 0, 1 |
| 254 | }; |
| 255 | |
| 256 | /*---------------------------------------------------------------------------*/ |
| 257 | /* Command mode panel information */ |
| 258 | /*---------------------------------------------------------------------------*/ |
| 259 | static struct commandpanel_info r61318_hd_video_command_panel = { |
| 260 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| 261 | }; |
| 262 | |
| 263 | /*---------------------------------------------------------------------------*/ |
| 264 | /* Video mode panel information */ |
| 265 | /*---------------------------------------------------------------------------*/ |
| 266 | static struct videopanel_info r61318_hd_video_video_panel = { |
| 267 | 1, 0, 0, 0, 1, 1, 2, 0, 0x9 |
| 268 | }; |
| 269 | |
| 270 | /*---------------------------------------------------------------------------*/ |
| 271 | /* Lane configuration */ |
| 272 | /*---------------------------------------------------------------------------*/ |
| 273 | static struct lane_configuration r61318_hd_video_lane_config = { |
Ray Zhang | 0d303af | 2015-01-21 10:17:02 +0800 | [diff] [blame] | 274 | 4, 0, 1, 1, 1, 1, 0 |
Shuo Yan | df53bef | 2015-01-06 18:22:19 +0800 | [diff] [blame] | 275 | }; |
| 276 | |
| 277 | /*---------------------------------------------------------------------------*/ |
| 278 | /* Panel timing */ |
| 279 | /*---------------------------------------------------------------------------*/ |
| 280 | static const uint32_t r61318_hd_video_timings[] = { |
Shuo Yan | c2bab93 | 2015-01-27 16:22:21 +0800 | [diff] [blame] | 281 | 0xab, 0x1c, 0x14, 0x00, 0x2a, 0x27, 0x18, 0x1e, 0x21, 0x03, 0x04, 0x00 |
Shuo Yan | df53bef | 2015-01-06 18:22:19 +0800 | [diff] [blame] | 282 | }; |
| 283 | |
| 284 | static struct panel_timing r61318_hd_video_timing_info = { |
Shuo Yan | c2bab93 | 2015-01-27 16:22:21 +0800 | [diff] [blame] | 285 | 0, 4, 0x20, 0x2e |
Shuo Yan | df53bef | 2015-01-06 18:22:19 +0800 | [diff] [blame] | 286 | }; |
| 287 | |
| 288 | /*---------------------------------------------------------------------------*/ |
| 289 | /* Panel reset sequence */ |
| 290 | /*---------------------------------------------------------------------------*/ |
| 291 | static struct panel_reset_sequence r61318_hd_video_reset_seq = { |
| 292 | {1, 0, 1, }, {20, 20, 20, }, 2 |
| 293 | }; |
| 294 | |
| 295 | /*---------------------------------------------------------------------------*/ |
| 296 | /* Backlight setting */ |
| 297 | /*---------------------------------------------------------------------------*/ |
| 298 | static struct backlight r61318_hd_video_backlight = { |
| 299 | 2, 1, 255, 0, 2, "bl_ctrl_dcs" |
| 300 | }; |
| 301 | |
| 302 | #endif /*_PANEL_R61318_HD_VIDEO_H_*/ |