liuyan | 8c8b2c0 | 2015-01-26 15:27:19 +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_OTM1902B_1080P_CMD_H_ |
| 37 | |
| 38 | #define _PANEL_OTM1902B_1080P_CMD_H_ |
| 39 | /*---------------------------------------------------------------------------*/ |
| 40 | /* HEADER files */ |
| 41 | /*---------------------------------------------------------------------------*/ |
| 42 | #include "panel.h" |
| 43 | |
| 44 | /*---------------------------------------------------------------------------*/ |
| 45 | /* Panel configuration */ |
| 46 | /*---------------------------------------------------------------------------*/ |
| 47 | |
| 48 | static struct panel_config otm1902b_1080p_cmd_panel_data = { |
| 49 | "qcom,mdss_dsi_otm1902b_1080p_cmd", "dsi:0:", "qcom,mdss-dsi-panel", |
| 50 | 10, 1, "DISPLAY_1", 0, 424000000, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| 51 | }; |
| 52 | |
| 53 | /*---------------------------------------------------------------------------*/ |
| 54 | /* Panel resolution */ |
| 55 | /*---------------------------------------------------------------------------*/ |
| 56 | static struct panel_resolution otm1902b_1080p_cmd_panel_res = { |
liuyan | 04e7c7a | 2015-02-09 19:50:08 +0800 | [diff] [blame] | 57 | 1080, 1920, 40, 64, 8, 0, 6, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
liuyan | 8c8b2c0 | 2015-01-26 15:27:19 +0800 | [diff] [blame] | 58 | }; |
| 59 | |
| 60 | /*---------------------------------------------------------------------------*/ |
| 61 | /* Panel Color Information */ |
| 62 | /*---------------------------------------------------------------------------*/ |
| 63 | static struct color_info otm1902b_1080p_cmd_color = { |
| 64 | 24, 0, 0xff, 0, 0, 0 |
| 65 | }; |
| 66 | |
| 67 | /*---------------------------------------------------------------------------*/ |
| 68 | /* Panel Command information */ |
| 69 | /*---------------------------------------------------------------------------*/ |
| 70 | static char otm1902b_1080p_cmd_on_cmd0[] = { |
| 71 | 0x02, 0x00, 0x29, 0xC0, |
| 72 | 0x00, 0xFF, 0xFF, 0xFF, }; |
| 73 | |
| 74 | |
| 75 | static char otm1902b_1080p_cmd_on_cmd1[] = { |
| 76 | 0x02, 0x00, 0x29, 0xC0, |
| 77 | 0x19, 0x02, 0xFF, 0xFF, }; |
| 78 | |
| 79 | |
| 80 | static char otm1902b_1080p_cmd_on_cmd2[] = { |
| 81 | 0x02, 0x00, 0x29, 0xC0, |
| 82 | 0x01, 0x00, 0xFF, 0xFF, }; |
| 83 | |
| 84 | |
| 85 | static char otm1902b_1080p_cmd_on_cmd3[] = { |
| 86 | 0x02, 0x00, 0x29, 0xC0, |
| 87 | 0x80, 0xFF, 0xFF, 0xFF, }; |
| 88 | |
| 89 | |
| 90 | static char otm1902b_1080p_cmd_on_cmd4[] = { |
| 91 | 0x02, 0x00, 0x29, 0xC0, |
| 92 | 0x19, 0x02, 0xFF, 0xFF, }; |
| 93 | |
| 94 | |
| 95 | static char otm1902b_1080p_cmd_on_cmd5[] = { |
| 96 | 0x02, 0x00, 0x29, 0xC0, |
| 97 | 0x00, 0x83, 0xFF, 0xFF, }; |
| 98 | |
| 99 | |
| 100 | static char otm1902b_1080p_cmd_on_cmd6[] = { |
| 101 | 0x02, 0x00, 0x29, 0xC0, |
| 102 | 0xF3, 0xCA, 0xFF, 0xFF, }; |
| 103 | |
| 104 | |
| 105 | static char otm1902b_1080p_cmd_on_cmd7[] = { |
| 106 | 0x02, 0x00, 0x29, 0xC0, |
| 107 | 0x00, 0x90, 0xFF, 0xFF, }; |
| 108 | |
| 109 | |
| 110 | static char otm1902b_1080p_cmd_on_cmd8[] = { |
| 111 | 0x02, 0x00, 0x29, 0xC0, |
| 112 | 0xc4, 0x00, 0xFF, 0xFF, }; |
| 113 | |
| 114 | |
| 115 | static char otm1902b_1080p_cmd_on_cmd9[] = { |
| 116 | 0x02, 0x00, 0x29, 0xC0, |
| 117 | 0x00, 0xB4, 0xFF, 0xFF, }; |
| 118 | |
| 119 | |
| 120 | static char otm1902b_1080p_cmd_on_cmd10[] = { |
| 121 | 0x02, 0x00, 0x29, 0xC0, |
| 122 | 0xC0, 0xC0, 0xFF, 0xFF, }; |
| 123 | |
| 124 | |
| 125 | static char otm1902b_1080p_cmd_on_cmd11[] = { |
| 126 | 0x02, 0x00, 0x29, 0xC0, |
| 127 | 0x2A, 0x00, 0xFF, 0xFF, }; |
| 128 | |
| 129 | |
| 130 | static char otm1902b_1080p_cmd_on_cmd12[] = { |
| 131 | 0x02, 0x00, 0x29, 0xC0, |
| 132 | 0x00, 0x04, 0xFF, 0xFF, }; |
| 133 | |
| 134 | |
| 135 | static char otm1902b_1080p_cmd_on_cmd13[] = { |
| 136 | 0x02, 0x00, 0x29, 0xC0, |
| 137 | 0x37, 0x2B, 0xFF, 0xFF, }; |
| 138 | |
| 139 | |
| 140 | static char otm1902b_1080p_cmd_on_cmd14[] = { |
| 141 | 0x02, 0x00, 0x29, 0xC0, |
| 142 | 0x00, 0x00, 0xFF, 0xFF, }; |
| 143 | |
| 144 | |
| 145 | static char otm1902b_1080p_cmd_on_cmd15[] = { |
| 146 | 0x02, 0x00, 0x29, 0xC0, |
| 147 | 0x07, 0x7F, 0xFF, 0xFF, }; |
| 148 | |
| 149 | |
| 150 | static char otm1902b_1080p_cmd_on_cmd16[] = { |
| 151 | 0x02, 0x00, 0x29, 0xC0, |
liuyan | 04e7c7a | 2015-02-09 19:50:08 +0800 | [diff] [blame] | 152 | 0x53, 0x2C, 0xFF, 0xFF, }; |
liuyan | 8c8b2c0 | 2015-01-26 15:27:19 +0800 | [diff] [blame] | 153 | |
| 154 | |
| 155 | static char otm1902b_1080p_cmd_on_cmd17[] = { |
| 156 | 0x02, 0x00, 0x29, 0xC0, |
liuyan | 04e7c7a | 2015-02-09 19:50:08 +0800 | [diff] [blame] | 157 | 0x51, 0xFF, 0xFF, 0xFF, }; |
| 158 | |
| 159 | static char otm1902b_1080p_cmd_on_cmd18[] = { |
| 160 | 0x11, 0x00, 0x05, 0x80, }; |
| 161 | |
| 162 | static char otm1902b_1080p_cmd_on_cmd19[] = { |
| 163 | 0x29, 0x00, 0x05, 0x80, }; |
liuyan | 8c8b2c0 | 2015-01-26 15:27:19 +0800 | [diff] [blame] | 164 | |
| 165 | static struct mipi_dsi_cmd otm1902b_1080p_cmd_on_command[] = { |
liuyan | 04e7c7a | 2015-02-09 19:50:08 +0800 | [diff] [blame] | 166 | { 0x8 , otm1902b_1080p_cmd_on_cmd0 ,0x01}, |
| 167 | { 0x8 , otm1902b_1080p_cmd_on_cmd1 ,0x01}, |
| 168 | { 0x8 , otm1902b_1080p_cmd_on_cmd2 ,0x01}, |
| 169 | { 0x8 , otm1902b_1080p_cmd_on_cmd3 ,0x01}, |
| 170 | { 0x8 , otm1902b_1080p_cmd_on_cmd4 ,0x01}, |
| 171 | { 0x8 , otm1902b_1080p_cmd_on_cmd5 ,0x01}, |
| 172 | { 0x8 , otm1902b_1080p_cmd_on_cmd6 ,0x01}, |
| 173 | { 0x8 , otm1902b_1080p_cmd_on_cmd7 ,0x01}, |
| 174 | { 0x8 , otm1902b_1080p_cmd_on_cmd8 ,0x01}, |
| 175 | { 0x8 , otm1902b_1080p_cmd_on_cmd9 ,0x01}, |
| 176 | { 0x8 , otm1902b_1080p_cmd_on_cmd10 ,0x01}, |
| 177 | { 0x8 , otm1902b_1080p_cmd_on_cmd11 ,0x01}, |
| 178 | { 0x8 , otm1902b_1080p_cmd_on_cmd12 ,0x01}, |
| 179 | { 0x8 , otm1902b_1080p_cmd_on_cmd13 ,0x01}, |
| 180 | { 0x8 , otm1902b_1080p_cmd_on_cmd14 ,0x01}, |
| 181 | { 0x8 , otm1902b_1080p_cmd_on_cmd15 ,0x01}, |
| 182 | { 0x8 , otm1902b_1080p_cmd_on_cmd16 ,0x01}, |
liuyan | 04e7c7a | 2015-02-09 19:50:08 +0800 | [diff] [blame] | 183 | { 0x4 , otm1902b_1080p_cmd_on_cmd18 , 0x32}, |
| 184 | { 0x4 , otm1902b_1080p_cmd_on_cmd19 , 0x60}, |
liuyan | 8c8b2c0 | 2015-01-26 15:27:19 +0800 | [diff] [blame] | 185 | }; |
dongzq0414 | a568ba4 | 2015-08-12 17:32:10 +0800 | [diff] [blame^] | 186 | #define OTM1902B_1080P_CMD_ON_COMMAND 19 |
liuyan | 8c8b2c0 | 2015-01-26 15:27:19 +0800 | [diff] [blame] | 187 | |
| 188 | static char otm1902b_1080p_cmdoff_cmd0[] = { |
| 189 | 0x28, 0x00, 0x05, 0x80 }; |
| 190 | |
| 191 | |
| 192 | static char otm1902b_1080p_cmdoff_cmd1[] = { |
| 193 | 0x10, 0x00, 0x05, 0x80 }; |
| 194 | |
| 195 | |
| 196 | |
| 197 | |
| 198 | static struct mipi_dsi_cmd otm1902b_1080p_cmd_off_command[] = { |
| 199 | { 0x4 , otm1902b_1080p_cmdoff_cmd0 , 0x32}, |
| 200 | { 0x4 , otm1902b_1080p_cmdoff_cmd1 , 0x64} |
| 201 | }; |
| 202 | #define OTM1902B_1080P_CMD_OFF_COMMAND 2 |
| 203 | |
| 204 | |
| 205 | static struct command_state otm1902b_1080p_cmd_state = { |
| 206 | 0, 1 |
| 207 | }; |
| 208 | |
| 209 | /*---------------------------------------------------------------------------*/ |
| 210 | /* Command mode panel information */ |
| 211 | /*---------------------------------------------------------------------------*/ |
| 212 | |
| 213 | static struct commandpanel_info otm1902b_1080p_cmd_command_panel = { |
| 214 | 1, 1, 1, 0, 0, 0x2c, 0, 0, 0, 1, 0, 0 |
| 215 | }; |
| 216 | |
| 217 | /*---------------------------------------------------------------------------*/ |
| 218 | /* Video mode panel information */ |
| 219 | /*---------------------------------------------------------------------------*/ |
| 220 | |
| 221 | static struct videopanel_info otm1902b_1080p_cmd_video_panel = { |
| 222 | 1, 0, 0, 0, 1, 1, 2, 0, 0x9 |
| 223 | }; |
| 224 | |
| 225 | /*---------------------------------------------------------------------------*/ |
| 226 | /* Lane Configuration */ |
| 227 | /*---------------------------------------------------------------------------*/ |
| 228 | |
| 229 | static struct lane_configuration otm1902b_1080p_cmd_lane_config = { |
| 230 | 4, 0, 1, 1, 1, 1 |
| 231 | }; |
| 232 | |
| 233 | |
| 234 | /*---------------------------------------------------------------------------*/ |
| 235 | /* Panel Timing */ |
| 236 | /*---------------------------------------------------------------------------*/ |
| 237 | const uint32_t otm1902b_1080p_cmd_timings[] = { |
| 238 | 0xd5, 0x32, 0x22, 0x00, 0x60, 0x64, 0x26, 0x34, 0x29, 0x03, 0x04, 0x00 |
| 239 | }; |
| 240 | |
| 241 | |
| 242 | |
| 243 | //static struct mipi_dsi_cmd otm1902b_1080p_cmd_rotation[] = { |
| 244 | |
| 245 | //}; |
| 246 | //#define OTM1902B_1080P_CMD_ROTATION 0 |
| 247 | |
| 248 | |
| 249 | static struct panel_timing otm1902b_1080p_cmd_timing_info = { |
| 250 | 0, 4, 0x1e, 0x38 |
| 251 | }; |
| 252 | |
| 253 | static struct panel_reset_sequence otm1902b_1080p_cmd_panel_reset_seq = { |
| 254 | { 1, 0, 1, }, { 20, 20, 20, }, 2 |
| 255 | }; |
| 256 | |
| 257 | /*---------------------------------------------------------------------------*/ |
| 258 | /* Backlight Settings */ |
| 259 | /*---------------------------------------------------------------------------*/ |
| 260 | |
| 261 | static struct backlight otm1902b_1080p_cmd_backlight = { |
| 262 | 1, 0, 255, 100, 2, "PMIC_8941" |
| 263 | }; |
| 264 | |
| 265 | |
| 266 | |
| 267 | #endif /*_PANEL_OTM1902B_1080P_CMD_H_*/ |