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/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>
32 #include <drm/drm_crtc.h>
33 #include <drm/drm_mipi_dsi.h>
34 #include <drm/drm_panel.h>
36 #include <video/display_timing.h>
37 #include <video/videomode.h>
40 const struct drm_display_mode *modes;
41 unsigned int num_modes;
42 const struct display_timing *timings;
43 unsigned int num_timings;
48 * @width: width (in millimeters) of the panel's active display area
49 * @height: height (in millimeters) of the panel's active display area
57 * @prepare: the time (in milliseconds) that it takes for the panel to
58 * become ready and start receiving video data
59 * @enable: the time (in milliseconds) that it takes for the panel to
60 * display the first valid frame after starting to receive
62 * @disable: the time (in milliseconds) that it takes for the panel to
63 * turn the display off (no content is visible)
64 * @unprepare: the time (in milliseconds) that it takes for the panel
65 * to power itself down completely
71 unsigned int unprepare;
79 struct drm_panel base;
83 const struct panel_desc *desc;
85 struct backlight_device *backlight;
86 struct regulator *supply;
87 struct i2c_adapter *ddc;
89 struct gpio_desc *enable_gpio;
92 static inline struct panel_simple *to_panel_simple(struct drm_panel *panel)
94 return container_of(panel, struct panel_simple, base);
97 static int panel_simple_get_fixed_modes(struct panel_simple *panel)
99 struct drm_connector *connector = panel->base.connector;
100 struct drm_device *drm = panel->base.drm;
101 struct drm_display_mode *mode;
102 unsigned int i, num = 0;
107 for (i = 0; i < panel->desc->num_timings; i++) {
108 const struct display_timing *dt = &panel->desc->timings[i];
111 videomode_from_timing(dt, &vm);
112 mode = drm_mode_create(drm);
114 dev_err(drm->dev, "failed to add mode %ux%u\n",
115 dt->hactive.typ, dt->vactive.typ);
119 drm_display_mode_from_videomode(&vm, mode);
121 mode->type |= DRM_MODE_TYPE_DRIVER;
123 if (panel->desc->num_timings == 1)
124 mode->type |= DRM_MODE_TYPE_PREFERRED;
126 drm_mode_probed_add(connector, mode);
130 for (i = 0; i < panel->desc->num_modes; i++) {
131 const struct drm_display_mode *m = &panel->desc->modes[i];
133 mode = drm_mode_duplicate(drm, m);
135 dev_err(drm->dev, "failed to add mode %ux%u@%u\n",
136 m->hdisplay, m->vdisplay, m->vrefresh);
140 mode->type |= DRM_MODE_TYPE_DRIVER;
142 if (panel->desc->num_modes == 1)
143 mode->type |= DRM_MODE_TYPE_PREFERRED;
145 drm_mode_set_name(mode);
147 drm_mode_probed_add(connector, mode);
151 connector->display_info.bpc = panel->desc->bpc;
152 connector->display_info.width_mm = panel->desc->size.width;
153 connector->display_info.height_mm = panel->desc->size.height;
154 if (panel->desc->bus_format)
155 drm_display_info_set_bus_formats(&connector->display_info,
156 &panel->desc->bus_format, 1);
157 connector->display_info.bus_flags = panel->desc->bus_flags;
162 static int panel_simple_disable(struct drm_panel *panel)
164 struct panel_simple *p = to_panel_simple(panel);
170 p->backlight->props.power = FB_BLANK_POWERDOWN;
171 p->backlight->props.state |= BL_CORE_FBBLANK;
172 backlight_update_status(p->backlight);
175 if (p->desc->delay.disable)
176 msleep(p->desc->delay.disable);
183 static int panel_simple_unprepare(struct drm_panel *panel)
185 struct panel_simple *p = to_panel_simple(panel);
190 gpiod_set_value_cansleep(p->enable_gpio, 0);
192 regulator_disable(p->supply);
194 if (p->desc->delay.unprepare)
195 msleep(p->desc->delay.unprepare);
202 static int panel_simple_prepare(struct drm_panel *panel)
204 struct panel_simple *p = to_panel_simple(panel);
210 err = regulator_enable(p->supply);
212 dev_err(panel->dev, "failed to enable supply: %d\n", err);
216 gpiod_set_value_cansleep(p->enable_gpio, 1);
218 if (p->desc->delay.prepare)
219 msleep(p->desc->delay.prepare);
226 static int panel_simple_enable(struct drm_panel *panel)
228 struct panel_simple *p = to_panel_simple(panel);
233 if (p->desc->delay.enable)
234 msleep(p->desc->delay.enable);
237 p->backlight->props.state &= ~BL_CORE_FBBLANK;
238 p->backlight->props.power = FB_BLANK_UNBLANK;
239 backlight_update_status(p->backlight);
247 static int panel_simple_get_modes(struct drm_panel *panel)
249 struct panel_simple *p = to_panel_simple(panel);
252 /* probe EDID if a DDC bus is available */
254 struct edid *edid = drm_get_edid(panel->connector, p->ddc);
255 drm_connector_update_edid_property(panel->connector, edid);
257 num += drm_add_edid_modes(panel->connector, edid);
262 /* add hard-coded panel modes */
263 num += panel_simple_get_fixed_modes(p);
268 static int panel_simple_get_timings(struct drm_panel *panel,
269 unsigned int num_timings,
270 struct display_timing *timings)
272 struct panel_simple *p = to_panel_simple(panel);
275 if (p->desc->num_timings < num_timings)
276 num_timings = p->desc->num_timings;
279 for (i = 0; i < num_timings; i++)
280 timings[i] = p->desc->timings[i];
282 return p->desc->num_timings;
285 static const struct drm_panel_funcs panel_simple_funcs = {
286 .disable = panel_simple_disable,
287 .unprepare = panel_simple_unprepare,
288 .prepare = panel_simple_prepare,
289 .enable = panel_simple_enable,
290 .get_modes = panel_simple_get_modes,
291 .get_timings = panel_simple_get_timings,
294 static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
296 struct device_node *backlight, *ddc;
297 struct panel_simple *panel;
300 panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL);
304 panel->enabled = false;
305 panel->prepared = false;
308 panel->supply = devm_regulator_get(dev, "power");
309 if (IS_ERR(panel->supply))
310 return PTR_ERR(panel->supply);
312 panel->enable_gpio = devm_gpiod_get_optional(dev, "enable",
314 if (IS_ERR(panel->enable_gpio)) {
315 err = PTR_ERR(panel->enable_gpio);
316 if (err != -EPROBE_DEFER)
317 dev_err(dev, "failed to request GPIO: %d\n", err);
321 backlight = of_parse_phandle(dev->of_node, "backlight", 0);
323 panel->backlight = of_find_backlight_by_node(backlight);
324 of_node_put(backlight);
326 if (!panel->backlight)
327 return -EPROBE_DEFER;
330 ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0);
332 panel->ddc = of_find_i2c_adapter_by_node(ddc);
341 drm_panel_init(&panel->base);
342 panel->base.dev = dev;
343 panel->base.funcs = &panel_simple_funcs;
345 err = drm_panel_add(&panel->base);
349 dev_set_drvdata(dev, panel);
355 put_device(&panel->ddc->dev);
357 if (panel->backlight)
358 put_device(&panel->backlight->dev);
363 static int panel_simple_remove(struct device *dev)
365 struct panel_simple *panel = dev_get_drvdata(dev);
367 drm_panel_remove(&panel->base);
369 panel_simple_disable(&panel->base);
370 panel_simple_unprepare(&panel->base);
373 put_device(&panel->ddc->dev);
375 if (panel->backlight)
376 put_device(&panel->backlight->dev);
381 static void panel_simple_shutdown(struct device *dev)
383 struct panel_simple *panel = dev_get_drvdata(dev);
385 panel_simple_disable(&panel->base);
386 panel_simple_unprepare(&panel->base);
389 static const struct drm_display_mode ampire_am_480272h3tmqw_t01h_mode = {
392 .hsync_start = 480 + 2,
393 .hsync_end = 480 + 2 + 41,
394 .htotal = 480 + 2 + 41 + 2,
396 .vsync_start = 272 + 2,
397 .vsync_end = 272 + 2 + 10,
398 .vtotal = 272 + 2 + 10 + 2,
400 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
403 static const struct panel_desc ampire_am_480272h3tmqw_t01h = {
404 .modes = &ire_am_480272h3tmqw_t01h_mode,
411 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
414 static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = {
417 .hsync_start = 800 + 0,
418 .hsync_end = 800 + 0 + 255,
419 .htotal = 800 + 0 + 255 + 0,
421 .vsync_start = 480 + 2,
422 .vsync_end = 480 + 2 + 45,
423 .vtotal = 480 + 2 + 45 + 0,
425 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
428 static const struct panel_desc ampire_am800480r3tmqwa1h = {
429 .modes = &ire_am800480r3tmqwa1h_mode,
436 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
439 static const struct drm_display_mode auo_b101aw03_mode = {
442 .hsync_start = 1024 + 156,
443 .hsync_end = 1024 + 156 + 8,
444 .htotal = 1024 + 156 + 8 + 156,
446 .vsync_start = 600 + 16,
447 .vsync_end = 600 + 16 + 6,
448 .vtotal = 600 + 16 + 6 + 16,
452 static const struct panel_desc auo_b101aw03 = {
453 .modes = &auo_b101aw03_mode,
462 static const struct drm_display_mode auo_b101ean01_mode = {
465 .hsync_start = 1280 + 119,
466 .hsync_end = 1280 + 119 + 32,
467 .htotal = 1280 + 119 + 32 + 21,
469 .vsync_start = 800 + 4,
470 .vsync_end = 800 + 4 + 20,
471 .vtotal = 800 + 4 + 20 + 8,
475 static const struct panel_desc auo_b101ean01 = {
476 .modes = &auo_b101ean01_mode,
485 static const struct drm_display_mode auo_b101xtn01_mode = {
488 .hsync_start = 1366 + 20,
489 .hsync_end = 1366 + 20 + 70,
490 .htotal = 1366 + 20 + 70,
492 .vsync_start = 768 + 14,
493 .vsync_end = 768 + 14 + 42,
494 .vtotal = 768 + 14 + 42,
496 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
499 static const struct panel_desc auo_b101xtn01 = {
500 .modes = &auo_b101xtn01_mode,
509 static const struct drm_display_mode auo_b116xw03_mode = {
512 .hsync_start = 1366 + 40,
513 .hsync_end = 1366 + 40 + 40,
514 .htotal = 1366 + 40 + 40 + 32,
516 .vsync_start = 768 + 10,
517 .vsync_end = 768 + 10 + 12,
518 .vtotal = 768 + 10 + 12 + 6,
522 static const struct panel_desc auo_b116xw03 = {
523 .modes = &auo_b116xw03_mode,
532 static const struct drm_display_mode auo_b133xtn01_mode = {
535 .hsync_start = 1366 + 48,
536 .hsync_end = 1366 + 48 + 32,
537 .htotal = 1366 + 48 + 32 + 20,
539 .vsync_start = 768 + 3,
540 .vsync_end = 768 + 3 + 6,
541 .vtotal = 768 + 3 + 6 + 13,
545 static const struct panel_desc auo_b133xtn01 = {
546 .modes = &auo_b133xtn01_mode,
555 static const struct drm_display_mode auo_b133htn01_mode = {
558 .hsync_start = 1920 + 172,
559 .hsync_end = 1920 + 172 + 80,
560 .htotal = 1920 + 172 + 80 + 60,
562 .vsync_start = 1080 + 25,
563 .vsync_end = 1080 + 25 + 10,
564 .vtotal = 1080 + 25 + 10 + 10,
568 static const struct panel_desc auo_b133htn01 = {
569 .modes = &auo_b133htn01_mode,
583 static const struct display_timing auo_g070vvn01_timings = {
584 .pixelclock = { 33300000, 34209000, 45000000 },
585 .hactive = { 800, 800, 800 },
586 .hfront_porch = { 20, 40, 200 },
587 .hback_porch = { 87, 40, 1 },
588 .hsync_len = { 1, 48, 87 },
589 .vactive = { 480, 480, 480 },
590 .vfront_porch = { 5, 13, 200 },
591 .vback_porch = { 31, 31, 29 },
592 .vsync_len = { 1, 1, 3 },
595 static const struct panel_desc auo_g070vvn01 = {
596 .timings = &auo_g070vvn01_timings,
611 static const struct drm_display_mode auo_g104sn02_mode = {
614 .hsync_start = 800 + 40,
615 .hsync_end = 800 + 40 + 216,
616 .htotal = 800 + 40 + 216 + 128,
618 .vsync_start = 600 + 10,
619 .vsync_end = 600 + 10 + 35,
620 .vtotal = 600 + 10 + 35 + 2,
624 static const struct panel_desc auo_g104sn02 = {
625 .modes = &auo_g104sn02_mode,
634 static const struct display_timing auo_g133han01_timings = {
635 .pixelclock = { 134000000, 141200000, 149000000 },
636 .hactive = { 1920, 1920, 1920 },
637 .hfront_porch = { 39, 58, 77 },
638 .hback_porch = { 59, 88, 117 },
639 .hsync_len = { 28, 42, 56 },
640 .vactive = { 1080, 1080, 1080 },
641 .vfront_porch = { 3, 8, 11 },
642 .vback_porch = { 5, 14, 19 },
643 .vsync_len = { 4, 14, 19 },
646 static const struct panel_desc auo_g133han01 = {
647 .timings = &auo_g133han01_timings,
660 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
663 static const struct display_timing auo_g185han01_timings = {
664 .pixelclock = { 120000000, 144000000, 175000000 },
665 .hactive = { 1920, 1920, 1920 },
666 .hfront_porch = { 18, 60, 74 },
667 .hback_porch = { 12, 44, 54 },
668 .hsync_len = { 10, 24, 32 },
669 .vactive = { 1080, 1080, 1080 },
670 .vfront_porch = { 6, 10, 40 },
671 .vback_porch = { 2, 5, 20 },
672 .vsync_len = { 2, 5, 20 },
675 static const struct panel_desc auo_g185han01 = {
676 .timings = &auo_g185han01_timings,
689 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
692 static const struct display_timing auo_p320hvn03_timings = {
693 .pixelclock = { 106000000, 148500000, 164000000 },
694 .hactive = { 1920, 1920, 1920 },
695 .hfront_porch = { 25, 50, 130 },
696 .hback_porch = { 25, 50, 130 },
697 .hsync_len = { 20, 40, 105 },
698 .vactive = { 1080, 1080, 1080 },
699 .vfront_porch = { 8, 17, 150 },
700 .vback_porch = { 8, 17, 150 },
701 .vsync_len = { 4, 11, 100 },
704 static const struct panel_desc auo_p320hvn03 = {
705 .timings = &auo_p320hvn03_timings,
717 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
720 static const struct drm_display_mode auo_t215hvn01_mode = {
723 .hsync_start = 1920 + 88,
724 .hsync_end = 1920 + 88 + 44,
725 .htotal = 1920 + 88 + 44 + 148,
727 .vsync_start = 1080 + 4,
728 .vsync_end = 1080 + 4 + 5,
729 .vtotal = 1080 + 4 + 5 + 36,
733 static const struct panel_desc auo_t215hvn01 = {
734 .modes = &auo_t215hvn01_mode,
747 static const struct drm_display_mode avic_tm070ddh03_mode = {
750 .hsync_start = 1024 + 160,
751 .hsync_end = 1024 + 160 + 4,
752 .htotal = 1024 + 160 + 4 + 156,
754 .vsync_start = 600 + 17,
755 .vsync_end = 600 + 17 + 1,
756 .vtotal = 600 + 17 + 1 + 17,
760 static const struct panel_desc avic_tm070ddh03 = {
761 .modes = &avic_tm070ddh03_mode,
775 static const struct drm_display_mode bananapi_s070wv20_ct16_mode = {
778 .hsync_start = 800 + 40,
779 .hsync_end = 800 + 40 + 48,
780 .htotal = 800 + 40 + 48 + 40,
782 .vsync_start = 480 + 13,
783 .vsync_end = 480 + 13 + 3,
784 .vtotal = 480 + 13 + 3 + 29,
787 static const struct panel_desc bananapi_s070wv20_ct16 = {
788 .modes = &bananapi_s070wv20_ct16_mode,
797 static const struct drm_display_mode boe_hv070wsa_mode = {
800 .hsync_start = 1024 + 30,
801 .hsync_end = 1024 + 30 + 30,
802 .htotal = 1024 + 30 + 30 + 30,
804 .vsync_start = 600 + 10,
805 .vsync_end = 600 + 10 + 10,
806 .vtotal = 600 + 10 + 10 + 10,
810 static const struct panel_desc boe_hv070wsa = {
811 .modes = &boe_hv070wsa_mode,
819 static const struct drm_display_mode boe_nv101wxmn51_modes[] = {
823 .hsync_start = 1280 + 48,
824 .hsync_end = 1280 + 48 + 32,
825 .htotal = 1280 + 48 + 32 + 80,
827 .vsync_start = 800 + 3,
828 .vsync_end = 800 + 3 + 5,
829 .vtotal = 800 + 3 + 5 + 24,
835 .hsync_start = 1280 + 48,
836 .hsync_end = 1280 + 48 + 32,
837 .htotal = 1280 + 48 + 32 + 80,
839 .vsync_start = 800 + 3,
840 .vsync_end = 800 + 3 + 5,
841 .vtotal = 800 + 3 + 5 + 24,
846 static const struct panel_desc boe_nv101wxmn51 = {
847 .modes = boe_nv101wxmn51_modes,
848 .num_modes = ARRAY_SIZE(boe_nv101wxmn51_modes),
861 static const struct drm_display_mode cdtech_s043wq26h_ct7_mode = {
864 .hsync_start = 480 + 5,
865 .hsync_end = 480 + 5 + 5,
866 .htotal = 480 + 5 + 5 + 40,
868 .vsync_start = 272 + 8,
869 .vsync_end = 272 + 8 + 8,
870 .vtotal = 272 + 8 + 8 + 8,
872 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
875 static const struct panel_desc cdtech_s043wq26h_ct7 = {
876 .modes = &cdtech_s043wq26h_ct7_mode,
883 .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE,
886 static const struct drm_display_mode cdtech_s070wv95_ct16_mode = {
889 .hsync_start = 800 + 40,
890 .hsync_end = 800 + 40 + 40,
891 .htotal = 800 + 40 + 40 + 48,
893 .vsync_start = 480 + 29,
894 .vsync_end = 480 + 29 + 13,
895 .vtotal = 480 + 29 + 13 + 3,
897 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
900 static const struct panel_desc cdtech_s070wv95_ct16 = {
901 .modes = &cdtech_s070wv95_ct16_mode,
910 static const struct drm_display_mode chunghwa_claa070wp03xg_mode = {
913 .hsync_start = 800 + 49,
914 .hsync_end = 800 + 49 + 33,
915 .htotal = 800 + 49 + 33 + 17,
917 .vsync_start = 1280 + 1,
918 .vsync_end = 1280 + 1 + 7,
919 .vtotal = 1280 + 1 + 7 + 15,
921 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
924 static const struct panel_desc chunghwa_claa070wp03xg = {
925 .modes = &chunghwa_claa070wp03xg_mode,
934 static const struct drm_display_mode chunghwa_claa101wa01a_mode = {
937 .hsync_start = 1366 + 58,
938 .hsync_end = 1366 + 58 + 58,
939 .htotal = 1366 + 58 + 58 + 58,
941 .vsync_start = 768 + 4,
942 .vsync_end = 768 + 4 + 4,
943 .vtotal = 768 + 4 + 4 + 4,
947 static const struct panel_desc chunghwa_claa101wa01a = {
948 .modes = &chunghwa_claa101wa01a_mode,
957 static const struct drm_display_mode chunghwa_claa101wb01_mode = {
960 .hsync_start = 1366 + 48,
961 .hsync_end = 1366 + 48 + 32,
962 .htotal = 1366 + 48 + 32 + 20,
964 .vsync_start = 768 + 16,
965 .vsync_end = 768 + 16 + 8,
966 .vtotal = 768 + 16 + 8 + 16,
970 static const struct panel_desc chunghwa_claa101wb01 = {
971 .modes = &chunghwa_claa101wb01_mode,
980 static const struct drm_display_mode dataimage_scf0700c48ggu18_mode = {
983 .hsync_start = 800 + 40,
984 .hsync_end = 800 + 40 + 128,
985 .htotal = 800 + 40 + 128 + 88,
987 .vsync_start = 480 + 10,
988 .vsync_end = 480 + 10 + 2,
989 .vtotal = 480 + 10 + 2 + 33,
991 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
994 static const struct panel_desc dataimage_scf0700c48ggu18 = {
995 .modes = &dataimage_scf0700c48ggu18_mode,
1002 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1003 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
1006 static const struct display_timing dlc_dlc0700yzg_1_timing = {
1007 .pixelclock = { 45000000, 51200000, 57000000 },
1008 .hactive = { 1024, 1024, 1024 },
1009 .hfront_porch = { 100, 106, 113 },
1010 .hback_porch = { 100, 106, 113 },
1011 .hsync_len = { 100, 108, 114 },
1012 .vactive = { 600, 600, 600 },
1013 .vfront_porch = { 8, 11, 15 },
1014 .vback_porch = { 8, 11, 15 },
1015 .vsync_len = { 9, 13, 15 },
1016 .flags = DISPLAY_FLAGS_DE_HIGH,
1019 static const struct panel_desc dlc_dlc0700yzg_1 = {
1020 .timings = &dlc_dlc0700yzg_1_timing,
1032 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1035 static const struct display_timing dlc_dlc1010gig_timing = {
1036 .pixelclock = { 68900000, 71100000, 73400000 },
1037 .hactive = { 1280, 1280, 1280 },
1038 .hfront_porch = { 43, 53, 63 },
1039 .hback_porch = { 43, 53, 63 },
1040 .hsync_len = { 44, 54, 64 },
1041 .vactive = { 800, 800, 800 },
1042 .vfront_porch = { 5, 8, 11 },
1043 .vback_porch = { 5, 8, 11 },
1044 .vsync_len = { 5, 7, 11 },
1045 .flags = DISPLAY_FLAGS_DE_HIGH,
1048 static const struct panel_desc dlc_dlc1010gig = {
1049 .timings = &dlc_dlc1010gig_timing,
1062 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1065 static const struct drm_display_mode edt_et057090dhu_mode = {
1068 .hsync_start = 640 + 16,
1069 .hsync_end = 640 + 16 + 30,
1070 .htotal = 640 + 16 + 30 + 114,
1072 .vsync_start = 480 + 10,
1073 .vsync_end = 480 + 10 + 3,
1074 .vtotal = 480 + 10 + 3 + 32,
1076 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1079 static const struct panel_desc edt_et057090dhu = {
1080 .modes = &edt_et057090dhu_mode,
1087 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1088 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
1091 static const struct drm_display_mode edt_etm0700g0dh6_mode = {
1094 .hsync_start = 800 + 40,
1095 .hsync_end = 800 + 40 + 128,
1096 .htotal = 800 + 40 + 128 + 88,
1098 .vsync_start = 480 + 10,
1099 .vsync_end = 480 + 10 + 2,
1100 .vtotal = 480 + 10 + 2 + 33,
1102 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1105 static const struct panel_desc edt_etm0700g0dh6 = {
1106 .modes = &edt_etm0700g0dh6_mode,
1113 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1114 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
1117 static const struct panel_desc edt_etm0700g0bdh6 = {
1118 .modes = &edt_etm0700g0dh6_mode,
1125 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1126 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
1129 static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = {
1132 .hsync_start = 800 + 168,
1133 .hsync_end = 800 + 168 + 64,
1134 .htotal = 800 + 168 + 64 + 88,
1136 .vsync_start = 480 + 37,
1137 .vsync_end = 480 + 37 + 2,
1138 .vtotal = 480 + 37 + 2 + 8,
1142 static const struct panel_desc foxlink_fl500wvr00_a0t = {
1143 .modes = &foxlink_fl500wvr00_a0t_mode,
1150 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1153 static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
1156 .hsync_start = 480 + 5,
1157 .hsync_end = 480 + 5 + 1,
1158 .htotal = 480 + 5 + 1 + 40,
1160 .vsync_start = 272 + 8,
1161 .vsync_end = 272 + 8 + 1,
1162 .vtotal = 272 + 8 + 1 + 8,
1166 static const struct panel_desc giantplus_gpg482739qs5 = {
1167 .modes = &giantplus_gpg482739qs5_mode,
1174 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1177 static const struct display_timing hannstar_hsd070pww1_timing = {
1178 .pixelclock = { 64300000, 71100000, 82000000 },
1179 .hactive = { 1280, 1280, 1280 },
1180 .hfront_porch = { 1, 1, 10 },
1181 .hback_porch = { 1, 1, 10 },
1183 * According to the data sheet, the minimum horizontal blanking interval
1184 * is 54 clocks (1 + 52 + 1), but tests with a Nitrogen6X have shown the
1185 * minimum working horizontal blanking interval to be 60 clocks.
1187 .hsync_len = { 58, 158, 661 },
1188 .vactive = { 800, 800, 800 },
1189 .vfront_porch = { 1, 1, 10 },
1190 .vback_porch = { 1, 1, 10 },
1191 .vsync_len = { 1, 21, 203 },
1192 .flags = DISPLAY_FLAGS_DE_HIGH,
1195 static const struct panel_desc hannstar_hsd070pww1 = {
1196 .timings = &hannstar_hsd070pww1_timing,
1203 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1206 static const struct display_timing hannstar_hsd100pxn1_timing = {
1207 .pixelclock = { 55000000, 65000000, 75000000 },
1208 .hactive = { 1024, 1024, 1024 },
1209 .hfront_porch = { 40, 40, 40 },
1210 .hback_porch = { 220, 220, 220 },
1211 .hsync_len = { 20, 60, 100 },
1212 .vactive = { 768, 768, 768 },
1213 .vfront_porch = { 7, 7, 7 },
1214 .vback_porch = { 21, 21, 21 },
1215 .vsync_len = { 10, 10, 10 },
1216 .flags = DISPLAY_FLAGS_DE_HIGH,
1219 static const struct panel_desc hannstar_hsd100pxn1 = {
1220 .timings = &hannstar_hsd100pxn1_timing,
1227 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1230 static const struct drm_display_mode hitachi_tx23d38vm0caa_mode = {
1233 .hsync_start = 800 + 85,
1234 .hsync_end = 800 + 85 + 86,
1235 .htotal = 800 + 85 + 86 + 85,
1237 .vsync_start = 480 + 16,
1238 .vsync_end = 480 + 16 + 13,
1239 .vtotal = 480 + 16 + 13 + 16,
1243 static const struct panel_desc hitachi_tx23d38vm0caa = {
1244 .modes = &hitachi_tx23d38vm0caa_mode,
1257 static const struct drm_display_mode innolux_at043tn24_mode = {
1260 .hsync_start = 480 + 2,
1261 .hsync_end = 480 + 2 + 41,
1262 .htotal = 480 + 2 + 41 + 2,
1264 .vsync_start = 272 + 2,
1265 .vsync_end = 272 + 2 + 10,
1266 .vtotal = 272 + 2 + 10 + 2,
1268 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1271 static const struct panel_desc innolux_at043tn24 = {
1272 .modes = &innolux_at043tn24_mode,
1279 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1280 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
1283 static const struct drm_display_mode innolux_at070tn92_mode = {
1286 .hsync_start = 800 + 210,
1287 .hsync_end = 800 + 210 + 20,
1288 .htotal = 800 + 210 + 20 + 46,
1290 .vsync_start = 480 + 22,
1291 .vsync_end = 480 + 22 + 10,
1292 .vtotal = 480 + 22 + 23 + 10,
1296 static const struct panel_desc innolux_at070tn92 = {
1297 .modes = &innolux_at070tn92_mode,
1303 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1306 static const struct display_timing innolux_g070y2_l01_timing = {
1307 .pixelclock = { 28000000, 29500000, 32000000 },
1308 .hactive = { 800, 800, 800 },
1309 .hfront_porch = { 61, 91, 141 },
1310 .hback_porch = { 60, 90, 140 },
1311 .hsync_len = { 12, 12, 12 },
1312 .vactive = { 480, 480, 480 },
1313 .vfront_porch = { 4, 9, 30 },
1314 .vback_porch = { 4, 8, 28 },
1315 .vsync_len = { 2, 2, 2 },
1316 .flags = DISPLAY_FLAGS_DE_HIGH,
1319 static const struct panel_desc innolux_g070y2_l01 = {
1320 .timings = &innolux_g070y2_l01_timing,
1333 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1336 static const struct display_timing innolux_g101ice_l01_timing = {
1337 .pixelclock = { 60400000, 71100000, 74700000 },
1338 .hactive = { 1280, 1280, 1280 },
1339 .hfront_porch = { 41, 80, 100 },
1340 .hback_porch = { 40, 79, 99 },
1341 .hsync_len = { 1, 1, 1 },
1342 .vactive = { 800, 800, 800 },
1343 .vfront_porch = { 5, 11, 14 },
1344 .vback_porch = { 4, 11, 14 },
1345 .vsync_len = { 1, 1, 1 },
1346 .flags = DISPLAY_FLAGS_DE_HIGH,
1349 static const struct panel_desc innolux_g101ice_l01 = {
1350 .timings = &innolux_g101ice_l01_timing,
1361 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1364 static const struct display_timing innolux_g121i1_l01_timing = {
1365 .pixelclock = { 67450000, 71000000, 74550000 },
1366 .hactive = { 1280, 1280, 1280 },
1367 .hfront_porch = { 40, 80, 160 },
1368 .hback_porch = { 39, 79, 159 },
1369 .hsync_len = { 1, 1, 1 },
1370 .vactive = { 800, 800, 800 },
1371 .vfront_porch = { 5, 11, 100 },
1372 .vback_porch = { 4, 11, 99 },
1373 .vsync_len = { 1, 1, 1 },
1376 static const struct panel_desc innolux_g121i1_l01 = {
1377 .timings = &innolux_g121i1_l01_timing,
1388 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1391 static const struct drm_display_mode innolux_g121x1_l03_mode = {
1394 .hsync_start = 1024 + 0,
1395 .hsync_end = 1024 + 1,
1396 .htotal = 1024 + 0 + 1 + 320,
1398 .vsync_start = 768 + 38,
1399 .vsync_end = 768 + 38 + 1,
1400 .vtotal = 768 + 38 + 1 + 0,
1402 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1405 static const struct panel_desc innolux_g121x1_l03 = {
1406 .modes = &innolux_g121x1_l03_mode,
1420 static const struct drm_display_mode innolux_n116bge_mode = {
1423 .hsync_start = 1366 + 136,
1424 .hsync_end = 1366 + 136 + 30,
1425 .htotal = 1366 + 136 + 30 + 60,
1427 .vsync_start = 768 + 8,
1428 .vsync_end = 768 + 8 + 12,
1429 .vtotal = 768 + 8 + 12 + 12,
1431 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1434 static const struct panel_desc innolux_n116bge = {
1435 .modes = &innolux_n116bge_mode,
1444 static const struct drm_display_mode innolux_n156bge_l21_mode = {
1447 .hsync_start = 1366 + 16,
1448 .hsync_end = 1366 + 16 + 34,
1449 .htotal = 1366 + 16 + 34 + 50,
1451 .vsync_start = 768 + 2,
1452 .vsync_end = 768 + 2 + 6,
1453 .vtotal = 768 + 2 + 6 + 12,
1457 static const struct panel_desc innolux_n156bge_l21 = {
1458 .modes = &innolux_n156bge_l21_mode,
1467 static const struct drm_display_mode innolux_tv123wam_mode = {
1470 .hsync_start = 2160 + 48,
1471 .hsync_end = 2160 + 48 + 32,
1472 .htotal = 2160 + 48 + 32 + 80,
1474 .vsync_start = 1440 + 3,
1475 .vsync_end = 1440 + 3 + 10,
1476 .vtotal = 1440 + 3 + 10 + 27,
1478 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
1481 static const struct panel_desc innolux_tv123wam = {
1482 .modes = &innolux_tv123wam_mode,
1494 static const struct drm_display_mode innolux_zj070na_01p_mode = {
1497 .hsync_start = 1024 + 128,
1498 .hsync_end = 1024 + 128 + 64,
1499 .htotal = 1024 + 128 + 64 + 128,
1501 .vsync_start = 600 + 16,
1502 .vsync_end = 600 + 16 + 4,
1503 .vtotal = 600 + 16 + 4 + 16,
1507 static const struct panel_desc innolux_zj070na_01p = {
1508 .modes = &innolux_zj070na_01p_mode,
1517 static const struct display_timing koe_tx31d200vm0baa_timing = {
1518 .pixelclock = { 39600000, 43200000, 48000000 },
1519 .hactive = { 1280, 1280, 1280 },
1520 .hfront_porch = { 16, 36, 56 },
1521 .hback_porch = { 16, 36, 56 },
1522 .hsync_len = { 8, 8, 8 },
1523 .vactive = { 480, 480, 480 },
1524 .vfront_porch = { 6, 21, 33 },
1525 .vback_porch = { 6, 21, 33 },
1526 .vsync_len = { 8, 8, 8 },
1527 .flags = DISPLAY_FLAGS_DE_HIGH,
1530 static const struct panel_desc koe_tx31d200vm0baa = {
1531 .timings = &koe_tx31d200vm0baa_timing,
1538 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1541 static const struct display_timing kyo_tcg121xglp_timing = {
1542 .pixelclock = { 52000000, 65000000, 71000000 },
1543 .hactive = { 1024, 1024, 1024 },
1544 .hfront_porch = { 2, 2, 2 },
1545 .hback_porch = { 2, 2, 2 },
1546 .hsync_len = { 86, 124, 244 },
1547 .vactive = { 768, 768, 768 },
1548 .vfront_porch = { 2, 2, 2 },
1549 .vback_porch = { 2, 2, 2 },
1550 .vsync_len = { 6, 34, 73 },
1551 .flags = DISPLAY_FLAGS_DE_HIGH,
1554 static const struct panel_desc kyo_tcg121xglp = {
1555 .timings = &kyo_tcg121xglp_timing,
1562 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1565 static const struct drm_display_mode lg_lb070wv8_mode = {
1568 .hsync_start = 800 + 88,
1569 .hsync_end = 800 + 88 + 80,
1570 .htotal = 800 + 88 + 80 + 88,
1572 .vsync_start = 480 + 10,
1573 .vsync_end = 480 + 10 + 25,
1574 .vtotal = 480 + 10 + 25 + 10,
1578 static const struct panel_desc lg_lb070wv8 = {
1579 .modes = &lg_lb070wv8_mode,
1586 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1589 static const struct drm_display_mode lg_lp079qx1_sp0v_mode = {
1592 .hsync_start = 1536 + 12,
1593 .hsync_end = 1536 + 12 + 16,
1594 .htotal = 1536 + 12 + 16 + 48,
1596 .vsync_start = 2048 + 8,
1597 .vsync_end = 2048 + 8 + 4,
1598 .vtotal = 2048 + 8 + 4 + 8,
1600 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1603 static const struct panel_desc lg_lp079qx1_sp0v = {
1604 .modes = &lg_lp079qx1_sp0v_mode,
1612 static const struct drm_display_mode lg_lp097qx1_spa1_mode = {
1615 .hsync_start = 2048 + 150,
1616 .hsync_end = 2048 + 150 + 5,
1617 .htotal = 2048 + 150 + 5 + 5,
1619 .vsync_start = 1536 + 3,
1620 .vsync_end = 1536 + 3 + 1,
1621 .vtotal = 1536 + 3 + 1 + 9,
1625 static const struct panel_desc lg_lp097qx1_spa1 = {
1626 .modes = &lg_lp097qx1_spa1_mode,
1634 static const struct drm_display_mode lg_lp120up1_mode = {
1637 .hsync_start = 1920 + 40,
1638 .hsync_end = 1920 + 40 + 40,
1639 .htotal = 1920 + 40 + 40+ 80,
1641 .vsync_start = 1280 + 4,
1642 .vsync_end = 1280 + 4 + 4,
1643 .vtotal = 1280 + 4 + 4 + 12,
1647 static const struct panel_desc lg_lp120up1 = {
1648 .modes = &lg_lp120up1_mode,
1657 static const struct drm_display_mode lg_lp129qe_mode = {
1660 .hsync_start = 2560 + 48,
1661 .hsync_end = 2560 + 48 + 32,
1662 .htotal = 2560 + 48 + 32 + 80,
1664 .vsync_start = 1700 + 3,
1665 .vsync_end = 1700 + 3 + 10,
1666 .vtotal = 1700 + 3 + 10 + 36,
1670 static const struct panel_desc lg_lp129qe = {
1671 .modes = &lg_lp129qe_mode,
1680 static const struct drm_display_mode mitsubishi_aa070mc01_mode = {
1683 .hsync_start = 800 + 0,
1684 .hsync_end = 800 + 1,
1685 .htotal = 800 + 0 + 1 + 160,
1687 .vsync_start = 480 + 0,
1688 .vsync_end = 480 + 48 + 1,
1689 .vtotal = 480 + 48 + 1 + 0,
1691 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1694 static const struct panel_desc mitsubishi_aa070mc01 = {
1695 .modes = &mitsubishi_aa070mc01_mode,
1708 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1709 .bus_flags = DRM_BUS_FLAG_DE_HIGH,
1712 static const struct display_timing nec_nl12880bc20_05_timing = {
1713 .pixelclock = { 67000000, 71000000, 75000000 },
1714 .hactive = { 1280, 1280, 1280 },
1715 .hfront_porch = { 2, 30, 30 },
1716 .hback_porch = { 6, 100, 100 },
1717 .hsync_len = { 2, 30, 30 },
1718 .vactive = { 800, 800, 800 },
1719 .vfront_porch = { 5, 5, 5 },
1720 .vback_porch = { 11, 11, 11 },
1721 .vsync_len = { 7, 7, 7 },
1724 static const struct panel_desc nec_nl12880bc20_05 = {
1725 .timings = &nec_nl12880bc20_05_timing,
1736 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1739 static const struct drm_display_mode nec_nl4827hc19_05b_mode = {
1742 .hsync_start = 480 + 2,
1743 .hsync_end = 480 + 2 + 41,
1744 .htotal = 480 + 2 + 41 + 2,
1746 .vsync_start = 272 + 2,
1747 .vsync_end = 272 + 2 + 4,
1748 .vtotal = 272 + 2 + 4 + 2,
1750 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1753 static const struct panel_desc nec_nl4827hc19_05b = {
1754 .modes = &nec_nl4827hc19_05b_mode,
1761 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1762 .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE,
1765 static const struct drm_display_mode netron_dy_e231732_mode = {
1768 .hsync_start = 1024 + 160,
1769 .hsync_end = 1024 + 160 + 70,
1770 .htotal = 1024 + 160 + 70 + 90,
1772 .vsync_start = 600 + 127,
1773 .vsync_end = 600 + 127 + 20,
1774 .vtotal = 600 + 127 + 20 + 3,
1778 static const struct panel_desc netron_dy_e231732 = {
1779 .modes = &netron_dy_e231732_mode,
1785 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1788 static const struct drm_display_mode newhaven_nhd_43_480272ef_atxl_mode = {
1791 .hsync_start = 480 + 2,
1792 .hsync_end = 480 + 2 + 41,
1793 .htotal = 480 + 2 + 41 + 2,
1795 .vsync_start = 272 + 2,
1796 .vsync_end = 272 + 2 + 10,
1797 .vtotal = 272 + 2 + 10 + 2,
1799 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1802 static const struct panel_desc newhaven_nhd_43_480272ef_atxl = {
1803 .modes = &newhaven_nhd_43_480272ef_atxl_mode,
1810 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1811 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE |
1812 DRM_BUS_FLAG_SYNC_POSEDGE,
1815 static const struct display_timing nlt_nl192108ac18_02d_timing = {
1816 .pixelclock = { 130000000, 148350000, 163000000 },
1817 .hactive = { 1920, 1920, 1920 },
1818 .hfront_porch = { 80, 100, 100 },
1819 .hback_porch = { 100, 120, 120 },
1820 .hsync_len = { 50, 60, 60 },
1821 .vactive = { 1080, 1080, 1080 },
1822 .vfront_porch = { 12, 30, 30 },
1823 .vback_porch = { 4, 10, 10 },
1824 .vsync_len = { 4, 5, 5 },
1827 static const struct panel_desc nlt_nl192108ac18_02d = {
1828 .timings = &nlt_nl192108ac18_02d_timing,
1838 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1841 static const struct drm_display_mode nvd_9128_mode = {
1844 .hsync_start = 800 + 130,
1845 .hsync_end = 800 + 130 + 98,
1846 .htotal = 800 + 0 + 130 + 98,
1848 .vsync_start = 480 + 10,
1849 .vsync_end = 480 + 10 + 50,
1850 .vtotal = 480 + 0 + 10 + 50,
1853 static const struct panel_desc nvd_9128 = {
1854 .modes = &nvd_9128_mode,
1861 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1864 static const struct display_timing okaya_rs800480t_7x0gp_timing = {
1865 .pixelclock = { 30000000, 30000000, 40000000 },
1866 .hactive = { 800, 800, 800 },
1867 .hfront_porch = { 40, 40, 40 },
1868 .hback_porch = { 40, 40, 40 },
1869 .hsync_len = { 1, 48, 48 },
1870 .vactive = { 480, 480, 480 },
1871 .vfront_porch = { 13, 13, 13 },
1872 .vback_porch = { 29, 29, 29 },
1873 .vsync_len = { 3, 3, 3 },
1874 .flags = DISPLAY_FLAGS_DE_HIGH,
1877 static const struct panel_desc okaya_rs800480t_7x0gp = {
1878 .timings = &okaya_rs800480t_7x0gp_timing,
1891 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1894 static const struct drm_display_mode olimex_lcd_olinuxino_43ts_mode = {
1897 .hsync_start = 480 + 5,
1898 .hsync_end = 480 + 5 + 30,
1899 .htotal = 480 + 5 + 30 + 10,
1901 .vsync_start = 272 + 8,
1902 .vsync_end = 272 + 8 + 5,
1903 .vtotal = 272 + 8 + 5 + 3,
1907 static const struct panel_desc olimex_lcd_olinuxino_43ts = {
1908 .modes = &olimex_lcd_olinuxino_43ts_mode,
1914 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1918 * 800x480 CVT. The panel appears to be quite accepting, at least as far as
1919 * pixel clocks, but this is the timing that was being used in the Adafruit
1920 * installation instructions.
1922 static const struct drm_display_mode ontat_yx700wv03_mode = {
1933 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1938 * https://www.adafruit.com/images/product-files/2406/c3163.pdf
1940 static const struct panel_desc ontat_yx700wv03 = {
1941 .modes = &ontat_yx700wv03_mode,
1948 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1951 static const struct drm_display_mode ortustech_com43h4m85ulc_mode = {
1954 .hsync_start = 480 + 10,
1955 .hsync_end = 480 + 10 + 10,
1956 .htotal = 480 + 10 + 10 + 15,
1958 .vsync_start = 800 + 3,
1959 .vsync_end = 800 + 3 + 3,
1960 .vtotal = 800 + 3 + 3 + 3,
1964 static const struct panel_desc ortustech_com43h4m85ulc = {
1965 .modes = &ortustech_com43h4m85ulc_mode,
1972 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1973 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
1976 static const struct drm_display_mode qd43003c0_40_mode = {
1979 .hsync_start = 480 + 8,
1980 .hsync_end = 480 + 8 + 4,
1981 .htotal = 480 + 8 + 4 + 39,
1983 .vsync_start = 272 + 4,
1984 .vsync_end = 272 + 4 + 10,
1985 .vtotal = 272 + 4 + 10 + 2,
1989 static const struct panel_desc qd43003c0_40 = {
1990 .modes = &qd43003c0_40_mode,
1997 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2000 static const struct display_timing rocktech_rk070er9427_timing = {
2001 .pixelclock = { 26400000, 33300000, 46800000 },
2002 .hactive = { 800, 800, 800 },
2003 .hfront_porch = { 16, 210, 354 },
2004 .hback_porch = { 46, 46, 46 },
2005 .hsync_len = { 1, 1, 1 },
2006 .vactive = { 480, 480, 480 },
2007 .vfront_porch = { 7, 22, 147 },
2008 .vback_porch = { 23, 23, 23 },
2009 .vsync_len = { 1, 1, 1 },
2010 .flags = DISPLAY_FLAGS_DE_HIGH,
2013 static const struct panel_desc rocktech_rk070er9427 = {
2014 .timings = &rocktech_rk070er9427_timing,
2027 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2030 static const struct drm_display_mode samsung_lsn122dl01_c01_mode = {
2033 .hsync_start = 2560 + 48,
2034 .hsync_end = 2560 + 48 + 32,
2035 .htotal = 2560 + 48 + 32 + 80,
2037 .vsync_start = 1600 + 2,
2038 .vsync_end = 1600 + 2 + 5,
2039 .vtotal = 1600 + 2 + 5 + 57,
2043 static const struct panel_desc samsung_lsn122dl01_c01 = {
2044 .modes = &samsung_lsn122dl01_c01_mode,
2052 static const struct drm_display_mode samsung_ltn101nt05_mode = {
2055 .hsync_start = 1024 + 24,
2056 .hsync_end = 1024 + 24 + 136,
2057 .htotal = 1024 + 24 + 136 + 160,
2059 .vsync_start = 600 + 3,
2060 .vsync_end = 600 + 3 + 6,
2061 .vtotal = 600 + 3 + 6 + 61,
2065 static const struct panel_desc samsung_ltn101nt05 = {
2066 .modes = &samsung_ltn101nt05_mode,
2075 static const struct drm_display_mode samsung_ltn140at29_301_mode = {
2078 .hsync_start = 1366 + 64,
2079 .hsync_end = 1366 + 64 + 48,
2080 .htotal = 1366 + 64 + 48 + 128,
2082 .vsync_start = 768 + 2,
2083 .vsync_end = 768 + 2 + 5,
2084 .vtotal = 768 + 2 + 5 + 17,
2088 static const struct panel_desc samsung_ltn140at29_301 = {
2089 .modes = &samsung_ltn140at29_301_mode,
2098 static const struct drm_display_mode sharp_lq035q7db03_mode = {
2101 .hsync_start = 240 + 16,
2102 .hsync_end = 240 + 16 + 7,
2103 .htotal = 240 + 16 + 7 + 5,
2105 .vsync_start = 320 + 9,
2106 .vsync_end = 320 + 9 + 1,
2107 .vtotal = 320 + 9 + 1 + 7,
2111 static const struct panel_desc sharp_lq035q7db03 = {
2112 .modes = &sharp_lq035q7db03_mode,
2119 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2122 static const struct display_timing sharp_lq101k1ly04_timing = {
2123 .pixelclock = { 60000000, 65000000, 80000000 },
2124 .hactive = { 1280, 1280, 1280 },
2125 .hfront_porch = { 20, 20, 20 },
2126 .hback_porch = { 20, 20, 20 },
2127 .hsync_len = { 10, 10, 10 },
2128 .vactive = { 800, 800, 800 },
2129 .vfront_porch = { 4, 4, 4 },
2130 .vback_porch = { 4, 4, 4 },
2131 .vsync_len = { 4, 4, 4 },
2132 .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE,
2135 static const struct panel_desc sharp_lq101k1ly04 = {
2136 .timings = &sharp_lq101k1ly04_timing,
2143 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
2146 static const struct display_timing sharp_lq123p1jx31_timing = {
2147 .pixelclock = { 252750000, 252750000, 266604720 },
2148 .hactive = { 2400, 2400, 2400 },
2149 .hfront_porch = { 48, 48, 48 },
2150 .hback_porch = { 80, 80, 84 },
2151 .hsync_len = { 32, 32, 32 },
2152 .vactive = { 1600, 1600, 1600 },
2153 .vfront_porch = { 3, 3, 3 },
2154 .vback_porch = { 33, 33, 120 },
2155 .vsync_len = { 10, 10, 10 },
2156 .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW,
2159 static const struct panel_desc sharp_lq123p1jx31 = {
2160 .timings = &sharp_lq123p1jx31_timing,
2174 static const struct drm_display_mode sharp_lq150x1lg11_mode = {
2177 .hsync_start = 1024 + 168,
2178 .hsync_end = 1024 + 168 + 64,
2179 .htotal = 1024 + 168 + 64 + 88,
2181 .vsync_start = 768 + 37,
2182 .vsync_end = 768 + 37 + 2,
2183 .vtotal = 768 + 37 + 2 + 8,
2187 static const struct panel_desc sharp_lq150x1lg11 = {
2188 .modes = &sharp_lq150x1lg11_mode,
2195 .bus_format = MEDIA_BUS_FMT_RGB565_1X16,
2198 static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = {
2201 .hsync_start = 800 + 1,
2202 .hsync_end = 800 + 1 + 64,
2203 .htotal = 800 + 1 + 64 + 64,
2205 .vsync_start = 480 + 1,
2206 .vsync_end = 480 + 1 + 23,
2207 .vtotal = 480 + 1 + 23 + 22,
2211 static const struct panel_desc shelly_sca07010_bfn_lnn = {
2212 .modes = &shelly_sca07010_bfn_lnn_mode,
2218 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2221 static const struct drm_display_mode starry_kr122ea0sra_mode = {
2224 .hsync_start = 1920 + 16,
2225 .hsync_end = 1920 + 16 + 16,
2226 .htotal = 1920 + 16 + 16 + 32,
2228 .vsync_start = 1200 + 15,
2229 .vsync_end = 1200 + 15 + 2,
2230 .vtotal = 1200 + 15 + 2 + 18,
2232 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2235 static const struct panel_desc starry_kr122ea0sra = {
2236 .modes = &starry_kr122ea0sra_mode,
2243 .prepare = 10 + 200,
2245 .unprepare = 10 + 500,
2249 static const struct display_timing tianma_tm070jdhg30_timing = {
2250 .pixelclock = { 62600000, 68200000, 78100000 },
2251 .hactive = { 1280, 1280, 1280 },
2252 .hfront_porch = { 15, 64, 159 },
2253 .hback_porch = { 5, 5, 5 },
2254 .hsync_len = { 1, 1, 256 },
2255 .vactive = { 800, 800, 800 },
2256 .vfront_porch = { 3, 40, 99 },
2257 .vback_porch = { 2, 2, 2 },
2258 .vsync_len = { 1, 1, 128 },
2259 .flags = DISPLAY_FLAGS_DE_HIGH,
2262 static const struct panel_desc tianma_tm070jdhg30 = {
2263 .timings = &tianma_tm070jdhg30_timing,
2270 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2273 static const struct display_timing tianma_tm070rvhg71_timing = {
2274 .pixelclock = { 27700000, 29200000, 39600000 },
2275 .hactive = { 800, 800, 800 },
2276 .hfront_porch = { 12, 40, 212 },
2277 .hback_porch = { 88, 88, 88 },
2278 .hsync_len = { 1, 1, 40 },
2279 .vactive = { 480, 480, 480 },
2280 .vfront_porch = { 1, 13, 88 },
2281 .vback_porch = { 32, 32, 32 },
2282 .vsync_len = { 1, 1, 3 },
2283 .flags = DISPLAY_FLAGS_DE_HIGH,
2286 static const struct panel_desc tianma_tm070rvhg71 = {
2287 .timings = &tianma_tm070rvhg71_timing,
2294 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2297 static const struct drm_display_mode toshiba_lt089ac29000_mode = {
2300 .hsync_start = 1280 + 192,
2301 .hsync_end = 1280 + 192 + 128,
2302 .htotal = 1280 + 192 + 128 + 64,
2304 .vsync_start = 768 + 20,
2305 .vsync_end = 768 + 20 + 7,
2306 .vtotal = 768 + 20 + 7 + 3,
2310 static const struct panel_desc toshiba_lt089ac29000 = {
2311 .modes = &toshiba_lt089ac29000_mode,
2317 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2318 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
2321 static const struct drm_display_mode tpk_f07a_0102_mode = {
2324 .hsync_start = 800 + 40,
2325 .hsync_end = 800 + 40 + 128,
2326 .htotal = 800 + 40 + 128 + 88,
2328 .vsync_start = 480 + 10,
2329 .vsync_end = 480 + 10 + 2,
2330 .vtotal = 480 + 10 + 2 + 33,
2334 static const struct panel_desc tpk_f07a_0102 = {
2335 .modes = &tpk_f07a_0102_mode,
2341 .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE,
2344 static const struct drm_display_mode tpk_f10a_0102_mode = {
2347 .hsync_start = 1024 + 176,
2348 .hsync_end = 1024 + 176 + 5,
2349 .htotal = 1024 + 176 + 5 + 88,
2351 .vsync_start = 600 + 20,
2352 .vsync_end = 600 + 20 + 5,
2353 .vtotal = 600 + 20 + 5 + 25,
2357 static const struct panel_desc tpk_f10a_0102 = {
2358 .modes = &tpk_f10a_0102_mode,
2366 static const struct display_timing urt_umsh_8596md_timing = {
2367 .pixelclock = { 33260000, 33260000, 33260000 },
2368 .hactive = { 800, 800, 800 },
2369 .hfront_porch = { 41, 41, 41 },
2370 .hback_porch = { 216 - 128, 216 - 128, 216 - 128 },
2371 .hsync_len = { 71, 128, 128 },
2372 .vactive = { 480, 480, 480 },
2373 .vfront_porch = { 10, 10, 10 },
2374 .vback_porch = { 35 - 2, 35 - 2, 35 - 2 },
2375 .vsync_len = { 2, 2, 2 },
2376 .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE |
2377 DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
2380 static const struct panel_desc urt_umsh_8596md_lvds = {
2381 .timings = &urt_umsh_8596md_timing,
2388 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
2391 static const struct panel_desc urt_umsh_8596md_parallel = {
2392 .timings = &urt_umsh_8596md_timing,
2399 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2402 static const struct drm_display_mode winstar_wf35ltiacd_mode = {
2405 .hsync_start = 320 + 20,
2406 .hsync_end = 320 + 20 + 30,
2407 .htotal = 320 + 20 + 30 + 38,
2409 .vsync_start = 240 + 4,
2410 .vsync_end = 240 + 4 + 3,
2411 .vtotal = 240 + 4 + 3 + 15,
2413 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2416 static const struct panel_desc winstar_wf35ltiacd = {
2417 .modes = &winstar_wf35ltiacd_mode,
2424 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2427 static const struct drm_display_mode arm_rtsm_mode[] = {
2431 .hsync_start = 1024 + 24,
2432 .hsync_end = 1024 + 24 + 136,
2433 .htotal = 1024 + 24 + 136 + 160,
2435 .vsync_start = 768 + 3,
2436 .vsync_end = 768 + 3 + 6,
2437 .vtotal = 768 + 3 + 6 + 29,
2439 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2443 static const struct panel_desc arm_rtsm = {
2444 .modes = arm_rtsm_mode,
2451 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2454 static const struct of_device_id platform_of_match[] = {
2456 .compatible = "ampire,am-480272h3tmqw-t01h",
2457 .data = &ire_am_480272h3tmqw_t01h,
2459 .compatible = "ampire,am800480r3tmqwa1h",
2460 .data = &ire_am800480r3tmqwa1h,
2462 .compatible = "arm,rtsm-display",
2465 .compatible = "auo,b101aw03",
2466 .data = &auo_b101aw03,
2468 .compatible = "auo,b101ean01",
2469 .data = &auo_b101ean01,
2471 .compatible = "auo,b101xtn01",
2472 .data = &auo_b101xtn01,
2474 .compatible = "auo,b116xw03",
2475 .data = &auo_b116xw03,
2477 .compatible = "auo,b133htn01",
2478 .data = &auo_b133htn01,
2480 .compatible = "auo,b133xtn01",
2481 .data = &auo_b133xtn01,
2483 .compatible = "auo,g070vvn01",
2484 .data = &auo_g070vvn01,
2486 .compatible = "auo,g104sn02",
2487 .data = &auo_g104sn02,
2489 .compatible = "auo,g133han01",
2490 .data = &auo_g133han01,
2492 .compatible = "auo,g185han01",
2493 .data = &auo_g185han01,
2495 .compatible = "auo,p320hvn03",
2496 .data = &auo_p320hvn03,
2498 .compatible = "auo,t215hvn01",
2499 .data = &auo_t215hvn01,
2501 .compatible = "avic,tm070ddh03",
2502 .data = &avic_tm070ddh03,
2504 .compatible = "bananapi,s070wv20-ct16",
2505 .data = &bananapi_s070wv20_ct16,
2507 .compatible = "boe,hv070wsa-100",
2508 .data = &boe_hv070wsa
2510 .compatible = "boe,nv101wxmn51",
2511 .data = &boe_nv101wxmn51,
2513 .compatible = "cdtech,s043wq26h-ct7",
2514 .data = &cdtech_s043wq26h_ct7,
2516 .compatible = "cdtech,s070wv95-ct16",
2517 .data = &cdtech_s070wv95_ct16,
2519 .compatible = "chunghwa,claa070wp03xg",
2520 .data = &chunghwa_claa070wp03xg,
2522 .compatible = "chunghwa,claa101wa01a",
2523 .data = &chunghwa_claa101wa01a
2525 .compatible = "chunghwa,claa101wb01",
2526 .data = &chunghwa_claa101wb01
2528 .compatible = "dataimage,scf0700c48ggu18",
2529 .data = &dataimage_scf0700c48ggu18,
2531 .compatible = "dlc,dlc0700yzg-1",
2532 .data = &dlc_dlc0700yzg_1,
2534 .compatible = "dlc,dlc1010gig",
2535 .data = &dlc_dlc1010gig,
2537 .compatible = "edt,et057090dhu",
2538 .data = &edt_et057090dhu,
2540 .compatible = "edt,et070080dh6",
2541 .data = &edt_etm0700g0dh6,
2543 .compatible = "edt,etm0700g0dh6",
2544 .data = &edt_etm0700g0dh6,
2546 .compatible = "edt,etm0700g0bdh6",
2547 .data = &edt_etm0700g0bdh6,
2549 .compatible = "edt,etm0700g0edh6",
2550 .data = &edt_etm0700g0bdh6,
2552 .compatible = "foxlink,fl500wvr00-a0t",
2553 .data = &foxlink_fl500wvr00_a0t,
2555 .compatible = "giantplus,gpg482739qs5",
2556 .data = &giantplus_gpg482739qs5
2558 .compatible = "hannstar,hsd070pww1",
2559 .data = &hannstar_hsd070pww1,
2561 .compatible = "hannstar,hsd100pxn1",
2562 .data = &hannstar_hsd100pxn1,
2564 .compatible = "hit,tx23d38vm0caa",
2565 .data = &hitachi_tx23d38vm0caa
2567 .compatible = "innolux,at043tn24",
2568 .data = &innolux_at043tn24,
2570 .compatible = "innolux,at070tn92",
2571 .data = &innolux_at070tn92,
2573 .compatible = "innolux,g070y2-l01",
2574 .data = &innolux_g070y2_l01,
2576 .compatible = "innolux,g101ice-l01",
2577 .data = &innolux_g101ice_l01
2579 .compatible = "innolux,g121i1-l01",
2580 .data = &innolux_g121i1_l01
2582 .compatible = "innolux,g121x1-l03",
2583 .data = &innolux_g121x1_l03,
2585 .compatible = "innolux,n116bge",
2586 .data = &innolux_n116bge,
2588 .compatible = "innolux,n156bge-l21",
2589 .data = &innolux_n156bge_l21,
2591 .compatible = "innolux,tv123wam",
2592 .data = &innolux_tv123wam,
2594 .compatible = "innolux,zj070na-01p",
2595 .data = &innolux_zj070na_01p,
2597 .compatible = "koe,tx31d200vm0baa",
2598 .data = &koe_tx31d200vm0baa,
2600 .compatible = "kyo,tcg121xglp",
2601 .data = &kyo_tcg121xglp,
2603 .compatible = "lg,lb070wv8",
2604 .data = &lg_lb070wv8,
2606 .compatible = "lg,lp079qx1-sp0v",
2607 .data = &lg_lp079qx1_sp0v,
2609 .compatible = "lg,lp097qx1-spa1",
2610 .data = &lg_lp097qx1_spa1,
2612 .compatible = "lg,lp120up1",
2613 .data = &lg_lp120up1,
2615 .compatible = "lg,lp129qe",
2616 .data = &lg_lp129qe,
2618 .compatible = "mitsubishi,aa070mc01-ca1",
2619 .data = &mitsubishi_aa070mc01,
2621 .compatible = "nec,nl12880bc20-05",
2622 .data = &nec_nl12880bc20_05,
2624 .compatible = "nec,nl4827hc19-05b",
2625 .data = &nec_nl4827hc19_05b,
2627 .compatible = "netron-dy,e231732",
2628 .data = &netron_dy_e231732,
2630 .compatible = "newhaven,nhd-4.3-480272ef-atxl",
2631 .data = &newhaven_nhd_43_480272ef_atxl,
2633 .compatible = "nlt,nl192108ac18-02d",
2634 .data = &nlt_nl192108ac18_02d,
2636 .compatible = "nvd,9128",
2639 .compatible = "okaya,rs800480t-7x0gp",
2640 .data = &okaya_rs800480t_7x0gp,
2642 .compatible = "olimex,lcd-olinuxino-43-ts",
2643 .data = &olimex_lcd_olinuxino_43ts,
2645 .compatible = "ontat,yx700wv03",
2646 .data = &ontat_yx700wv03,
2648 .compatible = "ortustech,com43h4m85ulc",
2649 .data = &ortustech_com43h4m85ulc,
2651 .compatible = "qiaodian,qd43003c0-40",
2652 .data = &qd43003c0_40,
2654 .compatible = "rocktech,rk070er9427",
2655 .data = &rocktech_rk070er9427,
2657 .compatible = "samsung,lsn122dl01-c01",
2658 .data = &samsung_lsn122dl01_c01,
2660 .compatible = "samsung,ltn101nt05",
2661 .data = &samsung_ltn101nt05,
2663 .compatible = "samsung,ltn140at29-301",
2664 .data = &samsung_ltn140at29_301,
2666 .compatible = "sharp,lq035q7db03",
2667 .data = &sharp_lq035q7db03,
2669 .compatible = "sharp,lq101k1ly04",
2670 .data = &sharp_lq101k1ly04,
2672 .compatible = "sharp,lq123p1jx31",
2673 .data = &sharp_lq123p1jx31,
2675 .compatible = "sharp,lq150x1lg11",
2676 .data = &sharp_lq150x1lg11,
2678 .compatible = "shelly,sca07010-bfn-lnn",
2679 .data = &shelly_sca07010_bfn_lnn,
2681 .compatible = "starry,kr122ea0sra",
2682 .data = &starry_kr122ea0sra,
2684 .compatible = "tianma,tm070jdhg30",
2685 .data = &tianma_tm070jdhg30,
2687 .compatible = "tianma,tm070rvhg71",
2688 .data = &tianma_tm070rvhg71,
2690 .compatible = "toshiba,lt089ac29000",
2691 .data = &toshiba_lt089ac29000,
2693 .compatible = "tpk,f07a-0102",
2694 .data = &tpk_f07a_0102,
2696 .compatible = "tpk,f10a-0102",
2697 .data = &tpk_f10a_0102,
2699 .compatible = "urt,umsh-8596md-t",
2700 .data = &urt_umsh_8596md_parallel,
2702 .compatible = "urt,umsh-8596md-1t",
2703 .data = &urt_umsh_8596md_parallel,
2705 .compatible = "urt,umsh-8596md-7t",
2706 .data = &urt_umsh_8596md_parallel,
2708 .compatible = "urt,umsh-8596md-11t",
2709 .data = &urt_umsh_8596md_lvds,
2711 .compatible = "urt,umsh-8596md-19t",
2712 .data = &urt_umsh_8596md_lvds,
2714 .compatible = "urt,umsh-8596md-20t",
2715 .data = &urt_umsh_8596md_parallel,
2717 .compatible = "winstar,wf35ltiacd",
2718 .data = &winstar_wf35ltiacd,
2723 MODULE_DEVICE_TABLE(of, platform_of_match);
2725 static int panel_simple_platform_probe(struct platform_device *pdev)
2727 const struct of_device_id *id;
2729 id = of_match_node(platform_of_match, pdev->dev.of_node);
2733 return panel_simple_probe(&pdev->dev, id->data);
2736 static int panel_simple_platform_remove(struct platform_device *pdev)
2738 return panel_simple_remove(&pdev->dev);
2741 static void panel_simple_platform_shutdown(struct platform_device *pdev)
2743 panel_simple_shutdown(&pdev->dev);
2746 static struct platform_driver panel_simple_platform_driver = {
2748 .name = "panel-simple",
2749 .of_match_table = platform_of_match,
2751 .probe = panel_simple_platform_probe,
2752 .remove = panel_simple_platform_remove,
2753 .shutdown = panel_simple_platform_shutdown,
2756 struct panel_desc_dsi {
2757 struct panel_desc desc;
2759 unsigned long flags;
2760 enum mipi_dsi_pixel_format format;
2764 static const struct drm_display_mode auo_b080uan01_mode = {
2767 .hsync_start = 1200 + 62,
2768 .hsync_end = 1200 + 62 + 4,
2769 .htotal = 1200 + 62 + 4 + 62,
2771 .vsync_start = 1920 + 9,
2772 .vsync_end = 1920 + 9 + 2,
2773 .vtotal = 1920 + 9 + 2 + 8,
2777 static const struct panel_desc_dsi auo_b080uan01 = {
2779 .modes = &auo_b080uan01_mode,
2787 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
2788 .format = MIPI_DSI_FMT_RGB888,
2792 static const struct drm_display_mode boe_tv080wum_nl0_mode = {
2795 .hsync_start = 1200 + 120,
2796 .hsync_end = 1200 + 120 + 20,
2797 .htotal = 1200 + 120 + 20 + 21,
2799 .vsync_start = 1920 + 21,
2800 .vsync_end = 1920 + 21 + 3,
2801 .vtotal = 1920 + 21 + 3 + 18,
2803 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2806 static const struct panel_desc_dsi boe_tv080wum_nl0 = {
2808 .modes = &boe_tv080wum_nl0_mode,
2815 .flags = MIPI_DSI_MODE_VIDEO |
2816 MIPI_DSI_MODE_VIDEO_BURST |
2817 MIPI_DSI_MODE_VIDEO_SYNC_PULSE,
2818 .format = MIPI_DSI_FMT_RGB888,
2822 static const struct drm_display_mode lg_ld070wx3_sl01_mode = {
2825 .hsync_start = 800 + 32,
2826 .hsync_end = 800 + 32 + 1,
2827 .htotal = 800 + 32 + 1 + 57,
2829 .vsync_start = 1280 + 28,
2830 .vsync_end = 1280 + 28 + 1,
2831 .vtotal = 1280 + 28 + 1 + 14,
2835 static const struct panel_desc_dsi lg_ld070wx3_sl01 = {
2837 .modes = &lg_ld070wx3_sl01_mode,
2845 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
2846 .format = MIPI_DSI_FMT_RGB888,
2850 static const struct drm_display_mode lg_lh500wx1_sd03_mode = {
2853 .hsync_start = 720 + 12,
2854 .hsync_end = 720 + 12 + 4,
2855 .htotal = 720 + 12 + 4 + 112,
2857 .vsync_start = 1280 + 8,
2858 .vsync_end = 1280 + 8 + 4,
2859 .vtotal = 1280 + 8 + 4 + 12,
2863 static const struct panel_desc_dsi lg_lh500wx1_sd03 = {
2865 .modes = &lg_lh500wx1_sd03_mode,
2873 .flags = MIPI_DSI_MODE_VIDEO,
2874 .format = MIPI_DSI_FMT_RGB888,
2878 static const struct drm_display_mode panasonic_vvx10f004b00_mode = {
2881 .hsync_start = 1920 + 154,
2882 .hsync_end = 1920 + 154 + 16,
2883 .htotal = 1920 + 154 + 16 + 32,
2885 .vsync_start = 1200 + 17,
2886 .vsync_end = 1200 + 17 + 2,
2887 .vtotal = 1200 + 17 + 2 + 16,
2891 static const struct panel_desc_dsi panasonic_vvx10f004b00 = {
2893 .modes = &panasonic_vvx10f004b00_mode,
2901 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
2902 MIPI_DSI_CLOCK_NON_CONTINUOUS,
2903 .format = MIPI_DSI_FMT_RGB888,
2907 static const struct of_device_id dsi_of_match[] = {
2909 .compatible = "auo,b080uan01",
2910 .data = &auo_b080uan01
2912 .compatible = "boe,tv080wum-nl0",
2913 .data = &boe_tv080wum_nl0
2915 .compatible = "lg,ld070wx3-sl01",
2916 .data = &lg_ld070wx3_sl01
2918 .compatible = "lg,lh500wx1-sd03",
2919 .data = &lg_lh500wx1_sd03
2921 .compatible = "panasonic,vvx10f004b00",
2922 .data = &panasonic_vvx10f004b00
2927 MODULE_DEVICE_TABLE(of, dsi_of_match);
2929 static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
2931 const struct panel_desc_dsi *desc;
2932 const struct of_device_id *id;
2935 id = of_match_node(dsi_of_match, dsi->dev.of_node);
2941 err = panel_simple_probe(&dsi->dev, &desc->desc);
2945 dsi->mode_flags = desc->flags;
2946 dsi->format = desc->format;
2947 dsi->lanes = desc->lanes;
2949 return mipi_dsi_attach(dsi);
2952 static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi)
2956 err = mipi_dsi_detach(dsi);
2958 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
2960 return panel_simple_remove(&dsi->dev);
2963 static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi)
2965 panel_simple_shutdown(&dsi->dev);
2968 static struct mipi_dsi_driver panel_simple_dsi_driver = {
2970 .name = "panel-simple-dsi",
2971 .of_match_table = dsi_of_match,
2973 .probe = panel_simple_dsi_probe,
2974 .remove = panel_simple_dsi_remove,
2975 .shutdown = panel_simple_dsi_shutdown,
2978 static int __init panel_simple_init(void)
2982 err = platform_driver_register(&panel_simple_platform_driver);
2986 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) {
2987 err = mipi_dsi_driver_register(&panel_simple_dsi_driver);
2994 module_init(panel_simple_init);
2996 static void __exit panel_simple_exit(void)
2998 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI))
2999 mipi_dsi_driver_unregister(&panel_simple_dsi_driver);
3001 platform_driver_unregister(&panel_simple_platform_driver);
3003 module_exit(panel_simple_exit);
3006 MODULE_DESCRIPTION("DRM Driver for Simple Panels");
3007 MODULE_LICENSE("GPL and additional rights");