Lines Matching +full:0 +full:- +full:1
4 * SPDX-License-Identifier: Apache-2.0
18 #define DCS_CMD_PAGE 0xFE
19 #define DCS_CMD_PAGE_UCS 0x0
20 #define DCS_CMD_PAGE_SET_PAGE0 0x1
21 #define DCS_CMD_PAGE_SET_PAGE1 0x2
22 #define DCS_CMD_PAGE_SET_PAGE2 0x3
23 #define DCS_CMD_PAGE_SET_PAGE3 0x4
26 #define MCS_STBCTR 0x12
27 #define MCS_SGOPCTR 0x16
28 #define MCS_SDCTR 0x1A
29 #define MCS_INVCTR 0x1B
30 #define MCS_EXT_PWR_IC_TYPE 0x24
31 #define MCS_EXT_PWR_SET_AVDD 0x25
32 #define MCS_AVEE_FROM_PFM 0x26
33 #define MCS_AVDD_FROM_PFM 0x27
34 #define MCS_SETAVEE 0x29
35 #define MCS_BT2CTR 0x2B
36 #define MCS_BT3CTR 0x2F
37 #define MCS_BT4CTR 0x34
38 #define MCS_VCMCTR 0x46
39 #define MCS_SETVGMN 0x52
40 #define MCS_SETVGSN 0x53
41 #define MCS_SETVGMP 0x54
42 #define MCS_SETVGSP 0x55
43 #define MCS_SW_CTRL 0x5F
44 #define MCS_GAMMA_VP1 0x60
45 #define MCS_GAMMA_VP4 0x61
46 #define MCS_GAMMA_VP8 0x62
47 #define MCS_GAMMA_VP16 0x63
48 #define MCS_GAMMA_VP24 0x64
49 #define MCS_GAMMA_VP52 0x65
50 #define MCS_GAMMA_VP80 0x66
51 #define MCS_GAMMA_VP108 0x67
52 #define MCS_GAMMA_VP147 0x68
53 #define MCS_GAMMA_VP175 0x69
54 #define MCS_GAMMA_VP203 0x6A
55 #define MCS_GAMMA_VP231 0x6B
56 #define MCS_GAMMA_VP239 0x6C
57 #define MCS_GAMMA_VP247 0x6D
58 #define MCS_GAMMA_VP251 0x6E
59 #define MCS_GAMMA_VP255 0x6F
60 #define MCS_GAMMA_VN1 0x70
61 #define MCS_GAMMA_VN4 0x71
62 #define MCS_GAMMA_VN8 0x72
63 #define MCS_GAMMA_VN16 0x73
64 #define MCS_GAMMA_VN24 0x74
65 #define MCS_GAMMA_VN52 0x75
66 #define MCS_GAMMA_VN80 0x76
67 #define MCS_GAMMA_VN108 0x77
68 #define MCS_GAMMA_VN147 0x78
69 #define MCS_GAMMA_VN175 0x79
70 #define MCS_GAMMA_VN203 0x7A
71 #define MCS_GAMMA_VN231 0x7B
72 #define MCS_GAMMA_VN239 0x7C
73 #define MCS_GAMMA_VN247 0x7D
74 #define MCS_GAMMA_VN251 0x7E
75 #define MCS_GAMMA_VN255 0x7F
76 #define MCS_GAMMA_UPDATE 0x80
92 const struct rm68200_config *config = dev->config; in rm68200_dcs_write()
94 return mipi_dsi_dcs_write(config->mipi_dsi, config->channel, cmd, buf, len); in rm68200_dcs_write()
102 return 0; in rm68200_write()
107 const struct rm68200_config *config = dev->config; in rm68200_blanking_off()
109 if (config->bl_gpio.port != NULL) { in rm68200_blanking_off()
110 return gpio_pin_set_dt(&config->bl_gpio, 1); in rm68200_blanking_off()
112 return -ENOTSUP; in rm68200_blanking_off()
118 const struct rm68200_config *config = dev->config; in rm68200_blanking_on()
120 if (config->bl_gpio.port != NULL) { in rm68200_blanking_on()
121 return gpio_pin_set_dt(&config->bl_gpio, 0); in rm68200_blanking_on()
123 return -ENOTSUP; in rm68200_blanking_on()
130 const struct rm68200_config *config = dev->config; in rm68200_set_pixel_format()
132 if (pixel_format == config->pixel_format) { in rm68200_set_pixel_format()
133 return 0; in rm68200_set_pixel_format()
136 return -ENOTSUP; in rm68200_set_pixel_format()
143 return 0; in rm68200_set_orientation()
146 return -ENOTSUP; in rm68200_set_orientation()
152 const struct rm68200_config *config = dev->config; in rm68200_get_capabilities()
154 memset(capabilities, 0, sizeof(struct display_capabilities)); in rm68200_get_capabilities()
155 capabilities->x_resolution = config->panel_width; in rm68200_get_capabilities()
156 capabilities->y_resolution = config->panel_height; in rm68200_get_capabilities()
157 capabilities->supported_pixel_formats = config->pixel_format; in rm68200_get_capabilities()
158 capabilities->current_pixel_format = config->pixel_format; in rm68200_get_capabilities()
159 capabilities->current_orientation = DISPLAY_ORIENTATION_NORMAL; in rm68200_get_capabilities()
173 const struct rm68200_config *config = dev->config; in rm68200_init()
178 mdev.data_lanes = config->num_of_lanes; in rm68200_init()
179 mdev.pixfmt = config->pixel_format; in rm68200_init()
183 ret = mipi_dsi_attach(config->mipi_dsi, config->channel, &mdev); in rm68200_init()
184 if (ret < 0) { in rm68200_init()
185 LOG_ERR("Could not attach to MIPI-DSI host"); in rm68200_init()
189 if (config->reset_gpio.port != NULL) { in rm68200_init()
190 ret = gpio_pin_configure_dt(&config->reset_gpio, GPIO_OUTPUT_INACTIVE); in rm68200_init()
191 if (ret < 0) { in rm68200_init()
198 * reset:0 -> reset:1 in rm68200_init()
200 gpio_pin_set_dt(&config->reset_gpio, 0); in rm68200_init()
203 gpio_pin_set_dt(&config->reset_gpio, 1); in rm68200_init()
209 rm68200_dcs_write(dev, DCS_CMD_PAGE, ¶m, 1); in rm68200_init()
211 param = 0xC0; in rm68200_init()
212 rm68200_dcs_write(dev, MCS_EXT_PWR_IC_TYPE, ¶m, 1); in rm68200_init()
214 param = 0x53; in rm68200_init()
215 rm68200_dcs_write(dev, MCS_EXT_PWR_SET_AVDD, ¶m, 1); in rm68200_init()
217 param = 0x00; in rm68200_init()
218 rm68200_dcs_write(dev, MCS_AVEE_FROM_PFM, ¶m, 1); in rm68200_init()
220 param = 0xE5; in rm68200_init()
221 rm68200_dcs_write(dev, MCS_BT2CTR, ¶m, 1); in rm68200_init()
223 param = 0x0A; in rm68200_init()
224 rm68200_dcs_write(dev, MCS_AVDD_FROM_PFM, ¶m, 1); in rm68200_init()
226 param = 0x0A; in rm68200_init()
227 rm68200_dcs_write(dev, MCS_SETAVEE, ¶m, 1); in rm68200_init()
229 param = 0x52; in rm68200_init()
230 rm68200_dcs_write(dev, MCS_SGOPCTR, ¶m, 1); in rm68200_init()
232 param = 0x53; in rm68200_init()
233 rm68200_dcs_write(dev, MCS_BT3CTR, ¶m, 1); in rm68200_init()
235 param = 0x5A; in rm68200_init()
236 rm68200_dcs_write(dev, MCS_BT4CTR, ¶m, 1); in rm68200_init()
238 param = 0x00; in rm68200_init()
239 rm68200_dcs_write(dev, MCS_INVCTR, ¶m, 1); in rm68200_init()
241 param = 0x0A; in rm68200_init()
242 rm68200_dcs_write(dev, MCS_STBCTR, ¶m, 1); in rm68200_init()
244 param = 0x06; in rm68200_init()
245 rm68200_dcs_write(dev, MCS_SDCTR, ¶m, 1); in rm68200_init()
247 param = 0x56; in rm68200_init()
248 rm68200_dcs_write(dev, MCS_VCMCTR, ¶m, 1); in rm68200_init()
250 param = 0xA0; in rm68200_init()
251 rm68200_dcs_write(dev, MCS_SETVGMN, ¶m, 1); in rm68200_init()
253 param = 0x00; in rm68200_init()
254 rm68200_dcs_write(dev, MCS_SETVGSN, ¶m, 1); in rm68200_init()
256 param = 0xA0; in rm68200_init()
257 rm68200_dcs_write(dev, MCS_SETVGMP, ¶m, 1); in rm68200_init()
259 param = 0x00; in rm68200_init()
260 rm68200_dcs_write(dev, MCS_SETVGSP, ¶m, 1); in rm68200_init()
262 param = 0x10U | (config->num_of_lanes - 1U); in rm68200_init()
263 rm68200_dcs_write(dev, MCS_SW_CTRL, ¶m, 1); in rm68200_init()
266 rm68200_dcs_write(dev, DCS_CMD_PAGE, ¶m, 1); in rm68200_init()
269 param = 0x05; in rm68200_init()
270 rm68200_dcs_write(dev, 0x00, ¶m, 1); in rm68200_init()
272 param = 0x0B; in rm68200_init()
273 rm68200_dcs_write(dev, 0x02, ¶m, 1); in rm68200_init()
275 param = 0x0F; in rm68200_init()
276 rm68200_dcs_write(dev, 0x03, ¶m, 1); in rm68200_init()
278 param = 0x7D; in rm68200_init()
279 rm68200_dcs_write(dev, 0x04, ¶m, 1); in rm68200_init()
281 param = 0x00; in rm68200_init()
282 rm68200_dcs_write(dev, 0x05, ¶m, 1); in rm68200_init()
284 param = 0x50; in rm68200_init()
285 rm68200_dcs_write(dev, 0x06, ¶m, 1); in rm68200_init()
287 param = 0x05; in rm68200_init()
288 rm68200_dcs_write(dev, 0x07, ¶m, 1); in rm68200_init()
290 param = 0x16; in rm68200_init()
291 rm68200_dcs_write(dev, 0x08, ¶m, 1); in rm68200_init()
293 param = 0x0D; in rm68200_init()
294 rm68200_dcs_write(dev, 0x09, ¶m, 1); in rm68200_init()
296 param = 0x11; in rm68200_init()
297 rm68200_dcs_write(dev, 0x0A, ¶m, 1); in rm68200_init()
299 param = 0x7D; in rm68200_init()
300 rm68200_dcs_write(dev, 0x0B, ¶m, 1); in rm68200_init()
302 param = 0x00; in rm68200_init()
303 rm68200_dcs_write(dev, 0x0C, ¶m, 1); in rm68200_init()
305 param = 0x50; in rm68200_init()
306 rm68200_dcs_write(dev, 0x0D, ¶m, 1); in rm68200_init()
308 param = 0x07; in rm68200_init()
309 rm68200_dcs_write(dev, 0x0E, ¶m, 1); in rm68200_init()
311 param = 0x08; in rm68200_init()
312 rm68200_dcs_write(dev, 0x0F, ¶m, 1); in rm68200_init()
314 param = 0x01; in rm68200_init()
315 rm68200_dcs_write(dev, 0x10, ¶m, 1); in rm68200_init()
317 param = 0x02; in rm68200_init()
318 rm68200_dcs_write(dev, 0x11, ¶m, 1); in rm68200_init()
320 param = 0x00; in rm68200_init()
321 rm68200_dcs_write(dev, 0x12, ¶m, 1); in rm68200_init()
323 param = 0x7D; in rm68200_init()
324 rm68200_dcs_write(dev, 0x13, ¶m, 1); in rm68200_init()
326 param = 0x00; in rm68200_init()
327 rm68200_dcs_write(dev, 0x14, ¶m, 1); in rm68200_init()
329 param = 0x85; in rm68200_init()
330 rm68200_dcs_write(dev, 0x15, ¶m, 1); in rm68200_init()
332 param = 0x08; in rm68200_init()
333 rm68200_dcs_write(dev, 0x16, ¶m, 1); in rm68200_init()
335 param = 0x03; in rm68200_init()
336 rm68200_dcs_write(dev, 0x17, ¶m, 1); in rm68200_init()
338 param = 0x04; in rm68200_init()
339 rm68200_dcs_write(dev, 0x18, ¶m, 1); in rm68200_init()
341 param = 0x05; in rm68200_init()
342 rm68200_dcs_write(dev, 0x19, ¶m, 1); in rm68200_init()
344 param = 0x06; in rm68200_init()
345 rm68200_dcs_write(dev, 0x1A, ¶m, 1); in rm68200_init()
347 param = 0x00; in rm68200_init()
348 rm68200_dcs_write(dev, 0x1B, ¶m, 1); in rm68200_init()
350 param = 0x7D; in rm68200_init()
351 rm68200_dcs_write(dev, 0x1C, ¶m, 1); in rm68200_init()
353 param = 0x00; in rm68200_init()
354 rm68200_dcs_write(dev, 0x1D, ¶m, 1); in rm68200_init()
356 param = 0x85; in rm68200_init()
357 rm68200_dcs_write(dev, 0x1E, ¶m, 1); in rm68200_init()
359 param = 0x08; in rm68200_init()
360 rm68200_dcs_write(dev, 0x1F, ¶m, 1); in rm68200_init()
362 param = 0x00; in rm68200_init()
363 rm68200_dcs_write(dev, 0x20, ¶m, 1); in rm68200_init()
365 param = 0x00; in rm68200_init()
366 rm68200_dcs_write(dev, 0x21, ¶m, 1); in rm68200_init()
368 param = 0x00; in rm68200_init()
369 rm68200_dcs_write(dev, 0x22, ¶m, 1); in rm68200_init()
371 param = 0x00; in rm68200_init()
372 rm68200_dcs_write(dev, 0x23, ¶m, 1); in rm68200_init()
374 param = 0x00; in rm68200_init()
375 rm68200_dcs_write(dev, 0x24, ¶m, 1); in rm68200_init()
377 param = 0x00; in rm68200_init()
378 rm68200_dcs_write(dev, 0x25, ¶m, 1); in rm68200_init()
380 param = 0x00; in rm68200_init()
381 rm68200_dcs_write(dev, 0x26, ¶m, 1); in rm68200_init()
383 param = 0x00; in rm68200_init()
384 rm68200_dcs_write(dev, 0x27, ¶m, 1); in rm68200_init()
386 param = 0x00; in rm68200_init()
387 rm68200_dcs_write(dev, 0x28, ¶m, 1); in rm68200_init()
389 param = 0x00; in rm68200_init()
390 rm68200_dcs_write(dev, 0x29, ¶m, 1); in rm68200_init()
392 param = 0x07; in rm68200_init()
393 rm68200_dcs_write(dev, 0x2A, ¶m, 1); in rm68200_init()
395 param = 0x08; in rm68200_init()
396 rm68200_dcs_write(dev, 0x2B, ¶m, 1); in rm68200_init()
398 param = 0x01; in rm68200_init()
399 rm68200_dcs_write(dev, 0x2D, ¶m, 1); in rm68200_init()
401 param = 0x02; in rm68200_init()
402 rm68200_dcs_write(dev, 0x2F, ¶m, 1); in rm68200_init()
404 param = 0x00; in rm68200_init()
405 rm68200_dcs_write(dev, 0x30, ¶m, 1); in rm68200_init()
407 param = 0x40; in rm68200_init()
408 rm68200_dcs_write(dev, 0x31, ¶m, 1); in rm68200_init()
410 param = 0x05; in rm68200_init()
411 rm68200_dcs_write(dev, 0x32, ¶m, 1); in rm68200_init()
413 param = 0x08; in rm68200_init()
414 rm68200_dcs_write(dev, 0x33, ¶m, 1); in rm68200_init()
416 param = 0x54; in rm68200_init()
417 rm68200_dcs_write(dev, 0x34, ¶m, 1); in rm68200_init()
419 param = 0x7D; in rm68200_init()
420 rm68200_dcs_write(dev, 0x35, ¶m, 1); in rm68200_init()
422 param = 0x00; in rm68200_init()
423 rm68200_dcs_write(dev, 0x36, ¶m, 1); in rm68200_init()
425 param = 0x03; in rm68200_init()
426 rm68200_dcs_write(dev, 0x37, ¶m, 1); in rm68200_init()
428 param = 0x04; in rm68200_init()
429 rm68200_dcs_write(dev, 0x38, ¶m, 1); in rm68200_init()
431 param = 0x05; in rm68200_init()
432 rm68200_dcs_write(dev, 0x39, ¶m, 1); in rm68200_init()
434 param = 0x06; in rm68200_init()
435 rm68200_dcs_write(dev, 0x3A, ¶m, 1); in rm68200_init()
437 param = 0x00; in rm68200_init()
438 rm68200_dcs_write(dev, 0x3B, ¶m, 1); in rm68200_init()
440 param = 0x40; in rm68200_init()
441 rm68200_dcs_write(dev, 0x3D, ¶m, 1); in rm68200_init()
443 param = 0x05; in rm68200_init()
444 rm68200_dcs_write(dev, 0x3F, ¶m, 1); in rm68200_init()
446 param = 0x08; in rm68200_init()
447 rm68200_dcs_write(dev, 0x40, ¶m, 1); in rm68200_init()
449 param = 0x54; in rm68200_init()
450 rm68200_dcs_write(dev, 0x41, ¶m, 1); in rm68200_init()
452 param = 0x7D; in rm68200_init()
453 rm68200_dcs_write(dev, 0x42, ¶m, 1); in rm68200_init()
455 param = 0x00; in rm68200_init()
456 rm68200_dcs_write(dev, 0x43, ¶m, 1); in rm68200_init()
458 param = 0x00; in rm68200_init()
459 rm68200_dcs_write(dev, 0x44, ¶m, 1); in rm68200_init()
461 param = 0x00; in rm68200_init()
462 rm68200_dcs_write(dev, 0x45, ¶m, 1); in rm68200_init()
464 param = 0x00; in rm68200_init()
465 rm68200_dcs_write(dev, 0x46, ¶m, 1); in rm68200_init()
467 param = 0x00; in rm68200_init()
468 rm68200_dcs_write(dev, 0x47, ¶m, 1); in rm68200_init()
470 param = 0x00; in rm68200_init()
471 rm68200_dcs_write(dev, 0x48, ¶m, 1); in rm68200_init()
473 param = 0x00; in rm68200_init()
474 rm68200_dcs_write(dev, 0x49, ¶m, 1); in rm68200_init()
476 param = 0x00; in rm68200_init()
477 rm68200_dcs_write(dev, 0x4A, ¶m, 1); in rm68200_init()
479 param = 0x00; in rm68200_init()
480 rm68200_dcs_write(dev, 0x4B, ¶m, 1); in rm68200_init()
482 param = 0x00; in rm68200_init()
483 rm68200_dcs_write(dev, 0x4C, ¶m, 1); in rm68200_init()
485 param = 0x00; in rm68200_init()
486 rm68200_dcs_write(dev, 0x4D, ¶m, 1); in rm68200_init()
488 param = 0x00; in rm68200_init()
489 rm68200_dcs_write(dev, 0x4E, ¶m, 1); in rm68200_init()
491 param = 0x00; in rm68200_init()
492 rm68200_dcs_write(dev, 0x4F, ¶m, 1); in rm68200_init()
494 param = 0x00; in rm68200_init()
495 rm68200_dcs_write(dev, 0x50, ¶m, 1); in rm68200_init()
497 param = 0x00; in rm68200_init()
498 rm68200_dcs_write(dev, 0x51, ¶m, 1); in rm68200_init()
500 param = 0x00; in rm68200_init()
501 rm68200_dcs_write(dev, 0x52, ¶m, 1); in rm68200_init()
503 param = 0x00; in rm68200_init()
504 rm68200_dcs_write(dev, 0x53, ¶m, 1); in rm68200_init()
506 param = 0x00; in rm68200_init()
507 rm68200_dcs_write(dev, 0x54, ¶m, 1); in rm68200_init()
509 param = 0x00; in rm68200_init()
510 rm68200_dcs_write(dev, 0x55, ¶m, 1); in rm68200_init()
512 param = 0x00; in rm68200_init()
513 rm68200_dcs_write(dev, 0x56, ¶m, 1); in rm68200_init()
515 param = 0x00; in rm68200_init()
516 rm68200_dcs_write(dev, 0x58, ¶m, 1); in rm68200_init()
518 param = 0x00; in rm68200_init()
519 rm68200_dcs_write(dev, 0x59, ¶m, 1); in rm68200_init()
521 param = 0x00; in rm68200_init()
522 rm68200_dcs_write(dev, 0x5A, ¶m, 1); in rm68200_init()
524 param = 0x00; in rm68200_init()
525 rm68200_dcs_write(dev, 0x5B, ¶m, 1); in rm68200_init()
527 param = 0x00; in rm68200_init()
528 rm68200_dcs_write(dev, 0x5C, ¶m, 1); in rm68200_init()
530 param = 0x00; in rm68200_init()
531 rm68200_dcs_write(dev, 0x5D, ¶m, 1); in rm68200_init()
533 param = 0x00; in rm68200_init()
534 rm68200_dcs_write(dev, 0x5E, ¶m, 1); in rm68200_init()
536 param = 0x00; in rm68200_init()
537 rm68200_dcs_write(dev, 0x5F, ¶m, 1); in rm68200_init()
539 param = 0x00; in rm68200_init()
540 rm68200_dcs_write(dev, 0x60, ¶m, 1); in rm68200_init()
542 param = 0x00; in rm68200_init()
543 rm68200_dcs_write(dev, 0x61, ¶m, 1); in rm68200_init()
545 param = 0x00; in rm68200_init()
546 rm68200_dcs_write(dev, 0x62, ¶m, 1); in rm68200_init()
548 param = 0x00; in rm68200_init()
549 rm68200_dcs_write(dev, 0x63, ¶m, 1); in rm68200_init()
551 param = 0x00; in rm68200_init()
552 rm68200_dcs_write(dev, 0x64, ¶m, 1); in rm68200_init()
554 param = 0x00; in rm68200_init()
555 rm68200_dcs_write(dev, 0x65, ¶m, 1); in rm68200_init()
557 param = 0x00; in rm68200_init()
558 rm68200_dcs_write(dev, 0x66, ¶m, 1); in rm68200_init()
560 param = 0x00; in rm68200_init()
561 rm68200_dcs_write(dev, 0x67, ¶m, 1); in rm68200_init()
563 param = 0x00; in rm68200_init()
564 rm68200_dcs_write(dev, 0x68, ¶m, 1); in rm68200_init()
566 param = 0x00; in rm68200_init()
567 rm68200_dcs_write(dev, 0x69, ¶m, 1); in rm68200_init()
569 param = 0x00; in rm68200_init()
570 rm68200_dcs_write(dev, 0x6A, ¶m, 1); in rm68200_init()
572 param = 0x00; in rm68200_init()
573 rm68200_dcs_write(dev, 0x6B, ¶m, 1); in rm68200_init()
575 param = 0x00; in rm68200_init()
576 rm68200_dcs_write(dev, 0x6C, ¶m, 1); in rm68200_init()
578 param = 0x00; in rm68200_init()
579 rm68200_dcs_write(dev, 0x6D, ¶m, 1); in rm68200_init()
581 param = 0x00; in rm68200_init()
582 rm68200_dcs_write(dev, 0x6E, ¶m, 1); in rm68200_init()
584 param = 0x00; in rm68200_init()
585 rm68200_dcs_write(dev, 0x6F, ¶m, 1); in rm68200_init()
587 param = 0x00; in rm68200_init()
588 rm68200_dcs_write(dev, 0x70, ¶m, 1); in rm68200_init()
590 param = 0x00; in rm68200_init()
591 rm68200_dcs_write(dev, 0x71, ¶m, 1); in rm68200_init()
593 param = 0x20; in rm68200_init()
594 rm68200_dcs_write(dev, 0x72, ¶m, 1); in rm68200_init()
596 param = 0x00; in rm68200_init()
597 rm68200_dcs_write(dev, 0x73, ¶m, 1); in rm68200_init()
599 param = 0x08; in rm68200_init()
600 rm68200_dcs_write(dev, 0x74, ¶m, 1); in rm68200_init()
602 param = 0x08; in rm68200_init()
603 rm68200_dcs_write(dev, 0x75, ¶m, 1); in rm68200_init()
605 param = 0x08; in rm68200_init()
606 rm68200_dcs_write(dev, 0x76, ¶m, 1); in rm68200_init()
608 param = 0x08; in rm68200_init()
609 rm68200_dcs_write(dev, 0x77, ¶m, 1); in rm68200_init()
611 param = 0x08; in rm68200_init()
612 rm68200_dcs_write(dev, 0x78, ¶m, 1); in rm68200_init()
614 param = 0x08; in rm68200_init()
615 rm68200_dcs_write(dev, 0x79, ¶m, 1); in rm68200_init()
617 param = 0x00; in rm68200_init()
618 rm68200_dcs_write(dev, 0x7A, ¶m, 1); in rm68200_init()
620 param = 0x00; in rm68200_init()
621 rm68200_dcs_write(dev, 0x7B, ¶m, 1); in rm68200_init()
623 param = 0x00; in rm68200_init()
624 rm68200_dcs_write(dev, 0x7C, ¶m, 1); in rm68200_init()
626 param = 0x00; in rm68200_init()
627 rm68200_dcs_write(dev, 0x7D, ¶m, 1); in rm68200_init()
629 param = 0xBF; in rm68200_init()
630 rm68200_dcs_write(dev, 0x7E, ¶m, 1); in rm68200_init()
632 param = 0x02; in rm68200_init()
633 rm68200_dcs_write(dev, 0x7F, ¶m, 1); in rm68200_init()
635 param = 0x06; in rm68200_init()
636 rm68200_dcs_write(dev, 0x80, ¶m, 1); in rm68200_init()
638 param = 0x14; in rm68200_init()
639 rm68200_dcs_write(dev, 0x81, ¶m, 1); in rm68200_init()
641 param = 0x10; in rm68200_init()
642 rm68200_dcs_write(dev, 0x82, ¶m, 1); in rm68200_init()
644 param = 0x16; in rm68200_init()
645 rm68200_dcs_write(dev, 0x83, ¶m, 1); in rm68200_init()
647 param = 0x12; in rm68200_init()
648 rm68200_dcs_write(dev, 0x84, ¶m, 1); in rm68200_init()
650 param = 0x08; in rm68200_init()
651 rm68200_dcs_write(dev, 0x85, ¶m, 1); in rm68200_init()
653 param = 0x3F; in rm68200_init()
654 rm68200_dcs_write(dev, 0x86, ¶m, 1); in rm68200_init()
656 param = 0x3F; in rm68200_init()
657 rm68200_dcs_write(dev, 0x87, ¶m, 1); in rm68200_init()
659 param = 0x3F; in rm68200_init()
660 rm68200_dcs_write(dev, 0x88, ¶m, 1); in rm68200_init()
662 param = 0x3F; in rm68200_init()
663 rm68200_dcs_write(dev, 0x89, ¶m, 1); in rm68200_init()
665 param = 0x3F; in rm68200_init()
666 rm68200_dcs_write(dev, 0x8A, ¶m, 1); in rm68200_init()
668 param = 0x0C; in rm68200_init()
669 rm68200_dcs_write(dev, 0x8B, ¶m, 1); in rm68200_init()
671 param = 0x0A; in rm68200_init()
672 rm68200_dcs_write(dev, 0x8C, ¶m, 1); in rm68200_init()
674 param = 0x0E; in rm68200_init()
675 rm68200_dcs_write(dev, 0x8D, ¶m, 1); in rm68200_init()
677 param = 0x3F; in rm68200_init()
678 rm68200_dcs_write(dev, 0x8E, ¶m, 1); in rm68200_init()
680 param = 0x3F; in rm68200_init()
681 rm68200_dcs_write(dev, 0x8F, ¶m, 1); in rm68200_init()
683 param = 0x00; in rm68200_init()
684 rm68200_dcs_write(dev, 0x90, ¶m, 1); in rm68200_init()
686 param = 0x04; in rm68200_init()
687 rm68200_dcs_write(dev, 0x91, ¶m, 1); in rm68200_init()
689 param = 0x3F; in rm68200_init()
690 rm68200_dcs_write(dev, 0x92, ¶m, 1); in rm68200_init()
692 param = 0x3F; in rm68200_init()
693 rm68200_dcs_write(dev, 0x93, ¶m, 1); in rm68200_init()
695 param = 0x3F; in rm68200_init()
696 rm68200_dcs_write(dev, 0x94, ¶m, 1); in rm68200_init()
698 param = 0x3F; in rm68200_init()
699 rm68200_dcs_write(dev, 0x95, ¶m, 1); in rm68200_init()
701 param = 0x05; in rm68200_init()
702 rm68200_dcs_write(dev, 0x96, ¶m, 1); in rm68200_init()
704 param = 0x01; in rm68200_init()
705 rm68200_dcs_write(dev, 0x97, ¶m, 1); in rm68200_init()
707 param = 0x3F; in rm68200_init()
708 rm68200_dcs_write(dev, 0x98, ¶m, 1); in rm68200_init()
710 param = 0x3F; in rm68200_init()
711 rm68200_dcs_write(dev, 0x99, ¶m, 1); in rm68200_init()
713 param = 0x0F; in rm68200_init()
714 rm68200_dcs_write(dev, 0x9A, ¶m, 1); in rm68200_init()
716 param = 0x0B; in rm68200_init()
717 rm68200_dcs_write(dev, 0x9B, ¶m, 1); in rm68200_init()
719 param = 0x0D; in rm68200_init()
720 rm68200_dcs_write(dev, 0x9C, ¶m, 1); in rm68200_init()
722 param = 0x3F; in rm68200_init()
723 rm68200_dcs_write(dev, 0x9D, ¶m, 1); in rm68200_init()
725 param = 0x3F; in rm68200_init()
726 rm68200_dcs_write(dev, 0x9E, ¶m, 1); in rm68200_init()
728 param = 0x3F; in rm68200_init()
729 rm68200_dcs_write(dev, 0x9F, ¶m, 1); in rm68200_init()
731 param = 0x3F; in rm68200_init()
732 rm68200_dcs_write(dev, 0xA0, ¶m, 1); in rm68200_init()
734 param = 0x3F; in rm68200_init()
735 rm68200_dcs_write(dev, 0xA2, ¶m, 1); in rm68200_init()
737 param = 0x09; in rm68200_init()
738 rm68200_dcs_write(dev, 0xA3, ¶m, 1); in rm68200_init()
740 param = 0x13; in rm68200_init()
741 rm68200_dcs_write(dev, 0xA4, ¶m, 1); in rm68200_init()
743 param = 0x17; in rm68200_init()
744 rm68200_dcs_write(dev, 0xA5, ¶m, 1); in rm68200_init()
746 param = 0x11; in rm68200_init()
747 rm68200_dcs_write(dev, 0xA6, ¶m, 1); in rm68200_init()
749 param = 0x15; in rm68200_init()
750 rm68200_dcs_write(dev, 0xA7, ¶m, 1); in rm68200_init()
752 param = 0x07; in rm68200_init()
753 rm68200_dcs_write(dev, 0xA9, ¶m, 1); in rm68200_init()
755 param = 0x03; in rm68200_init()
756 rm68200_dcs_write(dev, 0xAA, ¶m, 1); in rm68200_init()
758 param = 0x3F; in rm68200_init()
759 rm68200_dcs_write(dev, 0xAB, ¶m, 1); in rm68200_init()
761 param = 0x3F; in rm68200_init()
762 rm68200_dcs_write(dev, 0xAC, ¶m, 1); in rm68200_init()
764 param = 0x05; in rm68200_init()
765 rm68200_dcs_write(dev, 0xAD, ¶m, 1); in rm68200_init()
767 param = 0x01; in rm68200_init()
768 rm68200_dcs_write(dev, 0xAE, ¶m, 1); in rm68200_init()
770 param = 0x17; in rm68200_init()
771 rm68200_dcs_write(dev, 0xAF, ¶m, 1); in rm68200_init()
773 param = 0x13; in rm68200_init()
774 rm68200_dcs_write(dev, 0xB0, ¶m, 1); in rm68200_init()
776 param = 0x15; in rm68200_init()
777 rm68200_dcs_write(dev, 0xB1, ¶m, 1); in rm68200_init()
779 param = 0x11; in rm68200_init()
780 rm68200_dcs_write(dev, 0xB2, ¶m, 1); in rm68200_init()
782 param = 0x0F; in rm68200_init()
783 rm68200_dcs_write(dev, 0xB3, ¶m, 1); in rm68200_init()
785 param = 0x3F; in rm68200_init()
786 rm68200_dcs_write(dev, 0xB4, ¶m, 1); in rm68200_init()
788 param = 0x3F; in rm68200_init()
789 rm68200_dcs_write(dev, 0xB5, ¶m, 1); in rm68200_init()
791 param = 0x3F; in rm68200_init()
792 rm68200_dcs_write(dev, 0xB6, ¶m, 1); in rm68200_init()
794 param = 0x3F; in rm68200_init()
795 rm68200_dcs_write(dev, 0xB7, ¶m, 1); in rm68200_init()
797 param = 0x3F; in rm68200_init()
798 rm68200_dcs_write(dev, 0xB8, ¶m, 1); in rm68200_init()
800 param = 0x0B; in rm68200_init()
801 rm68200_dcs_write(dev, 0xB9, ¶m, 1); in rm68200_init()
803 param = 0x0D; in rm68200_init()
804 rm68200_dcs_write(dev, 0xBA, ¶m, 1); in rm68200_init()
806 param = 0x09; in rm68200_init()
807 rm68200_dcs_write(dev, 0xBB, ¶m, 1); in rm68200_init()
809 param = 0x3F; in rm68200_init()
810 rm68200_dcs_write(dev, 0xBC, ¶m, 1); in rm68200_init()
812 param = 0x3F; in rm68200_init()
813 rm68200_dcs_write(dev, 0xBD, ¶m, 1); in rm68200_init()
815 param = 0x07; in rm68200_init()
816 rm68200_dcs_write(dev, 0xBE, ¶m, 1); in rm68200_init()
818 param = 0x03; in rm68200_init()
819 rm68200_dcs_write(dev, 0xBF, ¶m, 1); in rm68200_init()
821 param = 0x3F; in rm68200_init()
822 rm68200_dcs_write(dev, 0xC0, ¶m, 1); in rm68200_init()
824 param = 0x3F; in rm68200_init()
825 rm68200_dcs_write(dev, 0xC1, ¶m, 1); in rm68200_init()
827 param = 0x3F; in rm68200_init()
828 rm68200_dcs_write(dev, 0xC2, ¶m, 1); in rm68200_init()
830 param = 0x3F; in rm68200_init()
831 rm68200_dcs_write(dev, 0xC3, ¶m, 1); in rm68200_init()
833 param = 0x02; in rm68200_init()
834 rm68200_dcs_write(dev, 0xC4, ¶m, 1); in rm68200_init()
836 param = 0x06; in rm68200_init()
837 rm68200_dcs_write(dev, 0xC5, ¶m, 1); in rm68200_init()
839 param = 0x3F; in rm68200_init()
840 rm68200_dcs_write(dev, 0xC6, ¶m, 1); in rm68200_init()
842 param = 0x3F; in rm68200_init()
843 rm68200_dcs_write(dev, 0xC7, ¶m, 1); in rm68200_init()
845 param = 0x08; in rm68200_init()
846 rm68200_dcs_write(dev, 0xC8, ¶m, 1); in rm68200_init()
848 param = 0x0C; in rm68200_init()
849 rm68200_dcs_write(dev, 0xC9, ¶m, 1); in rm68200_init()
851 param = 0x0A; in rm68200_init()
852 rm68200_dcs_write(dev, 0xCA, ¶m, 1); in rm68200_init()
854 param = 0x3F; in rm68200_init()
855 rm68200_dcs_write(dev, 0xCB, ¶m, 1); in rm68200_init()
857 param = 0x3F; in rm68200_init()
858 rm68200_dcs_write(dev, 0xCC, ¶m, 1); in rm68200_init()
860 param = 0x3F; in rm68200_init()
861 rm68200_dcs_write(dev, 0xCD, ¶m, 1); in rm68200_init()
863 param = 0x3F; in rm68200_init()
864 rm68200_dcs_write(dev, 0xCE, ¶m, 1); in rm68200_init()
866 param = 0x3F; in rm68200_init()
867 rm68200_dcs_write(dev, 0xCF, ¶m, 1); in rm68200_init()
869 param = 0x0E; in rm68200_init()
870 rm68200_dcs_write(dev, 0xD0, ¶m, 1); in rm68200_init()
872 param = 0x10; in rm68200_init()
873 rm68200_dcs_write(dev, 0xD1, ¶m, 1); in rm68200_init()
875 param = 0x14; in rm68200_init()
876 rm68200_dcs_write(dev, 0xD2, ¶m, 1); in rm68200_init()
878 param = 0x12; in rm68200_init()
879 rm68200_dcs_write(dev, 0xD3, ¶m, 1); in rm68200_init()
881 param = 0x16; in rm68200_init()
882 rm68200_dcs_write(dev, 0xD4, ¶m, 1); in rm68200_init()
884 param = 0x00; in rm68200_init()
885 rm68200_dcs_write(dev, 0xD5, ¶m, 1); in rm68200_init()
887 param = 0x04; in rm68200_init()
888 rm68200_dcs_write(dev, 0xD6, ¶m, 1); in rm68200_init()
890 param = 0x3F; in rm68200_init()
891 rm68200_dcs_write(dev, 0xD7, ¶m, 1); in rm68200_init()
893 param = 0x02; in rm68200_init()
894 rm68200_dcs_write(dev, 0xDC, ¶m, 1); in rm68200_init()
896 param = 0x12; in rm68200_init()
897 rm68200_dcs_write(dev, 0xDE, ¶m, 1); in rm68200_init()
899 param = 0x0E; in rm68200_init()
900 rm68200_dcs_write(dev, DCS_CMD_PAGE, ¶m, 1); in rm68200_init()
902 param = 0x75; in rm68200_init()
903 rm68200_dcs_write(dev, 0x01, ¶m, 1); in rm68200_init()
907 rm68200_dcs_write(dev, DCS_CMD_PAGE, ¶m, 1); in rm68200_init()
909 param = 0x00; in rm68200_init()
910 rm68200_dcs_write(dev, MCS_GAMMA_VP1, ¶m, 1); in rm68200_init()
912 param = 0x0C; in rm68200_init()
913 rm68200_dcs_write(dev, MCS_GAMMA_VP4, ¶m, 1); in rm68200_init()
915 param = 0x12; in rm68200_init()
916 rm68200_dcs_write(dev, MCS_GAMMA_VP8, ¶m, 1); in rm68200_init()
918 param = 0x0E; in rm68200_init()
919 rm68200_dcs_write(dev, MCS_GAMMA_VP16, ¶m, 1); in rm68200_init()
921 param = 0x06; in rm68200_init()
922 rm68200_dcs_write(dev, MCS_GAMMA_VP24, ¶m, 1); in rm68200_init()
924 param = 0x12; in rm68200_init()
925 rm68200_dcs_write(dev, MCS_GAMMA_VP52, ¶m, 1); in rm68200_init()
927 param = 0x0E; in rm68200_init()
928 rm68200_dcs_write(dev, MCS_GAMMA_VP80, ¶m, 1); in rm68200_init()
930 param = 0x0B; in rm68200_init()
931 rm68200_dcs_write(dev, MCS_GAMMA_VP108, ¶m, 1); in rm68200_init()
933 param = 0x15; in rm68200_init()
934 rm68200_dcs_write(dev, MCS_GAMMA_VP147, ¶m, 1); in rm68200_init()
936 param = 0x0B; in rm68200_init()
937 rm68200_dcs_write(dev, MCS_GAMMA_VP175, ¶m, 1); in rm68200_init()
939 param = 0x10; in rm68200_init()
940 rm68200_dcs_write(dev, MCS_GAMMA_VP203, ¶m, 1); in rm68200_init()
942 param = 0x07; in rm68200_init()
943 rm68200_dcs_write(dev, MCS_GAMMA_VP231, ¶m, 1); in rm68200_init()
945 param = 0x0F; in rm68200_init()
946 rm68200_dcs_write(dev, MCS_GAMMA_VP239, ¶m, 1); in rm68200_init()
948 param = 0x12; in rm68200_init()
949 rm68200_dcs_write(dev, MCS_GAMMA_VP247, ¶m, 1); in rm68200_init()
951 param = 0x0C; in rm68200_init()
952 rm68200_dcs_write(dev, MCS_GAMMA_VP251, ¶m, 1); in rm68200_init()
954 param = 0x00; in rm68200_init()
955 rm68200_dcs_write(dev, MCS_GAMMA_VP255, ¶m, 1); in rm68200_init()
957 param = 0x00; in rm68200_init()
958 rm68200_dcs_write(dev, MCS_GAMMA_VN1, ¶m, 1); in rm68200_init()
960 param = 0x0C; in rm68200_init()
961 rm68200_dcs_write(dev, MCS_GAMMA_VN4, ¶m, 1); in rm68200_init()
963 param = 0x12; in rm68200_init()
964 rm68200_dcs_write(dev, MCS_GAMMA_VN8, ¶m, 1); in rm68200_init()
966 param = 0x0E; in rm68200_init()
967 rm68200_dcs_write(dev, MCS_GAMMA_VN16, ¶m, 1); in rm68200_init()
969 param = 0x06; in rm68200_init()
970 rm68200_dcs_write(dev, MCS_GAMMA_VN24, ¶m, 1); in rm68200_init()
972 param = 0x12; in rm68200_init()
973 rm68200_dcs_write(dev, MCS_GAMMA_VN52, ¶m, 1); in rm68200_init()
975 param = 0x0E; in rm68200_init()
976 rm68200_dcs_write(dev, MCS_GAMMA_VN80, ¶m, 1); in rm68200_init()
978 param = 0x0B; in rm68200_init()
979 rm68200_dcs_write(dev, MCS_GAMMA_VN108, ¶m, 1); in rm68200_init()
981 param = 0x15; in rm68200_init()
982 rm68200_dcs_write(dev, MCS_GAMMA_VN147, ¶m, 1); in rm68200_init()
984 param = 0x0B; in rm68200_init()
985 rm68200_dcs_write(dev, MCS_GAMMA_VN175, ¶m, 1); in rm68200_init()
987 param = 0x10; in rm68200_init()
988 rm68200_dcs_write(dev, MCS_GAMMA_VN203, ¶m, 1); in rm68200_init()
990 param = 0x07; in rm68200_init()
991 rm68200_dcs_write(dev, MCS_GAMMA_VN231, ¶m, 1); in rm68200_init()
993 param = 0x0F; in rm68200_init()
994 rm68200_dcs_write(dev, MCS_GAMMA_VN239, ¶m, 1); in rm68200_init()
996 param = 0x12; in rm68200_init()
997 rm68200_dcs_write(dev, MCS_GAMMA_VN247, ¶m, 1); in rm68200_init()
999 param = 0x0C; in rm68200_init()
1000 rm68200_dcs_write(dev, MCS_GAMMA_VN251, ¶m, 1); in rm68200_init()
1002 param = 0x00; in rm68200_init()
1003 rm68200_dcs_write(dev, MCS_GAMMA_VN255, ¶m, 1); in rm68200_init()
1005 /* Page 0 */ in rm68200_init()
1007 rm68200_dcs_write(dev, DCS_CMD_PAGE, ¶m, 1); in rm68200_init()
1009 rm68200_dcs_write(dev, MIPI_DCS_EXIT_SLEEP_MODE, NULL, 0); in rm68200_init()
1013 rm68200_dcs_write(dev, MIPI_DCS_SET_DISPLAY_ON, NULL, 0); in rm68200_init()
1017 rm68200_dcs_write(dev, MIPI_DCS_WRITE_MEMORY_START, NULL, 0); in rm68200_init()
1019 param = 0x00; in rm68200_init()
1020 rm68200_dcs_write(dev, MIPI_DCS_SET_TEAR_ON, ¶m, 1); in rm68200_init()
1024 if (config->bl_gpio.port != NULL) { in rm68200_init()
1025 ret = gpio_pin_configure_dt(&config->bl_gpio, GPIO_OUTPUT_ACTIVE); in rm68200_init()
1026 if (ret < 0) { in rm68200_init()
1032 return 0; in rm68200_init()
1038 .reset_gpio = GPIO_DT_SPEC_INST_GET_OR(id, reset_gpios, {0}), \
1039 .bl_gpio = GPIO_DT_SPEC_INST_GET_OR(id, bl_gpios, {0}), \
1040 .num_of_lanes = DT_INST_PROP_BY_IDX(id, data_lanes, 0), \