shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [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_HX8379A_WVGA_VIDEO_H_ |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 37 | #define _PANEL_HX8379A_WVGA_VIDEO_H_ |
| 38 | /*---------------------------------------------------------------------------*/ |
| 39 | /* HEADER files */ |
| 40 | /*---------------------------------------------------------------------------*/ |
| 41 | #include "panel.h" |
| 42 | |
| 43 | /*---------------------------------------------------------------------------*/ |
| 44 | /* Panel configuration */ |
| 45 | /*---------------------------------------------------------------------------*/ |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 46 | static struct panel_config hx8379a_wvga_video_panel_data = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 47 | "qcom,mdss_dsi_hx8379a_wvga_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 |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | /*---------------------------------------------------------------------------*/ |
| 52 | /* Panel resolution */ |
| 53 | /*---------------------------------------------------------------------------*/ |
| 54 | static struct panel_resolution hx8379a_wvga_video_panel_res = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 55 | 480, 800, 100, 94, 40, 0, 6, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 56 | }; |
| 57 | |
| 58 | /*---------------------------------------------------------------------------*/ |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 59 | /* Panel color information */ |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 60 | /*---------------------------------------------------------------------------*/ |
| 61 | static struct color_info hx8379a_wvga_video_color = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 62 | 24, 0, 0xff, 0, 0, 0 |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 63 | }; |
| 64 | |
| 65 | /*---------------------------------------------------------------------------*/ |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 66 | /* Panel on/off command information */ |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 67 | /*---------------------------------------------------------------------------*/ |
| 68 | static char hx8379a_wvga_video_on_cmd0[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 69 | 0x04, 0x00, 0x39, 0xC0, |
| 70 | 0xB9, 0xFF, 0x83, 0x79, |
| 71 | }; |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 72 | |
| 73 | static char hx8379a_wvga_video_on_cmd1[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 74 | 0x03, 0x00, 0x39, 0xC0, |
| 75 | 0xBA, 0x51, 0x93, 0xFF, |
| 76 | }; |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 77 | |
| 78 | static char hx8379a_wvga_video_on_cmd2[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 79 | 0x14, 0x00, 0x39, 0xC0, |
| 80 | 0xB1, 0x00, 0x50, 0x44, |
| 81 | 0xEA, 0x8D, 0x08, 0x11, |
| 82 | 0x11, 0x11, 0x27, 0x2F, |
| 83 | 0x9A, 0x1A, 0x42, 0x0B, |
| 84 | 0x6E, 0xF1, 0x00, 0xE6, |
| 85 | }; |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 86 | |
| 87 | static char hx8379a_wvga_video_on_cmd3[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 88 | 0x0E, 0x00, 0x39, 0xC0, |
| 89 | 0xB2, 0x00, 0x00, 0x3C, |
| 90 | 0x08, 0x04, 0x19, 0x22, |
| 91 | 0x00, 0xFF, 0x08, 0x04, |
| 92 | 0x19, 0x20, 0xFF, 0xFF, |
| 93 | }; |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 94 | |
| 95 | static char hx8379a_wvga_video_on_cmd4[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 96 | 0x20, 0x00, 0x39, 0xC0, |
| 97 | 0xB4, 0x80, 0x08, 0x00, |
| 98 | 0x32, 0x10, 0x03, 0x32, |
| 99 | 0x13, 0x70, 0x32, 0x10, |
| 100 | 0x08, 0x37, 0x01, 0x28, |
| 101 | 0x07, 0x37, 0x08, 0x35, |
| 102 | 0x08, 0x3D, 0x44, 0x08, |
| 103 | 0x00, 0x40, 0x08, 0x28, |
| 104 | 0x08, 0x30, 0x30, 0x04, |
| 105 | }; |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 106 | |
| 107 | static char hx8379a_wvga_video_on_cmd5[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 108 | 0x30, 0x00, 0x39, 0xC0, |
| 109 | 0xD5, 0x00, 0x00, 0x0A, |
| 110 | 0x00, 0x01, 0x05, 0x00, |
| 111 | 0x03, 0x00, 0x88, 0x88, |
| 112 | 0x88, 0x88, 0x23, 0x01, |
| 113 | 0x67, 0x45, 0x02, 0x13, |
| 114 | 0x88, 0x88, 0x88, 0x88, |
| 115 | 0x88, 0x88, 0x88, 0x88, |
| 116 | 0x88, 0x88, 0x54, 0x76, |
| 117 | 0x10, 0x32, 0x31, 0x20, |
| 118 | 0x88, 0x88, 0x88, 0x88, |
| 119 | 0x88, 0x88, 0x00, 0x00, |
| 120 | 0x00, 0x00, 0x00, 0x00, |
| 121 | }; |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 122 | |
| 123 | static char hx8379a_wvga_video_on_cmd6[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 124 | 0x24, 0x00, 0x39, 0xC0, |
| 125 | 0xE0, 0x79, 0x05, 0x0F, |
| 126 | 0x14, 0x23, 0x24, 0x3F, |
| 127 | 0x30, 0x46, 0x06, 0x10, |
| 128 | 0x13, 0x16, 0x17, 0x16, |
| 129 | 0x16, 0x13, 0x18, 0x05, |
| 130 | 0x0F, 0x14, 0x23, 0x24, |
| 131 | 0x3F, 0x30, 0x46, 0x06, |
| 132 | 0x10, 0x13, 0x16, 0x17, |
| 133 | 0x16, 0x16, 0x13, 0x18, |
| 134 | }; |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 135 | |
| 136 | static char hx8379a_wvga_video_on_cmd7[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 137 | 0x80, 0x00, 0x39, 0xC0, |
| 138 | 0xC1, 0x01, 0x00, 0x07, |
| 139 | 0x10, 0x17, 0x1D, 0x2A, |
| 140 | 0x33, 0x3A, 0x43, 0x4A, |
| 141 | 0x52, 0x5B, 0x64, 0x6D, |
| 142 | 0x78, 0x7F, 0x88, 0x90, |
| 143 | 0x98, 0xA0, 0xA9, 0xB2, |
| 144 | 0xB9, 0xC1, 0xC9, 0xD1, |
| 145 | 0xD7, 0xDF, 0xE6, 0xED, |
| 146 | 0xF4, 0xFA, 0xFD, 0x00, |
| 147 | 0x00, 0x00, 0x00, 0x00, |
| 148 | 0x00, 0x00, 0x00, 0x00, |
| 149 | 0x00, 0x08, 0x10, 0x18, |
| 150 | 0x20, 0x28, 0x30, 0x38, |
| 151 | 0x40, 0x47, 0x4F, 0x58, |
| 152 | 0x60, 0x68, 0x70, 0x78, |
| 153 | 0x80, 0x88, 0x90, 0x98, |
| 154 | 0xA0, 0xA9, 0xB1, 0xB9, |
| 155 | 0xC1, 0xC9, 0xD1, 0xD8, |
| 156 | 0xE0, 0xE8, 0xF0, 0xF9, |
| 157 | 0xFE, 0x00, 0x00, 0x00, |
| 158 | 0x00, 0x00, 0x00, 0x00, |
| 159 | 0x00, 0x00, 0x00, 0x08, |
| 160 | 0x10, 0x18, 0x1E, 0x26, |
| 161 | 0x2E, 0x34, 0x3A, 0x41, |
| 162 | 0x49, 0x4F, 0x58, 0x5E, |
| 163 | 0x67, 0x6F, 0x77, 0x80, |
| 164 | 0x88, 0x8F, 0x97, 0x9F, |
| 165 | 0xA7, 0xAF, 0xB8, 0xBF, |
| 166 | 0xC7, 0xD1, 0xD8, 0xE3, |
| 167 | 0xEA, 0xF6, 0xFF, 0x00, |
| 168 | 0x00, 0x00, 0x00, 0x00, |
| 169 | 0x00, 0x00, 0x00, 0x00, |
| 170 | }; |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 171 | |
| 172 | static char hx8379a_wvga_video_on_cmd8[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 173 | 0xcc, 0x02, 0x23, 0x80 |
| 174 | }; |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 175 | |
| 176 | static char hx8379a_wvga_video_on_cmd9[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 177 | 0x05, 0x00, 0x39, 0xC0, |
| 178 | 0xB6, 0x00, 0x9C, 0x00, |
| 179 | 0x9C, 0xFF, 0xFF, 0xFF, |
| 180 | }; |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 181 | |
| 182 | static char hx8379a_wvga_video_on_cmd10[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 183 | 0x11, 0x00, 0x05, 0x80 |
| 184 | }; |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 185 | |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 186 | static char hx8379a_wvga_video_on_cmd11[] = { |
| 187 | 0x29, 0x00, 0x05, 0x80 |
| 188 | }; |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 189 | |
| 190 | static struct mipi_dsi_cmd hx8379a_wvga_video_on_command[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 191 | {0x8, hx8379a_wvga_video_on_cmd0, 0x00}, |
| 192 | {0x8, hx8379a_wvga_video_on_cmd1, 0x00}, |
| 193 | {0x18, hx8379a_wvga_video_on_cmd2, 0x00}, |
| 194 | {0x14, hx8379a_wvga_video_on_cmd3, 0x00}, |
| 195 | {0x24, hx8379a_wvga_video_on_cmd4, 0x00}, |
| 196 | {0x34, hx8379a_wvga_video_on_cmd5, 0x00}, |
| 197 | {0x28, hx8379a_wvga_video_on_cmd6, 0x00}, |
| 198 | {0x84, hx8379a_wvga_video_on_cmd7, 0x00}, |
| 199 | {0x4, hx8379a_wvga_video_on_cmd8, 0x00}, |
| 200 | {0xc, hx8379a_wvga_video_on_cmd9, 0x00}, |
| 201 | {0x4, hx8379a_wvga_video_on_cmd10, 0x96}, |
| 202 | {0x4, hx8379a_wvga_video_on_cmd11, 0x78} |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 203 | }; |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 204 | |
| 205 | #define HX8379A_WVGA_VIDEO_ON_COMMAND 12 |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 206 | |
| 207 | |
| 208 | static char hx8379a_wvga_videooff_cmd0[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 209 | 0x28, 0x00, 0x05, 0x80 |
| 210 | }; |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 211 | |
| 212 | static char hx8379a_wvga_videooff_cmd1[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 213 | 0x10, 0x00, 0x05, 0x80 |
| 214 | }; |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 215 | |
| 216 | static struct mipi_dsi_cmd hx8379a_wvga_video_off_command[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 217 | {0x4, hx8379a_wvga_videooff_cmd0, 0x32}, |
| 218 | {0x4, hx8379a_wvga_videooff_cmd1, 0x78} |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 219 | }; |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 220 | |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 221 | #define HX8379A_WVGA_VIDEO_OFF_COMMAND 2 |
| 222 | |
| 223 | |
| 224 | static struct command_state hx8379a_wvga_video_state = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 225 | 0, 0 |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 226 | }; |
| 227 | |
| 228 | /*---------------------------------------------------------------------------*/ |
| 229 | /* Command mode panel information */ |
| 230 | /*---------------------------------------------------------------------------*/ |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 231 | static struct commandpanel_info hx8379a_wvga_video_command_panel = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 232 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 233 | }; |
| 234 | |
| 235 | /*---------------------------------------------------------------------------*/ |
| 236 | /* Video mode panel information */ |
| 237 | /*---------------------------------------------------------------------------*/ |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 238 | static struct videopanel_info hx8379a_wvga_video_video_panel = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 239 | 1, 0, 0, 0, 1, 1, 2, 0, 0x9 |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 240 | }; |
| 241 | |
| 242 | /*---------------------------------------------------------------------------*/ |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 243 | /* Lane configuration */ |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 244 | /*---------------------------------------------------------------------------*/ |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 245 | static struct lane_configuration hx8379a_wvga_video_lane_config = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 246 | 2, 1, 1, 1, 0, 0 |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 247 | }; |
| 248 | |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 249 | /*---------------------------------------------------------------------------*/ |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 250 | /* Panel timing */ |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 251 | /*---------------------------------------------------------------------------*/ |
| 252 | static const uint32_t hx8379a_wvga_video_timings[] = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 253 | 0x78, 0x1B, 0x11, 0x00, 0x3E, 0x43, 0x16, 0x1E, 0x1D, 0x03, 0x04, 0x00 |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 254 | }; |
| 255 | |
| 256 | static struct panel_timing hx8379a_wvga_video_timing_info = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 257 | 0, 4, 0x04, 0x1b |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 258 | }; |
| 259 | |
| 260 | /*---------------------------------------------------------------------------*/ |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 261 | /* Panel reset sequence */ |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 262 | /*---------------------------------------------------------------------------*/ |
| 263 | static struct panel_reset_sequence hx8379a_wvga_video_reset_seq = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 264 | {2, 0, 2, }, {20, 2, 20, }, 2 |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 265 | }; |
| 266 | |
| 267 | /*---------------------------------------------------------------------------*/ |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 268 | /* Backlight setting */ |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 269 | /*---------------------------------------------------------------------------*/ |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 270 | static struct backlight hx8379a_wvga_video_backlight = { |
Shuo Yan | db90c0b | 2013-10-31 23:42:23 +0800 | [diff] [blame] | 271 | 0, 1, 255, 0, 1, 0 |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 272 | }; |
| 273 | |
shuoy | 818a43a | 2013-09-03 18:13:52 +0800 | [diff] [blame] | 274 | #endif /*_PANEL_HX8379A_WVGA_VIDEO_H_*/ |