Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 1 | /* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 2 | * |
| 3 | * Redistribution and use in source and binary forms, with or without |
| 4 | * modification, are permitted provided that the following conditions are |
| 5 | * 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 |
| 9 | * copyright notice, this list of conditions and the following |
| 10 | * disclaimer in the documentation and/or other materials provided |
| 11 | * with the 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 "AS IS" AND ANY EXPRESS OR IMPLIED |
| 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | */ |
| 28 | |
| 29 | #ifndef _PANEL_HX8379C_FWVGA_VIDEO_H_ |
| 30 | #define _PANEL_HX8379C_FWVGA_VIDEO_H_ |
| 31 | /*---------------------------------------------------------------------------*/ |
| 32 | /* HEADER files */ |
| 33 | /*---------------------------------------------------------------------------*/ |
| 34 | #include "panel.h" |
| 35 | |
| 36 | /*---------------------------------------------------------------------------*/ |
| 37 | /* Panel configuration */ |
| 38 | /*---------------------------------------------------------------------------*/ |
| 39 | static struct panel_config hx8379c_fwvga_video_panel_data = { |
| 40 | "qcom,mdss_dsi_hx8379c_fwvga_video", "dsi:0:", "qcom,mdss-dsi-panel", |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 41 | 10, 0, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 1, 7000, 0, 0, 0, 0, 0 |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 42 | }; |
| 43 | |
| 44 | /*---------------------------------------------------------------------------*/ |
| 45 | /* Panel resolution */ |
| 46 | /*---------------------------------------------------------------------------*/ |
| 47 | static struct panel_resolution hx8379c_fwvga_video_panel_res = { |
| 48 | 480, 854, 60, 60, 60, 0, 6, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| 49 | }; |
| 50 | |
| 51 | /*---------------------------------------------------------------------------*/ |
| 52 | /* Panel color information */ |
| 53 | /*---------------------------------------------------------------------------*/ |
| 54 | static struct color_info hx8379c_fwvga_video_color = { |
| 55 | 24, 0, 0xff, 0, 0, 0 |
| 56 | }; |
| 57 | |
| 58 | /*---------------------------------------------------------------------------*/ |
| 59 | /* Panel on/off command information */ |
| 60 | /*---------------------------------------------------------------------------*/ |
| 61 | static char hx8379c_fwvga_video_on_cmd0[] = { |
| 62 | 0x04, 0x00, 0x39, 0xC0, |
| 63 | 0xB9, 0xFF, 0x83, 0x79, |
| 64 | }; |
| 65 | |
| 66 | static char hx8379c_fwvga_video_on_cmd1[] = { |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 67 | 0x11, 0x00, 0x39, 0xC0, |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 68 | 0xB1, 0x44, 0x1C, 0x1C, |
| 69 | 0x31, 0x31, 0x50, 0xD0, |
| 70 | 0xEE, 0x54, 0x80, 0x38, |
| 71 | 0x38, 0xF8, 0x32, 0x22, |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 72 | 0x22, 0xFF, 0xFF, 0xFF, |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 73 | }; |
| 74 | |
| 75 | static char hx8379c_fwvga_video_on_cmd2[] = { |
| 76 | 0x0A, 0x00, 0x39, 0xC0, |
| 77 | 0xB2, 0x80, 0xFE, 0x0B, |
| 78 | 0x04, 0x00, 0x50, 0x11, |
Ray Zhang | 629831b | 2015-03-30 14:18:06 +0800 | [diff] [blame] | 79 | 0x42, 0x15, 0xFF, 0xFF, |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 80 | }; |
| 81 | |
| 82 | static char hx8379c_fwvga_video_on_cmd3[] = { |
| 83 | 0x0B, 0x00, 0x39, 0xC0, |
| 84 | 0xB4, 0x69, 0x6A, 0x69, |
| 85 | 0x6A, 0x69, 0x6A, 0x22, |
| 86 | 0x70, 0x23, 0x70, 0xFF, |
| 87 | }; |
| 88 | |
| 89 | static char hx8379c_fwvga_video_on_cmd4[] = { |
Ray Zhang | 629831b | 2015-03-30 14:18:06 +0800 | [diff] [blame] | 90 | 0x0B, 0x00, 0x39, 0xC0, |
| 91 | 0xBA, 0x41, 0x83, 0xA8, |
| 92 | 0x4D, 0xB2, 0x24, 0x00, |
| 93 | 0x00, 0x50, 0x90, 0xFF, |
| 94 | }; |
| 95 | |
| 96 | static char hx8379c_fwvga_video_on_cmd5[] = { |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 97 | 0x05, 0x00, 0x39, 0xC0, |
| 98 | 0xC7, 0x00, 0x00, 0x00, |
| 99 | 0xC0, 0xFF, 0xFF, 0xFF, |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 100 | }; |
| 101 | |
Ray Zhang | 629831b | 2015-03-30 14:18:06 +0800 | [diff] [blame] | 102 | static char hx8379c_fwvga_video_on_cmd6[] = { |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 103 | 0x02, 0x00, 0x39, 0xC0, |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 104 | 0xCC, 0x02, 0xFF, 0xFF, |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 105 | }; |
| 106 | |
Ray Zhang | 629831b | 2015-03-30 14:18:06 +0800 | [diff] [blame] | 107 | static char hx8379c_fwvga_video_on_cmd7[] = { |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 108 | 0x02, 0x00, 0x39, 0xC0, |
| 109 | 0xD2, 0x77, 0xFF, 0xFF, |
| 110 | }; |
| 111 | |
Ray Zhang | 629831b | 2015-03-30 14:18:06 +0800 | [diff] [blame] | 112 | static char hx8379c_fwvga_video_on_cmd8[] = { |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 113 | 0x1E, 0x00, 0x39, 0xC0, |
| 114 | 0xD3, 0x00, 0x07, 0x00, |
| 115 | 0x00, 0x00, 0x00, 0x00, |
| 116 | 0x32, 0x10, 0x03, 0x00, |
| 117 | 0x03, 0x03, 0x60, 0x03, |
| 118 | 0x60, 0x00, 0x08, 0x00, |
| 119 | 0x08, 0x45, 0x44, 0x08, |
| 120 | 0x08, 0x37, 0x08, 0x08, |
| 121 | 0x37, 0x09, 0xFF, 0xFF, |
| 122 | }; |
| 123 | |
Ray Zhang | 629831b | 2015-03-30 14:18:06 +0800 | [diff] [blame] | 124 | static char hx8379c_fwvga_video_on_cmd9[] = { |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 125 | 0x23, 0x00, 0x39, 0xC0, |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 126 | 0xD5, 0x18, 0x18, 0x19, |
| 127 | 0x19, 0x18, 0x18, 0x20, |
| 128 | 0x21, 0x24, 0x25, 0x18, |
| 129 | 0x18, 0x18, 0x18, 0x00, |
| 130 | 0x01, 0x04, 0x05, 0x02, |
| 131 | 0x03, 0x06, 0x07, 0x18, |
| 132 | 0x18, 0x18, 0x18, 0x18, |
| 133 | 0x18, 0x18, 0x18, 0x18, |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 134 | 0x18, 0x00, 0x00, 0xFF, |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 135 | }; |
| 136 | |
Ray Zhang | 629831b | 2015-03-30 14:18:06 +0800 | [diff] [blame] | 137 | static char hx8379c_fwvga_video_on_cmd10[] = { |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 138 | 0x21, 0x00, 0x39, 0xC0, |
| 139 | 0xD6, 0x18, 0x18, 0x18, |
| 140 | 0x18, 0x19, 0x19, 0x25, |
| 141 | 0x24, 0x21, 0x20, 0x18, |
| 142 | 0x18, 0x18, 0x18, 0x05, |
| 143 | 0x04, 0x01, 0x00, 0x03, |
| 144 | 0x02, 0x07, 0x06, 0x18, |
| 145 | 0x18, 0x18, 0x18, 0x18, |
| 146 | 0x18, 0x18, 0x18, 0x18, |
| 147 | 0x18, 0xFF, 0xFF, 0xFF, |
| 148 | }; |
| 149 | |
Ray Zhang | 629831b | 2015-03-30 14:18:06 +0800 | [diff] [blame] | 150 | static char hx8379c_fwvga_video_on_cmd11[] = { |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 151 | 0x2B, 0x00, 0x39, 0xC0, |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 152 | 0xE0, 0x00, 0x04, 0x0B, |
| 153 | 0x2F, 0x39, 0x3F, 0x21, |
| 154 | 0x46, 0x07, 0x0A, 0x0C, |
| 155 | 0x17, 0x0F, 0x13, 0x16, |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 156 | 0x14, 0x15, 0x07, 0x11, |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 157 | 0x13, 0x30, 0x00, 0x04, |
| 158 | 0x0B, 0x2F, 0x3A, 0x3F, |
| 159 | 0x21, 0x46, 0x07, 0x0A, |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 160 | 0x0C, 0x17, 0x0F, 0x14, |
| 161 | 0x16, 0x14, 0x15, 0x07, |
| 162 | 0x11, 0x13, 0x16, 0xFF, |
| 163 | }; |
| 164 | |
Ray Zhang | 629831b | 2015-03-30 14:18:06 +0800 | [diff] [blame] | 165 | static char hx8379c_fwvga_video_on_cmd12[] = { |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 166 | 0x03, 0x00, 0x39, 0xC0, |
| 167 | 0xB6, 0x4E, 0x4E, 0xFF, |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 168 | }; |
| 169 | |
Ray Zhang | 629831b | 2015-03-30 14:18:06 +0800 | [diff] [blame] | 170 | static char hx8379c_fwvga_video_on_cmd13[] = { |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 171 | 0x11, 0x00, 0x05, 0x80 |
| 172 | }; |
| 173 | |
Ray Zhang | 629831b | 2015-03-30 14:18:06 +0800 | [diff] [blame] | 174 | static char hx8379c_fwvga_video_on_cmd14[] = { |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 175 | 0x29, 0x00, 0x05, 0x80 |
| 176 | }; |
| 177 | |
| 178 | static struct mipi_dsi_cmd hx8379c_fwvga_video_on_command[] = { |
| 179 | {0x8, hx8379c_fwvga_video_on_cmd0, 0x00}, |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 180 | {0x18, hx8379c_fwvga_video_on_cmd1, 0x00}, |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 181 | {0x10, hx8379c_fwvga_video_on_cmd2, 0x00}, |
| 182 | {0x10, hx8379c_fwvga_video_on_cmd3, 0x00}, |
Ray Zhang | 629831b | 2015-03-30 14:18:06 +0800 | [diff] [blame] | 183 | {0x10, hx8379c_fwvga_video_on_cmd4, 0x00}, |
| 184 | {0xc, hx8379c_fwvga_video_on_cmd5, 0x00}, |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 185 | {0x8, hx8379c_fwvga_video_on_cmd6, 0x00}, |
Ray Zhang | 629831b | 2015-03-30 14:18:06 +0800 | [diff] [blame] | 186 | {0x8, hx8379c_fwvga_video_on_cmd7, 0x00}, |
| 187 | {0x24, hx8379c_fwvga_video_on_cmd8, 0x00}, |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 188 | {0x28, hx8379c_fwvga_video_on_cmd9, 0x00}, |
Ray Zhang | 629831b | 2015-03-30 14:18:06 +0800 | [diff] [blame] | 189 | {0x28, hx8379c_fwvga_video_on_cmd10, 0x00}, |
| 190 | {0x30, hx8379c_fwvga_video_on_cmd11, 0x00}, |
| 191 | {0x8, hx8379c_fwvga_video_on_cmd12, 0x00}, |
| 192 | {0x4, hx8379c_fwvga_video_on_cmd13, 0x78}, |
| 193 | {0x4, hx8379c_fwvga_video_on_cmd14, 0x14} |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 194 | }; |
| 195 | |
Ray Zhang | 629831b | 2015-03-30 14:18:06 +0800 | [diff] [blame] | 196 | #define HX8379C_FWVGA_VIDEO_ON_COMMAND 15 |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 197 | |
| 198 | |
| 199 | static char hx8379c_fwvga_videooff_cmd0[] = { |
| 200 | 0x28, 0x00, 0x05, 0x80 |
| 201 | }; |
| 202 | |
| 203 | static char hx8379c_fwvga_videooff_cmd1[] = { |
| 204 | 0x10, 0x00, 0x05, 0x80 |
| 205 | }; |
| 206 | |
| 207 | static struct mipi_dsi_cmd hx8379c_fwvga_video_off_command[] = { |
| 208 | {0x4, hx8379c_fwvga_videooff_cmd0, 0x32}, |
| 209 | {0x4, hx8379c_fwvga_videooff_cmd1, 0x78} |
| 210 | }; |
| 211 | |
| 212 | #define HX8379C_FWVGA_VIDEO_OFF_COMMAND 2 |
| 213 | |
| 214 | |
| 215 | static struct command_state hx8379c_fwvga_video_state = { |
| 216 | 0, 0 |
| 217 | }; |
| 218 | |
| 219 | /*---------------------------------------------------------------------------*/ |
| 220 | /* Command mode panel information */ |
| 221 | /*---------------------------------------------------------------------------*/ |
| 222 | static struct commandpanel_info hx8379c_fwvga_video_command_panel = { |
| 223 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| 224 | }; |
| 225 | |
| 226 | /*---------------------------------------------------------------------------*/ |
| 227 | /* Video mode panel information */ |
| 228 | /*---------------------------------------------------------------------------*/ |
| 229 | static struct videopanel_info hx8379c_fwvga_video_video_panel = { |
| 230 | 1, 0, 0, 0, 1, 1, 2, 0, 0x9 |
| 231 | }; |
| 232 | |
| 233 | /*---------------------------------------------------------------------------*/ |
| 234 | /* Lane configuration */ |
| 235 | /*---------------------------------------------------------------------------*/ |
| 236 | static struct lane_configuration hx8379c_fwvga_video_lane_config = { |
Ray Zhang | 0d303af | 2015-01-21 10:17:02 +0800 | [diff] [blame] | 237 | 2, 0, 1, 1, 0, 0, 0 |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 238 | }; |
| 239 | |
| 240 | /*---------------------------------------------------------------------------*/ |
| 241 | /* Panel timing */ |
| 242 | /*---------------------------------------------------------------------------*/ |
| 243 | static const uint32_t hx8379c_fwvga_video_timings[] = { |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 244 | 0x7B, 0x21, 0x1A, 0x00, 0x31, 0x2D, 0x1E, 0x23, 0x2B, 0x03, 0x04, 0x00 |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 245 | }; |
| 246 | |
| 247 | static struct panel_timing hx8379c_fwvga_video_timing_info = { |
| 248 | 0, 4, 0x20, 0x2c |
| 249 | }; |
| 250 | |
| 251 | /*---------------------------------------------------------------------------*/ |
| 252 | /* Panel reset sequence */ |
| 253 | /*---------------------------------------------------------------------------*/ |
| 254 | static struct panel_reset_sequence hx8379c_fwvga_video_reset_seq = { |
Ray Zhang | 37ffcd8 | 2015-02-05 19:28:08 +0800 | [diff] [blame] | 255 | {1, 0, 1, }, {20, 2, 20, }, 2 |
Ray Zhang | f1ff55c | 2014-11-18 15:50:44 +0800 | [diff] [blame] | 256 | }; |
| 257 | |
| 258 | /*---------------------------------------------------------------------------*/ |
| 259 | /* Backlight setting */ |
| 260 | /*---------------------------------------------------------------------------*/ |
| 261 | static struct backlight hx8379c_fwvga_video_backlight = { |
| 262 | 1, 1, 4095, 100, 1, "PMIC_8941" |
| 263 | }; |
| 264 | |
| 265 | #define HX8379C_FWVGA_VIDEO_SIGNATURE 0xFFFF |
| 266 | |
| 267 | #endif /*_PANEL_HX8379A_FWVGA_SKUA_VIDEO_H_*/ |