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
);
191 gpiod_set_value_cansleep(p
->enable_gpio
, 0);
193 regulator_disable(p
->supply
);
195 if (p
->desc
->delay
.unprepare
)
196 msleep(p
->desc
->delay
.unprepare
);
203 static int panel_simple_prepare(struct drm_panel
*panel
)
205 struct panel_simple
*p
= to_panel_simple(panel
);
211 err
= regulator_enable(p
->supply
);
213 dev_err(panel
->dev
, "failed to enable supply: %d\n", err
);
218 gpiod_set_value_cansleep(p
->enable_gpio
, 1);
220 if (p
->desc
->delay
.prepare
)
221 msleep(p
->desc
->delay
.prepare
);
228 static int panel_simple_enable(struct drm_panel
*panel
)
230 struct panel_simple
*p
= to_panel_simple(panel
);
235 if (p
->desc
->delay
.enable
)
236 msleep(p
->desc
->delay
.enable
);
239 p
->backlight
->props
.state
&= ~BL_CORE_FBBLANK
;
240 p
->backlight
->props
.power
= FB_BLANK_UNBLANK
;
241 backlight_update_status(p
->backlight
);
249 static int panel_simple_get_modes(struct drm_panel
*panel
)
251 struct panel_simple
*p
= to_panel_simple(panel
);
254 /* probe EDID if a DDC bus is available */
256 struct edid
*edid
= drm_get_edid(panel
->connector
, p
->ddc
);
257 drm_mode_connector_update_edid_property(panel
->connector
, edid
);
259 num
+= drm_add_edid_modes(panel
->connector
, edid
);
264 /* add hard-coded panel modes */
265 num
+= panel_simple_get_fixed_modes(p
);
270 static int panel_simple_get_timings(struct drm_panel
*panel
,
271 unsigned int num_timings
,
272 struct display_timing
*timings
)
274 struct panel_simple
*p
= to_panel_simple(panel
);
277 if (p
->desc
->num_timings
< num_timings
)
278 num_timings
= p
->desc
->num_timings
;
281 for (i
= 0; i
< num_timings
; i
++)
282 timings
[i
] = p
->desc
->timings
[i
];
284 return p
->desc
->num_timings
;
287 static const struct drm_panel_funcs panel_simple_funcs
= {
288 .disable
= panel_simple_disable
,
289 .unprepare
= panel_simple_unprepare
,
290 .prepare
= panel_simple_prepare
,
291 .enable
= panel_simple_enable
,
292 .get_modes
= panel_simple_get_modes
,
293 .get_timings
= panel_simple_get_timings
,
296 static int panel_simple_probe(struct device
*dev
, const struct panel_desc
*desc
)
298 struct device_node
*backlight
, *ddc
;
299 struct panel_simple
*panel
;
302 panel
= devm_kzalloc(dev
, sizeof(*panel
), GFP_KERNEL
);
306 panel
->enabled
= false;
307 panel
->prepared
= false;
310 panel
->supply
= devm_regulator_get(dev
, "power");
311 if (IS_ERR(panel
->supply
))
312 return PTR_ERR(panel
->supply
);
314 panel
->enable_gpio
= devm_gpiod_get_optional(dev
, "enable",
316 if (IS_ERR(panel
->enable_gpio
)) {
317 err
= PTR_ERR(panel
->enable_gpio
);
318 dev_err(dev
, "failed to request GPIO: %d\n", err
);
322 backlight
= of_parse_phandle(dev
->of_node
, "backlight", 0);
324 panel
->backlight
= of_find_backlight_by_node(backlight
);
325 of_node_put(backlight
);
327 if (!panel
->backlight
)
328 return -EPROBE_DEFER
;
331 ddc
= of_parse_phandle(dev
->of_node
, "ddc-i2c-bus", 0);
333 panel
->ddc
= of_find_i2c_adapter_by_node(ddc
);
342 drm_panel_init(&panel
->base
);
343 panel
->base
.dev
= dev
;
344 panel
->base
.funcs
= &panel_simple_funcs
;
346 err
= drm_panel_add(&panel
->base
);
350 dev_set_drvdata(dev
, panel
);
356 put_device(&panel
->ddc
->dev
);
358 if (panel
->backlight
)
359 put_device(&panel
->backlight
->dev
);
364 static int panel_simple_remove(struct device
*dev
)
366 struct panel_simple
*panel
= dev_get_drvdata(dev
);
368 drm_panel_detach(&panel
->base
);
369 drm_panel_remove(&panel
->base
);
371 panel_simple_disable(&panel
->base
);
374 put_device(&panel
->ddc
->dev
);
376 if (panel
->backlight
)
377 put_device(&panel
->backlight
->dev
);
382 static void panel_simple_shutdown(struct device
*dev
)
384 struct panel_simple
*panel
= dev_get_drvdata(dev
);
386 panel_simple_disable(&panel
->base
);
389 static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode
= {
392 .hsync_start
= 800 + 0,
393 .hsync_end
= 800 + 0 + 255,
394 .htotal
= 800 + 0 + 255 + 0,
396 .vsync_start
= 480 + 2,
397 .vsync_end
= 480 + 2 + 45,
398 .vtotal
= 480 + 2 + 45 + 0,
400 .flags
= DRM_MODE_FLAG_PHSYNC
| DRM_MODE_FLAG_PVSYNC
,
403 static const struct panel_desc ampire_am800480r3tmqwa1h
= {
404 .modes
= &ire_am800480r3tmqwa1h_mode
,
411 .bus_format
= MEDIA_BUS_FMT_RGB666_1X18
,
414 static const struct drm_display_mode auo_b101aw03_mode
= {
417 .hsync_start
= 1024 + 156,
418 .hsync_end
= 1024 + 156 + 8,
419 .htotal
= 1024 + 156 + 8 + 156,
421 .vsync_start
= 600 + 16,
422 .vsync_end
= 600 + 16 + 6,
423 .vtotal
= 600 + 16 + 6 + 16,
427 static const struct panel_desc auo_b101aw03
= {
428 .modes
= &auo_b101aw03_mode
,
437 static const struct drm_display_mode auo_b101ean01_mode
= {
440 .hsync_start
= 1280 + 119,
441 .hsync_end
= 1280 + 119 + 32,
442 .htotal
= 1280 + 119 + 32 + 21,
444 .vsync_start
= 800 + 4,
445 .vsync_end
= 800 + 4 + 20,
446 .vtotal
= 800 + 4 + 20 + 8,
450 static const struct panel_desc auo_b101ean01
= {
451 .modes
= &auo_b101ean01_mode
,
460 static const struct drm_display_mode auo_b101xtn01_mode
= {
463 .hsync_start
= 1366 + 20,
464 .hsync_end
= 1366 + 20 + 70,
465 .htotal
= 1366 + 20 + 70,
467 .vsync_start
= 768 + 14,
468 .vsync_end
= 768 + 14 + 42,
469 .vtotal
= 768 + 14 + 42,
471 .flags
= DRM_MODE_FLAG_NVSYNC
| DRM_MODE_FLAG_NHSYNC
,
474 static const struct panel_desc auo_b101xtn01
= {
475 .modes
= &auo_b101xtn01_mode
,
484 static const struct drm_display_mode auo_b116xw03_mode
= {
487 .hsync_start
= 1366 + 40,
488 .hsync_end
= 1366 + 40 + 40,
489 .htotal
= 1366 + 40 + 40 + 32,
491 .vsync_start
= 768 + 10,
492 .vsync_end
= 768 + 10 + 12,
493 .vtotal
= 768 + 10 + 12 + 6,
497 static const struct panel_desc auo_b116xw03
= {
498 .modes
= &auo_b116xw03_mode
,
507 static const struct drm_display_mode auo_b133xtn01_mode
= {
510 .hsync_start
= 1366 + 48,
511 .hsync_end
= 1366 + 48 + 32,
512 .htotal
= 1366 + 48 + 32 + 20,
514 .vsync_start
= 768 + 3,
515 .vsync_end
= 768 + 3 + 6,
516 .vtotal
= 768 + 3 + 6 + 13,
520 static const struct panel_desc auo_b133xtn01
= {
521 .modes
= &auo_b133xtn01_mode
,
530 static const struct drm_display_mode auo_b133htn01_mode
= {
533 .hsync_start
= 1920 + 172,
534 .hsync_end
= 1920 + 172 + 80,
535 .htotal
= 1920 + 172 + 80 + 60,
537 .vsync_start
= 1080 + 25,
538 .vsync_end
= 1080 + 25 + 10,
539 .vtotal
= 1080 + 25 + 10 + 10,
543 static const struct panel_desc auo_b133htn01
= {
544 .modes
= &auo_b133htn01_mode
,
558 static const struct display_timing auo_g133han01_timings
= {
559 .pixelclock
= { 134000000, 141200000, 149000000 },
560 .hactive
= { 1920, 1920, 1920 },
561 .hfront_porch
= { 39, 58, 77 },
562 .hback_porch
= { 59, 88, 117 },
563 .hsync_len
= { 28, 42, 56 },
564 .vactive
= { 1080, 1080, 1080 },
565 .vfront_porch
= { 3, 8, 11 },
566 .vback_porch
= { 5, 14, 19 },
567 .vsync_len
= { 4, 14, 19 },
570 static const struct panel_desc auo_g133han01
= {
571 .timings
= &auo_g133han01_timings
,
584 .bus_format
= MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA
,
587 static const struct display_timing auo_g185han01_timings
= {
588 .pixelclock
= { 120000000, 144000000, 175000000 },
589 .hactive
= { 1920, 1920, 1920 },
590 .hfront_porch
= { 18, 60, 74 },
591 .hback_porch
= { 12, 44, 54 },
592 .hsync_len
= { 10, 24, 32 },
593 .vactive
= { 1080, 1080, 1080 },
594 .vfront_porch
= { 6, 10, 40 },
595 .vback_porch
= { 2, 5, 20 },
596 .vsync_len
= { 2, 5, 20 },
599 static const struct panel_desc auo_g185han01
= {
600 .timings
= &auo_g185han01_timings
,
613 .bus_format
= MEDIA_BUS_FMT_RGB888_1X7X4_SPWG
,
616 static const struct drm_display_mode auo_t215hvn01_mode
= {
619 .hsync_start
= 1920 + 88,
620 .hsync_end
= 1920 + 88 + 44,
621 .htotal
= 1920 + 88 + 44 + 148,
623 .vsync_start
= 1080 + 4,
624 .vsync_end
= 1080 + 4 + 5,
625 .vtotal
= 1080 + 4 + 5 + 36,
629 static const struct panel_desc auo_t215hvn01
= {
630 .modes
= &auo_t215hvn01_mode
,
643 static const struct drm_display_mode avic_tm070ddh03_mode
= {
646 .hsync_start
= 1024 + 160,
647 .hsync_end
= 1024 + 160 + 4,
648 .htotal
= 1024 + 160 + 4 + 156,
650 .vsync_start
= 600 + 17,
651 .vsync_end
= 600 + 17 + 1,
652 .vtotal
= 600 + 17 + 1 + 17,
656 static const struct panel_desc avic_tm070ddh03
= {
657 .modes
= &avic_tm070ddh03_mode
,
671 static const struct drm_display_mode chunghwa_claa070wp03xg_mode
= {
674 .hsync_start
= 800 + 49,
675 .hsync_end
= 800 + 49 + 33,
676 .htotal
= 800 + 49 + 33 + 17,
678 .vsync_start
= 1280 + 1,
679 .vsync_end
= 1280 + 1 + 7,
680 .vtotal
= 1280 + 1 + 7 + 15,
682 .flags
= DRM_MODE_FLAG_NVSYNC
| DRM_MODE_FLAG_NHSYNC
,
685 static const struct panel_desc chunghwa_claa070wp03xg
= {
686 .modes
= &chunghwa_claa070wp03xg_mode
,
695 static const struct drm_display_mode chunghwa_claa101wa01a_mode
= {
698 .hsync_start
= 1366 + 58,
699 .hsync_end
= 1366 + 58 + 58,
700 .htotal
= 1366 + 58 + 58 + 58,
702 .vsync_start
= 768 + 4,
703 .vsync_end
= 768 + 4 + 4,
704 .vtotal
= 768 + 4 + 4 + 4,
708 static const struct panel_desc chunghwa_claa101wa01a
= {
709 .modes
= &chunghwa_claa101wa01a_mode
,
718 static const struct drm_display_mode chunghwa_claa101wb01_mode
= {
721 .hsync_start
= 1366 + 48,
722 .hsync_end
= 1366 + 48 + 32,
723 .htotal
= 1366 + 48 + 32 + 20,
725 .vsync_start
= 768 + 16,
726 .vsync_end
= 768 + 16 + 8,
727 .vtotal
= 768 + 16 + 8 + 16,
731 static const struct panel_desc chunghwa_claa101wb01
= {
732 .modes
= &chunghwa_claa101wb01_mode
,
741 static const struct drm_display_mode edt_et057090dhu_mode
= {
744 .hsync_start
= 640 + 16,
745 .hsync_end
= 640 + 16 + 30,
746 .htotal
= 640 + 16 + 30 + 114,
748 .vsync_start
= 480 + 10,
749 .vsync_end
= 480 + 10 + 3,
750 .vtotal
= 480 + 10 + 3 + 32,
752 .flags
= DRM_MODE_FLAG_NVSYNC
| DRM_MODE_FLAG_NHSYNC
,
755 static const struct panel_desc edt_et057090dhu
= {
756 .modes
= &edt_et057090dhu_mode
,
765 static const struct drm_display_mode edt_etm0700g0dh6_mode
= {
768 .hsync_start
= 800 + 40,
769 .hsync_end
= 800 + 40 + 128,
770 .htotal
= 800 + 40 + 128 + 88,
772 .vsync_start
= 480 + 10,
773 .vsync_end
= 480 + 10 + 2,
774 .vtotal
= 480 + 10 + 2 + 33,
776 .flags
= DRM_MODE_FLAG_NHSYNC
| DRM_MODE_FLAG_NVSYNC
,
779 static const struct panel_desc edt_etm0700g0dh6
= {
780 .modes
= &edt_etm0700g0dh6_mode
,
789 static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode
= {
792 .hsync_start
= 800 + 168,
793 .hsync_end
= 800 + 168 + 64,
794 .htotal
= 800 + 168 + 64 + 88,
796 .vsync_start
= 480 + 37,
797 .vsync_end
= 480 + 37 + 2,
798 .vtotal
= 480 + 37 + 2 + 8,
802 static const struct panel_desc foxlink_fl500wvr00_a0t
= {
803 .modes
= &foxlink_fl500wvr00_a0t_mode
,
810 .bus_format
= MEDIA_BUS_FMT_RGB888_1X24
,
813 static const struct drm_display_mode giantplus_gpg482739qs5_mode
= {
816 .hsync_start
= 480 + 5,
817 .hsync_end
= 480 + 5 + 1,
818 .htotal
= 480 + 5 + 1 + 40,
820 .vsync_start
= 272 + 8,
821 .vsync_end
= 272 + 8 + 1,
822 .vtotal
= 272 + 8 + 1 + 8,
826 static const struct panel_desc giantplus_gpg482739qs5
= {
827 .modes
= &giantplus_gpg482739qs5_mode
,
834 .bus_format
= MEDIA_BUS_FMT_RGB888_1X24
,
837 static const struct display_timing hannstar_hsd070pww1_timing
= {
838 .pixelclock
= { 64300000, 71100000, 82000000 },
839 .hactive
= { 1280, 1280, 1280 },
840 .hfront_porch
= { 1, 1, 10 },
841 .hback_porch
= { 1, 1, 10 },
843 * According to the data sheet, the minimum horizontal blanking interval
844 * is 54 clocks (1 + 52 + 1), but tests with a Nitrogen6X have shown the
845 * minimum working horizontal blanking interval to be 60 clocks.
847 .hsync_len
= { 58, 158, 661 },
848 .vactive
= { 800, 800, 800 },
849 .vfront_porch
= { 1, 1, 10 },
850 .vback_porch
= { 1, 1, 10 },
851 .vsync_len
= { 1, 21, 203 },
852 .flags
= DISPLAY_FLAGS_DE_HIGH
,
855 static const struct panel_desc hannstar_hsd070pww1
= {
856 .timings
= &hannstar_hsd070pww1_timing
,
863 .bus_format
= MEDIA_BUS_FMT_RGB666_1X7X3_SPWG
,
866 static const struct display_timing hannstar_hsd100pxn1_timing
= {
867 .pixelclock
= { 55000000, 65000000, 75000000 },
868 .hactive
= { 1024, 1024, 1024 },
869 .hfront_porch
= { 40, 40, 40 },
870 .hback_porch
= { 220, 220, 220 },
871 .hsync_len
= { 20, 60, 100 },
872 .vactive
= { 768, 768, 768 },
873 .vfront_porch
= { 7, 7, 7 },
874 .vback_porch
= { 21, 21, 21 },
875 .vsync_len
= { 10, 10, 10 },
876 .flags
= DISPLAY_FLAGS_DE_HIGH
,
879 static const struct panel_desc hannstar_hsd100pxn1
= {
880 .timings
= &hannstar_hsd100pxn1_timing
,
887 .bus_format
= MEDIA_BUS_FMT_RGB666_1X7X3_SPWG
,
890 static const struct drm_display_mode hitachi_tx23d38vm0caa_mode
= {
893 .hsync_start
= 800 + 85,
894 .hsync_end
= 800 + 85 + 86,
895 .htotal
= 800 + 85 + 86 + 85,
897 .vsync_start
= 480 + 16,
898 .vsync_end
= 480 + 16 + 13,
899 .vtotal
= 480 + 16 + 13 + 16,
903 static const struct panel_desc hitachi_tx23d38vm0caa
= {
904 .modes
= &hitachi_tx23d38vm0caa_mode
,
913 static const struct drm_display_mode innolux_at043tn24_mode
= {
916 .hsync_start
= 480 + 2,
917 .hsync_end
= 480 + 2 + 41,
918 .htotal
= 480 + 2 + 41 + 2,
920 .vsync_start
= 272 + 2,
921 .vsync_end
= 272 + 2 + 11,
922 .vtotal
= 272 + 2 + 11 + 2,
924 .flags
= DRM_MODE_FLAG_NHSYNC
| DRM_MODE_FLAG_NVSYNC
,
927 static const struct panel_desc innolux_at043tn24
= {
928 .modes
= &innolux_at043tn24_mode
,
935 .bus_format
= MEDIA_BUS_FMT_RGB888_1X24
,
938 static const struct drm_display_mode innolux_at070tn92_mode
= {
941 .hsync_start
= 800 + 210,
942 .hsync_end
= 800 + 210 + 20,
943 .htotal
= 800 + 210 + 20 + 46,
945 .vsync_start
= 480 + 22,
946 .vsync_end
= 480 + 22 + 10,
947 .vtotal
= 480 + 22 + 23 + 10,
951 static const struct panel_desc innolux_at070tn92
= {
952 .modes
= &innolux_at070tn92_mode
,
958 .bus_format
= MEDIA_BUS_FMT_RGB888_1X24
,
961 static const struct display_timing innolux_g101ice_l01_timing
= {
962 .pixelclock
= { 60400000, 71100000, 74700000 },
963 .hactive
= { 1280, 1280, 1280 },
964 .hfront_porch
= { 41, 80, 100 },
965 .hback_porch
= { 40, 79, 99 },
966 .hsync_len
= { 1, 1, 1 },
967 .vactive
= { 800, 800, 800 },
968 .vfront_porch
= { 5, 11, 14 },
969 .vback_porch
= { 4, 11, 14 },
970 .vsync_len
= { 1, 1, 1 },
971 .flags
= DISPLAY_FLAGS_DE_HIGH
,
974 static const struct panel_desc innolux_g101ice_l01
= {
975 .timings
= &innolux_g101ice_l01_timing
,
986 .bus_format
= MEDIA_BUS_FMT_RGB888_1X7X4_SPWG
,
989 static const struct display_timing innolux_g121i1_l01_timing
= {
990 .pixelclock
= { 67450000, 71000000, 74550000 },
991 .hactive
= { 1280, 1280, 1280 },
992 .hfront_porch
= { 40, 80, 160 },
993 .hback_porch
= { 39, 79, 159 },
994 .hsync_len
= { 1, 1, 1 },
995 .vactive
= { 800, 800, 800 },
996 .vfront_porch
= { 5, 11, 100 },
997 .vback_porch
= { 4, 11, 99 },
998 .vsync_len
= { 1, 1, 1 },
1001 static const struct panel_desc innolux_g121i1_l01
= {
1002 .timings
= &innolux_g121i1_l01_timing
,
1013 .bus_format
= MEDIA_BUS_FMT_RGB888_1X7X4_SPWG
,
1016 static const struct drm_display_mode innolux_g121x1_l03_mode
= {
1019 .hsync_start
= 1024 + 0,
1020 .hsync_end
= 1024 + 1,
1021 .htotal
= 1024 + 0 + 1 + 320,
1023 .vsync_start
= 768 + 38,
1024 .vsync_end
= 768 + 38 + 1,
1025 .vtotal
= 768 + 38 + 1 + 0,
1027 .flags
= DRM_MODE_FLAG_NHSYNC
| DRM_MODE_FLAG_NVSYNC
,
1030 static const struct panel_desc innolux_g121x1_l03
= {
1031 .modes
= &innolux_g121x1_l03_mode
,
1045 static const struct drm_display_mode innolux_n116bge_mode
= {
1048 .hsync_start
= 1366 + 136,
1049 .hsync_end
= 1366 + 136 + 30,
1050 .htotal
= 1366 + 136 + 30 + 60,
1052 .vsync_start
= 768 + 8,
1053 .vsync_end
= 768 + 8 + 12,
1054 .vtotal
= 768 + 8 + 12 + 12,
1056 .flags
= DRM_MODE_FLAG_NHSYNC
| DRM_MODE_FLAG_NVSYNC
,
1059 static const struct panel_desc innolux_n116bge
= {
1060 .modes
= &innolux_n116bge_mode
,
1069 static const struct drm_display_mode innolux_n156bge_l21_mode
= {
1072 .hsync_start
= 1366 + 16,
1073 .hsync_end
= 1366 + 16 + 34,
1074 .htotal
= 1366 + 16 + 34 + 50,
1076 .vsync_start
= 768 + 2,
1077 .vsync_end
= 768 + 2 + 6,
1078 .vtotal
= 768 + 2 + 6 + 12,
1082 static const struct panel_desc innolux_n156bge_l21
= {
1083 .modes
= &innolux_n156bge_l21_mode
,
1092 static const struct drm_display_mode innolux_zj070na_01p_mode
= {
1095 .hsync_start
= 1024 + 128,
1096 .hsync_end
= 1024 + 128 + 64,
1097 .htotal
= 1024 + 128 + 64 + 128,
1099 .vsync_start
= 600 + 16,
1100 .vsync_end
= 600 + 16 + 4,
1101 .vtotal
= 600 + 16 + 4 + 16,
1105 static const struct panel_desc innolux_zj070na_01p
= {
1106 .modes
= &innolux_zj070na_01p_mode
,
1115 static const struct display_timing kyo_tcg121xglp_timing
= {
1116 .pixelclock
= { 52000000, 65000000, 71000000 },
1117 .hactive
= { 1024, 1024, 1024 },
1118 .hfront_porch
= { 2, 2, 2 },
1119 .hback_porch
= { 2, 2, 2 },
1120 .hsync_len
= { 86, 124, 244 },
1121 .vactive
= { 768, 768, 768 },
1122 .vfront_porch
= { 2, 2, 2 },
1123 .vback_porch
= { 2, 2, 2 },
1124 .vsync_len
= { 6, 34, 73 },
1125 .flags
= DISPLAY_FLAGS_DE_HIGH
,
1128 static const struct panel_desc kyo_tcg121xglp
= {
1129 .timings
= &kyo_tcg121xglp_timing
,
1136 .bus_format
= MEDIA_BUS_FMT_RGB888_1X7X4_SPWG
,
1139 static const struct drm_display_mode lg_lb070wv8_mode
= {
1142 .hsync_start
= 800 + 88,
1143 .hsync_end
= 800 + 88 + 80,
1144 .htotal
= 800 + 88 + 80 + 88,
1146 .vsync_start
= 480 + 10,
1147 .vsync_end
= 480 + 10 + 25,
1148 .vtotal
= 480 + 10 + 25 + 10,
1152 static const struct panel_desc lg_lb070wv8
= {
1153 .modes
= &lg_lb070wv8_mode
,
1160 .bus_format
= MEDIA_BUS_FMT_RGB888_1X7X4_SPWG
,
1163 static const struct drm_display_mode lg_lp079qx1_sp0v_mode
= {
1166 .hsync_start
= 1536 + 12,
1167 .hsync_end
= 1536 + 12 + 16,
1168 .htotal
= 1536 + 12 + 16 + 48,
1170 .vsync_start
= 2048 + 8,
1171 .vsync_end
= 2048 + 8 + 4,
1172 .vtotal
= 2048 + 8 + 4 + 8,
1174 .flags
= DRM_MODE_FLAG_NVSYNC
| DRM_MODE_FLAG_NHSYNC
,
1177 static const struct panel_desc lg_lp079qx1_sp0v
= {
1178 .modes
= &lg_lp079qx1_sp0v_mode
,
1186 static const struct drm_display_mode lg_lp097qx1_spa1_mode
= {
1189 .hsync_start
= 2048 + 150,
1190 .hsync_end
= 2048 + 150 + 5,
1191 .htotal
= 2048 + 150 + 5 + 5,
1193 .vsync_start
= 1536 + 3,
1194 .vsync_end
= 1536 + 3 + 1,
1195 .vtotal
= 1536 + 3 + 1 + 9,
1199 static const struct panel_desc lg_lp097qx1_spa1
= {
1200 .modes
= &lg_lp097qx1_spa1_mode
,
1208 static const struct drm_display_mode lg_lp120up1_mode
= {
1211 .hsync_start
= 1920 + 40,
1212 .hsync_end
= 1920 + 40 + 40,
1213 .htotal
= 1920 + 40 + 40+ 80,
1215 .vsync_start
= 1280 + 4,
1216 .vsync_end
= 1280 + 4 + 4,
1217 .vtotal
= 1280 + 4 + 4 + 12,
1221 static const struct panel_desc lg_lp120up1
= {
1222 .modes
= &lg_lp120up1_mode
,
1231 static const struct drm_display_mode lg_lp129qe_mode
= {
1234 .hsync_start
= 2560 + 48,
1235 .hsync_end
= 2560 + 48 + 32,
1236 .htotal
= 2560 + 48 + 32 + 80,
1238 .vsync_start
= 1700 + 3,
1239 .vsync_end
= 1700 + 3 + 10,
1240 .vtotal
= 1700 + 3 + 10 + 36,
1244 static const struct panel_desc lg_lp129qe
= {
1245 .modes
= &lg_lp129qe_mode
,
1254 static const struct drm_display_mode nec_nl4827hc19_05b_mode
= {
1257 .hsync_start
= 480 + 2,
1258 .hsync_end
= 480 + 2 + 41,
1259 .htotal
= 480 + 2 + 41 + 2,
1261 .vsync_start
= 272 + 2,
1262 .vsync_end
= 272 + 2 + 4,
1263 .vtotal
= 272 + 2 + 4 + 2,
1265 .flags
= DRM_MODE_FLAG_NVSYNC
| DRM_MODE_FLAG_NHSYNC
,
1268 static const struct panel_desc nec_nl4827hc19_05b
= {
1269 .modes
= &nec_nl4827hc19_05b_mode
,
1276 .bus_format
= MEDIA_BUS_FMT_RGB888_1X24
,
1277 .bus_flags
= DRM_BUS_FLAG_PIXDATA_POSEDGE
,
1280 static const struct drm_display_mode nvd_9128_mode
= {
1283 .hsync_start
= 800 + 130,
1284 .hsync_end
= 800 + 130 + 98,
1285 .htotal
= 800 + 0 + 130 + 98,
1287 .vsync_start
= 480 + 10,
1288 .vsync_end
= 480 + 10 + 50,
1289 .vtotal
= 480 + 0 + 10 + 50,
1292 static const struct panel_desc nvd_9128
= {
1293 .modes
= &nvd_9128_mode
,
1300 .bus_format
= MEDIA_BUS_FMT_RGB888_1X7X4_SPWG
,
1303 static const struct display_timing okaya_rs800480t_7x0gp_timing
= {
1304 .pixelclock
= { 30000000, 30000000, 40000000 },
1305 .hactive
= { 800, 800, 800 },
1306 .hfront_porch
= { 40, 40, 40 },
1307 .hback_porch
= { 40, 40, 40 },
1308 .hsync_len
= { 1, 48, 48 },
1309 .vactive
= { 480, 480, 480 },
1310 .vfront_porch
= { 13, 13, 13 },
1311 .vback_porch
= { 29, 29, 29 },
1312 .vsync_len
= { 3, 3, 3 },
1313 .flags
= DISPLAY_FLAGS_DE_HIGH
,
1316 static const struct panel_desc okaya_rs800480t_7x0gp
= {
1317 .timings
= &okaya_rs800480t_7x0gp_timing
,
1330 .bus_format
= MEDIA_BUS_FMT_RGB666_1X18
,
1333 static const struct drm_display_mode olimex_lcd_olinuxino_43ts_mode
= {
1336 .hsync_start
= 480 + 5,
1337 .hsync_end
= 480 + 5 + 30,
1338 .htotal
= 480 + 5 + 30 + 10,
1340 .vsync_start
= 272 + 8,
1341 .vsync_end
= 272 + 8 + 5,
1342 .vtotal
= 272 + 8 + 5 + 3,
1346 static const struct panel_desc olimex_lcd_olinuxino_43ts
= {
1347 .modes
= &olimex_lcd_olinuxino_43ts_mode
,
1353 .bus_format
= MEDIA_BUS_FMT_RGB888_1X24
,
1357 * 800x480 CVT. The panel appears to be quite accepting, at least as far as
1358 * pixel clocks, but this is the timing that was being used in the Adafruit
1359 * installation instructions.
1361 static const struct drm_display_mode ontat_yx700wv03_mode
= {
1372 .flags
= DRM_MODE_FLAG_NVSYNC
| DRM_MODE_FLAG_NHSYNC
,
1377 * https://www.adafruit.com/images/product-files/2406/c3163.pdf
1379 static const struct panel_desc ontat_yx700wv03
= {
1380 .modes
= &ontat_yx700wv03_mode
,
1387 .bus_format
= MEDIA_BUS_FMT_RGB888_1X24
,
1390 static const struct drm_display_mode ortustech_com43h4m85ulc_mode
= {
1393 .hsync_start
= 480 + 10,
1394 .hsync_end
= 480 + 10 + 10,
1395 .htotal
= 480 + 10 + 10 + 15,
1397 .vsync_start
= 800 + 3,
1398 .vsync_end
= 800 + 3 + 3,
1399 .vtotal
= 800 + 3 + 3 + 3,
1403 static const struct panel_desc ortustech_com43h4m85ulc
= {
1404 .modes
= &ortustech_com43h4m85ulc_mode
,
1411 .bus_format
= MEDIA_BUS_FMT_RGB888_1X24
,
1412 .bus_flags
= DRM_BUS_FLAG_DE_HIGH
| DRM_BUS_FLAG_PIXDATA_POSEDGE
,
1415 static const struct drm_display_mode qd43003c0_40_mode
= {
1418 .hsync_start
= 480 + 8,
1419 .hsync_end
= 480 + 8 + 4,
1420 .htotal
= 480 + 8 + 4 + 39,
1422 .vsync_start
= 272 + 4,
1423 .vsync_end
= 272 + 4 + 10,
1424 .vtotal
= 272 + 4 + 10 + 2,
1428 static const struct panel_desc qd43003c0_40
= {
1429 .modes
= &qd43003c0_40_mode
,
1436 .bus_format
= MEDIA_BUS_FMT_RGB888_1X24
,
1439 static const struct drm_display_mode samsung_lsn122dl01_c01_mode
= {
1442 .hsync_start
= 2560 + 48,
1443 .hsync_end
= 2560 + 48 + 32,
1444 .htotal
= 2560 + 48 + 32 + 80,
1446 .vsync_start
= 1600 + 2,
1447 .vsync_end
= 1600 + 2 + 5,
1448 .vtotal
= 1600 + 2 + 5 + 57,
1452 static const struct panel_desc samsung_lsn122dl01_c01
= {
1453 .modes
= &samsung_lsn122dl01_c01_mode
,
1461 static const struct drm_display_mode samsung_ltn101nt05_mode
= {
1464 .hsync_start
= 1024 + 24,
1465 .hsync_end
= 1024 + 24 + 136,
1466 .htotal
= 1024 + 24 + 136 + 160,
1468 .vsync_start
= 600 + 3,
1469 .vsync_end
= 600 + 3 + 6,
1470 .vtotal
= 600 + 3 + 6 + 61,
1474 static const struct panel_desc samsung_ltn101nt05
= {
1475 .modes
= &samsung_ltn101nt05_mode
,
1484 static const struct drm_display_mode samsung_ltn140at29_301_mode
= {
1487 .hsync_start
= 1366 + 64,
1488 .hsync_end
= 1366 + 64 + 48,
1489 .htotal
= 1366 + 64 + 48 + 128,
1491 .vsync_start
= 768 + 2,
1492 .vsync_end
= 768 + 2 + 5,
1493 .vtotal
= 768 + 2 + 5 + 17,
1497 static const struct panel_desc samsung_ltn140at29_301
= {
1498 .modes
= &samsung_ltn140at29_301_mode
,
1507 static const struct display_timing sharp_lq101k1ly04_timing
= {
1508 .pixelclock
= { 60000000, 65000000, 80000000 },
1509 .hactive
= { 1280, 1280, 1280 },
1510 .hfront_porch
= { 20, 20, 20 },
1511 .hback_porch
= { 20, 20, 20 },
1512 .hsync_len
= { 10, 10, 10 },
1513 .vactive
= { 800, 800, 800 },
1514 .vfront_porch
= { 4, 4, 4 },
1515 .vback_porch
= { 4, 4, 4 },
1516 .vsync_len
= { 4, 4, 4 },
1517 .flags
= DISPLAY_FLAGS_PIXDATA_POSEDGE
,
1520 static const struct panel_desc sharp_lq101k1ly04
= {
1521 .timings
= &sharp_lq101k1ly04_timing
,
1528 .bus_format
= MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA
,
1531 static const struct drm_display_mode sharp_lq123p1jx31_mode
= {
1534 .hsync_start
= 2400 + 48,
1535 .hsync_end
= 2400 + 48 + 32,
1536 .htotal
= 2400 + 48 + 32 + 80,
1538 .vsync_start
= 1600 + 3,
1539 .vsync_end
= 1600 + 3 + 10,
1540 .vtotal
= 1600 + 3 + 10 + 33,
1542 .flags
= DRM_MODE_FLAG_NVSYNC
| DRM_MODE_FLAG_NHSYNC
,
1545 static const struct panel_desc sharp_lq123p1jx31
= {
1546 .modes
= &sharp_lq123p1jx31_mode
,
1560 static const struct drm_display_mode sharp_lq150x1lg11_mode
= {
1563 .hsync_start
= 1024 + 168,
1564 .hsync_end
= 1024 + 168 + 64,
1565 .htotal
= 1024 + 168 + 64 + 88,
1567 .vsync_start
= 768 + 37,
1568 .vsync_end
= 768 + 37 + 2,
1569 .vtotal
= 768 + 37 + 2 + 8,
1573 static const struct panel_desc sharp_lq150x1lg11
= {
1574 .modes
= &sharp_lq150x1lg11_mode
,
1581 .bus_format
= MEDIA_BUS_FMT_RGB565_1X16
,
1584 static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode
= {
1587 .hsync_start
= 800 + 1,
1588 .hsync_end
= 800 + 1 + 64,
1589 .htotal
= 800 + 1 + 64 + 64,
1591 .vsync_start
= 480 + 1,
1592 .vsync_end
= 480 + 1 + 23,
1593 .vtotal
= 480 + 1 + 23 + 22,
1597 static const struct panel_desc shelly_sca07010_bfn_lnn
= {
1598 .modes
= &shelly_sca07010_bfn_lnn_mode
,
1604 .bus_format
= MEDIA_BUS_FMT_RGB666_1X18
,
1607 static const struct drm_display_mode starry_kr122ea0sra_mode
= {
1610 .hsync_start
= 1920 + 16,
1611 .hsync_end
= 1920 + 16 + 16,
1612 .htotal
= 1920 + 16 + 16 + 32,
1614 .vsync_start
= 1200 + 15,
1615 .vsync_end
= 1200 + 15 + 2,
1616 .vtotal
= 1200 + 15 + 2 + 18,
1618 .flags
= DRM_MODE_FLAG_NVSYNC
| DRM_MODE_FLAG_NHSYNC
,
1621 static const struct panel_desc starry_kr122ea0sra
= {
1622 .modes
= &starry_kr122ea0sra_mode
,
1629 .prepare
= 10 + 200,
1631 .unprepare
= 10 + 500,
1635 static const struct drm_display_mode tpk_f07a_0102_mode
= {
1638 .hsync_start
= 800 + 40,
1639 .hsync_end
= 800 + 40 + 128,
1640 .htotal
= 800 + 40 + 128 + 88,
1642 .vsync_start
= 480 + 10,
1643 .vsync_end
= 480 + 10 + 2,
1644 .vtotal
= 480 + 10 + 2 + 33,
1648 static const struct panel_desc tpk_f07a_0102
= {
1649 .modes
= &tpk_f07a_0102_mode
,
1655 .bus_flags
= DRM_BUS_FLAG_PIXDATA_POSEDGE
,
1658 static const struct drm_display_mode tpk_f10a_0102_mode
= {
1661 .hsync_start
= 1024 + 176,
1662 .hsync_end
= 1024 + 176 + 5,
1663 .htotal
= 1024 + 176 + 5 + 88,
1665 .vsync_start
= 600 + 20,
1666 .vsync_end
= 600 + 20 + 5,
1667 .vtotal
= 600 + 20 + 5 + 25,
1671 static const struct panel_desc tpk_f10a_0102
= {
1672 .modes
= &tpk_f10a_0102_mode
,
1680 static const struct display_timing urt_umsh_8596md_timing
= {
1681 .pixelclock
= { 33260000, 33260000, 33260000 },
1682 .hactive
= { 800, 800, 800 },
1683 .hfront_porch
= { 41, 41, 41 },
1684 .hback_porch
= { 216 - 128, 216 - 128, 216 - 128 },
1685 .hsync_len
= { 71, 128, 128 },
1686 .vactive
= { 480, 480, 480 },
1687 .vfront_porch
= { 10, 10, 10 },
1688 .vback_porch
= { 35 - 2, 35 - 2, 35 - 2 },
1689 .vsync_len
= { 2, 2, 2 },
1690 .flags
= DISPLAY_FLAGS_DE_HIGH
| DISPLAY_FLAGS_PIXDATA_NEGEDGE
|
1691 DISPLAY_FLAGS_HSYNC_LOW
| DISPLAY_FLAGS_VSYNC_LOW
,
1694 static const struct panel_desc urt_umsh_8596md_lvds
= {
1695 .timings
= &urt_umsh_8596md_timing
,
1702 .bus_format
= MEDIA_BUS_FMT_RGB666_1X7X3_SPWG
,
1705 static const struct panel_desc urt_umsh_8596md_parallel
= {
1706 .timings
= &urt_umsh_8596md_timing
,
1713 .bus_format
= MEDIA_BUS_FMT_RGB666_1X18
,
1716 static const struct of_device_id platform_of_match
[] = {
1718 .compatible
= "ampire,am800480r3tmqwa1h",
1719 .data
= &ire_am800480r3tmqwa1h
,
1721 .compatible
= "auo,b101aw03",
1722 .data
= &auo_b101aw03
,
1724 .compatible
= "auo,b101ean01",
1725 .data
= &auo_b101ean01
,
1727 .compatible
= "auo,b101xtn01",
1728 .data
= &auo_b101xtn01
,
1730 .compatible
= "auo,b116xw03",
1731 .data
= &auo_b116xw03
,
1733 .compatible
= "auo,b133htn01",
1734 .data
= &auo_b133htn01
,
1736 .compatible
= "auo,b133xtn01",
1737 .data
= &auo_b133xtn01
,
1739 .compatible
= "auo,g133han01",
1740 .data
= &auo_g133han01
,
1742 .compatible
= "auo,g185han01",
1743 .data
= &auo_g185han01
,
1745 .compatible
= "auo,t215hvn01",
1746 .data
= &auo_t215hvn01
,
1748 .compatible
= "avic,tm070ddh03",
1749 .data
= &avic_tm070ddh03
,
1751 .compatible
= "chunghwa,claa070wp03xg",
1752 .data
= &chunghwa_claa070wp03xg
,
1754 .compatible
= "chunghwa,claa101wa01a",
1755 .data
= &chunghwa_claa101wa01a
1757 .compatible
= "chunghwa,claa101wb01",
1758 .data
= &chunghwa_claa101wb01
1760 .compatible
= "edt,et057090dhu",
1761 .data
= &edt_et057090dhu
,
1763 .compatible
= "edt,et070080dh6",
1764 .data
= &edt_etm0700g0dh6
,
1766 .compatible
= "edt,etm0700g0dh6",
1767 .data
= &edt_etm0700g0dh6
,
1769 .compatible
= "foxlink,fl500wvr00-a0t",
1770 .data
= &foxlink_fl500wvr00_a0t
,
1772 .compatible
= "giantplus,gpg482739qs5",
1773 .data
= &giantplus_gpg482739qs5
1775 .compatible
= "hannstar,hsd070pww1",
1776 .data
= &hannstar_hsd070pww1
,
1778 .compatible
= "hannstar,hsd100pxn1",
1779 .data
= &hannstar_hsd100pxn1
,
1781 .compatible
= "hit,tx23d38vm0caa",
1782 .data
= &hitachi_tx23d38vm0caa
1784 .compatible
= "innolux,at043tn24",
1785 .data
= &innolux_at043tn24
,
1787 .compatible
= "innolux,at070tn92",
1788 .data
= &innolux_at070tn92
,
1790 .compatible
="innolux,g101ice-l01",
1791 .data
= &innolux_g101ice_l01
1793 .compatible
="innolux,g121i1-l01",
1794 .data
= &innolux_g121i1_l01
1796 .compatible
= "innolux,g121x1-l03",
1797 .data
= &innolux_g121x1_l03
,
1799 .compatible
= "innolux,n116bge",
1800 .data
= &innolux_n116bge
,
1802 .compatible
= "innolux,n156bge-l21",
1803 .data
= &innolux_n156bge_l21
,
1805 .compatible
= "innolux,zj070na-01p",
1806 .data
= &innolux_zj070na_01p
,
1808 .compatible
= "kyo,tcg121xglp",
1809 .data
= &kyo_tcg121xglp
,
1811 .compatible
= "lg,lb070wv8",
1812 .data
= &lg_lb070wv8
,
1814 .compatible
= "lg,lp079qx1-sp0v",
1815 .data
= &lg_lp079qx1_sp0v
,
1817 .compatible
= "lg,lp097qx1-spa1",
1818 .data
= &lg_lp097qx1_spa1
,
1820 .compatible
= "lg,lp120up1",
1821 .data
= &lg_lp120up1
,
1823 .compatible
= "lg,lp129qe",
1824 .data
= &lg_lp129qe
,
1826 .compatible
= "nec,nl4827hc19-05b",
1827 .data
= &nec_nl4827hc19_05b
,
1829 .compatible
= "nvd,9128",
1832 .compatible
= "okaya,rs800480t-7x0gp",
1833 .data
= &okaya_rs800480t_7x0gp
,
1835 .compatible
= "olimex,lcd-olinuxino-43-ts",
1836 .data
= &olimex_lcd_olinuxino_43ts
,
1838 .compatible
= "ontat,yx700wv03",
1839 .data
= &ontat_yx700wv03
,
1841 .compatible
= "ortustech,com43h4m85ulc",
1842 .data
= &ortustech_com43h4m85ulc
,
1844 .compatible
= "qiaodian,qd43003c0-40",
1845 .data
= &qd43003c0_40
,
1847 .compatible
= "samsung,lsn122dl01-c01",
1848 .data
= &samsung_lsn122dl01_c01
,
1850 .compatible
= "samsung,ltn101nt05",
1851 .data
= &samsung_ltn101nt05
,
1853 .compatible
= "samsung,ltn140at29-301",
1854 .data
= &samsung_ltn140at29_301
,
1856 .compatible
= "sharp,lq101k1ly04",
1857 .data
= &sharp_lq101k1ly04
,
1859 .compatible
= "sharp,lq123p1jx31",
1860 .data
= &sharp_lq123p1jx31
,
1862 .compatible
= "sharp,lq150x1lg11",
1863 .data
= &sharp_lq150x1lg11
,
1865 .compatible
= "shelly,sca07010-bfn-lnn",
1866 .data
= &shelly_sca07010_bfn_lnn
,
1868 .compatible
= "starry,kr122ea0sra",
1869 .data
= &starry_kr122ea0sra
,
1871 .compatible
= "tpk,f07a-0102",
1872 .data
= &tpk_f07a_0102
,
1874 .compatible
= "tpk,f10a-0102",
1875 .data
= &tpk_f10a_0102
,
1877 .compatible
= "urt,umsh-8596md-t",
1878 .data
= &urt_umsh_8596md_parallel
,
1880 .compatible
= "urt,umsh-8596md-1t",
1881 .data
= &urt_umsh_8596md_parallel
,
1883 .compatible
= "urt,umsh-8596md-7t",
1884 .data
= &urt_umsh_8596md_parallel
,
1886 .compatible
= "urt,umsh-8596md-11t",
1887 .data
= &urt_umsh_8596md_lvds
,
1889 .compatible
= "urt,umsh-8596md-19t",
1890 .data
= &urt_umsh_8596md_lvds
,
1892 .compatible
= "urt,umsh-8596md-20t",
1893 .data
= &urt_umsh_8596md_parallel
,
1898 MODULE_DEVICE_TABLE(of
, platform_of_match
);
1900 static int panel_simple_platform_probe(struct platform_device
*pdev
)
1902 const struct of_device_id
*id
;
1904 id
= of_match_node(platform_of_match
, pdev
->dev
.of_node
);
1908 return panel_simple_probe(&pdev
->dev
, id
->data
);
1911 static int panel_simple_platform_remove(struct platform_device
*pdev
)
1913 return panel_simple_remove(&pdev
->dev
);
1916 static void panel_simple_platform_shutdown(struct platform_device
*pdev
)
1918 panel_simple_shutdown(&pdev
->dev
);
1921 static struct platform_driver panel_simple_platform_driver
= {
1923 .name
= "panel-simple",
1924 .of_match_table
= platform_of_match
,
1926 .probe
= panel_simple_platform_probe
,
1927 .remove
= panel_simple_platform_remove
,
1928 .shutdown
= panel_simple_platform_shutdown
,
1931 struct panel_desc_dsi
{
1932 struct panel_desc desc
;
1934 unsigned long flags
;
1935 enum mipi_dsi_pixel_format format
;
1939 static const struct drm_display_mode auo_b080uan01_mode
= {
1942 .hsync_start
= 1200 + 62,
1943 .hsync_end
= 1200 + 62 + 4,
1944 .htotal
= 1200 + 62 + 4 + 62,
1946 .vsync_start
= 1920 + 9,
1947 .vsync_end
= 1920 + 9 + 2,
1948 .vtotal
= 1920 + 9 + 2 + 8,
1952 static const struct panel_desc_dsi auo_b080uan01
= {
1954 .modes
= &auo_b080uan01_mode
,
1962 .flags
= MIPI_DSI_MODE_VIDEO
| MIPI_DSI_CLOCK_NON_CONTINUOUS
,
1963 .format
= MIPI_DSI_FMT_RGB888
,
1967 static const struct drm_display_mode boe_tv080wum_nl0_mode
= {
1970 .hsync_start
= 1200 + 120,
1971 .hsync_end
= 1200 + 120 + 20,
1972 .htotal
= 1200 + 120 + 20 + 21,
1974 .vsync_start
= 1920 + 21,
1975 .vsync_end
= 1920 + 21 + 3,
1976 .vtotal
= 1920 + 21 + 3 + 18,
1978 .flags
= DRM_MODE_FLAG_NVSYNC
| DRM_MODE_FLAG_NHSYNC
,
1981 static const struct panel_desc_dsi boe_tv080wum_nl0
= {
1983 .modes
= &boe_tv080wum_nl0_mode
,
1990 .flags
= MIPI_DSI_MODE_VIDEO
|
1991 MIPI_DSI_MODE_VIDEO_BURST
|
1992 MIPI_DSI_MODE_VIDEO_SYNC_PULSE
,
1993 .format
= MIPI_DSI_FMT_RGB888
,
1997 static const struct drm_display_mode lg_ld070wx3_sl01_mode
= {
2000 .hsync_start
= 800 + 32,
2001 .hsync_end
= 800 + 32 + 1,
2002 .htotal
= 800 + 32 + 1 + 57,
2004 .vsync_start
= 1280 + 28,
2005 .vsync_end
= 1280 + 28 + 1,
2006 .vtotal
= 1280 + 28 + 1 + 14,
2010 static const struct panel_desc_dsi lg_ld070wx3_sl01
= {
2012 .modes
= &lg_ld070wx3_sl01_mode
,
2020 .flags
= MIPI_DSI_MODE_VIDEO
| MIPI_DSI_CLOCK_NON_CONTINUOUS
,
2021 .format
= MIPI_DSI_FMT_RGB888
,
2025 static const struct drm_display_mode lg_lh500wx1_sd03_mode
= {
2028 .hsync_start
= 720 + 12,
2029 .hsync_end
= 720 + 12 + 4,
2030 .htotal
= 720 + 12 + 4 + 112,
2032 .vsync_start
= 1280 + 8,
2033 .vsync_end
= 1280 + 8 + 4,
2034 .vtotal
= 1280 + 8 + 4 + 12,
2038 static const struct panel_desc_dsi lg_lh500wx1_sd03
= {
2040 .modes
= &lg_lh500wx1_sd03_mode
,
2048 .flags
= MIPI_DSI_MODE_VIDEO
,
2049 .format
= MIPI_DSI_FMT_RGB888
,
2053 static const struct drm_display_mode panasonic_vvx10f004b00_mode
= {
2056 .hsync_start
= 1920 + 154,
2057 .hsync_end
= 1920 + 154 + 16,
2058 .htotal
= 1920 + 154 + 16 + 32,
2060 .vsync_start
= 1200 + 17,
2061 .vsync_end
= 1200 + 17 + 2,
2062 .vtotal
= 1200 + 17 + 2 + 16,
2066 static const struct panel_desc_dsi panasonic_vvx10f004b00
= {
2068 .modes
= &panasonic_vvx10f004b00_mode
,
2076 .flags
= MIPI_DSI_MODE_VIDEO
| MIPI_DSI_MODE_VIDEO_SYNC_PULSE
|
2077 MIPI_DSI_CLOCK_NON_CONTINUOUS
,
2078 .format
= MIPI_DSI_FMT_RGB888
,
2082 static const struct of_device_id dsi_of_match
[] = {
2084 .compatible
= "auo,b080uan01",
2085 .data
= &auo_b080uan01
2087 .compatible
= "boe,tv080wum-nl0",
2088 .data
= &boe_tv080wum_nl0
2090 .compatible
= "lg,ld070wx3-sl01",
2091 .data
= &lg_ld070wx3_sl01
2093 .compatible
= "lg,lh500wx1-sd03",
2094 .data
= &lg_lh500wx1_sd03
2096 .compatible
= "panasonic,vvx10f004b00",
2097 .data
= &panasonic_vvx10f004b00
2102 MODULE_DEVICE_TABLE(of
, dsi_of_match
);
2104 static int panel_simple_dsi_probe(struct mipi_dsi_device
*dsi
)
2106 const struct panel_desc_dsi
*desc
;
2107 const struct of_device_id
*id
;
2110 id
= of_match_node(dsi_of_match
, dsi
->dev
.of_node
);
2116 err
= panel_simple_probe(&dsi
->dev
, &desc
->desc
);
2120 dsi
->mode_flags
= desc
->flags
;
2121 dsi
->format
= desc
->format
;
2122 dsi
->lanes
= desc
->lanes
;
2124 return mipi_dsi_attach(dsi
);
2127 static int panel_simple_dsi_remove(struct mipi_dsi_device
*dsi
)
2131 err
= mipi_dsi_detach(dsi
);
2133 dev_err(&dsi
->dev
, "failed to detach from DSI host: %d\n", err
);
2135 return panel_simple_remove(&dsi
->dev
);
2138 static void panel_simple_dsi_shutdown(struct mipi_dsi_device
*dsi
)
2140 panel_simple_shutdown(&dsi
->dev
);
2143 static struct mipi_dsi_driver panel_simple_dsi_driver
= {
2145 .name
= "panel-simple-dsi",
2146 .of_match_table
= dsi_of_match
,
2148 .probe
= panel_simple_dsi_probe
,
2149 .remove
= panel_simple_dsi_remove
,
2150 .shutdown
= panel_simple_dsi_shutdown
,
2153 static int __init
panel_simple_init(void)
2157 err
= platform_driver_register(&panel_simple_platform_driver
);
2161 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI
)) {
2162 err
= mipi_dsi_driver_register(&panel_simple_dsi_driver
);
2169 module_init(panel_simple_init
);
2171 static void __exit
panel_simple_exit(void)
2173 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI
))
2174 mipi_dsi_driver_unregister(&panel_simple_dsi_driver
);
2176 platform_driver_unregister(&panel_simple_platform_driver
);
2178 module_exit(panel_simple_exit
);
2180 MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>");
2181 MODULE_DESCRIPTION("DRM Driver for Simple Panels");
2182 MODULE_LICENSE("GPL and additional rights");