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 boe_hv070wsa_mode = {
778 .hsync_start = 1024 + 90,
779 .hsync_end = 1024 + 90 + 90,
780 .htotal = 1024 + 90 + 90 + 90,
782 .vsync_start = 600 + 3,
783 .vsync_end = 600 + 3 + 4,
784 .vtotal = 600 + 3 + 4 + 3,
788 static const struct panel_desc boe_hv070wsa = {
789 .modes = &boe_hv070wsa_mode,
797 static const struct drm_display_mode boe_nv101wxmn51_modes[] = {
801 .hsync_start = 1280 + 48,
802 .hsync_end = 1280 + 48 + 32,
803 .htotal = 1280 + 48 + 32 + 80,
805 .vsync_start = 800 + 3,
806 .vsync_end = 800 + 3 + 5,
807 .vtotal = 800 + 3 + 5 + 24,
813 .hsync_start = 1280 + 48,
814 .hsync_end = 1280 + 48 + 32,
815 .htotal = 1280 + 48 + 32 + 80,
817 .vsync_start = 800 + 3,
818 .vsync_end = 800 + 3 + 5,
819 .vtotal = 800 + 3 + 5 + 24,
824 static const struct panel_desc boe_nv101wxmn51 = {
825 .modes = boe_nv101wxmn51_modes,
826 .num_modes = ARRAY_SIZE(boe_nv101wxmn51_modes),
839 static const struct drm_display_mode chunghwa_claa070wp03xg_mode = {
842 .hsync_start = 800 + 49,
843 .hsync_end = 800 + 49 + 33,
844 .htotal = 800 + 49 + 33 + 17,
846 .vsync_start = 1280 + 1,
847 .vsync_end = 1280 + 1 + 7,
848 .vtotal = 1280 + 1 + 7 + 15,
850 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
853 static const struct panel_desc chunghwa_claa070wp03xg = {
854 .modes = &chunghwa_claa070wp03xg_mode,
863 static const struct drm_display_mode chunghwa_claa101wa01a_mode = {
866 .hsync_start = 1366 + 58,
867 .hsync_end = 1366 + 58 + 58,
868 .htotal = 1366 + 58 + 58 + 58,
870 .vsync_start = 768 + 4,
871 .vsync_end = 768 + 4 + 4,
872 .vtotal = 768 + 4 + 4 + 4,
876 static const struct panel_desc chunghwa_claa101wa01a = {
877 .modes = &chunghwa_claa101wa01a_mode,
886 static const struct drm_display_mode chunghwa_claa101wb01_mode = {
889 .hsync_start = 1366 + 48,
890 .hsync_end = 1366 + 48 + 32,
891 .htotal = 1366 + 48 + 32 + 20,
893 .vsync_start = 768 + 16,
894 .vsync_end = 768 + 16 + 8,
895 .vtotal = 768 + 16 + 8 + 16,
899 static const struct panel_desc chunghwa_claa101wb01 = {
900 .modes = &chunghwa_claa101wb01_mode,
909 static const struct drm_display_mode dataimage_scf0700c48ggu18_mode = {
912 .hsync_start = 800 + 40,
913 .hsync_end = 800 + 40 + 128,
914 .htotal = 800 + 40 + 128 + 88,
916 .vsync_start = 480 + 10,
917 .vsync_end = 480 + 10 + 2,
918 .vtotal = 480 + 10 + 2 + 33,
920 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
923 static const struct panel_desc dataimage_scf0700c48ggu18 = {
924 .modes = &dataimage_scf0700c48ggu18_mode,
931 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
932 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
935 static const struct display_timing dlc_dlc0700yzg_1_timing = {
936 .pixelclock = { 45000000, 51200000, 57000000 },
937 .hactive = { 1024, 1024, 1024 },
938 .hfront_porch = { 100, 106, 113 },
939 .hback_porch = { 100, 106, 113 },
940 .hsync_len = { 100, 108, 114 },
941 .vactive = { 600, 600, 600 },
942 .vfront_porch = { 8, 11, 15 },
943 .vback_porch = { 8, 11, 15 },
944 .vsync_len = { 9, 13, 15 },
945 .flags = DISPLAY_FLAGS_DE_HIGH,
948 static const struct panel_desc dlc_dlc0700yzg_1 = {
949 .timings = &dlc_dlc0700yzg_1_timing,
961 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
964 static const struct drm_display_mode edt_et057090dhu_mode = {
967 .hsync_start = 640 + 16,
968 .hsync_end = 640 + 16 + 30,
969 .htotal = 640 + 16 + 30 + 114,
971 .vsync_start = 480 + 10,
972 .vsync_end = 480 + 10 + 3,
973 .vtotal = 480 + 10 + 3 + 32,
975 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
978 static const struct panel_desc edt_et057090dhu = {
979 .modes = &edt_et057090dhu_mode,
986 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
987 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
990 static const struct drm_display_mode edt_etm0700g0dh6_mode = {
993 .hsync_start = 800 + 40,
994 .hsync_end = 800 + 40 + 128,
995 .htotal = 800 + 40 + 128 + 88,
997 .vsync_start = 480 + 10,
998 .vsync_end = 480 + 10 + 2,
999 .vtotal = 480 + 10 + 2 + 33,
1001 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1004 static const struct panel_desc edt_etm0700g0dh6 = {
1005 .modes = &edt_etm0700g0dh6_mode,
1012 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1013 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
1016 static const struct panel_desc edt_etm0700g0bdh6 = {
1017 .modes = &edt_etm0700g0dh6_mode,
1024 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1025 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
1028 static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = {
1031 .hsync_start = 800 + 168,
1032 .hsync_end = 800 + 168 + 64,
1033 .htotal = 800 + 168 + 64 + 88,
1035 .vsync_start = 480 + 37,
1036 .vsync_end = 480 + 37 + 2,
1037 .vtotal = 480 + 37 + 2 + 8,
1041 static const struct panel_desc foxlink_fl500wvr00_a0t = {
1042 .modes = &foxlink_fl500wvr00_a0t_mode,
1049 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1052 static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
1055 .hsync_start = 480 + 5,
1056 .hsync_end = 480 + 5 + 1,
1057 .htotal = 480 + 5 + 1 + 40,
1059 .vsync_start = 272 + 8,
1060 .vsync_end = 272 + 8 + 1,
1061 .vtotal = 272 + 8 + 1 + 8,
1065 static const struct panel_desc giantplus_gpg482739qs5 = {
1066 .modes = &giantplus_gpg482739qs5_mode,
1073 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1076 static const struct display_timing hannstar_hsd070pww1_timing = {
1077 .pixelclock = { 64300000, 71100000, 82000000 },
1078 .hactive = { 1280, 1280, 1280 },
1079 .hfront_porch = { 1, 1, 10 },
1080 .hback_porch = { 1, 1, 10 },
1082 * According to the data sheet, the minimum horizontal blanking interval
1083 * is 54 clocks (1 + 52 + 1), but tests with a Nitrogen6X have shown the
1084 * minimum working horizontal blanking interval to be 60 clocks.
1086 .hsync_len = { 58, 158, 661 },
1087 .vactive = { 800, 800, 800 },
1088 .vfront_porch = { 1, 1, 10 },
1089 .vback_porch = { 1, 1, 10 },
1090 .vsync_len = { 1, 21, 203 },
1091 .flags = DISPLAY_FLAGS_DE_HIGH,
1094 static const struct panel_desc hannstar_hsd070pww1 = {
1095 .timings = &hannstar_hsd070pww1_timing,
1102 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1105 static const struct display_timing hannstar_hsd100pxn1_timing = {
1106 .pixelclock = { 55000000, 65000000, 75000000 },
1107 .hactive = { 1024, 1024, 1024 },
1108 .hfront_porch = { 40, 40, 40 },
1109 .hback_porch = { 220, 220, 220 },
1110 .hsync_len = { 20, 60, 100 },
1111 .vactive = { 768, 768, 768 },
1112 .vfront_porch = { 7, 7, 7 },
1113 .vback_porch = { 21, 21, 21 },
1114 .vsync_len = { 10, 10, 10 },
1115 .flags = DISPLAY_FLAGS_DE_HIGH,
1118 static const struct panel_desc hannstar_hsd100pxn1 = {
1119 .timings = &hannstar_hsd100pxn1_timing,
1126 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1129 static const struct drm_display_mode hitachi_tx23d38vm0caa_mode = {
1132 .hsync_start = 800 + 85,
1133 .hsync_end = 800 + 85 + 86,
1134 .htotal = 800 + 85 + 86 + 85,
1136 .vsync_start = 480 + 16,
1137 .vsync_end = 480 + 16 + 13,
1138 .vtotal = 480 + 16 + 13 + 16,
1142 static const struct panel_desc hitachi_tx23d38vm0caa = {
1143 .modes = &hitachi_tx23d38vm0caa_mode,
1156 static const struct drm_display_mode innolux_at043tn24_mode = {
1159 .hsync_start = 480 + 2,
1160 .hsync_end = 480 + 2 + 41,
1161 .htotal = 480 + 2 + 41 + 2,
1163 .vsync_start = 272 + 2,
1164 .vsync_end = 272 + 2 + 10,
1165 .vtotal = 272 + 2 + 10 + 2,
1167 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1170 static const struct panel_desc innolux_at043tn24 = {
1171 .modes = &innolux_at043tn24_mode,
1178 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1179 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
1182 static const struct drm_display_mode innolux_at070tn92_mode = {
1185 .hsync_start = 800 + 210,
1186 .hsync_end = 800 + 210 + 20,
1187 .htotal = 800 + 210 + 20 + 46,
1189 .vsync_start = 480 + 22,
1190 .vsync_end = 480 + 22 + 10,
1191 .vtotal = 480 + 22 + 23 + 10,
1195 static const struct panel_desc innolux_at070tn92 = {
1196 .modes = &innolux_at070tn92_mode,
1202 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1205 static const struct display_timing innolux_g070y2_l01_timing = {
1206 .pixelclock = { 28000000, 29500000, 32000000 },
1207 .hactive = { 800, 800, 800 },
1208 .hfront_porch = { 61, 91, 141 },
1209 .hback_porch = { 60, 90, 140 },
1210 .hsync_len = { 12, 12, 12 },
1211 .vactive = { 480, 480, 480 },
1212 .vfront_porch = { 4, 9, 30 },
1213 .vback_porch = { 4, 8, 28 },
1214 .vsync_len = { 2, 2, 2 },
1215 .flags = DISPLAY_FLAGS_DE_HIGH,
1218 static const struct panel_desc innolux_g070y2_l01 = {
1219 .timings = &innolux_g070y2_l01_timing,
1232 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1235 static const struct display_timing innolux_g101ice_l01_timing = {
1236 .pixelclock = { 60400000, 71100000, 74700000 },
1237 .hactive = { 1280, 1280, 1280 },
1238 .hfront_porch = { 41, 80, 100 },
1239 .hback_porch = { 40, 79, 99 },
1240 .hsync_len = { 1, 1, 1 },
1241 .vactive = { 800, 800, 800 },
1242 .vfront_porch = { 5, 11, 14 },
1243 .vback_porch = { 4, 11, 14 },
1244 .vsync_len = { 1, 1, 1 },
1245 .flags = DISPLAY_FLAGS_DE_HIGH,
1248 static const struct panel_desc innolux_g101ice_l01 = {
1249 .timings = &innolux_g101ice_l01_timing,
1260 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1263 static const struct display_timing innolux_g121i1_l01_timing = {
1264 .pixelclock = { 67450000, 71000000, 74550000 },
1265 .hactive = { 1280, 1280, 1280 },
1266 .hfront_porch = { 40, 80, 160 },
1267 .hback_porch = { 39, 79, 159 },
1268 .hsync_len = { 1, 1, 1 },
1269 .vactive = { 800, 800, 800 },
1270 .vfront_porch = { 5, 11, 100 },
1271 .vback_porch = { 4, 11, 99 },
1272 .vsync_len = { 1, 1, 1 },
1275 static const struct panel_desc innolux_g121i1_l01 = {
1276 .timings = &innolux_g121i1_l01_timing,
1287 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1290 static const struct drm_display_mode innolux_g121x1_l03_mode = {
1293 .hsync_start = 1024 + 0,
1294 .hsync_end = 1024 + 1,
1295 .htotal = 1024 + 0 + 1 + 320,
1297 .vsync_start = 768 + 38,
1298 .vsync_end = 768 + 38 + 1,
1299 .vtotal = 768 + 38 + 1 + 0,
1301 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1304 static const struct panel_desc innolux_g121x1_l03 = {
1305 .modes = &innolux_g121x1_l03_mode,
1319 static const struct drm_display_mode innolux_n116bge_mode = {
1322 .hsync_start = 1366 + 136,
1323 .hsync_end = 1366 + 136 + 30,
1324 .htotal = 1366 + 136 + 30 + 60,
1326 .vsync_start = 768 + 8,
1327 .vsync_end = 768 + 8 + 12,
1328 .vtotal = 768 + 8 + 12 + 12,
1330 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1333 static const struct panel_desc innolux_n116bge = {
1334 .modes = &innolux_n116bge_mode,
1343 static const struct drm_display_mode innolux_n156bge_l21_mode = {
1346 .hsync_start = 1366 + 16,
1347 .hsync_end = 1366 + 16 + 34,
1348 .htotal = 1366 + 16 + 34 + 50,
1350 .vsync_start = 768 + 2,
1351 .vsync_end = 768 + 2 + 6,
1352 .vtotal = 768 + 2 + 6 + 12,
1356 static const struct panel_desc innolux_n156bge_l21 = {
1357 .modes = &innolux_n156bge_l21_mode,
1366 static const struct drm_display_mode innolux_tv123wam_mode = {
1369 .hsync_start = 2160 + 48,
1370 .hsync_end = 2160 + 48 + 32,
1371 .htotal = 2160 + 48 + 32 + 80,
1373 .vsync_start = 1440 + 3,
1374 .vsync_end = 1440 + 3 + 10,
1375 .vtotal = 1440 + 3 + 10 + 27,
1377 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
1380 static const struct panel_desc innolux_tv123wam = {
1381 .modes = &innolux_tv123wam_mode,
1393 static const struct drm_display_mode innolux_zj070na_01p_mode = {
1396 .hsync_start = 1024 + 128,
1397 .hsync_end = 1024 + 128 + 64,
1398 .htotal = 1024 + 128 + 64 + 128,
1400 .vsync_start = 600 + 16,
1401 .vsync_end = 600 + 16 + 4,
1402 .vtotal = 600 + 16 + 4 + 16,
1406 static const struct panel_desc innolux_zj070na_01p = {
1407 .modes = &innolux_zj070na_01p_mode,
1416 static const struct display_timing koe_tx31d200vm0baa_timing = {
1417 .pixelclock = { 39600000, 43200000, 48000000 },
1418 .hactive = { 1280, 1280, 1280 },
1419 .hfront_porch = { 16, 36, 56 },
1420 .hback_porch = { 16, 36, 56 },
1421 .hsync_len = { 8, 8, 8 },
1422 .vactive = { 480, 480, 480 },
1423 .vfront_porch = { 6, 21, 33 },
1424 .vback_porch = { 6, 21, 33 },
1425 .vsync_len = { 8, 8, 8 },
1426 .flags = DISPLAY_FLAGS_DE_HIGH,
1429 static const struct panel_desc koe_tx31d200vm0baa = {
1430 .timings = &koe_tx31d200vm0baa_timing,
1437 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1440 static const struct display_timing kyo_tcg121xglp_timing = {
1441 .pixelclock = { 52000000, 65000000, 71000000 },
1442 .hactive = { 1024, 1024, 1024 },
1443 .hfront_porch = { 2, 2, 2 },
1444 .hback_porch = { 2, 2, 2 },
1445 .hsync_len = { 86, 124, 244 },
1446 .vactive = { 768, 768, 768 },
1447 .vfront_porch = { 2, 2, 2 },
1448 .vback_porch = { 2, 2, 2 },
1449 .vsync_len = { 6, 34, 73 },
1450 .flags = DISPLAY_FLAGS_DE_HIGH,
1453 static const struct panel_desc kyo_tcg121xglp = {
1454 .timings = &kyo_tcg121xglp_timing,
1461 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1464 static const struct drm_display_mode lg_lb070wv8_mode = {
1467 .hsync_start = 800 + 88,
1468 .hsync_end = 800 + 88 + 80,
1469 .htotal = 800 + 88 + 80 + 88,
1471 .vsync_start = 480 + 10,
1472 .vsync_end = 480 + 10 + 25,
1473 .vtotal = 480 + 10 + 25 + 10,
1477 static const struct panel_desc lg_lb070wv8 = {
1478 .modes = &lg_lb070wv8_mode,
1485 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1488 static const struct drm_display_mode lg_lp079qx1_sp0v_mode = {
1491 .hsync_start = 1536 + 12,
1492 .hsync_end = 1536 + 12 + 16,
1493 .htotal = 1536 + 12 + 16 + 48,
1495 .vsync_start = 2048 + 8,
1496 .vsync_end = 2048 + 8 + 4,
1497 .vtotal = 2048 + 8 + 4 + 8,
1499 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1502 static const struct panel_desc lg_lp079qx1_sp0v = {
1503 .modes = &lg_lp079qx1_sp0v_mode,
1511 static const struct drm_display_mode lg_lp097qx1_spa1_mode = {
1514 .hsync_start = 2048 + 150,
1515 .hsync_end = 2048 + 150 + 5,
1516 .htotal = 2048 + 150 + 5 + 5,
1518 .vsync_start = 1536 + 3,
1519 .vsync_end = 1536 + 3 + 1,
1520 .vtotal = 1536 + 3 + 1 + 9,
1524 static const struct panel_desc lg_lp097qx1_spa1 = {
1525 .modes = &lg_lp097qx1_spa1_mode,
1533 static const struct drm_display_mode lg_lp120up1_mode = {
1536 .hsync_start = 1920 + 40,
1537 .hsync_end = 1920 + 40 + 40,
1538 .htotal = 1920 + 40 + 40+ 80,
1540 .vsync_start = 1280 + 4,
1541 .vsync_end = 1280 + 4 + 4,
1542 .vtotal = 1280 + 4 + 4 + 12,
1546 static const struct panel_desc lg_lp120up1 = {
1547 .modes = &lg_lp120up1_mode,
1556 static const struct drm_display_mode lg_lp129qe_mode = {
1559 .hsync_start = 2560 + 48,
1560 .hsync_end = 2560 + 48 + 32,
1561 .htotal = 2560 + 48 + 32 + 80,
1563 .vsync_start = 1700 + 3,
1564 .vsync_end = 1700 + 3 + 10,
1565 .vtotal = 1700 + 3 + 10 + 36,
1569 static const struct panel_desc lg_lp129qe = {
1570 .modes = &lg_lp129qe_mode,
1579 static const struct drm_display_mode mitsubishi_aa070mc01_mode = {
1582 .hsync_start = 800 + 0,
1583 .hsync_end = 800 + 1,
1584 .htotal = 800 + 0 + 1 + 160,
1586 .vsync_start = 480 + 0,
1587 .vsync_end = 480 + 48 + 1,
1588 .vtotal = 480 + 48 + 1 + 0,
1590 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1593 static const struct panel_desc mitsubishi_aa070mc01 = {
1594 .modes = &mitsubishi_aa070mc01_mode,
1607 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1608 .bus_flags = DRM_BUS_FLAG_DE_HIGH,
1611 static const struct display_timing nec_nl12880bc20_05_timing = {
1612 .pixelclock = { 67000000, 71000000, 75000000 },
1613 .hactive = { 1280, 1280, 1280 },
1614 .hfront_porch = { 2, 30, 30 },
1615 .hback_porch = { 6, 100, 100 },
1616 .hsync_len = { 2, 30, 30 },
1617 .vactive = { 800, 800, 800 },
1618 .vfront_porch = { 5, 5, 5 },
1619 .vback_porch = { 11, 11, 11 },
1620 .vsync_len = { 7, 7, 7 },
1623 static const struct panel_desc nec_nl12880bc20_05 = {
1624 .timings = &nec_nl12880bc20_05_timing,
1635 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1638 static const struct drm_display_mode nec_nl4827hc19_05b_mode = {
1641 .hsync_start = 480 + 2,
1642 .hsync_end = 480 + 2 + 41,
1643 .htotal = 480 + 2 + 41 + 2,
1645 .vsync_start = 272 + 2,
1646 .vsync_end = 272 + 2 + 4,
1647 .vtotal = 272 + 2 + 4 + 2,
1649 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1652 static const struct panel_desc nec_nl4827hc19_05b = {
1653 .modes = &nec_nl4827hc19_05b_mode,
1660 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1661 .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE,
1664 static const struct drm_display_mode netron_dy_e231732_mode = {
1667 .hsync_start = 1024 + 160,
1668 .hsync_end = 1024 + 160 + 70,
1669 .htotal = 1024 + 160 + 70 + 90,
1671 .vsync_start = 600 + 127,
1672 .vsync_end = 600 + 127 + 20,
1673 .vtotal = 600 + 127 + 20 + 3,
1677 static const struct panel_desc netron_dy_e231732 = {
1678 .modes = &netron_dy_e231732_mode,
1684 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1687 static const struct drm_display_mode newhaven_nhd_43_480272ef_atxl_mode = {
1690 .hsync_start = 480 + 2,
1691 .hsync_end = 480 + 2 + 41,
1692 .htotal = 480 + 2 + 41 + 2,
1694 .vsync_start = 272 + 2,
1695 .vsync_end = 272 + 2 + 10,
1696 .vtotal = 272 + 2 + 10 + 2,
1698 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1701 static const struct panel_desc newhaven_nhd_43_480272ef_atxl = {
1702 .modes = &newhaven_nhd_43_480272ef_atxl_mode,
1709 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1710 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE |
1711 DRM_BUS_FLAG_SYNC_POSEDGE,
1714 static const struct display_timing nlt_nl192108ac18_02d_timing = {
1715 .pixelclock = { 130000000, 148350000, 163000000 },
1716 .hactive = { 1920, 1920, 1920 },
1717 .hfront_porch = { 80, 100, 100 },
1718 .hback_porch = { 100, 120, 120 },
1719 .hsync_len = { 50, 60, 60 },
1720 .vactive = { 1080, 1080, 1080 },
1721 .vfront_porch = { 12, 30, 30 },
1722 .vback_porch = { 4, 10, 10 },
1723 .vsync_len = { 4, 5, 5 },
1726 static const struct panel_desc nlt_nl192108ac18_02d = {
1727 .timings = &nlt_nl192108ac18_02d_timing,
1737 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1740 static const struct drm_display_mode nvd_9128_mode = {
1743 .hsync_start = 800 + 130,
1744 .hsync_end = 800 + 130 + 98,
1745 .htotal = 800 + 0 + 130 + 98,
1747 .vsync_start = 480 + 10,
1748 .vsync_end = 480 + 10 + 50,
1749 .vtotal = 480 + 0 + 10 + 50,
1752 static const struct panel_desc nvd_9128 = {
1753 .modes = &nvd_9128_mode,
1760 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1763 static const struct display_timing okaya_rs800480t_7x0gp_timing = {
1764 .pixelclock = { 30000000, 30000000, 40000000 },
1765 .hactive = { 800, 800, 800 },
1766 .hfront_porch = { 40, 40, 40 },
1767 .hback_porch = { 40, 40, 40 },
1768 .hsync_len = { 1, 48, 48 },
1769 .vactive = { 480, 480, 480 },
1770 .vfront_porch = { 13, 13, 13 },
1771 .vback_porch = { 29, 29, 29 },
1772 .vsync_len = { 3, 3, 3 },
1773 .flags = DISPLAY_FLAGS_DE_HIGH,
1776 static const struct panel_desc okaya_rs800480t_7x0gp = {
1777 .timings = &okaya_rs800480t_7x0gp_timing,
1790 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1793 static const struct drm_display_mode olimex_lcd_olinuxino_43ts_mode = {
1796 .hsync_start = 480 + 5,
1797 .hsync_end = 480 + 5 + 30,
1798 .htotal = 480 + 5 + 30 + 10,
1800 .vsync_start = 272 + 8,
1801 .vsync_end = 272 + 8 + 5,
1802 .vtotal = 272 + 8 + 5 + 3,
1806 static const struct panel_desc olimex_lcd_olinuxino_43ts = {
1807 .modes = &olimex_lcd_olinuxino_43ts_mode,
1813 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1817 * 800x480 CVT. The panel appears to be quite accepting, at least as far as
1818 * pixel clocks, but this is the timing that was being used in the Adafruit
1819 * installation instructions.
1821 static const struct drm_display_mode ontat_yx700wv03_mode = {
1832 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1837 * https://www.adafruit.com/images/product-files/2406/c3163.pdf
1839 static const struct panel_desc ontat_yx700wv03 = {
1840 .modes = &ontat_yx700wv03_mode,
1847 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1850 static const struct drm_display_mode ortustech_com43h4m85ulc_mode = {
1853 .hsync_start = 480 + 10,
1854 .hsync_end = 480 + 10 + 10,
1855 .htotal = 480 + 10 + 10 + 15,
1857 .vsync_start = 800 + 3,
1858 .vsync_end = 800 + 3 + 3,
1859 .vtotal = 800 + 3 + 3 + 3,
1863 static const struct panel_desc ortustech_com43h4m85ulc = {
1864 .modes = &ortustech_com43h4m85ulc_mode,
1871 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1872 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
1875 static const struct drm_display_mode qd43003c0_40_mode = {
1878 .hsync_start = 480 + 8,
1879 .hsync_end = 480 + 8 + 4,
1880 .htotal = 480 + 8 + 4 + 39,
1882 .vsync_start = 272 + 4,
1883 .vsync_end = 272 + 4 + 10,
1884 .vtotal = 272 + 4 + 10 + 2,
1888 static const struct panel_desc qd43003c0_40 = {
1889 .modes = &qd43003c0_40_mode,
1896 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1899 static const struct display_timing rocktech_rk070er9427_timing = {
1900 .pixelclock = { 26400000, 33300000, 46800000 },
1901 .hactive = { 800, 800, 800 },
1902 .hfront_porch = { 16, 210, 354 },
1903 .hback_porch = { 46, 46, 46 },
1904 .hsync_len = { 1, 1, 1 },
1905 .vactive = { 480, 480, 480 },
1906 .vfront_porch = { 7, 22, 147 },
1907 .vback_porch = { 23, 23, 23 },
1908 .vsync_len = { 1, 1, 1 },
1909 .flags = DISPLAY_FLAGS_DE_HIGH,
1912 static const struct panel_desc rocktech_rk070er9427 = {
1913 .timings = &rocktech_rk070er9427_timing,
1926 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1929 static const struct drm_display_mode samsung_lsn122dl01_c01_mode = {
1932 .hsync_start = 2560 + 48,
1933 .hsync_end = 2560 + 48 + 32,
1934 .htotal = 2560 + 48 + 32 + 80,
1936 .vsync_start = 1600 + 2,
1937 .vsync_end = 1600 + 2 + 5,
1938 .vtotal = 1600 + 2 + 5 + 57,
1942 static const struct panel_desc samsung_lsn122dl01_c01 = {
1943 .modes = &samsung_lsn122dl01_c01_mode,
1951 static const struct drm_display_mode samsung_ltn101nt05_mode = {
1954 .hsync_start = 1024 + 24,
1955 .hsync_end = 1024 + 24 + 136,
1956 .htotal = 1024 + 24 + 136 + 160,
1958 .vsync_start = 600 + 3,
1959 .vsync_end = 600 + 3 + 6,
1960 .vtotal = 600 + 3 + 6 + 61,
1964 static const struct panel_desc samsung_ltn101nt05 = {
1965 .modes = &samsung_ltn101nt05_mode,
1974 static const struct drm_display_mode samsung_ltn140at29_301_mode = {
1977 .hsync_start = 1366 + 64,
1978 .hsync_end = 1366 + 64 + 48,
1979 .htotal = 1366 + 64 + 48 + 128,
1981 .vsync_start = 768 + 2,
1982 .vsync_end = 768 + 2 + 5,
1983 .vtotal = 768 + 2 + 5 + 17,
1987 static const struct panel_desc samsung_ltn140at29_301 = {
1988 .modes = &samsung_ltn140at29_301_mode,
1997 static const struct drm_display_mode sharp_lq035q7db03_mode = {
2000 .hsync_start = 240 + 16,
2001 .hsync_end = 240 + 16 + 7,
2002 .htotal = 240 + 16 + 7 + 5,
2004 .vsync_start = 320 + 9,
2005 .vsync_end = 320 + 9 + 1,
2006 .vtotal = 320 + 9 + 1 + 7,
2010 static const struct panel_desc sharp_lq035q7db03 = {
2011 .modes = &sharp_lq035q7db03_mode,
2018 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2021 static const struct display_timing sharp_lq101k1ly04_timing = {
2022 .pixelclock = { 60000000, 65000000, 80000000 },
2023 .hactive = { 1280, 1280, 1280 },
2024 .hfront_porch = { 20, 20, 20 },
2025 .hback_porch = { 20, 20, 20 },
2026 .hsync_len = { 10, 10, 10 },
2027 .vactive = { 800, 800, 800 },
2028 .vfront_porch = { 4, 4, 4 },
2029 .vback_porch = { 4, 4, 4 },
2030 .vsync_len = { 4, 4, 4 },
2031 .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE,
2034 static const struct panel_desc sharp_lq101k1ly04 = {
2035 .timings = &sharp_lq101k1ly04_timing,
2042 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
2045 static const struct display_timing sharp_lq123p1jx31_timing = {
2046 .pixelclock = { 252750000, 252750000, 266604720 },
2047 .hactive = { 2400, 2400, 2400 },
2048 .hfront_porch = { 48, 48, 48 },
2049 .hback_porch = { 80, 80, 84 },
2050 .hsync_len = { 32, 32, 32 },
2051 .vactive = { 1600, 1600, 1600 },
2052 .vfront_porch = { 3, 3, 3 },
2053 .vback_porch = { 33, 33, 120 },
2054 .vsync_len = { 10, 10, 10 },
2055 .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW,
2058 static const struct panel_desc sharp_lq123p1jx31 = {
2059 .timings = &sharp_lq123p1jx31_timing,
2073 static const struct drm_display_mode sharp_lq150x1lg11_mode = {
2076 .hsync_start = 1024 + 168,
2077 .hsync_end = 1024 + 168 + 64,
2078 .htotal = 1024 + 168 + 64 + 88,
2080 .vsync_start = 768 + 37,
2081 .vsync_end = 768 + 37 + 2,
2082 .vtotal = 768 + 37 + 2 + 8,
2086 static const struct panel_desc sharp_lq150x1lg11 = {
2087 .modes = &sharp_lq150x1lg11_mode,
2094 .bus_format = MEDIA_BUS_FMT_RGB565_1X16,
2097 static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = {
2100 .hsync_start = 800 + 1,
2101 .hsync_end = 800 + 1 + 64,
2102 .htotal = 800 + 1 + 64 + 64,
2104 .vsync_start = 480 + 1,
2105 .vsync_end = 480 + 1 + 23,
2106 .vtotal = 480 + 1 + 23 + 22,
2110 static const struct panel_desc shelly_sca07010_bfn_lnn = {
2111 .modes = &shelly_sca07010_bfn_lnn_mode,
2117 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2120 static const struct drm_display_mode starry_kr122ea0sra_mode = {
2123 .hsync_start = 1920 + 16,
2124 .hsync_end = 1920 + 16 + 16,
2125 .htotal = 1920 + 16 + 16 + 32,
2127 .vsync_start = 1200 + 15,
2128 .vsync_end = 1200 + 15 + 2,
2129 .vtotal = 1200 + 15 + 2 + 18,
2131 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2134 static const struct panel_desc starry_kr122ea0sra = {
2135 .modes = &starry_kr122ea0sra_mode,
2142 .prepare = 10 + 200,
2144 .unprepare = 10 + 500,
2148 static const struct display_timing tianma_tm070jdhg30_timing = {
2149 .pixelclock = { 62600000, 68200000, 78100000 },
2150 .hactive = { 1280, 1280, 1280 },
2151 .hfront_porch = { 15, 64, 159 },
2152 .hback_porch = { 5, 5, 5 },
2153 .hsync_len = { 1, 1, 256 },
2154 .vactive = { 800, 800, 800 },
2155 .vfront_porch = { 3, 40, 99 },
2156 .vback_porch = { 2, 2, 2 },
2157 .vsync_len = { 1, 1, 128 },
2158 .flags = DISPLAY_FLAGS_DE_HIGH,
2161 static const struct panel_desc tianma_tm070jdhg30 = {
2162 .timings = &tianma_tm070jdhg30_timing,
2169 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2172 static const struct display_timing tianma_tm070rvhg71_timing = {
2173 .pixelclock = { 27700000, 29200000, 39600000 },
2174 .hactive = { 800, 800, 800 },
2175 .hfront_porch = { 12, 40, 212 },
2176 .hback_porch = { 88, 88, 88 },
2177 .hsync_len = { 1, 1, 40 },
2178 .vactive = { 480, 480, 480 },
2179 .vfront_porch = { 1, 13, 88 },
2180 .vback_porch = { 32, 32, 32 },
2181 .vsync_len = { 1, 1, 3 },
2182 .flags = DISPLAY_FLAGS_DE_HIGH,
2185 static const struct panel_desc tianma_tm070rvhg71 = {
2186 .timings = &tianma_tm070rvhg71_timing,
2193 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2196 static const struct drm_display_mode toshiba_lt089ac29000_mode = {
2199 .hsync_start = 1280 + 192,
2200 .hsync_end = 1280 + 192 + 128,
2201 .htotal = 1280 + 192 + 128 + 64,
2203 .vsync_start = 768 + 20,
2204 .vsync_end = 768 + 20 + 7,
2205 .vtotal = 768 + 20 + 7 + 3,
2209 static const struct panel_desc toshiba_lt089ac29000 = {
2210 .modes = &toshiba_lt089ac29000_mode,
2216 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2217 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
2220 static const struct drm_display_mode tpk_f07a_0102_mode = {
2223 .hsync_start = 800 + 40,
2224 .hsync_end = 800 + 40 + 128,
2225 .htotal = 800 + 40 + 128 + 88,
2227 .vsync_start = 480 + 10,
2228 .vsync_end = 480 + 10 + 2,
2229 .vtotal = 480 + 10 + 2 + 33,
2233 static const struct panel_desc tpk_f07a_0102 = {
2234 .modes = &tpk_f07a_0102_mode,
2240 .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE,
2243 static const struct drm_display_mode tpk_f10a_0102_mode = {
2246 .hsync_start = 1024 + 176,
2247 .hsync_end = 1024 + 176 + 5,
2248 .htotal = 1024 + 176 + 5 + 88,
2250 .vsync_start = 600 + 20,
2251 .vsync_end = 600 + 20 + 5,
2252 .vtotal = 600 + 20 + 5 + 25,
2256 static const struct panel_desc tpk_f10a_0102 = {
2257 .modes = &tpk_f10a_0102_mode,
2265 static const struct display_timing urt_umsh_8596md_timing = {
2266 .pixelclock = { 33260000, 33260000, 33260000 },
2267 .hactive = { 800, 800, 800 },
2268 .hfront_porch = { 41, 41, 41 },
2269 .hback_porch = { 216 - 128, 216 - 128, 216 - 128 },
2270 .hsync_len = { 71, 128, 128 },
2271 .vactive = { 480, 480, 480 },
2272 .vfront_porch = { 10, 10, 10 },
2273 .vback_porch = { 35 - 2, 35 - 2, 35 - 2 },
2274 .vsync_len = { 2, 2, 2 },
2275 .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE |
2276 DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
2279 static const struct panel_desc urt_umsh_8596md_lvds = {
2280 .timings = &urt_umsh_8596md_timing,
2287 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
2290 static const struct panel_desc urt_umsh_8596md_parallel = {
2291 .timings = &urt_umsh_8596md_timing,
2298 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2301 static const struct drm_display_mode winstar_wf35ltiacd_mode = {
2304 .hsync_start = 320 + 20,
2305 .hsync_end = 320 + 20 + 30,
2306 .htotal = 320 + 20 + 30 + 38,
2308 .vsync_start = 240 + 4,
2309 .vsync_end = 240 + 4 + 3,
2310 .vtotal = 240 + 4 + 3 + 15,
2312 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2315 static const struct panel_desc winstar_wf35ltiacd = {
2316 .modes = &winstar_wf35ltiacd_mode,
2323 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2326 static const struct of_device_id platform_of_match[] = {
2328 .compatible = "ampire,am-480272h3tmqw-t01h",
2329 .data = &ire_am_480272h3tmqw_t01h,
2331 .compatible = "ampire,am800480r3tmqwa1h",
2332 .data = &ire_am800480r3tmqwa1h,
2334 .compatible = "auo,b101aw03",
2335 .data = &auo_b101aw03,
2337 .compatible = "auo,b101ean01",
2338 .data = &auo_b101ean01,
2340 .compatible = "auo,b101xtn01",
2341 .data = &auo_b101xtn01,
2343 .compatible = "auo,b116xw03",
2344 .data = &auo_b116xw03,
2346 .compatible = "auo,b133htn01",
2347 .data = &auo_b133htn01,
2349 .compatible = "auo,b133xtn01",
2350 .data = &auo_b133xtn01,
2352 .compatible = "auo,g070vvn01",
2353 .data = &auo_g070vvn01,
2355 .compatible = "auo,g104sn02",
2356 .data = &auo_g104sn02,
2358 .compatible = "auo,g133han01",
2359 .data = &auo_g133han01,
2361 .compatible = "auo,g185han01",
2362 .data = &auo_g185han01,
2364 .compatible = "auo,p320hvn03",
2365 .data = &auo_p320hvn03,
2367 .compatible = "auo,t215hvn01",
2368 .data = &auo_t215hvn01,
2370 .compatible = "avic,tm070ddh03",
2371 .data = &avic_tm070ddh03,
2373 .compatible = "boe,hv070wsa-100",
2374 .data = &boe_hv070wsa
2376 .compatible = "boe,nv101wxmn51",
2377 .data = &boe_nv101wxmn51,
2379 .compatible = "chunghwa,claa070wp03xg",
2380 .data = &chunghwa_claa070wp03xg,
2382 .compatible = "chunghwa,claa101wa01a",
2383 .data = &chunghwa_claa101wa01a
2385 .compatible = "chunghwa,claa101wb01",
2386 .data = &chunghwa_claa101wb01
2388 .compatible = "dataimage,scf0700c48ggu18",
2389 .data = &dataimage_scf0700c48ggu18,
2391 .compatible = "dlc,dlc0700yzg-1",
2392 .data = &dlc_dlc0700yzg_1,
2394 .compatible = "edt,et057090dhu",
2395 .data = &edt_et057090dhu,
2397 .compatible = "edt,et070080dh6",
2398 .data = &edt_etm0700g0dh6,
2400 .compatible = "edt,etm0700g0dh6",
2401 .data = &edt_etm0700g0dh6,
2403 .compatible = "edt,etm0700g0bdh6",
2404 .data = &edt_etm0700g0bdh6,
2406 .compatible = "edt,etm0700g0edh6",
2407 .data = &edt_etm0700g0bdh6,
2409 .compatible = "foxlink,fl500wvr00-a0t",
2410 .data = &foxlink_fl500wvr00_a0t,
2412 .compatible = "giantplus,gpg482739qs5",
2413 .data = &giantplus_gpg482739qs5
2415 .compatible = "hannstar,hsd070pww1",
2416 .data = &hannstar_hsd070pww1,
2418 .compatible = "hannstar,hsd100pxn1",
2419 .data = &hannstar_hsd100pxn1,
2421 .compatible = "hit,tx23d38vm0caa",
2422 .data = &hitachi_tx23d38vm0caa
2424 .compatible = "innolux,at043tn24",
2425 .data = &innolux_at043tn24,
2427 .compatible = "innolux,at070tn92",
2428 .data = &innolux_at070tn92,
2430 .compatible = "innolux,g070y2-l01",
2431 .data = &innolux_g070y2_l01,
2433 .compatible = "innolux,g101ice-l01",
2434 .data = &innolux_g101ice_l01
2436 .compatible = "innolux,g121i1-l01",
2437 .data = &innolux_g121i1_l01
2439 .compatible = "innolux,g121x1-l03",
2440 .data = &innolux_g121x1_l03,
2442 .compatible = "innolux,n116bge",
2443 .data = &innolux_n116bge,
2445 .compatible = "innolux,n156bge-l21",
2446 .data = &innolux_n156bge_l21,
2448 .compatible = "innolux,tv123wam",
2449 .data = &innolux_tv123wam,
2451 .compatible = "innolux,zj070na-01p",
2452 .data = &innolux_zj070na_01p,
2454 .compatible = "koe,tx31d200vm0baa",
2455 .data = &koe_tx31d200vm0baa,
2457 .compatible = "kyo,tcg121xglp",
2458 .data = &kyo_tcg121xglp,
2460 .compatible = "lg,lb070wv8",
2461 .data = &lg_lb070wv8,
2463 .compatible = "lg,lp079qx1-sp0v",
2464 .data = &lg_lp079qx1_sp0v,
2466 .compatible = "lg,lp097qx1-spa1",
2467 .data = &lg_lp097qx1_spa1,
2469 .compatible = "lg,lp120up1",
2470 .data = &lg_lp120up1,
2472 .compatible = "lg,lp129qe",
2473 .data = &lg_lp129qe,
2475 .compatible = "mitsubishi,aa070mc01-ca1",
2476 .data = &mitsubishi_aa070mc01,
2478 .compatible = "nec,nl12880bc20-05",
2479 .data = &nec_nl12880bc20_05,
2481 .compatible = "nec,nl4827hc19-05b",
2482 .data = &nec_nl4827hc19_05b,
2484 .compatible = "netron-dy,e231732",
2485 .data = &netron_dy_e231732,
2487 .compatible = "newhaven,nhd-4.3-480272ef-atxl",
2488 .data = &newhaven_nhd_43_480272ef_atxl,
2490 .compatible = "nlt,nl192108ac18-02d",
2491 .data = &nlt_nl192108ac18_02d,
2493 .compatible = "nvd,9128",
2496 .compatible = "okaya,rs800480t-7x0gp",
2497 .data = &okaya_rs800480t_7x0gp,
2499 .compatible = "olimex,lcd-olinuxino-43-ts",
2500 .data = &olimex_lcd_olinuxino_43ts,
2502 .compatible = "ontat,yx700wv03",
2503 .data = &ontat_yx700wv03,
2505 .compatible = "ortustech,com43h4m85ulc",
2506 .data = &ortustech_com43h4m85ulc,
2508 .compatible = "qiaodian,qd43003c0-40",
2509 .data = &qd43003c0_40,
2511 .compatible = "rocktech,rk070er9427",
2512 .data = &rocktech_rk070er9427,
2514 .compatible = "samsung,lsn122dl01-c01",
2515 .data = &samsung_lsn122dl01_c01,
2517 .compatible = "samsung,ltn101nt05",
2518 .data = &samsung_ltn101nt05,
2520 .compatible = "samsung,ltn140at29-301",
2521 .data = &samsung_ltn140at29_301,
2523 .compatible = "sharp,lq035q7db03",
2524 .data = &sharp_lq035q7db03,
2526 .compatible = "sharp,lq101k1ly04",
2527 .data = &sharp_lq101k1ly04,
2529 .compatible = "sharp,lq123p1jx31",
2530 .data = &sharp_lq123p1jx31,
2532 .compatible = "sharp,lq150x1lg11",
2533 .data = &sharp_lq150x1lg11,
2535 .compatible = "shelly,sca07010-bfn-lnn",
2536 .data = &shelly_sca07010_bfn_lnn,
2538 .compatible = "starry,kr122ea0sra",
2539 .data = &starry_kr122ea0sra,
2541 .compatible = "tianma,tm070jdhg30",
2542 .data = &tianma_tm070jdhg30,
2544 .compatible = "tianma,tm070rvhg71",
2545 .data = &tianma_tm070rvhg71,
2547 .compatible = "toshiba,lt089ac29000",
2548 .data = &toshiba_lt089ac29000,
2550 .compatible = "tpk,f07a-0102",
2551 .data = &tpk_f07a_0102,
2553 .compatible = "tpk,f10a-0102",
2554 .data = &tpk_f10a_0102,
2556 .compatible = "urt,umsh-8596md-t",
2557 .data = &urt_umsh_8596md_parallel,
2559 .compatible = "urt,umsh-8596md-1t",
2560 .data = &urt_umsh_8596md_parallel,
2562 .compatible = "urt,umsh-8596md-7t",
2563 .data = &urt_umsh_8596md_parallel,
2565 .compatible = "urt,umsh-8596md-11t",
2566 .data = &urt_umsh_8596md_lvds,
2568 .compatible = "urt,umsh-8596md-19t",
2569 .data = &urt_umsh_8596md_lvds,
2571 .compatible = "urt,umsh-8596md-20t",
2572 .data = &urt_umsh_8596md_parallel,
2574 .compatible = "winstar,wf35ltiacd",
2575 .data = &winstar_wf35ltiacd,
2580 MODULE_DEVICE_TABLE(of, platform_of_match);
2582 static int panel_simple_platform_probe(struct platform_device *pdev)
2584 const struct of_device_id *id;
2586 id = of_match_node(platform_of_match, pdev->dev.of_node);
2590 return panel_simple_probe(&pdev->dev, id->data);
2593 static int panel_simple_platform_remove(struct platform_device *pdev)
2595 return panel_simple_remove(&pdev->dev);
2598 static void panel_simple_platform_shutdown(struct platform_device *pdev)
2600 panel_simple_shutdown(&pdev->dev);
2603 static struct platform_driver panel_simple_platform_driver = {
2605 .name = "panel-simple",
2606 .of_match_table = platform_of_match,
2608 .probe = panel_simple_platform_probe,
2609 .remove = panel_simple_platform_remove,
2610 .shutdown = panel_simple_platform_shutdown,
2613 struct panel_desc_dsi {
2614 struct panel_desc desc;
2616 unsigned long flags;
2617 enum mipi_dsi_pixel_format format;
2621 static const struct drm_display_mode auo_b080uan01_mode = {
2624 .hsync_start = 1200 + 62,
2625 .hsync_end = 1200 + 62 + 4,
2626 .htotal = 1200 + 62 + 4 + 62,
2628 .vsync_start = 1920 + 9,
2629 .vsync_end = 1920 + 9 + 2,
2630 .vtotal = 1920 + 9 + 2 + 8,
2634 static const struct panel_desc_dsi auo_b080uan01 = {
2636 .modes = &auo_b080uan01_mode,
2644 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
2645 .format = MIPI_DSI_FMT_RGB888,
2649 static const struct drm_display_mode boe_tv080wum_nl0_mode = {
2652 .hsync_start = 1200 + 120,
2653 .hsync_end = 1200 + 120 + 20,
2654 .htotal = 1200 + 120 + 20 + 21,
2656 .vsync_start = 1920 + 21,
2657 .vsync_end = 1920 + 21 + 3,
2658 .vtotal = 1920 + 21 + 3 + 18,
2660 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2663 static const struct panel_desc_dsi boe_tv080wum_nl0 = {
2665 .modes = &boe_tv080wum_nl0_mode,
2672 .flags = MIPI_DSI_MODE_VIDEO |
2673 MIPI_DSI_MODE_VIDEO_BURST |
2674 MIPI_DSI_MODE_VIDEO_SYNC_PULSE,
2675 .format = MIPI_DSI_FMT_RGB888,
2679 static const struct drm_display_mode lg_ld070wx3_sl01_mode = {
2682 .hsync_start = 800 + 32,
2683 .hsync_end = 800 + 32 + 1,
2684 .htotal = 800 + 32 + 1 + 57,
2686 .vsync_start = 1280 + 28,
2687 .vsync_end = 1280 + 28 + 1,
2688 .vtotal = 1280 + 28 + 1 + 14,
2692 static const struct panel_desc_dsi lg_ld070wx3_sl01 = {
2694 .modes = &lg_ld070wx3_sl01_mode,
2702 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
2703 .format = MIPI_DSI_FMT_RGB888,
2707 static const struct drm_display_mode lg_lh500wx1_sd03_mode = {
2710 .hsync_start = 720 + 12,
2711 .hsync_end = 720 + 12 + 4,
2712 .htotal = 720 + 12 + 4 + 112,
2714 .vsync_start = 1280 + 8,
2715 .vsync_end = 1280 + 8 + 4,
2716 .vtotal = 1280 + 8 + 4 + 12,
2720 static const struct panel_desc_dsi lg_lh500wx1_sd03 = {
2722 .modes = &lg_lh500wx1_sd03_mode,
2730 .flags = MIPI_DSI_MODE_VIDEO,
2731 .format = MIPI_DSI_FMT_RGB888,
2735 static const struct drm_display_mode panasonic_vvx10f004b00_mode = {
2738 .hsync_start = 1920 + 154,
2739 .hsync_end = 1920 + 154 + 16,
2740 .htotal = 1920 + 154 + 16 + 32,
2742 .vsync_start = 1200 + 17,
2743 .vsync_end = 1200 + 17 + 2,
2744 .vtotal = 1200 + 17 + 2 + 16,
2748 static const struct panel_desc_dsi panasonic_vvx10f004b00 = {
2750 .modes = &panasonic_vvx10f004b00_mode,
2758 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
2759 MIPI_DSI_CLOCK_NON_CONTINUOUS,
2760 .format = MIPI_DSI_FMT_RGB888,
2764 static const struct of_device_id dsi_of_match[] = {
2766 .compatible = "auo,b080uan01",
2767 .data = &auo_b080uan01
2769 .compatible = "boe,tv080wum-nl0",
2770 .data = &boe_tv080wum_nl0
2772 .compatible = "lg,ld070wx3-sl01",
2773 .data = &lg_ld070wx3_sl01
2775 .compatible = "lg,lh500wx1-sd03",
2776 .data = &lg_lh500wx1_sd03
2778 .compatible = "panasonic,vvx10f004b00",
2779 .data = &panasonic_vvx10f004b00
2784 MODULE_DEVICE_TABLE(of, dsi_of_match);
2786 static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
2788 const struct panel_desc_dsi *desc;
2789 const struct of_device_id *id;
2792 id = of_match_node(dsi_of_match, dsi->dev.of_node);
2798 err = panel_simple_probe(&dsi->dev, &desc->desc);
2802 dsi->mode_flags = desc->flags;
2803 dsi->format = desc->format;
2804 dsi->lanes = desc->lanes;
2806 return mipi_dsi_attach(dsi);
2809 static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi)
2813 err = mipi_dsi_detach(dsi);
2815 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
2817 return panel_simple_remove(&dsi->dev);
2820 static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi)
2822 panel_simple_shutdown(&dsi->dev);
2825 static struct mipi_dsi_driver panel_simple_dsi_driver = {
2827 .name = "panel-simple-dsi",
2828 .of_match_table = dsi_of_match,
2830 .probe = panel_simple_dsi_probe,
2831 .remove = panel_simple_dsi_remove,
2832 .shutdown = panel_simple_dsi_shutdown,
2835 static int __init panel_simple_init(void)
2839 err = platform_driver_register(&panel_simple_platform_driver);
2843 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) {
2844 err = mipi_dsi_driver_register(&panel_simple_dsi_driver);
2851 module_init(panel_simple_init);
2853 static void __exit panel_simple_exit(void)
2855 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI))
2856 mipi_dsi_driver_unregister(&panel_simple_dsi_driver);
2858 platform_driver_unregister(&panel_simple_platform_driver);
2860 module_exit(panel_simple_exit);
2863 MODULE_DESCRIPTION("DRM Driver for Simple Panels");
2864 MODULE_LICENSE("GPL and additional rights");