Dhaval Patel | 215fcf2 | 2013-07-23 19:48:53 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2013, 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_TRULY_WVGA_VIDEO_H_ |
| 37 | |
| 38 | #define _PANEL_TRULY_WVGA_VIDEO_H_ |
| 39 | /*---------------------------------------------------------------------------*/ |
| 40 | /* HEADER files */ |
| 41 | /*---------------------------------------------------------------------------*/ |
| 42 | #include "panel.h" |
| 43 | |
| 44 | /*---------------------------------------------------------------------------*/ |
| 45 | /* Panel configuration */ |
| 46 | /*---------------------------------------------------------------------------*/ |
| 47 | |
| 48 | static struct panel_config truly_wvga_video_panel_data = { |
| 49 | "qcom,mdss_dsi_truly_wvga_video", "dsi:0:", "qcom,mdss-dsi-panel", |
| 50 | 10, 0, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 |
| 51 | }; |
| 52 | |
| 53 | /*---------------------------------------------------------------------------*/ |
| 54 | /* Panel resolution */ |
| 55 | /*---------------------------------------------------------------------------*/ |
| 56 | static struct panel_resolution truly_wvga_video_panel_res = { |
| 57 | 480, 800, 160, 40, 8, 0, 12, 10, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| 58 | }; |
| 59 | |
| 60 | /*---------------------------------------------------------------------------*/ |
| 61 | /* Panel Color Information */ |
| 62 | /*---------------------------------------------------------------------------*/ |
| 63 | static struct color_info truly_wvga_video_color = { |
| 64 | 24, 0, 0xff, 0, 0, 0 |
| 65 | }; |
| 66 | |
| 67 | /*---------------------------------------------------------------------------*/ |
| 68 | /* Panel Command information */ |
| 69 | /*---------------------------------------------------------------------------*/ |
| 70 | static char truly_wvga_video_on_cmd0[] = { |
| 71 | 0x01, 0x00, 0x05, 0x80 }; |
| 72 | |
| 73 | |
| 74 | static char truly_wvga_video_on_cmd1[] = { |
| 75 | 0xb0, 0x04, 0x23, 0x80 }; |
| 76 | |
| 77 | |
| 78 | static char truly_wvga_video_on_cmd2[] = { |
| 79 | 0x03, 0x00, 0x29, 0xC0, |
| 80 | 0xb3, 0x02, 0x00, 0xFF, }; |
| 81 | |
| 82 | |
| 83 | static char truly_wvga_video_on_cmd3[] = { |
| 84 | 0xbd, 0x00, 0x23, 0x80 }; |
| 85 | |
| 86 | |
| 87 | static char truly_wvga_video_on_cmd4[] = { |
| 88 | 0x03, 0x00, 0x29, 0xC0, |
| 89 | 0xc0, 0x18, 0x66, 0xFF, }; |
| 90 | |
| 91 | |
| 92 | static char truly_wvga_video_on_cmd5[] = { |
| 93 | 0x10, 0x00, 0x29, 0xC0, |
| 94 | 0xc1, 0x23, 0x31, 0x99, |
| 95 | 0x21, 0x20, 0x00, 0x30, |
| 96 | 0x28, 0x0c, 0x0c, 0x00, |
| 97 | 0x00, 0x00, 0x21, 0x01, |
| 98 | }; |
| 99 | |
| 100 | |
| 101 | static char truly_wvga_video_on_cmd6[] = { |
| 102 | 0x07, 0x00, 0x29, 0xC0, |
| 103 | 0xc2, 0x00, 0x06, 0x06, |
| 104 | 0x01, 0x03, 0x00, 0xFF, }; |
| 105 | |
| 106 | |
| 107 | static char truly_wvga_video_on_cmd7[] = { |
| 108 | 0x19, 0x00, 0x29, 0xC0, |
| 109 | 0xc8, 0x04, 0x10, 0x18, |
| 110 | 0x20, 0x2e, 0x46, 0x3c, |
| 111 | 0x28, 0x1f, 0x18, 0x10, |
| 112 | 0x04, 0x04, 0x10, 0x18, |
| 113 | 0x20, 0x2e, 0x46, 0x3c, |
| 114 | 0x28, 0x1f, 0x18, 0x10, |
| 115 | 0x04, 0xFF, 0xFF, 0xFF, }; |
| 116 | |
| 117 | |
| 118 | static char truly_wvga_video_on_cmd8[] = { |
| 119 | 0x19, 0x00, 0x29, 0xC0, |
| 120 | 0xc9, 0x04, 0x10, 0x18, |
| 121 | 0x20, 0x2e, 0x46, 0x3c, |
| 122 | 0x28, 0x1f, 0x18, 0x10, |
| 123 | 0x04, 0x04, 0x10, 0x18, |
| 124 | 0x20, 0x2e, 0x46, 0x3c, |
| 125 | 0x28, 0x1f, 0x18, 0x10, |
| 126 | 0x04, 0xFF, 0xFF, 0xFF, }; |
| 127 | |
| 128 | |
| 129 | static char truly_wvga_video_on_cmd9[] = { |
| 130 | 0x19, 0x00, 0x29, 0xC0, |
| 131 | 0xca, 0x04, 0x10, 0x18, |
| 132 | 0x20, 0x2e, 0x46, 0x3c, |
| 133 | 0x28, 0x1f, 0x18, 0x10, |
| 134 | 0x04, 0x04, 0x10, 0x18, |
| 135 | 0x20, 0x2e, 0x46, 0x3c, |
| 136 | 0x28, 0x1f, 0x18, 0x10, |
| 137 | 0x04, 0xFF, 0xFF, 0xFF, }; |
| 138 | |
| 139 | |
| 140 | static char truly_wvga_video_on_cmd10[] = { |
| 141 | 0x11, 0x00, 0x29, 0xC0, |
| 142 | 0xd0, 0x29, 0x03, 0xce, |
| 143 | 0xa6, 0x00, 0x43, 0x20, |
| 144 | 0x10, 0x01, 0x00, 0x01, |
| 145 | 0x01, 0x00, 0x03, 0x01, |
| 146 | 0x00, 0xFF, 0xFF, 0xFF, }; |
| 147 | |
| 148 | |
| 149 | static char truly_wvga_video_on_cmd11[] = { |
| 150 | 0x08, 0x00, 0x29, 0xC0, |
| 151 | 0xd1, 0x18, 0x0C, 0x23, |
| 152 | 0x03, 0x75, 0x02, 0x50, |
| 153 | }; |
| 154 | |
| 155 | |
| 156 | static char truly_wvga_video_on_cmd12[] = { |
| 157 | 0xd3, 0x11, 0x23, 0x80 }; |
| 158 | |
| 159 | |
| 160 | static char truly_wvga_video_on_cmd13[] = { |
| 161 | 0x03, 0x00, 0x29, 0xC0, |
| 162 | 0xd5, 0x2a, 0x2a, 0xFF, }; |
| 163 | |
| 164 | |
| 165 | static char truly_wvga_video_on_cmd14[] = { |
| 166 | 0x03, 0x00, 0x29, 0xC0, |
| 167 | 0xde, 0x01, 0x51, 0xFF, }; |
| 168 | |
| 169 | |
| 170 | static char truly_wvga_video_on_cmd15[] = { |
| 171 | 0xe6, 0x51, 0x23, 0x80 }; |
| 172 | |
| 173 | |
| 174 | static char truly_wvga_video_on_cmd16[] = { |
| 175 | 0xfa, 0x03, 0x23, 0x80 }; |
| 176 | |
| 177 | |
| 178 | static char truly_wvga_video_on_cmd17[] = { |
| 179 | 0xd6, 0x28, 0x23, 0x80 }; |
| 180 | |
| 181 | |
| 182 | static char truly_wvga_video_on_cmd18[] = { |
| 183 | 0x05, 0x00, 0x39, 0xC0, |
| 184 | 0x2a, 0x00, 0x00, 0x01, |
| 185 | 0xdf, 0xFF, 0xFF, 0xFF, }; |
| 186 | |
| 187 | |
| 188 | static char truly_wvga_video_on_cmd19[] = { |
| 189 | 0x05, 0x00, 0x39, 0xC0, |
| 190 | 0x2b, 0x00, 0x00, 0x03, |
| 191 | 0x1f, 0xFF, 0xFF, 0xFF, }; |
| 192 | |
| 193 | |
| 194 | static char truly_wvga_video_on_cmd20[] = { |
| 195 | 0x35, 0x00, 0x15, 0x80 }; |
| 196 | |
| 197 | |
| 198 | static char truly_wvga_video_on_cmd21[] = { |
| 199 | 0x03, 0x00, 0x39, 0xC0, |
| 200 | 0x44, 0x00, 0x50, 0xFF, }; |
| 201 | |
| 202 | |
| 203 | static char truly_wvga_video_on_cmd22[] = { |
| 204 | 0x36, 0xc1, 0x15, 0x80 }; |
| 205 | |
| 206 | |
| 207 | static char truly_wvga_video_on_cmd23[] = { |
| 208 | 0x3a, 0x77, 0x15, 0x80 }; |
| 209 | |
| 210 | |
| 211 | static char truly_wvga_video_on_cmd24[] = { |
| 212 | 0x11, 0x00, 0x05, 0x80 }; |
| 213 | |
| 214 | |
| 215 | static char truly_wvga_video_on_cmd25[] = { |
| 216 | 0x29, 0x00, 0x05, 0x80 }; |
| 217 | |
| 218 | |
| 219 | |
| 220 | |
| 221 | static struct mipi_dsi_cmd truly_wvga_video_on_command[] = { |
shuoy | fae61a9 | 2013-10-24 10:12:56 +0800 | [diff] [blame] | 222 | { 0x4 , truly_wvga_video_on_cmd0, 0x00}, |
| 223 | { 0x4 , truly_wvga_video_on_cmd1, 0x00}, |
| 224 | { 0x8 , truly_wvga_video_on_cmd2, 0x00}, |
| 225 | { 0x4 , truly_wvga_video_on_cmd3, 0x00}, |
| 226 | { 0x8 , truly_wvga_video_on_cmd4, 0x00}, |
| 227 | { 0x14 , truly_wvga_video_on_cmd5, 0x00}, |
| 228 | { 0xc , truly_wvga_video_on_cmd6, 0x00}, |
| 229 | { 0x20 , truly_wvga_video_on_cmd7, 0x00}, |
| 230 | { 0x20 , truly_wvga_video_on_cmd8, 0x00}, |
| 231 | { 0x20 , truly_wvga_video_on_cmd9, 0x00}, |
| 232 | { 0x18 , truly_wvga_video_on_cmd10, 0x00}, |
| 233 | { 0xc , truly_wvga_video_on_cmd11, 0x00}, |
| 234 | { 0x4 , truly_wvga_video_on_cmd12, 0x00}, |
| 235 | { 0x8 , truly_wvga_video_on_cmd13, 0x00}, |
| 236 | { 0x8 , truly_wvga_video_on_cmd14, 0x00}, |
| 237 | { 0x4 , truly_wvga_video_on_cmd15, 0x00}, |
| 238 | { 0x4 , truly_wvga_video_on_cmd16, 0x00}, |
| 239 | { 0x4 , truly_wvga_video_on_cmd17, 0x00}, |
| 240 | { 0xc , truly_wvga_video_on_cmd18, 0x00}, |
| 241 | { 0xc , truly_wvga_video_on_cmd19, 0x00}, |
| 242 | { 0x4 , truly_wvga_video_on_cmd20, 0x00}, |
| 243 | { 0x8 , truly_wvga_video_on_cmd21, 0x00}, |
| 244 | { 0x4 , truly_wvga_video_on_cmd22, 0x00}, |
| 245 | { 0x4 , truly_wvga_video_on_cmd23, 0x00}, |
| 246 | { 0x4 , truly_wvga_video_on_cmd24, 0x7D}, |
| 247 | { 0x4 , truly_wvga_video_on_cmd25, 0x3c} |
Dhaval Patel | 215fcf2 | 2013-07-23 19:48:53 -0700 | [diff] [blame] | 248 | }; |
| 249 | #define TRULY_WVGA_VIDEO_ON_COMMAND 26 |
| 250 | |
| 251 | |
| 252 | static char truly_wvga_videooff_cmd0[] = { |
| 253 | 0x28, 0x00, 0x05, 0x80 }; |
| 254 | |
| 255 | |
| 256 | static char truly_wvga_videooff_cmd1[] = { |
| 257 | 0x10, 0x00, 0x05, 0x80 }; |
| 258 | |
| 259 | |
| 260 | |
| 261 | |
| 262 | static struct mipi_dsi_cmd truly_wvga_video_off_command[] = { |
| 263 | { 0x4 , truly_wvga_videooff_cmd0}, |
| 264 | { 0x4 , truly_wvga_videooff_cmd1} |
| 265 | }; |
| 266 | #define TRULY_WVGA_VIDEO_OFF_COMMAND 2 |
| 267 | |
| 268 | |
| 269 | static struct command_state truly_wvga_video_state = { |
| 270 | 0, 0 |
| 271 | }; |
| 272 | |
| 273 | /*---------------------------------------------------------------------------*/ |
| 274 | /* Command mode panel information */ |
| 275 | /*---------------------------------------------------------------------------*/ |
| 276 | |
| 277 | static struct commandpanel_info truly_wvga_video_command_panel = { |
| 278 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| 279 | }; |
| 280 | |
| 281 | /*---------------------------------------------------------------------------*/ |
| 282 | /* Video mode panel information */ |
| 283 | /*---------------------------------------------------------------------------*/ |
| 284 | |
| 285 | static struct videopanel_info truly_wvga_video_video_panel = { |
| 286 | 0, 0, 0, 0, 1, 1, 1, 0, 0x9 |
| 287 | }; |
| 288 | |
| 289 | /*---------------------------------------------------------------------------*/ |
| 290 | /* Lane Configuration */ |
| 291 | /*---------------------------------------------------------------------------*/ |
| 292 | |
| 293 | static struct lane_configuration truly_wvga_video_lane_config = { |
| 294 | 2, 0, 1, 1, 0, 0 |
| 295 | }; |
| 296 | |
| 297 | |
| 298 | /*---------------------------------------------------------------------------*/ |
| 299 | /* Panel Timing */ |
| 300 | /*---------------------------------------------------------------------------*/ |
| 301 | const uint32_t truly_wvga_video_timings[] = { |
| 302 | 0x5D, 0x12, 0x0C, 0x00, 0x33, 0x38, 0x10, 0x16, 0x1E, 0x03, 0x04, 0x00 |
| 303 | }; |
| 304 | |
| 305 | static struct panel_timing truly_wvga_video_timing_info = { |
| 306 | 0, 4, 0x04, 0x1b |
| 307 | }; |
| 308 | |
| 309 | /*---------------------------------------------------------------------------*/ |
| 310 | /* Panel Reset Sequence */ |
| 311 | /*---------------------------------------------------------------------------*/ |
| 312 | static struct panel_reset_sequence truly_wvga_video_reset_seq = { |
| 313 | { 2, 0, 2, }, { 20, 2, 20, }, 2 |
| 314 | }; |
| 315 | |
| 316 | /*---------------------------------------------------------------------------*/ |
| 317 | /* Backlight Settings */ |
| 318 | /*---------------------------------------------------------------------------*/ |
| 319 | |
| 320 | static struct backlight truly_wvga_video_backlight = { |
| 321 | 0, 1, 255, 0, 1, 0 |
| 322 | }; |
| 323 | |
| 324 | |
| 325 | #endif /*_PANEL_TRULY_WVGA_VIDEO_H_*/ |