1 /* 2 * Copyright (C) 2013, NVIDIA Corporation. All rights reserved. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sub license, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice (including the 12 * next paragraph) shall be included in all copies or substantial portions 13 * of the Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 * DEALINGS IN THE SOFTWARE. 22 */ 23 24 #include <linux/delay.h> 25 #include <linux/gpio/consumer.h> 26 #include <linux/module.h> 27 #include <linux/of_platform.h> 28 #include <linux/platform_device.h> 29 #include <linux/pm_runtime.h> 30 #include <linux/regulator/consumer.h> 31 32 #include <video/display_timing.h> 33 #include <video/of_display_timing.h> 34 #include <video/videomode.h> 35 36 #include <drm/drm_crtc.h> 37 #include <drm/drm_device.h> 38 #include <drm/drm_mipi_dsi.h> 39 #include <drm/drm_panel.h> 40 41 /** 42 * struct panel_desc - Describes a simple panel. 43 */ 44 struct panel_desc { 45 /** 46 * @modes: Pointer to array of fixed modes appropriate for this panel. 47 * 48 * If only one mode then this can just be the address of the mode. 49 * NOTE: cannot be used with "timings" and also if this is specified 50 * then you cannot override the mode in the device tree. 51 */ 52 const struct drm_display_mode *modes; 53 54 /** @num_modes: Number of elements in modes array. */ 55 unsigned int num_modes; 56 57 /** 58 * @timings: Pointer to array of display timings 59 * 60 * NOTE: cannot be used with "modes" and also these will be used to 61 * validate a device tree override if one is present. 62 */ 63 const struct display_timing *timings; 64 65 /** @num_timings: Number of elements in timings array. */ 66 unsigned int num_timings; 67 68 /** @bpc: Bits per color. */ 69 unsigned int bpc; 70 71 /** @size: Structure containing the physical size of this panel. */ 72 struct { 73 /** 74 * @size.width: Width (in mm) of the active display area. 75 */ 76 unsigned int width; 77 78 /** 79 * @size.height: Height (in mm) of the active display area. 80 */ 81 unsigned int height; 82 } size; 83 84 /** @delay: Structure containing various delay values for this panel. */ 85 struct { 86 /** 87 * @delay.prepare: Time for the panel to become ready. 88 * 89 * The time (in milliseconds) that it takes for the panel to 90 * become ready and start receiving video data 91 */ 92 unsigned int prepare; 93 94 /** 95 * @delay.enable: Time for the panel to display a valid frame. 96 * 97 * The time (in milliseconds) that it takes for the panel to 98 * display the first valid frame after starting to receive 99 * video data. 100 */ 101 unsigned int enable; 102 103 /** 104 * @delay.disable: Time for the panel to turn the display off. 105 * 106 * The time (in milliseconds) that it takes for the panel to 107 * turn the display off (no content is visible). 108 */ 109 unsigned int disable; 110 111 /** 112 * @delay.unprepare: Time to power down completely. 113 * 114 * The time (in milliseconds) that it takes for the panel 115 * to power itself down completely. 116 * 117 * This time is used to prevent a future "prepare" from 118 * starting until at least this many milliseconds has passed. 119 * If at prepare time less time has passed since unprepare 120 * finished, the driver waits for the remaining time. 121 */ 122 unsigned int unprepare; 123 } delay; 124 125 /** @bus_format: See MEDIA_BUS_FMT_... defines. */ 126 u32 bus_format; 127 128 /** @bus_flags: See DRM_BUS_FLAG_... defines. */ 129 u32 bus_flags; 130 131 /** @connector_type: LVDS, eDP, DSI, DPI, etc. */ 132 int connector_type; 133 }; 134 135 struct panel_simple { 136 struct drm_panel base; 137 bool enabled; 138 139 bool prepared; 140 141 ktime_t prepared_time; 142 ktime_t unprepared_time; 143 144 const struct panel_desc *desc; 145 146 struct regulator *supply; 147 struct i2c_adapter *ddc; 148 149 struct gpio_desc *enable_gpio; 150 151 struct edid *edid; 152 153 struct drm_display_mode override_mode; 154 155 enum drm_panel_orientation orientation; 156 }; 157 158 static inline struct panel_simple *to_panel_simple(struct drm_panel *panel) 159 { 160 return container_of(panel, struct panel_simple, base); 161 } 162 163 static unsigned int panel_simple_get_timings_modes(struct panel_simple *panel, 164 struct drm_connector *connector) 165 { 166 struct drm_display_mode *mode; 167 unsigned int i, num = 0; 168 169 for (i = 0; i < panel->desc->num_timings; i++) { 170 const struct display_timing *dt = &panel->desc->timings[i]; 171 struct videomode vm; 172 173 videomode_from_timing(dt, &vm); 174 mode = drm_mode_create(connector->dev); 175 if (!mode) { 176 dev_err(panel->base.dev, "failed to add mode %ux%u\n", 177 dt->hactive.typ, dt->vactive.typ); 178 continue; 179 } 180 181 drm_display_mode_from_videomode(&vm, mode); 182 183 mode->type |= DRM_MODE_TYPE_DRIVER; 184 185 if (panel->desc->num_timings == 1) 186 mode->type |= DRM_MODE_TYPE_PREFERRED; 187 188 drm_mode_probed_add(connector, mode); 189 num++; 190 } 191 192 return num; 193 } 194 195 static unsigned int panel_simple_get_display_modes(struct panel_simple *panel, 196 struct drm_connector *connector) 197 { 198 struct drm_display_mode *mode; 199 unsigned int i, num = 0; 200 201 for (i = 0; i < panel->desc->num_modes; i++) { 202 const struct drm_display_mode *m = &panel->desc->modes[i]; 203 204 mode = drm_mode_duplicate(connector->dev, m); 205 if (!mode) { 206 dev_err(panel->base.dev, "failed to add mode %ux%u@%u\n", 207 m->hdisplay, m->vdisplay, 208 drm_mode_vrefresh(m)); 209 continue; 210 } 211 212 mode->type |= DRM_MODE_TYPE_DRIVER; 213 214 if (panel->desc->num_modes == 1) 215 mode->type |= DRM_MODE_TYPE_PREFERRED; 216 217 drm_mode_set_name(mode); 218 219 drm_mode_probed_add(connector, mode); 220 num++; 221 } 222 223 return num; 224 } 225 226 static int panel_simple_get_non_edid_modes(struct panel_simple *panel, 227 struct drm_connector *connector) 228 { 229 struct drm_display_mode *mode; 230 bool has_override = panel->override_mode.type; 231 unsigned int num = 0; 232 233 if (!panel->desc) 234 return 0; 235 236 if (has_override) { 237 mode = drm_mode_duplicate(connector->dev, 238 &panel->override_mode); 239 if (mode) { 240 drm_mode_probed_add(connector, mode); 241 num = 1; 242 } else { 243 dev_err(panel->base.dev, "failed to add override mode\n"); 244 } 245 } 246 247 /* Only add timings if override was not there or failed to validate */ 248 if (num == 0 && panel->desc->num_timings) 249 num = panel_simple_get_timings_modes(panel, connector); 250 251 /* 252 * Only add fixed modes if timings/override added no mode. 253 * 254 * We should only ever have either the display timings specified 255 * or a fixed mode. Anything else is rather bogus. 256 */ 257 WARN_ON(panel->desc->num_timings && panel->desc->num_modes); 258 if (num == 0) 259 num = panel_simple_get_display_modes(panel, connector); 260 261 connector->display_info.bpc = panel->desc->bpc; 262 connector->display_info.width_mm = panel->desc->size.width; 263 connector->display_info.height_mm = panel->desc->size.height; 264 if (panel->desc->bus_format) 265 drm_display_info_set_bus_formats(&connector->display_info, 266 &panel->desc->bus_format, 1); 267 connector->display_info.bus_flags = panel->desc->bus_flags; 268 269 return num; 270 } 271 272 static void panel_simple_wait(ktime_t start_ktime, unsigned int min_ms) 273 { 274 ktime_t now_ktime, min_ktime; 275 276 if (!min_ms) 277 return; 278 279 min_ktime = ktime_add(start_ktime, ms_to_ktime(min_ms)); 280 now_ktime = ktime_get(); 281 282 if (ktime_before(now_ktime, min_ktime)) 283 msleep(ktime_to_ms(ktime_sub(min_ktime, now_ktime)) + 1); 284 } 285 286 static int panel_simple_disable(struct drm_panel *panel) 287 { 288 struct panel_simple *p = to_panel_simple(panel); 289 290 if (!p->enabled) 291 return 0; 292 293 if (p->desc->delay.disable) 294 msleep(p->desc->delay.disable); 295 296 p->enabled = false; 297 298 return 0; 299 } 300 301 static int panel_simple_suspend(struct device *dev) 302 { 303 struct panel_simple *p = dev_get_drvdata(dev); 304 305 gpiod_set_value_cansleep(p->enable_gpio, 0); 306 regulator_disable(p->supply); 307 p->unprepared_time = ktime_get(); 308 309 kfree(p->edid); 310 p->edid = NULL; 311 312 return 0; 313 } 314 315 static int panel_simple_unprepare(struct drm_panel *panel) 316 { 317 struct panel_simple *p = to_panel_simple(panel); 318 int ret; 319 320 /* Unpreparing when already unprepared is a no-op */ 321 if (!p->prepared) 322 return 0; 323 324 pm_runtime_mark_last_busy(panel->dev); 325 ret = pm_runtime_put_autosuspend(panel->dev); 326 if (ret < 0) 327 return ret; 328 p->prepared = false; 329 330 return 0; 331 } 332 333 static int panel_simple_resume(struct device *dev) 334 { 335 struct panel_simple *p = dev_get_drvdata(dev); 336 int err; 337 338 panel_simple_wait(p->unprepared_time, p->desc->delay.unprepare); 339 340 err = regulator_enable(p->supply); 341 if (err < 0) { 342 dev_err(dev, "failed to enable supply: %d\n", err); 343 return err; 344 } 345 346 gpiod_set_value_cansleep(p->enable_gpio, 1); 347 348 if (p->desc->delay.prepare) 349 msleep(p->desc->delay.prepare); 350 351 p->prepared_time = ktime_get(); 352 353 return 0; 354 } 355 356 static int panel_simple_prepare(struct drm_panel *panel) 357 { 358 struct panel_simple *p = to_panel_simple(panel); 359 int ret; 360 361 /* Preparing when already prepared is a no-op */ 362 if (p->prepared) 363 return 0; 364 365 ret = pm_runtime_get_sync(panel->dev); 366 if (ret < 0) { 367 pm_runtime_put_autosuspend(panel->dev); 368 return ret; 369 } 370 371 p->prepared = true; 372 373 return 0; 374 } 375 376 static int panel_simple_enable(struct drm_panel *panel) 377 { 378 struct panel_simple *p = to_panel_simple(panel); 379 380 if (p->enabled) 381 return 0; 382 383 if (p->desc->delay.enable) 384 msleep(p->desc->delay.enable); 385 386 p->enabled = true; 387 388 return 0; 389 } 390 391 static int panel_simple_get_modes(struct drm_panel *panel, 392 struct drm_connector *connector) 393 { 394 struct panel_simple *p = to_panel_simple(panel); 395 int num = 0; 396 397 /* probe EDID if a DDC bus is available */ 398 if (p->ddc) { 399 pm_runtime_get_sync(panel->dev); 400 401 if (!p->edid) 402 p->edid = drm_get_edid(connector, p->ddc); 403 404 if (p->edid) 405 num += drm_add_edid_modes(connector, p->edid); 406 407 pm_runtime_mark_last_busy(panel->dev); 408 pm_runtime_put_autosuspend(panel->dev); 409 } 410 411 /* add hard-coded panel modes */ 412 num += panel_simple_get_non_edid_modes(p, connector); 413 414 /* set up connector's "panel orientation" property */ 415 drm_connector_set_panel_orientation(connector, p->orientation); 416 417 return num; 418 } 419 420 static int panel_simple_get_timings(struct drm_panel *panel, 421 unsigned int num_timings, 422 struct display_timing *timings) 423 { 424 struct panel_simple *p = to_panel_simple(panel); 425 unsigned int i; 426 427 if (p->desc->num_timings < num_timings) 428 num_timings = p->desc->num_timings; 429 430 if (timings) 431 for (i = 0; i < num_timings; i++) 432 timings[i] = p->desc->timings[i]; 433 434 return p->desc->num_timings; 435 } 436 437 static const struct drm_panel_funcs panel_simple_funcs = { 438 .disable = panel_simple_disable, 439 .unprepare = panel_simple_unprepare, 440 .prepare = panel_simple_prepare, 441 .enable = panel_simple_enable, 442 .get_modes = panel_simple_get_modes, 443 .get_timings = panel_simple_get_timings, 444 }; 445 446 static struct panel_desc panel_dpi; 447 448 static int panel_dpi_probe(struct device *dev, 449 struct panel_simple *panel) 450 { 451 struct display_timing *timing; 452 const struct device_node *np; 453 struct panel_desc *desc; 454 unsigned int bus_flags; 455 struct videomode vm; 456 int ret; 457 458 np = dev->of_node; 459 desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL); 460 if (!desc) 461 return -ENOMEM; 462 463 timing = devm_kzalloc(dev, sizeof(*timing), GFP_KERNEL); 464 if (!timing) 465 return -ENOMEM; 466 467 ret = of_get_display_timing(np, "panel-timing", timing); 468 if (ret < 0) { 469 dev_err(dev, "%pOF: no panel-timing node found for \"panel-dpi\" binding\n", 470 np); 471 return ret; 472 } 473 474 desc->timings = timing; 475 desc->num_timings = 1; 476 477 of_property_read_u32(np, "width-mm", &desc->size.width); 478 of_property_read_u32(np, "height-mm", &desc->size.height); 479 480 /* Extract bus_flags from display_timing */ 481 bus_flags = 0; 482 vm.flags = timing->flags; 483 drm_bus_flags_from_videomode(&vm, &bus_flags); 484 desc->bus_flags = bus_flags; 485 486 /* We do not know the connector for the DT node, so guess it */ 487 desc->connector_type = DRM_MODE_CONNECTOR_DPI; 488 489 panel->desc = desc; 490 491 return 0; 492 } 493 494 #define PANEL_SIMPLE_BOUNDS_CHECK(to_check, bounds, field) \ 495 (to_check->field.typ >= bounds->field.min && \ 496 to_check->field.typ <= bounds->field.max) 497 static void panel_simple_parse_panel_timing_node(struct device *dev, 498 struct panel_simple *panel, 499 const struct display_timing *ot) 500 { 501 const struct panel_desc *desc = panel->desc; 502 struct videomode vm; 503 unsigned int i; 504 505 if (WARN_ON(desc->num_modes)) { 506 dev_err(dev, "Reject override mode: panel has a fixed mode\n"); 507 return; 508 } 509 if (WARN_ON(!desc->num_timings)) { 510 dev_err(dev, "Reject override mode: no timings specified\n"); 511 return; 512 } 513 514 for (i = 0; i < panel->desc->num_timings; i++) { 515 const struct display_timing *dt = &panel->desc->timings[i]; 516 517 if (!PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hactive) || 518 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hfront_porch) || 519 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hback_porch) || 520 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hsync_len) || 521 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vactive) || 522 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vfront_porch) || 523 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vback_porch) || 524 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vsync_len)) 525 continue; 526 527 if (ot->flags != dt->flags) 528 continue; 529 530 videomode_from_timing(ot, &vm); 531 drm_display_mode_from_videomode(&vm, &panel->override_mode); 532 panel->override_mode.type |= DRM_MODE_TYPE_DRIVER | 533 DRM_MODE_TYPE_PREFERRED; 534 break; 535 } 536 537 if (WARN_ON(!panel->override_mode.type)) 538 dev_err(dev, "Reject override mode: No display_timing found\n"); 539 } 540 541 static int panel_simple_probe(struct device *dev, const struct panel_desc *desc) 542 { 543 struct panel_simple *panel; 544 struct display_timing dt; 545 struct device_node *ddc; 546 int connector_type; 547 u32 bus_flags; 548 int err; 549 550 panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL); 551 if (!panel) 552 return -ENOMEM; 553 554 panel->enabled = false; 555 panel->prepared_time = 0; 556 panel->desc = desc; 557 558 panel->supply = devm_regulator_get(dev, "power"); 559 if (IS_ERR(panel->supply)) 560 return PTR_ERR(panel->supply); 561 562 panel->enable_gpio = devm_gpiod_get_optional(dev, "enable", 563 GPIOD_OUT_LOW); 564 if (IS_ERR(panel->enable_gpio)) { 565 err = PTR_ERR(panel->enable_gpio); 566 if (err != -EPROBE_DEFER) 567 dev_err(dev, "failed to request GPIO: %d\n", err); 568 return err; 569 } 570 571 err = of_drm_get_panel_orientation(dev->of_node, &panel->orientation); 572 if (err) { 573 dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, err); 574 return err; 575 } 576 577 ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0); 578 if (ddc) { 579 panel->ddc = of_find_i2c_adapter_by_node(ddc); 580 of_node_put(ddc); 581 582 if (!panel->ddc) 583 return -EPROBE_DEFER; 584 } 585 586 if (desc == &panel_dpi) { 587 /* Handle the generic panel-dpi binding */ 588 err = panel_dpi_probe(dev, panel); 589 if (err) 590 goto free_ddc; 591 } else { 592 if (!of_get_display_timing(dev->of_node, "panel-timing", &dt)) 593 panel_simple_parse_panel_timing_node(dev, panel, &dt); 594 } 595 596 connector_type = desc->connector_type; 597 /* Catch common mistakes for panels. */ 598 switch (connector_type) { 599 case 0: 600 dev_warn(dev, "Specify missing connector_type\n"); 601 connector_type = DRM_MODE_CONNECTOR_DPI; 602 break; 603 case DRM_MODE_CONNECTOR_LVDS: 604 WARN_ON(desc->bus_flags & 605 ~(DRM_BUS_FLAG_DE_LOW | 606 DRM_BUS_FLAG_DE_HIGH | 607 DRM_BUS_FLAG_DATA_MSB_TO_LSB | 608 DRM_BUS_FLAG_DATA_LSB_TO_MSB)); 609 WARN_ON(desc->bus_format != MEDIA_BUS_FMT_RGB666_1X7X3_SPWG && 610 desc->bus_format != MEDIA_BUS_FMT_RGB888_1X7X4_SPWG && 611 desc->bus_format != MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA); 612 WARN_ON(desc->bus_format == MEDIA_BUS_FMT_RGB666_1X7X3_SPWG && 613 desc->bpc != 6); 614 WARN_ON((desc->bus_format == MEDIA_BUS_FMT_RGB888_1X7X4_SPWG || 615 desc->bus_format == MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA) && 616 desc->bpc != 8); 617 break; 618 case DRM_MODE_CONNECTOR_eDP: 619 dev_warn(dev, "eDP panels moved to panel-edp\n"); 620 err = -EINVAL; 621 goto free_ddc; 622 case DRM_MODE_CONNECTOR_DSI: 623 if (desc->bpc != 6 && desc->bpc != 8) 624 dev_warn(dev, "Expected bpc in {6,8} but got: %u\n", desc->bpc); 625 break; 626 case DRM_MODE_CONNECTOR_DPI: 627 bus_flags = DRM_BUS_FLAG_DE_LOW | 628 DRM_BUS_FLAG_DE_HIGH | 629 DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE | 630 DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE | 631 DRM_BUS_FLAG_DATA_MSB_TO_LSB | 632 DRM_BUS_FLAG_DATA_LSB_TO_MSB | 633 DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE | 634 DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE; 635 if (desc->bus_flags & ~bus_flags) 636 dev_warn(dev, "Unexpected bus_flags(%d)\n", desc->bus_flags & ~bus_flags); 637 if (!(desc->bus_flags & bus_flags)) 638 dev_warn(dev, "Specify missing bus_flags\n"); 639 if (desc->bus_format == 0) 640 dev_warn(dev, "Specify missing bus_format\n"); 641 if (desc->bpc != 6 && desc->bpc != 8) 642 dev_warn(dev, "Expected bpc in {6,8} but got: %u\n", desc->bpc); 643 break; 644 default: 645 dev_warn(dev, "Specify a valid connector_type: %d\n", desc->connector_type); 646 connector_type = DRM_MODE_CONNECTOR_DPI; 647 break; 648 } 649 650 dev_set_drvdata(dev, panel); 651 652 /* 653 * We use runtime PM for prepare / unprepare since those power the panel 654 * on and off and those can be very slow operations. This is important 655 * to optimize powering the panel on briefly to read the EDID before 656 * fully enabling the panel. 657 */ 658 pm_runtime_enable(dev); 659 pm_runtime_set_autosuspend_delay(dev, 1000); 660 pm_runtime_use_autosuspend(dev); 661 662 drm_panel_init(&panel->base, dev, &panel_simple_funcs, connector_type); 663 664 err = drm_panel_of_backlight(&panel->base); 665 if (err) 666 goto disable_pm_runtime; 667 668 drm_panel_add(&panel->base); 669 670 return 0; 671 672 disable_pm_runtime: 673 pm_runtime_dont_use_autosuspend(dev); 674 pm_runtime_disable(dev); 675 free_ddc: 676 if (panel->ddc) 677 put_device(&panel->ddc->dev); 678 679 return err; 680 } 681 682 static int panel_simple_remove(struct device *dev) 683 { 684 struct panel_simple *panel = dev_get_drvdata(dev); 685 686 drm_panel_remove(&panel->base); 687 drm_panel_disable(&panel->base); 688 drm_panel_unprepare(&panel->base); 689 690 pm_runtime_dont_use_autosuspend(dev); 691 pm_runtime_disable(dev); 692 if (panel->ddc) 693 put_device(&panel->ddc->dev); 694 695 return 0; 696 } 697 698 static void panel_simple_shutdown(struct device *dev) 699 { 700 struct panel_simple *panel = dev_get_drvdata(dev); 701 702 drm_panel_disable(&panel->base); 703 drm_panel_unprepare(&panel->base); 704 } 705 706 static const struct drm_display_mode ampire_am_1280800n3tzqw_t00h_mode = { 707 .clock = 71100, 708 .hdisplay = 1280, 709 .hsync_start = 1280 + 40, 710 .hsync_end = 1280 + 40 + 80, 711 .htotal = 1280 + 40 + 80 + 40, 712 .vdisplay = 800, 713 .vsync_start = 800 + 3, 714 .vsync_end = 800 + 3 + 10, 715 .vtotal = 800 + 3 + 10 + 10, 716 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, 717 }; 718 719 static const struct panel_desc ampire_am_1280800n3tzqw_t00h = { 720 .modes = &ire_am_1280800n3tzqw_t00h_mode, 721 .num_modes = 1, 722 .bpc = 6, 723 .size = { 724 .width = 217, 725 .height = 136, 726 }, 727 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 728 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 729 .connector_type = DRM_MODE_CONNECTOR_LVDS, 730 }; 731 732 static const struct drm_display_mode ampire_am_480272h3tmqw_t01h_mode = { 733 .clock = 9000, 734 .hdisplay = 480, 735 .hsync_start = 480 + 2, 736 .hsync_end = 480 + 2 + 41, 737 .htotal = 480 + 2 + 41 + 2, 738 .vdisplay = 272, 739 .vsync_start = 272 + 2, 740 .vsync_end = 272 + 2 + 10, 741 .vtotal = 272 + 2 + 10 + 2, 742 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, 743 }; 744 745 static const struct panel_desc ampire_am_480272h3tmqw_t01h = { 746 .modes = &ire_am_480272h3tmqw_t01h_mode, 747 .num_modes = 1, 748 .bpc = 8, 749 .size = { 750 .width = 105, 751 .height = 67, 752 }, 753 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 754 }; 755 756 static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = { 757 .clock = 33333, 758 .hdisplay = 800, 759 .hsync_start = 800 + 0, 760 .hsync_end = 800 + 0 + 255, 761 .htotal = 800 + 0 + 255 + 0, 762 .vdisplay = 480, 763 .vsync_start = 480 + 2, 764 .vsync_end = 480 + 2 + 45, 765 .vtotal = 480 + 2 + 45 + 0, 766 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, 767 }; 768 769 static const struct panel_desc ampire_am800480r3tmqwa1h = { 770 .modes = &ire_am800480r3tmqwa1h_mode, 771 .num_modes = 1, 772 .bpc = 6, 773 .size = { 774 .width = 152, 775 .height = 91, 776 }, 777 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 778 }; 779 780 static const struct display_timing santek_st0700i5y_rbslw_f_timing = { 781 .pixelclock = { 26400000, 33300000, 46800000 }, 782 .hactive = { 800, 800, 800 }, 783 .hfront_porch = { 16, 210, 354 }, 784 .hback_porch = { 45, 36, 6 }, 785 .hsync_len = { 1, 10, 40 }, 786 .vactive = { 480, 480, 480 }, 787 .vfront_porch = { 7, 22, 147 }, 788 .vback_porch = { 22, 13, 3 }, 789 .vsync_len = { 1, 10, 20 }, 790 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | 791 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE 792 }; 793 794 static const struct panel_desc armadeus_st0700_adapt = { 795 .timings = &santek_st0700i5y_rbslw_f_timing, 796 .num_timings = 1, 797 .bpc = 6, 798 .size = { 799 .width = 154, 800 .height = 86, 801 }, 802 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 803 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, 804 }; 805 806 static const struct drm_display_mode auo_b101aw03_mode = { 807 .clock = 51450, 808 .hdisplay = 1024, 809 .hsync_start = 1024 + 156, 810 .hsync_end = 1024 + 156 + 8, 811 .htotal = 1024 + 156 + 8 + 156, 812 .vdisplay = 600, 813 .vsync_start = 600 + 16, 814 .vsync_end = 600 + 16 + 6, 815 .vtotal = 600 + 16 + 6 + 16, 816 }; 817 818 static const struct panel_desc auo_b101aw03 = { 819 .modes = &auo_b101aw03_mode, 820 .num_modes = 1, 821 .bpc = 6, 822 .size = { 823 .width = 223, 824 .height = 125, 825 }, 826 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, 827 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 828 .connector_type = DRM_MODE_CONNECTOR_LVDS, 829 }; 830 831 static const struct drm_display_mode auo_b101xtn01_mode = { 832 .clock = 72000, 833 .hdisplay = 1366, 834 .hsync_start = 1366 + 20, 835 .hsync_end = 1366 + 20 + 70, 836 .htotal = 1366 + 20 + 70, 837 .vdisplay = 768, 838 .vsync_start = 768 + 14, 839 .vsync_end = 768 + 14 + 42, 840 .vtotal = 768 + 14 + 42, 841 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 842 }; 843 844 static const struct panel_desc auo_b101xtn01 = { 845 .modes = &auo_b101xtn01_mode, 846 .num_modes = 1, 847 .bpc = 6, 848 .size = { 849 .width = 223, 850 .height = 125, 851 }, 852 }; 853 854 static const struct display_timing auo_g070vvn01_timings = { 855 .pixelclock = { 33300000, 34209000, 45000000 }, 856 .hactive = { 800, 800, 800 }, 857 .hfront_porch = { 20, 40, 200 }, 858 .hback_porch = { 87, 40, 1 }, 859 .hsync_len = { 1, 48, 87 }, 860 .vactive = { 480, 480, 480 }, 861 .vfront_porch = { 5, 13, 200 }, 862 .vback_porch = { 31, 31, 29 }, 863 .vsync_len = { 1, 1, 3 }, 864 }; 865 866 static const struct panel_desc auo_g070vvn01 = { 867 .timings = &auo_g070vvn01_timings, 868 .num_timings = 1, 869 .bpc = 8, 870 .size = { 871 .width = 152, 872 .height = 91, 873 }, 874 .delay = { 875 .prepare = 200, 876 .enable = 50, 877 .disable = 50, 878 .unprepare = 1000, 879 }, 880 }; 881 882 static const struct drm_display_mode auo_g101evn010_mode = { 883 .clock = 68930, 884 .hdisplay = 1280, 885 .hsync_start = 1280 + 82, 886 .hsync_end = 1280 + 82 + 2, 887 .htotal = 1280 + 82 + 2 + 84, 888 .vdisplay = 800, 889 .vsync_start = 800 + 8, 890 .vsync_end = 800 + 8 + 2, 891 .vtotal = 800 + 8 + 2 + 6, 892 }; 893 894 static const struct panel_desc auo_g101evn010 = { 895 .modes = &auo_g101evn010_mode, 896 .num_modes = 1, 897 .bpc = 6, 898 .size = { 899 .width = 216, 900 .height = 135, 901 }, 902 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, 903 .connector_type = DRM_MODE_CONNECTOR_LVDS, 904 }; 905 906 static const struct drm_display_mode auo_g104sn02_mode = { 907 .clock = 40000, 908 .hdisplay = 800, 909 .hsync_start = 800 + 40, 910 .hsync_end = 800 + 40 + 216, 911 .htotal = 800 + 40 + 216 + 128, 912 .vdisplay = 600, 913 .vsync_start = 600 + 10, 914 .vsync_end = 600 + 10 + 35, 915 .vtotal = 600 + 10 + 35 + 2, 916 }; 917 918 static const struct panel_desc auo_g104sn02 = { 919 .modes = &auo_g104sn02_mode, 920 .num_modes = 1, 921 .bpc = 8, 922 .size = { 923 .width = 211, 924 .height = 158, 925 }, 926 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 927 .connector_type = DRM_MODE_CONNECTOR_LVDS, 928 }; 929 930 static const struct drm_display_mode auo_g121ean01_mode = { 931 .clock = 66700, 932 .hdisplay = 1280, 933 .hsync_start = 1280 + 58, 934 .hsync_end = 1280 + 58 + 8, 935 .htotal = 1280 + 58 + 8 + 70, 936 .vdisplay = 800, 937 .vsync_start = 800 + 6, 938 .vsync_end = 800 + 6 + 4, 939 .vtotal = 800 + 6 + 4 + 10, 940 }; 941 942 static const struct panel_desc auo_g121ean01 = { 943 .modes = &auo_g121ean01_mode, 944 .num_modes = 1, 945 .bpc = 8, 946 .size = { 947 .width = 261, 948 .height = 163, 949 }, 950 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 951 .connector_type = DRM_MODE_CONNECTOR_LVDS, 952 }; 953 954 static const struct display_timing auo_g133han01_timings = { 955 .pixelclock = { 134000000, 141200000, 149000000 }, 956 .hactive = { 1920, 1920, 1920 }, 957 .hfront_porch = { 39, 58, 77 }, 958 .hback_porch = { 59, 88, 117 }, 959 .hsync_len = { 28, 42, 56 }, 960 .vactive = { 1080, 1080, 1080 }, 961 .vfront_porch = { 3, 8, 11 }, 962 .vback_porch = { 5, 14, 19 }, 963 .vsync_len = { 4, 14, 19 }, 964 }; 965 966 static const struct panel_desc auo_g133han01 = { 967 .timings = &auo_g133han01_timings, 968 .num_timings = 1, 969 .bpc = 8, 970 .size = { 971 .width = 293, 972 .height = 165, 973 }, 974 .delay = { 975 .prepare = 200, 976 .enable = 50, 977 .disable = 50, 978 .unprepare = 1000, 979 }, 980 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, 981 .connector_type = DRM_MODE_CONNECTOR_LVDS, 982 }; 983 984 static const struct drm_display_mode auo_g156xtn01_mode = { 985 .clock = 76000, 986 .hdisplay = 1366, 987 .hsync_start = 1366 + 33, 988 .hsync_end = 1366 + 33 + 67, 989 .htotal = 1560, 990 .vdisplay = 768, 991 .vsync_start = 768 + 4, 992 .vsync_end = 768 + 4 + 4, 993 .vtotal = 806, 994 }; 995 996 static const struct panel_desc auo_g156xtn01 = { 997 .modes = &auo_g156xtn01_mode, 998 .num_modes = 1, 999 .bpc = 8, 1000 .size = { 1001 .width = 344, 1002 .height = 194, 1003 }, 1004 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 1005 .connector_type = DRM_MODE_CONNECTOR_LVDS, 1006 }; 1007 1008 static const struct display_timing auo_g185han01_timings = { 1009 .pixelclock = { 120000000, 144000000, 175000000 }, 1010 .hactive = { 1920, 1920, 1920 }, 1011 .hfront_porch = { 36, 120, 148 }, 1012 .hback_porch = { 24, 88, 108 }, 1013 .hsync_len = { 20, 48, 64 }, 1014 .vactive = { 1080, 1080, 1080 }, 1015 .vfront_porch = { 6, 10, 40 }, 1016 .vback_porch = { 2, 5, 20 }, 1017 .vsync_len = { 2, 5, 20 }, 1018 }; 1019 1020 static const struct panel_desc auo_g185han01 = { 1021 .timings = &auo_g185han01_timings, 1022 .num_timings = 1, 1023 .bpc = 8, 1024 .size = { 1025 .width = 409, 1026 .height = 230, 1027 }, 1028 .delay = { 1029 .prepare = 50, 1030 .enable = 200, 1031 .disable = 110, 1032 .unprepare = 1000, 1033 }, 1034 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 1035 .connector_type = DRM_MODE_CONNECTOR_LVDS, 1036 }; 1037 1038 static const struct display_timing auo_g190ean01_timings = { 1039 .pixelclock = { 90000000, 108000000, 135000000 }, 1040 .hactive = { 1280, 1280, 1280 }, 1041 .hfront_porch = { 126, 184, 1266 }, 1042 .hback_porch = { 84, 122, 844 }, 1043 .hsync_len = { 70, 102, 704 }, 1044 .vactive = { 1024, 1024, 1024 }, 1045 .vfront_porch = { 4, 26, 76 }, 1046 .vback_porch = { 2, 8, 25 }, 1047 .vsync_len = { 2, 8, 25 }, 1048 }; 1049 1050 static const struct panel_desc auo_g190ean01 = { 1051 .timings = &auo_g190ean01_timings, 1052 .num_timings = 1, 1053 .bpc = 8, 1054 .size = { 1055 .width = 376, 1056 .height = 301, 1057 }, 1058 .delay = { 1059 .prepare = 50, 1060 .enable = 200, 1061 .disable = 110, 1062 .unprepare = 1000, 1063 }, 1064 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 1065 .connector_type = DRM_MODE_CONNECTOR_LVDS, 1066 }; 1067 1068 static const struct display_timing auo_p320hvn03_timings = { 1069 .pixelclock = { 106000000, 148500000, 164000000 }, 1070 .hactive = { 1920, 1920, 1920 }, 1071 .hfront_porch = { 25, 50, 130 }, 1072 .hback_porch = { 25, 50, 130 }, 1073 .hsync_len = { 20, 40, 105 }, 1074 .vactive = { 1080, 1080, 1080 }, 1075 .vfront_porch = { 8, 17, 150 }, 1076 .vback_porch = { 8, 17, 150 }, 1077 .vsync_len = { 4, 11, 100 }, 1078 }; 1079 1080 static const struct panel_desc auo_p320hvn03 = { 1081 .timings = &auo_p320hvn03_timings, 1082 .num_timings = 1, 1083 .bpc = 8, 1084 .size = { 1085 .width = 698, 1086 .height = 393, 1087 }, 1088 .delay = { 1089 .prepare = 1, 1090 .enable = 450, 1091 .unprepare = 500, 1092 }, 1093 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 1094 .connector_type = DRM_MODE_CONNECTOR_LVDS, 1095 }; 1096 1097 static const struct drm_display_mode auo_t215hvn01_mode = { 1098 .clock = 148800, 1099 .hdisplay = 1920, 1100 .hsync_start = 1920 + 88, 1101 .hsync_end = 1920 + 88 + 44, 1102 .htotal = 1920 + 88 + 44 + 148, 1103 .vdisplay = 1080, 1104 .vsync_start = 1080 + 4, 1105 .vsync_end = 1080 + 4 + 5, 1106 .vtotal = 1080 + 4 + 5 + 36, 1107 }; 1108 1109 static const struct panel_desc auo_t215hvn01 = { 1110 .modes = &auo_t215hvn01_mode, 1111 .num_modes = 1, 1112 .bpc = 8, 1113 .size = { 1114 .width = 430, 1115 .height = 270, 1116 }, 1117 .delay = { 1118 .disable = 5, 1119 .unprepare = 1000, 1120 } 1121 }; 1122 1123 static const struct drm_display_mode avic_tm070ddh03_mode = { 1124 .clock = 51200, 1125 .hdisplay = 1024, 1126 .hsync_start = 1024 + 160, 1127 .hsync_end = 1024 + 160 + 4, 1128 .htotal = 1024 + 160 + 4 + 156, 1129 .vdisplay = 600, 1130 .vsync_start = 600 + 17, 1131 .vsync_end = 600 + 17 + 1, 1132 .vtotal = 600 + 17 + 1 + 17, 1133 }; 1134 1135 static const struct panel_desc avic_tm070ddh03 = { 1136 .modes = &avic_tm070ddh03_mode, 1137 .num_modes = 1, 1138 .bpc = 8, 1139 .size = { 1140 .width = 154, 1141 .height = 90, 1142 }, 1143 .delay = { 1144 .prepare = 20, 1145 .enable = 200, 1146 .disable = 200, 1147 }, 1148 }; 1149 1150 static const struct drm_display_mode bananapi_s070wv20_ct16_mode = { 1151 .clock = 30000, 1152 .hdisplay = 800, 1153 .hsync_start = 800 + 40, 1154 .hsync_end = 800 + 40 + 48, 1155 .htotal = 800 + 40 + 48 + 40, 1156 .vdisplay = 480, 1157 .vsync_start = 480 + 13, 1158 .vsync_end = 480 + 13 + 3, 1159 .vtotal = 480 + 13 + 3 + 29, 1160 }; 1161 1162 static const struct panel_desc bananapi_s070wv20_ct16 = { 1163 .modes = &bananapi_s070wv20_ct16_mode, 1164 .num_modes = 1, 1165 .bpc = 6, 1166 .size = { 1167 .width = 154, 1168 .height = 86, 1169 }, 1170 }; 1171 1172 static const struct drm_display_mode boe_hv070wsa_mode = { 1173 .clock = 42105, 1174 .hdisplay = 1024, 1175 .hsync_start = 1024 + 30, 1176 .hsync_end = 1024 + 30 + 30, 1177 .htotal = 1024 + 30 + 30 + 30, 1178 .vdisplay = 600, 1179 .vsync_start = 600 + 10, 1180 .vsync_end = 600 + 10 + 10, 1181 .vtotal = 600 + 10 + 10 + 10, 1182 }; 1183 1184 static const struct panel_desc boe_hv070wsa = { 1185 .modes = &boe_hv070wsa_mode, 1186 .num_modes = 1, 1187 .bpc = 8, 1188 .size = { 1189 .width = 154, 1190 .height = 90, 1191 }, 1192 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 1193 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 1194 .connector_type = DRM_MODE_CONNECTOR_LVDS, 1195 }; 1196 1197 static const struct drm_display_mode cdtech_s043wq26h_ct7_mode = { 1198 .clock = 9000, 1199 .hdisplay = 480, 1200 .hsync_start = 480 + 5, 1201 .hsync_end = 480 + 5 + 5, 1202 .htotal = 480 + 5 + 5 + 40, 1203 .vdisplay = 272, 1204 .vsync_start = 272 + 8, 1205 .vsync_end = 272 + 8 + 8, 1206 .vtotal = 272 + 8 + 8 + 8, 1207 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 1208 }; 1209 1210 static const struct panel_desc cdtech_s043wq26h_ct7 = { 1211 .modes = &cdtech_s043wq26h_ct7_mode, 1212 .num_modes = 1, 1213 .bpc = 8, 1214 .size = { 1215 .width = 95, 1216 .height = 54, 1217 }, 1218 .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, 1219 }; 1220 1221 /* S070PWS19HP-FC21 2017/04/22 */ 1222 static const struct drm_display_mode cdtech_s070pws19hp_fc21_mode = { 1223 .clock = 51200, 1224 .hdisplay = 1024, 1225 .hsync_start = 1024 + 160, 1226 .hsync_end = 1024 + 160 + 20, 1227 .htotal = 1024 + 160 + 20 + 140, 1228 .vdisplay = 600, 1229 .vsync_start = 600 + 12, 1230 .vsync_end = 600 + 12 + 3, 1231 .vtotal = 600 + 12 + 3 + 20, 1232 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 1233 }; 1234 1235 static const struct panel_desc cdtech_s070pws19hp_fc21 = { 1236 .modes = &cdtech_s070pws19hp_fc21_mode, 1237 .num_modes = 1, 1238 .bpc = 6, 1239 .size = { 1240 .width = 154, 1241 .height = 86, 1242 }, 1243 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 1244 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, 1245 .connector_type = DRM_MODE_CONNECTOR_DPI, 1246 }; 1247 1248 /* S070SWV29HG-DC44 2017/09/21 */ 1249 static const struct drm_display_mode cdtech_s070swv29hg_dc44_mode = { 1250 .clock = 33300, 1251 .hdisplay = 800, 1252 .hsync_start = 800 + 210, 1253 .hsync_end = 800 + 210 + 2, 1254 .htotal = 800 + 210 + 2 + 44, 1255 .vdisplay = 480, 1256 .vsync_start = 480 + 22, 1257 .vsync_end = 480 + 22 + 2, 1258 .vtotal = 480 + 22 + 2 + 21, 1259 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 1260 }; 1261 1262 static const struct panel_desc cdtech_s070swv29hg_dc44 = { 1263 .modes = &cdtech_s070swv29hg_dc44_mode, 1264 .num_modes = 1, 1265 .bpc = 6, 1266 .size = { 1267 .width = 154, 1268 .height = 86, 1269 }, 1270 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 1271 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, 1272 .connector_type = DRM_MODE_CONNECTOR_DPI, 1273 }; 1274 1275 static const struct drm_display_mode cdtech_s070wv95_ct16_mode = { 1276 .clock = 35000, 1277 .hdisplay = 800, 1278 .hsync_start = 800 + 40, 1279 .hsync_end = 800 + 40 + 40, 1280 .htotal = 800 + 40 + 40 + 48, 1281 .vdisplay = 480, 1282 .vsync_start = 480 + 29, 1283 .vsync_end = 480 + 29 + 13, 1284 .vtotal = 480 + 29 + 13 + 3, 1285 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 1286 }; 1287 1288 static const struct panel_desc cdtech_s070wv95_ct16 = { 1289 .modes = &cdtech_s070wv95_ct16_mode, 1290 .num_modes = 1, 1291 .bpc = 8, 1292 .size = { 1293 .width = 154, 1294 .height = 85, 1295 }, 1296 }; 1297 1298 static const struct display_timing chefree_ch101olhlwh_002_timing = { 1299 .pixelclock = { 68900000, 71100000, 73400000 }, 1300 .hactive = { 1280, 1280, 1280 }, 1301 .hfront_porch = { 65, 80, 95 }, 1302 .hback_porch = { 64, 79, 94 }, 1303 .hsync_len = { 1, 1, 1 }, 1304 .vactive = { 800, 800, 800 }, 1305 .vfront_porch = { 7, 11, 14 }, 1306 .vback_porch = { 7, 11, 14 }, 1307 .vsync_len = { 1, 1, 1 }, 1308 .flags = DISPLAY_FLAGS_DE_HIGH, 1309 }; 1310 1311 static const struct panel_desc chefree_ch101olhlwh_002 = { 1312 .timings = &chefree_ch101olhlwh_002_timing, 1313 .num_timings = 1, 1314 .bpc = 8, 1315 .size = { 1316 .width = 217, 1317 .height = 135, 1318 }, 1319 .delay = { 1320 .enable = 200, 1321 .disable = 200, 1322 }, 1323 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 1324 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 1325 .connector_type = DRM_MODE_CONNECTOR_LVDS, 1326 }; 1327 1328 static const struct drm_display_mode chunghwa_claa070wp03xg_mode = { 1329 .clock = 66770, 1330 .hdisplay = 800, 1331 .hsync_start = 800 + 49, 1332 .hsync_end = 800 + 49 + 33, 1333 .htotal = 800 + 49 + 33 + 17, 1334 .vdisplay = 1280, 1335 .vsync_start = 1280 + 1, 1336 .vsync_end = 1280 + 1 + 7, 1337 .vtotal = 1280 + 1 + 7 + 15, 1338 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 1339 }; 1340 1341 static const struct panel_desc chunghwa_claa070wp03xg = { 1342 .modes = &chunghwa_claa070wp03xg_mode, 1343 .num_modes = 1, 1344 .bpc = 6, 1345 .size = { 1346 .width = 94, 1347 .height = 150, 1348 }, 1349 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, 1350 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 1351 .connector_type = DRM_MODE_CONNECTOR_LVDS, 1352 }; 1353 1354 static const struct drm_display_mode chunghwa_claa101wa01a_mode = { 1355 .clock = 72070, 1356 .hdisplay = 1366, 1357 .hsync_start = 1366 + 58, 1358 .hsync_end = 1366 + 58 + 58, 1359 .htotal = 1366 + 58 + 58 + 58, 1360 .vdisplay = 768, 1361 .vsync_start = 768 + 4, 1362 .vsync_end = 768 + 4 + 4, 1363 .vtotal = 768 + 4 + 4 + 4, 1364 }; 1365 1366 static const struct panel_desc chunghwa_claa101wa01a = { 1367 .modes = &chunghwa_claa101wa01a_mode, 1368 .num_modes = 1, 1369 .bpc = 6, 1370 .size = { 1371 .width = 220, 1372 .height = 120, 1373 }, 1374 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, 1375 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 1376 .connector_type = DRM_MODE_CONNECTOR_LVDS, 1377 }; 1378 1379 static const struct drm_display_mode chunghwa_claa101wb01_mode = { 1380 .clock = 69300, 1381 .hdisplay = 1366, 1382 .hsync_start = 1366 + 48, 1383 .hsync_end = 1366 + 48 + 32, 1384 .htotal = 1366 + 48 + 32 + 20, 1385 .vdisplay = 768, 1386 .vsync_start = 768 + 16, 1387 .vsync_end = 768 + 16 + 8, 1388 .vtotal = 768 + 16 + 8 + 16, 1389 }; 1390 1391 static const struct panel_desc chunghwa_claa101wb01 = { 1392 .modes = &chunghwa_claa101wb01_mode, 1393 .num_modes = 1, 1394 .bpc = 6, 1395 .size = { 1396 .width = 223, 1397 .height = 125, 1398 }, 1399 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, 1400 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 1401 .connector_type = DRM_MODE_CONNECTOR_LVDS, 1402 }; 1403 1404 static const struct drm_display_mode dataimage_scf0700c48ggu18_mode = { 1405 .clock = 33260, 1406 .hdisplay = 800, 1407 .hsync_start = 800 + 40, 1408 .hsync_end = 800 + 40 + 128, 1409 .htotal = 800 + 40 + 128 + 88, 1410 .vdisplay = 480, 1411 .vsync_start = 480 + 10, 1412 .vsync_end = 480 + 10 + 2, 1413 .vtotal = 480 + 10 + 2 + 33, 1414 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 1415 }; 1416 1417 static const struct panel_desc dataimage_scf0700c48ggu18 = { 1418 .modes = &dataimage_scf0700c48ggu18_mode, 1419 .num_modes = 1, 1420 .bpc = 8, 1421 .size = { 1422 .width = 152, 1423 .height = 91, 1424 }, 1425 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 1426 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, 1427 }; 1428 1429 static const struct display_timing dlc_dlc0700yzg_1_timing = { 1430 .pixelclock = { 45000000, 51200000, 57000000 }, 1431 .hactive = { 1024, 1024, 1024 }, 1432 .hfront_porch = { 100, 106, 113 }, 1433 .hback_porch = { 100, 106, 113 }, 1434 .hsync_len = { 100, 108, 114 }, 1435 .vactive = { 600, 600, 600 }, 1436 .vfront_porch = { 8, 11, 15 }, 1437 .vback_porch = { 8, 11, 15 }, 1438 .vsync_len = { 9, 13, 15 }, 1439 .flags = DISPLAY_FLAGS_DE_HIGH, 1440 }; 1441 1442 static const struct panel_desc dlc_dlc0700yzg_1 = { 1443 .timings = &dlc_dlc0700yzg_1_timing, 1444 .num_timings = 1, 1445 .bpc = 6, 1446 .size = { 1447 .width = 154, 1448 .height = 86, 1449 }, 1450 .delay = { 1451 .prepare = 30, 1452 .enable = 200, 1453 .disable = 200, 1454 }, 1455 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, 1456 .connector_type = DRM_MODE_CONNECTOR_LVDS, 1457 }; 1458 1459 static const struct display_timing dlc_dlc1010gig_timing = { 1460 .pixelclock = { 68900000, 71100000, 73400000 }, 1461 .hactive = { 1280, 1280, 1280 }, 1462 .hfront_porch = { 43, 53, 63 }, 1463 .hback_porch = { 43, 53, 63 }, 1464 .hsync_len = { 44, 54, 64 }, 1465 .vactive = { 800, 800, 800 }, 1466 .vfront_porch = { 5, 8, 11 }, 1467 .vback_porch = { 5, 8, 11 }, 1468 .vsync_len = { 5, 7, 11 }, 1469 .flags = DISPLAY_FLAGS_DE_HIGH, 1470 }; 1471 1472 static const struct panel_desc dlc_dlc1010gig = { 1473 .timings = &dlc_dlc1010gig_timing, 1474 .num_timings = 1, 1475 .bpc = 8, 1476 .size = { 1477 .width = 216, 1478 .height = 135, 1479 }, 1480 .delay = { 1481 .prepare = 60, 1482 .enable = 150, 1483 .disable = 100, 1484 .unprepare = 60, 1485 }, 1486 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 1487 .connector_type = DRM_MODE_CONNECTOR_LVDS, 1488 }; 1489 1490 static const struct drm_display_mode edt_et035012dm6_mode = { 1491 .clock = 6500, 1492 .hdisplay = 320, 1493 .hsync_start = 320 + 20, 1494 .hsync_end = 320 + 20 + 30, 1495 .htotal = 320 + 20 + 68, 1496 .vdisplay = 240, 1497 .vsync_start = 240 + 4, 1498 .vsync_end = 240 + 4 + 4, 1499 .vtotal = 240 + 4 + 4 + 14, 1500 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 1501 }; 1502 1503 static const struct panel_desc edt_et035012dm6 = { 1504 .modes = &edt_et035012dm6_mode, 1505 .num_modes = 1, 1506 .bpc = 8, 1507 .size = { 1508 .width = 70, 1509 .height = 52, 1510 }, 1511 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 1512 .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, 1513 }; 1514 1515 static const struct drm_display_mode edt_etm0350g0dh6_mode = { 1516 .clock = 6520, 1517 .hdisplay = 320, 1518 .hsync_start = 320 + 20, 1519 .hsync_end = 320 + 20 + 68, 1520 .htotal = 320 + 20 + 68, 1521 .vdisplay = 240, 1522 .vsync_start = 240 + 4, 1523 .vsync_end = 240 + 4 + 18, 1524 .vtotal = 240 + 4 + 18, 1525 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 1526 }; 1527 1528 static const struct panel_desc edt_etm0350g0dh6 = { 1529 .modes = &edt_etm0350g0dh6_mode, 1530 .num_modes = 1, 1531 .bpc = 6, 1532 .size = { 1533 .width = 70, 1534 .height = 53, 1535 }, 1536 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 1537 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, 1538 .connector_type = DRM_MODE_CONNECTOR_DPI, 1539 }; 1540 1541 static const struct drm_display_mode edt_etm043080dh6gp_mode = { 1542 .clock = 10870, 1543 .hdisplay = 480, 1544 .hsync_start = 480 + 8, 1545 .hsync_end = 480 + 8 + 4, 1546 .htotal = 480 + 8 + 4 + 41, 1547 1548 /* 1549 * IWG22M: Y resolution changed for "dc_linuxfb" module crashing while 1550 * fb_align 1551 */ 1552 1553 .vdisplay = 288, 1554 .vsync_start = 288 + 2, 1555 .vsync_end = 288 + 2 + 4, 1556 .vtotal = 288 + 2 + 4 + 10, 1557 }; 1558 1559 static const struct panel_desc edt_etm043080dh6gp = { 1560 .modes = &edt_etm043080dh6gp_mode, 1561 .num_modes = 1, 1562 .bpc = 8, 1563 .size = { 1564 .width = 100, 1565 .height = 65, 1566 }, 1567 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 1568 .connector_type = DRM_MODE_CONNECTOR_DPI, 1569 }; 1570 1571 static const struct drm_display_mode edt_etm0430g0dh6_mode = { 1572 .clock = 9000, 1573 .hdisplay = 480, 1574 .hsync_start = 480 + 2, 1575 .hsync_end = 480 + 2 + 41, 1576 .htotal = 480 + 2 + 41 + 2, 1577 .vdisplay = 272, 1578 .vsync_start = 272 + 2, 1579 .vsync_end = 272 + 2 + 10, 1580 .vtotal = 272 + 2 + 10 + 2, 1581 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 1582 }; 1583 1584 static const struct panel_desc edt_etm0430g0dh6 = { 1585 .modes = &edt_etm0430g0dh6_mode, 1586 .num_modes = 1, 1587 .bpc = 6, 1588 .size = { 1589 .width = 95, 1590 .height = 54, 1591 }, 1592 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 1593 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, 1594 .connector_type = DRM_MODE_CONNECTOR_DPI, 1595 }; 1596 1597 static const struct drm_display_mode edt_et057090dhu_mode = { 1598 .clock = 25175, 1599 .hdisplay = 640, 1600 .hsync_start = 640 + 16, 1601 .hsync_end = 640 + 16 + 30, 1602 .htotal = 640 + 16 + 30 + 114, 1603 .vdisplay = 480, 1604 .vsync_start = 480 + 10, 1605 .vsync_end = 480 + 10 + 3, 1606 .vtotal = 480 + 10 + 3 + 32, 1607 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 1608 }; 1609 1610 static const struct panel_desc edt_et057090dhu = { 1611 .modes = &edt_et057090dhu_mode, 1612 .num_modes = 1, 1613 .bpc = 6, 1614 .size = { 1615 .width = 115, 1616 .height = 86, 1617 }, 1618 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 1619 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, 1620 .connector_type = DRM_MODE_CONNECTOR_DPI, 1621 }; 1622 1623 static const struct drm_display_mode edt_etm0700g0dh6_mode = { 1624 .clock = 33260, 1625 .hdisplay = 800, 1626 .hsync_start = 800 + 40, 1627 .hsync_end = 800 + 40 + 128, 1628 .htotal = 800 + 40 + 128 + 88, 1629 .vdisplay = 480, 1630 .vsync_start = 480 + 10, 1631 .vsync_end = 480 + 10 + 2, 1632 .vtotal = 480 + 10 + 2 + 33, 1633 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 1634 }; 1635 1636 static const struct panel_desc edt_etm0700g0dh6 = { 1637 .modes = &edt_etm0700g0dh6_mode, 1638 .num_modes = 1, 1639 .bpc = 6, 1640 .size = { 1641 .width = 152, 1642 .height = 91, 1643 }, 1644 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 1645 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, 1646 .connector_type = DRM_MODE_CONNECTOR_DPI, 1647 }; 1648 1649 static const struct panel_desc edt_etm0700g0bdh6 = { 1650 .modes = &edt_etm0700g0dh6_mode, 1651 .num_modes = 1, 1652 .bpc = 6, 1653 .size = { 1654 .width = 152, 1655 .height = 91, 1656 }, 1657 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 1658 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, 1659 .connector_type = DRM_MODE_CONNECTOR_DPI, 1660 }; 1661 1662 static const struct drm_display_mode edt_etmv570g2dhu_mode = { 1663 .clock = 25175, 1664 .hdisplay = 640, 1665 .hsync_start = 640, 1666 .hsync_end = 640 + 16, 1667 .htotal = 640 + 16 + 30 + 114, 1668 .vdisplay = 480, 1669 .vsync_start = 480 + 10, 1670 .vsync_end = 480 + 10 + 3, 1671 .vtotal = 480 + 10 + 3 + 35, 1672 .flags = DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_PHSYNC, 1673 }; 1674 1675 static const struct panel_desc edt_etmv570g2dhu = { 1676 .modes = &edt_etmv570g2dhu_mode, 1677 .num_modes = 1, 1678 .bpc = 6, 1679 .size = { 1680 .width = 115, 1681 .height = 86, 1682 }, 1683 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 1684 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, 1685 .connector_type = DRM_MODE_CONNECTOR_DPI, 1686 }; 1687 1688 static const struct display_timing eink_vb3300_kca_timing = { 1689 .pixelclock = { 40000000, 40000000, 40000000 }, 1690 .hactive = { 334, 334, 334 }, 1691 .hfront_porch = { 1, 1, 1 }, 1692 .hback_porch = { 1, 1, 1 }, 1693 .hsync_len = { 1, 1, 1 }, 1694 .vactive = { 1405, 1405, 1405 }, 1695 .vfront_porch = { 1, 1, 1 }, 1696 .vback_porch = { 1, 1, 1 }, 1697 .vsync_len = { 1, 1, 1 }, 1698 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | 1699 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE, 1700 }; 1701 1702 static const struct panel_desc eink_vb3300_kca = { 1703 .timings = &eink_vb3300_kca_timing, 1704 .num_timings = 1, 1705 .bpc = 6, 1706 .size = { 1707 .width = 157, 1708 .height = 209, 1709 }, 1710 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 1711 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, 1712 .connector_type = DRM_MODE_CONNECTOR_DPI, 1713 }; 1714 1715 static const struct display_timing evervision_vgg804821_timing = { 1716 .pixelclock = { 27600000, 33300000, 50000000 }, 1717 .hactive = { 800, 800, 800 }, 1718 .hfront_porch = { 40, 66, 70 }, 1719 .hback_porch = { 40, 67, 70 }, 1720 .hsync_len = { 40, 67, 70 }, 1721 .vactive = { 480, 480, 480 }, 1722 .vfront_porch = { 6, 10, 10 }, 1723 .vback_porch = { 7, 11, 11 }, 1724 .vsync_len = { 7, 11, 11 }, 1725 .flags = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_HIGH | 1726 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE | 1727 DISPLAY_FLAGS_SYNC_NEGEDGE, 1728 }; 1729 1730 static const struct panel_desc evervision_vgg804821 = { 1731 .timings = &evervision_vgg804821_timing, 1732 .num_timings = 1, 1733 .bpc = 8, 1734 .size = { 1735 .width = 108, 1736 .height = 64, 1737 }, 1738 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 1739 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, 1740 }; 1741 1742 static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = { 1743 .clock = 32260, 1744 .hdisplay = 800, 1745 .hsync_start = 800 + 168, 1746 .hsync_end = 800 + 168 + 64, 1747 .htotal = 800 + 168 + 64 + 88, 1748 .vdisplay = 480, 1749 .vsync_start = 480 + 37, 1750 .vsync_end = 480 + 37 + 2, 1751 .vtotal = 480 + 37 + 2 + 8, 1752 }; 1753 1754 static const struct panel_desc foxlink_fl500wvr00_a0t = { 1755 .modes = &foxlink_fl500wvr00_a0t_mode, 1756 .num_modes = 1, 1757 .bpc = 8, 1758 .size = { 1759 .width = 108, 1760 .height = 65, 1761 }, 1762 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 1763 }; 1764 1765 static const struct drm_display_mode frida_frd350h54004_modes[] = { 1766 { /* 60 Hz */ 1767 .clock = 6000, 1768 .hdisplay = 320, 1769 .hsync_start = 320 + 44, 1770 .hsync_end = 320 + 44 + 16, 1771 .htotal = 320 + 44 + 16 + 20, 1772 .vdisplay = 240, 1773 .vsync_start = 240 + 2, 1774 .vsync_end = 240 + 2 + 6, 1775 .vtotal = 240 + 2 + 6 + 2, 1776 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 1777 }, 1778 { /* 50 Hz */ 1779 .clock = 5400, 1780 .hdisplay = 320, 1781 .hsync_start = 320 + 56, 1782 .hsync_end = 320 + 56 + 16, 1783 .htotal = 320 + 56 + 16 + 40, 1784 .vdisplay = 240, 1785 .vsync_start = 240 + 2, 1786 .vsync_end = 240 + 2 + 6, 1787 .vtotal = 240 + 2 + 6 + 2, 1788 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 1789 }, 1790 }; 1791 1792 static const struct panel_desc frida_frd350h54004 = { 1793 .modes = frida_frd350h54004_modes, 1794 .num_modes = ARRAY_SIZE(frida_frd350h54004_modes), 1795 .bpc = 8, 1796 .size = { 1797 .width = 77, 1798 .height = 64, 1799 }, 1800 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 1801 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, 1802 .connector_type = DRM_MODE_CONNECTOR_DPI, 1803 }; 1804 1805 static const struct drm_display_mode friendlyarm_hd702e_mode = { 1806 .clock = 67185, 1807 .hdisplay = 800, 1808 .hsync_start = 800 + 20, 1809 .hsync_end = 800 + 20 + 24, 1810 .htotal = 800 + 20 + 24 + 20, 1811 .vdisplay = 1280, 1812 .vsync_start = 1280 + 4, 1813 .vsync_end = 1280 + 4 + 8, 1814 .vtotal = 1280 + 4 + 8 + 4, 1815 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 1816 }; 1817 1818 static const struct panel_desc friendlyarm_hd702e = { 1819 .modes = &friendlyarm_hd702e_mode, 1820 .num_modes = 1, 1821 .size = { 1822 .width = 94, 1823 .height = 151, 1824 }, 1825 }; 1826 1827 static const struct drm_display_mode giantplus_gpg482739qs5_mode = { 1828 .clock = 9000, 1829 .hdisplay = 480, 1830 .hsync_start = 480 + 5, 1831 .hsync_end = 480 + 5 + 1, 1832 .htotal = 480 + 5 + 1 + 40, 1833 .vdisplay = 272, 1834 .vsync_start = 272 + 8, 1835 .vsync_end = 272 + 8 + 1, 1836 .vtotal = 272 + 8 + 1 + 8, 1837 }; 1838 1839 static const struct panel_desc giantplus_gpg482739qs5 = { 1840 .modes = &giantplus_gpg482739qs5_mode, 1841 .num_modes = 1, 1842 .bpc = 8, 1843 .size = { 1844 .width = 95, 1845 .height = 54, 1846 }, 1847 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 1848 }; 1849 1850 static const struct display_timing giantplus_gpm940b0_timing = { 1851 .pixelclock = { 13500000, 27000000, 27500000 }, 1852 .hactive = { 320, 320, 320 }, 1853 .hfront_porch = { 14, 686, 718 }, 1854 .hback_porch = { 50, 70, 255 }, 1855 .hsync_len = { 1, 1, 1 }, 1856 .vactive = { 240, 240, 240 }, 1857 .vfront_porch = { 1, 1, 179 }, 1858 .vback_porch = { 1, 21, 31 }, 1859 .vsync_len = { 1, 1, 6 }, 1860 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW, 1861 }; 1862 1863 static const struct panel_desc giantplus_gpm940b0 = { 1864 .timings = &giantplus_gpm940b0_timing, 1865 .num_timings = 1, 1866 .bpc = 8, 1867 .size = { 1868 .width = 60, 1869 .height = 45, 1870 }, 1871 .bus_format = MEDIA_BUS_FMT_RGB888_3X8, 1872 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, 1873 }; 1874 1875 static const struct display_timing hannstar_hsd070pww1_timing = { 1876 .pixelclock = { 64300000, 71100000, 82000000 }, 1877 .hactive = { 1280, 1280, 1280 }, 1878 .hfront_porch = { 1, 1, 10 }, 1879 .hback_porch = { 1, 1, 10 }, 1880 /* 1881 * According to the data sheet, the minimum horizontal blanking interval 1882 * is 54 clocks (1 + 52 + 1), but tests with a Nitrogen6X have shown the 1883 * minimum working horizontal blanking interval to be 60 clocks. 1884 */ 1885 .hsync_len = { 58, 158, 661 }, 1886 .vactive = { 800, 800, 800 }, 1887 .vfront_porch = { 1, 1, 10 }, 1888 .vback_porch = { 1, 1, 10 }, 1889 .vsync_len = { 1, 21, 203 }, 1890 .flags = DISPLAY_FLAGS_DE_HIGH, 1891 }; 1892 1893 static const struct panel_desc hannstar_hsd070pww1 = { 1894 .timings = &hannstar_hsd070pww1_timing, 1895 .num_timings = 1, 1896 .bpc = 6, 1897 .size = { 1898 .width = 151, 1899 .height = 94, 1900 }, 1901 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, 1902 .connector_type = DRM_MODE_CONNECTOR_LVDS, 1903 }; 1904 1905 static const struct display_timing hannstar_hsd100pxn1_timing = { 1906 .pixelclock = { 55000000, 65000000, 75000000 }, 1907 .hactive = { 1024, 1024, 1024 }, 1908 .hfront_porch = { 40, 40, 40 }, 1909 .hback_porch = { 220, 220, 220 }, 1910 .hsync_len = { 20, 60, 100 }, 1911 .vactive = { 768, 768, 768 }, 1912 .vfront_porch = { 7, 7, 7 }, 1913 .vback_porch = { 21, 21, 21 }, 1914 .vsync_len = { 10, 10, 10 }, 1915 .flags = DISPLAY_FLAGS_DE_HIGH, 1916 }; 1917 1918 static const struct panel_desc hannstar_hsd100pxn1 = { 1919 .timings = &hannstar_hsd100pxn1_timing, 1920 .num_timings = 1, 1921 .bpc = 6, 1922 .size = { 1923 .width = 203, 1924 .height = 152, 1925 }, 1926 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, 1927 .connector_type = DRM_MODE_CONNECTOR_LVDS, 1928 }; 1929 1930 static const struct drm_display_mode hitachi_tx23d38vm0caa_mode = { 1931 .clock = 33333, 1932 .hdisplay = 800, 1933 .hsync_start = 800 + 85, 1934 .hsync_end = 800 + 85 + 86, 1935 .htotal = 800 + 85 + 86 + 85, 1936 .vdisplay = 480, 1937 .vsync_start = 480 + 16, 1938 .vsync_end = 480 + 16 + 13, 1939 .vtotal = 480 + 16 + 13 + 16, 1940 }; 1941 1942 static const struct panel_desc hitachi_tx23d38vm0caa = { 1943 .modes = &hitachi_tx23d38vm0caa_mode, 1944 .num_modes = 1, 1945 .bpc = 6, 1946 .size = { 1947 .width = 195, 1948 .height = 117, 1949 }, 1950 .delay = { 1951 .enable = 160, 1952 .disable = 160, 1953 }, 1954 }; 1955 1956 static const struct drm_display_mode innolux_at043tn24_mode = { 1957 .clock = 9000, 1958 .hdisplay = 480, 1959 .hsync_start = 480 + 2, 1960 .hsync_end = 480 + 2 + 41, 1961 .htotal = 480 + 2 + 41 + 2, 1962 .vdisplay = 272, 1963 .vsync_start = 272 + 2, 1964 .vsync_end = 272 + 2 + 10, 1965 .vtotal = 272 + 2 + 10 + 2, 1966 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 1967 }; 1968 1969 static const struct panel_desc innolux_at043tn24 = { 1970 .modes = &innolux_at043tn24_mode, 1971 .num_modes = 1, 1972 .bpc = 8, 1973 .size = { 1974 .width = 95, 1975 .height = 54, 1976 }, 1977 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 1978 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, 1979 }; 1980 1981 static const struct drm_display_mode innolux_at070tn92_mode = { 1982 .clock = 33333, 1983 .hdisplay = 800, 1984 .hsync_start = 800 + 210, 1985 .hsync_end = 800 + 210 + 20, 1986 .htotal = 800 + 210 + 20 + 46, 1987 .vdisplay = 480, 1988 .vsync_start = 480 + 22, 1989 .vsync_end = 480 + 22 + 10, 1990 .vtotal = 480 + 22 + 23 + 10, 1991 }; 1992 1993 static const struct panel_desc innolux_at070tn92 = { 1994 .modes = &innolux_at070tn92_mode, 1995 .num_modes = 1, 1996 .size = { 1997 .width = 154, 1998 .height = 86, 1999 }, 2000 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 2001 }; 2002 2003 static const struct display_timing innolux_g070y2_l01_timing = { 2004 .pixelclock = { 28000000, 29500000, 32000000 }, 2005 .hactive = { 800, 800, 800 }, 2006 .hfront_porch = { 61, 91, 141 }, 2007 .hback_porch = { 60, 90, 140 }, 2008 .hsync_len = { 12, 12, 12 }, 2009 .vactive = { 480, 480, 480 }, 2010 .vfront_porch = { 4, 9, 30 }, 2011 .vback_porch = { 4, 8, 28 }, 2012 .vsync_len = { 2, 2, 2 }, 2013 .flags = DISPLAY_FLAGS_DE_HIGH, 2014 }; 2015 2016 static const struct panel_desc innolux_g070y2_l01 = { 2017 .timings = &innolux_g070y2_l01_timing, 2018 .num_timings = 1, 2019 .bpc = 6, 2020 .size = { 2021 .width = 152, 2022 .height = 91, 2023 }, 2024 .delay = { 2025 .prepare = 10, 2026 .enable = 100, 2027 .disable = 100, 2028 .unprepare = 800, 2029 }, 2030 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 2031 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2032 }; 2033 2034 static const struct display_timing innolux_g101ice_l01_timing = { 2035 .pixelclock = { 60400000, 71100000, 74700000 }, 2036 .hactive = { 1280, 1280, 1280 }, 2037 .hfront_porch = { 41, 80, 100 }, 2038 .hback_porch = { 40, 79, 99 }, 2039 .hsync_len = { 1, 1, 1 }, 2040 .vactive = { 800, 800, 800 }, 2041 .vfront_porch = { 5, 11, 14 }, 2042 .vback_porch = { 4, 11, 14 }, 2043 .vsync_len = { 1, 1, 1 }, 2044 .flags = DISPLAY_FLAGS_DE_HIGH, 2045 }; 2046 2047 static const struct panel_desc innolux_g101ice_l01 = { 2048 .timings = &innolux_g101ice_l01_timing, 2049 .num_timings = 1, 2050 .bpc = 8, 2051 .size = { 2052 .width = 217, 2053 .height = 135, 2054 }, 2055 .delay = { 2056 .enable = 200, 2057 .disable = 200, 2058 }, 2059 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 2060 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2061 }; 2062 2063 static const struct display_timing innolux_g121i1_l01_timing = { 2064 .pixelclock = { 67450000, 71000000, 74550000 }, 2065 .hactive = { 1280, 1280, 1280 }, 2066 .hfront_porch = { 40, 80, 160 }, 2067 .hback_porch = { 39, 79, 159 }, 2068 .hsync_len = { 1, 1, 1 }, 2069 .vactive = { 800, 800, 800 }, 2070 .vfront_porch = { 5, 11, 100 }, 2071 .vback_porch = { 4, 11, 99 }, 2072 .vsync_len = { 1, 1, 1 }, 2073 }; 2074 2075 static const struct panel_desc innolux_g121i1_l01 = { 2076 .timings = &innolux_g121i1_l01_timing, 2077 .num_timings = 1, 2078 .bpc = 6, 2079 .size = { 2080 .width = 261, 2081 .height = 163, 2082 }, 2083 .delay = { 2084 .enable = 200, 2085 .disable = 20, 2086 }, 2087 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 2088 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2089 }; 2090 2091 static const struct drm_display_mode innolux_g121x1_l03_mode = { 2092 .clock = 65000, 2093 .hdisplay = 1024, 2094 .hsync_start = 1024 + 0, 2095 .hsync_end = 1024 + 1, 2096 .htotal = 1024 + 0 + 1 + 320, 2097 .vdisplay = 768, 2098 .vsync_start = 768 + 38, 2099 .vsync_end = 768 + 38 + 1, 2100 .vtotal = 768 + 38 + 1 + 0, 2101 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 2102 }; 2103 2104 static const struct panel_desc innolux_g121x1_l03 = { 2105 .modes = &innolux_g121x1_l03_mode, 2106 .num_modes = 1, 2107 .bpc = 6, 2108 .size = { 2109 .width = 246, 2110 .height = 185, 2111 }, 2112 .delay = { 2113 .enable = 200, 2114 .unprepare = 200, 2115 .disable = 400, 2116 }, 2117 }; 2118 2119 static const struct drm_display_mode innolux_n156bge_l21_mode = { 2120 .clock = 69300, 2121 .hdisplay = 1366, 2122 .hsync_start = 1366 + 16, 2123 .hsync_end = 1366 + 16 + 34, 2124 .htotal = 1366 + 16 + 34 + 50, 2125 .vdisplay = 768, 2126 .vsync_start = 768 + 2, 2127 .vsync_end = 768 + 2 + 6, 2128 .vtotal = 768 + 2 + 6 + 12, 2129 }; 2130 2131 static const struct panel_desc innolux_n156bge_l21 = { 2132 .modes = &innolux_n156bge_l21_mode, 2133 .num_modes = 1, 2134 .bpc = 6, 2135 .size = { 2136 .width = 344, 2137 .height = 193, 2138 }, 2139 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, 2140 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 2141 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2142 }; 2143 2144 static const struct drm_display_mode innolux_zj070na_01p_mode = { 2145 .clock = 51501, 2146 .hdisplay = 1024, 2147 .hsync_start = 1024 + 128, 2148 .hsync_end = 1024 + 128 + 64, 2149 .htotal = 1024 + 128 + 64 + 128, 2150 .vdisplay = 600, 2151 .vsync_start = 600 + 16, 2152 .vsync_end = 600 + 16 + 4, 2153 .vtotal = 600 + 16 + 4 + 16, 2154 }; 2155 2156 static const struct panel_desc innolux_zj070na_01p = { 2157 .modes = &innolux_zj070na_01p_mode, 2158 .num_modes = 1, 2159 .bpc = 6, 2160 .size = { 2161 .width = 154, 2162 .height = 90, 2163 }, 2164 }; 2165 2166 static const struct display_timing koe_tx14d24vm1bpa_timing = { 2167 .pixelclock = { 5580000, 5850000, 6200000 }, 2168 .hactive = { 320, 320, 320 }, 2169 .hfront_porch = { 30, 30, 30 }, 2170 .hback_porch = { 30, 30, 30 }, 2171 .hsync_len = { 1, 5, 17 }, 2172 .vactive = { 240, 240, 240 }, 2173 .vfront_porch = { 6, 6, 6 }, 2174 .vback_porch = { 5, 5, 5 }, 2175 .vsync_len = { 1, 2, 11 }, 2176 .flags = DISPLAY_FLAGS_DE_HIGH, 2177 }; 2178 2179 static const struct panel_desc koe_tx14d24vm1bpa = { 2180 .timings = &koe_tx14d24vm1bpa_timing, 2181 .num_timings = 1, 2182 .bpc = 6, 2183 .size = { 2184 .width = 115, 2185 .height = 86, 2186 }, 2187 }; 2188 2189 static const struct display_timing koe_tx26d202vm0bwa_timing = { 2190 .pixelclock = { 151820000, 156720000, 159780000 }, 2191 .hactive = { 1920, 1920, 1920 }, 2192 .hfront_porch = { 105, 130, 142 }, 2193 .hback_porch = { 45, 70, 82 }, 2194 .hsync_len = { 30, 30, 30 }, 2195 .vactive = { 1200, 1200, 1200}, 2196 .vfront_porch = { 3, 5, 10 }, 2197 .vback_porch = { 2, 5, 10 }, 2198 .vsync_len = { 5, 5, 5 }, 2199 }; 2200 2201 static const struct panel_desc koe_tx26d202vm0bwa = { 2202 .timings = &koe_tx26d202vm0bwa_timing, 2203 .num_timings = 1, 2204 .bpc = 8, 2205 .size = { 2206 .width = 217, 2207 .height = 136, 2208 }, 2209 .delay = { 2210 .prepare = 1000, 2211 .enable = 1000, 2212 .unprepare = 1000, 2213 .disable = 1000, 2214 }, 2215 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 2216 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 2217 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2218 }; 2219 2220 static const struct display_timing koe_tx31d200vm0baa_timing = { 2221 .pixelclock = { 39600000, 43200000, 48000000 }, 2222 .hactive = { 1280, 1280, 1280 }, 2223 .hfront_porch = { 16, 36, 56 }, 2224 .hback_porch = { 16, 36, 56 }, 2225 .hsync_len = { 8, 8, 8 }, 2226 .vactive = { 480, 480, 480 }, 2227 .vfront_porch = { 6, 21, 33 }, 2228 .vback_porch = { 6, 21, 33 }, 2229 .vsync_len = { 8, 8, 8 }, 2230 .flags = DISPLAY_FLAGS_DE_HIGH, 2231 }; 2232 2233 static const struct panel_desc koe_tx31d200vm0baa = { 2234 .timings = &koe_tx31d200vm0baa_timing, 2235 .num_timings = 1, 2236 .bpc = 6, 2237 .size = { 2238 .width = 292, 2239 .height = 109, 2240 }, 2241 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, 2242 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2243 }; 2244 2245 static const struct display_timing kyo_tcg121xglp_timing = { 2246 .pixelclock = { 52000000, 65000000, 71000000 }, 2247 .hactive = { 1024, 1024, 1024 }, 2248 .hfront_porch = { 2, 2, 2 }, 2249 .hback_porch = { 2, 2, 2 }, 2250 .hsync_len = { 86, 124, 244 }, 2251 .vactive = { 768, 768, 768 }, 2252 .vfront_porch = { 2, 2, 2 }, 2253 .vback_porch = { 2, 2, 2 }, 2254 .vsync_len = { 6, 34, 73 }, 2255 .flags = DISPLAY_FLAGS_DE_HIGH, 2256 }; 2257 2258 static const struct panel_desc kyo_tcg121xglp = { 2259 .timings = &kyo_tcg121xglp_timing, 2260 .num_timings = 1, 2261 .bpc = 8, 2262 .size = { 2263 .width = 246, 2264 .height = 184, 2265 }, 2266 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 2267 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2268 }; 2269 2270 static const struct drm_display_mode lemaker_bl035_rgb_002_mode = { 2271 .clock = 7000, 2272 .hdisplay = 320, 2273 .hsync_start = 320 + 20, 2274 .hsync_end = 320 + 20 + 30, 2275 .htotal = 320 + 20 + 30 + 38, 2276 .vdisplay = 240, 2277 .vsync_start = 240 + 4, 2278 .vsync_end = 240 + 4 + 3, 2279 .vtotal = 240 + 4 + 3 + 15, 2280 }; 2281 2282 static const struct panel_desc lemaker_bl035_rgb_002 = { 2283 .modes = &lemaker_bl035_rgb_002_mode, 2284 .num_modes = 1, 2285 .size = { 2286 .width = 70, 2287 .height = 52, 2288 }, 2289 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 2290 .bus_flags = DRM_BUS_FLAG_DE_LOW, 2291 }; 2292 2293 static const struct drm_display_mode lg_lb070wv8_mode = { 2294 .clock = 33246, 2295 .hdisplay = 800, 2296 .hsync_start = 800 + 88, 2297 .hsync_end = 800 + 88 + 80, 2298 .htotal = 800 + 88 + 80 + 88, 2299 .vdisplay = 480, 2300 .vsync_start = 480 + 10, 2301 .vsync_end = 480 + 10 + 25, 2302 .vtotal = 480 + 10 + 25 + 10, 2303 }; 2304 2305 static const struct panel_desc lg_lb070wv8 = { 2306 .modes = &lg_lb070wv8_mode, 2307 .num_modes = 1, 2308 .bpc = 8, 2309 .size = { 2310 .width = 151, 2311 .height = 91, 2312 }, 2313 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 2314 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2315 }; 2316 2317 static const struct display_timing logictechno_lt161010_2nh_timing = { 2318 .pixelclock = { 26400000, 33300000, 46800000 }, 2319 .hactive = { 800, 800, 800 }, 2320 .hfront_porch = { 16, 210, 354 }, 2321 .hback_porch = { 46, 46, 46 }, 2322 .hsync_len = { 1, 20, 40 }, 2323 .vactive = { 480, 480, 480 }, 2324 .vfront_porch = { 7, 22, 147 }, 2325 .vback_porch = { 23, 23, 23 }, 2326 .vsync_len = { 1, 10, 20 }, 2327 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | 2328 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE | 2329 DISPLAY_FLAGS_SYNC_POSEDGE, 2330 }; 2331 2332 static const struct panel_desc logictechno_lt161010_2nh = { 2333 .timings = &logictechno_lt161010_2nh_timing, 2334 .num_timings = 1, 2335 .size = { 2336 .width = 154, 2337 .height = 86, 2338 }, 2339 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 2340 .bus_flags = DRM_BUS_FLAG_DE_HIGH | 2341 DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE | 2342 DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE, 2343 .connector_type = DRM_MODE_CONNECTOR_DPI, 2344 }; 2345 2346 static const struct display_timing logictechno_lt170410_2whc_timing = { 2347 .pixelclock = { 68900000, 71100000, 73400000 }, 2348 .hactive = { 1280, 1280, 1280 }, 2349 .hfront_porch = { 23, 60, 71 }, 2350 .hback_porch = { 23, 60, 71 }, 2351 .hsync_len = { 15, 40, 47 }, 2352 .vactive = { 800, 800, 800 }, 2353 .vfront_porch = { 5, 7, 10 }, 2354 .vback_porch = { 5, 7, 10 }, 2355 .vsync_len = { 6, 9, 12 }, 2356 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | 2357 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE | 2358 DISPLAY_FLAGS_SYNC_POSEDGE, 2359 }; 2360 2361 static const struct panel_desc logictechno_lt170410_2whc = { 2362 .timings = &logictechno_lt170410_2whc_timing, 2363 .num_timings = 1, 2364 .size = { 2365 .width = 217, 2366 .height = 136, 2367 }, 2368 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 2369 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 2370 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2371 }; 2372 2373 static const struct drm_display_mode logictechno_lttd800480070_l2rt_mode = { 2374 .clock = 33000, 2375 .hdisplay = 800, 2376 .hsync_start = 800 + 112, 2377 .hsync_end = 800 + 112 + 3, 2378 .htotal = 800 + 112 + 3 + 85, 2379 .vdisplay = 480, 2380 .vsync_start = 480 + 38, 2381 .vsync_end = 480 + 38 + 3, 2382 .vtotal = 480 + 38 + 3 + 29, 2383 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 2384 }; 2385 2386 static const struct panel_desc logictechno_lttd800480070_l2rt = { 2387 .modes = &logictechno_lttd800480070_l2rt_mode, 2388 .num_modes = 1, 2389 .bpc = 8, 2390 .size = { 2391 .width = 154, 2392 .height = 86, 2393 }, 2394 .delay = { 2395 .prepare = 45, 2396 .enable = 100, 2397 .disable = 100, 2398 .unprepare = 45 2399 }, 2400 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 2401 .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, 2402 .connector_type = DRM_MODE_CONNECTOR_DPI, 2403 }; 2404 2405 static const struct drm_display_mode logictechno_lttd800480070_l6wh_rt_mode = { 2406 .clock = 33000, 2407 .hdisplay = 800, 2408 .hsync_start = 800 + 154, 2409 .hsync_end = 800 + 154 + 3, 2410 .htotal = 800 + 154 + 3 + 43, 2411 .vdisplay = 480, 2412 .vsync_start = 480 + 47, 2413 .vsync_end = 480 + 47 + 3, 2414 .vtotal = 480 + 47 + 3 + 20, 2415 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 2416 }; 2417 2418 static const struct panel_desc logictechno_lttd800480070_l6wh_rt = { 2419 .modes = &logictechno_lttd800480070_l6wh_rt_mode, 2420 .num_modes = 1, 2421 .bpc = 8, 2422 .size = { 2423 .width = 154, 2424 .height = 86, 2425 }, 2426 .delay = { 2427 .prepare = 45, 2428 .enable = 100, 2429 .disable = 100, 2430 .unprepare = 45 2431 }, 2432 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 2433 .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, 2434 .connector_type = DRM_MODE_CONNECTOR_DPI, 2435 }; 2436 2437 static const struct drm_display_mode logicpd_type_28_mode = { 2438 .clock = 9107, 2439 .hdisplay = 480, 2440 .hsync_start = 480 + 3, 2441 .hsync_end = 480 + 3 + 42, 2442 .htotal = 480 + 3 + 42 + 2, 2443 2444 .vdisplay = 272, 2445 .vsync_start = 272 + 2, 2446 .vsync_end = 272 + 2 + 11, 2447 .vtotal = 272 + 2 + 11 + 3, 2448 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, 2449 }; 2450 2451 static const struct panel_desc logicpd_type_28 = { 2452 .modes = &logicpd_type_28_mode, 2453 .num_modes = 1, 2454 .bpc = 8, 2455 .size = { 2456 .width = 105, 2457 .height = 67, 2458 }, 2459 .delay = { 2460 .prepare = 200, 2461 .enable = 200, 2462 .unprepare = 200, 2463 .disable = 200, 2464 }, 2465 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 2466 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE | 2467 DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE, 2468 .connector_type = DRM_MODE_CONNECTOR_DPI, 2469 }; 2470 2471 static const struct drm_display_mode mitsubishi_aa070mc01_mode = { 2472 .clock = 30400, 2473 .hdisplay = 800, 2474 .hsync_start = 800 + 0, 2475 .hsync_end = 800 + 1, 2476 .htotal = 800 + 0 + 1 + 160, 2477 .vdisplay = 480, 2478 .vsync_start = 480 + 0, 2479 .vsync_end = 480 + 48 + 1, 2480 .vtotal = 480 + 48 + 1 + 0, 2481 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 2482 }; 2483 2484 static const struct panel_desc mitsubishi_aa070mc01 = { 2485 .modes = &mitsubishi_aa070mc01_mode, 2486 .num_modes = 1, 2487 .bpc = 8, 2488 .size = { 2489 .width = 152, 2490 .height = 91, 2491 }, 2492 2493 .delay = { 2494 .enable = 200, 2495 .unprepare = 200, 2496 .disable = 400, 2497 }, 2498 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 2499 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2500 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 2501 }; 2502 2503 static const struct display_timing multi_inno_mi1010ait_1cp_timing = { 2504 .pixelclock = { 68900000, 70000000, 73400000 }, 2505 .hactive = { 1280, 1280, 1280 }, 2506 .hfront_porch = { 30, 60, 71 }, 2507 .hback_porch = { 30, 60, 71 }, 2508 .hsync_len = { 10, 10, 48 }, 2509 .vactive = { 800, 800, 800 }, 2510 .vfront_porch = { 5, 10, 10 }, 2511 .vback_porch = { 5, 10, 10 }, 2512 .vsync_len = { 5, 6, 13 }, 2513 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | 2514 DISPLAY_FLAGS_DE_HIGH, 2515 }; 2516 2517 static const struct panel_desc multi_inno_mi1010ait_1cp = { 2518 .timings = &multi_inno_mi1010ait_1cp_timing, 2519 .num_timings = 1, 2520 .bpc = 8, 2521 .size = { 2522 .width = 217, 2523 .height = 136, 2524 }, 2525 .delay = { 2526 .enable = 50, 2527 .disable = 50, 2528 }, 2529 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 2530 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 2531 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2532 }; 2533 2534 static const struct display_timing nec_nl12880bc20_05_timing = { 2535 .pixelclock = { 67000000, 71000000, 75000000 }, 2536 .hactive = { 1280, 1280, 1280 }, 2537 .hfront_porch = { 2, 30, 30 }, 2538 .hback_porch = { 6, 100, 100 }, 2539 .hsync_len = { 2, 30, 30 }, 2540 .vactive = { 800, 800, 800 }, 2541 .vfront_porch = { 5, 5, 5 }, 2542 .vback_porch = { 11, 11, 11 }, 2543 .vsync_len = { 7, 7, 7 }, 2544 }; 2545 2546 static const struct panel_desc nec_nl12880bc20_05 = { 2547 .timings = &nec_nl12880bc20_05_timing, 2548 .num_timings = 1, 2549 .bpc = 8, 2550 .size = { 2551 .width = 261, 2552 .height = 163, 2553 }, 2554 .delay = { 2555 .enable = 50, 2556 .disable = 50, 2557 }, 2558 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 2559 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2560 }; 2561 2562 static const struct drm_display_mode nec_nl4827hc19_05b_mode = { 2563 .clock = 10870, 2564 .hdisplay = 480, 2565 .hsync_start = 480 + 2, 2566 .hsync_end = 480 + 2 + 41, 2567 .htotal = 480 + 2 + 41 + 2, 2568 .vdisplay = 272, 2569 .vsync_start = 272 + 2, 2570 .vsync_end = 272 + 2 + 4, 2571 .vtotal = 272 + 2 + 4 + 2, 2572 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 2573 }; 2574 2575 static const struct panel_desc nec_nl4827hc19_05b = { 2576 .modes = &nec_nl4827hc19_05b_mode, 2577 .num_modes = 1, 2578 .bpc = 8, 2579 .size = { 2580 .width = 95, 2581 .height = 54, 2582 }, 2583 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 2584 .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, 2585 }; 2586 2587 static const struct drm_display_mode netron_dy_e231732_mode = { 2588 .clock = 66000, 2589 .hdisplay = 1024, 2590 .hsync_start = 1024 + 160, 2591 .hsync_end = 1024 + 160 + 70, 2592 .htotal = 1024 + 160 + 70 + 90, 2593 .vdisplay = 600, 2594 .vsync_start = 600 + 127, 2595 .vsync_end = 600 + 127 + 20, 2596 .vtotal = 600 + 127 + 20 + 3, 2597 }; 2598 2599 static const struct panel_desc netron_dy_e231732 = { 2600 .modes = &netron_dy_e231732_mode, 2601 .num_modes = 1, 2602 .size = { 2603 .width = 154, 2604 .height = 87, 2605 }, 2606 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 2607 }; 2608 2609 static const struct drm_display_mode newhaven_nhd_43_480272ef_atxl_mode = { 2610 .clock = 9000, 2611 .hdisplay = 480, 2612 .hsync_start = 480 + 2, 2613 .hsync_end = 480 + 2 + 41, 2614 .htotal = 480 + 2 + 41 + 2, 2615 .vdisplay = 272, 2616 .vsync_start = 272 + 2, 2617 .vsync_end = 272 + 2 + 10, 2618 .vtotal = 272 + 2 + 10 + 2, 2619 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 2620 }; 2621 2622 static const struct panel_desc newhaven_nhd_43_480272ef_atxl = { 2623 .modes = &newhaven_nhd_43_480272ef_atxl_mode, 2624 .num_modes = 1, 2625 .bpc = 8, 2626 .size = { 2627 .width = 95, 2628 .height = 54, 2629 }, 2630 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 2631 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE | 2632 DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE, 2633 .connector_type = DRM_MODE_CONNECTOR_DPI, 2634 }; 2635 2636 static const struct display_timing nlt_nl192108ac18_02d_timing = { 2637 .pixelclock = { 130000000, 148350000, 163000000 }, 2638 .hactive = { 1920, 1920, 1920 }, 2639 .hfront_porch = { 80, 100, 100 }, 2640 .hback_porch = { 100, 120, 120 }, 2641 .hsync_len = { 50, 60, 60 }, 2642 .vactive = { 1080, 1080, 1080 }, 2643 .vfront_porch = { 12, 30, 30 }, 2644 .vback_porch = { 4, 10, 10 }, 2645 .vsync_len = { 4, 5, 5 }, 2646 }; 2647 2648 static const struct panel_desc nlt_nl192108ac18_02d = { 2649 .timings = &nlt_nl192108ac18_02d_timing, 2650 .num_timings = 1, 2651 .bpc = 8, 2652 .size = { 2653 .width = 344, 2654 .height = 194, 2655 }, 2656 .delay = { 2657 .unprepare = 500, 2658 }, 2659 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 2660 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2661 }; 2662 2663 static const struct drm_display_mode nvd_9128_mode = { 2664 .clock = 29500, 2665 .hdisplay = 800, 2666 .hsync_start = 800 + 130, 2667 .hsync_end = 800 + 130 + 98, 2668 .htotal = 800 + 0 + 130 + 98, 2669 .vdisplay = 480, 2670 .vsync_start = 480 + 10, 2671 .vsync_end = 480 + 10 + 50, 2672 .vtotal = 480 + 0 + 10 + 50, 2673 }; 2674 2675 static const struct panel_desc nvd_9128 = { 2676 .modes = &nvd_9128_mode, 2677 .num_modes = 1, 2678 .bpc = 8, 2679 .size = { 2680 .width = 156, 2681 .height = 88, 2682 }, 2683 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 2684 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2685 }; 2686 2687 static const struct display_timing okaya_rs800480t_7x0gp_timing = { 2688 .pixelclock = { 30000000, 30000000, 40000000 }, 2689 .hactive = { 800, 800, 800 }, 2690 .hfront_porch = { 40, 40, 40 }, 2691 .hback_porch = { 40, 40, 40 }, 2692 .hsync_len = { 1, 48, 48 }, 2693 .vactive = { 480, 480, 480 }, 2694 .vfront_porch = { 13, 13, 13 }, 2695 .vback_porch = { 29, 29, 29 }, 2696 .vsync_len = { 3, 3, 3 }, 2697 .flags = DISPLAY_FLAGS_DE_HIGH, 2698 }; 2699 2700 static const struct panel_desc okaya_rs800480t_7x0gp = { 2701 .timings = &okaya_rs800480t_7x0gp_timing, 2702 .num_timings = 1, 2703 .bpc = 6, 2704 .size = { 2705 .width = 154, 2706 .height = 87, 2707 }, 2708 .delay = { 2709 .prepare = 41, 2710 .enable = 50, 2711 .unprepare = 41, 2712 .disable = 50, 2713 }, 2714 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 2715 }; 2716 2717 static const struct drm_display_mode olimex_lcd_olinuxino_43ts_mode = { 2718 .clock = 9000, 2719 .hdisplay = 480, 2720 .hsync_start = 480 + 5, 2721 .hsync_end = 480 + 5 + 30, 2722 .htotal = 480 + 5 + 30 + 10, 2723 .vdisplay = 272, 2724 .vsync_start = 272 + 8, 2725 .vsync_end = 272 + 8 + 5, 2726 .vtotal = 272 + 8 + 5 + 3, 2727 }; 2728 2729 static const struct panel_desc olimex_lcd_olinuxino_43ts = { 2730 .modes = &olimex_lcd_olinuxino_43ts_mode, 2731 .num_modes = 1, 2732 .size = { 2733 .width = 95, 2734 .height = 54, 2735 }, 2736 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 2737 }; 2738 2739 /* 2740 * 800x480 CVT. The panel appears to be quite accepting, at least as far as 2741 * pixel clocks, but this is the timing that was being used in the Adafruit 2742 * installation instructions. 2743 */ 2744 static const struct drm_display_mode ontat_yx700wv03_mode = { 2745 .clock = 29500, 2746 .hdisplay = 800, 2747 .hsync_start = 824, 2748 .hsync_end = 896, 2749 .htotal = 992, 2750 .vdisplay = 480, 2751 .vsync_start = 483, 2752 .vsync_end = 493, 2753 .vtotal = 500, 2754 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 2755 }; 2756 2757 /* 2758 * Specification at: 2759 * https://www.adafruit.com/images/product-files/2406/c3163.pdf 2760 */ 2761 static const struct panel_desc ontat_yx700wv03 = { 2762 .modes = &ontat_yx700wv03_mode, 2763 .num_modes = 1, 2764 .bpc = 8, 2765 .size = { 2766 .width = 154, 2767 .height = 83, 2768 }, 2769 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 2770 }; 2771 2772 static const struct drm_display_mode ortustech_com37h3m_mode = { 2773 .clock = 22230, 2774 .hdisplay = 480, 2775 .hsync_start = 480 + 40, 2776 .hsync_end = 480 + 40 + 10, 2777 .htotal = 480 + 40 + 10 + 40, 2778 .vdisplay = 640, 2779 .vsync_start = 640 + 4, 2780 .vsync_end = 640 + 4 + 2, 2781 .vtotal = 640 + 4 + 2 + 4, 2782 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 2783 }; 2784 2785 static const struct panel_desc ortustech_com37h3m = { 2786 .modes = &ortustech_com37h3m_mode, 2787 .num_modes = 1, 2788 .bpc = 8, 2789 .size = { 2790 .width = 56, /* 56.16mm */ 2791 .height = 75, /* 74.88mm */ 2792 }, 2793 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 2794 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE | 2795 DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE, 2796 }; 2797 2798 static const struct drm_display_mode ortustech_com43h4m85ulc_mode = { 2799 .clock = 25000, 2800 .hdisplay = 480, 2801 .hsync_start = 480 + 10, 2802 .hsync_end = 480 + 10 + 10, 2803 .htotal = 480 + 10 + 10 + 15, 2804 .vdisplay = 800, 2805 .vsync_start = 800 + 3, 2806 .vsync_end = 800 + 3 + 3, 2807 .vtotal = 800 + 3 + 3 + 3, 2808 }; 2809 2810 static const struct panel_desc ortustech_com43h4m85ulc = { 2811 .modes = &ortustech_com43h4m85ulc_mode, 2812 .num_modes = 1, 2813 .bpc = 6, 2814 .size = { 2815 .width = 56, 2816 .height = 93, 2817 }, 2818 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 2819 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, 2820 .connector_type = DRM_MODE_CONNECTOR_DPI, 2821 }; 2822 2823 static const struct drm_display_mode osddisplays_osd070t1718_19ts_mode = { 2824 .clock = 33000, 2825 .hdisplay = 800, 2826 .hsync_start = 800 + 210, 2827 .hsync_end = 800 + 210 + 30, 2828 .htotal = 800 + 210 + 30 + 16, 2829 .vdisplay = 480, 2830 .vsync_start = 480 + 22, 2831 .vsync_end = 480 + 22 + 13, 2832 .vtotal = 480 + 22 + 13 + 10, 2833 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 2834 }; 2835 2836 static const struct panel_desc osddisplays_osd070t1718_19ts = { 2837 .modes = &osddisplays_osd070t1718_19ts_mode, 2838 .num_modes = 1, 2839 .bpc = 8, 2840 .size = { 2841 .width = 152, 2842 .height = 91, 2843 }, 2844 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 2845 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE | 2846 DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE, 2847 .connector_type = DRM_MODE_CONNECTOR_DPI, 2848 }; 2849 2850 static const struct drm_display_mode pda_91_00156_a0_mode = { 2851 .clock = 33300, 2852 .hdisplay = 800, 2853 .hsync_start = 800 + 1, 2854 .hsync_end = 800 + 1 + 64, 2855 .htotal = 800 + 1 + 64 + 64, 2856 .vdisplay = 480, 2857 .vsync_start = 480 + 1, 2858 .vsync_end = 480 + 1 + 23, 2859 .vtotal = 480 + 1 + 23 + 22, 2860 }; 2861 2862 static const struct panel_desc pda_91_00156_a0 = { 2863 .modes = &pda_91_00156_a0_mode, 2864 .num_modes = 1, 2865 .size = { 2866 .width = 152, 2867 .height = 91, 2868 }, 2869 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 2870 }; 2871 2872 static const struct drm_display_mode powertip_ph800480t013_idf02_mode = { 2873 .clock = 24750, 2874 .hdisplay = 800, 2875 .hsync_start = 800 + 54, 2876 .hsync_end = 800 + 54 + 2, 2877 .htotal = 800 + 54 + 2 + 44, 2878 .vdisplay = 480, 2879 .vsync_start = 480 + 49, 2880 .vsync_end = 480 + 49 + 2, 2881 .vtotal = 480 + 49 + 2 + 22, 2882 }; 2883 2884 static const struct panel_desc powertip_ph800480t013_idf02 = { 2885 .modes = &powertip_ph800480t013_idf02_mode, 2886 .num_modes = 1, 2887 .size = { 2888 .width = 152, 2889 .height = 91, 2890 }, 2891 .bus_flags = DRM_BUS_FLAG_DE_HIGH | 2892 DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE | 2893 DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE, 2894 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 2895 .connector_type = DRM_MODE_CONNECTOR_DPI, 2896 }; 2897 2898 static const struct drm_display_mode qd43003c0_40_mode = { 2899 .clock = 9000, 2900 .hdisplay = 480, 2901 .hsync_start = 480 + 8, 2902 .hsync_end = 480 + 8 + 4, 2903 .htotal = 480 + 8 + 4 + 39, 2904 .vdisplay = 272, 2905 .vsync_start = 272 + 4, 2906 .vsync_end = 272 + 4 + 10, 2907 .vtotal = 272 + 4 + 10 + 2, 2908 }; 2909 2910 static const struct panel_desc qd43003c0_40 = { 2911 .modes = &qd43003c0_40_mode, 2912 .num_modes = 1, 2913 .bpc = 8, 2914 .size = { 2915 .width = 95, 2916 .height = 53, 2917 }, 2918 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 2919 }; 2920 2921 static const struct drm_display_mode qishenglong_gopher2b_lcd_modes[] = { 2922 { /* 60 Hz */ 2923 .clock = 10800, 2924 .hdisplay = 480, 2925 .hsync_start = 480 + 77, 2926 .hsync_end = 480 + 77 + 41, 2927 .htotal = 480 + 77 + 41 + 2, 2928 .vdisplay = 272, 2929 .vsync_start = 272 + 16, 2930 .vsync_end = 272 + 16 + 10, 2931 .vtotal = 272 + 16 + 10 + 2, 2932 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 2933 }, 2934 { /* 50 Hz */ 2935 .clock = 10800, 2936 .hdisplay = 480, 2937 .hsync_start = 480 + 17, 2938 .hsync_end = 480 + 17 + 41, 2939 .htotal = 480 + 17 + 41 + 2, 2940 .vdisplay = 272, 2941 .vsync_start = 272 + 116, 2942 .vsync_end = 272 + 116 + 10, 2943 .vtotal = 272 + 116 + 10 + 2, 2944 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 2945 }, 2946 }; 2947 2948 static const struct panel_desc qishenglong_gopher2b_lcd = { 2949 .modes = qishenglong_gopher2b_lcd_modes, 2950 .num_modes = ARRAY_SIZE(qishenglong_gopher2b_lcd_modes), 2951 .bpc = 8, 2952 .size = { 2953 .width = 95, 2954 .height = 54, 2955 }, 2956 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 2957 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, 2958 .connector_type = DRM_MODE_CONNECTOR_DPI, 2959 }; 2960 2961 static const struct display_timing rocktech_rk070er9427_timing = { 2962 .pixelclock = { 26400000, 33300000, 46800000 }, 2963 .hactive = { 800, 800, 800 }, 2964 .hfront_porch = { 16, 210, 354 }, 2965 .hback_porch = { 46, 46, 46 }, 2966 .hsync_len = { 1, 1, 1 }, 2967 .vactive = { 480, 480, 480 }, 2968 .vfront_porch = { 7, 22, 147 }, 2969 .vback_porch = { 23, 23, 23 }, 2970 .vsync_len = { 1, 1, 1 }, 2971 .flags = DISPLAY_FLAGS_DE_HIGH, 2972 }; 2973 2974 static const struct panel_desc rocktech_rk070er9427 = { 2975 .timings = &rocktech_rk070er9427_timing, 2976 .num_timings = 1, 2977 .bpc = 6, 2978 .size = { 2979 .width = 154, 2980 .height = 86, 2981 }, 2982 .delay = { 2983 .prepare = 41, 2984 .enable = 50, 2985 .unprepare = 41, 2986 .disable = 50, 2987 }, 2988 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 2989 }; 2990 2991 static const struct drm_display_mode rocktech_rk101ii01d_ct_mode = { 2992 .clock = 71100, 2993 .hdisplay = 1280, 2994 .hsync_start = 1280 + 48, 2995 .hsync_end = 1280 + 48 + 32, 2996 .htotal = 1280 + 48 + 32 + 80, 2997 .vdisplay = 800, 2998 .vsync_start = 800 + 2, 2999 .vsync_end = 800 + 2 + 5, 3000 .vtotal = 800 + 2 + 5 + 16, 3001 }; 3002 3003 static const struct panel_desc rocktech_rk101ii01d_ct = { 3004 .modes = &rocktech_rk101ii01d_ct_mode, 3005 .num_modes = 1, 3006 .size = { 3007 .width = 217, 3008 .height = 136, 3009 }, 3010 .delay = { 3011 .prepare = 50, 3012 .disable = 50, 3013 }, 3014 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 3015 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 3016 .connector_type = DRM_MODE_CONNECTOR_LVDS, 3017 }; 3018 3019 static const struct drm_display_mode samsung_ltn101nt05_mode = { 3020 .clock = 54030, 3021 .hdisplay = 1024, 3022 .hsync_start = 1024 + 24, 3023 .hsync_end = 1024 + 24 + 136, 3024 .htotal = 1024 + 24 + 136 + 160, 3025 .vdisplay = 600, 3026 .vsync_start = 600 + 3, 3027 .vsync_end = 600 + 3 + 6, 3028 .vtotal = 600 + 3 + 6 + 61, 3029 }; 3030 3031 static const struct panel_desc samsung_ltn101nt05 = { 3032 .modes = &samsung_ltn101nt05_mode, 3033 .num_modes = 1, 3034 .bpc = 6, 3035 .size = { 3036 .width = 223, 3037 .height = 125, 3038 }, 3039 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, 3040 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 3041 .connector_type = DRM_MODE_CONNECTOR_LVDS, 3042 }; 3043 3044 static const struct display_timing satoz_sat050at40h12r2_timing = { 3045 .pixelclock = {33300000, 33300000, 50000000}, 3046 .hactive = {800, 800, 800}, 3047 .hfront_porch = {16, 210, 354}, 3048 .hback_porch = {46, 46, 46}, 3049 .hsync_len = {1, 1, 40}, 3050 .vactive = {480, 480, 480}, 3051 .vfront_porch = {7, 22, 147}, 3052 .vback_porch = {23, 23, 23}, 3053 .vsync_len = {1, 1, 20}, 3054 }; 3055 3056 static const struct panel_desc satoz_sat050at40h12r2 = { 3057 .timings = &satoz_sat050at40h12r2_timing, 3058 .num_timings = 1, 3059 .bpc = 8, 3060 .size = { 3061 .width = 108, 3062 .height = 65, 3063 }, 3064 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 3065 .connector_type = DRM_MODE_CONNECTOR_LVDS, 3066 }; 3067 3068 static const struct drm_display_mode sharp_lq070y3dg3b_mode = { 3069 .clock = 33260, 3070 .hdisplay = 800, 3071 .hsync_start = 800 + 64, 3072 .hsync_end = 800 + 64 + 128, 3073 .htotal = 800 + 64 + 128 + 64, 3074 .vdisplay = 480, 3075 .vsync_start = 480 + 8, 3076 .vsync_end = 480 + 8 + 2, 3077 .vtotal = 480 + 8 + 2 + 35, 3078 .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE, 3079 }; 3080 3081 static const struct panel_desc sharp_lq070y3dg3b = { 3082 .modes = &sharp_lq070y3dg3b_mode, 3083 .num_modes = 1, 3084 .bpc = 8, 3085 .size = { 3086 .width = 152, /* 152.4mm */ 3087 .height = 91, /* 91.4mm */ 3088 }, 3089 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 3090 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE | 3091 DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE, 3092 }; 3093 3094 static const struct drm_display_mode sharp_lq035q7db03_mode = { 3095 .clock = 5500, 3096 .hdisplay = 240, 3097 .hsync_start = 240 + 16, 3098 .hsync_end = 240 + 16 + 7, 3099 .htotal = 240 + 16 + 7 + 5, 3100 .vdisplay = 320, 3101 .vsync_start = 320 + 9, 3102 .vsync_end = 320 + 9 + 1, 3103 .vtotal = 320 + 9 + 1 + 7, 3104 }; 3105 3106 static const struct panel_desc sharp_lq035q7db03 = { 3107 .modes = &sharp_lq035q7db03_mode, 3108 .num_modes = 1, 3109 .bpc = 6, 3110 .size = { 3111 .width = 54, 3112 .height = 72, 3113 }, 3114 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 3115 }; 3116 3117 static const struct display_timing sharp_lq101k1ly04_timing = { 3118 .pixelclock = { 60000000, 65000000, 80000000 }, 3119 .hactive = { 1280, 1280, 1280 }, 3120 .hfront_porch = { 20, 20, 20 }, 3121 .hback_porch = { 20, 20, 20 }, 3122 .hsync_len = { 10, 10, 10 }, 3123 .vactive = { 800, 800, 800 }, 3124 .vfront_porch = { 4, 4, 4 }, 3125 .vback_porch = { 4, 4, 4 }, 3126 .vsync_len = { 4, 4, 4 }, 3127 .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE, 3128 }; 3129 3130 static const struct panel_desc sharp_lq101k1ly04 = { 3131 .timings = &sharp_lq101k1ly04_timing, 3132 .num_timings = 1, 3133 .bpc = 8, 3134 .size = { 3135 .width = 217, 3136 .height = 136, 3137 }, 3138 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, 3139 .connector_type = DRM_MODE_CONNECTOR_LVDS, 3140 }; 3141 3142 static const struct drm_display_mode sharp_ls020b1dd01d_modes[] = { 3143 { /* 50 Hz */ 3144 .clock = 3000, 3145 .hdisplay = 240, 3146 .hsync_start = 240 + 58, 3147 .hsync_end = 240 + 58 + 1, 3148 .htotal = 240 + 58 + 1 + 1, 3149 .vdisplay = 160, 3150 .vsync_start = 160 + 24, 3151 .vsync_end = 160 + 24 + 10, 3152 .vtotal = 160 + 24 + 10 + 6, 3153 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, 3154 }, 3155 { /* 60 Hz */ 3156 .clock = 3000, 3157 .hdisplay = 240, 3158 .hsync_start = 240 + 8, 3159 .hsync_end = 240 + 8 + 1, 3160 .htotal = 240 + 8 + 1 + 1, 3161 .vdisplay = 160, 3162 .vsync_start = 160 + 24, 3163 .vsync_end = 160 + 24 + 10, 3164 .vtotal = 160 + 24 + 10 + 6, 3165 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, 3166 }, 3167 }; 3168 3169 static const struct panel_desc sharp_ls020b1dd01d = { 3170 .modes = sharp_ls020b1dd01d_modes, 3171 .num_modes = ARRAY_SIZE(sharp_ls020b1dd01d_modes), 3172 .bpc = 6, 3173 .size = { 3174 .width = 42, 3175 .height = 28, 3176 }, 3177 .bus_format = MEDIA_BUS_FMT_RGB565_1X16, 3178 .bus_flags = DRM_BUS_FLAG_DE_HIGH 3179 | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE 3180 | DRM_BUS_FLAG_SHARP_SIGNALS, 3181 }; 3182 3183 static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = { 3184 .clock = 33300, 3185 .hdisplay = 800, 3186 .hsync_start = 800 + 1, 3187 .hsync_end = 800 + 1 + 64, 3188 .htotal = 800 + 1 + 64 + 64, 3189 .vdisplay = 480, 3190 .vsync_start = 480 + 1, 3191 .vsync_end = 480 + 1 + 23, 3192 .vtotal = 480 + 1 + 23 + 22, 3193 }; 3194 3195 static const struct panel_desc shelly_sca07010_bfn_lnn = { 3196 .modes = &shelly_sca07010_bfn_lnn_mode, 3197 .num_modes = 1, 3198 .size = { 3199 .width = 152, 3200 .height = 91, 3201 }, 3202 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 3203 }; 3204 3205 static const struct drm_display_mode starry_kr070pe2t_mode = { 3206 .clock = 33000, 3207 .hdisplay = 800, 3208 .hsync_start = 800 + 209, 3209 .hsync_end = 800 + 209 + 1, 3210 .htotal = 800 + 209 + 1 + 45, 3211 .vdisplay = 480, 3212 .vsync_start = 480 + 22, 3213 .vsync_end = 480 + 22 + 1, 3214 .vtotal = 480 + 22 + 1 + 22, 3215 }; 3216 3217 static const struct panel_desc starry_kr070pe2t = { 3218 .modes = &starry_kr070pe2t_mode, 3219 .num_modes = 1, 3220 .bpc = 8, 3221 .size = { 3222 .width = 152, 3223 .height = 86, 3224 }, 3225 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 3226 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, 3227 .connector_type = DRM_MODE_CONNECTOR_DPI, 3228 }; 3229 3230 static const struct drm_display_mode tfc_s9700rtwv43tr_01b_mode = { 3231 .clock = 30000, 3232 .hdisplay = 800, 3233 .hsync_start = 800 + 39, 3234 .hsync_end = 800 + 39 + 47, 3235 .htotal = 800 + 39 + 47 + 39, 3236 .vdisplay = 480, 3237 .vsync_start = 480 + 13, 3238 .vsync_end = 480 + 13 + 2, 3239 .vtotal = 480 + 13 + 2 + 29, 3240 }; 3241 3242 static const struct panel_desc tfc_s9700rtwv43tr_01b = { 3243 .modes = &tfc_s9700rtwv43tr_01b_mode, 3244 .num_modes = 1, 3245 .bpc = 8, 3246 .size = { 3247 .width = 155, 3248 .height = 90, 3249 }, 3250 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 3251 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, 3252 }; 3253 3254 static const struct display_timing tianma_tm070jdhg30_timing = { 3255 .pixelclock = { 62600000, 68200000, 78100000 }, 3256 .hactive = { 1280, 1280, 1280 }, 3257 .hfront_porch = { 15, 64, 159 }, 3258 .hback_porch = { 5, 5, 5 }, 3259 .hsync_len = { 1, 1, 256 }, 3260 .vactive = { 800, 800, 800 }, 3261 .vfront_porch = { 3, 40, 99 }, 3262 .vback_porch = { 2, 2, 2 }, 3263 .vsync_len = { 1, 1, 128 }, 3264 .flags = DISPLAY_FLAGS_DE_HIGH, 3265 }; 3266 3267 static const struct panel_desc tianma_tm070jdhg30 = { 3268 .timings = &tianma_tm070jdhg30_timing, 3269 .num_timings = 1, 3270 .bpc = 8, 3271 .size = { 3272 .width = 151, 3273 .height = 95, 3274 }, 3275 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 3276 .connector_type = DRM_MODE_CONNECTOR_LVDS, 3277 }; 3278 3279 static const struct panel_desc tianma_tm070jvhg33 = { 3280 .timings = &tianma_tm070jdhg30_timing, 3281 .num_timings = 1, 3282 .bpc = 8, 3283 .size = { 3284 .width = 150, 3285 .height = 94, 3286 }, 3287 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 3288 .connector_type = DRM_MODE_CONNECTOR_LVDS, 3289 }; 3290 3291 static const struct display_timing tianma_tm070rvhg71_timing = { 3292 .pixelclock = { 27700000, 29200000, 39600000 }, 3293 .hactive = { 800, 800, 800 }, 3294 .hfront_porch = { 12, 40, 212 }, 3295 .hback_porch = { 88, 88, 88 }, 3296 .hsync_len = { 1, 1, 40 }, 3297 .vactive = { 480, 480, 480 }, 3298 .vfront_porch = { 1, 13, 88 }, 3299 .vback_porch = { 32, 32, 32 }, 3300 .vsync_len = { 1, 1, 3 }, 3301 .flags = DISPLAY_FLAGS_DE_HIGH, 3302 }; 3303 3304 static const struct panel_desc tianma_tm070rvhg71 = { 3305 .timings = &tianma_tm070rvhg71_timing, 3306 .num_timings = 1, 3307 .bpc = 8, 3308 .size = { 3309 .width = 154, 3310 .height = 86, 3311 }, 3312 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 3313 .connector_type = DRM_MODE_CONNECTOR_LVDS, 3314 }; 3315 3316 static const struct drm_display_mode ti_nspire_cx_lcd_mode[] = { 3317 { 3318 .clock = 10000, 3319 .hdisplay = 320, 3320 .hsync_start = 320 + 50, 3321 .hsync_end = 320 + 50 + 6, 3322 .htotal = 320 + 50 + 6 + 38, 3323 .vdisplay = 240, 3324 .vsync_start = 240 + 3, 3325 .vsync_end = 240 + 3 + 1, 3326 .vtotal = 240 + 3 + 1 + 17, 3327 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 3328 }, 3329 }; 3330 3331 static const struct panel_desc ti_nspire_cx_lcd_panel = { 3332 .modes = ti_nspire_cx_lcd_mode, 3333 .num_modes = 1, 3334 .bpc = 8, 3335 .size = { 3336 .width = 65, 3337 .height = 49, 3338 }, 3339 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 3340 .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, 3341 }; 3342 3343 static const struct drm_display_mode ti_nspire_classic_lcd_mode[] = { 3344 { 3345 .clock = 10000, 3346 .hdisplay = 320, 3347 .hsync_start = 320 + 6, 3348 .hsync_end = 320 + 6 + 6, 3349 .htotal = 320 + 6 + 6 + 6, 3350 .vdisplay = 240, 3351 .vsync_start = 240 + 0, 3352 .vsync_end = 240 + 0 + 1, 3353 .vtotal = 240 + 0 + 1 + 0, 3354 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, 3355 }, 3356 }; 3357 3358 static const struct panel_desc ti_nspire_classic_lcd_panel = { 3359 .modes = ti_nspire_classic_lcd_mode, 3360 .num_modes = 1, 3361 /* The grayscale panel has 8 bit for the color .. Y (black) */ 3362 .bpc = 8, 3363 .size = { 3364 .width = 71, 3365 .height = 53, 3366 }, 3367 /* This is the grayscale bus format */ 3368 .bus_format = MEDIA_BUS_FMT_Y8_1X8, 3369 .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, 3370 }; 3371 3372 static const struct drm_display_mode toshiba_lt089ac29000_mode = { 3373 .clock = 79500, 3374 .hdisplay = 1280, 3375 .hsync_start = 1280 + 192, 3376 .hsync_end = 1280 + 192 + 128, 3377 .htotal = 1280 + 192 + 128 + 64, 3378 .vdisplay = 768, 3379 .vsync_start = 768 + 20, 3380 .vsync_end = 768 + 20 + 7, 3381 .vtotal = 768 + 20 + 7 + 3, 3382 }; 3383 3384 static const struct panel_desc toshiba_lt089ac29000 = { 3385 .modes = &toshiba_lt089ac29000_mode, 3386 .num_modes = 1, 3387 .size = { 3388 .width = 194, 3389 .height = 116, 3390 }, 3391 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, 3392 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 3393 .connector_type = DRM_MODE_CONNECTOR_LVDS, 3394 }; 3395 3396 static const struct drm_display_mode tpk_f07a_0102_mode = { 3397 .clock = 33260, 3398 .hdisplay = 800, 3399 .hsync_start = 800 + 40, 3400 .hsync_end = 800 + 40 + 128, 3401 .htotal = 800 + 40 + 128 + 88, 3402 .vdisplay = 480, 3403 .vsync_start = 480 + 10, 3404 .vsync_end = 480 + 10 + 2, 3405 .vtotal = 480 + 10 + 2 + 33, 3406 }; 3407 3408 static const struct panel_desc tpk_f07a_0102 = { 3409 .modes = &tpk_f07a_0102_mode, 3410 .num_modes = 1, 3411 .size = { 3412 .width = 152, 3413 .height = 91, 3414 }, 3415 .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, 3416 }; 3417 3418 static const struct drm_display_mode tpk_f10a_0102_mode = { 3419 .clock = 45000, 3420 .hdisplay = 1024, 3421 .hsync_start = 1024 + 176, 3422 .hsync_end = 1024 + 176 + 5, 3423 .htotal = 1024 + 176 + 5 + 88, 3424 .vdisplay = 600, 3425 .vsync_start = 600 + 20, 3426 .vsync_end = 600 + 20 + 5, 3427 .vtotal = 600 + 20 + 5 + 25, 3428 }; 3429 3430 static const struct panel_desc tpk_f10a_0102 = { 3431 .modes = &tpk_f10a_0102_mode, 3432 .num_modes = 1, 3433 .size = { 3434 .width = 223, 3435 .height = 125, 3436 }, 3437 }; 3438 3439 static const struct display_timing urt_umsh_8596md_timing = { 3440 .pixelclock = { 33260000, 33260000, 33260000 }, 3441 .hactive = { 800, 800, 800 }, 3442 .hfront_porch = { 41, 41, 41 }, 3443 .hback_porch = { 216 - 128, 216 - 128, 216 - 128 }, 3444 .hsync_len = { 71, 128, 128 }, 3445 .vactive = { 480, 480, 480 }, 3446 .vfront_porch = { 10, 10, 10 }, 3447 .vback_porch = { 35 - 2, 35 - 2, 35 - 2 }, 3448 .vsync_len = { 2, 2, 2 }, 3449 .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE | 3450 DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW, 3451 }; 3452 3453 static const struct panel_desc urt_umsh_8596md_lvds = { 3454 .timings = &urt_umsh_8596md_timing, 3455 .num_timings = 1, 3456 .bpc = 6, 3457 .size = { 3458 .width = 152, 3459 .height = 91, 3460 }, 3461 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, 3462 .connector_type = DRM_MODE_CONNECTOR_LVDS, 3463 }; 3464 3465 static const struct panel_desc urt_umsh_8596md_parallel = { 3466 .timings = &urt_umsh_8596md_timing, 3467 .num_timings = 1, 3468 .bpc = 6, 3469 .size = { 3470 .width = 152, 3471 .height = 91, 3472 }, 3473 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 3474 }; 3475 3476 static const struct drm_display_mode vl050_8048nt_c01_mode = { 3477 .clock = 33333, 3478 .hdisplay = 800, 3479 .hsync_start = 800 + 210, 3480 .hsync_end = 800 + 210 + 20, 3481 .htotal = 800 + 210 + 20 + 46, 3482 .vdisplay = 480, 3483 .vsync_start = 480 + 22, 3484 .vsync_end = 480 + 22 + 10, 3485 .vtotal = 480 + 22 + 10 + 23, 3486 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 3487 }; 3488 3489 static const struct panel_desc vl050_8048nt_c01 = { 3490 .modes = &vl050_8048nt_c01_mode, 3491 .num_modes = 1, 3492 .bpc = 8, 3493 .size = { 3494 .width = 120, 3495 .height = 76, 3496 }, 3497 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 3498 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, 3499 }; 3500 3501 static const struct drm_display_mode winstar_wf35ltiacd_mode = { 3502 .clock = 6410, 3503 .hdisplay = 320, 3504 .hsync_start = 320 + 20, 3505 .hsync_end = 320 + 20 + 30, 3506 .htotal = 320 + 20 + 30 + 38, 3507 .vdisplay = 240, 3508 .vsync_start = 240 + 4, 3509 .vsync_end = 240 + 4 + 3, 3510 .vtotal = 240 + 4 + 3 + 15, 3511 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 3512 }; 3513 3514 static const struct panel_desc winstar_wf35ltiacd = { 3515 .modes = &winstar_wf35ltiacd_mode, 3516 .num_modes = 1, 3517 .bpc = 8, 3518 .size = { 3519 .width = 70, 3520 .height = 53, 3521 }, 3522 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 3523 }; 3524 3525 static const struct drm_display_mode yes_optoelectronics_ytc700tlag_05_201c_mode = { 3526 .clock = 51200, 3527 .hdisplay = 1024, 3528 .hsync_start = 1024 + 100, 3529 .hsync_end = 1024 + 100 + 100, 3530 .htotal = 1024 + 100 + 100 + 120, 3531 .vdisplay = 600, 3532 .vsync_start = 600 + 10, 3533 .vsync_end = 600 + 10 + 10, 3534 .vtotal = 600 + 10 + 10 + 15, 3535 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, 3536 }; 3537 3538 static const struct panel_desc yes_optoelectronics_ytc700tlag_05_201c = { 3539 .modes = &yes_optoelectronics_ytc700tlag_05_201c_mode, 3540 .num_modes = 1, 3541 .bpc = 8, 3542 .size = { 3543 .width = 154, 3544 .height = 90, 3545 }, 3546 .bus_flags = DRM_BUS_FLAG_DE_HIGH, 3547 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, 3548 .connector_type = DRM_MODE_CONNECTOR_LVDS, 3549 }; 3550 3551 static const struct drm_display_mode arm_rtsm_mode[] = { 3552 { 3553 .clock = 65000, 3554 .hdisplay = 1024, 3555 .hsync_start = 1024 + 24, 3556 .hsync_end = 1024 + 24 + 136, 3557 .htotal = 1024 + 24 + 136 + 160, 3558 .vdisplay = 768, 3559 .vsync_start = 768 + 3, 3560 .vsync_end = 768 + 3 + 6, 3561 .vtotal = 768 + 3 + 6 + 29, 3562 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 3563 }, 3564 }; 3565 3566 static const struct panel_desc arm_rtsm = { 3567 .modes = arm_rtsm_mode, 3568 .num_modes = 1, 3569 .bpc = 8, 3570 .size = { 3571 .width = 400, 3572 .height = 300, 3573 }, 3574 .bus_format = MEDIA_BUS_FMT_RGB888_1X24, 3575 }; 3576 3577 static const struct of_device_id platform_of_match[] = { 3578 { 3579 .compatible = "ampire,am-1280800n3tzqw-t00h", 3580 .data = &ire_am_1280800n3tzqw_t00h, 3581 }, { 3582 .compatible = "ampire,am-480272h3tmqw-t01h", 3583 .data = &ire_am_480272h3tmqw_t01h, 3584 }, { 3585 .compatible = "ampire,am800480r3tmqwa1h", 3586 .data = &ire_am800480r3tmqwa1h, 3587 }, { 3588 .compatible = "arm,rtsm-display", 3589 .data = &arm_rtsm, 3590 }, { 3591 .compatible = "armadeus,st0700-adapt", 3592 .data = &armadeus_st0700_adapt, 3593 }, { 3594 .compatible = "auo,b101aw03", 3595 .data = &auo_b101aw03, 3596 }, { 3597 .compatible = "auo,b101xtn01", 3598 .data = &auo_b101xtn01, 3599 }, { 3600 .compatible = "auo,g070vvn01", 3601 .data = &auo_g070vvn01, 3602 }, { 3603 .compatible = "auo,g101evn010", 3604 .data = &auo_g101evn010, 3605 }, { 3606 .compatible = "auo,g104sn02", 3607 .data = &auo_g104sn02, 3608 }, { 3609 .compatible = "auo,g121ean01", 3610 .data = &auo_g121ean01, 3611 }, { 3612 .compatible = "auo,g133han01", 3613 .data = &auo_g133han01, 3614 }, { 3615 .compatible = "auo,g156xtn01", 3616 .data = &auo_g156xtn01, 3617 }, { 3618 .compatible = "auo,g185han01", 3619 .data = &auo_g185han01, 3620 }, { 3621 .compatible = "auo,g190ean01", 3622 .data = &auo_g190ean01, 3623 }, { 3624 .compatible = "auo,p320hvn03", 3625 .data = &auo_p320hvn03, 3626 }, { 3627 .compatible = "auo,t215hvn01", 3628 .data = &auo_t215hvn01, 3629 }, { 3630 .compatible = "avic,tm070ddh03", 3631 .data = &avic_tm070ddh03, 3632 }, { 3633 .compatible = "bananapi,s070wv20-ct16", 3634 .data = &bananapi_s070wv20_ct16, 3635 }, { 3636 .compatible = "boe,hv070wsa-100", 3637 .data = &boe_hv070wsa 3638 }, { 3639 .compatible = "cdtech,s043wq26h-ct7", 3640 .data = &cdtech_s043wq26h_ct7, 3641 }, { 3642 .compatible = "cdtech,s070pws19hp-fc21", 3643 .data = &cdtech_s070pws19hp_fc21, 3644 }, { 3645 .compatible = "cdtech,s070swv29hg-dc44", 3646 .data = &cdtech_s070swv29hg_dc44, 3647 }, { 3648 .compatible = "cdtech,s070wv95-ct16", 3649 .data = &cdtech_s070wv95_ct16, 3650 }, { 3651 .compatible = "chefree,ch101olhlwh-002", 3652 .data = &chefree_ch101olhlwh_002, 3653 }, { 3654 .compatible = "chunghwa,claa070wp03xg", 3655 .data = &chunghwa_claa070wp03xg, 3656 }, { 3657 .compatible = "chunghwa,claa101wa01a", 3658 .data = &chunghwa_claa101wa01a 3659 }, { 3660 .compatible = "chunghwa,claa101wb01", 3661 .data = &chunghwa_claa101wb01 3662 }, { 3663 .compatible = "dataimage,scf0700c48ggu18", 3664 .data = &dataimage_scf0700c48ggu18, 3665 }, { 3666 .compatible = "dlc,dlc0700yzg-1", 3667 .data = &dlc_dlc0700yzg_1, 3668 }, { 3669 .compatible = "dlc,dlc1010gig", 3670 .data = &dlc_dlc1010gig, 3671 }, { 3672 .compatible = "edt,et035012dm6", 3673 .data = &edt_et035012dm6, 3674 }, { 3675 .compatible = "edt,etm0350g0dh6", 3676 .data = &edt_etm0350g0dh6, 3677 }, { 3678 .compatible = "edt,etm043080dh6gp", 3679 .data = &edt_etm043080dh6gp, 3680 }, { 3681 .compatible = "edt,etm0430g0dh6", 3682 .data = &edt_etm0430g0dh6, 3683 }, { 3684 .compatible = "edt,et057090dhu", 3685 .data = &edt_et057090dhu, 3686 }, { 3687 .compatible = "edt,et070080dh6", 3688 .data = &edt_etm0700g0dh6, 3689 }, { 3690 .compatible = "edt,etm0700g0dh6", 3691 .data = &edt_etm0700g0dh6, 3692 }, { 3693 .compatible = "edt,etm0700g0bdh6", 3694 .data = &edt_etm0700g0bdh6, 3695 }, { 3696 .compatible = "edt,etm0700g0edh6", 3697 .data = &edt_etm0700g0bdh6, 3698 }, { 3699 .compatible = "edt,etmv570g2dhu", 3700 .data = &edt_etmv570g2dhu, 3701 }, { 3702 .compatible = "eink,vb3300-kca", 3703 .data = &eink_vb3300_kca, 3704 }, { 3705 .compatible = "evervision,vgg804821", 3706 .data = &evervision_vgg804821, 3707 }, { 3708 .compatible = "foxlink,fl500wvr00-a0t", 3709 .data = &foxlink_fl500wvr00_a0t, 3710 }, { 3711 .compatible = "frida,frd350h54004", 3712 .data = &frida_frd350h54004, 3713 }, { 3714 .compatible = "friendlyarm,hd702e", 3715 .data = &friendlyarm_hd702e, 3716 }, { 3717 .compatible = "giantplus,gpg482739qs5", 3718 .data = &giantplus_gpg482739qs5 3719 }, { 3720 .compatible = "giantplus,gpm940b0", 3721 .data = &giantplus_gpm940b0, 3722 }, { 3723 .compatible = "hannstar,hsd070pww1", 3724 .data = &hannstar_hsd070pww1, 3725 }, { 3726 .compatible = "hannstar,hsd100pxn1", 3727 .data = &hannstar_hsd100pxn1, 3728 }, { 3729 .compatible = "hit,tx23d38vm0caa", 3730 .data = &hitachi_tx23d38vm0caa 3731 }, { 3732 .compatible = "innolux,at043tn24", 3733 .data = &innolux_at043tn24, 3734 }, { 3735 .compatible = "innolux,at070tn92", 3736 .data = &innolux_at070tn92, 3737 }, { 3738 .compatible = "innolux,g070y2-l01", 3739 .data = &innolux_g070y2_l01, 3740 }, { 3741 .compatible = "innolux,g101ice-l01", 3742 .data = &innolux_g101ice_l01 3743 }, { 3744 .compatible = "innolux,g121i1-l01", 3745 .data = &innolux_g121i1_l01 3746 }, { 3747 .compatible = "innolux,g121x1-l03", 3748 .data = &innolux_g121x1_l03, 3749 }, { 3750 .compatible = "innolux,n156bge-l21", 3751 .data = &innolux_n156bge_l21, 3752 }, { 3753 .compatible = "innolux,zj070na-01p", 3754 .data = &innolux_zj070na_01p, 3755 }, { 3756 .compatible = "koe,tx14d24vm1bpa", 3757 .data = &koe_tx14d24vm1bpa, 3758 }, { 3759 .compatible = "koe,tx26d202vm0bwa", 3760 .data = &koe_tx26d202vm0bwa, 3761 }, { 3762 .compatible = "koe,tx31d200vm0baa", 3763 .data = &koe_tx31d200vm0baa, 3764 }, { 3765 .compatible = "kyo,tcg121xglp", 3766 .data = &kyo_tcg121xglp, 3767 }, { 3768 .compatible = "lemaker,bl035-rgb-002", 3769 .data = &lemaker_bl035_rgb_002, 3770 }, { 3771 .compatible = "lg,lb070wv8", 3772 .data = &lg_lb070wv8, 3773 }, { 3774 .compatible = "logicpd,type28", 3775 .data = &logicpd_type_28, 3776 }, { 3777 .compatible = "logictechno,lt161010-2nhc", 3778 .data = &logictechno_lt161010_2nh, 3779 }, { 3780 .compatible = "logictechno,lt161010-2nhr", 3781 .data = &logictechno_lt161010_2nh, 3782 }, { 3783 .compatible = "logictechno,lt170410-2whc", 3784 .data = &logictechno_lt170410_2whc, 3785 }, { 3786 .compatible = "logictechno,lttd800480070-l2rt", 3787 .data = &logictechno_lttd800480070_l2rt, 3788 }, { 3789 .compatible = "logictechno,lttd800480070-l6wh-rt", 3790 .data = &logictechno_lttd800480070_l6wh_rt, 3791 }, { 3792 .compatible = "mitsubishi,aa070mc01-ca1", 3793 .data = &mitsubishi_aa070mc01, 3794 }, { 3795 .compatible = "multi-inno,mi1010ait-1cp", 3796 .data = &multi_inno_mi1010ait_1cp, 3797 }, { 3798 .compatible = "nec,nl12880bc20-05", 3799 .data = &nec_nl12880bc20_05, 3800 }, { 3801 .compatible = "nec,nl4827hc19-05b", 3802 .data = &nec_nl4827hc19_05b, 3803 }, { 3804 .compatible = "netron-dy,e231732", 3805 .data = &netron_dy_e231732, 3806 }, { 3807 .compatible = "newhaven,nhd-4.3-480272ef-atxl", 3808 .data = &newhaven_nhd_43_480272ef_atxl, 3809 }, { 3810 .compatible = "nlt,nl192108ac18-02d", 3811 .data = &nlt_nl192108ac18_02d, 3812 }, { 3813 .compatible = "nvd,9128", 3814 .data = &nvd_9128, 3815 }, { 3816 .compatible = "okaya,rs800480t-7x0gp", 3817 .data = &okaya_rs800480t_7x0gp, 3818 }, { 3819 .compatible = "olimex,lcd-olinuxino-43-ts", 3820 .data = &olimex_lcd_olinuxino_43ts, 3821 }, { 3822 .compatible = "ontat,yx700wv03", 3823 .data = &ontat_yx700wv03, 3824 }, { 3825 .compatible = "ortustech,com37h3m05dtc", 3826 .data = &ortustech_com37h3m, 3827 }, { 3828 .compatible = "ortustech,com37h3m99dtc", 3829 .data = &ortustech_com37h3m, 3830 }, { 3831 .compatible = "ortustech,com43h4m85ulc", 3832 .data = &ortustech_com43h4m85ulc, 3833 }, { 3834 .compatible = "osddisplays,osd070t1718-19ts", 3835 .data = &osddisplays_osd070t1718_19ts, 3836 }, { 3837 .compatible = "pda,91-00156-a0", 3838 .data = &pda_91_00156_a0, 3839 }, { 3840 .compatible = "powertip,ph800480t013-idf02", 3841 .data = &powertip_ph800480t013_idf02, 3842 }, { 3843 .compatible = "qiaodian,qd43003c0-40", 3844 .data = &qd43003c0_40, 3845 }, { 3846 .compatible = "qishenglong,gopher2b-lcd", 3847 .data = &qishenglong_gopher2b_lcd, 3848 }, { 3849 .compatible = "rocktech,rk070er9427", 3850 .data = &rocktech_rk070er9427, 3851 }, { 3852 .compatible = "rocktech,rk101ii01d-ct", 3853 .data = &rocktech_rk101ii01d_ct, 3854 }, { 3855 .compatible = "samsung,ltn101nt05", 3856 .data = &samsung_ltn101nt05, 3857 }, { 3858 .compatible = "satoz,sat050at40h12r2", 3859 .data = &satoz_sat050at40h12r2, 3860 }, { 3861 .compatible = "sharp,lq035q7db03", 3862 .data = &sharp_lq035q7db03, 3863 }, { 3864 .compatible = "sharp,lq070y3dg3b", 3865 .data = &sharp_lq070y3dg3b, 3866 }, { 3867 .compatible = "sharp,lq101k1ly04", 3868 .data = &sharp_lq101k1ly04, 3869 }, { 3870 .compatible = "sharp,ls020b1dd01d", 3871 .data = &sharp_ls020b1dd01d, 3872 }, { 3873 .compatible = "shelly,sca07010-bfn-lnn", 3874 .data = &shelly_sca07010_bfn_lnn, 3875 }, { 3876 .compatible = "starry,kr070pe2t", 3877 .data = &starry_kr070pe2t, 3878 }, { 3879 .compatible = "tfc,s9700rtwv43tr-01b", 3880 .data = &tfc_s9700rtwv43tr_01b, 3881 }, { 3882 .compatible = "tianma,tm070jdhg30", 3883 .data = &tianma_tm070jdhg30, 3884 }, { 3885 .compatible = "tianma,tm070jvhg33", 3886 .data = &tianma_tm070jvhg33, 3887 }, { 3888 .compatible = "tianma,tm070rvhg71", 3889 .data = &tianma_tm070rvhg71, 3890 }, { 3891 .compatible = "ti,nspire-cx-lcd-panel", 3892 .data = &ti_nspire_cx_lcd_panel, 3893 }, { 3894 .compatible = "ti,nspire-classic-lcd-panel", 3895 .data = &ti_nspire_classic_lcd_panel, 3896 }, { 3897 .compatible = "toshiba,lt089ac29000", 3898 .data = &toshiba_lt089ac29000, 3899 }, { 3900 .compatible = "tpk,f07a-0102", 3901 .data = &tpk_f07a_0102, 3902 }, { 3903 .compatible = "tpk,f10a-0102", 3904 .data = &tpk_f10a_0102, 3905 }, { 3906 .compatible = "urt,umsh-8596md-t", 3907 .data = &urt_umsh_8596md_parallel, 3908 }, { 3909 .compatible = "urt,umsh-8596md-1t", 3910 .data = &urt_umsh_8596md_parallel, 3911 }, { 3912 .compatible = "urt,umsh-8596md-7t", 3913 .data = &urt_umsh_8596md_parallel, 3914 }, { 3915 .compatible = "urt,umsh-8596md-11t", 3916 .data = &urt_umsh_8596md_lvds, 3917 }, { 3918 .compatible = "urt,umsh-8596md-19t", 3919 .data = &urt_umsh_8596md_lvds, 3920 }, { 3921 .compatible = "urt,umsh-8596md-20t", 3922 .data = &urt_umsh_8596md_parallel, 3923 }, { 3924 .compatible = "vxt,vl050-8048nt-c01", 3925 .data = &vl050_8048nt_c01, 3926 }, { 3927 .compatible = "winstar,wf35ltiacd", 3928 .data = &winstar_wf35ltiacd, 3929 }, { 3930 .compatible = "yes-optoelectronics,ytc700tlag-05-201c", 3931 .data = &yes_optoelectronics_ytc700tlag_05_201c, 3932 }, { 3933 /* Must be the last entry */ 3934 .compatible = "panel-dpi", 3935 .data = &panel_dpi, 3936 }, { 3937 /* sentinel */ 3938 } 3939 }; 3940 MODULE_DEVICE_TABLE(of, platform_of_match); 3941 3942 static int panel_simple_platform_probe(struct platform_device *pdev) 3943 { 3944 const struct of_device_id *id; 3945 3946 id = of_match_node(platform_of_match, pdev->dev.of_node); 3947 if (!id) 3948 return -ENODEV; 3949 3950 return panel_simple_probe(&pdev->dev, id->data); 3951 } 3952 3953 static int panel_simple_platform_remove(struct platform_device *pdev) 3954 { 3955 return panel_simple_remove(&pdev->dev); 3956 } 3957 3958 static void panel_simple_platform_shutdown(struct platform_device *pdev) 3959 { 3960 panel_simple_shutdown(&pdev->dev); 3961 } 3962 3963 static const struct dev_pm_ops panel_simple_pm_ops = { 3964 SET_RUNTIME_PM_OPS(panel_simple_suspend, panel_simple_resume, NULL) 3965 SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 3966 pm_runtime_force_resume) 3967 }; 3968 3969 static struct platform_driver panel_simple_platform_driver = { 3970 .driver = { 3971 .name = "panel-simple", 3972 .of_match_table = platform_of_match, 3973 .pm = &panel_simple_pm_ops, 3974 }, 3975 .probe = panel_simple_platform_probe, 3976 .remove = panel_simple_platform_remove, 3977 .shutdown = panel_simple_platform_shutdown, 3978 }; 3979 3980 struct panel_desc_dsi { 3981 struct panel_desc desc; 3982 3983 unsigned long flags; 3984 enum mipi_dsi_pixel_format format; 3985 unsigned int lanes; 3986 }; 3987 3988 static const struct drm_display_mode auo_b080uan01_mode = { 3989 .clock = 154500, 3990 .hdisplay = 1200, 3991 .hsync_start = 1200 + 62, 3992 .hsync_end = 1200 + 62 + 4, 3993 .htotal = 1200 + 62 + 4 + 62, 3994 .vdisplay = 1920, 3995 .vsync_start = 1920 + 9, 3996 .vsync_end = 1920 + 9 + 2, 3997 .vtotal = 1920 + 9 + 2 + 8, 3998 }; 3999 4000 static const struct panel_desc_dsi auo_b080uan01 = { 4001 .desc = { 4002 .modes = &auo_b080uan01_mode, 4003 .num_modes = 1, 4004 .bpc = 8, 4005 .size = { 4006 .width = 108, 4007 .height = 272, 4008 }, 4009 .connector_type = DRM_MODE_CONNECTOR_DSI, 4010 }, 4011 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS, 4012 .format = MIPI_DSI_FMT_RGB888, 4013 .lanes = 4, 4014 }; 4015 4016 static const struct drm_display_mode boe_tv080wum_nl0_mode = { 4017 .clock = 160000, 4018 .hdisplay = 1200, 4019 .hsync_start = 1200 + 120, 4020 .hsync_end = 1200 + 120 + 20, 4021 .htotal = 1200 + 120 + 20 + 21, 4022 .vdisplay = 1920, 4023 .vsync_start = 1920 + 21, 4024 .vsync_end = 1920 + 21 + 3, 4025 .vtotal = 1920 + 21 + 3 + 18, 4026 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, 4027 }; 4028 4029 static const struct panel_desc_dsi boe_tv080wum_nl0 = { 4030 .desc = { 4031 .modes = &boe_tv080wum_nl0_mode, 4032 .num_modes = 1, 4033 .size = { 4034 .width = 107, 4035 .height = 172, 4036 }, 4037 .connector_type = DRM_MODE_CONNECTOR_DSI, 4038 }, 4039 .flags = MIPI_DSI_MODE_VIDEO | 4040 MIPI_DSI_MODE_VIDEO_BURST | 4041 MIPI_DSI_MODE_VIDEO_SYNC_PULSE, 4042 .format = MIPI_DSI_FMT_RGB888, 4043 .lanes = 4, 4044 }; 4045 4046 static const struct drm_display_mode lg_ld070wx3_sl01_mode = { 4047 .clock = 71000, 4048 .hdisplay = 800, 4049 .hsync_start = 800 + 32, 4050 .hsync_end = 800 + 32 + 1, 4051 .htotal = 800 + 32 + 1 + 57, 4052 .vdisplay = 1280, 4053 .vsync_start = 1280 + 28, 4054 .vsync_end = 1280 + 28 + 1, 4055 .vtotal = 1280 + 28 + 1 + 14, 4056 }; 4057 4058 static const struct panel_desc_dsi lg_ld070wx3_sl01 = { 4059 .desc = { 4060 .modes = &lg_ld070wx3_sl01_mode, 4061 .num_modes = 1, 4062 .bpc = 8, 4063 .size = { 4064 .width = 94, 4065 .height = 151, 4066 }, 4067 .connector_type = DRM_MODE_CONNECTOR_DSI, 4068 }, 4069 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS, 4070 .format = MIPI_DSI_FMT_RGB888, 4071 .lanes = 4, 4072 }; 4073 4074 static const struct drm_display_mode lg_lh500wx1_sd03_mode = { 4075 .clock = 67000, 4076 .hdisplay = 720, 4077 .hsync_start = 720 + 12, 4078 .hsync_end = 720 + 12 + 4, 4079 .htotal = 720 + 12 + 4 + 112, 4080 .vdisplay = 1280, 4081 .vsync_start = 1280 + 8, 4082 .vsync_end = 1280 + 8 + 4, 4083 .vtotal = 1280 + 8 + 4 + 12, 4084 }; 4085 4086 static const struct panel_desc_dsi lg_lh500wx1_sd03 = { 4087 .desc = { 4088 .modes = &lg_lh500wx1_sd03_mode, 4089 .num_modes = 1, 4090 .bpc = 8, 4091 .size = { 4092 .width = 62, 4093 .height = 110, 4094 }, 4095 .connector_type = DRM_MODE_CONNECTOR_DSI, 4096 }, 4097 .flags = MIPI_DSI_MODE_VIDEO, 4098 .format = MIPI_DSI_FMT_RGB888, 4099 .lanes = 4, 4100 }; 4101 4102 static const struct drm_display_mode panasonic_vvx10f004b00_mode = { 4103 .clock = 157200, 4104 .hdisplay = 1920, 4105 .hsync_start = 1920 + 154, 4106 .hsync_end = 1920 + 154 + 16, 4107 .htotal = 1920 + 154 + 16 + 32, 4108 .vdisplay = 1200, 4109 .vsync_start = 1200 + 17, 4110 .vsync_end = 1200 + 17 + 2, 4111 .vtotal = 1200 + 17 + 2 + 16, 4112 }; 4113 4114 static const struct panel_desc_dsi panasonic_vvx10f004b00 = { 4115 .desc = { 4116 .modes = &panasonic_vvx10f004b00_mode, 4117 .num_modes = 1, 4118 .bpc = 8, 4119 .size = { 4120 .width = 217, 4121 .height = 136, 4122 }, 4123 .connector_type = DRM_MODE_CONNECTOR_DSI, 4124 }, 4125 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | 4126 MIPI_DSI_CLOCK_NON_CONTINUOUS, 4127 .format = MIPI_DSI_FMT_RGB888, 4128 .lanes = 4, 4129 }; 4130 4131 static const struct drm_display_mode lg_acx467akm_7_mode = { 4132 .clock = 150000, 4133 .hdisplay = 1080, 4134 .hsync_start = 1080 + 2, 4135 .hsync_end = 1080 + 2 + 2, 4136 .htotal = 1080 + 2 + 2 + 2, 4137 .vdisplay = 1920, 4138 .vsync_start = 1920 + 2, 4139 .vsync_end = 1920 + 2 + 2, 4140 .vtotal = 1920 + 2 + 2 + 2, 4141 }; 4142 4143 static const struct panel_desc_dsi lg_acx467akm_7 = { 4144 .desc = { 4145 .modes = &lg_acx467akm_7_mode, 4146 .num_modes = 1, 4147 .bpc = 8, 4148 .size = { 4149 .width = 62, 4150 .height = 110, 4151 }, 4152 .connector_type = DRM_MODE_CONNECTOR_DSI, 4153 }, 4154 .flags = 0, 4155 .format = MIPI_DSI_FMT_RGB888, 4156 .lanes = 4, 4157 }; 4158 4159 static const struct drm_display_mode osd101t2045_53ts_mode = { 4160 .clock = 154500, 4161 .hdisplay = 1920, 4162 .hsync_start = 1920 + 112, 4163 .hsync_end = 1920 + 112 + 16, 4164 .htotal = 1920 + 112 + 16 + 32, 4165 .vdisplay = 1200, 4166 .vsync_start = 1200 + 16, 4167 .vsync_end = 1200 + 16 + 2, 4168 .vtotal = 1200 + 16 + 2 + 16, 4169 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 4170 }; 4171 4172 static const struct panel_desc_dsi osd101t2045_53ts = { 4173 .desc = { 4174 .modes = &osd101t2045_53ts_mode, 4175 .num_modes = 1, 4176 .bpc = 8, 4177 .size = { 4178 .width = 217, 4179 .height = 136, 4180 }, 4181 .connector_type = DRM_MODE_CONNECTOR_DSI, 4182 }, 4183 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | 4184 MIPI_DSI_MODE_VIDEO_SYNC_PULSE | 4185 MIPI_DSI_MODE_NO_EOT_PACKET, 4186 .format = MIPI_DSI_FMT_RGB888, 4187 .lanes = 4, 4188 }; 4189 4190 static const struct of_device_id dsi_of_match[] = { 4191 { 4192 .compatible = "auo,b080uan01", 4193 .data = &auo_b080uan01 4194 }, { 4195 .compatible = "boe,tv080wum-nl0", 4196 .data = &boe_tv080wum_nl0 4197 }, { 4198 .compatible = "lg,ld070wx3-sl01", 4199 .data = &lg_ld070wx3_sl01 4200 }, { 4201 .compatible = "lg,lh500wx1-sd03", 4202 .data = &lg_lh500wx1_sd03 4203 }, { 4204 .compatible = "panasonic,vvx10f004b00", 4205 .data = &panasonic_vvx10f004b00 4206 }, { 4207 .compatible = "lg,acx467akm-7", 4208 .data = &lg_acx467akm_7 4209 }, { 4210 .compatible = "osddisplays,osd101t2045-53ts", 4211 .data = &osd101t2045_53ts 4212 }, { 4213 /* sentinel */ 4214 } 4215 }; 4216 MODULE_DEVICE_TABLE(of, dsi_of_match); 4217 4218 static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi) 4219 { 4220 const struct panel_desc_dsi *desc; 4221 const struct of_device_id *id; 4222 int err; 4223 4224 id = of_match_node(dsi_of_match, dsi->dev.of_node); 4225 if (!id) 4226 return -ENODEV; 4227 4228 desc = id->data; 4229 4230 err = panel_simple_probe(&dsi->dev, &desc->desc); 4231 if (err < 0) 4232 return err; 4233 4234 dsi->mode_flags = desc->flags; 4235 dsi->format = desc->format; 4236 dsi->lanes = desc->lanes; 4237 4238 err = mipi_dsi_attach(dsi); 4239 if (err) { 4240 struct panel_simple *panel = mipi_dsi_get_drvdata(dsi); 4241 4242 drm_panel_remove(&panel->base); 4243 } 4244 4245 return err; 4246 } 4247 4248 static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi) 4249 { 4250 int err; 4251 4252 err = mipi_dsi_detach(dsi); 4253 if (err < 0) 4254 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err); 4255 4256 return panel_simple_remove(&dsi->dev); 4257 } 4258 4259 static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi) 4260 { 4261 panel_simple_shutdown(&dsi->dev); 4262 } 4263 4264 static struct mipi_dsi_driver panel_simple_dsi_driver = { 4265 .driver = { 4266 .name = "panel-simple-dsi", 4267 .of_match_table = dsi_of_match, 4268 .pm = &panel_simple_pm_ops, 4269 }, 4270 .probe = panel_simple_dsi_probe, 4271 .remove = panel_simple_dsi_remove, 4272 .shutdown = panel_simple_dsi_shutdown, 4273 }; 4274 4275 static int __init panel_simple_init(void) 4276 { 4277 int err; 4278 4279 err = platform_driver_register(&panel_simple_platform_driver); 4280 if (err < 0) 4281 return err; 4282 4283 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) { 4284 err = mipi_dsi_driver_register(&panel_simple_dsi_driver); 4285 if (err < 0) 4286 goto err_did_platform_register; 4287 } 4288 4289 return 0; 4290 4291 err_did_platform_register: 4292 platform_driver_unregister(&panel_simple_platform_driver); 4293 4294 return err; 4295 } 4296 module_init(panel_simple_init); 4297 4298 static void __exit panel_simple_exit(void) 4299 { 4300 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) 4301 mipi_dsi_driver_unregister(&panel_simple_dsi_driver); 4302 4303 platform_driver_unregister(&panel_simple_platform_driver); 4304 } 4305 module_exit(panel_simple_exit); 4306 4307 MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>"); 4308 MODULE_DESCRIPTION("DRM Driver for Simple Panels"); 4309 MODULE_LICENSE("GPL and additional rights"); 4310