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/backlight.h>
25 #include <linux/delay.h>
26 #include <linux/gpio/consumer.h>
27 #include <linux/module.h>
28 #include <linux/of_platform.h>
29 #include <linux/platform_device.h>
30 #include <linux/regulator/consumer.h>
32 #include <video/display_timing.h>
33 #include <video/of_display_timing.h>
34 #include <video/videomode.h>
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>
42 * @modes: Pointer to array of fixed modes appropriate for this panel. If
43 * only one mode then this can just be the address of this the mode.
44 * NOTE: cannot be used with "timings" and also if this is specified
45 * then you cannot override the mode in the device tree.
46 * @num_modes: Number of elements in modes array.
47 * @timings: Pointer to array of display timings. NOTE: cannot be used with
48 * "modes" and also these will be used to validate a device tree
49 * override if one is present.
50 * @num_timings: Number of elements in timings array.
51 * @bpc: Bits per color.
52 * @size: Structure containing the physical size of this panel.
53 * @delay: Structure containing various delay values for this panel.
54 * @bus_format: See MEDIA_BUS_FMT_... defines.
55 * @bus_flags: See DRM_BUS_FLAG_... defines.
58 const struct drm_display_mode *modes;
59 unsigned int num_modes;
60 const struct display_timing *timings;
61 unsigned int num_timings;
66 * @width: width (in millimeters) of the panel's active display area
67 * @height: height (in millimeters) of the panel's active display area
75 * @prepare: the time (in milliseconds) that it takes for the panel to
76 * become ready and start receiving video data
77 * @hpd_absent_delay: Add this to the prepare delay if we know Hot
78 * Plug Detect isn't used.
79 * @enable: the time (in milliseconds) that it takes for the panel to
80 * display the first valid frame after starting to receive
82 * @disable: the time (in milliseconds) that it takes for the panel to
83 * turn the display off (no content is visible)
84 * @unprepare: the time (in milliseconds) that it takes for the panel
85 * to power itself down completely
89 unsigned int hpd_absent_delay;
92 unsigned int unprepare;
100 struct drm_panel base;
105 const struct panel_desc *desc;
107 struct backlight_device *backlight;
108 struct regulator *supply;
109 struct i2c_adapter *ddc;
111 struct gpio_desc *enable_gpio;
113 struct drm_display_mode override_mode;
116 static inline struct panel_simple *to_panel_simple(struct drm_panel *panel)
118 return container_of(panel, struct panel_simple, base);
121 static unsigned int panel_simple_get_timings_modes(struct panel_simple *panel)
123 struct drm_connector *connector = panel->base.connector;
124 struct drm_device *drm = panel->base.drm;
125 struct drm_display_mode *mode;
126 unsigned int i, num = 0;
128 for (i = 0; i < panel->desc->num_timings; i++) {
129 const struct display_timing *dt = &panel->desc->timings[i];
132 videomode_from_timing(dt, &vm);
133 mode = drm_mode_create(drm);
135 dev_err(drm->dev, "failed to add mode %ux%u\n",
136 dt->hactive.typ, dt->vactive.typ);
140 drm_display_mode_from_videomode(&vm, mode);
142 mode->type |= DRM_MODE_TYPE_DRIVER;
144 if (panel->desc->num_timings == 1)
145 mode->type |= DRM_MODE_TYPE_PREFERRED;
147 drm_mode_probed_add(connector, mode);
154 static unsigned int panel_simple_get_display_modes(struct panel_simple *panel)
156 struct drm_connector *connector = panel->base.connector;
157 struct drm_device *drm = panel->base.drm;
158 struct drm_display_mode *mode;
159 unsigned int i, num = 0;
161 for (i = 0; i < panel->desc->num_modes; i++) {
162 const struct drm_display_mode *m = &panel->desc->modes[i];
164 mode = drm_mode_duplicate(drm, m);
166 dev_err(drm->dev, "failed to add mode %ux%u@%u\n",
167 m->hdisplay, m->vdisplay, m->vrefresh);
171 mode->type |= DRM_MODE_TYPE_DRIVER;
173 if (panel->desc->num_modes == 1)
174 mode->type |= DRM_MODE_TYPE_PREFERRED;
176 drm_mode_set_name(mode);
178 drm_mode_probed_add(connector, mode);
185 static int panel_simple_get_non_edid_modes(struct panel_simple *panel)
187 struct drm_connector *connector = panel->base.connector;
188 struct drm_device *drm = panel->base.drm;
189 struct drm_display_mode *mode;
190 bool has_override = panel->override_mode.type;
191 unsigned int num = 0;
197 mode = drm_mode_duplicate(drm, &panel->override_mode);
199 drm_mode_probed_add(connector, mode);
202 dev_err(drm->dev, "failed to add override mode\n");
206 /* Only add timings if override was not there or failed to validate */
207 if (num == 0 && panel->desc->num_timings)
208 num = panel_simple_get_timings_modes(panel);
211 * Only add fixed modes if timings/override added no mode.
213 * We should only ever have either the display timings specified
214 * or a fixed mode. Anything else is rather bogus.
216 WARN_ON(panel->desc->num_timings && panel->desc->num_modes);
218 num = panel_simple_get_display_modes(panel);
220 connector->display_info.bpc = panel->desc->bpc;
221 connector->display_info.width_mm = panel->desc->size.width;
222 connector->display_info.height_mm = panel->desc->size.height;
223 if (panel->desc->bus_format)
224 drm_display_info_set_bus_formats(&connector->display_info,
225 &panel->desc->bus_format, 1);
226 connector->display_info.bus_flags = panel->desc->bus_flags;
231 static int panel_simple_disable(struct drm_panel *panel)
233 struct panel_simple *p = to_panel_simple(panel);
239 p->backlight->props.power = FB_BLANK_POWERDOWN;
240 p->backlight->props.state |= BL_CORE_FBBLANK;
241 backlight_update_status(p->backlight);
244 if (p->desc->delay.disable)
245 msleep(p->desc->delay.disable);
252 static int panel_simple_unprepare(struct drm_panel *panel)
254 struct panel_simple *p = to_panel_simple(panel);
259 gpiod_set_value_cansleep(p->enable_gpio, 0);
261 regulator_disable(p->supply);
263 if (p->desc->delay.unprepare)
264 msleep(p->desc->delay.unprepare);
271 static int panel_simple_prepare(struct drm_panel *panel)
273 struct panel_simple *p = to_panel_simple(panel);
280 err = regulator_enable(p->supply);
282 dev_err(panel->dev, "failed to enable supply: %d\n", err);
286 gpiod_set_value_cansleep(p->enable_gpio, 1);
288 delay = p->desc->delay.prepare;
290 delay += p->desc->delay.hpd_absent_delay;
299 static int panel_simple_enable(struct drm_panel *panel)
301 struct panel_simple *p = to_panel_simple(panel);
306 if (p->desc->delay.enable)
307 msleep(p->desc->delay.enable);
310 p->backlight->props.state &= ~BL_CORE_FBBLANK;
311 p->backlight->props.power = FB_BLANK_UNBLANK;
312 backlight_update_status(p->backlight);
320 static int panel_simple_get_modes(struct drm_panel *panel)
322 struct panel_simple *p = to_panel_simple(panel);
325 /* probe EDID if a DDC bus is available */
327 struct edid *edid = drm_get_edid(panel->connector, p->ddc);
328 drm_connector_update_edid_property(panel->connector, edid);
330 num += drm_add_edid_modes(panel->connector, edid);
335 /* add hard-coded panel modes */
336 num += panel_simple_get_non_edid_modes(p);
341 static int panel_simple_get_timings(struct drm_panel *panel,
342 unsigned int num_timings,
343 struct display_timing *timings)
345 struct panel_simple *p = to_panel_simple(panel);
348 if (p->desc->num_timings < num_timings)
349 num_timings = p->desc->num_timings;
352 for (i = 0; i < num_timings; i++)
353 timings[i] = p->desc->timings[i];
355 return p->desc->num_timings;
358 static const struct drm_panel_funcs panel_simple_funcs = {
359 .disable = panel_simple_disable,
360 .unprepare = panel_simple_unprepare,
361 .prepare = panel_simple_prepare,
362 .enable = panel_simple_enable,
363 .get_modes = panel_simple_get_modes,
364 .get_timings = panel_simple_get_timings,
367 #define PANEL_SIMPLE_BOUNDS_CHECK(to_check, bounds, field) \
368 (to_check->field.typ >= bounds->field.min && \
369 to_check->field.typ <= bounds->field.max)
370 static void panel_simple_parse_panel_timing_node(struct device *dev,
371 struct panel_simple *panel,
372 const struct display_timing *ot)
374 const struct panel_desc *desc = panel->desc;
378 if (WARN_ON(desc->num_modes)) {
379 dev_err(dev, "Reject override mode: panel has a fixed mode\n");
382 if (WARN_ON(!desc->num_timings)) {
383 dev_err(dev, "Reject override mode: no timings specified\n");
387 for (i = 0; i < panel->desc->num_timings; i++) {
388 const struct display_timing *dt = &panel->desc->timings[i];
390 if (!PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hactive) ||
391 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hfront_porch) ||
392 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hback_porch) ||
393 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hsync_len) ||
394 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vactive) ||
395 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vfront_porch) ||
396 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vback_porch) ||
397 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vsync_len))
400 if (ot->flags != dt->flags)
403 videomode_from_timing(ot, &vm);
404 drm_display_mode_from_videomode(&vm, &panel->override_mode);
405 panel->override_mode.type |= DRM_MODE_TYPE_DRIVER |
406 DRM_MODE_TYPE_PREFERRED;
410 if (WARN_ON(!panel->override_mode.type))
411 dev_err(dev, "Reject override mode: No display_timing found\n");
414 static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
416 struct device_node *backlight, *ddc;
417 struct panel_simple *panel;
418 struct display_timing dt;
421 panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL);
425 panel->enabled = false;
426 panel->prepared = false;
429 panel->no_hpd = of_property_read_bool(dev->of_node, "no-hpd");
431 panel->supply = devm_regulator_get(dev, "power");
432 if (IS_ERR(panel->supply))
433 return PTR_ERR(panel->supply);
435 panel->enable_gpio = devm_gpiod_get_optional(dev, "enable",
437 if (IS_ERR(panel->enable_gpio)) {
438 err = PTR_ERR(panel->enable_gpio);
439 if (err != -EPROBE_DEFER)
440 dev_err(dev, "failed to request GPIO: %d\n", err);
444 backlight = of_parse_phandle(dev->of_node, "backlight", 0);
446 panel->backlight = of_find_backlight_by_node(backlight);
447 of_node_put(backlight);
449 if (!panel->backlight)
450 return -EPROBE_DEFER;
453 ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0);
455 panel->ddc = of_find_i2c_adapter_by_node(ddc);
464 if (!of_get_display_timing(dev->of_node, "panel-timing", &dt))
465 panel_simple_parse_panel_timing_node(dev, panel, &dt);
467 drm_panel_init(&panel->base);
468 panel->base.dev = dev;
469 panel->base.funcs = &panel_simple_funcs;
471 err = drm_panel_add(&panel->base);
475 dev_set_drvdata(dev, panel);
481 put_device(&panel->ddc->dev);
483 if (panel->backlight)
484 put_device(&panel->backlight->dev);
489 static int panel_simple_remove(struct device *dev)
491 struct panel_simple *panel = dev_get_drvdata(dev);
493 drm_panel_remove(&panel->base);
495 panel_simple_disable(&panel->base);
496 panel_simple_unprepare(&panel->base);
499 put_device(&panel->ddc->dev);
501 if (panel->backlight)
502 put_device(&panel->backlight->dev);
507 static void panel_simple_shutdown(struct device *dev)
509 struct panel_simple *panel = dev_get_drvdata(dev);
511 panel_simple_disable(&panel->base);
512 panel_simple_unprepare(&panel->base);
515 static const struct drm_display_mode ampire_am_480272h3tmqw_t01h_mode = {
518 .hsync_start = 480 + 2,
519 .hsync_end = 480 + 2 + 41,
520 .htotal = 480 + 2 + 41 + 2,
522 .vsync_start = 272 + 2,
523 .vsync_end = 272 + 2 + 10,
524 .vtotal = 272 + 2 + 10 + 2,
526 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
529 static const struct panel_desc ampire_am_480272h3tmqw_t01h = {
530 .modes = &ire_am_480272h3tmqw_t01h_mode,
537 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
540 static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = {
543 .hsync_start = 800 + 0,
544 .hsync_end = 800 + 0 + 255,
545 .htotal = 800 + 0 + 255 + 0,
547 .vsync_start = 480 + 2,
548 .vsync_end = 480 + 2 + 45,
549 .vtotal = 480 + 2 + 45 + 0,
551 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
554 static const struct panel_desc ampire_am800480r3tmqwa1h = {
555 .modes = &ire_am800480r3tmqwa1h_mode,
562 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
565 static const struct display_timing santek_st0700i5y_rbslw_f_timing = {
566 .pixelclock = { 26400000, 33300000, 46800000 },
567 .hactive = { 800, 800, 800 },
568 .hfront_porch = { 16, 210, 354 },
569 .hback_porch = { 45, 36, 6 },
570 .hsync_len = { 1, 10, 40 },
571 .vactive = { 480, 480, 480 },
572 .vfront_porch = { 7, 22, 147 },
573 .vback_porch = { 22, 13, 3 },
574 .vsync_len = { 1, 10, 20 },
575 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
576 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE
579 static const struct panel_desc armadeus_st0700_adapt = {
580 .timings = &santek_st0700i5y_rbslw_f_timing,
587 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
588 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
591 static const struct drm_display_mode auo_b101aw03_mode = {
594 .hsync_start = 1024 + 156,
595 .hsync_end = 1024 + 156 + 8,
596 .htotal = 1024 + 156 + 8 + 156,
598 .vsync_start = 600 + 16,
599 .vsync_end = 600 + 16 + 6,
600 .vtotal = 600 + 16 + 6 + 16,
604 static const struct panel_desc auo_b101aw03 = {
605 .modes = &auo_b101aw03_mode,
614 static const struct display_timing auo_b101ean01_timing = {
615 .pixelclock = { 65300000, 72500000, 75000000 },
616 .hactive = { 1280, 1280, 1280 },
617 .hfront_porch = { 18, 119, 119 },
618 .hback_porch = { 21, 21, 21 },
619 .hsync_len = { 32, 32, 32 },
620 .vactive = { 800, 800, 800 },
621 .vfront_porch = { 4, 4, 4 },
622 .vback_porch = { 8, 8, 8 },
623 .vsync_len = { 18, 20, 20 },
626 static const struct panel_desc auo_b101ean01 = {
627 .timings = &auo_b101ean01_timing,
636 static const struct drm_display_mode auo_b101xtn01_mode = {
639 .hsync_start = 1366 + 20,
640 .hsync_end = 1366 + 20 + 70,
641 .htotal = 1366 + 20 + 70,
643 .vsync_start = 768 + 14,
644 .vsync_end = 768 + 14 + 42,
645 .vtotal = 768 + 14 + 42,
647 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
650 static const struct panel_desc auo_b101xtn01 = {
651 .modes = &auo_b101xtn01_mode,
660 static const struct drm_display_mode auo_b116xw03_mode = {
663 .hsync_start = 1366 + 40,
664 .hsync_end = 1366 + 40 + 40,
665 .htotal = 1366 + 40 + 40 + 32,
667 .vsync_start = 768 + 10,
668 .vsync_end = 768 + 10 + 12,
669 .vtotal = 768 + 10 + 12 + 6,
673 static const struct panel_desc auo_b116xw03 = {
674 .modes = &auo_b116xw03_mode,
683 static const struct drm_display_mode auo_b133xtn01_mode = {
686 .hsync_start = 1366 + 48,
687 .hsync_end = 1366 + 48 + 32,
688 .htotal = 1366 + 48 + 32 + 20,
690 .vsync_start = 768 + 3,
691 .vsync_end = 768 + 3 + 6,
692 .vtotal = 768 + 3 + 6 + 13,
696 static const struct panel_desc auo_b133xtn01 = {
697 .modes = &auo_b133xtn01_mode,
706 static const struct drm_display_mode auo_b133htn01_mode = {
709 .hsync_start = 1920 + 172,
710 .hsync_end = 1920 + 172 + 80,
711 .htotal = 1920 + 172 + 80 + 60,
713 .vsync_start = 1080 + 25,
714 .vsync_end = 1080 + 25 + 10,
715 .vtotal = 1080 + 25 + 10 + 10,
719 static const struct panel_desc auo_b133htn01 = {
720 .modes = &auo_b133htn01_mode,
734 static const struct display_timing auo_g070vvn01_timings = {
735 .pixelclock = { 33300000, 34209000, 45000000 },
736 .hactive = { 800, 800, 800 },
737 .hfront_porch = { 20, 40, 200 },
738 .hback_porch = { 87, 40, 1 },
739 .hsync_len = { 1, 48, 87 },
740 .vactive = { 480, 480, 480 },
741 .vfront_porch = { 5, 13, 200 },
742 .vback_porch = { 31, 31, 29 },
743 .vsync_len = { 1, 1, 3 },
746 static const struct panel_desc auo_g070vvn01 = {
747 .timings = &auo_g070vvn01_timings,
762 static const struct drm_display_mode auo_g101evn010_mode = {
765 .hsync_start = 1280 + 82,
766 .hsync_end = 1280 + 82 + 2,
767 .htotal = 1280 + 82 + 2 + 84,
769 .vsync_start = 800 + 8,
770 .vsync_end = 800 + 8 + 2,
771 .vtotal = 800 + 8 + 2 + 6,
775 static const struct panel_desc auo_g101evn010 = {
776 .modes = &auo_g101evn010_mode,
783 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
786 static const struct drm_display_mode auo_g104sn02_mode = {
789 .hsync_start = 800 + 40,
790 .hsync_end = 800 + 40 + 216,
791 .htotal = 800 + 40 + 216 + 128,
793 .vsync_start = 600 + 10,
794 .vsync_end = 600 + 10 + 35,
795 .vtotal = 600 + 10 + 35 + 2,
799 static const struct panel_desc auo_g104sn02 = {
800 .modes = &auo_g104sn02_mode,
809 static const struct display_timing auo_g133han01_timings = {
810 .pixelclock = { 134000000, 141200000, 149000000 },
811 .hactive = { 1920, 1920, 1920 },
812 .hfront_porch = { 39, 58, 77 },
813 .hback_porch = { 59, 88, 117 },
814 .hsync_len = { 28, 42, 56 },
815 .vactive = { 1080, 1080, 1080 },
816 .vfront_porch = { 3, 8, 11 },
817 .vback_porch = { 5, 14, 19 },
818 .vsync_len = { 4, 14, 19 },
821 static const struct panel_desc auo_g133han01 = {
822 .timings = &auo_g133han01_timings,
835 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
838 static const struct display_timing auo_g185han01_timings = {
839 .pixelclock = { 120000000, 144000000, 175000000 },
840 .hactive = { 1920, 1920, 1920 },
841 .hfront_porch = { 36, 120, 148 },
842 .hback_porch = { 24, 88, 108 },
843 .hsync_len = { 20, 48, 64 },
844 .vactive = { 1080, 1080, 1080 },
845 .vfront_porch = { 6, 10, 40 },
846 .vback_porch = { 2, 5, 20 },
847 .vsync_len = { 2, 5, 20 },
850 static const struct panel_desc auo_g185han01 = {
851 .timings = &auo_g185han01_timings,
864 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
867 static const struct display_timing auo_p320hvn03_timings = {
868 .pixelclock = { 106000000, 148500000, 164000000 },
869 .hactive = { 1920, 1920, 1920 },
870 .hfront_porch = { 25, 50, 130 },
871 .hback_porch = { 25, 50, 130 },
872 .hsync_len = { 20, 40, 105 },
873 .vactive = { 1080, 1080, 1080 },
874 .vfront_porch = { 8, 17, 150 },
875 .vback_porch = { 8, 17, 150 },
876 .vsync_len = { 4, 11, 100 },
879 static const struct panel_desc auo_p320hvn03 = {
880 .timings = &auo_p320hvn03_timings,
892 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
895 static const struct drm_display_mode auo_t215hvn01_mode = {
898 .hsync_start = 1920 + 88,
899 .hsync_end = 1920 + 88 + 44,
900 .htotal = 1920 + 88 + 44 + 148,
902 .vsync_start = 1080 + 4,
903 .vsync_end = 1080 + 4 + 5,
904 .vtotal = 1080 + 4 + 5 + 36,
908 static const struct panel_desc auo_t215hvn01 = {
909 .modes = &auo_t215hvn01_mode,
922 static const struct drm_display_mode avic_tm070ddh03_mode = {
925 .hsync_start = 1024 + 160,
926 .hsync_end = 1024 + 160 + 4,
927 .htotal = 1024 + 160 + 4 + 156,
929 .vsync_start = 600 + 17,
930 .vsync_end = 600 + 17 + 1,
931 .vtotal = 600 + 17 + 1 + 17,
935 static const struct panel_desc avic_tm070ddh03 = {
936 .modes = &avic_tm070ddh03_mode,
950 static const struct drm_display_mode bananapi_s070wv20_ct16_mode = {
953 .hsync_start = 800 + 40,
954 .hsync_end = 800 + 40 + 48,
955 .htotal = 800 + 40 + 48 + 40,
957 .vsync_start = 480 + 13,
958 .vsync_end = 480 + 13 + 3,
959 .vtotal = 480 + 13 + 3 + 29,
962 static const struct panel_desc bananapi_s070wv20_ct16 = {
963 .modes = &bananapi_s070wv20_ct16_mode,
972 static const struct drm_display_mode boe_hv070wsa_mode = {
975 .hsync_start = 1024 + 30,
976 .hsync_end = 1024 + 30 + 30,
977 .htotal = 1024 + 30 + 30 + 30,
979 .vsync_start = 600 + 10,
980 .vsync_end = 600 + 10 + 10,
981 .vtotal = 600 + 10 + 10 + 10,
985 static const struct panel_desc boe_hv070wsa = {
986 .modes = &boe_hv070wsa_mode,
994 static const struct drm_display_mode boe_nv101wxmn51_modes[] = {
998 .hsync_start = 1280 + 48,
999 .hsync_end = 1280 + 48 + 32,
1000 .htotal = 1280 + 48 + 32 + 80,
1002 .vsync_start = 800 + 3,
1003 .vsync_end = 800 + 3 + 5,
1004 .vtotal = 800 + 3 + 5 + 24,
1010 .hsync_start = 1280 + 48,
1011 .hsync_end = 1280 + 48 + 32,
1012 .htotal = 1280 + 48 + 32 + 80,
1014 .vsync_start = 800 + 3,
1015 .vsync_end = 800 + 3 + 5,
1016 .vtotal = 800 + 3 + 5 + 24,
1021 static const struct panel_desc boe_nv101wxmn51 = {
1022 .modes = boe_nv101wxmn51_modes,
1023 .num_modes = ARRAY_SIZE(boe_nv101wxmn51_modes),
1036 static const struct drm_display_mode cdtech_s043wq26h_ct7_mode = {
1039 .hsync_start = 480 + 5,
1040 .hsync_end = 480 + 5 + 5,
1041 .htotal = 480 + 5 + 5 + 40,
1043 .vsync_start = 272 + 8,
1044 .vsync_end = 272 + 8 + 8,
1045 .vtotal = 272 + 8 + 8 + 8,
1047 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1050 static const struct panel_desc cdtech_s043wq26h_ct7 = {
1051 .modes = &cdtech_s043wq26h_ct7_mode,
1058 .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
1061 static const struct drm_display_mode cdtech_s070wv95_ct16_mode = {
1064 .hsync_start = 800 + 40,
1065 .hsync_end = 800 + 40 + 40,
1066 .htotal = 800 + 40 + 40 + 48,
1068 .vsync_start = 480 + 29,
1069 .vsync_end = 480 + 29 + 13,
1070 .vtotal = 480 + 29 + 13 + 3,
1072 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1075 static const struct panel_desc cdtech_s070wv95_ct16 = {
1076 .modes = &cdtech_s070wv95_ct16_mode,
1085 static const struct drm_display_mode chunghwa_claa070wp03xg_mode = {
1088 .hsync_start = 800 + 49,
1089 .hsync_end = 800 + 49 + 33,
1090 .htotal = 800 + 49 + 33 + 17,
1092 .vsync_start = 1280 + 1,
1093 .vsync_end = 1280 + 1 + 7,
1094 .vtotal = 1280 + 1 + 7 + 15,
1096 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1099 static const struct panel_desc chunghwa_claa070wp03xg = {
1100 .modes = &chunghwa_claa070wp03xg_mode,
1109 static const struct drm_display_mode chunghwa_claa101wa01a_mode = {
1112 .hsync_start = 1366 + 58,
1113 .hsync_end = 1366 + 58 + 58,
1114 .htotal = 1366 + 58 + 58 + 58,
1116 .vsync_start = 768 + 4,
1117 .vsync_end = 768 + 4 + 4,
1118 .vtotal = 768 + 4 + 4 + 4,
1122 static const struct panel_desc chunghwa_claa101wa01a = {
1123 .modes = &chunghwa_claa101wa01a_mode,
1132 static const struct drm_display_mode chunghwa_claa101wb01_mode = {
1135 .hsync_start = 1366 + 48,
1136 .hsync_end = 1366 + 48 + 32,
1137 .htotal = 1366 + 48 + 32 + 20,
1139 .vsync_start = 768 + 16,
1140 .vsync_end = 768 + 16 + 8,
1141 .vtotal = 768 + 16 + 8 + 16,
1145 static const struct panel_desc chunghwa_claa101wb01 = {
1146 .modes = &chunghwa_claa101wb01_mode,
1155 static const struct drm_display_mode dataimage_scf0700c48ggu18_mode = {
1158 .hsync_start = 800 + 40,
1159 .hsync_end = 800 + 40 + 128,
1160 .htotal = 800 + 40 + 128 + 88,
1162 .vsync_start = 480 + 10,
1163 .vsync_end = 480 + 10 + 2,
1164 .vtotal = 480 + 10 + 2 + 33,
1166 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1169 static const struct panel_desc dataimage_scf0700c48ggu18 = {
1170 .modes = &dataimage_scf0700c48ggu18_mode,
1177 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1178 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
1181 static const struct display_timing dlc_dlc0700yzg_1_timing = {
1182 .pixelclock = { 45000000, 51200000, 57000000 },
1183 .hactive = { 1024, 1024, 1024 },
1184 .hfront_porch = { 100, 106, 113 },
1185 .hback_porch = { 100, 106, 113 },
1186 .hsync_len = { 100, 108, 114 },
1187 .vactive = { 600, 600, 600 },
1188 .vfront_porch = { 8, 11, 15 },
1189 .vback_porch = { 8, 11, 15 },
1190 .vsync_len = { 9, 13, 15 },
1191 .flags = DISPLAY_FLAGS_DE_HIGH,
1194 static const struct panel_desc dlc_dlc0700yzg_1 = {
1195 .timings = &dlc_dlc0700yzg_1_timing,
1207 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1210 static const struct display_timing dlc_dlc1010gig_timing = {
1211 .pixelclock = { 68900000, 71100000, 73400000 },
1212 .hactive = { 1280, 1280, 1280 },
1213 .hfront_porch = { 43, 53, 63 },
1214 .hback_porch = { 43, 53, 63 },
1215 .hsync_len = { 44, 54, 64 },
1216 .vactive = { 800, 800, 800 },
1217 .vfront_porch = { 5, 8, 11 },
1218 .vback_porch = { 5, 8, 11 },
1219 .vsync_len = { 5, 7, 11 },
1220 .flags = DISPLAY_FLAGS_DE_HIGH,
1223 static const struct panel_desc dlc_dlc1010gig = {
1224 .timings = &dlc_dlc1010gig_timing,
1237 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1240 static const struct drm_display_mode edt_et035012dm6_mode = {
1243 .hsync_start = 320 + 20,
1244 .hsync_end = 320 + 20 + 30,
1245 .htotal = 320 + 20 + 68,
1247 .vsync_start = 240 + 4,
1248 .vsync_end = 240 + 4 + 4,
1249 .vtotal = 240 + 4 + 4 + 14,
1251 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1254 static const struct panel_desc edt_et035012dm6 = {
1255 .modes = &edt_et035012dm6_mode,
1262 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1263 .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
1266 static const struct drm_display_mode edt_etm0430g0dh6_mode = {
1269 .hsync_start = 480 + 2,
1270 .hsync_end = 480 + 2 + 41,
1271 .htotal = 480 + 2 + 41 + 2,
1273 .vsync_start = 272 + 2,
1274 .vsync_end = 272 + 2 + 10,
1275 .vtotal = 272 + 2 + 10 + 2,
1277 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1280 static const struct panel_desc edt_etm0430g0dh6 = {
1281 .modes = &edt_etm0430g0dh6_mode,
1290 static const struct drm_display_mode edt_et057090dhu_mode = {
1293 .hsync_start = 640 + 16,
1294 .hsync_end = 640 + 16 + 30,
1295 .htotal = 640 + 16 + 30 + 114,
1297 .vsync_start = 480 + 10,
1298 .vsync_end = 480 + 10 + 3,
1299 .vtotal = 480 + 10 + 3 + 32,
1301 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1304 static const struct panel_desc edt_et057090dhu = {
1305 .modes = &edt_et057090dhu_mode,
1312 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1313 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
1316 static const struct drm_display_mode edt_etm0700g0dh6_mode = {
1319 .hsync_start = 800 + 40,
1320 .hsync_end = 800 + 40 + 128,
1321 .htotal = 800 + 40 + 128 + 88,
1323 .vsync_start = 480 + 10,
1324 .vsync_end = 480 + 10 + 2,
1325 .vtotal = 480 + 10 + 2 + 33,
1327 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1330 static const struct panel_desc edt_etm0700g0dh6 = {
1331 .modes = &edt_etm0700g0dh6_mode,
1338 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1339 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
1342 static const struct panel_desc edt_etm0700g0bdh6 = {
1343 .modes = &edt_etm0700g0dh6_mode,
1350 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1351 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
1354 static const struct display_timing evervision_vgg804821_timing = {
1355 .pixelclock = { 27600000, 33300000, 50000000 },
1356 .hactive = { 800, 800, 800 },
1357 .hfront_porch = { 40, 66, 70 },
1358 .hback_porch = { 40, 67, 70 },
1359 .hsync_len = { 40, 67, 70 },
1360 .vactive = { 480, 480, 480 },
1361 .vfront_porch = { 6, 10, 10 },
1362 .vback_porch = { 7, 11, 11 },
1363 .vsync_len = { 7, 11, 11 },
1364 .flags = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_HIGH |
1365 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE |
1366 DISPLAY_FLAGS_SYNC_NEGEDGE,
1369 static const struct panel_desc evervision_vgg804821 = {
1370 .timings = &evervision_vgg804821_timing,
1377 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1378 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
1381 static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = {
1384 .hsync_start = 800 + 168,
1385 .hsync_end = 800 + 168 + 64,
1386 .htotal = 800 + 168 + 64 + 88,
1388 .vsync_start = 480 + 37,
1389 .vsync_end = 480 + 37 + 2,
1390 .vtotal = 480 + 37 + 2 + 8,
1394 static const struct panel_desc foxlink_fl500wvr00_a0t = {
1395 .modes = &foxlink_fl500wvr00_a0t_mode,
1402 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1405 static const struct drm_display_mode friendlyarm_hd702e_mode = {
1408 .hsync_start = 800 + 20,
1409 .hsync_end = 800 + 20 + 24,
1410 .htotal = 800 + 20 + 24 + 20,
1412 .vsync_start = 1280 + 4,
1413 .vsync_end = 1280 + 4 + 8,
1414 .vtotal = 1280 + 4 + 8 + 4,
1416 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1419 static const struct panel_desc friendlyarm_hd702e = {
1420 .modes = &friendlyarm_hd702e_mode,
1428 static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
1431 .hsync_start = 480 + 5,
1432 .hsync_end = 480 + 5 + 1,
1433 .htotal = 480 + 5 + 1 + 40,
1435 .vsync_start = 272 + 8,
1436 .vsync_end = 272 + 8 + 1,
1437 .vtotal = 272 + 8 + 1 + 8,
1441 static const struct panel_desc giantplus_gpg482739qs5 = {
1442 .modes = &giantplus_gpg482739qs5_mode,
1449 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1452 static const struct display_timing giantplus_gpm940b0_timing = {
1453 .pixelclock = { 13500000, 27000000, 27500000 },
1454 .hactive = { 320, 320, 320 },
1455 .hfront_porch = { 14, 686, 718 },
1456 .hback_porch = { 50, 70, 255 },
1457 .hsync_len = { 1, 1, 1 },
1458 .vactive = { 240, 240, 240 },
1459 .vfront_porch = { 1, 1, 179 },
1460 .vback_porch = { 1, 21, 31 },
1461 .vsync_len = { 1, 1, 6 },
1462 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
1465 static const struct panel_desc giantplus_gpm940b0 = {
1466 .timings = &giantplus_gpm940b0_timing,
1473 .bus_format = MEDIA_BUS_FMT_RGB888_3X8,
1474 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
1477 static const struct display_timing hannstar_hsd070pww1_timing = {
1478 .pixelclock = { 64300000, 71100000, 82000000 },
1479 .hactive = { 1280, 1280, 1280 },
1480 .hfront_porch = { 1, 1, 10 },
1481 .hback_porch = { 1, 1, 10 },
1483 * According to the data sheet, the minimum horizontal blanking interval
1484 * is 54 clocks (1 + 52 + 1), but tests with a Nitrogen6X have shown the
1485 * minimum working horizontal blanking interval to be 60 clocks.
1487 .hsync_len = { 58, 158, 661 },
1488 .vactive = { 800, 800, 800 },
1489 .vfront_porch = { 1, 1, 10 },
1490 .vback_porch = { 1, 1, 10 },
1491 .vsync_len = { 1, 21, 203 },
1492 .flags = DISPLAY_FLAGS_DE_HIGH,
1495 static const struct panel_desc hannstar_hsd070pww1 = {
1496 .timings = &hannstar_hsd070pww1_timing,
1503 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1506 static const struct display_timing hannstar_hsd100pxn1_timing = {
1507 .pixelclock = { 55000000, 65000000, 75000000 },
1508 .hactive = { 1024, 1024, 1024 },
1509 .hfront_porch = { 40, 40, 40 },
1510 .hback_porch = { 220, 220, 220 },
1511 .hsync_len = { 20, 60, 100 },
1512 .vactive = { 768, 768, 768 },
1513 .vfront_porch = { 7, 7, 7 },
1514 .vback_porch = { 21, 21, 21 },
1515 .vsync_len = { 10, 10, 10 },
1516 .flags = DISPLAY_FLAGS_DE_HIGH,
1519 static const struct panel_desc hannstar_hsd100pxn1 = {
1520 .timings = &hannstar_hsd100pxn1_timing,
1527 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1530 static const struct drm_display_mode hitachi_tx23d38vm0caa_mode = {
1533 .hsync_start = 800 + 85,
1534 .hsync_end = 800 + 85 + 86,
1535 .htotal = 800 + 85 + 86 + 85,
1537 .vsync_start = 480 + 16,
1538 .vsync_end = 480 + 16 + 13,
1539 .vtotal = 480 + 16 + 13 + 16,
1543 static const struct panel_desc hitachi_tx23d38vm0caa = {
1544 .modes = &hitachi_tx23d38vm0caa_mode,
1557 static const struct drm_display_mode innolux_at043tn24_mode = {
1560 .hsync_start = 480 + 2,
1561 .hsync_end = 480 + 2 + 41,
1562 .htotal = 480 + 2 + 41 + 2,
1564 .vsync_start = 272 + 2,
1565 .vsync_end = 272 + 2 + 10,
1566 .vtotal = 272 + 2 + 10 + 2,
1568 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1571 static const struct panel_desc innolux_at043tn24 = {
1572 .modes = &innolux_at043tn24_mode,
1579 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1580 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
1583 static const struct drm_display_mode innolux_at070tn92_mode = {
1586 .hsync_start = 800 + 210,
1587 .hsync_end = 800 + 210 + 20,
1588 .htotal = 800 + 210 + 20 + 46,
1590 .vsync_start = 480 + 22,
1591 .vsync_end = 480 + 22 + 10,
1592 .vtotal = 480 + 22 + 23 + 10,
1596 static const struct panel_desc innolux_at070tn92 = {
1597 .modes = &innolux_at070tn92_mode,
1603 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1606 static const struct display_timing innolux_g070y2_l01_timing = {
1607 .pixelclock = { 28000000, 29500000, 32000000 },
1608 .hactive = { 800, 800, 800 },
1609 .hfront_porch = { 61, 91, 141 },
1610 .hback_porch = { 60, 90, 140 },
1611 .hsync_len = { 12, 12, 12 },
1612 .vactive = { 480, 480, 480 },
1613 .vfront_porch = { 4, 9, 30 },
1614 .vback_porch = { 4, 8, 28 },
1615 .vsync_len = { 2, 2, 2 },
1616 .flags = DISPLAY_FLAGS_DE_HIGH,
1619 static const struct panel_desc innolux_g070y2_l01 = {
1620 .timings = &innolux_g070y2_l01_timing,
1633 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1636 static const struct display_timing innolux_g101ice_l01_timing = {
1637 .pixelclock = { 60400000, 71100000, 74700000 },
1638 .hactive = { 1280, 1280, 1280 },
1639 .hfront_porch = { 41, 80, 100 },
1640 .hback_porch = { 40, 79, 99 },
1641 .hsync_len = { 1, 1, 1 },
1642 .vactive = { 800, 800, 800 },
1643 .vfront_porch = { 5, 11, 14 },
1644 .vback_porch = { 4, 11, 14 },
1645 .vsync_len = { 1, 1, 1 },
1646 .flags = DISPLAY_FLAGS_DE_HIGH,
1649 static const struct panel_desc innolux_g101ice_l01 = {
1650 .timings = &innolux_g101ice_l01_timing,
1661 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1664 static const struct display_timing innolux_g121i1_l01_timing = {
1665 .pixelclock = { 67450000, 71000000, 74550000 },
1666 .hactive = { 1280, 1280, 1280 },
1667 .hfront_porch = { 40, 80, 160 },
1668 .hback_porch = { 39, 79, 159 },
1669 .hsync_len = { 1, 1, 1 },
1670 .vactive = { 800, 800, 800 },
1671 .vfront_porch = { 5, 11, 100 },
1672 .vback_porch = { 4, 11, 99 },
1673 .vsync_len = { 1, 1, 1 },
1676 static const struct panel_desc innolux_g121i1_l01 = {
1677 .timings = &innolux_g121i1_l01_timing,
1688 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1691 static const struct drm_display_mode innolux_g121x1_l03_mode = {
1694 .hsync_start = 1024 + 0,
1695 .hsync_end = 1024 + 1,
1696 .htotal = 1024 + 0 + 1 + 320,
1698 .vsync_start = 768 + 38,
1699 .vsync_end = 768 + 38 + 1,
1700 .vtotal = 768 + 38 + 1 + 0,
1702 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1705 static const struct panel_desc innolux_g121x1_l03 = {
1706 .modes = &innolux_g121x1_l03_mode,
1721 * Datasheet specifies that at 60 Hz refresh rate:
1722 * - total horizontal time: { 1506, 1592, 1716 }
1723 * - total vertical time: { 788, 800, 868 }
1725 * ...but doesn't go into exactly how that should be split into a front
1726 * porch, back porch, or sync length. For now we'll leave a single setting
1727 * here which allows a bit of tweaking of the pixel clock at the expense of
1730 static const struct display_timing innolux_n116bge_timing = {
1731 .pixelclock = { 72600000, 76420000, 80240000 },
1732 .hactive = { 1366, 1366, 1366 },
1733 .hfront_porch = { 136, 136, 136 },
1734 .hback_porch = { 60, 60, 60 },
1735 .hsync_len = { 30, 30, 30 },
1736 .vactive = { 768, 768, 768 },
1737 .vfront_porch = { 8, 8, 8 },
1738 .vback_porch = { 12, 12, 12 },
1739 .vsync_len = { 12, 12, 12 },
1740 .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW,
1743 static const struct panel_desc innolux_n116bge = {
1744 .timings = &innolux_n116bge_timing,
1753 static const struct drm_display_mode innolux_n156bge_l21_mode = {
1756 .hsync_start = 1366 + 16,
1757 .hsync_end = 1366 + 16 + 34,
1758 .htotal = 1366 + 16 + 34 + 50,
1760 .vsync_start = 768 + 2,
1761 .vsync_end = 768 + 2 + 6,
1762 .vtotal = 768 + 2 + 6 + 12,
1766 static const struct panel_desc innolux_n156bge_l21 = {
1767 .modes = &innolux_n156bge_l21_mode,
1776 static const struct drm_display_mode innolux_p120zdg_bf1_mode = {
1779 .hsync_start = 2160 + 48,
1780 .hsync_end = 2160 + 48 + 32,
1781 .htotal = 2160 + 48 + 32 + 80,
1783 .vsync_start = 1440 + 3,
1784 .vsync_end = 1440 + 3 + 10,
1785 .vtotal = 1440 + 3 + 10 + 27,
1787 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
1790 static const struct panel_desc innolux_p120zdg_bf1 = {
1791 .modes = &innolux_p120zdg_bf1_mode,
1799 .hpd_absent_delay = 200,
1804 static const struct drm_display_mode innolux_zj070na_01p_mode = {
1807 .hsync_start = 1024 + 128,
1808 .hsync_end = 1024 + 128 + 64,
1809 .htotal = 1024 + 128 + 64 + 128,
1811 .vsync_start = 600 + 16,
1812 .vsync_end = 600 + 16 + 4,
1813 .vtotal = 600 + 16 + 4 + 16,
1817 static const struct panel_desc innolux_zj070na_01p = {
1818 .modes = &innolux_zj070na_01p_mode,
1827 static const struct display_timing koe_tx14d24vm1bpa_timing = {
1828 .pixelclock = { 5580000, 5850000, 6200000 },
1829 .hactive = { 320, 320, 320 },
1830 .hfront_porch = { 30, 30, 30 },
1831 .hback_porch = { 30, 30, 30 },
1832 .hsync_len = { 1, 5, 17 },
1833 .vactive = { 240, 240, 240 },
1834 .vfront_porch = { 6, 6, 6 },
1835 .vback_porch = { 5, 5, 5 },
1836 .vsync_len = { 1, 2, 11 },
1837 .flags = DISPLAY_FLAGS_DE_HIGH,
1840 static const struct panel_desc koe_tx14d24vm1bpa = {
1841 .timings = &koe_tx14d24vm1bpa_timing,
1850 static const struct display_timing koe_tx31d200vm0baa_timing = {
1851 .pixelclock = { 39600000, 43200000, 48000000 },
1852 .hactive = { 1280, 1280, 1280 },
1853 .hfront_porch = { 16, 36, 56 },
1854 .hback_porch = { 16, 36, 56 },
1855 .hsync_len = { 8, 8, 8 },
1856 .vactive = { 480, 480, 480 },
1857 .vfront_porch = { 6, 21, 33 },
1858 .vback_porch = { 6, 21, 33 },
1859 .vsync_len = { 8, 8, 8 },
1860 .flags = DISPLAY_FLAGS_DE_HIGH,
1863 static const struct panel_desc koe_tx31d200vm0baa = {
1864 .timings = &koe_tx31d200vm0baa_timing,
1871 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1874 static const struct display_timing kyo_tcg121xglp_timing = {
1875 .pixelclock = { 52000000, 65000000, 71000000 },
1876 .hactive = { 1024, 1024, 1024 },
1877 .hfront_porch = { 2, 2, 2 },
1878 .hback_porch = { 2, 2, 2 },
1879 .hsync_len = { 86, 124, 244 },
1880 .vactive = { 768, 768, 768 },
1881 .vfront_porch = { 2, 2, 2 },
1882 .vback_porch = { 2, 2, 2 },
1883 .vsync_len = { 6, 34, 73 },
1884 .flags = DISPLAY_FLAGS_DE_HIGH,
1887 static const struct panel_desc kyo_tcg121xglp = {
1888 .timings = &kyo_tcg121xglp_timing,
1895 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1898 static const struct drm_display_mode lemaker_bl035_rgb_002_mode = {
1901 .hsync_start = 320 + 20,
1902 .hsync_end = 320 + 20 + 30,
1903 .htotal = 320 + 20 + 30 + 38,
1905 .vsync_start = 240 + 4,
1906 .vsync_end = 240 + 4 + 3,
1907 .vtotal = 240 + 4 + 3 + 15,
1911 static const struct panel_desc lemaker_bl035_rgb_002 = {
1912 .modes = &lemaker_bl035_rgb_002_mode,
1918 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1919 .bus_flags = DRM_BUS_FLAG_DE_LOW,
1922 static const struct drm_display_mode lg_lb070wv8_mode = {
1925 .hsync_start = 800 + 88,
1926 .hsync_end = 800 + 88 + 80,
1927 .htotal = 800 + 88 + 80 + 88,
1929 .vsync_start = 480 + 10,
1930 .vsync_end = 480 + 10 + 25,
1931 .vtotal = 480 + 10 + 25 + 10,
1935 static const struct panel_desc lg_lb070wv8 = {
1936 .modes = &lg_lb070wv8_mode,
1943 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1946 static const struct drm_display_mode lg_lp079qx1_sp0v_mode = {
1949 .hsync_start = 1536 + 12,
1950 .hsync_end = 1536 + 12 + 16,
1951 .htotal = 1536 + 12 + 16 + 48,
1953 .vsync_start = 2048 + 8,
1954 .vsync_end = 2048 + 8 + 4,
1955 .vtotal = 2048 + 8 + 4 + 8,
1957 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1960 static const struct panel_desc lg_lp079qx1_sp0v = {
1961 .modes = &lg_lp079qx1_sp0v_mode,
1969 static const struct drm_display_mode lg_lp097qx1_spa1_mode = {
1972 .hsync_start = 2048 + 150,
1973 .hsync_end = 2048 + 150 + 5,
1974 .htotal = 2048 + 150 + 5 + 5,
1976 .vsync_start = 1536 + 3,
1977 .vsync_end = 1536 + 3 + 1,
1978 .vtotal = 1536 + 3 + 1 + 9,
1982 static const struct panel_desc lg_lp097qx1_spa1 = {
1983 .modes = &lg_lp097qx1_spa1_mode,
1991 static const struct drm_display_mode lg_lp120up1_mode = {
1994 .hsync_start = 1920 + 40,
1995 .hsync_end = 1920 + 40 + 40,
1996 .htotal = 1920 + 40 + 40+ 80,
1998 .vsync_start = 1280 + 4,
1999 .vsync_end = 1280 + 4 + 4,
2000 .vtotal = 1280 + 4 + 4 + 12,
2004 static const struct panel_desc lg_lp120up1 = {
2005 .modes = &lg_lp120up1_mode,
2014 static const struct drm_display_mode lg_lp129qe_mode = {
2017 .hsync_start = 2560 + 48,
2018 .hsync_end = 2560 + 48 + 32,
2019 .htotal = 2560 + 48 + 32 + 80,
2021 .vsync_start = 1700 + 3,
2022 .vsync_end = 1700 + 3 + 10,
2023 .vtotal = 1700 + 3 + 10 + 36,
2027 static const struct panel_desc lg_lp129qe = {
2028 .modes = &lg_lp129qe_mode,
2037 static const struct drm_display_mode mitsubishi_aa070mc01_mode = {
2040 .hsync_start = 800 + 0,
2041 .hsync_end = 800 + 1,
2042 .htotal = 800 + 0 + 1 + 160,
2044 .vsync_start = 480 + 0,
2045 .vsync_end = 480 + 48 + 1,
2046 .vtotal = 480 + 48 + 1 + 0,
2048 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
2051 static const struct panel_desc mitsubishi_aa070mc01 = {
2052 .modes = &mitsubishi_aa070mc01_mode,
2065 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2066 .bus_flags = DRM_BUS_FLAG_DE_HIGH,
2069 static const struct display_timing nec_nl12880bc20_05_timing = {
2070 .pixelclock = { 67000000, 71000000, 75000000 },
2071 .hactive = { 1280, 1280, 1280 },
2072 .hfront_porch = { 2, 30, 30 },
2073 .hback_porch = { 6, 100, 100 },
2074 .hsync_len = { 2, 30, 30 },
2075 .vactive = { 800, 800, 800 },
2076 .vfront_porch = { 5, 5, 5 },
2077 .vback_porch = { 11, 11, 11 },
2078 .vsync_len = { 7, 7, 7 },
2081 static const struct panel_desc nec_nl12880bc20_05 = {
2082 .timings = &nec_nl12880bc20_05_timing,
2093 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2096 static const struct drm_display_mode nec_nl4827hc19_05b_mode = {
2099 .hsync_start = 480 + 2,
2100 .hsync_end = 480 + 2 + 41,
2101 .htotal = 480 + 2 + 41 + 2,
2103 .vsync_start = 272 + 2,
2104 .vsync_end = 272 + 2 + 4,
2105 .vtotal = 272 + 2 + 4 + 2,
2107 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2110 static const struct panel_desc nec_nl4827hc19_05b = {
2111 .modes = &nec_nl4827hc19_05b_mode,
2118 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2119 .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
2122 static const struct drm_display_mode netron_dy_e231732_mode = {
2125 .hsync_start = 1024 + 160,
2126 .hsync_end = 1024 + 160 + 70,
2127 .htotal = 1024 + 160 + 70 + 90,
2129 .vsync_start = 600 + 127,
2130 .vsync_end = 600 + 127 + 20,
2131 .vtotal = 600 + 127 + 20 + 3,
2135 static const struct panel_desc netron_dy_e231732 = {
2136 .modes = &netron_dy_e231732_mode,
2142 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2145 static const struct drm_display_mode newhaven_nhd_43_480272ef_atxl_mode = {
2148 .hsync_start = 480 + 2,
2149 .hsync_end = 480 + 2 + 41,
2150 .htotal = 480 + 2 + 41 + 2,
2152 .vsync_start = 272 + 2,
2153 .vsync_end = 272 + 2 + 10,
2154 .vtotal = 272 + 2 + 10 + 2,
2156 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2159 static const struct panel_desc newhaven_nhd_43_480272ef_atxl = {
2160 .modes = &newhaven_nhd_43_480272ef_atxl_mode,
2167 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2168 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
2169 DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
2172 static const struct display_timing nlt_nl192108ac18_02d_timing = {
2173 .pixelclock = { 130000000, 148350000, 163000000 },
2174 .hactive = { 1920, 1920, 1920 },
2175 .hfront_porch = { 80, 100, 100 },
2176 .hback_porch = { 100, 120, 120 },
2177 .hsync_len = { 50, 60, 60 },
2178 .vactive = { 1080, 1080, 1080 },
2179 .vfront_porch = { 12, 30, 30 },
2180 .vback_porch = { 4, 10, 10 },
2181 .vsync_len = { 4, 5, 5 },
2184 static const struct panel_desc nlt_nl192108ac18_02d = {
2185 .timings = &nlt_nl192108ac18_02d_timing,
2195 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2198 static const struct drm_display_mode nvd_9128_mode = {
2201 .hsync_start = 800 + 130,
2202 .hsync_end = 800 + 130 + 98,
2203 .htotal = 800 + 0 + 130 + 98,
2205 .vsync_start = 480 + 10,
2206 .vsync_end = 480 + 10 + 50,
2207 .vtotal = 480 + 0 + 10 + 50,
2210 static const struct panel_desc nvd_9128 = {
2211 .modes = &nvd_9128_mode,
2218 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2221 static const struct display_timing okaya_rs800480t_7x0gp_timing = {
2222 .pixelclock = { 30000000, 30000000, 40000000 },
2223 .hactive = { 800, 800, 800 },
2224 .hfront_porch = { 40, 40, 40 },
2225 .hback_porch = { 40, 40, 40 },
2226 .hsync_len = { 1, 48, 48 },
2227 .vactive = { 480, 480, 480 },
2228 .vfront_porch = { 13, 13, 13 },
2229 .vback_porch = { 29, 29, 29 },
2230 .vsync_len = { 3, 3, 3 },
2231 .flags = DISPLAY_FLAGS_DE_HIGH,
2234 static const struct panel_desc okaya_rs800480t_7x0gp = {
2235 .timings = &okaya_rs800480t_7x0gp_timing,
2248 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2251 static const struct drm_display_mode olimex_lcd_olinuxino_43ts_mode = {
2254 .hsync_start = 480 + 5,
2255 .hsync_end = 480 + 5 + 30,
2256 .htotal = 480 + 5 + 30 + 10,
2258 .vsync_start = 272 + 8,
2259 .vsync_end = 272 + 8 + 5,
2260 .vtotal = 272 + 8 + 5 + 3,
2264 static const struct panel_desc olimex_lcd_olinuxino_43ts = {
2265 .modes = &olimex_lcd_olinuxino_43ts_mode,
2271 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2275 * 800x480 CVT. The panel appears to be quite accepting, at least as far as
2276 * pixel clocks, but this is the timing that was being used in the Adafruit
2277 * installation instructions.
2279 static const struct drm_display_mode ontat_yx700wv03_mode = {
2290 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2295 * https://www.adafruit.com/images/product-files/2406/c3163.pdf
2297 static const struct panel_desc ontat_yx700wv03 = {
2298 .modes = &ontat_yx700wv03_mode,
2305 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2308 static const struct drm_display_mode ortustech_com37h3m_mode = {
2311 .hsync_start = 480 + 8,
2312 .hsync_end = 480 + 8 + 10,
2313 .htotal = 480 + 8 + 10 + 10,
2315 .vsync_start = 640 + 4,
2316 .vsync_end = 640 + 4 + 3,
2317 .vtotal = 640 + 4 + 3 + 4,
2319 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2322 static const struct panel_desc ortustech_com37h3m = {
2323 .modes = &ortustech_com37h3m_mode,
2327 .width = 56, /* 56.16mm */
2328 .height = 75, /* 74.88mm */
2330 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2331 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE |
2332 DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
2335 static const struct drm_display_mode ortustech_com43h4m85ulc_mode = {
2338 .hsync_start = 480 + 10,
2339 .hsync_end = 480 + 10 + 10,
2340 .htotal = 480 + 10 + 10 + 15,
2342 .vsync_start = 800 + 3,
2343 .vsync_end = 800 + 3 + 3,
2344 .vtotal = 800 + 3 + 3 + 3,
2348 static const struct panel_desc ortustech_com43h4m85ulc = {
2349 .modes = &ortustech_com43h4m85ulc_mode,
2356 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2357 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
2360 static const struct drm_display_mode osddisplays_osd070t1718_19ts_mode = {
2363 .hsync_start = 800 + 210,
2364 .hsync_end = 800 + 210 + 30,
2365 .htotal = 800 + 210 + 30 + 16,
2367 .vsync_start = 480 + 22,
2368 .vsync_end = 480 + 22 + 13,
2369 .vtotal = 480 + 22 + 13 + 10,
2371 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2374 static const struct panel_desc osddisplays_osd070t1718_19ts = {
2375 .modes = &osddisplays_osd070t1718_19ts_mode,
2382 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2383 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
2386 static const struct drm_display_mode pda_91_00156_a0_mode = {
2389 .hsync_start = 800 + 1,
2390 .hsync_end = 800 + 1 + 64,
2391 .htotal = 800 + 1 + 64 + 64,
2393 .vsync_start = 480 + 1,
2394 .vsync_end = 480 + 1 + 23,
2395 .vtotal = 480 + 1 + 23 + 22,
2399 static const struct panel_desc pda_91_00156_a0 = {
2400 .modes = &pda_91_00156_a0_mode,
2406 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2410 static const struct drm_display_mode qd43003c0_40_mode = {
2413 .hsync_start = 480 + 8,
2414 .hsync_end = 480 + 8 + 4,
2415 .htotal = 480 + 8 + 4 + 39,
2417 .vsync_start = 272 + 4,
2418 .vsync_end = 272 + 4 + 10,
2419 .vtotal = 272 + 4 + 10 + 2,
2423 static const struct panel_desc qd43003c0_40 = {
2424 .modes = &qd43003c0_40_mode,
2431 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2434 static const struct display_timing rocktech_rk070er9427_timing = {
2435 .pixelclock = { 26400000, 33300000, 46800000 },
2436 .hactive = { 800, 800, 800 },
2437 .hfront_porch = { 16, 210, 354 },
2438 .hback_porch = { 46, 46, 46 },
2439 .hsync_len = { 1, 1, 1 },
2440 .vactive = { 480, 480, 480 },
2441 .vfront_porch = { 7, 22, 147 },
2442 .vback_porch = { 23, 23, 23 },
2443 .vsync_len = { 1, 1, 1 },
2444 .flags = DISPLAY_FLAGS_DE_HIGH,
2447 static const struct panel_desc rocktech_rk070er9427 = {
2448 .timings = &rocktech_rk070er9427_timing,
2461 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2464 static const struct drm_display_mode samsung_lsn122dl01_c01_mode = {
2467 .hsync_start = 2560 + 48,
2468 .hsync_end = 2560 + 48 + 32,
2469 .htotal = 2560 + 48 + 32 + 80,
2471 .vsync_start = 1600 + 2,
2472 .vsync_end = 1600 + 2 + 5,
2473 .vtotal = 1600 + 2 + 5 + 57,
2477 static const struct panel_desc samsung_lsn122dl01_c01 = {
2478 .modes = &samsung_lsn122dl01_c01_mode,
2486 static const struct drm_display_mode samsung_ltn101nt05_mode = {
2489 .hsync_start = 1024 + 24,
2490 .hsync_end = 1024 + 24 + 136,
2491 .htotal = 1024 + 24 + 136 + 160,
2493 .vsync_start = 600 + 3,
2494 .vsync_end = 600 + 3 + 6,
2495 .vtotal = 600 + 3 + 6 + 61,
2499 static const struct panel_desc samsung_ltn101nt05 = {
2500 .modes = &samsung_ltn101nt05_mode,
2509 static const struct drm_display_mode samsung_ltn140at29_301_mode = {
2512 .hsync_start = 1366 + 64,
2513 .hsync_end = 1366 + 64 + 48,
2514 .htotal = 1366 + 64 + 48 + 128,
2516 .vsync_start = 768 + 2,
2517 .vsync_end = 768 + 2 + 5,
2518 .vtotal = 768 + 2 + 5 + 17,
2522 static const struct panel_desc samsung_ltn140at29_301 = {
2523 .modes = &samsung_ltn140at29_301_mode,
2532 static const struct drm_display_mode sharp_ld_d5116z01b_mode = {
2535 .hsync_start = 1920 + 48,
2536 .hsync_end = 1920 + 48 + 32,
2537 .htotal = 1920 + 48 + 32 + 80,
2539 .vsync_start = 1280 + 3,
2540 .vsync_end = 1280 + 3 + 10,
2541 .vtotal = 1280 + 3 + 10 + 57,
2543 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
2546 static const struct panel_desc sharp_ld_d5116z01b = {
2547 .modes = &sharp_ld_d5116z01b_mode,
2554 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2555 .bus_flags = DRM_BUS_FLAG_DATA_MSB_TO_LSB,
2558 static const struct drm_display_mode sharp_lq070y3dg3b_mode = {
2561 .hsync_start = 800 + 64,
2562 .hsync_end = 800 + 64 + 128,
2563 .htotal = 800 + 64 + 128 + 64,
2565 .vsync_start = 480 + 8,
2566 .vsync_end = 480 + 8 + 2,
2567 .vtotal = 480 + 8 + 2 + 35,
2569 .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE,
2572 static const struct panel_desc sharp_lq070y3dg3b = {
2573 .modes = &sharp_lq070y3dg3b_mode,
2577 .width = 152, /* 152.4mm */
2578 .height = 91, /* 91.4mm */
2580 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2581 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE |
2582 DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
2585 static const struct drm_display_mode sharp_lq035q7db03_mode = {
2588 .hsync_start = 240 + 16,
2589 .hsync_end = 240 + 16 + 7,
2590 .htotal = 240 + 16 + 7 + 5,
2592 .vsync_start = 320 + 9,
2593 .vsync_end = 320 + 9 + 1,
2594 .vtotal = 320 + 9 + 1 + 7,
2598 static const struct panel_desc sharp_lq035q7db03 = {
2599 .modes = &sharp_lq035q7db03_mode,
2606 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2609 static const struct display_timing sharp_lq101k1ly04_timing = {
2610 .pixelclock = { 60000000, 65000000, 80000000 },
2611 .hactive = { 1280, 1280, 1280 },
2612 .hfront_porch = { 20, 20, 20 },
2613 .hback_porch = { 20, 20, 20 },
2614 .hsync_len = { 10, 10, 10 },
2615 .vactive = { 800, 800, 800 },
2616 .vfront_porch = { 4, 4, 4 },
2617 .vback_porch = { 4, 4, 4 },
2618 .vsync_len = { 4, 4, 4 },
2619 .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE,
2622 static const struct panel_desc sharp_lq101k1ly04 = {
2623 .timings = &sharp_lq101k1ly04_timing,
2630 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
2633 static const struct display_timing sharp_lq123p1jx31_timing = {
2634 .pixelclock = { 252750000, 252750000, 266604720 },
2635 .hactive = { 2400, 2400, 2400 },
2636 .hfront_porch = { 48, 48, 48 },
2637 .hback_porch = { 80, 80, 84 },
2638 .hsync_len = { 32, 32, 32 },
2639 .vactive = { 1600, 1600, 1600 },
2640 .vfront_porch = { 3, 3, 3 },
2641 .vback_porch = { 33, 33, 120 },
2642 .vsync_len = { 10, 10, 10 },
2643 .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW,
2646 static const struct panel_desc sharp_lq123p1jx31 = {
2647 .timings = &sharp_lq123p1jx31_timing,
2661 static const struct drm_display_mode sharp_lq150x1lg11_mode = {
2664 .hsync_start = 1024 + 168,
2665 .hsync_end = 1024 + 168 + 64,
2666 .htotal = 1024 + 168 + 64 + 88,
2668 .vsync_start = 768 + 37,
2669 .vsync_end = 768 + 37 + 2,
2670 .vtotal = 768 + 37 + 2 + 8,
2674 static const struct panel_desc sharp_lq150x1lg11 = {
2675 .modes = &sharp_lq150x1lg11_mode,
2682 .bus_format = MEDIA_BUS_FMT_RGB565_1X16,
2685 static const struct display_timing sharp_ls020b1dd01d_timing = {
2686 .pixelclock = { 2000000, 4200000, 5000000 },
2687 .hactive = { 240, 240, 240 },
2688 .hfront_porch = { 66, 66, 66 },
2689 .hback_porch = { 1, 1, 1 },
2690 .hsync_len = { 1, 1, 1 },
2691 .vactive = { 160, 160, 160 },
2692 .vfront_porch = { 52, 52, 52 },
2693 .vback_porch = { 6, 6, 6 },
2694 .vsync_len = { 10, 10, 10 },
2695 .flags = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_LOW,
2698 static const struct panel_desc sharp_ls020b1dd01d = {
2699 .timings = &sharp_ls020b1dd01d_timing,
2706 .bus_format = MEDIA_BUS_FMT_RGB565_1X16,
2707 .bus_flags = DRM_BUS_FLAG_DE_HIGH
2708 | DRM_BUS_FLAG_PIXDATA_NEGEDGE
2709 | DRM_BUS_FLAG_SHARP_SIGNALS,
2712 static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = {
2715 .hsync_start = 800 + 1,
2716 .hsync_end = 800 + 1 + 64,
2717 .htotal = 800 + 1 + 64 + 64,
2719 .vsync_start = 480 + 1,
2720 .vsync_end = 480 + 1 + 23,
2721 .vtotal = 480 + 1 + 23 + 22,
2725 static const struct panel_desc shelly_sca07010_bfn_lnn = {
2726 .modes = &shelly_sca07010_bfn_lnn_mode,
2732 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2735 static const struct drm_display_mode starry_kr122ea0sra_mode = {
2738 .hsync_start = 1920 + 16,
2739 .hsync_end = 1920 + 16 + 16,
2740 .htotal = 1920 + 16 + 16 + 32,
2742 .vsync_start = 1200 + 15,
2743 .vsync_end = 1200 + 15 + 2,
2744 .vtotal = 1200 + 15 + 2 + 18,
2746 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2749 static const struct panel_desc starry_kr122ea0sra = {
2750 .modes = &starry_kr122ea0sra_mode,
2757 .prepare = 10 + 200,
2759 .unprepare = 10 + 500,
2763 static const struct drm_display_mode tfc_s9700rtwv43tr_01b_mode = {
2766 .hsync_start = 800 + 39,
2767 .hsync_end = 800 + 39 + 47,
2768 .htotal = 800 + 39 + 47 + 39,
2770 .vsync_start = 480 + 13,
2771 .vsync_end = 480 + 13 + 2,
2772 .vtotal = 480 + 13 + 2 + 29,
2776 static const struct panel_desc tfc_s9700rtwv43tr_01b = {
2777 .modes = &tfc_s9700rtwv43tr_01b_mode,
2784 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2785 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
2788 static const struct display_timing tianma_tm070jdhg30_timing = {
2789 .pixelclock = { 62600000, 68200000, 78100000 },
2790 .hactive = { 1280, 1280, 1280 },
2791 .hfront_porch = { 15, 64, 159 },
2792 .hback_porch = { 5, 5, 5 },
2793 .hsync_len = { 1, 1, 256 },
2794 .vactive = { 800, 800, 800 },
2795 .vfront_porch = { 3, 40, 99 },
2796 .vback_porch = { 2, 2, 2 },
2797 .vsync_len = { 1, 1, 128 },
2798 .flags = DISPLAY_FLAGS_DE_HIGH,
2801 static const struct panel_desc tianma_tm070jdhg30 = {
2802 .timings = &tianma_tm070jdhg30_timing,
2809 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2812 static const struct display_timing tianma_tm070rvhg71_timing = {
2813 .pixelclock = { 27700000, 29200000, 39600000 },
2814 .hactive = { 800, 800, 800 },
2815 .hfront_porch = { 12, 40, 212 },
2816 .hback_porch = { 88, 88, 88 },
2817 .hsync_len = { 1, 1, 40 },
2818 .vactive = { 480, 480, 480 },
2819 .vfront_porch = { 1, 13, 88 },
2820 .vback_porch = { 32, 32, 32 },
2821 .vsync_len = { 1, 1, 3 },
2822 .flags = DISPLAY_FLAGS_DE_HIGH,
2825 static const struct panel_desc tianma_tm070rvhg71 = {
2826 .timings = &tianma_tm070rvhg71_timing,
2833 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2836 static const struct drm_display_mode ti_nspire_cx_lcd_mode[] = {
2840 .hsync_start = 320 + 50,
2841 .hsync_end = 320 + 50 + 6,
2842 .htotal = 320 + 50 + 6 + 38,
2844 .vsync_start = 240 + 3,
2845 .vsync_end = 240 + 3 + 1,
2846 .vtotal = 240 + 3 + 1 + 17,
2848 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2852 static const struct panel_desc ti_nspire_cx_lcd_panel = {
2853 .modes = ti_nspire_cx_lcd_mode,
2860 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2861 .bus_flags = DRM_BUS_FLAG_PIXDATA_NEGEDGE,
2864 static const struct drm_display_mode ti_nspire_classic_lcd_mode[] = {
2868 .hsync_start = 320 + 6,
2869 .hsync_end = 320 + 6 + 6,
2870 .htotal = 320 + 6 + 6 + 6,
2872 .vsync_start = 240 + 0,
2873 .vsync_end = 240 + 0 + 1,
2874 .vtotal = 240 + 0 + 1 + 0,
2876 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
2880 static const struct panel_desc ti_nspire_classic_lcd_panel = {
2881 .modes = ti_nspire_classic_lcd_mode,
2883 /* The grayscale panel has 8 bit for the color .. Y (black) */
2889 /* This is the grayscale bus format */
2890 .bus_format = MEDIA_BUS_FMT_Y8_1X8,
2891 .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE,
2894 static const struct drm_display_mode toshiba_lt089ac29000_mode = {
2897 .hsync_start = 1280 + 192,
2898 .hsync_end = 1280 + 192 + 128,
2899 .htotal = 1280 + 192 + 128 + 64,
2901 .vsync_start = 768 + 20,
2902 .vsync_end = 768 + 20 + 7,
2903 .vtotal = 768 + 20 + 7 + 3,
2907 static const struct panel_desc toshiba_lt089ac29000 = {
2908 .modes = &toshiba_lt089ac29000_mode,
2914 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2915 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
2918 static const struct drm_display_mode tpk_f07a_0102_mode = {
2921 .hsync_start = 800 + 40,
2922 .hsync_end = 800 + 40 + 128,
2923 .htotal = 800 + 40 + 128 + 88,
2925 .vsync_start = 480 + 10,
2926 .vsync_end = 480 + 10 + 2,
2927 .vtotal = 480 + 10 + 2 + 33,
2931 static const struct panel_desc tpk_f07a_0102 = {
2932 .modes = &tpk_f07a_0102_mode,
2938 .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
2941 static const struct drm_display_mode tpk_f10a_0102_mode = {
2944 .hsync_start = 1024 + 176,
2945 .hsync_end = 1024 + 176 + 5,
2946 .htotal = 1024 + 176 + 5 + 88,
2948 .vsync_start = 600 + 20,
2949 .vsync_end = 600 + 20 + 5,
2950 .vtotal = 600 + 20 + 5 + 25,
2954 static const struct panel_desc tpk_f10a_0102 = {
2955 .modes = &tpk_f10a_0102_mode,
2963 static const struct display_timing urt_umsh_8596md_timing = {
2964 .pixelclock = { 33260000, 33260000, 33260000 },
2965 .hactive = { 800, 800, 800 },
2966 .hfront_porch = { 41, 41, 41 },
2967 .hback_porch = { 216 - 128, 216 - 128, 216 - 128 },
2968 .hsync_len = { 71, 128, 128 },
2969 .vactive = { 480, 480, 480 },
2970 .vfront_porch = { 10, 10, 10 },
2971 .vback_porch = { 35 - 2, 35 - 2, 35 - 2 },
2972 .vsync_len = { 2, 2, 2 },
2973 .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE |
2974 DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
2977 static const struct panel_desc urt_umsh_8596md_lvds = {
2978 .timings = &urt_umsh_8596md_timing,
2985 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
2988 static const struct panel_desc urt_umsh_8596md_parallel = {
2989 .timings = &urt_umsh_8596md_timing,
2996 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2999 static const struct drm_display_mode vl050_8048nt_c01_mode = {
3002 .hsync_start = 800 + 210,
3003 .hsync_end = 800 + 210 + 20,
3004 .htotal = 800 + 210 + 20 + 46,
3006 .vsync_start = 480 + 22,
3007 .vsync_end = 480 + 22 + 10,
3008 .vtotal = 480 + 22 + 10 + 23,
3010 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
3013 static const struct panel_desc vl050_8048nt_c01 = {
3014 .modes = &vl050_8048nt_c01_mode,
3021 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3022 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
3025 static const struct drm_display_mode winstar_wf35ltiacd_mode = {
3028 .hsync_start = 320 + 20,
3029 .hsync_end = 320 + 20 + 30,
3030 .htotal = 320 + 20 + 30 + 38,
3032 .vsync_start = 240 + 4,
3033 .vsync_end = 240 + 4 + 3,
3034 .vtotal = 240 + 4 + 3 + 15,
3036 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3039 static const struct panel_desc winstar_wf35ltiacd = {
3040 .modes = &winstar_wf35ltiacd_mode,
3047 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3050 static const struct drm_display_mode arm_rtsm_mode[] = {
3054 .hsync_start = 1024 + 24,
3055 .hsync_end = 1024 + 24 + 136,
3056 .htotal = 1024 + 24 + 136 + 160,
3058 .vsync_start = 768 + 3,
3059 .vsync_end = 768 + 3 + 6,
3060 .vtotal = 768 + 3 + 6 + 29,
3062 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3066 static const struct panel_desc arm_rtsm = {
3067 .modes = arm_rtsm_mode,
3074 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3077 static const struct of_device_id platform_of_match[] = {
3079 .compatible = "ampire,am-480272h3tmqw-t01h",
3080 .data = &ire_am_480272h3tmqw_t01h,
3082 .compatible = "ampire,am800480r3tmqwa1h",
3083 .data = &ire_am800480r3tmqwa1h,
3085 .compatible = "arm,rtsm-display",
3088 .compatible = "armadeus,st0700-adapt",
3089 .data = &armadeus_st0700_adapt,
3091 .compatible = "auo,b101aw03",
3092 .data = &auo_b101aw03,
3094 .compatible = "auo,b101ean01",
3095 .data = &auo_b101ean01,
3097 .compatible = "auo,b101xtn01",
3098 .data = &auo_b101xtn01,
3100 .compatible = "auo,b116xw03",
3101 .data = &auo_b116xw03,
3103 .compatible = "auo,b133htn01",
3104 .data = &auo_b133htn01,
3106 .compatible = "auo,b133xtn01",
3107 .data = &auo_b133xtn01,
3109 .compatible = "auo,g070vvn01",
3110 .data = &auo_g070vvn01,
3112 .compatible = "auo,g101evn010",
3113 .data = &auo_g101evn010,
3115 .compatible = "auo,g104sn02",
3116 .data = &auo_g104sn02,
3118 .compatible = "auo,g133han01",
3119 .data = &auo_g133han01,
3121 .compatible = "auo,g185han01",
3122 .data = &auo_g185han01,
3124 .compatible = "auo,p320hvn03",
3125 .data = &auo_p320hvn03,
3127 .compatible = "auo,t215hvn01",
3128 .data = &auo_t215hvn01,
3130 .compatible = "avic,tm070ddh03",
3131 .data = &avic_tm070ddh03,
3133 .compatible = "bananapi,s070wv20-ct16",
3134 .data = &bananapi_s070wv20_ct16,
3136 .compatible = "boe,hv070wsa-100",
3137 .data = &boe_hv070wsa
3139 .compatible = "boe,nv101wxmn51",
3140 .data = &boe_nv101wxmn51,
3142 .compatible = "cdtech,s043wq26h-ct7",
3143 .data = &cdtech_s043wq26h_ct7,
3145 .compatible = "cdtech,s070wv95-ct16",
3146 .data = &cdtech_s070wv95_ct16,
3148 .compatible = "chunghwa,claa070wp03xg",
3149 .data = &chunghwa_claa070wp03xg,
3151 .compatible = "chunghwa,claa101wa01a",
3152 .data = &chunghwa_claa101wa01a
3154 .compatible = "chunghwa,claa101wb01",
3155 .data = &chunghwa_claa101wb01
3157 .compatible = "dataimage,scf0700c48ggu18",
3158 .data = &dataimage_scf0700c48ggu18,
3160 .compatible = "dlc,dlc0700yzg-1",
3161 .data = &dlc_dlc0700yzg_1,
3163 .compatible = "dlc,dlc1010gig",
3164 .data = &dlc_dlc1010gig,
3166 .compatible = "edt,et035012dm6",
3167 .data = &edt_et035012dm6,
3169 .compatible = "edt,etm0430g0dh6",
3170 .data = &edt_etm0430g0dh6,
3172 .compatible = "edt,et057090dhu",
3173 .data = &edt_et057090dhu,
3175 .compatible = "edt,et070080dh6",
3176 .data = &edt_etm0700g0dh6,
3178 .compatible = "edt,etm0700g0dh6",
3179 .data = &edt_etm0700g0dh6,
3181 .compatible = "edt,etm0700g0bdh6",
3182 .data = &edt_etm0700g0bdh6,
3184 .compatible = "edt,etm0700g0edh6",
3185 .data = &edt_etm0700g0bdh6,
3187 .compatible = "evervision,vgg804821",
3188 .data = &evervision_vgg804821,
3190 .compatible = "foxlink,fl500wvr00-a0t",
3191 .data = &foxlink_fl500wvr00_a0t,
3193 .compatible = "friendlyarm,hd702e",
3194 .data = &friendlyarm_hd702e,
3196 .compatible = "giantplus,gpg482739qs5",
3197 .data = &giantplus_gpg482739qs5
3199 .compatible = "giantplus,gpm940b0",
3200 .data = &giantplus_gpm940b0,
3202 .compatible = "hannstar,hsd070pww1",
3203 .data = &hannstar_hsd070pww1,
3205 .compatible = "hannstar,hsd100pxn1",
3206 .data = &hannstar_hsd100pxn1,
3208 .compatible = "hit,tx23d38vm0caa",
3209 .data = &hitachi_tx23d38vm0caa
3211 .compatible = "innolux,at043tn24",
3212 .data = &innolux_at043tn24,
3214 .compatible = "innolux,at070tn92",
3215 .data = &innolux_at070tn92,
3217 .compatible = "innolux,g070y2-l01",
3218 .data = &innolux_g070y2_l01,
3220 .compatible = "innolux,g101ice-l01",
3221 .data = &innolux_g101ice_l01
3223 .compatible = "innolux,g121i1-l01",
3224 .data = &innolux_g121i1_l01
3226 .compatible = "innolux,g121x1-l03",
3227 .data = &innolux_g121x1_l03,
3229 .compatible = "innolux,n116bge",
3230 .data = &innolux_n116bge,
3232 .compatible = "innolux,n156bge-l21",
3233 .data = &innolux_n156bge_l21,
3235 .compatible = "innolux,p120zdg-bf1",
3236 .data = &innolux_p120zdg_bf1,
3238 .compatible = "innolux,zj070na-01p",
3239 .data = &innolux_zj070na_01p,
3241 .compatible = "koe,tx14d24vm1bpa",
3242 .data = &koe_tx14d24vm1bpa,
3244 .compatible = "koe,tx31d200vm0baa",
3245 .data = &koe_tx31d200vm0baa,
3247 .compatible = "kyo,tcg121xglp",
3248 .data = &kyo_tcg121xglp,
3250 .compatible = "lemaker,bl035-rgb-002",
3251 .data = &lemaker_bl035_rgb_002,
3253 .compatible = "lg,lb070wv8",
3254 .data = &lg_lb070wv8,
3256 .compatible = "lg,lp079qx1-sp0v",
3257 .data = &lg_lp079qx1_sp0v,
3259 .compatible = "lg,lp097qx1-spa1",
3260 .data = &lg_lp097qx1_spa1,
3262 .compatible = "lg,lp120up1",
3263 .data = &lg_lp120up1,
3265 .compatible = "lg,lp129qe",
3266 .data = &lg_lp129qe,
3268 .compatible = "mitsubishi,aa070mc01-ca1",
3269 .data = &mitsubishi_aa070mc01,
3271 .compatible = "nec,nl12880bc20-05",
3272 .data = &nec_nl12880bc20_05,
3274 .compatible = "nec,nl4827hc19-05b",
3275 .data = &nec_nl4827hc19_05b,
3277 .compatible = "netron-dy,e231732",
3278 .data = &netron_dy_e231732,
3280 .compatible = "newhaven,nhd-4.3-480272ef-atxl",
3281 .data = &newhaven_nhd_43_480272ef_atxl,
3283 .compatible = "nlt,nl192108ac18-02d",
3284 .data = &nlt_nl192108ac18_02d,
3286 .compatible = "nvd,9128",
3289 .compatible = "okaya,rs800480t-7x0gp",
3290 .data = &okaya_rs800480t_7x0gp,
3292 .compatible = "olimex,lcd-olinuxino-43-ts",
3293 .data = &olimex_lcd_olinuxino_43ts,
3295 .compatible = "ontat,yx700wv03",
3296 .data = &ontat_yx700wv03,
3298 .compatible = "ortustech,com37h3m05dtc",
3299 .data = &ortustech_com37h3m,
3301 .compatible = "ortustech,com37h3m99dtc",
3302 .data = &ortustech_com37h3m,
3304 .compatible = "ortustech,com43h4m85ulc",
3305 .data = &ortustech_com43h4m85ulc,
3307 .compatible = "osddisplays,osd070t1718-19ts",
3308 .data = &osddisplays_osd070t1718_19ts,
3310 .compatible = "pda,91-00156-a0",
3311 .data = &pda_91_00156_a0,
3313 .compatible = "qiaodian,qd43003c0-40",
3314 .data = &qd43003c0_40,
3316 .compatible = "rocktech,rk070er9427",
3317 .data = &rocktech_rk070er9427,
3319 .compatible = "samsung,lsn122dl01-c01",
3320 .data = &samsung_lsn122dl01_c01,
3322 .compatible = "samsung,ltn101nt05",
3323 .data = &samsung_ltn101nt05,
3325 .compatible = "samsung,ltn140at29-301",
3326 .data = &samsung_ltn140at29_301,
3328 .compatible = "sharp,ld-d5116z01b",
3329 .data = &sharp_ld_d5116z01b,
3331 .compatible = "sharp,lq035q7db03",
3332 .data = &sharp_lq035q7db03,
3334 .compatible = "sharp,lq070y3dg3b",
3335 .data = &sharp_lq070y3dg3b,
3337 .compatible = "sharp,lq101k1ly04",
3338 .data = &sharp_lq101k1ly04,
3340 .compatible = "sharp,lq123p1jx31",
3341 .data = &sharp_lq123p1jx31,
3343 .compatible = "sharp,lq150x1lg11",
3344 .data = &sharp_lq150x1lg11,
3346 .compatible = "sharp,ls020b1dd01d",
3347 .data = &sharp_ls020b1dd01d,
3349 .compatible = "shelly,sca07010-bfn-lnn",
3350 .data = &shelly_sca07010_bfn_lnn,
3352 .compatible = "starry,kr122ea0sra",
3353 .data = &starry_kr122ea0sra,
3355 .compatible = "tfc,s9700rtwv43tr-01b",
3356 .data = &tfc_s9700rtwv43tr_01b,
3358 .compatible = "tianma,tm070jdhg30",
3359 .data = &tianma_tm070jdhg30,
3361 .compatible = "tianma,tm070rvhg71",
3362 .data = &tianma_tm070rvhg71,
3364 .compatible = "ti,nspire-cx-lcd-panel",
3365 .data = &ti_nspire_cx_lcd_panel,
3367 .compatible = "ti,nspire-classic-lcd-panel",
3368 .data = &ti_nspire_classic_lcd_panel,
3370 .compatible = "toshiba,lt089ac29000",
3371 .data = &toshiba_lt089ac29000,
3373 .compatible = "tpk,f07a-0102",
3374 .data = &tpk_f07a_0102,
3376 .compatible = "tpk,f10a-0102",
3377 .data = &tpk_f10a_0102,
3379 .compatible = "urt,umsh-8596md-t",
3380 .data = &urt_umsh_8596md_parallel,
3382 .compatible = "urt,umsh-8596md-1t",
3383 .data = &urt_umsh_8596md_parallel,
3385 .compatible = "urt,umsh-8596md-7t",
3386 .data = &urt_umsh_8596md_parallel,
3388 .compatible = "urt,umsh-8596md-11t",
3389 .data = &urt_umsh_8596md_lvds,
3391 .compatible = "urt,umsh-8596md-19t",
3392 .data = &urt_umsh_8596md_lvds,
3394 .compatible = "urt,umsh-8596md-20t",
3395 .data = &urt_umsh_8596md_parallel,
3397 .compatible = "vxt,vl050-8048nt-c01",
3398 .data = &vl050_8048nt_c01,
3400 .compatible = "winstar,wf35ltiacd",
3401 .data = &winstar_wf35ltiacd,
3406 MODULE_DEVICE_TABLE(of, platform_of_match);
3408 static int panel_simple_platform_probe(struct platform_device *pdev)
3410 const struct of_device_id *id;
3412 id = of_match_node(platform_of_match, pdev->dev.of_node);
3416 return panel_simple_probe(&pdev->dev, id->data);
3419 static int panel_simple_platform_remove(struct platform_device *pdev)
3421 return panel_simple_remove(&pdev->dev);
3424 static void panel_simple_platform_shutdown(struct platform_device *pdev)
3426 panel_simple_shutdown(&pdev->dev);
3429 static struct platform_driver panel_simple_platform_driver = {
3431 .name = "panel-simple",
3432 .of_match_table = platform_of_match,
3434 .probe = panel_simple_platform_probe,
3435 .remove = panel_simple_platform_remove,
3436 .shutdown = panel_simple_platform_shutdown,
3439 struct panel_desc_dsi {
3440 struct panel_desc desc;
3442 unsigned long flags;
3443 enum mipi_dsi_pixel_format format;
3447 static const struct drm_display_mode auo_b080uan01_mode = {
3450 .hsync_start = 1200 + 62,
3451 .hsync_end = 1200 + 62 + 4,
3452 .htotal = 1200 + 62 + 4 + 62,
3454 .vsync_start = 1920 + 9,
3455 .vsync_end = 1920 + 9 + 2,
3456 .vtotal = 1920 + 9 + 2 + 8,
3460 static const struct panel_desc_dsi auo_b080uan01 = {
3462 .modes = &auo_b080uan01_mode,
3470 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
3471 .format = MIPI_DSI_FMT_RGB888,
3475 static const struct drm_display_mode boe_tv080wum_nl0_mode = {
3478 .hsync_start = 1200 + 120,
3479 .hsync_end = 1200 + 120 + 20,
3480 .htotal = 1200 + 120 + 20 + 21,
3482 .vsync_start = 1920 + 21,
3483 .vsync_end = 1920 + 21 + 3,
3484 .vtotal = 1920 + 21 + 3 + 18,
3486 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3489 static const struct panel_desc_dsi boe_tv080wum_nl0 = {
3491 .modes = &boe_tv080wum_nl0_mode,
3498 .flags = MIPI_DSI_MODE_VIDEO |
3499 MIPI_DSI_MODE_VIDEO_BURST |
3500 MIPI_DSI_MODE_VIDEO_SYNC_PULSE,
3501 .format = MIPI_DSI_FMT_RGB888,
3505 static const struct drm_display_mode lg_ld070wx3_sl01_mode = {
3508 .hsync_start = 800 + 32,
3509 .hsync_end = 800 + 32 + 1,
3510 .htotal = 800 + 32 + 1 + 57,
3512 .vsync_start = 1280 + 28,
3513 .vsync_end = 1280 + 28 + 1,
3514 .vtotal = 1280 + 28 + 1 + 14,
3518 static const struct panel_desc_dsi lg_ld070wx3_sl01 = {
3520 .modes = &lg_ld070wx3_sl01_mode,
3528 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
3529 .format = MIPI_DSI_FMT_RGB888,
3533 static const struct drm_display_mode lg_lh500wx1_sd03_mode = {
3536 .hsync_start = 720 + 12,
3537 .hsync_end = 720 + 12 + 4,
3538 .htotal = 720 + 12 + 4 + 112,
3540 .vsync_start = 1280 + 8,
3541 .vsync_end = 1280 + 8 + 4,
3542 .vtotal = 1280 + 8 + 4 + 12,
3546 static const struct panel_desc_dsi lg_lh500wx1_sd03 = {
3548 .modes = &lg_lh500wx1_sd03_mode,
3556 .flags = MIPI_DSI_MODE_VIDEO,
3557 .format = MIPI_DSI_FMT_RGB888,
3561 static const struct drm_display_mode panasonic_vvx10f004b00_mode = {
3564 .hsync_start = 1920 + 154,
3565 .hsync_end = 1920 + 154 + 16,
3566 .htotal = 1920 + 154 + 16 + 32,
3568 .vsync_start = 1200 + 17,
3569 .vsync_end = 1200 + 17 + 2,
3570 .vtotal = 1200 + 17 + 2 + 16,
3574 static const struct panel_desc_dsi panasonic_vvx10f004b00 = {
3576 .modes = &panasonic_vvx10f004b00_mode,
3584 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
3585 MIPI_DSI_CLOCK_NON_CONTINUOUS,
3586 .format = MIPI_DSI_FMT_RGB888,
3590 static const struct drm_display_mode lg_acx467akm_7_mode = {
3593 .hsync_start = 1080 + 2,
3594 .hsync_end = 1080 + 2 + 2,
3595 .htotal = 1080 + 2 + 2 + 2,
3597 .vsync_start = 1920 + 2,
3598 .vsync_end = 1920 + 2 + 2,
3599 .vtotal = 1920 + 2 + 2 + 2,
3603 static const struct panel_desc_dsi lg_acx467akm_7 = {
3605 .modes = &lg_acx467akm_7_mode,
3614 .format = MIPI_DSI_FMT_RGB888,
3618 static const struct drm_display_mode osd101t2045_53ts_mode = {
3621 .hsync_start = 1920 + 112,
3622 .hsync_end = 1920 + 112 + 16,
3623 .htotal = 1920 + 112 + 16 + 32,
3625 .vsync_start = 1200 + 16,
3626 .vsync_end = 1200 + 16 + 2,
3627 .vtotal = 1200 + 16 + 2 + 16,
3629 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
3632 static const struct panel_desc_dsi osd101t2045_53ts = {
3634 .modes = &osd101t2045_53ts_mode,
3642 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
3643 MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
3644 MIPI_DSI_MODE_EOT_PACKET,
3645 .format = MIPI_DSI_FMT_RGB888,
3649 static const struct of_device_id dsi_of_match[] = {
3651 .compatible = "auo,b080uan01",
3652 .data = &auo_b080uan01
3654 .compatible = "boe,tv080wum-nl0",
3655 .data = &boe_tv080wum_nl0
3657 .compatible = "lg,ld070wx3-sl01",
3658 .data = &lg_ld070wx3_sl01
3660 .compatible = "lg,lh500wx1-sd03",
3661 .data = &lg_lh500wx1_sd03
3663 .compatible = "panasonic,vvx10f004b00",
3664 .data = &panasonic_vvx10f004b00
3666 .compatible = "lg,acx467akm-7",
3667 .data = &lg_acx467akm_7
3669 .compatible = "osddisplays,osd101t2045-53ts",
3670 .data = &osd101t2045_53ts
3675 MODULE_DEVICE_TABLE(of, dsi_of_match);
3677 static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
3679 const struct panel_desc_dsi *desc;
3680 const struct of_device_id *id;
3683 id = of_match_node(dsi_of_match, dsi->dev.of_node);
3689 err = panel_simple_probe(&dsi->dev, &desc->desc);
3693 dsi->mode_flags = desc->flags;
3694 dsi->format = desc->format;
3695 dsi->lanes = desc->lanes;
3697 err = mipi_dsi_attach(dsi);
3699 struct panel_simple *panel = dev_get_drvdata(&dsi->dev);
3701 drm_panel_remove(&panel->base);
3707 static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi)
3711 err = mipi_dsi_detach(dsi);
3713 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
3715 return panel_simple_remove(&dsi->dev);
3718 static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi)
3720 panel_simple_shutdown(&dsi->dev);
3723 static struct mipi_dsi_driver panel_simple_dsi_driver = {
3725 .name = "panel-simple-dsi",
3726 .of_match_table = dsi_of_match,
3728 .probe = panel_simple_dsi_probe,
3729 .remove = panel_simple_dsi_remove,
3730 .shutdown = panel_simple_dsi_shutdown,
3733 static int __init panel_simple_init(void)
3737 err = platform_driver_register(&panel_simple_platform_driver);
3741 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) {
3742 err = mipi_dsi_driver_register(&panel_simple_dsi_driver);
3749 module_init(panel_simple_init);
3751 static void __exit panel_simple_exit(void)
3753 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI))
3754 mipi_dsi_driver_unregister(&panel_simple_dsi_driver);
3756 platform_driver_unregister(&panel_simple_platform_driver);
3758 module_exit(panel_simple_exit);
3761 MODULE_DESCRIPTION("DRM Driver for Simple Panels");
3762 MODULE_LICENSE("GPL and additional rights");