Veera Sundaram Sankaran | ed3be8d | 2015-02-25 19:04:42 -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 | #ifndef _PANEL_SHARP_1080P_CMD_H_ |
| 31 | #define _PANEL_SHARP_1080P_CMD_H_ |
| 32 | |
| 33 | /*---------------------------------------------------------------------------*/ |
| 34 | /* HEADER files */ |
| 35 | /*---------------------------------------------------------------------------*/ |
| 36 | #include "panel.h" |
| 37 | |
| 38 | /*---------------------------------------------------------------------------*/ |
| 39 | /* Panel configuration */ |
| 40 | /*---------------------------------------------------------------------------*/ |
| 41 | static struct panel_config sharp_1080p_cmd_panel_data = { |
| 42 | "qcom,mdss_dsi_sharp_1080p_cmd", "dsi:0:", "qcom,mdss-dsi-panel", |
| 43 | 10, 1, "DISPLAY_1", 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| 44 | }; |
| 45 | |
| 46 | /*---------------------------------------------------------------------------*/ |
| 47 | /* Panel resolution */ |
| 48 | /*---------------------------------------------------------------------------*/ |
| 49 | static struct panel_resolution sharp_1080p_cmd_panel_res = { |
| 50 | 1080, 1920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| 51 | }; |
| 52 | |
| 53 | /*---------------------------------------------------------------------------*/ |
| 54 | /* Panel Color Information */ |
| 55 | /*---------------------------------------------------------------------------*/ |
| 56 | static struct color_info sharp_1080p_cmd_color = { |
| 57 | 24, 0, 0xff, 0, 0, 0 |
| 58 | }; |
| 59 | |
| 60 | /*---------------------------------------------------------------------------*/ |
| 61 | /* Panel Command information */ |
| 62 | /*---------------------------------------------------------------------------*/ |
| 63 | static char sharp_1080p_cmd_on_cmd0[] = { |
| 64 | 0xbb, 0x10, 0x15, 0x80 |
| 65 | }; |
| 66 | |
| 67 | static char sharp_1080p_cmd_on_cmd1[] = { |
| 68 | 0xb0, 0x03, 0x15, 0x80 |
| 69 | }; |
| 70 | |
| 71 | static char sharp_1080p_cmd_on_cmd2[] = { |
| 72 | 0x11, 0x00, 0x05, 0x80 |
| 73 | }; |
| 74 | |
| 75 | static char sharp_1080p_cmd_on_cmd3[] = { |
| 76 | 0x51, 0xff, 0x15, 0x80 |
| 77 | }; |
| 78 | |
| 79 | static char sharp_1080p_cmd_on_cmd4[] = { |
| 80 | 0x53, 0x24, 0x15, 0x80 |
| 81 | }; |
| 82 | |
| 83 | static char sharp_1080p_cmd_on_cmd5[] = { |
| 84 | 0xff, 0x23, 0x15, 0x80 |
| 85 | }; |
| 86 | |
| 87 | static char sharp_1080p_cmd_on_cmd6[] = { |
| 88 | 0x08, 0x05, 0x15, 0x80 |
| 89 | }; |
| 90 | |
| 91 | static char sharp_1080p_cmd_on_cmd7[] = { |
| 92 | 0x46, 0x90, 0x15, 0x80 |
| 93 | }; |
| 94 | |
| 95 | static char sharp_1080p_cmd_on_cmd8[] = { |
| 96 | 0xff, 0x10, 0x15, 0x80 |
| 97 | }; |
| 98 | |
| 99 | static char sharp_1080p_cmd_on_cmd9[] = { |
| 100 | 0xff, 0xf0, 0x15, 0x80 |
| 101 | }; |
| 102 | |
| 103 | static char sharp_1080p_cmd_on_cmd10[] = { |
| 104 | 0x92, 0x01, 0x15, 0x80 |
| 105 | }; |
| 106 | |
| 107 | static char sharp_1080p_cmd_on_cmd11[] = { |
| 108 | 0xff, 0x10, 0x15, 0x80 |
| 109 | }; |
| 110 | |
| 111 | static char sharp_1080p_cmd_on_cmd12[] = { |
| 112 | 0x29, 0x00, 0x05, 0x80 |
| 113 | }; |
| 114 | |
| 115 | static struct mipi_dsi_cmd sharp_1080p_cmd_on_command[] = { |
| 116 | {0x4 , sharp_1080p_cmd_on_cmd0, 0x00}, |
| 117 | {0x4 , sharp_1080p_cmd_on_cmd1, 0x00}, |
| 118 | {0x3 , sharp_1080p_cmd_on_cmd2, 0x78}, |
| 119 | {0x4 , sharp_1080p_cmd_on_cmd3, 0x00}, |
| 120 | {0x4 , sharp_1080p_cmd_on_cmd4, 0x00}, |
| 121 | {0x4 , sharp_1080p_cmd_on_cmd5, 0x00}, |
| 122 | {0x4 , sharp_1080p_cmd_on_cmd6, 0x00}, |
| 123 | {0x4 , sharp_1080p_cmd_on_cmd7, 0x00}, |
| 124 | {0x4 , sharp_1080p_cmd_on_cmd8, 0x00}, |
| 125 | {0x4 , sharp_1080p_cmd_on_cmd9, 0x00}, |
| 126 | {0x4 , sharp_1080p_cmd_on_cmd10, 0x00}, |
| 127 | {0x4 , sharp_1080p_cmd_on_cmd11, 0x00}, |
| 128 | {0x3 , sharp_1080p_cmd_on_cmd12, 0x28} |
| 129 | }; |
| 130 | |
| 131 | #define SHARP_1080P_CMD_ON_COMMAND 13 |
| 132 | |
| 133 | |
| 134 | static char sharp_1080p_cmdoff_cmd0[] = { |
| 135 | 0x28, 0x00, 0x05, 0x80 |
| 136 | }; |
| 137 | |
| 138 | static char sharp_1080p_cmdoff_cmd1[] = { |
| 139 | 0x10, 0x00, 0x05, 0x80 |
| 140 | }; |
| 141 | |
| 142 | static struct mipi_dsi_cmd sharp_1080p_cmd_off_command[] = { |
| 143 | {0x4 , sharp_1080p_cmdoff_cmd0, 0}, |
| 144 | {0x4 , sharp_1080p_cmdoff_cmd1, 0} |
| 145 | }; |
| 146 | |
| 147 | #define SHARP_1080P_CMD_OFF_COMMAND 2 |
| 148 | |
| 149 | |
| 150 | static struct command_state sharp_1080p_cmd_state = { |
| 151 | 0, 1 |
| 152 | }; |
| 153 | |
| 154 | /*---------------------------------------------------------------------------*/ |
| 155 | /* Command mode panel information */ |
| 156 | /*---------------------------------------------------------------------------*/ |
| 157 | static struct commandpanel_info sharp_1080p_cmd_command_panel = { |
| 158 | 1, 1, 1, 0, 0, 0x2c, 0x3c, 0, 0, 1, 0, 0 |
| 159 | }; |
| 160 | |
| 161 | /*---------------------------------------------------------------------------*/ |
| 162 | /* Video mode panel information */ |
| 163 | /*---------------------------------------------------------------------------*/ |
| 164 | static struct videopanel_info sharp_1080p_cmd_video_panel = { |
| 165 | 0, 0, 0, 0, 1, 1, 2, 0, 0x9 |
| 166 | }; |
| 167 | |
| 168 | /*---------------------------------------------------------------------------*/ |
| 169 | /* Lane Configuration */ |
| 170 | /*---------------------------------------------------------------------------*/ |
| 171 | static struct lane_configuration sharp_1080p_cmd_lane_config = { |
| 172 | 4, 0, 1, 1, 1, 1, 0 |
| 173 | }; |
| 174 | |
| 175 | /*---------------------------------------------------------------------------*/ |
| 176 | /* Panel Timing */ |
| 177 | /*---------------------------------------------------------------------------*/ |
| 178 | static const uint32_t sharp_1080p_cmd_timings[] = { |
| 179 | 0xe7, 0x36, 0x24, 0x00, 0x66, 0x6a, 0x2a, 0x3a, 0x2d, 0x03, 0x04, 0x00 |
| 180 | }; |
| 181 | |
| 182 | static struct panel_timing sharp_1080p_cmd_timing_info = { |
| 183 | 0x0, 0x04, 0x04, 0x1b |
| 184 | }; |
| 185 | |
| 186 | /*---------------------------------------------------------------------------*/ |
| 187 | /* Panel reset sequence */ |
| 188 | /*---------------------------------------------------------------------------*/ |
| 189 | static struct panel_reset_sequence sharp_1080p_cmd_panel_reset_seq = { |
| 190 | { 1, 0, 1, }, { 10, 10, 10, }, 2 |
| 191 | }; |
| 192 | |
| 193 | /*---------------------------------------------------------------------------*/ |
| 194 | /* Backlight Settings */ |
| 195 | /*---------------------------------------------------------------------------*/ |
| 196 | static struct backlight sharp_1080p_cmd_backlight = { |
| 197 | 1, 1, 4095, 100, 1, "PMIC_8941" |
| 198 | }; |
| 199 | |
| 200 | #endif /*_PANEL_sharp_1080P_CMD_H_*/ |