2 * Copyright (C) 2013, NVIDIA Corporation. All rights reserved.
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:
11 * The above copyright notice and this permission notice (including the
12 * next paragraph) shall be included in all copies or substantial portions
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.
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/regulator/consumer.h>
31 #include <video/display_timing.h>
32 #include <video/of_display_timing.h>
33 #include <video/videomode.h>
35 #include <drm/drm_crtc.h>
36 #include <drm/drm_device.h>
37 #include <drm/drm_mipi_dsi.h>
38 #include <drm/drm_panel.h>
41 * @modes: Pointer to array of fixed modes appropriate for this panel. If
42 * only one mode then this can just be the address of this the mode.
43 * NOTE: cannot be used with "timings" and also if this is specified
44 * then you cannot override the mode in the device tree.
45 * @num_modes: Number of elements in modes array.
46 * @timings: Pointer to array of display timings. NOTE: cannot be used with
47 * "modes" and also these will be used to validate a device tree
48 * override if one is present.
49 * @num_timings: Number of elements in timings array.
50 * @bpc: Bits per color.
51 * @size: Structure containing the physical size of this panel.
52 * @delay: Structure containing various delay values for this panel.
53 * @bus_format: See MEDIA_BUS_FMT_... defines.
54 * @bus_flags: See DRM_BUS_FLAG_... defines.
57 const struct drm_display_mode *modes;
58 unsigned int num_modes;
59 const struct display_timing *timings;
60 unsigned int num_timings;
65 * @width: width (in millimeters) of the panel's active display area
66 * @height: height (in millimeters) of the panel's active display area
74 * @prepare: the time (in milliseconds) that it takes for the panel to
75 * become ready and start receiving video data
76 * @hpd_absent_delay: Add this to the prepare delay if we know Hot
77 * Plug Detect isn't used.
78 * @enable: the time (in milliseconds) that it takes for the panel to
79 * display the first valid frame after starting to receive
81 * @disable: the time (in milliseconds) that it takes for the panel to
82 * turn the display off (no content is visible)
83 * @unprepare: the time (in milliseconds) that it takes for the panel
84 * to power itself down completely
88 unsigned int hpd_absent_delay;
91 unsigned int unprepare;
100 struct drm_panel base;
105 const struct panel_desc *desc;
107 struct regulator *supply;
108 struct i2c_adapter *ddc;
110 struct gpio_desc *enable_gpio;
112 struct drm_display_mode override_mode;
115 static inline struct panel_simple *to_panel_simple(struct drm_panel *panel)
117 return container_of(panel, struct panel_simple, base);
120 static unsigned int panel_simple_get_timings_modes(struct panel_simple *panel,
121 struct drm_connector *connector)
123 struct drm_display_mode *mode;
124 unsigned int i, num = 0;
126 for (i = 0; i < panel->desc->num_timings; i++) {
127 const struct display_timing *dt = &panel->desc->timings[i];
130 videomode_from_timing(dt, &vm);
131 mode = drm_mode_create(connector->dev);
133 dev_err(panel->base.dev, "failed to add mode %ux%u\n",
134 dt->hactive.typ, dt->vactive.typ);
138 drm_display_mode_from_videomode(&vm, mode);
140 mode->type |= DRM_MODE_TYPE_DRIVER;
142 if (panel->desc->num_timings == 1)
143 mode->type |= DRM_MODE_TYPE_PREFERRED;
145 drm_mode_probed_add(connector, mode);
152 static unsigned int panel_simple_get_display_modes(struct panel_simple *panel,
153 struct drm_connector *connector)
155 struct drm_display_mode *mode;
156 unsigned int i, num = 0;
158 for (i = 0; i < panel->desc->num_modes; i++) {
159 const struct drm_display_mode *m = &panel->desc->modes[i];
161 mode = drm_mode_duplicate(connector->dev, m);
163 dev_err(panel->base.dev, "failed to add mode %ux%u@%u\n",
164 m->hdisplay, m->vdisplay, m->vrefresh);
168 mode->type |= DRM_MODE_TYPE_DRIVER;
170 if (panel->desc->num_modes == 1)
171 mode->type |= DRM_MODE_TYPE_PREFERRED;
173 drm_mode_set_name(mode);
175 drm_mode_probed_add(connector, mode);
182 static int panel_simple_get_non_edid_modes(struct panel_simple *panel,
183 struct drm_connector *connector)
185 struct drm_display_mode *mode;
186 bool has_override = panel->override_mode.type;
187 unsigned int num = 0;
193 mode = drm_mode_duplicate(connector->dev,
194 &panel->override_mode);
196 drm_mode_probed_add(connector, mode);
199 dev_err(panel->base.dev, "failed to add override mode\n");
203 /* Only add timings if override was not there or failed to validate */
204 if (num == 0 && panel->desc->num_timings)
205 num = panel_simple_get_timings_modes(panel, connector);
208 * Only add fixed modes if timings/override added no mode.
210 * We should only ever have either the display timings specified
211 * or a fixed mode. Anything else is rather bogus.
213 WARN_ON(panel->desc->num_timings && panel->desc->num_modes);
215 num = panel_simple_get_display_modes(panel, connector);
217 connector->display_info.bpc = panel->desc->bpc;
218 connector->display_info.width_mm = panel->desc->size.width;
219 connector->display_info.height_mm = panel->desc->size.height;
220 if (panel->desc->bus_format)
221 drm_display_info_set_bus_formats(&connector->display_info,
222 &panel->desc->bus_format, 1);
223 connector->display_info.bus_flags = panel->desc->bus_flags;
228 static int panel_simple_disable(struct drm_panel *panel)
230 struct panel_simple *p = to_panel_simple(panel);
235 if (p->desc->delay.disable)
236 msleep(p->desc->delay.disable);
243 static int panel_simple_unprepare(struct drm_panel *panel)
245 struct panel_simple *p = to_panel_simple(panel);
250 gpiod_set_value_cansleep(p->enable_gpio, 0);
252 regulator_disable(p->supply);
254 if (p->desc->delay.unprepare)
255 msleep(p->desc->delay.unprepare);
262 static int panel_simple_prepare(struct drm_panel *panel)
264 struct panel_simple *p = to_panel_simple(panel);
271 err = regulator_enable(p->supply);
273 dev_err(panel->dev, "failed to enable supply: %d\n", err);
277 gpiod_set_value_cansleep(p->enable_gpio, 1);
279 delay = p->desc->delay.prepare;
281 delay += p->desc->delay.hpd_absent_delay;
290 static int panel_simple_enable(struct drm_panel *panel)
292 struct panel_simple *p = to_panel_simple(panel);
297 if (p->desc->delay.enable)
298 msleep(p->desc->delay.enable);
305 static int panel_simple_get_modes(struct drm_panel *panel,
306 struct drm_connector *connector)
308 struct panel_simple *p = to_panel_simple(panel);
311 /* probe EDID if a DDC bus is available */
313 struct edid *edid = drm_get_edid(connector, p->ddc);
315 drm_connector_update_edid_property(connector, edid);
317 num += drm_add_edid_modes(connector, edid);
322 /* add hard-coded panel modes */
323 num += panel_simple_get_non_edid_modes(p, connector);
328 static int panel_simple_get_timings(struct drm_panel *panel,
329 unsigned int num_timings,
330 struct display_timing *timings)
332 struct panel_simple *p = to_panel_simple(panel);
335 if (p->desc->num_timings < num_timings)
336 num_timings = p->desc->num_timings;
339 for (i = 0; i < num_timings; i++)
340 timings[i] = p->desc->timings[i];
342 return p->desc->num_timings;
345 static const struct drm_panel_funcs panel_simple_funcs = {
346 .disable = panel_simple_disable,
347 .unprepare = panel_simple_unprepare,
348 .prepare = panel_simple_prepare,
349 .enable = panel_simple_enable,
350 .get_modes = panel_simple_get_modes,
351 .get_timings = panel_simple_get_timings,
354 static struct panel_desc panel_dpi;
356 static int panel_dpi_probe(struct device *dev,
357 struct panel_simple *panel)
359 struct display_timing *timing;
360 const struct device_node *np;
361 struct panel_desc *desc;
362 unsigned int bus_flags;
368 desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL);
372 timing = devm_kzalloc(dev, sizeof(*timing), GFP_KERNEL);
376 ret = of_get_display_timing(np, "panel-timing", timing);
378 dev_err(dev, "%pOF: no panel-timing node found for \"panel-dpi\" binding\n",
383 desc->timings = timing;
384 desc->num_timings = 1;
386 of_property_read_u32(np, "width-mm", &desc->size.width);
387 of_property_read_u32(np, "height-mm", &desc->size.height);
389 of_property_read_string(np, "data-mapping", &mapping);
390 if (!strcmp(mapping, "rgb24"))
391 desc->bus_format = MEDIA_BUS_FMT_RGB888_1X24;
392 else if (!strcmp(mapping, "rgb565"))
393 desc->bus_format = MEDIA_BUS_FMT_RGB565_1X16;
394 else if (!strcmp(mapping, "bgr666"))
395 desc->bus_format = MEDIA_BUS_FMT_RGB666_1X18;
396 else if (!strcmp(mapping, "lvds666"))
397 desc->bus_format = MEDIA_BUS_FMT_RGB666_1X24_CPADHI;
399 /* Extract bus_flags from display_timing */
401 vm.flags = timing->flags;
402 drm_bus_flags_from_videomode(&vm, &bus_flags);
403 desc->bus_flags = bus_flags;
405 /* We do not know the connector for the DT node, so guess it */
406 desc->connector_type = DRM_MODE_CONNECTOR_DPI;
413 #define PANEL_SIMPLE_BOUNDS_CHECK(to_check, bounds, field) \
414 (to_check->field.typ >= bounds->field.min && \
415 to_check->field.typ <= bounds->field.max)
416 static void panel_simple_parse_panel_timing_node(struct device *dev,
417 struct panel_simple *panel,
418 const struct display_timing *ot)
420 const struct panel_desc *desc = panel->desc;
424 if (WARN_ON(desc->num_modes)) {
425 dev_err(dev, "Reject override mode: panel has a fixed mode\n");
428 if (WARN_ON(!desc->num_timings)) {
429 dev_err(dev, "Reject override mode: no timings specified\n");
433 for (i = 0; i < panel->desc->num_timings; i++) {
434 const struct display_timing *dt = &panel->desc->timings[i];
436 if (!PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hactive) ||
437 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hfront_porch) ||
438 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hback_porch) ||
439 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hsync_len) ||
440 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vactive) ||
441 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vfront_porch) ||
442 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vback_porch) ||
443 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vsync_len))
446 if (ot->flags != dt->flags)
449 videomode_from_timing(ot, &vm);
450 drm_display_mode_from_videomode(&vm, &panel->override_mode);
451 panel->override_mode.type |= DRM_MODE_TYPE_DRIVER |
452 DRM_MODE_TYPE_PREFERRED;
456 if (WARN_ON(!panel->override_mode.type))
457 dev_err(dev, "Reject override mode: No display_timing found\n");
460 static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
462 struct panel_simple *panel;
463 struct display_timing dt;
464 struct device_node *ddc;
467 panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL);
471 panel->enabled = false;
472 panel->prepared = false;
475 panel->no_hpd = of_property_read_bool(dev->of_node, "no-hpd");
477 panel->supply = devm_regulator_get(dev, "power");
478 if (IS_ERR(panel->supply))
479 return PTR_ERR(panel->supply);
481 panel->enable_gpio = devm_gpiod_get_optional(dev, "enable",
483 if (IS_ERR(panel->enable_gpio)) {
484 err = PTR_ERR(panel->enable_gpio);
485 if (err != -EPROBE_DEFER)
486 dev_err(dev, "failed to request GPIO: %d\n", err);
490 ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0);
492 panel->ddc = of_find_i2c_adapter_by_node(ddc);
496 return -EPROBE_DEFER;
499 if (desc == &panel_dpi) {
500 /* Handle the generic panel-dpi binding */
501 err = panel_dpi_probe(dev, panel);
505 if (!of_get_display_timing(dev->of_node, "panel-timing", &dt))
506 panel_simple_parse_panel_timing_node(dev, panel, &dt);
509 drm_panel_init(&panel->base, dev, &panel_simple_funcs,
510 desc->connector_type);
512 err = drm_panel_of_backlight(&panel->base);
516 err = drm_panel_add(&panel->base);
520 dev_set_drvdata(dev, panel);
526 put_device(&panel->ddc->dev);
531 static int panel_simple_remove(struct device *dev)
533 struct panel_simple *panel = dev_get_drvdata(dev);
535 drm_panel_remove(&panel->base);
536 drm_panel_disable(&panel->base);
537 drm_panel_unprepare(&panel->base);
540 put_device(&panel->ddc->dev);
545 static void panel_simple_shutdown(struct device *dev)
547 struct panel_simple *panel = dev_get_drvdata(dev);
549 drm_panel_disable(&panel->base);
550 drm_panel_unprepare(&panel->base);
553 static const struct drm_display_mode ampire_am_480272h3tmqw_t01h_mode = {
556 .hsync_start = 480 + 2,
557 .hsync_end = 480 + 2 + 41,
558 .htotal = 480 + 2 + 41 + 2,
560 .vsync_start = 272 + 2,
561 .vsync_end = 272 + 2 + 10,
562 .vtotal = 272 + 2 + 10 + 2,
564 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
567 static const struct panel_desc ampire_am_480272h3tmqw_t01h = {
568 .modes = &ire_am_480272h3tmqw_t01h_mode,
575 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
578 static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = {
581 .hsync_start = 800 + 0,
582 .hsync_end = 800 + 0 + 255,
583 .htotal = 800 + 0 + 255 + 0,
585 .vsync_start = 480 + 2,
586 .vsync_end = 480 + 2 + 45,
587 .vtotal = 480 + 2 + 45 + 0,
589 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
592 static const struct panel_desc ampire_am800480r3tmqwa1h = {
593 .modes = &ire_am800480r3tmqwa1h_mode,
600 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
603 static const struct display_timing santek_st0700i5y_rbslw_f_timing = {
604 .pixelclock = { 26400000, 33300000, 46800000 },
605 .hactive = { 800, 800, 800 },
606 .hfront_porch = { 16, 210, 354 },
607 .hback_porch = { 45, 36, 6 },
608 .hsync_len = { 1, 10, 40 },
609 .vactive = { 480, 480, 480 },
610 .vfront_porch = { 7, 22, 147 },
611 .vback_porch = { 22, 13, 3 },
612 .vsync_len = { 1, 10, 20 },
613 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
614 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE
617 static const struct panel_desc armadeus_st0700_adapt = {
618 .timings = &santek_st0700i5y_rbslw_f_timing,
625 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
626 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
629 static const struct drm_display_mode auo_b101aw03_mode = {
632 .hsync_start = 1024 + 156,
633 .hsync_end = 1024 + 156 + 8,
634 .htotal = 1024 + 156 + 8 + 156,
636 .vsync_start = 600 + 16,
637 .vsync_end = 600 + 16 + 6,
638 .vtotal = 600 + 16 + 6 + 16,
642 static const struct panel_desc auo_b101aw03 = {
643 .modes = &auo_b101aw03_mode,
652 static const struct display_timing auo_b101ean01_timing = {
653 .pixelclock = { 65300000, 72500000, 75000000 },
654 .hactive = { 1280, 1280, 1280 },
655 .hfront_porch = { 18, 119, 119 },
656 .hback_porch = { 21, 21, 21 },
657 .hsync_len = { 32, 32, 32 },
658 .vactive = { 800, 800, 800 },
659 .vfront_porch = { 4, 4, 4 },
660 .vback_porch = { 8, 8, 8 },
661 .vsync_len = { 18, 20, 20 },
664 static const struct panel_desc auo_b101ean01 = {
665 .timings = &auo_b101ean01_timing,
674 static const struct drm_display_mode auo_b101xtn01_mode = {
677 .hsync_start = 1366 + 20,
678 .hsync_end = 1366 + 20 + 70,
679 .htotal = 1366 + 20 + 70,
681 .vsync_start = 768 + 14,
682 .vsync_end = 768 + 14 + 42,
683 .vtotal = 768 + 14 + 42,
685 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
688 static const struct panel_desc auo_b101xtn01 = {
689 .modes = &auo_b101xtn01_mode,
698 static const struct drm_display_mode auo_b116xak01_mode = {
701 .hsync_start = 1366 + 48,
702 .hsync_end = 1366 + 48 + 32,
703 .htotal = 1366 + 48 + 32 + 10,
705 .vsync_start = 768 + 4,
706 .vsync_end = 768 + 4 + 6,
707 .vtotal = 768 + 4 + 6 + 15,
709 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
712 static const struct panel_desc auo_b116xak01 = {
713 .modes = &auo_b116xak01_mode,
721 .hpd_absent_delay = 200,
723 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
724 .connector_type = DRM_MODE_CONNECTOR_eDP,
727 static const struct drm_display_mode auo_b116xw03_mode = {
730 .hsync_start = 1366 + 40,
731 .hsync_end = 1366 + 40 + 40,
732 .htotal = 1366 + 40 + 40 + 32,
734 .vsync_start = 768 + 10,
735 .vsync_end = 768 + 10 + 12,
736 .vtotal = 768 + 10 + 12 + 6,
740 static const struct panel_desc auo_b116xw03 = {
741 .modes = &auo_b116xw03_mode,
750 static const struct drm_display_mode auo_b133xtn01_mode = {
753 .hsync_start = 1366 + 48,
754 .hsync_end = 1366 + 48 + 32,
755 .htotal = 1366 + 48 + 32 + 20,
757 .vsync_start = 768 + 3,
758 .vsync_end = 768 + 3 + 6,
759 .vtotal = 768 + 3 + 6 + 13,
763 static const struct panel_desc auo_b133xtn01 = {
764 .modes = &auo_b133xtn01_mode,
773 static const struct drm_display_mode auo_b133htn01_mode = {
776 .hsync_start = 1920 + 172,
777 .hsync_end = 1920 + 172 + 80,
778 .htotal = 1920 + 172 + 80 + 60,
780 .vsync_start = 1080 + 25,
781 .vsync_end = 1080 + 25 + 10,
782 .vtotal = 1080 + 25 + 10 + 10,
786 static const struct panel_desc auo_b133htn01 = {
787 .modes = &auo_b133htn01_mode,
801 static const struct display_timing auo_g070vvn01_timings = {
802 .pixelclock = { 33300000, 34209000, 45000000 },
803 .hactive = { 800, 800, 800 },
804 .hfront_porch = { 20, 40, 200 },
805 .hback_porch = { 87, 40, 1 },
806 .hsync_len = { 1, 48, 87 },
807 .vactive = { 480, 480, 480 },
808 .vfront_porch = { 5, 13, 200 },
809 .vback_porch = { 31, 31, 29 },
810 .vsync_len = { 1, 1, 3 },
813 static const struct panel_desc auo_g070vvn01 = {
814 .timings = &auo_g070vvn01_timings,
829 static const struct drm_display_mode auo_g101evn010_mode = {
832 .hsync_start = 1280 + 82,
833 .hsync_end = 1280 + 82 + 2,
834 .htotal = 1280 + 82 + 2 + 84,
836 .vsync_start = 800 + 8,
837 .vsync_end = 800 + 8 + 2,
838 .vtotal = 800 + 8 + 2 + 6,
842 static const struct panel_desc auo_g101evn010 = {
843 .modes = &auo_g101evn010_mode,
850 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
853 static const struct drm_display_mode auo_g104sn02_mode = {
856 .hsync_start = 800 + 40,
857 .hsync_end = 800 + 40 + 216,
858 .htotal = 800 + 40 + 216 + 128,
860 .vsync_start = 600 + 10,
861 .vsync_end = 600 + 10 + 35,
862 .vtotal = 600 + 10 + 35 + 2,
866 static const struct panel_desc auo_g104sn02 = {
867 .modes = &auo_g104sn02_mode,
876 static const struct display_timing auo_g133han01_timings = {
877 .pixelclock = { 134000000, 141200000, 149000000 },
878 .hactive = { 1920, 1920, 1920 },
879 .hfront_porch = { 39, 58, 77 },
880 .hback_porch = { 59, 88, 117 },
881 .hsync_len = { 28, 42, 56 },
882 .vactive = { 1080, 1080, 1080 },
883 .vfront_porch = { 3, 8, 11 },
884 .vback_porch = { 5, 14, 19 },
885 .vsync_len = { 4, 14, 19 },
888 static const struct panel_desc auo_g133han01 = {
889 .timings = &auo_g133han01_timings,
902 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
903 .connector_type = DRM_MODE_CONNECTOR_LVDS,
906 static const struct display_timing auo_g185han01_timings = {
907 .pixelclock = { 120000000, 144000000, 175000000 },
908 .hactive = { 1920, 1920, 1920 },
909 .hfront_porch = { 36, 120, 148 },
910 .hback_porch = { 24, 88, 108 },
911 .hsync_len = { 20, 48, 64 },
912 .vactive = { 1080, 1080, 1080 },
913 .vfront_porch = { 6, 10, 40 },
914 .vback_porch = { 2, 5, 20 },
915 .vsync_len = { 2, 5, 20 },
918 static const struct panel_desc auo_g185han01 = {
919 .timings = &auo_g185han01_timings,
932 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
933 .connector_type = DRM_MODE_CONNECTOR_LVDS,
936 static const struct display_timing auo_p320hvn03_timings = {
937 .pixelclock = { 106000000, 148500000, 164000000 },
938 .hactive = { 1920, 1920, 1920 },
939 .hfront_porch = { 25, 50, 130 },
940 .hback_porch = { 25, 50, 130 },
941 .hsync_len = { 20, 40, 105 },
942 .vactive = { 1080, 1080, 1080 },
943 .vfront_porch = { 8, 17, 150 },
944 .vback_porch = { 8, 17, 150 },
945 .vsync_len = { 4, 11, 100 },
948 static const struct panel_desc auo_p320hvn03 = {
949 .timings = &auo_p320hvn03_timings,
961 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
962 .connector_type = DRM_MODE_CONNECTOR_LVDS,
965 static const struct drm_display_mode auo_t215hvn01_mode = {
968 .hsync_start = 1920 + 88,
969 .hsync_end = 1920 + 88 + 44,
970 .htotal = 1920 + 88 + 44 + 148,
972 .vsync_start = 1080 + 4,
973 .vsync_end = 1080 + 4 + 5,
974 .vtotal = 1080 + 4 + 5 + 36,
978 static const struct panel_desc auo_t215hvn01 = {
979 .modes = &auo_t215hvn01_mode,
992 static const struct drm_display_mode avic_tm070ddh03_mode = {
995 .hsync_start = 1024 + 160,
996 .hsync_end = 1024 + 160 + 4,
997 .htotal = 1024 + 160 + 4 + 156,
999 .vsync_start = 600 + 17,
1000 .vsync_end = 600 + 17 + 1,
1001 .vtotal = 600 + 17 + 1 + 17,
1005 static const struct panel_desc avic_tm070ddh03 = {
1006 .modes = &avic_tm070ddh03_mode,
1020 static const struct drm_display_mode bananapi_s070wv20_ct16_mode = {
1023 .hsync_start = 800 + 40,
1024 .hsync_end = 800 + 40 + 48,
1025 .htotal = 800 + 40 + 48 + 40,
1027 .vsync_start = 480 + 13,
1028 .vsync_end = 480 + 13 + 3,
1029 .vtotal = 480 + 13 + 3 + 29,
1032 static const struct panel_desc bananapi_s070wv20_ct16 = {
1033 .modes = &bananapi_s070wv20_ct16_mode,
1042 static const struct drm_display_mode boe_hv070wsa_mode = {
1045 .hsync_start = 1024 + 30,
1046 .hsync_end = 1024 + 30 + 30,
1047 .htotal = 1024 + 30 + 30 + 30,
1049 .vsync_start = 600 + 10,
1050 .vsync_end = 600 + 10 + 10,
1051 .vtotal = 600 + 10 + 10 + 10,
1055 static const struct panel_desc boe_hv070wsa = {
1056 .modes = &boe_hv070wsa_mode,
1064 static const struct drm_display_mode boe_nv101wxmn51_modes[] = {
1068 .hsync_start = 1280 + 48,
1069 .hsync_end = 1280 + 48 + 32,
1070 .htotal = 1280 + 48 + 32 + 80,
1072 .vsync_start = 800 + 3,
1073 .vsync_end = 800 + 3 + 5,
1074 .vtotal = 800 + 3 + 5 + 24,
1080 .hsync_start = 1280 + 48,
1081 .hsync_end = 1280 + 48 + 32,
1082 .htotal = 1280 + 48 + 32 + 80,
1084 .vsync_start = 800 + 3,
1085 .vsync_end = 800 + 3 + 5,
1086 .vtotal = 800 + 3 + 5 + 24,
1091 static const struct panel_desc boe_nv101wxmn51 = {
1092 .modes = boe_nv101wxmn51_modes,
1093 .num_modes = ARRAY_SIZE(boe_nv101wxmn51_modes),
1106 static const struct drm_display_mode boe_nv140fhmn49_modes[] = {
1110 .hsync_start = 1920 + 48,
1111 .hsync_end = 1920 + 48 + 32,
1114 .vsync_start = 1080 + 3,
1115 .vsync_end = 1080 + 3 + 5,
1121 static const struct panel_desc boe_nv140fhmn49 = {
1122 .modes = boe_nv140fhmn49_modes,
1123 .num_modes = ARRAY_SIZE(boe_nv140fhmn49_modes),
1134 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1135 .connector_type = DRM_MODE_CONNECTOR_eDP,
1138 static const struct drm_display_mode cdtech_s043wq26h_ct7_mode = {
1141 .hsync_start = 480 + 5,
1142 .hsync_end = 480 + 5 + 5,
1143 .htotal = 480 + 5 + 5 + 40,
1145 .vsync_start = 272 + 8,
1146 .vsync_end = 272 + 8 + 8,
1147 .vtotal = 272 + 8 + 8 + 8,
1149 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1152 static const struct panel_desc cdtech_s043wq26h_ct7 = {
1153 .modes = &cdtech_s043wq26h_ct7_mode,
1160 .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
1163 static const struct drm_display_mode cdtech_s070wv95_ct16_mode = {
1166 .hsync_start = 800 + 40,
1167 .hsync_end = 800 + 40 + 40,
1168 .htotal = 800 + 40 + 40 + 48,
1170 .vsync_start = 480 + 29,
1171 .vsync_end = 480 + 29 + 13,
1172 .vtotal = 480 + 29 + 13 + 3,
1174 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1177 static const struct panel_desc cdtech_s070wv95_ct16 = {
1178 .modes = &cdtech_s070wv95_ct16_mode,
1187 static const struct drm_display_mode chunghwa_claa070wp03xg_mode = {
1190 .hsync_start = 800 + 49,
1191 .hsync_end = 800 + 49 + 33,
1192 .htotal = 800 + 49 + 33 + 17,
1194 .vsync_start = 1280 + 1,
1195 .vsync_end = 1280 + 1 + 7,
1196 .vtotal = 1280 + 1 + 7 + 15,
1198 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1201 static const struct panel_desc chunghwa_claa070wp03xg = {
1202 .modes = &chunghwa_claa070wp03xg_mode,
1211 static const struct drm_display_mode chunghwa_claa101wa01a_mode = {
1214 .hsync_start = 1366 + 58,
1215 .hsync_end = 1366 + 58 + 58,
1216 .htotal = 1366 + 58 + 58 + 58,
1218 .vsync_start = 768 + 4,
1219 .vsync_end = 768 + 4 + 4,
1220 .vtotal = 768 + 4 + 4 + 4,
1224 static const struct panel_desc chunghwa_claa101wa01a = {
1225 .modes = &chunghwa_claa101wa01a_mode,
1234 static const struct drm_display_mode chunghwa_claa101wb01_mode = {
1237 .hsync_start = 1366 + 48,
1238 .hsync_end = 1366 + 48 + 32,
1239 .htotal = 1366 + 48 + 32 + 20,
1241 .vsync_start = 768 + 16,
1242 .vsync_end = 768 + 16 + 8,
1243 .vtotal = 768 + 16 + 8 + 16,
1247 static const struct panel_desc chunghwa_claa101wb01 = {
1248 .modes = &chunghwa_claa101wb01_mode,
1257 static const struct drm_display_mode dataimage_scf0700c48ggu18_mode = {
1260 .hsync_start = 800 + 40,
1261 .hsync_end = 800 + 40 + 128,
1262 .htotal = 800 + 40 + 128 + 88,
1264 .vsync_start = 480 + 10,
1265 .vsync_end = 480 + 10 + 2,
1266 .vtotal = 480 + 10 + 2 + 33,
1268 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1271 static const struct panel_desc dataimage_scf0700c48ggu18 = {
1272 .modes = &dataimage_scf0700c48ggu18_mode,
1279 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1280 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
1283 static const struct display_timing dlc_dlc0700yzg_1_timing = {
1284 .pixelclock = { 45000000, 51200000, 57000000 },
1285 .hactive = { 1024, 1024, 1024 },
1286 .hfront_porch = { 100, 106, 113 },
1287 .hback_porch = { 100, 106, 113 },
1288 .hsync_len = { 100, 108, 114 },
1289 .vactive = { 600, 600, 600 },
1290 .vfront_porch = { 8, 11, 15 },
1291 .vback_porch = { 8, 11, 15 },
1292 .vsync_len = { 9, 13, 15 },
1293 .flags = DISPLAY_FLAGS_DE_HIGH,
1296 static const struct panel_desc dlc_dlc0700yzg_1 = {
1297 .timings = &dlc_dlc0700yzg_1_timing,
1309 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1310 .connector_type = DRM_MODE_CONNECTOR_LVDS,
1313 static const struct display_timing dlc_dlc1010gig_timing = {
1314 .pixelclock = { 68900000, 71100000, 73400000 },
1315 .hactive = { 1280, 1280, 1280 },
1316 .hfront_porch = { 43, 53, 63 },
1317 .hback_porch = { 43, 53, 63 },
1318 .hsync_len = { 44, 54, 64 },
1319 .vactive = { 800, 800, 800 },
1320 .vfront_porch = { 5, 8, 11 },
1321 .vback_porch = { 5, 8, 11 },
1322 .vsync_len = { 5, 7, 11 },
1323 .flags = DISPLAY_FLAGS_DE_HIGH,
1326 static const struct panel_desc dlc_dlc1010gig = {
1327 .timings = &dlc_dlc1010gig_timing,
1340 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1341 .connector_type = DRM_MODE_CONNECTOR_LVDS,
1344 static const struct drm_display_mode edt_et035012dm6_mode = {
1347 .hsync_start = 320 + 20,
1348 .hsync_end = 320 + 20 + 30,
1349 .htotal = 320 + 20 + 68,
1351 .vsync_start = 240 + 4,
1352 .vsync_end = 240 + 4 + 4,
1353 .vtotal = 240 + 4 + 4 + 14,
1355 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1358 static const struct panel_desc edt_et035012dm6 = {
1359 .modes = &edt_et035012dm6_mode,
1366 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1367 .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
1370 static const struct drm_display_mode edt_etm043080dh6gp_mode = {
1373 .hsync_start = 480 + 8,
1374 .hsync_end = 480 + 8 + 4,
1375 .htotal = 480 + 8 + 4 + 41,
1378 * IWG22M: Y resolution changed for "dc_linuxfb" module crashing while
1383 .vsync_start = 288 + 2,
1384 .vsync_end = 288 + 2 + 4,
1385 .vtotal = 288 + 2 + 4 + 10,
1389 static const struct panel_desc edt_etm043080dh6gp = {
1390 .modes = &edt_etm043080dh6gp_mode,
1397 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1398 .connector_type = DRM_MODE_CONNECTOR_DPI,
1401 static const struct drm_display_mode edt_etm0430g0dh6_mode = {
1404 .hsync_start = 480 + 2,
1405 .hsync_end = 480 + 2 + 41,
1406 .htotal = 480 + 2 + 41 + 2,
1408 .vsync_start = 272 + 2,
1409 .vsync_end = 272 + 2 + 10,
1410 .vtotal = 272 + 2 + 10 + 2,
1412 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1415 static const struct panel_desc edt_etm0430g0dh6 = {
1416 .modes = &edt_etm0430g0dh6_mode,
1425 static const struct drm_display_mode edt_et057090dhu_mode = {
1428 .hsync_start = 640 + 16,
1429 .hsync_end = 640 + 16 + 30,
1430 .htotal = 640 + 16 + 30 + 114,
1432 .vsync_start = 480 + 10,
1433 .vsync_end = 480 + 10 + 3,
1434 .vtotal = 480 + 10 + 3 + 32,
1436 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1439 static const struct panel_desc edt_et057090dhu = {
1440 .modes = &edt_et057090dhu_mode,
1447 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1448 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
1451 static const struct drm_display_mode edt_etm0700g0dh6_mode = {
1454 .hsync_start = 800 + 40,
1455 .hsync_end = 800 + 40 + 128,
1456 .htotal = 800 + 40 + 128 + 88,
1458 .vsync_start = 480 + 10,
1459 .vsync_end = 480 + 10 + 2,
1460 .vtotal = 480 + 10 + 2 + 33,
1462 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1465 static const struct panel_desc edt_etm0700g0dh6 = {
1466 .modes = &edt_etm0700g0dh6_mode,
1473 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1474 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
1477 static const struct panel_desc edt_etm0700g0bdh6 = {
1478 .modes = &edt_etm0700g0dh6_mode,
1485 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1486 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
1489 static const struct display_timing evervision_vgg804821_timing = {
1490 .pixelclock = { 27600000, 33300000, 50000000 },
1491 .hactive = { 800, 800, 800 },
1492 .hfront_porch = { 40, 66, 70 },
1493 .hback_porch = { 40, 67, 70 },
1494 .hsync_len = { 40, 67, 70 },
1495 .vactive = { 480, 480, 480 },
1496 .vfront_porch = { 6, 10, 10 },
1497 .vback_porch = { 7, 11, 11 },
1498 .vsync_len = { 7, 11, 11 },
1499 .flags = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_HIGH |
1500 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE |
1501 DISPLAY_FLAGS_SYNC_NEGEDGE,
1504 static const struct panel_desc evervision_vgg804821 = {
1505 .timings = &evervision_vgg804821_timing,
1512 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1513 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
1516 static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = {
1519 .hsync_start = 800 + 168,
1520 .hsync_end = 800 + 168 + 64,
1521 .htotal = 800 + 168 + 64 + 88,
1523 .vsync_start = 480 + 37,
1524 .vsync_end = 480 + 37 + 2,
1525 .vtotal = 480 + 37 + 2 + 8,
1529 static const struct panel_desc foxlink_fl500wvr00_a0t = {
1530 .modes = &foxlink_fl500wvr00_a0t_mode,
1537 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1540 static const struct drm_display_mode frida_frd350h54004_mode = {
1543 .hsync_start = 320 + 44,
1544 .hsync_end = 320 + 44 + 16,
1545 .htotal = 320 + 44 + 16 + 20,
1547 .vsync_start = 240 + 2,
1548 .vsync_end = 240 + 2 + 6,
1549 .vtotal = 240 + 2 + 6 + 2,
1551 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
1554 static const struct panel_desc frida_frd350h54004 = {
1555 .modes = &frida_frd350h54004_mode,
1562 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1563 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
1564 .connector_type = DRM_MODE_CONNECTOR_DPI,
1567 static const struct drm_display_mode friendlyarm_hd702e_mode = {
1570 .hsync_start = 800 + 20,
1571 .hsync_end = 800 + 20 + 24,
1572 .htotal = 800 + 20 + 24 + 20,
1574 .vsync_start = 1280 + 4,
1575 .vsync_end = 1280 + 4 + 8,
1576 .vtotal = 1280 + 4 + 8 + 4,
1578 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1581 static const struct panel_desc friendlyarm_hd702e = {
1582 .modes = &friendlyarm_hd702e_mode,
1590 static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
1593 .hsync_start = 480 + 5,
1594 .hsync_end = 480 + 5 + 1,
1595 .htotal = 480 + 5 + 1 + 40,
1597 .vsync_start = 272 + 8,
1598 .vsync_end = 272 + 8 + 1,
1599 .vtotal = 272 + 8 + 1 + 8,
1603 static const struct panel_desc giantplus_gpg482739qs5 = {
1604 .modes = &giantplus_gpg482739qs5_mode,
1611 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1614 static const struct display_timing giantplus_gpm940b0_timing = {
1615 .pixelclock = { 13500000, 27000000, 27500000 },
1616 .hactive = { 320, 320, 320 },
1617 .hfront_porch = { 14, 686, 718 },
1618 .hback_porch = { 50, 70, 255 },
1619 .hsync_len = { 1, 1, 1 },
1620 .vactive = { 240, 240, 240 },
1621 .vfront_porch = { 1, 1, 179 },
1622 .vback_porch = { 1, 21, 31 },
1623 .vsync_len = { 1, 1, 6 },
1624 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
1627 static const struct panel_desc giantplus_gpm940b0 = {
1628 .timings = &giantplus_gpm940b0_timing,
1635 .bus_format = MEDIA_BUS_FMT_RGB888_3X8,
1636 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
1639 static const struct display_timing hannstar_hsd070pww1_timing = {
1640 .pixelclock = { 64300000, 71100000, 82000000 },
1641 .hactive = { 1280, 1280, 1280 },
1642 .hfront_porch = { 1, 1, 10 },
1643 .hback_porch = { 1, 1, 10 },
1645 * According to the data sheet, the minimum horizontal blanking interval
1646 * is 54 clocks (1 + 52 + 1), but tests with a Nitrogen6X have shown the
1647 * minimum working horizontal blanking interval to be 60 clocks.
1649 .hsync_len = { 58, 158, 661 },
1650 .vactive = { 800, 800, 800 },
1651 .vfront_porch = { 1, 1, 10 },
1652 .vback_porch = { 1, 1, 10 },
1653 .vsync_len = { 1, 21, 203 },
1654 .flags = DISPLAY_FLAGS_DE_HIGH,
1657 static const struct panel_desc hannstar_hsd070pww1 = {
1658 .timings = &hannstar_hsd070pww1_timing,
1665 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1666 .connector_type = DRM_MODE_CONNECTOR_LVDS,
1669 static const struct display_timing hannstar_hsd100pxn1_timing = {
1670 .pixelclock = { 55000000, 65000000, 75000000 },
1671 .hactive = { 1024, 1024, 1024 },
1672 .hfront_porch = { 40, 40, 40 },
1673 .hback_porch = { 220, 220, 220 },
1674 .hsync_len = { 20, 60, 100 },
1675 .vactive = { 768, 768, 768 },
1676 .vfront_porch = { 7, 7, 7 },
1677 .vback_porch = { 21, 21, 21 },
1678 .vsync_len = { 10, 10, 10 },
1679 .flags = DISPLAY_FLAGS_DE_HIGH,
1682 static const struct panel_desc hannstar_hsd100pxn1 = {
1683 .timings = &hannstar_hsd100pxn1_timing,
1690 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1691 .connector_type = DRM_MODE_CONNECTOR_LVDS,
1694 static const struct drm_display_mode hitachi_tx23d38vm0caa_mode = {
1697 .hsync_start = 800 + 85,
1698 .hsync_end = 800 + 85 + 86,
1699 .htotal = 800 + 85 + 86 + 85,
1701 .vsync_start = 480 + 16,
1702 .vsync_end = 480 + 16 + 13,
1703 .vtotal = 480 + 16 + 13 + 16,
1707 static const struct panel_desc hitachi_tx23d38vm0caa = {
1708 .modes = &hitachi_tx23d38vm0caa_mode,
1721 static const struct drm_display_mode innolux_at043tn24_mode = {
1724 .hsync_start = 480 + 2,
1725 .hsync_end = 480 + 2 + 41,
1726 .htotal = 480 + 2 + 41 + 2,
1728 .vsync_start = 272 + 2,
1729 .vsync_end = 272 + 2 + 10,
1730 .vtotal = 272 + 2 + 10 + 2,
1732 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1735 static const struct panel_desc innolux_at043tn24 = {
1736 .modes = &innolux_at043tn24_mode,
1743 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1744 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
1747 static const struct drm_display_mode innolux_at070tn92_mode = {
1750 .hsync_start = 800 + 210,
1751 .hsync_end = 800 + 210 + 20,
1752 .htotal = 800 + 210 + 20 + 46,
1754 .vsync_start = 480 + 22,
1755 .vsync_end = 480 + 22 + 10,
1756 .vtotal = 480 + 22 + 23 + 10,
1760 static const struct panel_desc innolux_at070tn92 = {
1761 .modes = &innolux_at070tn92_mode,
1767 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1770 static const struct display_timing innolux_g070y2_l01_timing = {
1771 .pixelclock = { 28000000, 29500000, 32000000 },
1772 .hactive = { 800, 800, 800 },
1773 .hfront_porch = { 61, 91, 141 },
1774 .hback_porch = { 60, 90, 140 },
1775 .hsync_len = { 12, 12, 12 },
1776 .vactive = { 480, 480, 480 },
1777 .vfront_porch = { 4, 9, 30 },
1778 .vback_porch = { 4, 8, 28 },
1779 .vsync_len = { 2, 2, 2 },
1780 .flags = DISPLAY_FLAGS_DE_HIGH,
1783 static const struct panel_desc innolux_g070y2_l01 = {
1784 .timings = &innolux_g070y2_l01_timing,
1797 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1798 .connector_type = DRM_MODE_CONNECTOR_LVDS,
1801 static const struct display_timing innolux_g101ice_l01_timing = {
1802 .pixelclock = { 60400000, 71100000, 74700000 },
1803 .hactive = { 1280, 1280, 1280 },
1804 .hfront_porch = { 41, 80, 100 },
1805 .hback_porch = { 40, 79, 99 },
1806 .hsync_len = { 1, 1, 1 },
1807 .vactive = { 800, 800, 800 },
1808 .vfront_porch = { 5, 11, 14 },
1809 .vback_porch = { 4, 11, 14 },
1810 .vsync_len = { 1, 1, 1 },
1811 .flags = DISPLAY_FLAGS_DE_HIGH,
1814 static const struct panel_desc innolux_g101ice_l01 = {
1815 .timings = &innolux_g101ice_l01_timing,
1826 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1827 .connector_type = DRM_MODE_CONNECTOR_LVDS,
1830 static const struct display_timing innolux_g121i1_l01_timing = {
1831 .pixelclock = { 67450000, 71000000, 74550000 },
1832 .hactive = { 1280, 1280, 1280 },
1833 .hfront_porch = { 40, 80, 160 },
1834 .hback_porch = { 39, 79, 159 },
1835 .hsync_len = { 1, 1, 1 },
1836 .vactive = { 800, 800, 800 },
1837 .vfront_porch = { 5, 11, 100 },
1838 .vback_porch = { 4, 11, 99 },
1839 .vsync_len = { 1, 1, 1 },
1842 static const struct panel_desc innolux_g121i1_l01 = {
1843 .timings = &innolux_g121i1_l01_timing,
1854 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1855 .connector_type = DRM_MODE_CONNECTOR_LVDS,
1858 static const struct drm_display_mode innolux_g121x1_l03_mode = {
1861 .hsync_start = 1024 + 0,
1862 .hsync_end = 1024 + 1,
1863 .htotal = 1024 + 0 + 1 + 320,
1865 .vsync_start = 768 + 38,
1866 .vsync_end = 768 + 38 + 1,
1867 .vtotal = 768 + 38 + 1 + 0,
1869 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1872 static const struct panel_desc innolux_g121x1_l03 = {
1873 .modes = &innolux_g121x1_l03_mode,
1888 * Datasheet specifies that at 60 Hz refresh rate:
1889 * - total horizontal time: { 1506, 1592, 1716 }
1890 * - total vertical time: { 788, 800, 868 }
1892 * ...but doesn't go into exactly how that should be split into a front
1893 * porch, back porch, or sync length. For now we'll leave a single setting
1894 * here which allows a bit of tweaking of the pixel clock at the expense of
1897 static const struct display_timing innolux_n116bge_timing = {
1898 .pixelclock = { 72600000, 76420000, 80240000 },
1899 .hactive = { 1366, 1366, 1366 },
1900 .hfront_porch = { 136, 136, 136 },
1901 .hback_porch = { 60, 60, 60 },
1902 .hsync_len = { 30, 30, 30 },
1903 .vactive = { 768, 768, 768 },
1904 .vfront_porch = { 8, 8, 8 },
1905 .vback_porch = { 12, 12, 12 },
1906 .vsync_len = { 12, 12, 12 },
1907 .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW,
1910 static const struct panel_desc innolux_n116bge = {
1911 .timings = &innolux_n116bge_timing,
1920 static const struct drm_display_mode innolux_n156bge_l21_mode = {
1923 .hsync_start = 1366 + 16,
1924 .hsync_end = 1366 + 16 + 34,
1925 .htotal = 1366 + 16 + 34 + 50,
1927 .vsync_start = 768 + 2,
1928 .vsync_end = 768 + 2 + 6,
1929 .vtotal = 768 + 2 + 6 + 12,
1933 static const struct panel_desc innolux_n156bge_l21 = {
1934 .modes = &innolux_n156bge_l21_mode,
1943 static const struct drm_display_mode innolux_p120zdg_bf1_mode = {
1946 .hsync_start = 2160 + 48,
1947 .hsync_end = 2160 + 48 + 32,
1948 .htotal = 2160 + 48 + 32 + 80,
1950 .vsync_start = 1440 + 3,
1951 .vsync_end = 1440 + 3 + 10,
1952 .vtotal = 1440 + 3 + 10 + 27,
1954 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
1957 static const struct panel_desc innolux_p120zdg_bf1 = {
1958 .modes = &innolux_p120zdg_bf1_mode,
1966 .hpd_absent_delay = 200,
1971 static const struct drm_display_mode innolux_zj070na_01p_mode = {
1974 .hsync_start = 1024 + 128,
1975 .hsync_end = 1024 + 128 + 64,
1976 .htotal = 1024 + 128 + 64 + 128,
1978 .vsync_start = 600 + 16,
1979 .vsync_end = 600 + 16 + 4,
1980 .vtotal = 600 + 16 + 4 + 16,
1984 static const struct panel_desc innolux_zj070na_01p = {
1985 .modes = &innolux_zj070na_01p_mode,
1994 static const struct display_timing koe_tx14d24vm1bpa_timing = {
1995 .pixelclock = { 5580000, 5850000, 6200000 },
1996 .hactive = { 320, 320, 320 },
1997 .hfront_porch = { 30, 30, 30 },
1998 .hback_porch = { 30, 30, 30 },
1999 .hsync_len = { 1, 5, 17 },
2000 .vactive = { 240, 240, 240 },
2001 .vfront_porch = { 6, 6, 6 },
2002 .vback_porch = { 5, 5, 5 },
2003 .vsync_len = { 1, 2, 11 },
2004 .flags = DISPLAY_FLAGS_DE_HIGH,
2007 static const struct panel_desc koe_tx14d24vm1bpa = {
2008 .timings = &koe_tx14d24vm1bpa_timing,
2017 static const struct display_timing koe_tx31d200vm0baa_timing = {
2018 .pixelclock = { 39600000, 43200000, 48000000 },
2019 .hactive = { 1280, 1280, 1280 },
2020 .hfront_porch = { 16, 36, 56 },
2021 .hback_porch = { 16, 36, 56 },
2022 .hsync_len = { 8, 8, 8 },
2023 .vactive = { 480, 480, 480 },
2024 .vfront_porch = { 6, 21, 33 },
2025 .vback_porch = { 6, 21, 33 },
2026 .vsync_len = { 8, 8, 8 },
2027 .flags = DISPLAY_FLAGS_DE_HIGH,
2030 static const struct panel_desc koe_tx31d200vm0baa = {
2031 .timings = &koe_tx31d200vm0baa_timing,
2038 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
2039 .connector_type = DRM_MODE_CONNECTOR_LVDS,
2042 static const struct display_timing kyo_tcg121xglp_timing = {
2043 .pixelclock = { 52000000, 65000000, 71000000 },
2044 .hactive = { 1024, 1024, 1024 },
2045 .hfront_porch = { 2, 2, 2 },
2046 .hback_porch = { 2, 2, 2 },
2047 .hsync_len = { 86, 124, 244 },
2048 .vactive = { 768, 768, 768 },
2049 .vfront_porch = { 2, 2, 2 },
2050 .vback_porch = { 2, 2, 2 },
2051 .vsync_len = { 6, 34, 73 },
2052 .flags = DISPLAY_FLAGS_DE_HIGH,
2055 static const struct panel_desc kyo_tcg121xglp = {
2056 .timings = &kyo_tcg121xglp_timing,
2063 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2064 .connector_type = DRM_MODE_CONNECTOR_LVDS,
2067 static const struct drm_display_mode lemaker_bl035_rgb_002_mode = {
2070 .hsync_start = 320 + 20,
2071 .hsync_end = 320 + 20 + 30,
2072 .htotal = 320 + 20 + 30 + 38,
2074 .vsync_start = 240 + 4,
2075 .vsync_end = 240 + 4 + 3,
2076 .vtotal = 240 + 4 + 3 + 15,
2080 static const struct panel_desc lemaker_bl035_rgb_002 = {
2081 .modes = &lemaker_bl035_rgb_002_mode,
2087 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2088 .bus_flags = DRM_BUS_FLAG_DE_LOW,
2091 static const struct drm_display_mode lg_lb070wv8_mode = {
2094 .hsync_start = 800 + 88,
2095 .hsync_end = 800 + 88 + 80,
2096 .htotal = 800 + 88 + 80 + 88,
2098 .vsync_start = 480 + 10,
2099 .vsync_end = 480 + 10 + 25,
2100 .vtotal = 480 + 10 + 25 + 10,
2104 static const struct panel_desc lg_lb070wv8 = {
2105 .modes = &lg_lb070wv8_mode,
2112 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2113 .connector_type = DRM_MODE_CONNECTOR_LVDS,
2116 static const struct drm_display_mode lg_lp079qx1_sp0v_mode = {
2119 .hsync_start = 1536 + 12,
2120 .hsync_end = 1536 + 12 + 16,
2121 .htotal = 1536 + 12 + 16 + 48,
2123 .vsync_start = 2048 + 8,
2124 .vsync_end = 2048 + 8 + 4,
2125 .vtotal = 2048 + 8 + 4 + 8,
2127 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2130 static const struct panel_desc lg_lp079qx1_sp0v = {
2131 .modes = &lg_lp079qx1_sp0v_mode,
2139 static const struct drm_display_mode lg_lp097qx1_spa1_mode = {
2142 .hsync_start = 2048 + 150,
2143 .hsync_end = 2048 + 150 + 5,
2144 .htotal = 2048 + 150 + 5 + 5,
2146 .vsync_start = 1536 + 3,
2147 .vsync_end = 1536 + 3 + 1,
2148 .vtotal = 1536 + 3 + 1 + 9,
2152 static const struct panel_desc lg_lp097qx1_spa1 = {
2153 .modes = &lg_lp097qx1_spa1_mode,
2161 static const struct drm_display_mode lg_lp120up1_mode = {
2164 .hsync_start = 1920 + 40,
2165 .hsync_end = 1920 + 40 + 40,
2166 .htotal = 1920 + 40 + 40+ 80,
2168 .vsync_start = 1280 + 4,
2169 .vsync_end = 1280 + 4 + 4,
2170 .vtotal = 1280 + 4 + 4 + 12,
2174 static const struct panel_desc lg_lp120up1 = {
2175 .modes = &lg_lp120up1_mode,
2184 static const struct drm_display_mode lg_lp129qe_mode = {
2187 .hsync_start = 2560 + 48,
2188 .hsync_end = 2560 + 48 + 32,
2189 .htotal = 2560 + 48 + 32 + 80,
2191 .vsync_start = 1700 + 3,
2192 .vsync_end = 1700 + 3 + 10,
2193 .vtotal = 1700 + 3 + 10 + 36,
2197 static const struct panel_desc lg_lp129qe = {
2198 .modes = &lg_lp129qe_mode,
2207 static const struct display_timing logictechno_lt161010_2nh_timing = {
2208 .pixelclock = { 26400000, 33300000, 46800000 },
2209 .hactive = { 800, 800, 800 },
2210 .hfront_porch = { 16, 210, 354 },
2211 .hback_porch = { 46, 46, 46 },
2212 .hsync_len = { 1, 20, 40 },
2213 .vactive = { 480, 480, 480 },
2214 .vfront_porch = { 7, 22, 147 },
2215 .vback_porch = { 23, 23, 23 },
2216 .vsync_len = { 1, 10, 20 },
2217 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
2218 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
2219 DISPLAY_FLAGS_SYNC_POSEDGE,
2222 static const struct panel_desc logictechno_lt161010_2nh = {
2223 .timings = &logictechno_lt161010_2nh_timing,
2229 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2230 .bus_flags = DRM_BUS_FLAG_DE_HIGH |
2231 DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
2232 DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE,
2233 .connector_type = DRM_MODE_CONNECTOR_DPI,
2236 static const struct display_timing logictechno_lt170410_2whc_timing = {
2237 .pixelclock = { 68900000, 71100000, 73400000 },
2238 .hactive = { 1280, 1280, 1280 },
2239 .hfront_porch = { 23, 60, 71 },
2240 .hback_porch = { 23, 60, 71 },
2241 .hsync_len = { 15, 40, 47 },
2242 .vactive = { 800, 800, 800 },
2243 .vfront_porch = { 5, 7, 10 },
2244 .vback_porch = { 5, 7, 10 },
2245 .vsync_len = { 6, 9, 12 },
2246 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
2247 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
2248 DISPLAY_FLAGS_SYNC_POSEDGE,
2251 static const struct panel_desc logictechno_lt170410_2whc = {
2252 .timings = &logictechno_lt170410_2whc_timing,
2258 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2259 .bus_flags = DRM_BUS_FLAG_DE_HIGH |
2260 DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
2261 DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE,
2262 .connector_type = DRM_MODE_CONNECTOR_LVDS,
2265 static const struct drm_display_mode mitsubishi_aa070mc01_mode = {
2268 .hsync_start = 800 + 0,
2269 .hsync_end = 800 + 1,
2270 .htotal = 800 + 0 + 1 + 160,
2272 .vsync_start = 480 + 0,
2273 .vsync_end = 480 + 48 + 1,
2274 .vtotal = 480 + 48 + 1 + 0,
2276 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
2279 static const struct drm_display_mode logicpd_type_28_mode = {
2282 .hsync_start = 480 + 3,
2283 .hsync_end = 480 + 3 + 42,
2284 .htotal = 480 + 3 + 42 + 2,
2287 .vsync_start = 272 + 2,
2288 .vsync_end = 272 + 2 + 11,
2289 .vtotal = 272 + 2 + 11 + 3,
2291 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
2294 static const struct panel_desc logicpd_type_28 = {
2295 .modes = &logicpd_type_28_mode,
2308 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2309 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
2310 DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE,
2313 static const struct panel_desc mitsubishi_aa070mc01 = {
2314 .modes = &mitsubishi_aa070mc01_mode,
2327 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2328 .connector_type = DRM_MODE_CONNECTOR_LVDS,
2329 .bus_flags = DRM_BUS_FLAG_DE_HIGH,
2332 static const struct display_timing nec_nl12880bc20_05_timing = {
2333 .pixelclock = { 67000000, 71000000, 75000000 },
2334 .hactive = { 1280, 1280, 1280 },
2335 .hfront_porch = { 2, 30, 30 },
2336 .hback_porch = { 6, 100, 100 },
2337 .hsync_len = { 2, 30, 30 },
2338 .vactive = { 800, 800, 800 },
2339 .vfront_porch = { 5, 5, 5 },
2340 .vback_porch = { 11, 11, 11 },
2341 .vsync_len = { 7, 7, 7 },
2344 static const struct panel_desc nec_nl12880bc20_05 = {
2345 .timings = &nec_nl12880bc20_05_timing,
2356 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2357 .connector_type = DRM_MODE_CONNECTOR_LVDS,
2360 static const struct drm_display_mode nec_nl4827hc19_05b_mode = {
2363 .hsync_start = 480 + 2,
2364 .hsync_end = 480 + 2 + 41,
2365 .htotal = 480 + 2 + 41 + 2,
2367 .vsync_start = 272 + 2,
2368 .vsync_end = 272 + 2 + 4,
2369 .vtotal = 272 + 2 + 4 + 2,
2371 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2374 static const struct panel_desc nec_nl4827hc19_05b = {
2375 .modes = &nec_nl4827hc19_05b_mode,
2382 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2383 .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
2386 static const struct drm_display_mode netron_dy_e231732_mode = {
2389 .hsync_start = 1024 + 160,
2390 .hsync_end = 1024 + 160 + 70,
2391 .htotal = 1024 + 160 + 70 + 90,
2393 .vsync_start = 600 + 127,
2394 .vsync_end = 600 + 127 + 20,
2395 .vtotal = 600 + 127 + 20 + 3,
2399 static const struct panel_desc netron_dy_e231732 = {
2400 .modes = &netron_dy_e231732_mode,
2406 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2409 static const struct drm_display_mode neweast_wjfh116008a_modes[] = {
2413 .hsync_start = 1920 + 48,
2414 .hsync_end = 1920 + 48 + 32,
2415 .htotal = 1920 + 48 + 32 + 80,
2417 .vsync_start = 1080 + 3,
2418 .vsync_end = 1080 + 3 + 5,
2419 .vtotal = 1080 + 3 + 5 + 23,
2421 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2425 .hsync_start = 1920 + 48,
2426 .hsync_end = 1920 + 48 + 32,
2427 .htotal = 1920 + 48 + 32 + 80,
2429 .vsync_start = 1080 + 3,
2430 .vsync_end = 1080 + 3 + 5,
2431 .vtotal = 1080 + 3 + 5 + 23,
2433 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2437 static const struct panel_desc neweast_wjfh116008a = {
2438 .modes = neweast_wjfh116008a_modes,
2450 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2451 .connector_type = DRM_MODE_CONNECTOR_eDP,
2454 static const struct drm_display_mode newhaven_nhd_43_480272ef_atxl_mode = {
2457 .hsync_start = 480 + 2,
2458 .hsync_end = 480 + 2 + 41,
2459 .htotal = 480 + 2 + 41 + 2,
2461 .vsync_start = 272 + 2,
2462 .vsync_end = 272 + 2 + 10,
2463 .vtotal = 272 + 2 + 10 + 2,
2465 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2468 static const struct panel_desc newhaven_nhd_43_480272ef_atxl = {
2469 .modes = &newhaven_nhd_43_480272ef_atxl_mode,
2476 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2477 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
2478 DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
2481 static const struct display_timing nlt_nl192108ac18_02d_timing = {
2482 .pixelclock = { 130000000, 148350000, 163000000 },
2483 .hactive = { 1920, 1920, 1920 },
2484 .hfront_porch = { 80, 100, 100 },
2485 .hback_porch = { 100, 120, 120 },
2486 .hsync_len = { 50, 60, 60 },
2487 .vactive = { 1080, 1080, 1080 },
2488 .vfront_porch = { 12, 30, 30 },
2489 .vback_porch = { 4, 10, 10 },
2490 .vsync_len = { 4, 5, 5 },
2493 static const struct panel_desc nlt_nl192108ac18_02d = {
2494 .timings = &nlt_nl192108ac18_02d_timing,
2504 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2505 .connector_type = DRM_MODE_CONNECTOR_LVDS,
2508 static const struct drm_display_mode nvd_9128_mode = {
2511 .hsync_start = 800 + 130,
2512 .hsync_end = 800 + 130 + 98,
2513 .htotal = 800 + 0 + 130 + 98,
2515 .vsync_start = 480 + 10,
2516 .vsync_end = 480 + 10 + 50,
2517 .vtotal = 480 + 0 + 10 + 50,
2520 static const struct panel_desc nvd_9128 = {
2521 .modes = &nvd_9128_mode,
2528 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2529 .connector_type = DRM_MODE_CONNECTOR_LVDS,
2532 static const struct display_timing okaya_rs800480t_7x0gp_timing = {
2533 .pixelclock = { 30000000, 30000000, 40000000 },
2534 .hactive = { 800, 800, 800 },
2535 .hfront_porch = { 40, 40, 40 },
2536 .hback_porch = { 40, 40, 40 },
2537 .hsync_len = { 1, 48, 48 },
2538 .vactive = { 480, 480, 480 },
2539 .vfront_porch = { 13, 13, 13 },
2540 .vback_porch = { 29, 29, 29 },
2541 .vsync_len = { 3, 3, 3 },
2542 .flags = DISPLAY_FLAGS_DE_HIGH,
2545 static const struct panel_desc okaya_rs800480t_7x0gp = {
2546 .timings = &okaya_rs800480t_7x0gp_timing,
2559 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2562 static const struct drm_display_mode olimex_lcd_olinuxino_43ts_mode = {
2565 .hsync_start = 480 + 5,
2566 .hsync_end = 480 + 5 + 30,
2567 .htotal = 480 + 5 + 30 + 10,
2569 .vsync_start = 272 + 8,
2570 .vsync_end = 272 + 8 + 5,
2571 .vtotal = 272 + 8 + 5 + 3,
2575 static const struct panel_desc olimex_lcd_olinuxino_43ts = {
2576 .modes = &olimex_lcd_olinuxino_43ts_mode,
2582 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2586 * 800x480 CVT. The panel appears to be quite accepting, at least as far as
2587 * pixel clocks, but this is the timing that was being used in the Adafruit
2588 * installation instructions.
2590 static const struct drm_display_mode ontat_yx700wv03_mode = {
2601 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2606 * https://www.adafruit.com/images/product-files/2406/c3163.pdf
2608 static const struct panel_desc ontat_yx700wv03 = {
2609 .modes = &ontat_yx700wv03_mode,
2616 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2619 static const struct drm_display_mode ortustech_com37h3m_mode = {
2622 .hsync_start = 480 + 40,
2623 .hsync_end = 480 + 40 + 10,
2624 .htotal = 480 + 40 + 10 + 40,
2626 .vsync_start = 640 + 4,
2627 .vsync_end = 640 + 4 + 2,
2628 .vtotal = 640 + 4 + 2 + 4,
2630 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2633 static const struct panel_desc ortustech_com37h3m = {
2634 .modes = &ortustech_com37h3m_mode,
2638 .width = 56, /* 56.16mm */
2639 .height = 75, /* 74.88mm */
2641 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2642 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE |
2643 DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
2646 static const struct drm_display_mode ortustech_com43h4m85ulc_mode = {
2649 .hsync_start = 480 + 10,
2650 .hsync_end = 480 + 10 + 10,
2651 .htotal = 480 + 10 + 10 + 15,
2653 .vsync_start = 800 + 3,
2654 .vsync_end = 800 + 3 + 3,
2655 .vtotal = 800 + 3 + 3 + 3,
2659 static const struct panel_desc ortustech_com43h4m85ulc = {
2660 .modes = &ortustech_com43h4m85ulc_mode,
2667 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2668 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
2669 .connector_type = DRM_MODE_CONNECTOR_DPI,
2672 static const struct drm_display_mode osddisplays_osd070t1718_19ts_mode = {
2675 .hsync_start = 800 + 210,
2676 .hsync_end = 800 + 210 + 30,
2677 .htotal = 800 + 210 + 30 + 16,
2679 .vsync_start = 480 + 22,
2680 .vsync_end = 480 + 22 + 13,
2681 .vtotal = 480 + 22 + 13 + 10,
2683 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2686 static const struct panel_desc osddisplays_osd070t1718_19ts = {
2687 .modes = &osddisplays_osd070t1718_19ts_mode,
2694 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2695 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
2696 DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
2697 .connector_type = DRM_MODE_CONNECTOR_DPI,
2700 static const struct drm_display_mode pda_91_00156_a0_mode = {
2703 .hsync_start = 800 + 1,
2704 .hsync_end = 800 + 1 + 64,
2705 .htotal = 800 + 1 + 64 + 64,
2707 .vsync_start = 480 + 1,
2708 .vsync_end = 480 + 1 + 23,
2709 .vtotal = 480 + 1 + 23 + 22,
2713 static const struct panel_desc pda_91_00156_a0 = {
2714 .modes = &pda_91_00156_a0_mode,
2720 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2724 static const struct drm_display_mode qd43003c0_40_mode = {
2727 .hsync_start = 480 + 8,
2728 .hsync_end = 480 + 8 + 4,
2729 .htotal = 480 + 8 + 4 + 39,
2731 .vsync_start = 272 + 4,
2732 .vsync_end = 272 + 4 + 10,
2733 .vtotal = 272 + 4 + 10 + 2,
2737 static const struct panel_desc qd43003c0_40 = {
2738 .modes = &qd43003c0_40_mode,
2745 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2748 static const struct display_timing rocktech_rk070er9427_timing = {
2749 .pixelclock = { 26400000, 33300000, 46800000 },
2750 .hactive = { 800, 800, 800 },
2751 .hfront_porch = { 16, 210, 354 },
2752 .hback_porch = { 46, 46, 46 },
2753 .hsync_len = { 1, 1, 1 },
2754 .vactive = { 480, 480, 480 },
2755 .vfront_porch = { 7, 22, 147 },
2756 .vback_porch = { 23, 23, 23 },
2757 .vsync_len = { 1, 1, 1 },
2758 .flags = DISPLAY_FLAGS_DE_HIGH,
2761 static const struct panel_desc rocktech_rk070er9427 = {
2762 .timings = &rocktech_rk070er9427_timing,
2775 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2778 static const struct drm_display_mode rocktech_rk101ii01d_ct_mode = {
2781 .hsync_start = 1280 + 48,
2782 .hsync_end = 1280 + 48 + 32,
2783 .htotal = 1280 + 48 + 32 + 80,
2785 .vsync_start = 800 + 2,
2786 .vsync_end = 800 + 2 + 5,
2787 .vtotal = 800 + 2 + 5 + 16,
2791 static const struct panel_desc rocktech_rk101ii01d_ct = {
2792 .modes = &rocktech_rk101ii01d_ct_mode,
2802 .bus_flags = DRM_BUS_FLAG_DE_HIGH,
2803 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2804 .connector_type = DRM_MODE_CONNECTOR_LVDS,
2807 static const struct drm_display_mode samsung_lsn122dl01_c01_mode = {
2810 .hsync_start = 2560 + 48,
2811 .hsync_end = 2560 + 48 + 32,
2812 .htotal = 2560 + 48 + 32 + 80,
2814 .vsync_start = 1600 + 2,
2815 .vsync_end = 1600 + 2 + 5,
2816 .vtotal = 1600 + 2 + 5 + 57,
2820 static const struct panel_desc samsung_lsn122dl01_c01 = {
2821 .modes = &samsung_lsn122dl01_c01_mode,
2829 static const struct drm_display_mode samsung_ltn101nt05_mode = {
2832 .hsync_start = 1024 + 24,
2833 .hsync_end = 1024 + 24 + 136,
2834 .htotal = 1024 + 24 + 136 + 160,
2836 .vsync_start = 600 + 3,
2837 .vsync_end = 600 + 3 + 6,
2838 .vtotal = 600 + 3 + 6 + 61,
2842 static const struct panel_desc samsung_ltn101nt05 = {
2843 .modes = &samsung_ltn101nt05_mode,
2852 static const struct drm_display_mode samsung_ltn140at29_301_mode = {
2855 .hsync_start = 1366 + 64,
2856 .hsync_end = 1366 + 64 + 48,
2857 .htotal = 1366 + 64 + 48 + 128,
2859 .vsync_start = 768 + 2,
2860 .vsync_end = 768 + 2 + 5,
2861 .vtotal = 768 + 2 + 5 + 17,
2865 static const struct panel_desc samsung_ltn140at29_301 = {
2866 .modes = &samsung_ltn140at29_301_mode,
2875 static const struct display_timing satoz_sat050at40h12r2_timing = {
2876 .pixelclock = {33300000, 33300000, 50000000},
2877 .hactive = {800, 800, 800},
2878 .hfront_porch = {16, 210, 354},
2879 .hback_porch = {46, 46, 46},
2880 .hsync_len = {1, 1, 40},
2881 .vactive = {480, 480, 480},
2882 .vfront_porch = {7, 22, 147},
2883 .vback_porch = {23, 23, 23},
2884 .vsync_len = {1, 1, 20},
2887 static const struct panel_desc satoz_sat050at40h12r2 = {
2888 .timings = &satoz_sat050at40h12r2_timing,
2895 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2896 .connector_type = DRM_MODE_CONNECTOR_LVDS,
2899 static const struct drm_display_mode sharp_ld_d5116z01b_mode = {
2902 .hsync_start = 1920 + 48,
2903 .hsync_end = 1920 + 48 + 32,
2904 .htotal = 1920 + 48 + 32 + 80,
2906 .vsync_start = 1280 + 3,
2907 .vsync_end = 1280 + 3 + 10,
2908 .vtotal = 1280 + 3 + 10 + 57,
2910 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
2913 static const struct panel_desc sharp_ld_d5116z01b = {
2914 .modes = &sharp_ld_d5116z01b_mode,
2921 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2922 .bus_flags = DRM_BUS_FLAG_DATA_MSB_TO_LSB,
2925 static const struct drm_display_mode sharp_lq070y3dg3b_mode = {
2928 .hsync_start = 800 + 64,
2929 .hsync_end = 800 + 64 + 128,
2930 .htotal = 800 + 64 + 128 + 64,
2932 .vsync_start = 480 + 8,
2933 .vsync_end = 480 + 8 + 2,
2934 .vtotal = 480 + 8 + 2 + 35,
2936 .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE,
2939 static const struct panel_desc sharp_lq070y3dg3b = {
2940 .modes = &sharp_lq070y3dg3b_mode,
2944 .width = 152, /* 152.4mm */
2945 .height = 91, /* 91.4mm */
2947 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2948 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE |
2949 DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
2952 static const struct drm_display_mode sharp_lq035q7db03_mode = {
2955 .hsync_start = 240 + 16,
2956 .hsync_end = 240 + 16 + 7,
2957 .htotal = 240 + 16 + 7 + 5,
2959 .vsync_start = 320 + 9,
2960 .vsync_end = 320 + 9 + 1,
2961 .vtotal = 320 + 9 + 1 + 7,
2965 static const struct panel_desc sharp_lq035q7db03 = {
2966 .modes = &sharp_lq035q7db03_mode,
2973 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2976 static const struct display_timing sharp_lq101k1ly04_timing = {
2977 .pixelclock = { 60000000, 65000000, 80000000 },
2978 .hactive = { 1280, 1280, 1280 },
2979 .hfront_porch = { 20, 20, 20 },
2980 .hback_porch = { 20, 20, 20 },
2981 .hsync_len = { 10, 10, 10 },
2982 .vactive = { 800, 800, 800 },
2983 .vfront_porch = { 4, 4, 4 },
2984 .vback_porch = { 4, 4, 4 },
2985 .vsync_len = { 4, 4, 4 },
2986 .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE,
2989 static const struct panel_desc sharp_lq101k1ly04 = {
2990 .timings = &sharp_lq101k1ly04_timing,
2997 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
2998 .connector_type = DRM_MODE_CONNECTOR_LVDS,
3001 static const struct display_timing sharp_lq123p1jx31_timing = {
3002 .pixelclock = { 252750000, 252750000, 266604720 },
3003 .hactive = { 2400, 2400, 2400 },
3004 .hfront_porch = { 48, 48, 48 },
3005 .hback_porch = { 80, 80, 84 },
3006 .hsync_len = { 32, 32, 32 },
3007 .vactive = { 1600, 1600, 1600 },
3008 .vfront_porch = { 3, 3, 3 },
3009 .vback_porch = { 33, 33, 120 },
3010 .vsync_len = { 10, 10, 10 },
3011 .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW,
3014 static const struct panel_desc sharp_lq123p1jx31 = {
3015 .timings = &sharp_lq123p1jx31_timing,
3029 static const struct display_timing sharp_ls020b1dd01d_timing = {
3030 .pixelclock = { 2000000, 4200000, 5000000 },
3031 .hactive = { 240, 240, 240 },
3032 .hfront_porch = { 66, 66, 66 },
3033 .hback_porch = { 1, 1, 1 },
3034 .hsync_len = { 1, 1, 1 },
3035 .vactive = { 160, 160, 160 },
3036 .vfront_porch = { 52, 52, 52 },
3037 .vback_porch = { 6, 6, 6 },
3038 .vsync_len = { 10, 10, 10 },
3039 .flags = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_LOW,
3042 static const struct panel_desc sharp_ls020b1dd01d = {
3043 .timings = &sharp_ls020b1dd01d_timing,
3050 .bus_format = MEDIA_BUS_FMT_RGB565_1X16,
3051 .bus_flags = DRM_BUS_FLAG_DE_HIGH
3052 | DRM_BUS_FLAG_PIXDATA_NEGEDGE
3053 | DRM_BUS_FLAG_SHARP_SIGNALS,
3056 static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = {
3059 .hsync_start = 800 + 1,
3060 .hsync_end = 800 + 1 + 64,
3061 .htotal = 800 + 1 + 64 + 64,
3063 .vsync_start = 480 + 1,
3064 .vsync_end = 480 + 1 + 23,
3065 .vtotal = 480 + 1 + 23 + 22,
3069 static const struct panel_desc shelly_sca07010_bfn_lnn = {
3070 .modes = &shelly_sca07010_bfn_lnn_mode,
3076 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
3079 static const struct drm_display_mode starry_kr122ea0sra_mode = {
3082 .hsync_start = 1920 + 16,
3083 .hsync_end = 1920 + 16 + 16,
3084 .htotal = 1920 + 16 + 16 + 32,
3086 .vsync_start = 1200 + 15,
3087 .vsync_end = 1200 + 15 + 2,
3088 .vtotal = 1200 + 15 + 2 + 18,
3090 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3093 static const struct panel_desc starry_kr122ea0sra = {
3094 .modes = &starry_kr122ea0sra_mode,
3101 .prepare = 10 + 200,
3103 .unprepare = 10 + 500,
3107 static const struct drm_display_mode tfc_s9700rtwv43tr_01b_mode = {
3110 .hsync_start = 800 + 39,
3111 .hsync_end = 800 + 39 + 47,
3112 .htotal = 800 + 39 + 47 + 39,
3114 .vsync_start = 480 + 13,
3115 .vsync_end = 480 + 13 + 2,
3116 .vtotal = 480 + 13 + 2 + 29,
3120 static const struct panel_desc tfc_s9700rtwv43tr_01b = {
3121 .modes = &tfc_s9700rtwv43tr_01b_mode,
3128 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3129 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
3132 static const struct display_timing tianma_tm070jdhg30_timing = {
3133 .pixelclock = { 62600000, 68200000, 78100000 },
3134 .hactive = { 1280, 1280, 1280 },
3135 .hfront_porch = { 15, 64, 159 },
3136 .hback_porch = { 5, 5, 5 },
3137 .hsync_len = { 1, 1, 256 },
3138 .vactive = { 800, 800, 800 },
3139 .vfront_porch = { 3, 40, 99 },
3140 .vback_porch = { 2, 2, 2 },
3141 .vsync_len = { 1, 1, 128 },
3142 .flags = DISPLAY_FLAGS_DE_HIGH,
3145 static const struct panel_desc tianma_tm070jdhg30 = {
3146 .timings = &tianma_tm070jdhg30_timing,
3153 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
3154 .connector_type = DRM_MODE_CONNECTOR_LVDS,
3157 static const struct display_timing tianma_tm070rvhg71_timing = {
3158 .pixelclock = { 27700000, 29200000, 39600000 },
3159 .hactive = { 800, 800, 800 },
3160 .hfront_porch = { 12, 40, 212 },
3161 .hback_porch = { 88, 88, 88 },
3162 .hsync_len = { 1, 1, 40 },
3163 .vactive = { 480, 480, 480 },
3164 .vfront_porch = { 1, 13, 88 },
3165 .vback_porch = { 32, 32, 32 },
3166 .vsync_len = { 1, 1, 3 },
3167 .flags = DISPLAY_FLAGS_DE_HIGH,
3170 static const struct panel_desc tianma_tm070rvhg71 = {
3171 .timings = &tianma_tm070rvhg71_timing,
3178 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
3179 .connector_type = DRM_MODE_CONNECTOR_LVDS,
3182 static const struct drm_display_mode ti_nspire_cx_lcd_mode[] = {
3186 .hsync_start = 320 + 50,
3187 .hsync_end = 320 + 50 + 6,
3188 .htotal = 320 + 50 + 6 + 38,
3190 .vsync_start = 240 + 3,
3191 .vsync_end = 240 + 3 + 1,
3192 .vtotal = 240 + 3 + 1 + 17,
3194 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3198 static const struct panel_desc ti_nspire_cx_lcd_panel = {
3199 .modes = ti_nspire_cx_lcd_mode,
3206 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3207 .bus_flags = DRM_BUS_FLAG_PIXDATA_NEGEDGE,
3210 static const struct drm_display_mode ti_nspire_classic_lcd_mode[] = {
3214 .hsync_start = 320 + 6,
3215 .hsync_end = 320 + 6 + 6,
3216 .htotal = 320 + 6 + 6 + 6,
3218 .vsync_start = 240 + 0,
3219 .vsync_end = 240 + 0 + 1,
3220 .vtotal = 240 + 0 + 1 + 0,
3222 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
3226 static const struct panel_desc ti_nspire_classic_lcd_panel = {
3227 .modes = ti_nspire_classic_lcd_mode,
3229 /* The grayscale panel has 8 bit for the color .. Y (black) */
3235 /* This is the grayscale bus format */
3236 .bus_format = MEDIA_BUS_FMT_Y8_1X8,
3237 .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE,
3240 static const struct drm_display_mode toshiba_lt089ac29000_mode = {
3243 .hsync_start = 1280 + 192,
3244 .hsync_end = 1280 + 192 + 128,
3245 .htotal = 1280 + 192 + 128 + 64,
3247 .vsync_start = 768 + 20,
3248 .vsync_end = 768 + 20 + 7,
3249 .vtotal = 768 + 20 + 7 + 3,
3253 static const struct panel_desc toshiba_lt089ac29000 = {
3254 .modes = &toshiba_lt089ac29000_mode,
3260 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
3261 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
3262 .connector_type = DRM_MODE_CONNECTOR_LVDS,
3265 static const struct drm_display_mode tpk_f07a_0102_mode = {
3268 .hsync_start = 800 + 40,
3269 .hsync_end = 800 + 40 + 128,
3270 .htotal = 800 + 40 + 128 + 88,
3272 .vsync_start = 480 + 10,
3273 .vsync_end = 480 + 10 + 2,
3274 .vtotal = 480 + 10 + 2 + 33,
3278 static const struct panel_desc tpk_f07a_0102 = {
3279 .modes = &tpk_f07a_0102_mode,
3285 .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
3288 static const struct drm_display_mode tpk_f10a_0102_mode = {
3291 .hsync_start = 1024 + 176,
3292 .hsync_end = 1024 + 176 + 5,
3293 .htotal = 1024 + 176 + 5 + 88,
3295 .vsync_start = 600 + 20,
3296 .vsync_end = 600 + 20 + 5,
3297 .vtotal = 600 + 20 + 5 + 25,
3301 static const struct panel_desc tpk_f10a_0102 = {
3302 .modes = &tpk_f10a_0102_mode,
3310 static const struct display_timing urt_umsh_8596md_timing = {
3311 .pixelclock = { 33260000, 33260000, 33260000 },
3312 .hactive = { 800, 800, 800 },
3313 .hfront_porch = { 41, 41, 41 },
3314 .hback_porch = { 216 - 128, 216 - 128, 216 - 128 },
3315 .hsync_len = { 71, 128, 128 },
3316 .vactive = { 480, 480, 480 },
3317 .vfront_porch = { 10, 10, 10 },
3318 .vback_porch = { 35 - 2, 35 - 2, 35 - 2 },
3319 .vsync_len = { 2, 2, 2 },
3320 .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE |
3321 DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
3324 static const struct panel_desc urt_umsh_8596md_lvds = {
3325 .timings = &urt_umsh_8596md_timing,
3332 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
3333 .connector_type = DRM_MODE_CONNECTOR_LVDS,
3336 static const struct panel_desc urt_umsh_8596md_parallel = {
3337 .timings = &urt_umsh_8596md_timing,
3344 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
3347 static const struct drm_display_mode vl050_8048nt_c01_mode = {
3350 .hsync_start = 800 + 210,
3351 .hsync_end = 800 + 210 + 20,
3352 .htotal = 800 + 210 + 20 + 46,
3354 .vsync_start = 480 + 22,
3355 .vsync_end = 480 + 22 + 10,
3356 .vtotal = 480 + 22 + 10 + 23,
3358 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
3361 static const struct panel_desc vl050_8048nt_c01 = {
3362 .modes = &vl050_8048nt_c01_mode,
3369 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3370 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
3373 static const struct drm_display_mode winstar_wf35ltiacd_mode = {
3376 .hsync_start = 320 + 20,
3377 .hsync_end = 320 + 20 + 30,
3378 .htotal = 320 + 20 + 30 + 38,
3380 .vsync_start = 240 + 4,
3381 .vsync_end = 240 + 4 + 3,
3382 .vtotal = 240 + 4 + 3 + 15,
3384 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3387 static const struct panel_desc winstar_wf35ltiacd = {
3388 .modes = &winstar_wf35ltiacd_mode,
3395 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3398 static const struct drm_display_mode arm_rtsm_mode[] = {
3402 .hsync_start = 1024 + 24,
3403 .hsync_end = 1024 + 24 + 136,
3404 .htotal = 1024 + 24 + 136 + 160,
3406 .vsync_start = 768 + 3,
3407 .vsync_end = 768 + 3 + 6,
3408 .vtotal = 768 + 3 + 6 + 29,
3410 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3414 static const struct panel_desc arm_rtsm = {
3415 .modes = arm_rtsm_mode,
3422 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3425 static const struct of_device_id platform_of_match[] = {
3427 .compatible = "ampire,am-480272h3tmqw-t01h",
3428 .data = &ire_am_480272h3tmqw_t01h,
3430 .compatible = "ampire,am800480r3tmqwa1h",
3431 .data = &ire_am800480r3tmqwa1h,
3433 .compatible = "arm,rtsm-display",
3436 .compatible = "armadeus,st0700-adapt",
3437 .data = &armadeus_st0700_adapt,
3439 .compatible = "auo,b101aw03",
3440 .data = &auo_b101aw03,
3442 .compatible = "auo,b101ean01",
3443 .data = &auo_b101ean01,
3445 .compatible = "auo,b101xtn01",
3446 .data = &auo_b101xtn01,
3448 .compatible = "auo,b116xa01",
3449 .data = &auo_b116xak01,
3451 .compatible = "auo,b116xw03",
3452 .data = &auo_b116xw03,
3454 .compatible = "auo,b133htn01",
3455 .data = &auo_b133htn01,
3457 .compatible = "auo,b133xtn01",
3458 .data = &auo_b133xtn01,
3460 .compatible = "auo,g070vvn01",
3461 .data = &auo_g070vvn01,
3463 .compatible = "auo,g101evn010",
3464 .data = &auo_g101evn010,
3466 .compatible = "auo,g104sn02",
3467 .data = &auo_g104sn02,
3469 .compatible = "auo,g133han01",
3470 .data = &auo_g133han01,
3472 .compatible = "auo,g185han01",
3473 .data = &auo_g185han01,
3475 .compatible = "auo,p320hvn03",
3476 .data = &auo_p320hvn03,
3478 .compatible = "auo,t215hvn01",
3479 .data = &auo_t215hvn01,
3481 .compatible = "avic,tm070ddh03",
3482 .data = &avic_tm070ddh03,
3484 .compatible = "bananapi,s070wv20-ct16",
3485 .data = &bananapi_s070wv20_ct16,
3487 .compatible = "boe,hv070wsa-100",
3488 .data = &boe_hv070wsa
3490 .compatible = "boe,nv101wxmn51",
3491 .data = &boe_nv101wxmn51,
3493 .compatible = "boe,nv140fhmn49",
3494 .data = &boe_nv140fhmn49,
3496 .compatible = "cdtech,s043wq26h-ct7",
3497 .data = &cdtech_s043wq26h_ct7,
3499 .compatible = "cdtech,s070wv95-ct16",
3500 .data = &cdtech_s070wv95_ct16,
3502 .compatible = "chunghwa,claa070wp03xg",
3503 .data = &chunghwa_claa070wp03xg,
3505 .compatible = "chunghwa,claa101wa01a",
3506 .data = &chunghwa_claa101wa01a
3508 .compatible = "chunghwa,claa101wb01",
3509 .data = &chunghwa_claa101wb01
3511 .compatible = "dataimage,scf0700c48ggu18",
3512 .data = &dataimage_scf0700c48ggu18,
3514 .compatible = "dlc,dlc0700yzg-1",
3515 .data = &dlc_dlc0700yzg_1,
3517 .compatible = "dlc,dlc1010gig",
3518 .data = &dlc_dlc1010gig,
3520 .compatible = "edt,et035012dm6",
3521 .data = &edt_et035012dm6,
3523 .compatible = "edt,etm043080dh6gp",
3524 .data = &edt_etm043080dh6gp,
3526 .compatible = "edt,etm0430g0dh6",
3527 .data = &edt_etm0430g0dh6,
3529 .compatible = "edt,et057090dhu",
3530 .data = &edt_et057090dhu,
3532 .compatible = "edt,et070080dh6",
3533 .data = &edt_etm0700g0dh6,
3535 .compatible = "edt,etm0700g0dh6",
3536 .data = &edt_etm0700g0dh6,
3538 .compatible = "edt,etm0700g0bdh6",
3539 .data = &edt_etm0700g0bdh6,
3541 .compatible = "edt,etm0700g0edh6",
3542 .data = &edt_etm0700g0bdh6,
3544 .compatible = "evervision,vgg804821",
3545 .data = &evervision_vgg804821,
3547 .compatible = "foxlink,fl500wvr00-a0t",
3548 .data = &foxlink_fl500wvr00_a0t,
3550 .compatible = "frida,frd350h54004",
3551 .data = &frida_frd350h54004,
3553 .compatible = "friendlyarm,hd702e",
3554 .data = &friendlyarm_hd702e,
3556 .compatible = "giantplus,gpg482739qs5",
3557 .data = &giantplus_gpg482739qs5
3559 .compatible = "giantplus,gpm940b0",
3560 .data = &giantplus_gpm940b0,
3562 .compatible = "hannstar,hsd070pww1",
3563 .data = &hannstar_hsd070pww1,
3565 .compatible = "hannstar,hsd100pxn1",
3566 .data = &hannstar_hsd100pxn1,
3568 .compatible = "hit,tx23d38vm0caa",
3569 .data = &hitachi_tx23d38vm0caa
3571 .compatible = "innolux,at043tn24",
3572 .data = &innolux_at043tn24,
3574 .compatible = "innolux,at070tn92",
3575 .data = &innolux_at070tn92,
3577 .compatible = "innolux,g070y2-l01",
3578 .data = &innolux_g070y2_l01,
3580 .compatible = "innolux,g101ice-l01",
3581 .data = &innolux_g101ice_l01
3583 .compatible = "innolux,g121i1-l01",
3584 .data = &innolux_g121i1_l01
3586 .compatible = "innolux,g121x1-l03",
3587 .data = &innolux_g121x1_l03,
3589 .compatible = "innolux,n116bge",
3590 .data = &innolux_n116bge,
3592 .compatible = "innolux,n156bge-l21",
3593 .data = &innolux_n156bge_l21,
3595 .compatible = "innolux,p120zdg-bf1",
3596 .data = &innolux_p120zdg_bf1,
3598 .compatible = "innolux,zj070na-01p",
3599 .data = &innolux_zj070na_01p,
3601 .compatible = "koe,tx14d24vm1bpa",
3602 .data = &koe_tx14d24vm1bpa,
3604 .compatible = "koe,tx31d200vm0baa",
3605 .data = &koe_tx31d200vm0baa,
3607 .compatible = "kyo,tcg121xglp",
3608 .data = &kyo_tcg121xglp,
3610 .compatible = "lemaker,bl035-rgb-002",
3611 .data = &lemaker_bl035_rgb_002,
3613 .compatible = "lg,lb070wv8",
3614 .data = &lg_lb070wv8,
3616 .compatible = "lg,lp079qx1-sp0v",
3617 .data = &lg_lp079qx1_sp0v,
3619 .compatible = "lg,lp097qx1-spa1",
3620 .data = &lg_lp097qx1_spa1,
3622 .compatible = "lg,lp120up1",
3623 .data = &lg_lp120up1,
3625 .compatible = "lg,lp129qe",
3626 .data = &lg_lp129qe,
3628 .compatible = "logicpd,type28",
3629 .data = &logicpd_type_28,
3631 .compatible = "logictechno,lt161010-2nhc",
3632 .data = &logictechno_lt161010_2nh,
3634 .compatible = "logictechno,lt161010-2nhr",
3635 .data = &logictechno_lt161010_2nh,
3637 .compatible = "logictechno,lt170410-2whc",
3638 .data = &logictechno_lt170410_2whc,
3640 .compatible = "mitsubishi,aa070mc01-ca1",
3641 .data = &mitsubishi_aa070mc01,
3643 .compatible = "nec,nl12880bc20-05",
3644 .data = &nec_nl12880bc20_05,
3646 .compatible = "nec,nl4827hc19-05b",
3647 .data = &nec_nl4827hc19_05b,
3649 .compatible = "netron-dy,e231732",
3650 .data = &netron_dy_e231732,
3652 .compatible = "neweast,wjfh116008a",
3653 .data = &neweast_wjfh116008a,
3655 .compatible = "newhaven,nhd-4.3-480272ef-atxl",
3656 .data = &newhaven_nhd_43_480272ef_atxl,
3658 .compatible = "nlt,nl192108ac18-02d",
3659 .data = &nlt_nl192108ac18_02d,
3661 .compatible = "nvd,9128",
3664 .compatible = "okaya,rs800480t-7x0gp",
3665 .data = &okaya_rs800480t_7x0gp,
3667 .compatible = "olimex,lcd-olinuxino-43-ts",
3668 .data = &olimex_lcd_olinuxino_43ts,
3670 .compatible = "ontat,yx700wv03",
3671 .data = &ontat_yx700wv03,
3673 .compatible = "ortustech,com37h3m05dtc",
3674 .data = &ortustech_com37h3m,
3676 .compatible = "ortustech,com37h3m99dtc",
3677 .data = &ortustech_com37h3m,
3679 .compatible = "ortustech,com43h4m85ulc",
3680 .data = &ortustech_com43h4m85ulc,
3682 .compatible = "osddisplays,osd070t1718-19ts",
3683 .data = &osddisplays_osd070t1718_19ts,
3685 .compatible = "pda,91-00156-a0",
3686 .data = &pda_91_00156_a0,
3688 .compatible = "qiaodian,qd43003c0-40",
3689 .data = &qd43003c0_40,
3691 .compatible = "rocktech,rk070er9427",
3692 .data = &rocktech_rk070er9427,
3694 .compatible = "rocktech,rk101ii01d-ct",
3695 .data = &rocktech_rk101ii01d_ct,
3697 .compatible = "samsung,lsn122dl01-c01",
3698 .data = &samsung_lsn122dl01_c01,
3700 .compatible = "samsung,ltn101nt05",
3701 .data = &samsung_ltn101nt05,
3703 .compatible = "samsung,ltn140at29-301",
3704 .data = &samsung_ltn140at29_301,
3706 .compatible = "satoz,sat050at40h12r2",
3707 .data = &satoz_sat050at40h12r2,
3709 .compatible = "sharp,ld-d5116z01b",
3710 .data = &sharp_ld_d5116z01b,
3712 .compatible = "sharp,lq035q7db03",
3713 .data = &sharp_lq035q7db03,
3715 .compatible = "sharp,lq070y3dg3b",
3716 .data = &sharp_lq070y3dg3b,
3718 .compatible = "sharp,lq101k1ly04",
3719 .data = &sharp_lq101k1ly04,
3721 .compatible = "sharp,lq123p1jx31",
3722 .data = &sharp_lq123p1jx31,
3724 .compatible = "sharp,ls020b1dd01d",
3725 .data = &sharp_ls020b1dd01d,
3727 .compatible = "shelly,sca07010-bfn-lnn",
3728 .data = &shelly_sca07010_bfn_lnn,
3730 .compatible = "starry,kr122ea0sra",
3731 .data = &starry_kr122ea0sra,
3733 .compatible = "tfc,s9700rtwv43tr-01b",
3734 .data = &tfc_s9700rtwv43tr_01b,
3736 .compatible = "tianma,tm070jdhg30",
3737 .data = &tianma_tm070jdhg30,
3739 .compatible = "tianma,tm070rvhg71",
3740 .data = &tianma_tm070rvhg71,
3742 .compatible = "ti,nspire-cx-lcd-panel",
3743 .data = &ti_nspire_cx_lcd_panel,
3745 .compatible = "ti,nspire-classic-lcd-panel",
3746 .data = &ti_nspire_classic_lcd_panel,
3748 .compatible = "toshiba,lt089ac29000",
3749 .data = &toshiba_lt089ac29000,
3751 .compatible = "tpk,f07a-0102",
3752 .data = &tpk_f07a_0102,
3754 .compatible = "tpk,f10a-0102",
3755 .data = &tpk_f10a_0102,
3757 .compatible = "urt,umsh-8596md-t",
3758 .data = &urt_umsh_8596md_parallel,
3760 .compatible = "urt,umsh-8596md-1t",
3761 .data = &urt_umsh_8596md_parallel,
3763 .compatible = "urt,umsh-8596md-7t",
3764 .data = &urt_umsh_8596md_parallel,
3766 .compatible = "urt,umsh-8596md-11t",
3767 .data = &urt_umsh_8596md_lvds,
3769 .compatible = "urt,umsh-8596md-19t",
3770 .data = &urt_umsh_8596md_lvds,
3772 .compatible = "urt,umsh-8596md-20t",
3773 .data = &urt_umsh_8596md_parallel,
3775 .compatible = "vxt,vl050-8048nt-c01",
3776 .data = &vl050_8048nt_c01,
3778 .compatible = "winstar,wf35ltiacd",
3779 .data = &winstar_wf35ltiacd,
3781 /* Must be the last entry */
3782 .compatible = "panel-dpi",
3788 MODULE_DEVICE_TABLE(of, platform_of_match);
3790 static int panel_simple_platform_probe(struct platform_device *pdev)
3792 const struct of_device_id *id;
3794 id = of_match_node(platform_of_match, pdev->dev.of_node);
3798 return panel_simple_probe(&pdev->dev, id->data);
3801 static int panel_simple_platform_remove(struct platform_device *pdev)
3803 return panel_simple_remove(&pdev->dev);
3806 static void panel_simple_platform_shutdown(struct platform_device *pdev)
3808 panel_simple_shutdown(&pdev->dev);
3811 static struct platform_driver panel_simple_platform_driver = {
3813 .name = "panel-simple",
3814 .of_match_table = platform_of_match,
3816 .probe = panel_simple_platform_probe,
3817 .remove = panel_simple_platform_remove,
3818 .shutdown = panel_simple_platform_shutdown,
3821 struct panel_desc_dsi {
3822 struct panel_desc desc;
3824 unsigned long flags;
3825 enum mipi_dsi_pixel_format format;
3829 static const struct drm_display_mode auo_b080uan01_mode = {
3832 .hsync_start = 1200 + 62,
3833 .hsync_end = 1200 + 62 + 4,
3834 .htotal = 1200 + 62 + 4 + 62,
3836 .vsync_start = 1920 + 9,
3837 .vsync_end = 1920 + 9 + 2,
3838 .vtotal = 1920 + 9 + 2 + 8,
3842 static const struct panel_desc_dsi auo_b080uan01 = {
3844 .modes = &auo_b080uan01_mode,
3852 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
3853 .format = MIPI_DSI_FMT_RGB888,
3857 static const struct drm_display_mode boe_tv080wum_nl0_mode = {
3860 .hsync_start = 1200 + 120,
3861 .hsync_end = 1200 + 120 + 20,
3862 .htotal = 1200 + 120 + 20 + 21,
3864 .vsync_start = 1920 + 21,
3865 .vsync_end = 1920 + 21 + 3,
3866 .vtotal = 1920 + 21 + 3 + 18,
3868 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3871 static const struct panel_desc_dsi boe_tv080wum_nl0 = {
3873 .modes = &boe_tv080wum_nl0_mode,
3880 .flags = MIPI_DSI_MODE_VIDEO |
3881 MIPI_DSI_MODE_VIDEO_BURST |
3882 MIPI_DSI_MODE_VIDEO_SYNC_PULSE,
3883 .format = MIPI_DSI_FMT_RGB888,
3887 static const struct drm_display_mode lg_ld070wx3_sl01_mode = {
3890 .hsync_start = 800 + 32,
3891 .hsync_end = 800 + 32 + 1,
3892 .htotal = 800 + 32 + 1 + 57,
3894 .vsync_start = 1280 + 28,
3895 .vsync_end = 1280 + 28 + 1,
3896 .vtotal = 1280 + 28 + 1 + 14,
3900 static const struct panel_desc_dsi lg_ld070wx3_sl01 = {
3902 .modes = &lg_ld070wx3_sl01_mode,
3910 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
3911 .format = MIPI_DSI_FMT_RGB888,
3915 static const struct drm_display_mode lg_lh500wx1_sd03_mode = {
3918 .hsync_start = 720 + 12,
3919 .hsync_end = 720 + 12 + 4,
3920 .htotal = 720 + 12 + 4 + 112,
3922 .vsync_start = 1280 + 8,
3923 .vsync_end = 1280 + 8 + 4,
3924 .vtotal = 1280 + 8 + 4 + 12,
3928 static const struct panel_desc_dsi lg_lh500wx1_sd03 = {
3930 .modes = &lg_lh500wx1_sd03_mode,
3938 .flags = MIPI_DSI_MODE_VIDEO,
3939 .format = MIPI_DSI_FMT_RGB888,
3943 static const struct drm_display_mode panasonic_vvx10f004b00_mode = {
3946 .hsync_start = 1920 + 154,
3947 .hsync_end = 1920 + 154 + 16,
3948 .htotal = 1920 + 154 + 16 + 32,
3950 .vsync_start = 1200 + 17,
3951 .vsync_end = 1200 + 17 + 2,
3952 .vtotal = 1200 + 17 + 2 + 16,
3956 static const struct panel_desc_dsi panasonic_vvx10f004b00 = {
3958 .modes = &panasonic_vvx10f004b00_mode,
3966 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
3967 MIPI_DSI_CLOCK_NON_CONTINUOUS,
3968 .format = MIPI_DSI_FMT_RGB888,
3972 static const struct drm_display_mode lg_acx467akm_7_mode = {
3975 .hsync_start = 1080 + 2,
3976 .hsync_end = 1080 + 2 + 2,
3977 .htotal = 1080 + 2 + 2 + 2,
3979 .vsync_start = 1920 + 2,
3980 .vsync_end = 1920 + 2 + 2,
3981 .vtotal = 1920 + 2 + 2 + 2,
3985 static const struct panel_desc_dsi lg_acx467akm_7 = {
3987 .modes = &lg_acx467akm_7_mode,
3996 .format = MIPI_DSI_FMT_RGB888,
4000 static const struct drm_display_mode osd101t2045_53ts_mode = {
4003 .hsync_start = 1920 + 112,
4004 .hsync_end = 1920 + 112 + 16,
4005 .htotal = 1920 + 112 + 16 + 32,
4007 .vsync_start = 1200 + 16,
4008 .vsync_end = 1200 + 16 + 2,
4009 .vtotal = 1200 + 16 + 2 + 16,
4011 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
4014 static const struct panel_desc_dsi osd101t2045_53ts = {
4016 .modes = &osd101t2045_53ts_mode,
4024 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
4025 MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
4026 MIPI_DSI_MODE_EOT_PACKET,
4027 .format = MIPI_DSI_FMT_RGB888,
4031 static const struct of_device_id dsi_of_match[] = {
4033 .compatible = "auo,b080uan01",
4034 .data = &auo_b080uan01
4036 .compatible = "boe,tv080wum-nl0",
4037 .data = &boe_tv080wum_nl0
4039 .compatible = "lg,ld070wx3-sl01",
4040 .data = &lg_ld070wx3_sl01
4042 .compatible = "lg,lh500wx1-sd03",
4043 .data = &lg_lh500wx1_sd03
4045 .compatible = "panasonic,vvx10f004b00",
4046 .data = &panasonic_vvx10f004b00
4048 .compatible = "lg,acx467akm-7",
4049 .data = &lg_acx467akm_7
4051 .compatible = "osddisplays,osd101t2045-53ts",
4052 .data = &osd101t2045_53ts
4057 MODULE_DEVICE_TABLE(of, dsi_of_match);
4059 static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
4061 const struct panel_desc_dsi *desc;
4062 const struct of_device_id *id;
4065 id = of_match_node(dsi_of_match, dsi->dev.of_node);
4071 err = panel_simple_probe(&dsi->dev, &desc->desc);
4075 dsi->mode_flags = desc->flags;
4076 dsi->format = desc->format;
4077 dsi->lanes = desc->lanes;
4079 err = mipi_dsi_attach(dsi);
4081 struct panel_simple *panel = dev_get_drvdata(&dsi->dev);
4083 drm_panel_remove(&panel->base);
4089 static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi)
4093 err = mipi_dsi_detach(dsi);
4095 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
4097 return panel_simple_remove(&dsi->dev);
4100 static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi)
4102 panel_simple_shutdown(&dsi->dev);
4105 static struct mipi_dsi_driver panel_simple_dsi_driver = {
4107 .name = "panel-simple-dsi",
4108 .of_match_table = dsi_of_match,
4110 .probe = panel_simple_dsi_probe,
4111 .remove = panel_simple_dsi_remove,
4112 .shutdown = panel_simple_dsi_shutdown,
4115 static int __init panel_simple_init(void)
4119 err = platform_driver_register(&panel_simple_platform_driver);
4123 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) {
4124 err = mipi_dsi_driver_register(&panel_simple_dsi_driver);
4131 module_init(panel_simple_init);
4133 static void __exit panel_simple_exit(void)
4135 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI))
4136 mipi_dsi_driver_unregister(&panel_simple_dsi_driver);
4138 platform_driver_unregister(&panel_simple_platform_driver);
4140 module_exit(panel_simple_exit);
4143 MODULE_DESCRIPTION("DRM Driver for Simple Panels");
4144 MODULE_LICENSE("GPL and additional rights");