1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright (c) 2018 MediaTek Inc.
4  * Author: Jitao Shi <jitao.shi@mediatek.com>
5  */
6 
7 #include <linux/delay.h>
8 #include <linux/gpio/consumer.h>
9 #include <linux/module.h>
10 #include <linux/of.h>
11 #include <linux/regulator/consumer.h>
12 
13 #include <drm/drm_connector.h>
14 #include <drm/drm_crtc.h>
15 #include <drm/drm_mipi_dsi.h>
16 #include <drm/drm_panel.h>
17 
18 #include <video/mipi_display.h>
19 
20 struct panel_desc {
21 	const struct drm_display_mode *modes;
22 	unsigned int bpc;
23 
24 	/**
25 	 * @width_mm: width of the panel's active display area
26 	 * @height_mm: height of the panel's active display area
27 	 */
28 	struct {
29 		unsigned int width_mm;
30 		unsigned int height_mm;
31 	} size;
32 
33 	unsigned long mode_flags;
34 	enum mipi_dsi_pixel_format format;
35 	const struct panel_init_cmd *init_cmds;
36 	unsigned int lanes;
37 	bool discharge_on_disable;
38 	bool lp11_before_reset;
39 };
40 
41 struct boe_panel {
42 	struct drm_panel base;
43 	struct mipi_dsi_device *dsi;
44 
45 	const struct panel_desc *desc;
46 
47 	enum drm_panel_orientation orientation;
48 	struct regulator *pp3300;
49 	struct regulator *pp1800;
50 	struct regulator *avee;
51 	struct regulator *avdd;
52 	struct gpio_desc *enable_gpio;
53 
54 	bool prepared;
55 };
56 
57 enum dsi_cmd_type {
58 	INIT_DCS_CMD,
59 	DELAY_CMD,
60 };
61 
62 struct panel_init_cmd {
63 	enum dsi_cmd_type type;
64 	size_t len;
65 	const char *data;
66 };
67 
68 #define _INIT_DCS_CMD(...) { \
69 	.type = INIT_DCS_CMD, \
70 	.len = sizeof((char[]){__VA_ARGS__}), \
71 	.data = (char[]){__VA_ARGS__} }
72 
73 #define _INIT_DELAY_CMD(...) { \
74 	.type = DELAY_CMD,\
75 	.len = sizeof((char[]){__VA_ARGS__}), \
76 	.data = (char[]){__VA_ARGS__} }
77 
78 static const struct panel_init_cmd boe_tv110c9m_init_cmd[] = {
79 	_INIT_DCS_CMD(0xFF, 0x20),
80 	_INIT_DCS_CMD(0xFB, 0x01),
81 	_INIT_DCS_CMD(0x05, 0xD9),
82 	_INIT_DCS_CMD(0x07, 0x78),
83 	_INIT_DCS_CMD(0x08, 0x5A),
84 	_INIT_DCS_CMD(0x0D, 0x63),
85 	_INIT_DCS_CMD(0x0E, 0x91),
86 	_INIT_DCS_CMD(0x0F, 0x73),
87 	_INIT_DCS_CMD(0x95, 0xE6),
88 	_INIT_DCS_CMD(0x96, 0xF0),
89 	_INIT_DCS_CMD(0x30, 0x00),
90 	_INIT_DCS_CMD(0x6D, 0x66),
91 	_INIT_DCS_CMD(0x75, 0xA2),
92 	_INIT_DCS_CMD(0x77, 0x3B),
93 
94 	_INIT_DCS_CMD(0xB0, 0x00, 0x08, 0x00, 0x23, 0x00, 0x4D, 0x00, 0x6D, 0x00, 0x89, 0x00, 0xA1, 0x00, 0xB6, 0x00, 0xC9),
95 	_INIT_DCS_CMD(0xB1, 0x00, 0xDA, 0x01, 0x13, 0x01, 0x3C, 0x01, 0x7E, 0x01, 0xAB, 0x01, 0xF7, 0x02, 0x2F, 0x02, 0x31),
96 	_INIT_DCS_CMD(0xB2, 0x02, 0x67, 0x02, 0xA6, 0x02, 0xD1, 0x03, 0x08, 0x03, 0x2E, 0x03, 0x5B, 0x03, 0x6B, 0x03, 0x7B),
97 	_INIT_DCS_CMD(0xB3, 0x03, 0x8E, 0x03, 0xA2, 0x03, 0xB7, 0x03, 0xE7, 0x03, 0xFD, 0x03, 0xFF),
98 
99 	_INIT_DCS_CMD(0xB4, 0x00, 0x08, 0x00, 0x23, 0x00, 0x4D, 0x00, 0x6D, 0x00, 0x89, 0x00, 0xA1, 0x00, 0xB6, 0x00, 0xC9),
100 	_INIT_DCS_CMD(0xB5, 0x00, 0xDA, 0x01, 0x13, 0x01, 0x3C, 0x01, 0x7E, 0x01, 0xAB, 0x01, 0xF7, 0x02, 0x2F, 0x02, 0x31),
101 	_INIT_DCS_CMD(0xB6, 0x02, 0x67, 0x02, 0xA6, 0x02, 0xD1, 0x03, 0x08, 0x03, 0x2E, 0x03, 0x5B, 0x03, 0x6B, 0x03, 0x7B),
102 	_INIT_DCS_CMD(0xB7, 0x03, 0x8E, 0x03, 0xA2, 0x03, 0xB7, 0x03, 0xE7, 0x03, 0xFD, 0x03, 0xFF),
103 	_INIT_DCS_CMD(0xB8, 0x00, 0x08, 0x00, 0x23, 0x00, 0x4D, 0x00, 0x6D, 0x00, 0x89, 0x00, 0xA1, 0x00, 0xB6, 0x00, 0xC9),
104 	_INIT_DCS_CMD(0xB9, 0x00, 0xDA, 0x01, 0x13, 0x01, 0x3C, 0x01, 0x7E, 0x01, 0xAB, 0x01, 0xF7, 0x02, 0x2F, 0x02, 0x31),
105 	_INIT_DCS_CMD(0xBA, 0x02, 0x67, 0x02, 0xA6, 0x02, 0xD1, 0x03, 0x08, 0x03, 0x2E, 0x03, 0x5B, 0x03, 0x6B, 0x03, 0x7B),
106 	_INIT_DCS_CMD(0xBB, 0x03, 0x8E, 0x03, 0xA2, 0x03, 0xB7, 0x03, 0xE7, 0x03, 0xFD, 0x03, 0xFF),
107 
108 	_INIT_DCS_CMD(0xFF, 0x21),
109 	_INIT_DCS_CMD(0xFB, 0x01),
110 
111 	_INIT_DCS_CMD(0xB0, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x45, 0x00, 0x65, 0x00, 0x81, 0x00, 0x99, 0x00, 0xAE, 0x00, 0xC1),
112 	_INIT_DCS_CMD(0xB1, 0x00, 0xD2, 0x01, 0x0B, 0x01, 0x34, 0x01, 0x76, 0x01, 0xA3, 0x01, 0xEF, 0x02, 0x27, 0x02, 0x29),
113 	_INIT_DCS_CMD(0xB2, 0x02, 0x5F, 0x02, 0x9E, 0x02, 0xC9, 0x03, 0x00, 0x03, 0x26, 0x03, 0x53, 0x03, 0x63, 0x03, 0x73),
114 
115 	_INIT_DCS_CMD(0xB3, 0x03, 0x86, 0x03, 0x9A, 0x03, 0xAF, 0x03, 0xDF, 0x03, 0xF5, 0x03, 0xE0),
116 	_INIT_DCS_CMD(0xB4, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x45, 0x00, 0x65, 0x00, 0x81, 0x00, 0x99, 0x00, 0xAE, 0x00, 0xC1),
117 	_INIT_DCS_CMD(0xB5, 0x00, 0xD2, 0x01, 0x0B, 0x01, 0x34, 0x01, 0x76, 0x01, 0xA3, 0x01, 0xEF, 0x02, 0x27, 0x02, 0x29),
118 	_INIT_DCS_CMD(0xB6, 0x02, 0x5F, 0x02, 0x9E, 0x02, 0xC9, 0x03, 0x00, 0x03, 0x26, 0x03, 0x53, 0x03, 0x63, 0x03, 0x73),
119 	_INIT_DCS_CMD(0xB7, 0x03, 0x86, 0x03, 0x9A, 0x03, 0xAF, 0x03, 0xDF, 0x03, 0xF5, 0x03, 0xE0),
120 
121 	_INIT_DCS_CMD(0xB8, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x45, 0x00, 0x65, 0x00, 0x81, 0x00, 0x99, 0x00, 0xAE, 0x00, 0xC1),
122 	_INIT_DCS_CMD(0xB9, 0x00, 0xD2, 0x01, 0x0B, 0x01, 0x34, 0x01, 0x76, 0x01, 0xA3, 0x01, 0xEF, 0x02, 0x27, 0x02, 0x29),
123 	_INIT_DCS_CMD(0xBA, 0x02, 0x5F, 0x02, 0x9E, 0x02, 0xC9, 0x03, 0x00, 0x03, 0x26, 0x03, 0x53, 0x03, 0x63, 0x03, 0x73),
124 
125 	_INIT_DCS_CMD(0xBB, 0x03, 0x86, 0x03, 0x9A, 0x03, 0xAF, 0x03, 0xDF, 0x03, 0xF5, 0x03, 0xE0),
126 	_INIT_DCS_CMD(0xFF, 0x24),
127 	_INIT_DCS_CMD(0xFB, 0x01),
128 
129 	_INIT_DCS_CMD(0x00, 0x00),
130 	_INIT_DCS_CMD(0x01, 0x00),
131 
132 	_INIT_DCS_CMD(0x02, 0x1C),
133 	_INIT_DCS_CMD(0x03, 0x1C),
134 
135 	_INIT_DCS_CMD(0x04, 0x1D),
136 	_INIT_DCS_CMD(0x05, 0x1D),
137 
138 	_INIT_DCS_CMD(0x06, 0x04),
139 	_INIT_DCS_CMD(0x07, 0x04),
140 
141 	_INIT_DCS_CMD(0x08, 0x0F),
142 	_INIT_DCS_CMD(0x09, 0x0F),
143 
144 	_INIT_DCS_CMD(0x0A, 0x0E),
145 	_INIT_DCS_CMD(0x0B, 0x0E),
146 
147 	_INIT_DCS_CMD(0x0C, 0x0D),
148 	_INIT_DCS_CMD(0x0D, 0x0D),
149 
150 	_INIT_DCS_CMD(0x0E, 0x0C),
151 	_INIT_DCS_CMD(0x0F, 0x0C),
152 
153 	_INIT_DCS_CMD(0x10, 0x08),
154 	_INIT_DCS_CMD(0x11, 0x08),
155 
156 	_INIT_DCS_CMD(0x12, 0x00),
157 	_INIT_DCS_CMD(0x13, 0x00),
158 	_INIT_DCS_CMD(0x14, 0x00),
159 	_INIT_DCS_CMD(0x15, 0x00),
160 
161 	_INIT_DCS_CMD(0x16, 0x00),
162 	_INIT_DCS_CMD(0x17, 0x00),
163 
164 	_INIT_DCS_CMD(0x18, 0x1C),
165 	_INIT_DCS_CMD(0x19, 0x1C),
166 
167 	_INIT_DCS_CMD(0x1A, 0x1D),
168 	_INIT_DCS_CMD(0x1B, 0x1D),
169 
170 	_INIT_DCS_CMD(0x1C, 0x04),
171 	_INIT_DCS_CMD(0x1D, 0x04),
172 
173 	_INIT_DCS_CMD(0x1E, 0x0F),
174 	_INIT_DCS_CMD(0x1F, 0x0F),
175 
176 	_INIT_DCS_CMD(0x20, 0x0E),
177 	_INIT_DCS_CMD(0x21, 0x0E),
178 
179 	_INIT_DCS_CMD(0x22, 0x0D),
180 	_INIT_DCS_CMD(0x23, 0x0D),
181 
182 	_INIT_DCS_CMD(0x24, 0x0C),
183 	_INIT_DCS_CMD(0x25, 0x0C),
184 
185 	_INIT_DCS_CMD(0x26, 0x08),
186 	_INIT_DCS_CMD(0x27, 0x08),
187 
188 	_INIT_DCS_CMD(0x28, 0x00),
189 	_INIT_DCS_CMD(0x29, 0x00),
190 	_INIT_DCS_CMD(0x2A, 0x00),
191 	_INIT_DCS_CMD(0x2B, 0x00),
192 
193 	_INIT_DCS_CMD(0x2D, 0x20),
194 	_INIT_DCS_CMD(0x2F, 0x0A),
195 	_INIT_DCS_CMD(0x30, 0x44),
196 	_INIT_DCS_CMD(0x33, 0x0C),
197 	_INIT_DCS_CMD(0x34, 0x32),
198 
199 	_INIT_DCS_CMD(0x37, 0x44),
200 	_INIT_DCS_CMD(0x38, 0x40),
201 	_INIT_DCS_CMD(0x39, 0x00),
202 	_INIT_DCS_CMD(0x3A, 0x5D),
203 	_INIT_DCS_CMD(0x3B, 0x60),
204 	_INIT_DCS_CMD(0x3D, 0x42),
205 	_INIT_DCS_CMD(0x3F, 0x06),
206 	_INIT_DCS_CMD(0x43, 0x06),
207 	_INIT_DCS_CMD(0x47, 0x66),
208 	_INIT_DCS_CMD(0x4A, 0x5D),
209 	_INIT_DCS_CMD(0x4B, 0x60),
210 	_INIT_DCS_CMD(0x4C, 0x91),
211 	_INIT_DCS_CMD(0x4D, 0x21),
212 	_INIT_DCS_CMD(0x4E, 0x43),
213 	_INIT_DCS_CMD(0x51, 0x12),
214 	_INIT_DCS_CMD(0x52, 0x34),
215 	_INIT_DCS_CMD(0x55, 0x82, 0x02),
216 	_INIT_DCS_CMD(0x56, 0x04),
217 	_INIT_DCS_CMD(0x58, 0x21),
218 	_INIT_DCS_CMD(0x59, 0x30),
219 	_INIT_DCS_CMD(0x5A, 0x60),
220 	_INIT_DCS_CMD(0x5B, 0x50),
221 	_INIT_DCS_CMD(0x5E, 0x00, 0x06),
222 	_INIT_DCS_CMD(0x5F, 0x00),
223 	_INIT_DCS_CMD(0x65, 0x82),
224 	_INIT_DCS_CMD(0x7E, 0x20),
225 	_INIT_DCS_CMD(0x7F, 0x3C),
226 	_INIT_DCS_CMD(0x82, 0x04),
227 	_INIT_DCS_CMD(0x97, 0xC0),
228 
229 	_INIT_DCS_CMD(0xB6, 0x05, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x05, 0x00, 0x00),
230 	_INIT_DCS_CMD(0x91, 0x44),
231 	_INIT_DCS_CMD(0x92, 0xA9),
232 	_INIT_DCS_CMD(0x93, 0x1A),
233 	_INIT_DCS_CMD(0x94, 0x96),
234 	_INIT_DCS_CMD(0xD7, 0x55),
235 	_INIT_DCS_CMD(0xDA, 0x0A),
236 	_INIT_DCS_CMD(0xDE, 0x08),
237 	_INIT_DCS_CMD(0xDB, 0x05),
238 	_INIT_DCS_CMD(0xDC, 0xA9),
239 	_INIT_DCS_CMD(0xDD, 0x22),
240 
241 	_INIT_DCS_CMD(0xDF, 0x05),
242 	_INIT_DCS_CMD(0xE0, 0xA9),
243 	_INIT_DCS_CMD(0xE1, 0x05),
244 	_INIT_DCS_CMD(0xE2, 0xA9),
245 	_INIT_DCS_CMD(0xE3, 0x05),
246 	_INIT_DCS_CMD(0xE4, 0xA9),
247 	_INIT_DCS_CMD(0xE5, 0x05),
248 	_INIT_DCS_CMD(0xE6, 0xA9),
249 	_INIT_DCS_CMD(0x5C, 0x00),
250 	_INIT_DCS_CMD(0x5D, 0x00),
251 	_INIT_DCS_CMD(0x8D, 0x00),
252 	_INIT_DCS_CMD(0x8E, 0x00),
253 	_INIT_DCS_CMD(0xB5, 0x90),
254 	_INIT_DCS_CMD(0xFF, 0x25),
255 	_INIT_DCS_CMD(0xFB, 0x01),
256 	_INIT_DCS_CMD(0x05, 0x00),
257 	_INIT_DCS_CMD(0x19, 0x07),
258 	_INIT_DCS_CMD(0x1F, 0x60),
259 	_INIT_DCS_CMD(0x20, 0x50),
260 	_INIT_DCS_CMD(0x26, 0x60),
261 	_INIT_DCS_CMD(0x27, 0x50),
262 	_INIT_DCS_CMD(0x33, 0x60),
263 	_INIT_DCS_CMD(0x34, 0x50),
264 	_INIT_DCS_CMD(0x3F, 0xE0),
265 	_INIT_DCS_CMD(0x40, 0x00),
266 	_INIT_DCS_CMD(0x44, 0x00),
267 	_INIT_DCS_CMD(0x45, 0x40),
268 	_INIT_DCS_CMD(0x48, 0x60),
269 	_INIT_DCS_CMD(0x49, 0x50),
270 	_INIT_DCS_CMD(0x5B, 0x00),
271 	_INIT_DCS_CMD(0x5C, 0x00),
272 	_INIT_DCS_CMD(0x5D, 0x00),
273 	_INIT_DCS_CMD(0x5E, 0xD0),
274 	_INIT_DCS_CMD(0x61, 0x60),
275 	_INIT_DCS_CMD(0x62, 0x50),
276 	_INIT_DCS_CMD(0xF1, 0x10),
277 	_INIT_DCS_CMD(0xFF, 0x2A),
278 	_INIT_DCS_CMD(0xFB, 0x01),
279 
280 	_INIT_DCS_CMD(0x64, 0x16),
281 	_INIT_DCS_CMD(0x67, 0x16),
282 	_INIT_DCS_CMD(0x6A, 0x16),
283 
284 	_INIT_DCS_CMD(0x70, 0x30),
285 
286 	_INIT_DCS_CMD(0xA2, 0xF3),
287 	_INIT_DCS_CMD(0xA3, 0xFF),
288 	_INIT_DCS_CMD(0xA4, 0xFF),
289 	_INIT_DCS_CMD(0xA5, 0xFF),
290 
291 	_INIT_DCS_CMD(0xD6, 0x08),
292 
293 	_INIT_DCS_CMD(0xFF, 0x26),
294 	_INIT_DCS_CMD(0xFB, 0x01),
295 	_INIT_DCS_CMD(0x00, 0xA1),
296 
297 	_INIT_DCS_CMD(0x02, 0x31),
298 	_INIT_DCS_CMD(0x04, 0x28),
299 	_INIT_DCS_CMD(0x06, 0x30),
300 	_INIT_DCS_CMD(0x0C, 0x16),
301 	_INIT_DCS_CMD(0x0D, 0x0D),
302 	_INIT_DCS_CMD(0x0F, 0x00),
303 	_INIT_DCS_CMD(0x11, 0x00),
304 	_INIT_DCS_CMD(0x12, 0x50),
305 	_INIT_DCS_CMD(0x13, 0x56),
306 	_INIT_DCS_CMD(0x14, 0x57),
307 	_INIT_DCS_CMD(0x15, 0x00),
308 	_INIT_DCS_CMD(0x16, 0x10),
309 	_INIT_DCS_CMD(0x17, 0xA0),
310 	_INIT_DCS_CMD(0x18, 0x86),
311 	_INIT_DCS_CMD(0x19, 0x0D),
312 	_INIT_DCS_CMD(0x1A, 0x7F),
313 	_INIT_DCS_CMD(0x1B, 0x0C),
314 	_INIT_DCS_CMD(0x1C, 0xBF),
315 	_INIT_DCS_CMD(0x22, 0x00),
316 	_INIT_DCS_CMD(0x23, 0x00),
317 	_INIT_DCS_CMD(0x2A, 0x0D),
318 	_INIT_DCS_CMD(0x2B, 0x7F),
319 
320 	_INIT_DCS_CMD(0x1D, 0x00),
321 	_INIT_DCS_CMD(0x1E, 0x65),
322 	_INIT_DCS_CMD(0x1F, 0x65),
323 	_INIT_DCS_CMD(0x24, 0x00),
324 	_INIT_DCS_CMD(0x25, 0x65),
325 	_INIT_DCS_CMD(0x2F, 0x05),
326 	_INIT_DCS_CMD(0x30, 0x65),
327 	_INIT_DCS_CMD(0x31, 0x05),
328 	_INIT_DCS_CMD(0x32, 0x7D),
329 	_INIT_DCS_CMD(0x39, 0x00),
330 	_INIT_DCS_CMD(0x3A, 0x65),
331 	_INIT_DCS_CMD(0x20, 0x01),
332 	_INIT_DCS_CMD(0x33, 0x11),
333 	_INIT_DCS_CMD(0x34, 0x78),
334 	_INIT_DCS_CMD(0x35, 0x16),
335 	_INIT_DCS_CMD(0xC8, 0x04),
336 	_INIT_DCS_CMD(0xC9, 0x9E),
337 	_INIT_DCS_CMD(0xCA, 0x4E),
338 	_INIT_DCS_CMD(0xCB, 0x00),
339 
340 	_INIT_DCS_CMD(0xA9, 0x49),
341 	_INIT_DCS_CMD(0xAA, 0x4B),
342 	_INIT_DCS_CMD(0xAB, 0x48),
343 	_INIT_DCS_CMD(0xAC, 0x43),
344 	_INIT_DCS_CMD(0xAD, 0x40),
345 	_INIT_DCS_CMD(0xAE, 0x50),
346 	_INIT_DCS_CMD(0xAF, 0x44),
347 	_INIT_DCS_CMD(0xB0, 0x54),
348 	_INIT_DCS_CMD(0xB1, 0x4E),
349 	_INIT_DCS_CMD(0xB2, 0x4D),
350 	_INIT_DCS_CMD(0xB3, 0x4C),
351 	_INIT_DCS_CMD(0xB4, 0x41),
352 	_INIT_DCS_CMD(0xB5, 0x47),
353 	_INIT_DCS_CMD(0xB6, 0x53),
354 	_INIT_DCS_CMD(0xB7, 0x3E),
355 	_INIT_DCS_CMD(0xB8, 0x51),
356 	_INIT_DCS_CMD(0xB9, 0x3C),
357 	_INIT_DCS_CMD(0xBA, 0x3B),
358 	_INIT_DCS_CMD(0xBB, 0x46),
359 	_INIT_DCS_CMD(0xBC, 0x45),
360 	_INIT_DCS_CMD(0xBD, 0x55),
361 	_INIT_DCS_CMD(0xBE, 0x3D),
362 	_INIT_DCS_CMD(0xBF, 0x3F),
363 	_INIT_DCS_CMD(0xC0, 0x52),
364 	_INIT_DCS_CMD(0xC1, 0x4A),
365 	_INIT_DCS_CMD(0xC2, 0x39),
366 	_INIT_DCS_CMD(0xC3, 0x4F),
367 	_INIT_DCS_CMD(0xC4, 0x3A),
368 	_INIT_DCS_CMD(0xC5, 0x42),
369 	_INIT_DCS_CMD(0xFF, 0x27),
370 	_INIT_DCS_CMD(0xFB, 0x01),
371 
372 	_INIT_DCS_CMD(0x56, 0x06),
373 	_INIT_DCS_CMD(0x58, 0x80),
374 	_INIT_DCS_CMD(0x59, 0x75),
375 	_INIT_DCS_CMD(0x5A, 0x00),
376 	_INIT_DCS_CMD(0x5B, 0x02),
377 	_INIT_DCS_CMD(0x5C, 0x00),
378 	_INIT_DCS_CMD(0x5D, 0x00),
379 	_INIT_DCS_CMD(0x5E, 0x20),
380 	_INIT_DCS_CMD(0x5F, 0x10),
381 	_INIT_DCS_CMD(0x60, 0x00),
382 	_INIT_DCS_CMD(0x61, 0x2E),
383 	_INIT_DCS_CMD(0x62, 0x00),
384 	_INIT_DCS_CMD(0x63, 0x01),
385 	_INIT_DCS_CMD(0x64, 0x43),
386 	_INIT_DCS_CMD(0x65, 0x2D),
387 	_INIT_DCS_CMD(0x66, 0x00),
388 	_INIT_DCS_CMD(0x67, 0x01),
389 	_INIT_DCS_CMD(0x68, 0x44),
390 
391 	_INIT_DCS_CMD(0x00, 0x00),
392 	_INIT_DCS_CMD(0x78, 0x00),
393 	_INIT_DCS_CMD(0xC3, 0x00),
394 
395 	_INIT_DCS_CMD(0xFF, 0x2A),
396 	_INIT_DCS_CMD(0xFB, 0x01),
397 
398 	_INIT_DCS_CMD(0x22, 0x2F),
399 	_INIT_DCS_CMD(0x23, 0x08),
400 
401 	_INIT_DCS_CMD(0x24, 0x00),
402 	_INIT_DCS_CMD(0x25, 0x65),
403 	_INIT_DCS_CMD(0x26, 0xF8),
404 	_INIT_DCS_CMD(0x27, 0x00),
405 	_INIT_DCS_CMD(0x28, 0x1A),
406 	_INIT_DCS_CMD(0x29, 0x00),
407 	_INIT_DCS_CMD(0x2A, 0x1A),
408 	_INIT_DCS_CMD(0x2B, 0x00),
409 	_INIT_DCS_CMD(0x2D, 0x1A),
410 
411 	_INIT_DCS_CMD(0xFF, 0x23),
412 	_INIT_DCS_CMD(0xFB, 0x01),
413 
414 	_INIT_DCS_CMD(0x00, 0x80),
415 	_INIT_DCS_CMD(0x07, 0x00),
416 
417 	_INIT_DCS_CMD(0xFF, 0xE0),
418 	_INIT_DCS_CMD(0xFB, 0x01),
419 	_INIT_DCS_CMD(0x14, 0x60),
420 	_INIT_DCS_CMD(0x16, 0xC0),
421 
422 	_INIT_DCS_CMD(0xFF, 0xF0),
423 	_INIT_DCS_CMD(0xFB, 0x01),
424 	_INIT_DCS_CMD(0x3A, 0x08),
425 
426 	_INIT_DCS_CMD(0xFF, 0x10),
427 	_INIT_DCS_CMD(0xFB, 0x01),
428 	_INIT_DCS_CMD(0xB9, 0x01),
429 	_INIT_DCS_CMD(0xFF, 0x20),
430 	_INIT_DCS_CMD(0xFB, 0x01),
431 	_INIT_DCS_CMD(0x18, 0x40),
432 
433 	_INIT_DCS_CMD(0xFF, 0x10),
434 	_INIT_DCS_CMD(0xFB, 0x01),
435 	_INIT_DCS_CMD(0xB9, 0x02),
436 	_INIT_DCS_CMD(0x35, 0x00),
437 	_INIT_DCS_CMD(0x51, 0x00, 0xFF),
438 	_INIT_DCS_CMD(0x53, 0x24),
439 	_INIT_DCS_CMD(0x55, 0x00),
440 	_INIT_DCS_CMD(0xBB, 0x13),
441 	_INIT_DCS_CMD(0x3B, 0x03, 0x96, 0x1A, 0x04, 0x04),
442 	_INIT_DELAY_CMD(100),
443 	_INIT_DCS_CMD(0x11),
444 	_INIT_DELAY_CMD(200),
445 	_INIT_DCS_CMD(0x29),
446 	_INIT_DELAY_CMD(100),
447 	{},
448 };
449 
450 static const struct panel_init_cmd inx_hj110iz_init_cmd[] = {
451 	_INIT_DCS_CMD(0xFF, 0x20),
452 	_INIT_DCS_CMD(0xFB, 0x01),
453 	_INIT_DCS_CMD(0x05, 0xD1),
454 	_INIT_DCS_CMD(0x06, 0xC0),
455 	_INIT_DCS_CMD(0x07, 0x87),
456 	_INIT_DCS_CMD(0x08, 0x4B),
457 
458 	_INIT_DCS_CMD(0x0D, 0x63),
459 	_INIT_DCS_CMD(0x0E, 0x91),
460 	_INIT_DCS_CMD(0x0F, 0x69),
461 	_INIT_DCS_CMD(0x94, 0x00),
462 	_INIT_DCS_CMD(0x95, 0xF5),
463 	_INIT_DCS_CMD(0x96, 0xF5),
464 	_INIT_DCS_CMD(0x9D, 0x00),
465 	_INIT_DCS_CMD(0x9E, 0x00),
466 	_INIT_DCS_CMD(0x69, 0x98),
467 	_INIT_DCS_CMD(0x75, 0xA2),
468 	_INIT_DCS_CMD(0x77, 0xB3),
469 
470 	_INIT_DCS_CMD(0x58, 0x43),
471 	_INIT_DCS_CMD(0xFF, 0x24),
472 	_INIT_DCS_CMD(0xFB, 0x01),
473 	_INIT_DCS_CMD(0x91, 0x44),
474 	_INIT_DCS_CMD(0x92, 0x4C),
475 	_INIT_DCS_CMD(0x94, 0x86),
476 	_INIT_DCS_CMD(0x60, 0x96),
477 	_INIT_DCS_CMD(0x61, 0xD0),
478 	_INIT_DCS_CMD(0x63, 0x70),
479 	_INIT_DCS_CMD(0xC2, 0xCA),
480 
481 	_INIT_DCS_CMD(0x00, 0x03),
482 	_INIT_DCS_CMD(0x01, 0x03),
483 	_INIT_DCS_CMD(0x02, 0x03),
484 	_INIT_DCS_CMD(0x03, 0x29),
485 	_INIT_DCS_CMD(0x04, 0x22),
486 	_INIT_DCS_CMD(0x05, 0x22),
487 	_INIT_DCS_CMD(0x06, 0x0B),
488 	_INIT_DCS_CMD(0x07, 0x1D),
489 	_INIT_DCS_CMD(0x08, 0x1C),
490 	_INIT_DCS_CMD(0x09, 0x05),
491 	_INIT_DCS_CMD(0x0A, 0x08),
492 	_INIT_DCS_CMD(0x0B, 0x09),
493 	_INIT_DCS_CMD(0x0C, 0x0A),
494 	_INIT_DCS_CMD(0x0D, 0x0C),
495 	_INIT_DCS_CMD(0x0E, 0x0D),
496 	_INIT_DCS_CMD(0x0F, 0x0E),
497 	_INIT_DCS_CMD(0x10, 0x0F),
498 	_INIT_DCS_CMD(0x11, 0x10),
499 	_INIT_DCS_CMD(0x12, 0x11),
500 	_INIT_DCS_CMD(0x13, 0x04),
501 	_INIT_DCS_CMD(0x14, 0x00),
502 	_INIT_DCS_CMD(0x15, 0x03),
503 	_INIT_DCS_CMD(0x16, 0x03),
504 	_INIT_DCS_CMD(0x17, 0x03),
505 	_INIT_DCS_CMD(0x18, 0x03),
506 	_INIT_DCS_CMD(0x19, 0x29),
507 	_INIT_DCS_CMD(0x1A, 0x22),
508 	_INIT_DCS_CMD(0x1B, 0x22),
509 	_INIT_DCS_CMD(0x1C, 0x0B),
510 	_INIT_DCS_CMD(0x1D, 0x1D),
511 	_INIT_DCS_CMD(0x1E, 0x1C),
512 	_INIT_DCS_CMD(0x1F, 0x05),
513 	_INIT_DCS_CMD(0x20, 0x08),
514 	_INIT_DCS_CMD(0x21, 0x09),
515 	_INIT_DCS_CMD(0x22, 0x0A),
516 	_INIT_DCS_CMD(0x23, 0x0C),
517 	_INIT_DCS_CMD(0x24, 0x0D),
518 	_INIT_DCS_CMD(0x25, 0x0E),
519 	_INIT_DCS_CMD(0x26, 0x0F),
520 	_INIT_DCS_CMD(0x27, 0x10),
521 	_INIT_DCS_CMD(0x28, 0x11),
522 	_INIT_DCS_CMD(0x29, 0x04),
523 	_INIT_DCS_CMD(0x2A, 0x00),
524 	_INIT_DCS_CMD(0x2B, 0x03),
525 
526 	_INIT_DCS_CMD(0x2F, 0x0A),
527 	_INIT_DCS_CMD(0x30, 0x35),
528 	_INIT_DCS_CMD(0x37, 0xA7),
529 	_INIT_DCS_CMD(0x39, 0x00),
530 	_INIT_DCS_CMD(0x3A, 0x46),
531 	_INIT_DCS_CMD(0x3B, 0x32),
532 	_INIT_DCS_CMD(0x3D, 0x12),
533 
534 	_INIT_DCS_CMD(0x3F, 0x33),
535 	_INIT_DCS_CMD(0x40, 0x31),
536 	_INIT_DCS_CMD(0x41, 0x40),
537 	_INIT_DCS_CMD(0x42, 0x42),
538 	_INIT_DCS_CMD(0x47, 0x77),
539 	_INIT_DCS_CMD(0x48, 0x77),
540 	_INIT_DCS_CMD(0x4A, 0x45),
541 	_INIT_DCS_CMD(0x4B, 0x45),
542 	_INIT_DCS_CMD(0x4C, 0x14),
543 
544 	_INIT_DCS_CMD(0x4D, 0x21),
545 	_INIT_DCS_CMD(0x4E, 0x43),
546 	_INIT_DCS_CMD(0x4F, 0x65),
547 	_INIT_DCS_CMD(0x55, 0x06),
548 	_INIT_DCS_CMD(0x56, 0x06),
549 	_INIT_DCS_CMD(0x58, 0x21),
550 	_INIT_DCS_CMD(0x59, 0x70),
551 	_INIT_DCS_CMD(0x5A, 0x46),
552 	_INIT_DCS_CMD(0x5B, 0x32),
553 	_INIT_DCS_CMD(0x5C, 0x88),
554 	_INIT_DCS_CMD(0x5E, 0x00, 0x00),
555 	_INIT_DCS_CMD(0x5F, 0x00),
556 
557 	_INIT_DCS_CMD(0x7A, 0xFF),
558 	_INIT_DCS_CMD(0x7B, 0xFF),
559 	_INIT_DCS_CMD(0x7C, 0x00),
560 	_INIT_DCS_CMD(0x7D, 0x00),
561 	_INIT_DCS_CMD(0x7E, 0x20),
562 	_INIT_DCS_CMD(0x7F, 0x3C),
563 	_INIT_DCS_CMD(0x80, 0x00),
564 	_INIT_DCS_CMD(0x81, 0x00),
565 	_INIT_DCS_CMD(0x82, 0x08),
566 	_INIT_DCS_CMD(0x97, 0x02),
567 	_INIT_DCS_CMD(0xC5, 0x10),
568 
569 	_INIT_DCS_CMD(0xD7, 0x55),
570 	_INIT_DCS_CMD(0xD8, 0x55),
571 	_INIT_DCS_CMD(0xD9, 0x23),
572 	_INIT_DCS_CMD(0xDA, 0x05),
573 	_INIT_DCS_CMD(0xDB, 0x01),
574 	_INIT_DCS_CMD(0xDC, 0x65),
575 	_INIT_DCS_CMD(0xDD, 0x55),
576 	_INIT_DCS_CMD(0xDE, 0x27),
577 	_INIT_DCS_CMD(0xDF, 0x01),
578 	_INIT_DCS_CMD(0xE0, 0x65),
579 	_INIT_DCS_CMD(0xE1, 0x01),
580 	_INIT_DCS_CMD(0xE2, 0x65),
581 	_INIT_DCS_CMD(0xE3, 0x01),
582 	_INIT_DCS_CMD(0xE4, 0x65),
583 	_INIT_DCS_CMD(0xE5, 0x01),
584 	_INIT_DCS_CMD(0xE6, 0x65),
585 	_INIT_DCS_CMD(0xE7, 0x00),
586 	_INIT_DCS_CMD(0xE8, 0x00),
587 	_INIT_DCS_CMD(0xE9, 0x01),
588 	_INIT_DCS_CMD(0xEA, 0x65),
589 	_INIT_DCS_CMD(0xEB, 0x01),
590 	_INIT_DCS_CMD(0xEE, 0x65),
591 	_INIT_DCS_CMD(0xEF, 0x01),
592 	_INIT_DCS_CMD(0xF0, 0x65),
593 	_INIT_DCS_CMD(0xB6, 0x05, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x05, 0x00, 0x00),
594 
595 	_INIT_DCS_CMD(0xFF, 0x25),
596 
597 	_INIT_DCS_CMD(0xFB, 0x01),
598 	_INIT_DCS_CMD(0x05, 0x00),
599 	_INIT_DCS_CMD(0xF1, 0x10),
600 
601 	_INIT_DCS_CMD(0x1E, 0x00),
602 	_INIT_DCS_CMD(0x1F, 0x46),
603 	_INIT_DCS_CMD(0x20, 0x32),
604 
605 	_INIT_DCS_CMD(0x25, 0x00),
606 	_INIT_DCS_CMD(0x26, 0x46),
607 	_INIT_DCS_CMD(0x27, 0x32),
608 
609 	_INIT_DCS_CMD(0x3F, 0x80),
610 	_INIT_DCS_CMD(0x40, 0x00),
611 	_INIT_DCS_CMD(0x43, 0x00),
612 
613 	_INIT_DCS_CMD(0x44, 0x46),
614 	_INIT_DCS_CMD(0x45, 0x46),
615 
616 	_INIT_DCS_CMD(0x48, 0x46),
617 	_INIT_DCS_CMD(0x49, 0x32),
618 
619 	_INIT_DCS_CMD(0x5B, 0x80),
620 
621 	_INIT_DCS_CMD(0x5C, 0x00),
622 	_INIT_DCS_CMD(0x5D, 0x46),
623 	_INIT_DCS_CMD(0x5E, 0x32),
624 
625 	_INIT_DCS_CMD(0x5F, 0x46),
626 	_INIT_DCS_CMD(0x60, 0x32),
627 
628 	_INIT_DCS_CMD(0x61, 0x46),
629 	_INIT_DCS_CMD(0x62, 0x32),
630 	_INIT_DCS_CMD(0x68, 0x0C),
631 
632 	_INIT_DCS_CMD(0x6C, 0x0D),
633 	_INIT_DCS_CMD(0x6E, 0x0D),
634 	_INIT_DCS_CMD(0x78, 0x00),
635 	_INIT_DCS_CMD(0x79, 0xC5),
636 	_INIT_DCS_CMD(0x7A, 0x0C),
637 	_INIT_DCS_CMD(0x7B, 0xB0),
638 
639 	_INIT_DCS_CMD(0xFF, 0x26),
640 	_INIT_DCS_CMD(0xFB, 0x01),
641 
642 	_INIT_DCS_CMD(0x00, 0xA1),
643 	_INIT_DCS_CMD(0x02, 0x31),
644 	_INIT_DCS_CMD(0x0A, 0xF4),
645 	_INIT_DCS_CMD(0x04, 0x50),
646 	_INIT_DCS_CMD(0x06, 0x30),
647 	_INIT_DCS_CMD(0x0C, 0x16),
648 	_INIT_DCS_CMD(0x0D, 0x0D),
649 	_INIT_DCS_CMD(0x0F, 0x00),
650 	_INIT_DCS_CMD(0x11, 0x00),
651 	_INIT_DCS_CMD(0x12, 0x50),
652 	_INIT_DCS_CMD(0x13, 0x40),
653 	_INIT_DCS_CMD(0x14, 0x58),
654 	_INIT_DCS_CMD(0x15, 0x00),
655 	_INIT_DCS_CMD(0x16, 0x10),
656 	_INIT_DCS_CMD(0x17, 0xA0),
657 	_INIT_DCS_CMD(0x18, 0x86),
658 	_INIT_DCS_CMD(0x22, 0x00),
659 	_INIT_DCS_CMD(0x23, 0x00),
660 
661 	_INIT_DCS_CMD(0x19, 0x0E),
662 	_INIT_DCS_CMD(0x1A, 0x31),
663 	_INIT_DCS_CMD(0x1B, 0x0D),
664 	_INIT_DCS_CMD(0x1C, 0x29),
665 	_INIT_DCS_CMD(0x2A, 0x0E),
666 	_INIT_DCS_CMD(0x2B, 0x31),
667 
668 	_INIT_DCS_CMD(0x1D, 0x00),
669 	_INIT_DCS_CMD(0x1E, 0x62),
670 	_INIT_DCS_CMD(0x1F, 0x62),
671 
672 	_INIT_DCS_CMD(0x2F, 0x06),
673 	_INIT_DCS_CMD(0x30, 0x62),
674 	_INIT_DCS_CMD(0x31, 0x06),
675 	_INIT_DCS_CMD(0x32, 0x7F),
676 	_INIT_DCS_CMD(0x33, 0x11),
677 	_INIT_DCS_CMD(0x34, 0x89),
678 	_INIT_DCS_CMD(0x35, 0x67),
679 
680 	_INIT_DCS_CMD(0x39, 0x0B),
681 	_INIT_DCS_CMD(0x3A, 0x62),
682 	_INIT_DCS_CMD(0x3B, 0x06),
683 
684 	_INIT_DCS_CMD(0xC8, 0x04),
685 	_INIT_DCS_CMD(0xC9, 0x89),
686 	_INIT_DCS_CMD(0xCA, 0x4E),
687 	_INIT_DCS_CMD(0xCB, 0x00),
688 	_INIT_DCS_CMD(0xA9, 0x3F),
689 	_INIT_DCS_CMD(0xAA, 0x3E),
690 	_INIT_DCS_CMD(0xAB, 0x3D),
691 	_INIT_DCS_CMD(0xAC, 0x3C),
692 	_INIT_DCS_CMD(0xAD, 0x3B),
693 	_INIT_DCS_CMD(0xAE, 0x3A),
694 	_INIT_DCS_CMD(0xAF, 0x39),
695 	_INIT_DCS_CMD(0xB0, 0x38),
696 
697 	_INIT_DCS_CMD(0xFF, 0x27),
698 	_INIT_DCS_CMD(0xFB, 0x01),
699 
700 	_INIT_DCS_CMD(0xD0, 0x11),
701 	_INIT_DCS_CMD(0xD1, 0x54),
702 	_INIT_DCS_CMD(0xDE, 0x43),
703 	_INIT_DCS_CMD(0xDF, 0x02),
704 
705 	_INIT_DCS_CMD(0xC0, 0x18),
706 	_INIT_DCS_CMD(0xC1, 0x00),
707 	_INIT_DCS_CMD(0xC2, 0x00),
708 	_INIT_DCS_CMD(0x00, 0x00),
709 	_INIT_DCS_CMD(0xC3, 0x00),
710 	_INIT_DCS_CMD(0x56, 0x06),
711 
712 	_INIT_DCS_CMD(0x58, 0x80),
713 	_INIT_DCS_CMD(0x59, 0x78),
714 	_INIT_DCS_CMD(0x5A, 0x00),
715 	_INIT_DCS_CMD(0x5B, 0x18),
716 	_INIT_DCS_CMD(0x5C, 0x00),
717 	_INIT_DCS_CMD(0x5D, 0x01),
718 	_INIT_DCS_CMD(0x5E, 0x20),
719 	_INIT_DCS_CMD(0x5F, 0x10),
720 	_INIT_DCS_CMD(0x60, 0x00),
721 	_INIT_DCS_CMD(0x61, 0x1C),
722 	_INIT_DCS_CMD(0x62, 0x00),
723 	_INIT_DCS_CMD(0x63, 0x01),
724 	_INIT_DCS_CMD(0x64, 0x44),
725 	_INIT_DCS_CMD(0x65, 0x1B),
726 	_INIT_DCS_CMD(0x66, 0x00),
727 	_INIT_DCS_CMD(0x67, 0x01),
728 	_INIT_DCS_CMD(0x68, 0x44),
729 
730 	_INIT_DCS_CMD(0x98, 0x01),
731 	_INIT_DCS_CMD(0xB4, 0x03),
732 	_INIT_DCS_CMD(0x9B, 0xBE),
733 
734 	_INIT_DCS_CMD(0xAB, 0x14),
735 	_INIT_DCS_CMD(0xBC, 0x08),
736 	_INIT_DCS_CMD(0xBD, 0x28),
737 
738 	_INIT_DCS_CMD(0xFF, 0x2A),
739 	_INIT_DCS_CMD(0xFB, 0x01),
740 	_INIT_DCS_CMD(0x22, 0x2F),
741 	_INIT_DCS_CMD(0x23, 0x08),
742 
743 	_INIT_DCS_CMD(0x24, 0x00),
744 	_INIT_DCS_CMD(0x25, 0x62),
745 	_INIT_DCS_CMD(0x26, 0xF8),
746 	_INIT_DCS_CMD(0x27, 0x00),
747 	_INIT_DCS_CMD(0x28, 0x1A),
748 	_INIT_DCS_CMD(0x29, 0x00),
749 	_INIT_DCS_CMD(0x2A, 0x1A),
750 	_INIT_DCS_CMD(0x2B, 0x00),
751 	_INIT_DCS_CMD(0x2D, 0x1A),
752 
753 	_INIT_DCS_CMD(0x64, 0x96),
754 	_INIT_DCS_CMD(0x65, 0x10),
755 	_INIT_DCS_CMD(0x66, 0x00),
756 	_INIT_DCS_CMD(0x67, 0x96),
757 	_INIT_DCS_CMD(0x68, 0x10),
758 	_INIT_DCS_CMD(0x69, 0x00),
759 	_INIT_DCS_CMD(0x6A, 0x96),
760 	_INIT_DCS_CMD(0x6B, 0x10),
761 	_INIT_DCS_CMD(0x6C, 0x00),
762 	_INIT_DCS_CMD(0x70, 0x92),
763 	_INIT_DCS_CMD(0x71, 0x10),
764 	_INIT_DCS_CMD(0x72, 0x00),
765 	_INIT_DCS_CMD(0x79, 0x96),
766 	_INIT_DCS_CMD(0x7A, 0x10),
767 	_INIT_DCS_CMD(0x88, 0x96),
768 	_INIT_DCS_CMD(0x89, 0x10),
769 
770 	_INIT_DCS_CMD(0xA2, 0x3F),
771 	_INIT_DCS_CMD(0xA3, 0x30),
772 	_INIT_DCS_CMD(0xA4, 0xC0),
773 	_INIT_DCS_CMD(0xA5, 0x03),
774 
775 	_INIT_DCS_CMD(0xE8, 0x00),
776 
777 	_INIT_DCS_CMD(0x97, 0x3C),
778 	_INIT_DCS_CMD(0x98, 0x02),
779 	_INIT_DCS_CMD(0x99, 0x95),
780 	_INIT_DCS_CMD(0x9A, 0x06),
781 	_INIT_DCS_CMD(0x9B, 0x00),
782 	_INIT_DCS_CMD(0x9C, 0x0B),
783 	_INIT_DCS_CMD(0x9D, 0x0A),
784 	_INIT_DCS_CMD(0x9E, 0x90),
785 
786 	_INIT_DCS_CMD(0xFF, 0x25),
787 	_INIT_DCS_CMD(0x13, 0x02),
788 	_INIT_DCS_CMD(0x14, 0xD7),
789 	_INIT_DCS_CMD(0xDB, 0x02),
790 	_INIT_DCS_CMD(0xDC, 0xD7),
791 	_INIT_DCS_CMD(0x17, 0xCF),
792 	_INIT_DCS_CMD(0x19, 0x0F),
793 	_INIT_DCS_CMD(0x1B, 0x5B),
794 
795 	_INIT_DCS_CMD(0xFF, 0x20),
796 
797 	_INIT_DCS_CMD(0xB0, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x24, 0x00, 0x38, 0x00, 0x4C, 0x00, 0x5E, 0x00, 0x6F, 0x00, 0x7E),
798 	_INIT_DCS_CMD(0xB1, 0x00, 0x8C, 0x00, 0xBE, 0x00, 0xE5, 0x01, 0x27, 0x01, 0x58, 0x01, 0xA8, 0x01, 0xE8, 0x01, 0xEA),
799 	_INIT_DCS_CMD(0xB2, 0x02, 0x28, 0x02, 0x71, 0x02, 0x9E, 0x02, 0xDA, 0x03, 0x00, 0x03, 0x31, 0x03, 0x40, 0x03, 0x51),
800 	_INIT_DCS_CMD(0xB3, 0x03, 0x62, 0x03, 0x75, 0x03, 0x89, 0x03, 0x9C, 0x03, 0xAA, 0x03, 0xB2),
801 
802 	_INIT_DCS_CMD(0xB4, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x27, 0x00, 0x3D, 0x00, 0x52, 0x00, 0x64, 0x00, 0x75, 0x00, 0x84),
803 	_INIT_DCS_CMD(0xB5, 0x00, 0x93, 0x00, 0xC5, 0x00, 0xEC, 0x01, 0x2C, 0x01, 0x5D, 0x01, 0xAC, 0x01, 0xEC, 0x01, 0xEE),
804 	_INIT_DCS_CMD(0xB6, 0x02, 0x2B, 0x02, 0x73, 0x02, 0xA0, 0x02, 0xDB, 0x03, 0x01, 0x03, 0x31, 0x03, 0x41, 0x03, 0x51),
805 	_INIT_DCS_CMD(0xB7, 0x03, 0x63, 0x03, 0x75, 0x03, 0x89, 0x03, 0x9C, 0x03, 0xAA, 0x03, 0xB2),
806 
807 	_INIT_DCS_CMD(0xB8, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x2A, 0x00, 0x40, 0x00, 0x56, 0x00, 0x68, 0x00, 0x7A, 0x00, 0x89),
808 	_INIT_DCS_CMD(0xB9, 0x00, 0x98, 0x00, 0xC9, 0x00, 0xF1, 0x01, 0x30, 0x01, 0x61, 0x01, 0xB0, 0x01, 0xEF, 0x01, 0xF1),
809 	_INIT_DCS_CMD(0xBA, 0x02, 0x2E, 0x02, 0x76, 0x02, 0xA3, 0x02, 0xDD, 0x03, 0x02, 0x03, 0x32, 0x03, 0x42, 0x03, 0x53),
810 	_INIT_DCS_CMD(0xBB, 0x03, 0x66, 0x03, 0x75, 0x03, 0x89, 0x03, 0x9C, 0x03, 0xAA, 0x03, 0xB2),
811 
812 	_INIT_DCS_CMD(0xFF, 0x21),
813 	_INIT_DCS_CMD(0xB0, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x24, 0x00, 0x38, 0x00, 0x4C, 0x00, 0x5E, 0x00, 0x6F, 0x00, 0x7E),
814 	_INIT_DCS_CMD(0xB1, 0x00, 0x8C, 0x00, 0xBE, 0x00, 0xE5, 0x01, 0x27, 0x01, 0x58, 0x01, 0xA8, 0x01, 0xE8, 0x01, 0xEA),
815 	_INIT_DCS_CMD(0xB2, 0x02, 0x28, 0x02, 0x71, 0x02, 0x9E, 0x02, 0xDA, 0x03, 0x00, 0x03, 0x31, 0x03, 0x40, 0x03, 0x51),
816 	_INIT_DCS_CMD(0xB3, 0x03, 0x62, 0x03, 0x77, 0x03, 0x90, 0x03, 0xAC, 0x03, 0xCA, 0x03, 0xDA),
817 
818 	_INIT_DCS_CMD(0xB4, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x27, 0x00, 0x3D, 0x00, 0x52, 0x00, 0x64, 0x00, 0x75, 0x00, 0x84),
819 	_INIT_DCS_CMD(0xB5, 0x00, 0x93, 0x00, 0xC5, 0x00, 0xEC, 0x01, 0x2C, 0x01, 0x5D, 0x01, 0xAC, 0x01, 0xEC, 0x01, 0xEE),
820 	_INIT_DCS_CMD(0xB6, 0x02, 0x2B, 0x02, 0x73, 0x02, 0xA0, 0x02, 0xDB, 0x03, 0x01, 0x03, 0x31, 0x03, 0x41, 0x03, 0x51),
821 	_INIT_DCS_CMD(0xB7, 0x03, 0x63, 0x03, 0x77, 0x03, 0x90, 0x03, 0xAC, 0x03, 0xCA, 0x03, 0xDA),
822 
823 	_INIT_DCS_CMD(0xB8, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x2A, 0x00, 0x40, 0x00, 0x56, 0x00, 0x68, 0x00, 0x7A, 0x00, 0x89),
824 	_INIT_DCS_CMD(0xB9, 0x00, 0x98, 0x00, 0xC9, 0x00, 0xF1, 0x01, 0x30, 0x01, 0x61, 0x01, 0xB0, 0x01, 0xEF, 0x01, 0xF1),
825 	_INIT_DCS_CMD(0xBA, 0x02, 0x2E, 0x02, 0x76, 0x02, 0xA3, 0x02, 0xDD, 0x03, 0x02, 0x03, 0x32, 0x03, 0x42, 0x03, 0x53),
826 	_INIT_DCS_CMD(0xBB, 0x03, 0x66, 0x03, 0x77, 0x03, 0x90, 0x03, 0xAC, 0x03, 0xCA, 0x03, 0xDA),
827 
828 	_INIT_DCS_CMD(0xFF, 0xF0),
829 	_INIT_DCS_CMD(0xFB, 0x01),
830 	_INIT_DCS_CMD(0x3A, 0x08),
831 
832 	_INIT_DCS_CMD(0xFF, 0x10),
833 	_INIT_DCS_CMD(0xB9, 0x01),
834 
835 	_INIT_DCS_CMD(0xFF, 0x20),
836 
837 	_INIT_DCS_CMD(0x18, 0x40),
838 	_INIT_DCS_CMD(0xFF, 0x10),
839 
840 	_INIT_DCS_CMD(0xB9, 0x02),
841 	_INIT_DCS_CMD(0xFF, 0x10),
842 
843 	_INIT_DCS_CMD(0xFB, 0x01),
844 	_INIT_DCS_CMD(0xB0, 0x01),
845 	_INIT_DCS_CMD(0x35, 0x00),
846 	_INIT_DCS_CMD(0x3B, 0x03, 0xAE, 0x1A, 0x04, 0x04),
847 	_INIT_DELAY_CMD(100),
848 	_INIT_DCS_CMD(0x11),
849 	_INIT_DELAY_CMD(200),
850 	_INIT_DCS_CMD(0x29),
851 	_INIT_DELAY_CMD(100),
852 	{},
853 };
854 
855 static const struct panel_init_cmd boe_init_cmd[] = {
856 	_INIT_DCS_CMD(0xB0, 0x05),
857 	_INIT_DCS_CMD(0xB1, 0xE5),
858 	_INIT_DCS_CMD(0xB3, 0x52),
859 	_INIT_DCS_CMD(0xB0, 0x00),
860 	_INIT_DCS_CMD(0xB3, 0x88),
861 	_INIT_DCS_CMD(0xB0, 0x04),
862 	_INIT_DCS_CMD(0xB8, 0x00),
863 	_INIT_DCS_CMD(0xB0, 0x00),
864 	_INIT_DCS_CMD(0xB6, 0x03),
865 	_INIT_DCS_CMD(0xBA, 0x8B),
866 	_INIT_DCS_CMD(0xBF, 0x1A),
867 	_INIT_DCS_CMD(0xC0, 0x0F),
868 	_INIT_DCS_CMD(0xC2, 0x0C),
869 	_INIT_DCS_CMD(0xC3, 0x02),
870 	_INIT_DCS_CMD(0xC4, 0x0C),
871 	_INIT_DCS_CMD(0xC5, 0x02),
872 	_INIT_DCS_CMD(0xB0, 0x01),
873 	_INIT_DCS_CMD(0xE0, 0x26),
874 	_INIT_DCS_CMD(0xE1, 0x26),
875 	_INIT_DCS_CMD(0xDC, 0x00),
876 	_INIT_DCS_CMD(0xDD, 0x00),
877 	_INIT_DCS_CMD(0xCC, 0x26),
878 	_INIT_DCS_CMD(0xCD, 0x26),
879 	_INIT_DCS_CMD(0xC8, 0x00),
880 	_INIT_DCS_CMD(0xC9, 0x00),
881 	_INIT_DCS_CMD(0xD2, 0x03),
882 	_INIT_DCS_CMD(0xD3, 0x03),
883 	_INIT_DCS_CMD(0xE6, 0x04),
884 	_INIT_DCS_CMD(0xE7, 0x04),
885 	_INIT_DCS_CMD(0xC4, 0x09),
886 	_INIT_DCS_CMD(0xC5, 0x09),
887 	_INIT_DCS_CMD(0xD8, 0x0A),
888 	_INIT_DCS_CMD(0xD9, 0x0A),
889 	_INIT_DCS_CMD(0xC2, 0x0B),
890 	_INIT_DCS_CMD(0xC3, 0x0B),
891 	_INIT_DCS_CMD(0xD6, 0x0C),
892 	_INIT_DCS_CMD(0xD7, 0x0C),
893 	_INIT_DCS_CMD(0xC0, 0x05),
894 	_INIT_DCS_CMD(0xC1, 0x05),
895 	_INIT_DCS_CMD(0xD4, 0x06),
896 	_INIT_DCS_CMD(0xD5, 0x06),
897 	_INIT_DCS_CMD(0xCA, 0x07),
898 	_INIT_DCS_CMD(0xCB, 0x07),
899 	_INIT_DCS_CMD(0xDE, 0x08),
900 	_INIT_DCS_CMD(0xDF, 0x08),
901 	_INIT_DCS_CMD(0xB0, 0x02),
902 	_INIT_DCS_CMD(0xC0, 0x00),
903 	_INIT_DCS_CMD(0xC1, 0x0D),
904 	_INIT_DCS_CMD(0xC2, 0x17),
905 	_INIT_DCS_CMD(0xC3, 0x26),
906 	_INIT_DCS_CMD(0xC4, 0x31),
907 	_INIT_DCS_CMD(0xC5, 0x1C),
908 	_INIT_DCS_CMD(0xC6, 0x2C),
909 	_INIT_DCS_CMD(0xC7, 0x33),
910 	_INIT_DCS_CMD(0xC8, 0x31),
911 	_INIT_DCS_CMD(0xC9, 0x37),
912 	_INIT_DCS_CMD(0xCA, 0x37),
913 	_INIT_DCS_CMD(0xCB, 0x37),
914 	_INIT_DCS_CMD(0xCC, 0x39),
915 	_INIT_DCS_CMD(0xCD, 0x2E),
916 	_INIT_DCS_CMD(0xCE, 0x2F),
917 	_INIT_DCS_CMD(0xCF, 0x2F),
918 	_INIT_DCS_CMD(0xD0, 0x07),
919 	_INIT_DCS_CMD(0xD2, 0x00),
920 	_INIT_DCS_CMD(0xD3, 0x0D),
921 	_INIT_DCS_CMD(0xD4, 0x17),
922 	_INIT_DCS_CMD(0xD5, 0x26),
923 	_INIT_DCS_CMD(0xD6, 0x31),
924 	_INIT_DCS_CMD(0xD7, 0x3F),
925 	_INIT_DCS_CMD(0xD8, 0x3F),
926 	_INIT_DCS_CMD(0xD9, 0x3F),
927 	_INIT_DCS_CMD(0xDA, 0x3F),
928 	_INIT_DCS_CMD(0xDB, 0x37),
929 	_INIT_DCS_CMD(0xDC, 0x37),
930 	_INIT_DCS_CMD(0xDD, 0x37),
931 	_INIT_DCS_CMD(0xDE, 0x39),
932 	_INIT_DCS_CMD(0xDF, 0x2E),
933 	_INIT_DCS_CMD(0xE0, 0x2F),
934 	_INIT_DCS_CMD(0xE1, 0x2F),
935 	_INIT_DCS_CMD(0xE2, 0x07),
936 	_INIT_DCS_CMD(0xB0, 0x03),
937 	_INIT_DCS_CMD(0xC8, 0x0B),
938 	_INIT_DCS_CMD(0xC9, 0x07),
939 	_INIT_DCS_CMD(0xC3, 0x00),
940 	_INIT_DCS_CMD(0xE7, 0x00),
941 	_INIT_DCS_CMD(0xC5, 0x2A),
942 	_INIT_DCS_CMD(0xDE, 0x2A),
943 	_INIT_DCS_CMD(0xCA, 0x43),
944 	_INIT_DCS_CMD(0xC9, 0x07),
945 	_INIT_DCS_CMD(0xE4, 0xC0),
946 	_INIT_DCS_CMD(0xE5, 0x0D),
947 	_INIT_DCS_CMD(0xCB, 0x00),
948 	_INIT_DCS_CMD(0xB0, 0x06),
949 	_INIT_DCS_CMD(0xB8, 0xA5),
950 	_INIT_DCS_CMD(0xC0, 0xA5),
951 	_INIT_DCS_CMD(0xC7, 0x0F),
952 	_INIT_DCS_CMD(0xD5, 0x32),
953 	_INIT_DCS_CMD(0xB8, 0x00),
954 	_INIT_DCS_CMD(0xC0, 0x00),
955 	_INIT_DCS_CMD(0xBC, 0x00),
956 	_INIT_DCS_CMD(0xB0, 0x07),
957 	_INIT_DCS_CMD(0xB1, 0x00),
958 	_INIT_DCS_CMD(0xB2, 0x02),
959 	_INIT_DCS_CMD(0xB3, 0x0F),
960 	_INIT_DCS_CMD(0xB4, 0x25),
961 	_INIT_DCS_CMD(0xB5, 0x39),
962 	_INIT_DCS_CMD(0xB6, 0x4E),
963 	_INIT_DCS_CMD(0xB7, 0x72),
964 	_INIT_DCS_CMD(0xB8, 0x97),
965 	_INIT_DCS_CMD(0xB9, 0xDC),
966 	_INIT_DCS_CMD(0xBA, 0x22),
967 	_INIT_DCS_CMD(0xBB, 0xA4),
968 	_INIT_DCS_CMD(0xBC, 0x2B),
969 	_INIT_DCS_CMD(0xBD, 0x2F),
970 	_INIT_DCS_CMD(0xBE, 0xA9),
971 	_INIT_DCS_CMD(0xBF, 0x25),
972 	_INIT_DCS_CMD(0xC0, 0x61),
973 	_INIT_DCS_CMD(0xC1, 0x97),
974 	_INIT_DCS_CMD(0xC2, 0xB2),
975 	_INIT_DCS_CMD(0xC3, 0xCD),
976 	_INIT_DCS_CMD(0xC4, 0xD9),
977 	_INIT_DCS_CMD(0xC5, 0xE7),
978 	_INIT_DCS_CMD(0xC6, 0xF4),
979 	_INIT_DCS_CMD(0xC7, 0xFA),
980 	_INIT_DCS_CMD(0xC8, 0xFC),
981 	_INIT_DCS_CMD(0xC9, 0x00),
982 	_INIT_DCS_CMD(0xCA, 0x00),
983 	_INIT_DCS_CMD(0xCB, 0x16),
984 	_INIT_DCS_CMD(0xCC, 0xAF),
985 	_INIT_DCS_CMD(0xCD, 0xFF),
986 	_INIT_DCS_CMD(0xCE, 0xFF),
987 	_INIT_DCS_CMD(0xB0, 0x08),
988 	_INIT_DCS_CMD(0xB1, 0x04),
989 	_INIT_DCS_CMD(0xB2, 0x05),
990 	_INIT_DCS_CMD(0xB3, 0x11),
991 	_INIT_DCS_CMD(0xB4, 0x24),
992 	_INIT_DCS_CMD(0xB5, 0x39),
993 	_INIT_DCS_CMD(0xB6, 0x4F),
994 	_INIT_DCS_CMD(0xB7, 0x72),
995 	_INIT_DCS_CMD(0xB8, 0x98),
996 	_INIT_DCS_CMD(0xB9, 0xDC),
997 	_INIT_DCS_CMD(0xBA, 0x23),
998 	_INIT_DCS_CMD(0xBB, 0xA6),
999 	_INIT_DCS_CMD(0xBC, 0x2C),
1000 	_INIT_DCS_CMD(0xBD, 0x30),
1001 	_INIT_DCS_CMD(0xBE, 0xAA),
1002 	_INIT_DCS_CMD(0xBF, 0x26),
1003 	_INIT_DCS_CMD(0xC0, 0x62),
1004 	_INIT_DCS_CMD(0xC1, 0x9B),
1005 	_INIT_DCS_CMD(0xC2, 0xB5),
1006 	_INIT_DCS_CMD(0xC3, 0xCF),
1007 	_INIT_DCS_CMD(0xC4, 0xDB),
1008 	_INIT_DCS_CMD(0xC5, 0xE8),
1009 	_INIT_DCS_CMD(0xC6, 0xF5),
1010 	_INIT_DCS_CMD(0xC7, 0xFA),
1011 	_INIT_DCS_CMD(0xC8, 0xFC),
1012 	_INIT_DCS_CMD(0xC9, 0x00),
1013 	_INIT_DCS_CMD(0xCA, 0x00),
1014 	_INIT_DCS_CMD(0xCB, 0x16),
1015 	_INIT_DCS_CMD(0xCC, 0xAF),
1016 	_INIT_DCS_CMD(0xCD, 0xFF),
1017 	_INIT_DCS_CMD(0xCE, 0xFF),
1018 	_INIT_DCS_CMD(0xB0, 0x09),
1019 	_INIT_DCS_CMD(0xB1, 0x04),
1020 	_INIT_DCS_CMD(0xB2, 0x02),
1021 	_INIT_DCS_CMD(0xB3, 0x16),
1022 	_INIT_DCS_CMD(0xB4, 0x24),
1023 	_INIT_DCS_CMD(0xB5, 0x3B),
1024 	_INIT_DCS_CMD(0xB6, 0x4F),
1025 	_INIT_DCS_CMD(0xB7, 0x73),
1026 	_INIT_DCS_CMD(0xB8, 0x99),
1027 	_INIT_DCS_CMD(0xB9, 0xE0),
1028 	_INIT_DCS_CMD(0xBA, 0x26),
1029 	_INIT_DCS_CMD(0xBB, 0xAD),
1030 	_INIT_DCS_CMD(0xBC, 0x36),
1031 	_INIT_DCS_CMD(0xBD, 0x3A),
1032 	_INIT_DCS_CMD(0xBE, 0xAE),
1033 	_INIT_DCS_CMD(0xBF, 0x2A),
1034 	_INIT_DCS_CMD(0xC0, 0x66),
1035 	_INIT_DCS_CMD(0xC1, 0x9E),
1036 	_INIT_DCS_CMD(0xC2, 0xB8),
1037 	_INIT_DCS_CMD(0xC3, 0xD1),
1038 	_INIT_DCS_CMD(0xC4, 0xDD),
1039 	_INIT_DCS_CMD(0xC5, 0xE9),
1040 	_INIT_DCS_CMD(0xC6, 0xF6),
1041 	_INIT_DCS_CMD(0xC7, 0xFA),
1042 	_INIT_DCS_CMD(0xC8, 0xFC),
1043 	_INIT_DCS_CMD(0xC9, 0x00),
1044 	_INIT_DCS_CMD(0xCA, 0x00),
1045 	_INIT_DCS_CMD(0xCB, 0x16),
1046 	_INIT_DCS_CMD(0xCC, 0xAF),
1047 	_INIT_DCS_CMD(0xCD, 0xFF),
1048 	_INIT_DCS_CMD(0xCE, 0xFF),
1049 	_INIT_DCS_CMD(0xB0, 0x0A),
1050 	_INIT_DCS_CMD(0xB1, 0x00),
1051 	_INIT_DCS_CMD(0xB2, 0x02),
1052 	_INIT_DCS_CMD(0xB3, 0x0F),
1053 	_INIT_DCS_CMD(0xB4, 0x25),
1054 	_INIT_DCS_CMD(0xB5, 0x39),
1055 	_INIT_DCS_CMD(0xB6, 0x4E),
1056 	_INIT_DCS_CMD(0xB7, 0x72),
1057 	_INIT_DCS_CMD(0xB8, 0x97),
1058 	_INIT_DCS_CMD(0xB9, 0xDC),
1059 	_INIT_DCS_CMD(0xBA, 0x22),
1060 	_INIT_DCS_CMD(0xBB, 0xA4),
1061 	_INIT_DCS_CMD(0xBC, 0x2B),
1062 	_INIT_DCS_CMD(0xBD, 0x2F),
1063 	_INIT_DCS_CMD(0xBE, 0xA9),
1064 	_INIT_DCS_CMD(0xBF, 0x25),
1065 	_INIT_DCS_CMD(0xC0, 0x61),
1066 	_INIT_DCS_CMD(0xC1, 0x97),
1067 	_INIT_DCS_CMD(0xC2, 0xB2),
1068 	_INIT_DCS_CMD(0xC3, 0xCD),
1069 	_INIT_DCS_CMD(0xC4, 0xD9),
1070 	_INIT_DCS_CMD(0xC5, 0xE7),
1071 	_INIT_DCS_CMD(0xC6, 0xF4),
1072 	_INIT_DCS_CMD(0xC7, 0xFA),
1073 	_INIT_DCS_CMD(0xC8, 0xFC),
1074 	_INIT_DCS_CMD(0xC9, 0x00),
1075 	_INIT_DCS_CMD(0xCA, 0x00),
1076 	_INIT_DCS_CMD(0xCB, 0x16),
1077 	_INIT_DCS_CMD(0xCC, 0xAF),
1078 	_INIT_DCS_CMD(0xCD, 0xFF),
1079 	_INIT_DCS_CMD(0xCE, 0xFF),
1080 	_INIT_DCS_CMD(0xB0, 0x0B),
1081 	_INIT_DCS_CMD(0xB1, 0x04),
1082 	_INIT_DCS_CMD(0xB2, 0x05),
1083 	_INIT_DCS_CMD(0xB3, 0x11),
1084 	_INIT_DCS_CMD(0xB4, 0x24),
1085 	_INIT_DCS_CMD(0xB5, 0x39),
1086 	_INIT_DCS_CMD(0xB6, 0x4F),
1087 	_INIT_DCS_CMD(0xB7, 0x72),
1088 	_INIT_DCS_CMD(0xB8, 0x98),
1089 	_INIT_DCS_CMD(0xB9, 0xDC),
1090 	_INIT_DCS_CMD(0xBA, 0x23),
1091 	_INIT_DCS_CMD(0xBB, 0xA6),
1092 	_INIT_DCS_CMD(0xBC, 0x2C),
1093 	_INIT_DCS_CMD(0xBD, 0x30),
1094 	_INIT_DCS_CMD(0xBE, 0xAA),
1095 	_INIT_DCS_CMD(0xBF, 0x26),
1096 	_INIT_DCS_CMD(0xC0, 0x62),
1097 	_INIT_DCS_CMD(0xC1, 0x9B),
1098 	_INIT_DCS_CMD(0xC2, 0xB5),
1099 	_INIT_DCS_CMD(0xC3, 0xCF),
1100 	_INIT_DCS_CMD(0xC4, 0xDB),
1101 	_INIT_DCS_CMD(0xC5, 0xE8),
1102 	_INIT_DCS_CMD(0xC6, 0xF5),
1103 	_INIT_DCS_CMD(0xC7, 0xFA),
1104 	_INIT_DCS_CMD(0xC8, 0xFC),
1105 	_INIT_DCS_CMD(0xC9, 0x00),
1106 	_INIT_DCS_CMD(0xCA, 0x00),
1107 	_INIT_DCS_CMD(0xCB, 0x16),
1108 	_INIT_DCS_CMD(0xCC, 0xAF),
1109 	_INIT_DCS_CMD(0xCD, 0xFF),
1110 	_INIT_DCS_CMD(0xCE, 0xFF),
1111 	_INIT_DCS_CMD(0xB0, 0x0C),
1112 	_INIT_DCS_CMD(0xB1, 0x04),
1113 	_INIT_DCS_CMD(0xB2, 0x02),
1114 	_INIT_DCS_CMD(0xB3, 0x16),
1115 	_INIT_DCS_CMD(0xB4, 0x24),
1116 	_INIT_DCS_CMD(0xB5, 0x3B),
1117 	_INIT_DCS_CMD(0xB6, 0x4F),
1118 	_INIT_DCS_CMD(0xB7, 0x73),
1119 	_INIT_DCS_CMD(0xB8, 0x99),
1120 	_INIT_DCS_CMD(0xB9, 0xE0),
1121 	_INIT_DCS_CMD(0xBA, 0x26),
1122 	_INIT_DCS_CMD(0xBB, 0xAD),
1123 	_INIT_DCS_CMD(0xBC, 0x36),
1124 	_INIT_DCS_CMD(0xBD, 0x3A),
1125 	_INIT_DCS_CMD(0xBE, 0xAE),
1126 	_INIT_DCS_CMD(0xBF, 0x2A),
1127 	_INIT_DCS_CMD(0xC0, 0x66),
1128 	_INIT_DCS_CMD(0xC1, 0x9E),
1129 	_INIT_DCS_CMD(0xC2, 0xB8),
1130 	_INIT_DCS_CMD(0xC3, 0xD1),
1131 	_INIT_DCS_CMD(0xC4, 0xDD),
1132 	_INIT_DCS_CMD(0xC5, 0xE9),
1133 	_INIT_DCS_CMD(0xC6, 0xF6),
1134 	_INIT_DCS_CMD(0xC7, 0xFA),
1135 	_INIT_DCS_CMD(0xC8, 0xFC),
1136 	_INIT_DCS_CMD(0xC9, 0x00),
1137 	_INIT_DCS_CMD(0xCA, 0x00),
1138 	_INIT_DCS_CMD(0xCB, 0x16),
1139 	_INIT_DCS_CMD(0xCC, 0xAF),
1140 	_INIT_DCS_CMD(0xCD, 0xFF),
1141 	_INIT_DCS_CMD(0xCE, 0xFF),
1142 	_INIT_DCS_CMD(0xB0, 0x00),
1143 	_INIT_DCS_CMD(0xB3, 0x08),
1144 	_INIT_DCS_CMD(0xB0, 0x04),
1145 	_INIT_DCS_CMD(0xB8, 0x68),
1146 	_INIT_DELAY_CMD(150),
1147 	{},
1148 };
1149 
1150 static const struct panel_init_cmd auo_kd101n80_45na_init_cmd[] = {
1151 	_INIT_DELAY_CMD(24),
1152 	_INIT_DCS_CMD(0x11),
1153 	_INIT_DELAY_CMD(120),
1154 	_INIT_DCS_CMD(0x29),
1155 	_INIT_DELAY_CMD(120),
1156 	{},
1157 };
1158 
1159 static const struct panel_init_cmd auo_b101uan08_3_init_cmd[] = {
1160 	_INIT_DELAY_CMD(24),
1161 	_INIT_DCS_CMD(0xB0, 0x01),
1162 	_INIT_DCS_CMD(0xC0, 0x48),
1163 	_INIT_DCS_CMD(0xC1, 0x48),
1164 	_INIT_DCS_CMD(0xC2, 0x47),
1165 	_INIT_DCS_CMD(0xC3, 0x47),
1166 	_INIT_DCS_CMD(0xC4, 0x46),
1167 	_INIT_DCS_CMD(0xC5, 0x46),
1168 	_INIT_DCS_CMD(0xC6, 0x45),
1169 	_INIT_DCS_CMD(0xC7, 0x45),
1170 	_INIT_DCS_CMD(0xC8, 0x64),
1171 	_INIT_DCS_CMD(0xC9, 0x64),
1172 	_INIT_DCS_CMD(0xCA, 0x4F),
1173 	_INIT_DCS_CMD(0xCB, 0x4F),
1174 	_INIT_DCS_CMD(0xCC, 0x40),
1175 	_INIT_DCS_CMD(0xCD, 0x40),
1176 	_INIT_DCS_CMD(0xCE, 0x66),
1177 	_INIT_DCS_CMD(0xCF, 0x66),
1178 	_INIT_DCS_CMD(0xD0, 0x4F),
1179 	_INIT_DCS_CMD(0xD1, 0x4F),
1180 	_INIT_DCS_CMD(0xD2, 0x41),
1181 	_INIT_DCS_CMD(0xD3, 0x41),
1182 	_INIT_DCS_CMD(0xD4, 0x48),
1183 	_INIT_DCS_CMD(0xD5, 0x48),
1184 	_INIT_DCS_CMD(0xD6, 0x47),
1185 	_INIT_DCS_CMD(0xD7, 0x47),
1186 	_INIT_DCS_CMD(0xD8, 0x46),
1187 	_INIT_DCS_CMD(0xD9, 0x46),
1188 	_INIT_DCS_CMD(0xDA, 0x45),
1189 	_INIT_DCS_CMD(0xDB, 0x45),
1190 	_INIT_DCS_CMD(0xDC, 0x64),
1191 	_INIT_DCS_CMD(0xDD, 0x64),
1192 	_INIT_DCS_CMD(0xDE, 0x4F),
1193 	_INIT_DCS_CMD(0xDF, 0x4F),
1194 	_INIT_DCS_CMD(0xE0, 0x40),
1195 	_INIT_DCS_CMD(0xE1, 0x40),
1196 	_INIT_DCS_CMD(0xE2, 0x66),
1197 	_INIT_DCS_CMD(0xE3, 0x66),
1198 	_INIT_DCS_CMD(0xE4, 0x4F),
1199 	_INIT_DCS_CMD(0xE5, 0x4F),
1200 	_INIT_DCS_CMD(0xE6, 0x41),
1201 	_INIT_DCS_CMD(0xE7, 0x41),
1202 	_INIT_DELAY_CMD(150),
1203 	{},
1204 };
1205 
1206 static const struct panel_init_cmd starry_qfh032011_53g_init_cmd[] = {
1207 	_INIT_DCS_CMD(0xB0, 0x01),
1208 	_INIT_DCS_CMD(0xC3, 0x4F),
1209 	_INIT_DCS_CMD(0xC4, 0x40),
1210 	_INIT_DCS_CMD(0xC5, 0x40),
1211 	_INIT_DCS_CMD(0xC6, 0x40),
1212 	_INIT_DCS_CMD(0xC7, 0x40),
1213 	_INIT_DCS_CMD(0xC8, 0x4D),
1214 	_INIT_DCS_CMD(0xC9, 0x52),
1215 	_INIT_DCS_CMD(0xCA, 0x51),
1216 	_INIT_DCS_CMD(0xCD, 0x5D),
1217 	_INIT_DCS_CMD(0xCE, 0x5B),
1218 	_INIT_DCS_CMD(0xCF, 0x4B),
1219 	_INIT_DCS_CMD(0xD0, 0x49),
1220 	_INIT_DCS_CMD(0xD1, 0x47),
1221 	_INIT_DCS_CMD(0xD2, 0x45),
1222 	_INIT_DCS_CMD(0xD3, 0x41),
1223 	_INIT_DCS_CMD(0xD7, 0x50),
1224 	_INIT_DCS_CMD(0xD8, 0x40),
1225 	_INIT_DCS_CMD(0xD9, 0x40),
1226 	_INIT_DCS_CMD(0xDA, 0x40),
1227 	_INIT_DCS_CMD(0xDB, 0x40),
1228 	_INIT_DCS_CMD(0xDC, 0x4E),
1229 	_INIT_DCS_CMD(0xDD, 0x52),
1230 	_INIT_DCS_CMD(0xDE, 0x51),
1231 	_INIT_DCS_CMD(0xE1, 0x5E),
1232 	_INIT_DCS_CMD(0xE2, 0x5C),
1233 	_INIT_DCS_CMD(0xE3, 0x4C),
1234 	_INIT_DCS_CMD(0xE4, 0x4A),
1235 	_INIT_DCS_CMD(0xE5, 0x48),
1236 	_INIT_DCS_CMD(0xE6, 0x46),
1237 	_INIT_DCS_CMD(0xE7, 0x42),
1238 	_INIT_DCS_CMD(0xB0, 0x03),
1239 	_INIT_DCS_CMD(0xBE, 0x03),
1240 	_INIT_DCS_CMD(0xCC, 0x44),
1241 	_INIT_DCS_CMD(0xC8, 0x07),
1242 	_INIT_DCS_CMD(0xC9, 0x05),
1243 	_INIT_DCS_CMD(0xCA, 0x42),
1244 	_INIT_DCS_CMD(0xCD, 0x3E),
1245 	_INIT_DCS_CMD(0xCF, 0x60),
1246 	_INIT_DCS_CMD(0xD2, 0x04),
1247 	_INIT_DCS_CMD(0xD3, 0x04),
1248 	_INIT_DCS_CMD(0xD4, 0x01),
1249 	_INIT_DCS_CMD(0xD5, 0x00),
1250 	_INIT_DCS_CMD(0xD6, 0x03),
1251 	_INIT_DCS_CMD(0xD7, 0x04),
1252 	_INIT_DCS_CMD(0xD9, 0x01),
1253 	_INIT_DCS_CMD(0xDB, 0x01),
1254 	_INIT_DCS_CMD(0xE4, 0xF0),
1255 	_INIT_DCS_CMD(0xE5, 0x0A),
1256 	_INIT_DCS_CMD(0xB0, 0x00),
1257 	_INIT_DCS_CMD(0xCC, 0x08),
1258 	_INIT_DCS_CMD(0xC2, 0x08),
1259 	_INIT_DCS_CMD(0xC4, 0x10),
1260 	_INIT_DCS_CMD(0xB0, 0x02),
1261 	_INIT_DCS_CMD(0xC0, 0x00),
1262 	_INIT_DCS_CMD(0xC1, 0x0A),
1263 	_INIT_DCS_CMD(0xC2, 0x20),
1264 	_INIT_DCS_CMD(0xC3, 0x24),
1265 	_INIT_DCS_CMD(0xC4, 0x23),
1266 	_INIT_DCS_CMD(0xC5, 0x29),
1267 	_INIT_DCS_CMD(0xC6, 0x23),
1268 	_INIT_DCS_CMD(0xC7, 0x1C),
1269 	_INIT_DCS_CMD(0xC8, 0x19),
1270 	_INIT_DCS_CMD(0xC9, 0x17),
1271 	_INIT_DCS_CMD(0xCA, 0x17),
1272 	_INIT_DCS_CMD(0xCB, 0x18),
1273 	_INIT_DCS_CMD(0xCC, 0x1A),
1274 	_INIT_DCS_CMD(0xCD, 0x1E),
1275 	_INIT_DCS_CMD(0xCE, 0x20),
1276 	_INIT_DCS_CMD(0xCF, 0x23),
1277 	_INIT_DCS_CMD(0xD0, 0x07),
1278 	_INIT_DCS_CMD(0xD1, 0x00),
1279 	_INIT_DCS_CMD(0xD2, 0x00),
1280 	_INIT_DCS_CMD(0xD3, 0x0A),
1281 	_INIT_DCS_CMD(0xD4, 0x13),
1282 	_INIT_DCS_CMD(0xD5, 0x1C),
1283 	_INIT_DCS_CMD(0xD6, 0x1A),
1284 	_INIT_DCS_CMD(0xD7, 0x13),
1285 	_INIT_DCS_CMD(0xD8, 0x17),
1286 	_INIT_DCS_CMD(0xD9, 0x1C),
1287 	_INIT_DCS_CMD(0xDA, 0x19),
1288 	_INIT_DCS_CMD(0xDB, 0x17),
1289 	_INIT_DCS_CMD(0xDC, 0x17),
1290 	_INIT_DCS_CMD(0xDD, 0x18),
1291 	_INIT_DCS_CMD(0xDE, 0x1A),
1292 	_INIT_DCS_CMD(0xDF, 0x1E),
1293 	_INIT_DCS_CMD(0xE0, 0x20),
1294 	_INIT_DCS_CMD(0xE1, 0x23),
1295 	_INIT_DCS_CMD(0xE2, 0x07),
1296 	_INIT_DCS_CMD(0X11),
1297 	_INIT_DELAY_CMD(120),
1298 	_INIT_DCS_CMD(0X29),
1299 	_INIT_DELAY_CMD(80),
1300 	{},
1301 };
1302 
1303 static const struct panel_init_cmd starry_himax83102_j02_init_cmd[] = {
1304 	_INIT_DCS_CMD(0xB9, 0x83, 0x10, 0x21, 0x55, 0x00),
1305 	_INIT_DCS_CMD(0xB1, 0x2C, 0xB5, 0xB5, 0x31, 0xF1, 0x31, 0xD7, 0x2F, 0x36, 0x36, 0x36, 0x36, 0x1A, 0x8B, 0x11,
1306 		0x65, 0x00, 0x88, 0xFA, 0xFF, 0xFF, 0x8F, 0xFF, 0x08, 0x74, 0x33),
1307 	_INIT_DCS_CMD(0xB2, 0x00, 0x47, 0xB0, 0x80, 0x00, 0x12, 0x72, 0x3C, 0xA3, 0x03, 0x03, 0x00, 0x00, 0x88, 0xF5),
1308 	_INIT_DCS_CMD(0xB4, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, 0x63, 0x5C, 0x63, 0x5C, 0x01, 0x9E),
1309 	_INIT_DCS_CMD(0xE9, 0xCD),
1310 	_INIT_DCS_CMD(0xBA, 0x84),
1311 	_INIT_DCS_CMD(0xE9, 0x3F),
1312 	_INIT_DCS_CMD(0xBC, 0x1B, 0x04),
1313 	_INIT_DCS_CMD(0xBE, 0x20),
1314 	_INIT_DCS_CMD(0xBF, 0xFC, 0xC4),
1315 	_INIT_DCS_CMD(0xC0, 0x36, 0x36, 0x22, 0x11, 0x22, 0xA0, 0x61, 0x08, 0xF5, 0x03),
1316 	_INIT_DCS_CMD(0xE9, 0xCC),
1317 	_INIT_DCS_CMD(0xC7, 0x80),
1318 	_INIT_DCS_CMD(0xE9, 0x3F),
1319 	_INIT_DCS_CMD(0xE9, 0xC6),
1320 	_INIT_DCS_CMD(0xC8, 0x97),
1321 	_INIT_DCS_CMD(0xE9, 0x3F),
1322 	_INIT_DCS_CMD(0xC9, 0x00, 0x1E, 0x13, 0x88, 0x01),
1323 	_INIT_DCS_CMD(0xCB, 0x08, 0x13, 0x07, 0x00, 0x0F, 0x33),
1324 	_INIT_DCS_CMD(0xCC, 0x02),
1325 	_INIT_DCS_CMD(0xE9, 0xC4),
1326 	_INIT_DCS_CMD(0xD0, 0x03),
1327 	_INIT_DCS_CMD(0xE9, 0x3F),
1328 	_INIT_DCS_CMD(0xD1, 0x37, 0x06, 0x00, 0x02, 0x04, 0x0C, 0xFF),
1329 	_INIT_DCS_CMD(0xD2, 0x1F, 0x11, 0x1F),
1330 	_INIT_DCS_CMD(0xD3, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x37, 0x47, 0x34, 0x3B, 0x12, 0x12, 0x03,
1331 		0x03, 0x32, 0x10, 0x10, 0x00, 0x10, 0x32, 0x10, 0x08, 0x00, 0x08, 0x32, 0x17, 0x94, 0x07, 0x94, 0x00, 0x00),
1332 	_INIT_DCS_CMD(0xD5, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x19, 0x19, 0x40, 0x40, 0x1A, 0x1A,
1333 		0x1B, 0x1B, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x20, 0x21, 0x28, 0x29, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18),
1334 	_INIT_DCS_CMD(0xD6, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x40, 0x40, 0x19, 0x19, 0x1A, 0x1A,
1335 		0x1B, 0x1B, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x29, 0x28, 0x21, 0x20, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18),
1336 	_INIT_DCS_CMD(0xD8, 0xAA, 0xBA, 0xEA, 0xAA, 0xAA, 0xA0, 0xAA, 0xBA, 0xEA, 0xAA, 0xAA, 0xA0, 0xAA, 0xBA, 0xEA, 0xAA,
1337 		0xAA, 0xA0, 0xAA, 0xBA, 0xEA, 0xAA, 0xAA, 0xA0, 0xAA, 0xBA, 0xEA, 0xAA, 0xAA, 0xA0, 0xAA, 0xBA, 0xEA, 0xAA, 0xAA, 0xA0),
1338 	_INIT_DCS_CMD(0xE0, 0x00, 0x09, 0x14, 0x1E, 0x26, 0x48, 0x61, 0x67, 0x6C, 0x67, 0x7D, 0x7F, 0x80, 0x8B, 0x87, 0x8F, 0x98, 0xAB,
1339 		0xAB, 0x55, 0x5C, 0x68, 0x73, 0x00, 0x09, 0x14, 0x1E, 0x26, 0x48, 0x61, 0x67, 0x6C, 0x67, 0x7D, 0x7F, 0x80, 0x8B, 0x87, 0x8F, 0x98, 0xAB, 0xAB, 0x55, 0x5C, 0x68, 0x73),
1340 	_INIT_DCS_CMD(0xE7, 0x0E, 0x10, 0x10, 0x21, 0x2B, 0x9A, 0x02, 0x54, 0x9A, 0x14, 0x14, 0x00, 0x00, 0x00, 0x00, 0x12, 0x05, 0x02, 0x02, 0x10),
1341 	_INIT_DCS_CMD(0xBD, 0x01),
1342 	_INIT_DCS_CMD(0xB1, 0x01, 0xBF, 0x11),
1343 	_INIT_DCS_CMD(0xCB, 0x86),
1344 	_INIT_DCS_CMD(0xD2, 0x3C, 0xFA),
1345 	_INIT_DCS_CMD(0xD3, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0C, 0x01),
1346 	_INIT_DCS_CMD(0xE7, 0x02, 0x00, 0x28, 0x01, 0x7E, 0x0F, 0x7E, 0x10, 0xA0, 0x00, 0x00, 0x20, 0x40, 0x50, 0x40),
1347 	_INIT_DCS_CMD(0xBD, 0x02),
1348 	_INIT_DCS_CMD(0xD8, 0xFF, 0xFF, 0xBF, 0xFE, 0xAA, 0xA0, 0xFF, 0xFF, 0xBF, 0xFE, 0xAA, 0xA0),
1349 	_INIT_DCS_CMD(0xE7, 0xFE, 0x04, 0xFE, 0x04, 0xFE, 0x04, 0x03, 0x03, 0x03, 0x26, 0x00, 0x26, 0x81, 0x02, 0x40, 0x00, 0x20, 0x9E, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00),
1350 	_INIT_DCS_CMD(0xBD, 0x03),
1351 	_INIT_DCS_CMD(0xE9, 0xC6),
1352 	_INIT_DCS_CMD(0xB4, 0x03, 0xFF, 0xF8),
1353 	_INIT_DCS_CMD(0xE9, 0x3F),
1354 	_INIT_DCS_CMD(0xD8, 0x00, 0x2A, 0xAA, 0xA8, 0x00, 0x00, 0x00, 0x2A, 0xAA, 0xA8, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFC, 0x00, 0x00, 0x00, 0x2A, 0xAA, 0xA8,
1355 		0x00, 0x00, 0x00, 0x2A, 0xAA, 0xA8, 0x00, 0x00),
1356 	_INIT_DCS_CMD(0xBD, 0x00),
1357 	_INIT_DCS_CMD(0xE9, 0xC4),
1358 	_INIT_DCS_CMD(0xBA, 0x96),
1359 	_INIT_DCS_CMD(0xE9, 0x3F),
1360 	_INIT_DCS_CMD(0xBD, 0x01),
1361 	_INIT_DCS_CMD(0xE9, 0xC5),
1362 	_INIT_DCS_CMD(0xBA, 0x4F),
1363 	_INIT_DCS_CMD(0xE9, 0x3F),
1364 	_INIT_DCS_CMD(0xBD, 0x00),
1365 	_INIT_DCS_CMD(0x11),
1366 	_INIT_DELAY_CMD(120),
1367 	_INIT_DCS_CMD(0x29),
1368 	{},
1369 };
1370 
1371 static const struct panel_init_cmd starry_ili9882t_init_cmd[] = {
1372 	_INIT_DELAY_CMD(5),
1373 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x01),
1374 	_INIT_DCS_CMD(0x00, 0x42),
1375 	_INIT_DCS_CMD(0x01, 0x11),
1376 	_INIT_DCS_CMD(0x02, 0x00),
1377 	_INIT_DCS_CMD(0x03, 0x00),
1378 
1379 	_INIT_DCS_CMD(0x04, 0x01),
1380 	_INIT_DCS_CMD(0x05, 0x11),
1381 	_INIT_DCS_CMD(0x06, 0x00),
1382 	_INIT_DCS_CMD(0x07, 0x00),
1383 
1384 	_INIT_DCS_CMD(0x08, 0x80),
1385 	_INIT_DCS_CMD(0x09, 0x81),
1386 	_INIT_DCS_CMD(0x0A, 0x71),
1387 	_INIT_DCS_CMD(0x0B, 0x00),
1388 
1389 	_INIT_DCS_CMD(0x0C, 0x00),
1390 	_INIT_DCS_CMD(0x0E, 0x1A),
1391 
1392 	_INIT_DCS_CMD(0x24, 0x00),
1393 	_INIT_DCS_CMD(0x25, 0x00),
1394 	_INIT_DCS_CMD(0x26, 0x00),
1395 	_INIT_DCS_CMD(0x27, 0x00),
1396 
1397 	_INIT_DCS_CMD(0x2C, 0xD4),
1398 	_INIT_DCS_CMD(0xB9, 0x40),
1399 
1400 	_INIT_DCS_CMD(0xB0, 0x11),
1401 
1402 	_INIT_DCS_CMD(0xE6, 0x32),
1403 	_INIT_DCS_CMD(0xD1, 0x30),
1404 
1405 	_INIT_DCS_CMD(0xD6, 0x55),
1406 
1407 	_INIT_DCS_CMD(0xD0, 0x01),
1408 	_INIT_DCS_CMD(0xE3, 0x93),
1409 	_INIT_DCS_CMD(0xE4, 0x00),
1410 	_INIT_DCS_CMD(0xE5, 0x80),
1411 
1412 	_INIT_DCS_CMD(0x31, 0x07),
1413 	_INIT_DCS_CMD(0x32, 0x07),
1414 	_INIT_DCS_CMD(0x33, 0x07),
1415 	_INIT_DCS_CMD(0x34, 0x07),
1416 	_INIT_DCS_CMD(0x35, 0x07),
1417 	_INIT_DCS_CMD(0x36, 0x01),
1418 	_INIT_DCS_CMD(0x37, 0x00),
1419 	_INIT_DCS_CMD(0x38, 0x28),
1420 	_INIT_DCS_CMD(0x39, 0x29),
1421 	_INIT_DCS_CMD(0x3A, 0x11),
1422 	_INIT_DCS_CMD(0x3B, 0x13),
1423 	_INIT_DCS_CMD(0x3C, 0x15),
1424 	_INIT_DCS_CMD(0x3D, 0x17),
1425 	_INIT_DCS_CMD(0x3E, 0x09),
1426 	_INIT_DCS_CMD(0x3F, 0x0D),
1427 	_INIT_DCS_CMD(0x40, 0x02),
1428 	_INIT_DCS_CMD(0x41, 0x02),
1429 	_INIT_DCS_CMD(0x42, 0x02),
1430 	_INIT_DCS_CMD(0x43, 0x02),
1431 	_INIT_DCS_CMD(0x44, 0x02),
1432 	_INIT_DCS_CMD(0x45, 0x02),
1433 	_INIT_DCS_CMD(0x46, 0x02),
1434 
1435 	_INIT_DCS_CMD(0x47, 0x07),
1436 	_INIT_DCS_CMD(0x48, 0x07),
1437 	_INIT_DCS_CMD(0x49, 0x07),
1438 	_INIT_DCS_CMD(0x4A, 0x07),
1439 	_INIT_DCS_CMD(0x4B, 0x07),
1440 	_INIT_DCS_CMD(0x4C, 0x01),
1441 	_INIT_DCS_CMD(0x4D, 0x00),
1442 	_INIT_DCS_CMD(0x4E, 0x28),
1443 	_INIT_DCS_CMD(0x4F, 0x29),
1444 	_INIT_DCS_CMD(0x50, 0x10),
1445 	_INIT_DCS_CMD(0x51, 0x12),
1446 	_INIT_DCS_CMD(0x52, 0x14),
1447 	_INIT_DCS_CMD(0x53, 0x16),
1448 	_INIT_DCS_CMD(0x54, 0x08),
1449 	_INIT_DCS_CMD(0x55, 0x0C),
1450 	_INIT_DCS_CMD(0x56, 0x02),
1451 	_INIT_DCS_CMD(0x57, 0x02),
1452 	_INIT_DCS_CMD(0x58, 0x02),
1453 	_INIT_DCS_CMD(0x59, 0x02),
1454 	_INIT_DCS_CMD(0x5A, 0x02),
1455 	_INIT_DCS_CMD(0x5B, 0x02),
1456 	_INIT_DCS_CMD(0x5C, 0x02),
1457 
1458 	_INIT_DCS_CMD(0x61, 0x07),
1459 	_INIT_DCS_CMD(0x62, 0x07),
1460 	_INIT_DCS_CMD(0x63, 0x07),
1461 	_INIT_DCS_CMD(0x64, 0x07),
1462 	_INIT_DCS_CMD(0x65, 0x07),
1463 	_INIT_DCS_CMD(0x66, 0x01),
1464 	_INIT_DCS_CMD(0x67, 0x00),
1465 	_INIT_DCS_CMD(0x68, 0x28),
1466 	_INIT_DCS_CMD(0x69, 0x29),
1467 	_INIT_DCS_CMD(0x6A, 0x16),
1468 	_INIT_DCS_CMD(0x6B, 0x14),
1469 	_INIT_DCS_CMD(0x6C, 0x12),
1470 	_INIT_DCS_CMD(0x6D, 0x10),
1471 	_INIT_DCS_CMD(0x6E, 0x0C),
1472 	_INIT_DCS_CMD(0x6F, 0x08),
1473 	_INIT_DCS_CMD(0x70, 0x02),
1474 	_INIT_DCS_CMD(0x71, 0x02),
1475 	_INIT_DCS_CMD(0x72, 0x02),
1476 	_INIT_DCS_CMD(0x73, 0x02),
1477 	_INIT_DCS_CMD(0x74, 0x02),
1478 	_INIT_DCS_CMD(0x75, 0x02),
1479 	_INIT_DCS_CMD(0x76, 0x02),
1480 
1481 	_INIT_DCS_CMD(0x77, 0x07),
1482 	_INIT_DCS_CMD(0x78, 0x07),
1483 	_INIT_DCS_CMD(0x79, 0x07),
1484 	_INIT_DCS_CMD(0x7A, 0x07),
1485 	_INIT_DCS_CMD(0x7B, 0x07),
1486 	_INIT_DCS_CMD(0x7C, 0x01),
1487 	_INIT_DCS_CMD(0x7D, 0x00),
1488 	_INIT_DCS_CMD(0x7E, 0x28),
1489 	_INIT_DCS_CMD(0x7F, 0x29),
1490 	_INIT_DCS_CMD(0x80, 0x17),
1491 	_INIT_DCS_CMD(0x81, 0x15),
1492 	_INIT_DCS_CMD(0x82, 0x13),
1493 	_INIT_DCS_CMD(0x83, 0x11),
1494 	_INIT_DCS_CMD(0x84, 0x0D),
1495 	_INIT_DCS_CMD(0x85, 0x09),
1496 	_INIT_DCS_CMD(0x86, 0x02),
1497 	_INIT_DCS_CMD(0x87, 0x07),
1498 	_INIT_DCS_CMD(0x88, 0x07),
1499 	_INIT_DCS_CMD(0x89, 0x07),
1500 	_INIT_DCS_CMD(0x8A, 0x07),
1501 	_INIT_DCS_CMD(0x8B, 0x07),
1502 	_INIT_DCS_CMD(0x8C, 0x07),
1503 
1504 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x02),
1505 	_INIT_DCS_CMD(0x29, 0x3A),
1506 	_INIT_DCS_CMD(0x2A, 0x3B),
1507 
1508 	_INIT_DCS_CMD(0x06, 0x01),
1509 	_INIT_DCS_CMD(0x07, 0x01),
1510 	_INIT_DCS_CMD(0x08, 0x0C),
1511 	_INIT_DCS_CMD(0x09, 0x44),
1512 
1513 	_INIT_DCS_CMD(0x3C, 0x0A),
1514 	_INIT_DCS_CMD(0x39, 0x11),
1515 	_INIT_DCS_CMD(0x3D, 0x00),
1516 	_INIT_DCS_CMD(0x3A, 0x0C),
1517 	_INIT_DCS_CMD(0x3B, 0x44),
1518 
1519 	_INIT_DCS_CMD(0x53, 0x1F),
1520 	_INIT_DCS_CMD(0x5E, 0x40),
1521 	_INIT_DCS_CMD(0x84, 0x00),
1522 
1523 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x03),
1524 	_INIT_DCS_CMD(0x20, 0x01),
1525 	_INIT_DCS_CMD(0x21, 0x3C),
1526 	_INIT_DCS_CMD(0x22, 0xFA),
1527 
1528 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x0A),
1529 	_INIT_DCS_CMD(0xE0, 0x01),
1530 	_INIT_DCS_CMD(0xE2, 0x01),
1531 	_INIT_DCS_CMD(0xE5, 0x91),
1532 	_INIT_DCS_CMD(0xE6, 0x3C),
1533 	_INIT_DCS_CMD(0xE7, 0x00),
1534 	_INIT_DCS_CMD(0xE8, 0xFA),
1535 
1536 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x12),
1537 	_INIT_DCS_CMD(0x87, 0x2C),
1538 
1539 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x05),
1540 	_INIT_DCS_CMD(0x73, 0xE5),
1541 	_INIT_DCS_CMD(0x7F, 0x6B),
1542 	_INIT_DCS_CMD(0x6D, 0xA4),
1543 	_INIT_DCS_CMD(0x79, 0x54),
1544 	_INIT_DCS_CMD(0x69, 0x97),
1545 	_INIT_DCS_CMD(0x6A, 0x97),
1546 	_INIT_DCS_CMD(0xA5, 0x3F),
1547 	_INIT_DCS_CMD(0x61, 0xDA),
1548 	_INIT_DCS_CMD(0xA7, 0xF1),
1549 	_INIT_DCS_CMD(0x5F, 0x01),
1550 	_INIT_DCS_CMD(0x62, 0x3F),
1551 	_INIT_DCS_CMD(0x1D, 0x90),
1552 	_INIT_DCS_CMD(0x86, 0x87),
1553 
1554 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x06),
1555 	_INIT_DCS_CMD(0xC0, 0x80),
1556 	_INIT_DCS_CMD(0xC1, 0x07),
1557 	_INIT_DCS_CMD(0xCA, 0x58),
1558 	_INIT_DCS_CMD(0xCB, 0x02),
1559 	_INIT_DCS_CMD(0xCE, 0x58),
1560 	_INIT_DCS_CMD(0xCF, 0x02),
1561 	_INIT_DCS_CMD(0x67, 0x60),
1562 	_INIT_DCS_CMD(0x10, 0x00),
1563 	_INIT_DCS_CMD(0x92, 0x22),
1564 	_INIT_DCS_CMD(0xD3, 0x08),
1565 	_INIT_DCS_CMD(0xD6, 0x55),
1566 	_INIT_DCS_CMD(0xDC, 0x38),
1567 
1568 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x08),
1569 	_INIT_DCS_CMD(0xE0, 0x00, 0x10, 0x2A, 0x4D, 0x61, 0x56, 0x6A, 0x6E, 0x79, 0x76, 0x8F, 0x95, 0x98, 0xAE, 0xAA, 0xB2, 0xBB, 0xCE, 0xC6, 0xBD, 0xD5, 0xE2, 0xE8),
1570 	_INIT_DCS_CMD(0xE1, 0x00, 0x10, 0x2A, 0x4D, 0x61, 0x56, 0x6A, 0x6E, 0x79, 0x76, 0x8F, 0x95, 0x98, 0xAE, 0xAA, 0xB2, 0xBB, 0xCE, 0xC6, 0xBD, 0xD5, 0xE2, 0xE8),
1571 
1572 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x04),
1573 	_INIT_DCS_CMD(0xBA, 0x81),
1574 
1575 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x0C),
1576 	_INIT_DCS_CMD(0x00, 0x02),
1577 	_INIT_DCS_CMD(0x01, 0x00),
1578 	_INIT_DCS_CMD(0x02, 0x03),
1579 	_INIT_DCS_CMD(0x03, 0x01),
1580 	_INIT_DCS_CMD(0x04, 0x03),
1581 	_INIT_DCS_CMD(0x05, 0x02),
1582 	_INIT_DCS_CMD(0x06, 0x04),
1583 	_INIT_DCS_CMD(0x07, 0x03),
1584 	_INIT_DCS_CMD(0x08, 0x03),
1585 	_INIT_DCS_CMD(0x09, 0x04),
1586 	_INIT_DCS_CMD(0x0A, 0x04),
1587 	_INIT_DCS_CMD(0x0B, 0x05),
1588 	_INIT_DCS_CMD(0x0C, 0x04),
1589 	_INIT_DCS_CMD(0x0D, 0x06),
1590 	_INIT_DCS_CMD(0x0E, 0x05),
1591 	_INIT_DCS_CMD(0x0F, 0x07),
1592 	_INIT_DCS_CMD(0x10, 0x04),
1593 	_INIT_DCS_CMD(0x11, 0x08),
1594 	_INIT_DCS_CMD(0x12, 0x05),
1595 	_INIT_DCS_CMD(0x13, 0x09),
1596 	_INIT_DCS_CMD(0x14, 0x05),
1597 	_INIT_DCS_CMD(0x15, 0x0A),
1598 	_INIT_DCS_CMD(0x16, 0x06),
1599 	_INIT_DCS_CMD(0x17, 0x0B),
1600 	_INIT_DCS_CMD(0x18, 0x05),
1601 	_INIT_DCS_CMD(0x19, 0x0C),
1602 	_INIT_DCS_CMD(0x1A, 0x06),
1603 	_INIT_DCS_CMD(0x1B, 0x0D),
1604 	_INIT_DCS_CMD(0x1C, 0x06),
1605 	_INIT_DCS_CMD(0x1D, 0x0E),
1606 	_INIT_DCS_CMD(0x1E, 0x07),
1607 	_INIT_DCS_CMD(0x1F, 0x0F),
1608 	_INIT_DCS_CMD(0x20, 0x06),
1609 	_INIT_DCS_CMD(0x21, 0x10),
1610 	_INIT_DCS_CMD(0x22, 0x07),
1611 	_INIT_DCS_CMD(0x23, 0x11),
1612 	_INIT_DCS_CMD(0x24, 0x07),
1613 	_INIT_DCS_CMD(0x25, 0x12),
1614 	_INIT_DCS_CMD(0x26, 0x08),
1615 	_INIT_DCS_CMD(0x27, 0x13),
1616 	_INIT_DCS_CMD(0x28, 0x07),
1617 	_INIT_DCS_CMD(0x29, 0x14),
1618 	_INIT_DCS_CMD(0x2A, 0x08),
1619 	_INIT_DCS_CMD(0x2B, 0x15),
1620 	_INIT_DCS_CMD(0x2C, 0x08),
1621 	_INIT_DCS_CMD(0x2D, 0x16),
1622 	_INIT_DCS_CMD(0x2E, 0x09),
1623 	_INIT_DCS_CMD(0x2F, 0x17),
1624 	_INIT_DCS_CMD(0x30, 0x08),
1625 	_INIT_DCS_CMD(0x31, 0x18),
1626 	_INIT_DCS_CMD(0x32, 0x09),
1627 	_INIT_DCS_CMD(0x33, 0x19),
1628 	_INIT_DCS_CMD(0x34, 0x09),
1629 	_INIT_DCS_CMD(0x35, 0x1A),
1630 	_INIT_DCS_CMD(0x36, 0x0A),
1631 	_INIT_DCS_CMD(0x37, 0x1B),
1632 	_INIT_DCS_CMD(0x38, 0x0A),
1633 	_INIT_DCS_CMD(0x39, 0x1C),
1634 	_INIT_DCS_CMD(0x3A, 0x0A),
1635 	_INIT_DCS_CMD(0x3B, 0x1D),
1636 	_INIT_DCS_CMD(0x3C, 0x0A),
1637 	_INIT_DCS_CMD(0x3D, 0x1E),
1638 	_INIT_DCS_CMD(0x3E, 0x0A),
1639 	_INIT_DCS_CMD(0x3F, 0x1F),
1640 
1641 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x04),
1642 	_INIT_DCS_CMD(0xBA, 0x01),
1643 
1644 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x0E),
1645 	_INIT_DCS_CMD(0x02, 0x0C),
1646 	_INIT_DCS_CMD(0x20, 0x10),
1647 	_INIT_DCS_CMD(0x25, 0x16),
1648 	_INIT_DCS_CMD(0x26, 0xE0),
1649 	_INIT_DCS_CMD(0x27, 0x00),
1650 	_INIT_DCS_CMD(0x29, 0x71),
1651 	_INIT_DCS_CMD(0x2A, 0x46),
1652 	_INIT_DCS_CMD(0x2B, 0x1F),
1653 	_INIT_DCS_CMD(0x2D, 0xC7),
1654 	_INIT_DCS_CMD(0x31, 0x02),
1655 	_INIT_DCS_CMD(0x32, 0xDF),
1656 	_INIT_DCS_CMD(0x33, 0x5A),
1657 	_INIT_DCS_CMD(0x34, 0xC0),
1658 	_INIT_DCS_CMD(0x35, 0x5A),
1659 	_INIT_DCS_CMD(0x36, 0xC0),
1660 	_INIT_DCS_CMD(0x38, 0x65),
1661 	_INIT_DCS_CMD(0x80, 0x3E),
1662 	_INIT_DCS_CMD(0x81, 0xA0),
1663 	_INIT_DCS_CMD(0xB0, 0x01),
1664 	_INIT_DCS_CMD(0xB1, 0xCC),
1665 	_INIT_DCS_CMD(0xC0, 0x12),
1666 	_INIT_DCS_CMD(0xC2, 0xCC),
1667 	_INIT_DCS_CMD(0xC3, 0xCC),
1668 	_INIT_DCS_CMD(0xC4, 0xCC),
1669 	_INIT_DCS_CMD(0xC5, 0xCC),
1670 	_INIT_DCS_CMD(0xC6, 0xCC),
1671 	_INIT_DCS_CMD(0xC7, 0xCC),
1672 	_INIT_DCS_CMD(0xC8, 0xCC),
1673 	_INIT_DCS_CMD(0xC9, 0xCC),
1674 	_INIT_DCS_CMD(0x30, 0x00),
1675 	_INIT_DCS_CMD(0x00, 0x81),
1676 	_INIT_DCS_CMD(0x08, 0x02),
1677 	_INIT_DCS_CMD(0x09, 0x00),
1678 	_INIT_DCS_CMD(0x07, 0x21),
1679 	_INIT_DCS_CMD(0x04, 0x10),
1680 
1681 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x1E),
1682 	_INIT_DCS_CMD(0x60, 0x00),
1683 	_INIT_DCS_CMD(0x64, 0x00),
1684 	_INIT_DCS_CMD(0x6D, 0x00),
1685 
1686 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x0B),
1687 	_INIT_DCS_CMD(0xA6, 0x44),
1688 	_INIT_DCS_CMD(0xA7, 0xB6),
1689 	_INIT_DCS_CMD(0xA8, 0x03),
1690 	_INIT_DCS_CMD(0xA9, 0x03),
1691 	_INIT_DCS_CMD(0xAA, 0x51),
1692 	_INIT_DCS_CMD(0xAB, 0x51),
1693 	_INIT_DCS_CMD(0xAC, 0x04),
1694 	_INIT_DCS_CMD(0xBD, 0x92),
1695 	_INIT_DCS_CMD(0xBE, 0xA1),
1696 
1697 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x05),
1698 	_INIT_DCS_CMD(0x86, 0x87),
1699 
1700 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x06),
1701 	_INIT_DCS_CMD(0x92, 0x22),
1702 
1703 	_INIT_DCS_CMD(0xFF, 0x98, 0x82, 0x00),
1704 	_INIT_DCS_CMD(0x11),
1705 	_INIT_DELAY_CMD(120),
1706 	_INIT_DCS_CMD(0x29),
1707 	_INIT_DELAY_CMD(20),
1708 	{},
1709 };
1710 
1711 static inline struct boe_panel *to_boe_panel(struct drm_panel *panel)
1712 {
1713 	return container_of(panel, struct boe_panel, base);
1714 }
1715 
1716 static int boe_panel_init_dcs_cmd(struct boe_panel *boe)
1717 {
1718 	struct mipi_dsi_device *dsi = boe->dsi;
1719 	struct drm_panel *panel = &boe->base;
1720 	int i, err = 0;
1721 
1722 	if (boe->desc->init_cmds) {
1723 		const struct panel_init_cmd *init_cmds = boe->desc->init_cmds;
1724 
1725 		for (i = 0; init_cmds[i].len != 0; i++) {
1726 			const struct panel_init_cmd *cmd = &init_cmds[i];
1727 
1728 			switch (cmd->type) {
1729 			case DELAY_CMD:
1730 				msleep(cmd->data[0]);
1731 				err = 0;
1732 				break;
1733 
1734 			case INIT_DCS_CMD:
1735 				err = mipi_dsi_dcs_write(dsi, cmd->data[0],
1736 							 cmd->len <= 1 ? NULL :
1737 							 &cmd->data[1],
1738 							 cmd->len - 1);
1739 				break;
1740 
1741 			default:
1742 				err = -EINVAL;
1743 			}
1744 
1745 			if (err < 0) {
1746 				dev_err(panel->dev,
1747 					"failed to write command %u\n", i);
1748 				return err;
1749 			}
1750 		}
1751 	}
1752 	return 0;
1753 }
1754 
1755 static int boe_panel_enter_sleep_mode(struct boe_panel *boe)
1756 {
1757 	struct mipi_dsi_device *dsi = boe->dsi;
1758 	int ret;
1759 
1760 	dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
1761 
1762 	ret = mipi_dsi_dcs_set_display_off(dsi);
1763 	if (ret < 0)
1764 		return ret;
1765 
1766 	ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
1767 	if (ret < 0)
1768 		return ret;
1769 
1770 	return 0;
1771 }
1772 
1773 static int boe_panel_disable(struct drm_panel *panel)
1774 {
1775 	struct boe_panel *boe = to_boe_panel(panel);
1776 	int ret;
1777 
1778 	ret = boe_panel_enter_sleep_mode(boe);
1779 	if (ret < 0) {
1780 		dev_err(panel->dev, "failed to set panel off: %d\n", ret);
1781 		return ret;
1782 	}
1783 
1784 	msleep(150);
1785 
1786 	return 0;
1787 }
1788 
1789 static int boe_panel_unprepare(struct drm_panel *panel)
1790 {
1791 	struct boe_panel *boe = to_boe_panel(panel);
1792 
1793 	if (!boe->prepared)
1794 		return 0;
1795 
1796 	if (boe->desc->discharge_on_disable) {
1797 		regulator_disable(boe->avee);
1798 		regulator_disable(boe->avdd);
1799 		usleep_range(5000, 7000);
1800 		gpiod_set_value(boe->enable_gpio, 0);
1801 		usleep_range(5000, 7000);
1802 		regulator_disable(boe->pp1800);
1803 		regulator_disable(boe->pp3300);
1804 	} else {
1805 		gpiod_set_value(boe->enable_gpio, 0);
1806 		usleep_range(1000, 2000);
1807 		regulator_disable(boe->avee);
1808 		regulator_disable(boe->avdd);
1809 		usleep_range(5000, 7000);
1810 		regulator_disable(boe->pp1800);
1811 		regulator_disable(boe->pp3300);
1812 	}
1813 
1814 	boe->prepared = false;
1815 
1816 	return 0;
1817 }
1818 
1819 static int boe_panel_prepare(struct drm_panel *panel)
1820 {
1821 	struct boe_panel *boe = to_boe_panel(panel);
1822 	int ret;
1823 
1824 	if (boe->prepared)
1825 		return 0;
1826 
1827 	gpiod_set_value(boe->enable_gpio, 0);
1828 	usleep_range(1000, 1500);
1829 
1830 	ret = regulator_enable(boe->pp3300);
1831 	if (ret < 0)
1832 		return ret;
1833 
1834 	ret = regulator_enable(boe->pp1800);
1835 	if (ret < 0)
1836 		return ret;
1837 
1838 	usleep_range(3000, 5000);
1839 
1840 	ret = regulator_enable(boe->avdd);
1841 	if (ret < 0)
1842 		goto poweroff1v8;
1843 	ret = regulator_enable(boe->avee);
1844 	if (ret < 0)
1845 		goto poweroffavdd;
1846 
1847 	usleep_range(10000, 11000);
1848 
1849 	if (boe->desc->lp11_before_reset) {
1850 		mipi_dsi_dcs_nop(boe->dsi);
1851 		usleep_range(1000, 2000);
1852 	}
1853 	gpiod_set_value(boe->enable_gpio, 1);
1854 	usleep_range(1000, 2000);
1855 	gpiod_set_value(boe->enable_gpio, 0);
1856 	usleep_range(1000, 2000);
1857 	gpiod_set_value(boe->enable_gpio, 1);
1858 	usleep_range(6000, 10000);
1859 
1860 	ret = boe_panel_init_dcs_cmd(boe);
1861 	if (ret < 0) {
1862 		dev_err(panel->dev, "failed to init panel: %d\n", ret);
1863 		goto poweroff;
1864 	}
1865 
1866 	boe->prepared = true;
1867 
1868 	return 0;
1869 
1870 poweroff:
1871 	regulator_disable(boe->avee);
1872 poweroffavdd:
1873 	regulator_disable(boe->avdd);
1874 poweroff1v8:
1875 	usleep_range(5000, 7000);
1876 	regulator_disable(boe->pp1800);
1877 	gpiod_set_value(boe->enable_gpio, 0);
1878 
1879 	return ret;
1880 }
1881 
1882 static int boe_panel_enable(struct drm_panel *panel)
1883 {
1884 	msleep(130);
1885 	return 0;
1886 }
1887 
1888 static const struct drm_display_mode boe_tv110c9m_default_mode = {
1889 	.clock = 166594,
1890 	.hdisplay = 1200,
1891 	.hsync_start = 1200 + 40,
1892 	.hsync_end = 1200 + 40 + 8,
1893 	.htotal = 1200 + 40 + 8 + 28,
1894 	.vdisplay = 2000,
1895 	.vsync_start = 2000 + 26,
1896 	.vsync_end = 2000 + 26 + 2,
1897 	.vtotal = 2000 + 26 + 2 + 148,
1898 	.type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
1899 };
1900 
1901 static const struct panel_desc boe_tv110c9m_desc = {
1902 	.modes = &boe_tv110c9m_default_mode,
1903 	.bpc = 8,
1904 	.size = {
1905 		.width_mm = 143,
1906 		.height_mm = 238,
1907 	},
1908 	.lanes = 4,
1909 	.format = MIPI_DSI_FMT_RGB888,
1910 	.mode_flags = MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_VIDEO
1911 			| MIPI_DSI_MODE_VIDEO_HSE
1912 			| MIPI_DSI_CLOCK_NON_CONTINUOUS
1913 			| MIPI_DSI_MODE_VIDEO_BURST,
1914 	.init_cmds = boe_tv110c9m_init_cmd,
1915 };
1916 
1917 static const struct drm_display_mode inx_hj110iz_default_mode = {
1918 	.clock = 168432,
1919 	.hdisplay = 1200,
1920 	.hsync_start = 1200 + 40,
1921 	.hsync_end = 1200 + 40 + 8,
1922 	.htotal = 1200 + 40 + 8 + 28,
1923 	.vdisplay = 2000,
1924 	.vsync_start = 2000 + 26,
1925 	.vsync_end = 2000 + 26 + 2,
1926 	.vtotal = 2000 + 26 + 2 + 172,
1927 	.type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
1928 };
1929 
1930 static const struct panel_desc inx_hj110iz_desc = {
1931 	.modes = &inx_hj110iz_default_mode,
1932 	.bpc = 8,
1933 	.size = {
1934 		.width_mm = 143,
1935 		.height_mm = 238,
1936 	},
1937 	.lanes = 4,
1938 	.format = MIPI_DSI_FMT_RGB888,
1939 	.mode_flags = MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_VIDEO
1940 			| MIPI_DSI_MODE_VIDEO_HSE
1941 			| MIPI_DSI_CLOCK_NON_CONTINUOUS
1942 			| MIPI_DSI_MODE_VIDEO_BURST,
1943 	.init_cmds = inx_hj110iz_init_cmd,
1944 };
1945 
1946 static const struct drm_display_mode boe_tv101wum_nl6_default_mode = {
1947 	.clock = 159425,
1948 	.hdisplay = 1200,
1949 	.hsync_start = 1200 + 100,
1950 	.hsync_end = 1200 + 100 + 40,
1951 	.htotal = 1200 + 100 + 40 + 24,
1952 	.vdisplay = 1920,
1953 	.vsync_start = 1920 + 10,
1954 	.vsync_end = 1920 + 10 + 14,
1955 	.vtotal = 1920 + 10 + 14 + 4,
1956 };
1957 
1958 static const struct panel_desc boe_tv101wum_nl6_desc = {
1959 	.modes = &boe_tv101wum_nl6_default_mode,
1960 	.bpc = 8,
1961 	.size = {
1962 		.width_mm = 135,
1963 		.height_mm = 216,
1964 	},
1965 	.lanes = 4,
1966 	.format = MIPI_DSI_FMT_RGB888,
1967 	.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
1968 		      MIPI_DSI_MODE_LPM,
1969 	.init_cmds = boe_init_cmd,
1970 	.discharge_on_disable = false,
1971 };
1972 
1973 static const struct drm_display_mode auo_kd101n80_45na_default_mode = {
1974 	.clock = 157000,
1975 	.hdisplay = 1200,
1976 	.hsync_start = 1200 + 60,
1977 	.hsync_end = 1200 + 60 + 24,
1978 	.htotal = 1200 + 60 + 24 + 56,
1979 	.vdisplay = 1920,
1980 	.vsync_start = 1920 + 16,
1981 	.vsync_end = 1920 + 16 + 4,
1982 	.vtotal = 1920 + 16 + 4 + 16,
1983 };
1984 
1985 static const struct panel_desc auo_kd101n80_45na_desc = {
1986 	.modes = &auo_kd101n80_45na_default_mode,
1987 	.bpc = 8,
1988 	.size = {
1989 		.width_mm = 135,
1990 		.height_mm = 216,
1991 	},
1992 	.lanes = 4,
1993 	.format = MIPI_DSI_FMT_RGB888,
1994 	.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
1995 		      MIPI_DSI_MODE_LPM,
1996 	.init_cmds = auo_kd101n80_45na_init_cmd,
1997 	.discharge_on_disable = true,
1998 };
1999 
2000 static const struct drm_display_mode boe_tv101wum_n53_default_mode = {
2001 	.clock = 159916,
2002 	.hdisplay = 1200,
2003 	.hsync_start = 1200 + 80,
2004 	.hsync_end = 1200 + 80 + 24,
2005 	.htotal = 1200 + 80 + 24 + 60,
2006 	.vdisplay = 1920,
2007 	.vsync_start = 1920 + 20,
2008 	.vsync_end = 1920 + 20 + 4,
2009 	.vtotal = 1920 + 20 + 4 + 10,
2010 	.type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
2011 };
2012 
2013 static const struct panel_desc boe_tv101wum_n53_desc = {
2014 	.modes = &boe_tv101wum_n53_default_mode,
2015 	.bpc = 8,
2016 	.size = {
2017 		.width_mm = 135,
2018 		.height_mm = 216,
2019 	},
2020 	.lanes = 4,
2021 	.format = MIPI_DSI_FMT_RGB888,
2022 	.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
2023 		      MIPI_DSI_MODE_LPM,
2024 	.init_cmds = boe_init_cmd,
2025 };
2026 
2027 static const struct drm_display_mode auo_b101uan08_3_default_mode = {
2028 	.clock = 159667,
2029 	.hdisplay = 1200,
2030 	.hsync_start = 1200 + 60,
2031 	.hsync_end = 1200 + 60 + 4,
2032 	.htotal = 1200 + 60 + 4 + 80,
2033 	.vdisplay = 1920,
2034 	.vsync_start = 1920 + 34,
2035 	.vsync_end = 1920 + 34 + 2,
2036 	.vtotal = 1920 + 34 + 2 + 24,
2037 	.type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
2038 };
2039 
2040 static const struct panel_desc auo_b101uan08_3_desc = {
2041 	.modes = &auo_b101uan08_3_default_mode,
2042 	.bpc = 8,
2043 	.size = {
2044 		.width_mm = 135,
2045 		.height_mm = 216,
2046 	},
2047 	.lanes = 4,
2048 	.format = MIPI_DSI_FMT_RGB888,
2049 	.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
2050 		      MIPI_DSI_MODE_LPM,
2051 	.init_cmds = auo_b101uan08_3_init_cmd,
2052 	.lp11_before_reset = true,
2053 };
2054 
2055 static const struct drm_display_mode boe_tv105wum_nw0_default_mode = {
2056 	.clock = 159916,
2057 	.hdisplay = 1200,
2058 	.hsync_start = 1200 + 80,
2059 	.hsync_end = 1200 + 80 + 24,
2060 	.htotal = 1200 + 80 + 24 + 60,
2061 	.vdisplay = 1920,
2062 	.vsync_start = 1920 + 20,
2063 	.vsync_end = 1920 + 20 + 4,
2064 	.vtotal = 1920 + 20 + 4 + 10,
2065 	.type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
2066 };
2067 
2068 static const struct panel_desc boe_tv105wum_nw0_desc = {
2069 	.modes = &boe_tv105wum_nw0_default_mode,
2070 	.bpc = 8,
2071 	.size = {
2072 		.width_mm = 141,
2073 		.height_mm = 226,
2074 	},
2075 	.lanes = 4,
2076 	.format = MIPI_DSI_FMT_RGB888,
2077 	.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
2078 		      MIPI_DSI_MODE_LPM,
2079 	.init_cmds = boe_init_cmd,
2080 	.lp11_before_reset = true,
2081 };
2082 
2083 static const struct drm_display_mode starry_qfh032011_53g_default_mode = {
2084 	.clock = 165731,
2085 	.hdisplay = 1200,
2086 	.hsync_start = 1200 + 100,
2087 	.hsync_end = 1200 + 100 + 10,
2088 	.htotal = 1200 + 100 + 10 + 100,
2089 	.vdisplay = 1920,
2090 	.vsync_start = 1920 + 14,
2091 	.vsync_end = 1920 + 14 + 10,
2092 	.vtotal = 1920 + 14 + 10 + 15,
2093 };
2094 
2095 static const struct panel_desc starry_qfh032011_53g_desc = {
2096 	.modes = &starry_qfh032011_53g_default_mode,
2097 	.bpc = 8,
2098 	.size = {
2099 		.width_mm = 135,
2100 		.height_mm = 216,
2101 	},
2102 	.lanes = 4,
2103 	.format = MIPI_DSI_FMT_RGB888,
2104 	.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
2105 		      MIPI_DSI_MODE_LPM,
2106 	.init_cmds = starry_qfh032011_53g_init_cmd,
2107 	.lp11_before_reset = true,
2108 };
2109 
2110 static const struct drm_display_mode starry_himax83102_j02_default_mode = {
2111 	.clock = 162850,
2112 	.hdisplay = 1200,
2113 	.hsync_start = 1200 + 50,
2114 	.hsync_end = 1200 + 50 + 20,
2115 	.htotal = 1200 + 50 + 20 + 50,
2116 	.vdisplay = 1920,
2117 	.vsync_start = 1920 + 116,
2118 	.vsync_end = 1920 + 116 + 8,
2119 	.vtotal = 1920 + 116 + 8 + 12,
2120 	.type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
2121 };
2122 
2123 static const struct panel_desc starry_himax83102_j02_desc = {
2124 	.modes = &starry_himax83102_j02_default_mode,
2125 	.bpc = 8,
2126 	.size = {
2127 		.width_mm = 141,
2128 		.height_mm = 226,
2129 	},
2130 	.lanes = 4,
2131 	.format = MIPI_DSI_FMT_RGB888,
2132 	.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
2133 		      MIPI_DSI_MODE_LPM,
2134 	.init_cmds = starry_himax83102_j02_init_cmd,
2135 	.lp11_before_reset = true,
2136 };
2137 
2138 static const struct drm_display_mode starry_ili9882t_default_mode = {
2139 	.clock = 165280,
2140 	.hdisplay = 1200,
2141 	.hsync_start = 1200 + 72,
2142 	.hsync_end = 1200 + 72 + 30,
2143 	.htotal = 1200 + 72 + 30 + 72,
2144 	.vdisplay = 1920,
2145 	.vsync_start = 1920 + 68,
2146 	.vsync_end = 1920 + 68 + 2,
2147 	.vtotal = 1920 + 68 + 2 + 10,
2148 	.type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
2149 };
2150 
2151 static const struct panel_desc starry_ili9882t_desc = {
2152 	.modes = &starry_ili9882t_default_mode,
2153 	.bpc = 8,
2154 	.size = {
2155 		.width_mm = 141,
2156 		.height_mm = 226,
2157 	},
2158 	.lanes = 4,
2159 	.format = MIPI_DSI_FMT_RGB888,
2160 	.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
2161 		      MIPI_DSI_MODE_LPM,
2162 	.init_cmds = starry_ili9882t_init_cmd,
2163 	.lp11_before_reset = true,
2164 };
2165 
2166 static int boe_panel_get_modes(struct drm_panel *panel,
2167 			       struct drm_connector *connector)
2168 {
2169 	struct boe_panel *boe = to_boe_panel(panel);
2170 	const struct drm_display_mode *m = boe->desc->modes;
2171 	struct drm_display_mode *mode;
2172 
2173 	mode = drm_mode_duplicate(connector->dev, m);
2174 	if (!mode) {
2175 		dev_err(panel->dev, "failed to add mode %ux%u@%u\n",
2176 			m->hdisplay, m->vdisplay, drm_mode_vrefresh(m));
2177 		return -ENOMEM;
2178 	}
2179 
2180 	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
2181 	drm_mode_set_name(mode);
2182 	drm_mode_probed_add(connector, mode);
2183 
2184 	connector->display_info.width_mm = boe->desc->size.width_mm;
2185 	connector->display_info.height_mm = boe->desc->size.height_mm;
2186 	connector->display_info.bpc = boe->desc->bpc;
2187 	/*
2188 	 * TODO: Remove once all drm drivers call
2189 	 * drm_connector_set_orientation_from_panel()
2190 	 */
2191 	drm_connector_set_panel_orientation(connector, boe->orientation);
2192 
2193 	return 1;
2194 }
2195 
2196 static enum drm_panel_orientation boe_panel_get_orientation(struct drm_panel *panel)
2197 {
2198 	struct boe_panel *boe = to_boe_panel(panel);
2199 
2200 	return boe->orientation;
2201 }
2202 
2203 static const struct drm_panel_funcs boe_panel_funcs = {
2204 	.disable = boe_panel_disable,
2205 	.unprepare = boe_panel_unprepare,
2206 	.prepare = boe_panel_prepare,
2207 	.enable = boe_panel_enable,
2208 	.get_modes = boe_panel_get_modes,
2209 	.get_orientation = boe_panel_get_orientation,
2210 };
2211 
2212 static int boe_panel_add(struct boe_panel *boe)
2213 {
2214 	struct device *dev = &boe->dsi->dev;
2215 	int err;
2216 
2217 	boe->avdd = devm_regulator_get(dev, "avdd");
2218 	if (IS_ERR(boe->avdd))
2219 		return PTR_ERR(boe->avdd);
2220 
2221 	boe->avee = devm_regulator_get(dev, "avee");
2222 	if (IS_ERR(boe->avee))
2223 		return PTR_ERR(boe->avee);
2224 
2225 	boe->pp3300 = devm_regulator_get(dev, "pp3300");
2226 	if (IS_ERR(boe->pp3300))
2227 		return PTR_ERR(boe->pp3300);
2228 
2229 	boe->pp1800 = devm_regulator_get(dev, "pp1800");
2230 	if (IS_ERR(boe->pp1800))
2231 		return PTR_ERR(boe->pp1800);
2232 
2233 	boe->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
2234 	if (IS_ERR(boe->enable_gpio)) {
2235 		dev_err(dev, "cannot get reset-gpios %ld\n",
2236 			PTR_ERR(boe->enable_gpio));
2237 		return PTR_ERR(boe->enable_gpio);
2238 	}
2239 
2240 	gpiod_set_value(boe->enable_gpio, 0);
2241 
2242 	drm_panel_init(&boe->base, dev, &boe_panel_funcs,
2243 		       DRM_MODE_CONNECTOR_DSI);
2244 	err = of_drm_get_panel_orientation(dev->of_node, &boe->orientation);
2245 	if (err < 0) {
2246 		dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, err);
2247 		return err;
2248 	}
2249 
2250 	err = drm_panel_of_backlight(&boe->base);
2251 	if (err)
2252 		return err;
2253 
2254 	boe->base.funcs = &boe_panel_funcs;
2255 	boe->base.dev = &boe->dsi->dev;
2256 
2257 	drm_panel_add(&boe->base);
2258 
2259 	return 0;
2260 }
2261 
2262 static int boe_panel_probe(struct mipi_dsi_device *dsi)
2263 {
2264 	struct boe_panel *boe;
2265 	int ret;
2266 	const struct panel_desc *desc;
2267 
2268 	boe = devm_kzalloc(&dsi->dev, sizeof(*boe), GFP_KERNEL);
2269 	if (!boe)
2270 		return -ENOMEM;
2271 
2272 	desc = of_device_get_match_data(&dsi->dev);
2273 	dsi->lanes = desc->lanes;
2274 	dsi->format = desc->format;
2275 	dsi->mode_flags = desc->mode_flags;
2276 	boe->desc = desc;
2277 	boe->dsi = dsi;
2278 	ret = boe_panel_add(boe);
2279 	if (ret < 0)
2280 		return ret;
2281 
2282 	mipi_dsi_set_drvdata(dsi, boe);
2283 
2284 	ret = mipi_dsi_attach(dsi);
2285 	if (ret)
2286 		drm_panel_remove(&boe->base);
2287 
2288 	return ret;
2289 }
2290 
2291 static void boe_panel_shutdown(struct mipi_dsi_device *dsi)
2292 {
2293 	struct boe_panel *boe = mipi_dsi_get_drvdata(dsi);
2294 
2295 	drm_panel_disable(&boe->base);
2296 	drm_panel_unprepare(&boe->base);
2297 }
2298 
2299 static void boe_panel_remove(struct mipi_dsi_device *dsi)
2300 {
2301 	struct boe_panel *boe = mipi_dsi_get_drvdata(dsi);
2302 	int ret;
2303 
2304 	boe_panel_shutdown(dsi);
2305 
2306 	ret = mipi_dsi_detach(dsi);
2307 	if (ret < 0)
2308 		dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret);
2309 
2310 	if (boe->base.dev)
2311 		drm_panel_remove(&boe->base);
2312 }
2313 
2314 static const struct of_device_id boe_of_match[] = {
2315 	{ .compatible = "boe,tv101wum-nl6",
2316 	  .data = &boe_tv101wum_nl6_desc
2317 	},
2318 	{ .compatible = "auo,kd101n80-45na",
2319 	  .data = &auo_kd101n80_45na_desc
2320 	},
2321 	{ .compatible = "boe,tv101wum-n53",
2322 	  .data = &boe_tv101wum_n53_desc
2323 	},
2324 	{ .compatible = "auo,b101uan08.3",
2325 	  .data = &auo_b101uan08_3_desc
2326 	},
2327 	{ .compatible = "boe,tv105wum-nw0",
2328 	  .data = &boe_tv105wum_nw0_desc
2329 	},
2330 	{ .compatible = "boe,tv110c9m-ll3",
2331 	  .data = &boe_tv110c9m_desc
2332 	},
2333 	{ .compatible = "innolux,hj110iz-01a",
2334 	  .data = &inx_hj110iz_desc
2335 	},
2336 	{ .compatible = "starry,2081101qfh032011-53g",
2337 	  .data = &starry_qfh032011_53g_desc
2338 	},
2339 	{ .compatible = "starry,himax83102-j02",
2340 	  .data = &starry_himax83102_j02_desc
2341 	},
2342 	{ .compatible = "starry,ili9882t",
2343 	  .data = &starry_ili9882t_desc
2344 	},
2345 	{ /* sentinel */ }
2346 };
2347 MODULE_DEVICE_TABLE(of, boe_of_match);
2348 
2349 static struct mipi_dsi_driver boe_panel_driver = {
2350 	.driver = {
2351 		.name = "panel-boe-tv101wum-nl6",
2352 		.of_match_table = boe_of_match,
2353 	},
2354 	.probe = boe_panel_probe,
2355 	.remove = boe_panel_remove,
2356 	.shutdown = boe_panel_shutdown,
2357 };
2358 module_mipi_dsi_driver(boe_panel_driver);
2359 
2360 MODULE_AUTHOR("Jitao Shi <jitao.shi@mediatek.com>");
2361 MODULE_DESCRIPTION("BOE tv101wum-nl6 1200x1920 video mode panel driver");
2362 MODULE_LICENSE("GPL v2");
2363