blob: 3b226ad8acadd22269916a4b90bf1aff9eb660a4 [file] [log] [blame]
Thierry Reding280921d2013-08-30 15:10:14 +02001/*
2 * Copyright (C) 2013, NVIDIA Corporation. All rights reserved.
3 *
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:
10 *
11 * The above copyright notice and this permission notice (including the
12 * next paragraph) shall be included in all copies or substantial portions
13 * of the Software.
14 *
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.
22 */
23
24#include <linux/backlight.h>
Alexandre Courbotcfdf0542014-03-01 14:00:58 +090025#include <linux/gpio/consumer.h>
Thierry Reding280921d2013-08-30 15:10:14 +020026#include <linux/module.h>
Thierry Reding280921d2013-08-30 15:10:14 +020027#include <linux/of_platform.h>
28#include <linux/platform_device.h>
29#include <linux/regulator/consumer.h>
30
31#include <drm/drmP.h>
32#include <drm/drm_crtc.h>
Thierry Reding210fcd92013-11-22 19:27:11 +010033#include <drm/drm_mipi_dsi.h>
Thierry Reding280921d2013-08-30 15:10:14 +020034#include <drm/drm_panel.h>
35
Philipp Zabela5d3e622014-12-11 18:32:45 +010036#include <video/display_timing.h>
37#include <video/videomode.h>
38
Thierry Reding280921d2013-08-30 15:10:14 +020039struct panel_desc {
40 const struct drm_display_mode *modes;
41 unsigned int num_modes;
Philipp Zabela5d3e622014-12-11 18:32:45 +010042 const struct display_timing *timings;
43 unsigned int num_timings;
Thierry Reding280921d2013-08-30 15:10:14 +020044
Stéphane Marchesin0208d512014-06-19 18:18:28 -070045 unsigned int bpc;
46
Ulrich Ölmann85533e32015-12-04 12:31:28 +010047 /**
48 * @width: width (in millimeters) of the panel's active display area
49 * @height: height (in millimeters) of the panel's active display area
50 */
Thierry Reding280921d2013-08-30 15:10:14 +020051 struct {
52 unsigned int width;
53 unsigned int height;
54 } size;
Ajay Kumarf673c372014-07-31 23:12:11 +053055
56 /**
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
61 * video data
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
66 */
67 struct {
68 unsigned int prepare;
69 unsigned int enable;
70 unsigned int disable;
71 unsigned int unprepare;
72 } delay;
Boris Brezillon795f7ab2014-07-22 13:33:59 +020073
74 u32 bus_format;
Stefan Agnerf0aa0832016-02-08 11:38:14 -080075 u32 bus_flags;
Thierry Reding280921d2013-08-30 15:10:14 +020076};
77
Thierry Reding280921d2013-08-30 15:10:14 +020078struct panel_simple {
79 struct drm_panel base;
Ajay Kumar613a6332014-07-31 23:12:10 +053080 bool prepared;
Thierry Reding280921d2013-08-30 15:10:14 +020081 bool enabled;
82
83 const struct panel_desc *desc;
84
85 struct backlight_device *backlight;
86 struct regulator *supply;
87 struct i2c_adapter *ddc;
88
Alexandre Courbotcfdf0542014-03-01 14:00:58 +090089 struct gpio_desc *enable_gpio;
Thierry Reding280921d2013-08-30 15:10:14 +020090};
91
92static inline struct panel_simple *to_panel_simple(struct drm_panel *panel)
93{
94 return container_of(panel, struct panel_simple, base);
95}
96
97static int panel_simple_get_fixed_modes(struct panel_simple *panel)
98{
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;
103
104 if (!panel->desc)
105 return 0;
106
Philipp Zabela5d3e622014-12-11 18:32:45 +0100107 for (i = 0; i < panel->desc->num_timings; i++) {
108 const struct display_timing *dt = &panel->desc->timings[i];
109 struct videomode vm;
110
111 videomode_from_timing(dt, &vm);
112 mode = drm_mode_create(drm);
113 if (!mode) {
114 dev_err(drm->dev, "failed to add mode %ux%u\n",
115 dt->hactive.typ, dt->vactive.typ);
116 continue;
117 }
118
119 drm_display_mode_from_videomode(&vm, mode);
Boris Brezilloncda55372016-04-15 18:23:33 +0200120
121 mode->type |= DRM_MODE_TYPE_DRIVER;
122
Chen-Yu Tsai230c5b42016-10-24 21:21:15 +0800123 if (panel->desc->num_timings == 1)
Boris Brezilloncda55372016-04-15 18:23:33 +0200124 mode->type |= DRM_MODE_TYPE_PREFERRED;
125
Philipp Zabela5d3e622014-12-11 18:32:45 +0100126 drm_mode_probed_add(connector, mode);
127 num++;
128 }
129
Thierry Reding280921d2013-08-30 15:10:14 +0200130 for (i = 0; i < panel->desc->num_modes; i++) {
131 const struct drm_display_mode *m = &panel->desc->modes[i];
132
133 mode = drm_mode_duplicate(drm, m);
134 if (!mode) {
135 dev_err(drm->dev, "failed to add mode %ux%u@%u\n",
136 m->hdisplay, m->vdisplay, m->vrefresh);
137 continue;
138 }
139
Boris Brezilloncda55372016-04-15 18:23:33 +0200140 mode->type |= DRM_MODE_TYPE_DRIVER;
141
142 if (panel->desc->num_modes == 1)
143 mode->type |= DRM_MODE_TYPE_PREFERRED;
144
Thierry Reding280921d2013-08-30 15:10:14 +0200145 drm_mode_set_name(mode);
146
147 drm_mode_probed_add(connector, mode);
148 num++;
149 }
150
Stéphane Marchesin0208d512014-06-19 18:18:28 -0700151 connector->display_info.bpc = panel->desc->bpc;
Thierry Reding280921d2013-08-30 15:10:14 +0200152 connector->display_info.width_mm = panel->desc->size.width;
153 connector->display_info.height_mm = panel->desc->size.height;
Boris Brezillon795f7ab2014-07-22 13:33:59 +0200154 if (panel->desc->bus_format)
155 drm_display_info_set_bus_formats(&connector->display_info,
156 &panel->desc->bus_format, 1);
Stefan Agnerf0aa0832016-02-08 11:38:14 -0800157 connector->display_info.bus_flags = panel->desc->bus_flags;
Thierry Reding280921d2013-08-30 15:10:14 +0200158
159 return num;
160}
161
162static int panel_simple_disable(struct drm_panel *panel)
163{
164 struct panel_simple *p = to_panel_simple(panel);
165
166 if (!p->enabled)
167 return 0;
168
169 if (p->backlight) {
170 p->backlight->props.power = FB_BLANK_POWERDOWN;
Thierry Redinge4aa3422016-06-17 19:11:53 +0200171 p->backlight->props.state |= BL_CORE_FBBLANK;
Thierry Reding280921d2013-08-30 15:10:14 +0200172 backlight_update_status(p->backlight);
173 }
174
Ajay Kumarf673c372014-07-31 23:12:11 +0530175 if (p->desc->delay.disable)
176 msleep(p->desc->delay.disable);
177
Thierry Reding280921d2013-08-30 15:10:14 +0200178 p->enabled = false;
179
180 return 0;
181}
182
Ajay Kumarc0e1d172014-07-31 23:12:04 +0530183static int panel_simple_unprepare(struct drm_panel *panel)
184{
Ajay Kumar613a6332014-07-31 23:12:10 +0530185 struct panel_simple *p = to_panel_simple(panel);
186
187 if (!p->prepared)
188 return 0;
189
Fabio Estevam756b9182017-07-16 21:05:39 -0300190 gpiod_set_value_cansleep(p->enable_gpio, 0);
Ajay Kumar613a6332014-07-31 23:12:10 +0530191
192 regulator_disable(p->supply);
193
Ajay Kumarf673c372014-07-31 23:12:11 +0530194 if (p->desc->delay.unprepare)
195 msleep(p->desc->delay.unprepare);
196
Ajay Kumar613a6332014-07-31 23:12:10 +0530197 p->prepared = false;
198
Ajay Kumarc0e1d172014-07-31 23:12:04 +0530199 return 0;
200}
201
202static int panel_simple_prepare(struct drm_panel *panel)
203{
Thierry Reding280921d2013-08-30 15:10:14 +0200204 struct panel_simple *p = to_panel_simple(panel);
205 int err;
206
Ajay Kumar613a6332014-07-31 23:12:10 +0530207 if (p->prepared)
Thierry Reding280921d2013-08-30 15:10:14 +0200208 return 0;
209
210 err = regulator_enable(p->supply);
211 if (err < 0) {
212 dev_err(panel->dev, "failed to enable supply: %d\n", err);
213 return err;
214 }
215
Fabio Estevam756b9182017-07-16 21:05:39 -0300216 gpiod_set_value_cansleep(p->enable_gpio, 1);
Thierry Reding280921d2013-08-30 15:10:14 +0200217
Ajay Kumarf673c372014-07-31 23:12:11 +0530218 if (p->desc->delay.prepare)
219 msleep(p->desc->delay.prepare);
220
Ajay Kumar613a6332014-07-31 23:12:10 +0530221 p->prepared = true;
222
223 return 0;
224}
225
226static int panel_simple_enable(struct drm_panel *panel)
227{
228 struct panel_simple *p = to_panel_simple(panel);
229
230 if (p->enabled)
231 return 0;
232
Ajay Kumarf673c372014-07-31 23:12:11 +0530233 if (p->desc->delay.enable)
234 msleep(p->desc->delay.enable);
235
Thierry Reding280921d2013-08-30 15:10:14 +0200236 if (p->backlight) {
Thierry Redinge4aa3422016-06-17 19:11:53 +0200237 p->backlight->props.state &= ~BL_CORE_FBBLANK;
Thierry Reding280921d2013-08-30 15:10:14 +0200238 p->backlight->props.power = FB_BLANK_UNBLANK;
239 backlight_update_status(p->backlight);
240 }
241
242 p->enabled = true;
243
244 return 0;
245}
246
247static int panel_simple_get_modes(struct drm_panel *panel)
248{
249 struct panel_simple *p = to_panel_simple(panel);
250 int num = 0;
251
252 /* probe EDID if a DDC bus is available */
253 if (p->ddc) {
254 struct edid *edid = drm_get_edid(panel->connector, p->ddc);
Stephen Warren70bf6872014-01-09 11:37:34 -0700255 drm_mode_connector_update_edid_property(panel->connector, edid);
Thierry Reding280921d2013-08-30 15:10:14 +0200256 if (edid) {
257 num += drm_add_edid_modes(panel->connector, edid);
258 kfree(edid);
259 }
260 }
261
262 /* add hard-coded panel modes */
263 num += panel_simple_get_fixed_modes(p);
264
265 return num;
266}
267
Philipp Zabela5d3e622014-12-11 18:32:45 +0100268static int panel_simple_get_timings(struct drm_panel *panel,
269 unsigned int num_timings,
270 struct display_timing *timings)
271{
272 struct panel_simple *p = to_panel_simple(panel);
273 unsigned int i;
274
275 if (p->desc->num_timings < num_timings)
276 num_timings = p->desc->num_timings;
277
278 if (timings)
279 for (i = 0; i < num_timings; i++)
280 timings[i] = p->desc->timings[i];
281
282 return p->desc->num_timings;
283}
284
Thierry Reding280921d2013-08-30 15:10:14 +0200285static const struct drm_panel_funcs panel_simple_funcs = {
286 .disable = panel_simple_disable,
Ajay Kumarc0e1d172014-07-31 23:12:04 +0530287 .unprepare = panel_simple_unprepare,
288 .prepare = panel_simple_prepare,
Thierry Reding280921d2013-08-30 15:10:14 +0200289 .enable = panel_simple_enable,
290 .get_modes = panel_simple_get_modes,
Philipp Zabela5d3e622014-12-11 18:32:45 +0100291 .get_timings = panel_simple_get_timings,
Thierry Reding280921d2013-08-30 15:10:14 +0200292};
293
294static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
295{
296 struct device_node *backlight, *ddc;
297 struct panel_simple *panel;
Thierry Reding280921d2013-08-30 15:10:14 +0200298 int err;
299
300 panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL);
301 if (!panel)
302 return -ENOMEM;
303
304 panel->enabled = false;
Ajay Kumar613a6332014-07-31 23:12:10 +0530305 panel->prepared = false;
Thierry Reding280921d2013-08-30 15:10:14 +0200306 panel->desc = desc;
307
308 panel->supply = devm_regulator_get(dev, "power");
309 if (IS_ERR(panel->supply))
310 return PTR_ERR(panel->supply);
311
Alexandre Courbota61400d2014-10-23 17:16:58 +0900312 panel->enable_gpio = devm_gpiod_get_optional(dev, "enable",
313 GPIOD_OUT_LOW);
Alexandre Courbotcfdf0542014-03-01 14:00:58 +0900314 if (IS_ERR(panel->enable_gpio)) {
315 err = PTR_ERR(panel->enable_gpio);
Fabio Estevamb8e93802017-06-30 18:14:46 -0300316 if (err != -EPROBE_DEFER)
317 dev_err(dev, "failed to request GPIO: %d\n", err);
Alexandre Courbot9746c612014-07-25 23:47:25 +0900318 return err;
319 }
Thierry Reding280921d2013-08-30 15:10:14 +0200320
Thierry Reding280921d2013-08-30 15:10:14 +0200321 backlight = of_parse_phandle(dev->of_node, "backlight", 0);
322 if (backlight) {
323 panel->backlight = of_find_backlight_by_node(backlight);
324 of_node_put(backlight);
325
Alexandre Courbotcfdf0542014-03-01 14:00:58 +0900326 if (!panel->backlight)
327 return -EPROBE_DEFER;
Thierry Reding280921d2013-08-30 15:10:14 +0200328 }
329
330 ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0);
331 if (ddc) {
332 panel->ddc = of_find_i2c_adapter_by_node(ddc);
333 of_node_put(ddc);
334
335 if (!panel->ddc) {
336 err = -EPROBE_DEFER;
337 goto free_backlight;
338 }
339 }
340
341 drm_panel_init(&panel->base);
342 panel->base.dev = dev;
343 panel->base.funcs = &panel_simple_funcs;
344
345 err = drm_panel_add(&panel->base);
346 if (err < 0)
347 goto free_ddc;
348
349 dev_set_drvdata(dev, panel);
350
351 return 0;
352
353free_ddc:
354 if (panel->ddc)
355 put_device(&panel->ddc->dev);
356free_backlight:
357 if (panel->backlight)
358 put_device(&panel->backlight->dev);
Thierry Reding280921d2013-08-30 15:10:14 +0200359
360 return err;
361}
362
363static int panel_simple_remove(struct device *dev)
364{
365 struct panel_simple *panel = dev_get_drvdata(dev);
366
Thierry Reding280921d2013-08-30 15:10:14 +0200367 drm_panel_remove(&panel->base);
368
369 panel_simple_disable(&panel->base);
Jonathan Liuf3621a82017-08-07 21:55:45 +1000370 panel_simple_unprepare(&panel->base);
Thierry Reding280921d2013-08-30 15:10:14 +0200371
372 if (panel->ddc)
373 put_device(&panel->ddc->dev);
374
375 if (panel->backlight)
376 put_device(&panel->backlight->dev);
377
Thierry Reding280921d2013-08-30 15:10:14 +0200378 return 0;
379}
380
Thierry Redingd02fd932014-04-29 17:21:21 +0200381static void panel_simple_shutdown(struct device *dev)
382{
383 struct panel_simple *panel = dev_get_drvdata(dev);
384
385 panel_simple_disable(&panel->base);
Jonathan Liuf3621a82017-08-07 21:55:45 +1000386 panel_simple_unprepare(&panel->base);
Thierry Redingd02fd932014-04-29 17:21:21 +0200387}
388
Yannick Fertre966fea72017-03-28 11:44:49 +0200389static const struct drm_display_mode ampire_am_480272h3tmqw_t01h_mode = {
390 .clock = 9000,
391 .hdisplay = 480,
392 .hsync_start = 480 + 2,
393 .hsync_end = 480 + 2 + 41,
394 .htotal = 480 + 2 + 41 + 2,
395 .vdisplay = 272,
396 .vsync_start = 272 + 2,
397 .vsync_end = 272 + 2 + 10,
398 .vtotal = 272 + 2 + 10 + 2,
399 .vrefresh = 60,
400 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
401};
402
403static const struct panel_desc ampire_am_480272h3tmqw_t01h = {
404 .modes = &ampire_am_480272h3tmqw_t01h_mode,
405 .num_modes = 1,
406 .bpc = 8,
407 .size = {
408 .width = 105,
409 .height = 67,
410 },
411 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
412};
413
Philipp Zabel1c550fa12015-02-11 18:50:09 +0100414static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = {
415 .clock = 33333,
416 .hdisplay = 800,
417 .hsync_start = 800 + 0,
418 .hsync_end = 800 + 0 + 255,
419 .htotal = 800 + 0 + 255 + 0,
420 .vdisplay = 480,
421 .vsync_start = 480 + 2,
422 .vsync_end = 480 + 2 + 45,
423 .vtotal = 480 + 2 + 45 + 0,
424 .vrefresh = 60,
425 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
426};
427
428static const struct panel_desc ampire_am800480r3tmqwa1h = {
429 .modes = &ampire_am800480r3tmqwa1h_mode,
430 .num_modes = 1,
431 .bpc = 6,
432 .size = {
433 .width = 152,
434 .height = 91,
435 },
436 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
437};
438
Thierry Reding280921d2013-08-30 15:10:14 +0200439static const struct drm_display_mode auo_b101aw03_mode = {
440 .clock = 51450,
441 .hdisplay = 1024,
442 .hsync_start = 1024 + 156,
443 .hsync_end = 1024 + 156 + 8,
444 .htotal = 1024 + 156 + 8 + 156,
445 .vdisplay = 600,
446 .vsync_start = 600 + 16,
447 .vsync_end = 600 + 16 + 6,
448 .vtotal = 600 + 16 + 6 + 16,
449 .vrefresh = 60,
450};
451
452static const struct panel_desc auo_b101aw03 = {
453 .modes = &auo_b101aw03_mode,
454 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -0700455 .bpc = 6,
Thierry Reding280921d2013-08-30 15:10:14 +0200456 .size = {
457 .width = 223,
458 .height = 125,
459 },
460};
461
Huang Lina531bc32015-02-28 10:18:58 +0800462static const struct drm_display_mode auo_b101ean01_mode = {
463 .clock = 72500,
464 .hdisplay = 1280,
465 .hsync_start = 1280 + 119,
466 .hsync_end = 1280 + 119 + 32,
467 .htotal = 1280 + 119 + 32 + 21,
468 .vdisplay = 800,
469 .vsync_start = 800 + 4,
470 .vsync_end = 800 + 4 + 20,
471 .vtotal = 800 + 4 + 20 + 8,
472 .vrefresh = 60,
473};
474
475static const struct panel_desc auo_b101ean01 = {
476 .modes = &auo_b101ean01_mode,
477 .num_modes = 1,
478 .bpc = 6,
479 .size = {
480 .width = 217,
481 .height = 136,
482 },
483};
484
Rob Clarkdac746e2014-08-01 17:01:06 -0400485static const struct drm_display_mode auo_b101xtn01_mode = {
486 .clock = 72000,
487 .hdisplay = 1366,
488 .hsync_start = 1366 + 20,
489 .hsync_end = 1366 + 20 + 70,
490 .htotal = 1366 + 20 + 70,
491 .vdisplay = 768,
492 .vsync_start = 768 + 14,
493 .vsync_end = 768 + 14 + 42,
494 .vtotal = 768 + 14 + 42,
495 .vrefresh = 60,
496 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
497};
498
499static const struct panel_desc auo_b101xtn01 = {
500 .modes = &auo_b101xtn01_mode,
501 .num_modes = 1,
502 .bpc = 6,
503 .size = {
504 .width = 223,
505 .height = 125,
506 },
507};
508
Ajay Kumare35e3052014-09-01 15:40:02 +0530509static const struct drm_display_mode auo_b116xw03_mode = {
510 .clock = 70589,
511 .hdisplay = 1366,
512 .hsync_start = 1366 + 40,
513 .hsync_end = 1366 + 40 + 40,
514 .htotal = 1366 + 40 + 40 + 32,
515 .vdisplay = 768,
516 .vsync_start = 768 + 10,
517 .vsync_end = 768 + 10 + 12,
518 .vtotal = 768 + 10 + 12 + 6,
519 .vrefresh = 60,
520};
521
522static const struct panel_desc auo_b116xw03 = {
523 .modes = &auo_b116xw03_mode,
524 .num_modes = 1,
525 .bpc = 6,
526 .size = {
527 .width = 256,
528 .height = 144,
529 },
530};
531
Stéphane Marchesina333f7a2014-05-23 19:27:59 -0700532static const struct drm_display_mode auo_b133xtn01_mode = {
533 .clock = 69500,
534 .hdisplay = 1366,
535 .hsync_start = 1366 + 48,
536 .hsync_end = 1366 + 48 + 32,
537 .htotal = 1366 + 48 + 32 + 20,
538 .vdisplay = 768,
539 .vsync_start = 768 + 3,
540 .vsync_end = 768 + 3 + 6,
541 .vtotal = 768 + 3 + 6 + 13,
542 .vrefresh = 60,
543};
544
545static const struct panel_desc auo_b133xtn01 = {
546 .modes = &auo_b133xtn01_mode,
547 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -0700548 .bpc = 6,
Stéphane Marchesina333f7a2014-05-23 19:27:59 -0700549 .size = {
550 .width = 293,
551 .height = 165,
552 },
553};
554
Ajay Kumar3e51d602014-07-31 23:12:12 +0530555static const struct drm_display_mode auo_b133htn01_mode = {
556 .clock = 150660,
557 .hdisplay = 1920,
558 .hsync_start = 1920 + 172,
559 .hsync_end = 1920 + 172 + 80,
560 .htotal = 1920 + 172 + 80 + 60,
561 .vdisplay = 1080,
562 .vsync_start = 1080 + 25,
563 .vsync_end = 1080 + 25 + 10,
564 .vtotal = 1080 + 25 + 10 + 10,
565 .vrefresh = 60,
566};
567
568static const struct panel_desc auo_b133htn01 = {
569 .modes = &auo_b133htn01_mode,
570 .num_modes = 1,
Thierry Redingd7a839c2014-11-06 10:11:01 +0100571 .bpc = 6,
Ajay Kumar3e51d602014-07-31 23:12:12 +0530572 .size = {
573 .width = 293,
574 .height = 165,
575 },
576 .delay = {
577 .prepare = 105,
578 .enable = 20,
579 .unprepare = 50,
580 },
581};
582
Lukasz Majewskibccfaff2018-05-14 21:08:49 +0200583static 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 },
593};
594
595static const struct panel_desc auo_g070vvn01 = {
596 .timings = &auo_g070vvn01_timings,
597 .num_timings = 1,
598 .bpc = 8,
599 .size = {
600 .width = 152,
601 .height = 91,
602 },
603 .delay = {
604 .prepare = 200,
605 .enable = 50,
606 .disable = 50,
607 .unprepare = 1000,
608 },
609};
610
Christoph Fritz4451c282017-12-16 14:13:36 +0100611static const struct drm_display_mode auo_g104sn02_mode = {
612 .clock = 40000,
613 .hdisplay = 800,
614 .hsync_start = 800 + 40,
615 .hsync_end = 800 + 40 + 216,
616 .htotal = 800 + 40 + 216 + 128,
617 .vdisplay = 600,
618 .vsync_start = 600 + 10,
619 .vsync_end = 600 + 10 + 35,
620 .vtotal = 600 + 10 + 35 + 2,
621 .vrefresh = 60,
622};
623
624static const struct panel_desc auo_g104sn02 = {
625 .modes = &auo_g104sn02_mode,
626 .num_modes = 1,
627 .bpc = 8,
628 .size = {
629 .width = 211,
630 .height = 158,
631 },
632};
633
Lucas Stach697035c2016-11-30 14:09:55 +0100634static 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 },
644};
645
646static const struct panel_desc auo_g133han01 = {
647 .timings = &auo_g133han01_timings,
648 .num_timings = 1,
649 .bpc = 8,
650 .size = {
651 .width = 293,
652 .height = 165,
653 },
654 .delay = {
655 .prepare = 200,
656 .enable = 50,
657 .disable = 50,
658 .unprepare = 1000,
659 },
660 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
661};
662
Lucas Stach8c31f602016-11-30 14:09:56 +0100663static 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 },
673};
674
675static const struct panel_desc auo_g185han01 = {
676 .timings = &auo_g185han01_timings,
677 .num_timings = 1,
678 .bpc = 8,
679 .size = {
680 .width = 409,
681 .height = 230,
682 },
683 .delay = {
684 .prepare = 50,
685 .enable = 200,
686 .disable = 110,
687 .unprepare = 1000,
688 },
689 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
690};
691
Lucas Stach70c0d5b2017-06-08 20:07:58 +0200692static 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 },
702};
703
704static const struct panel_desc auo_p320hvn03 = {
705 .timings = &auo_p320hvn03_timings,
706 .num_timings = 1,
707 .bpc = 8,
708 .size = {
709 .width = 698,
710 .height = 393,
711 },
712 .delay = {
713 .prepare = 1,
714 .enable = 450,
715 .unprepare = 500,
716 },
Lucas Stach2554f152018-04-11 17:27:41 +0200717 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Lucas Stach70c0d5b2017-06-08 20:07:58 +0200718};
719
Haixia Shi7ee933a2016-10-11 14:59:16 -0700720static const struct drm_display_mode auo_t215hvn01_mode = {
721 .clock = 148800,
722 .hdisplay = 1920,
723 .hsync_start = 1920 + 88,
724 .hsync_end = 1920 + 88 + 44,
725 .htotal = 1920 + 88 + 44 + 148,
726 .vdisplay = 1080,
727 .vsync_start = 1080 + 4,
728 .vsync_end = 1080 + 4 + 5,
729 .vtotal = 1080 + 4 + 5 + 36,
730 .vrefresh = 60,
731};
732
733static const struct panel_desc auo_t215hvn01 = {
734 .modes = &auo_t215hvn01_mode,
735 .num_modes = 1,
736 .bpc = 8,
737 .size = {
738 .width = 430,
739 .height = 270,
740 },
741 .delay = {
742 .disable = 5,
743 .unprepare = 1000,
744 }
745};
746
Philipp Zabeld47df632014-12-18 16:43:43 +0100747static const struct drm_display_mode avic_tm070ddh03_mode = {
748 .clock = 51200,
749 .hdisplay = 1024,
750 .hsync_start = 1024 + 160,
751 .hsync_end = 1024 + 160 + 4,
752 .htotal = 1024 + 160 + 4 + 156,
753 .vdisplay = 600,
754 .vsync_start = 600 + 17,
755 .vsync_end = 600 + 17 + 1,
756 .vtotal = 600 + 17 + 1 + 17,
757 .vrefresh = 60,
758};
759
760static const struct panel_desc avic_tm070ddh03 = {
761 .modes = &avic_tm070ddh03_mode,
762 .num_modes = 1,
763 .bpc = 8,
764 .size = {
765 .width = 154,
766 .height = 90,
767 },
768 .delay = {
769 .prepare = 20,
770 .enable = 200,
771 .disable = 200,
772 },
773};
774
Andrzej Hajdaae8cf412018-06-19 10:19:26 +0200775static const struct drm_display_mode boe_hv070wsa_mode = {
776 .clock = 40800,
777 .hdisplay = 1024,
778 .hsync_start = 1024 + 90,
779 .hsync_end = 1024 + 90 + 90,
780 .htotal = 1024 + 90 + 90 + 90,
781 .vdisplay = 600,
782 .vsync_start = 600 + 3,
783 .vsync_end = 600 + 3 + 4,
784 .vtotal = 600 + 3 + 4 + 3,
785 .vrefresh = 60,
786};
787
788static const struct panel_desc boe_hv070wsa = {
789 .modes = &boe_hv070wsa_mode,
790 .num_modes = 1,
791 .size = {
792 .width = 154,
793 .height = 90,
794 },
795};
796
Caesar Wangcac1a412016-12-14 11:19:56 +0800797static const struct drm_display_mode boe_nv101wxmn51_modes[] = {
798 {
799 .clock = 71900,
800 .hdisplay = 1280,
801 .hsync_start = 1280 + 48,
802 .hsync_end = 1280 + 48 + 32,
803 .htotal = 1280 + 48 + 32 + 80,
804 .vdisplay = 800,
805 .vsync_start = 800 + 3,
806 .vsync_end = 800 + 3 + 5,
807 .vtotal = 800 + 3 + 5 + 24,
808 .vrefresh = 60,
809 },
810 {
811 .clock = 57500,
812 .hdisplay = 1280,
813 .hsync_start = 1280 + 48,
814 .hsync_end = 1280 + 48 + 32,
815 .htotal = 1280 + 48 + 32 + 80,
816 .vdisplay = 800,
817 .vsync_start = 800 + 3,
818 .vsync_end = 800 + 3 + 5,
819 .vtotal = 800 + 3 + 5 + 24,
820 .vrefresh = 48,
821 },
822};
823
824static const struct panel_desc boe_nv101wxmn51 = {
825 .modes = boe_nv101wxmn51_modes,
826 .num_modes = ARRAY_SIZE(boe_nv101wxmn51_modes),
827 .bpc = 8,
828 .size = {
829 .width = 217,
830 .height = 136,
831 },
832 .delay = {
833 .prepare = 210,
834 .enable = 50,
835 .unprepare = 160,
836 },
837};
838
Randy Li2cb35c82016-09-20 03:02:51 +0800839static const struct drm_display_mode chunghwa_claa070wp03xg_mode = {
840 .clock = 66770,
841 .hdisplay = 800,
842 .hsync_start = 800 + 49,
843 .hsync_end = 800 + 49 + 33,
844 .htotal = 800 + 49 + 33 + 17,
845 .vdisplay = 1280,
846 .vsync_start = 1280 + 1,
847 .vsync_end = 1280 + 1 + 7,
848 .vtotal = 1280 + 1 + 7 + 15,
849 .vrefresh = 60,
850 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
851};
852
853static const struct panel_desc chunghwa_claa070wp03xg = {
854 .modes = &chunghwa_claa070wp03xg_mode,
855 .num_modes = 1,
856 .bpc = 6,
857 .size = {
858 .width = 94,
859 .height = 150,
860 },
861};
862
Stephen Warren4c930752014-01-07 16:46:26 -0700863static const struct drm_display_mode chunghwa_claa101wa01a_mode = {
864 .clock = 72070,
865 .hdisplay = 1366,
866 .hsync_start = 1366 + 58,
867 .hsync_end = 1366 + 58 + 58,
868 .htotal = 1366 + 58 + 58 + 58,
869 .vdisplay = 768,
870 .vsync_start = 768 + 4,
871 .vsync_end = 768 + 4 + 4,
872 .vtotal = 768 + 4 + 4 + 4,
873 .vrefresh = 60,
874};
875
876static const struct panel_desc chunghwa_claa101wa01a = {
877 .modes = &chunghwa_claa101wa01a_mode,
878 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -0700879 .bpc = 6,
Stephen Warren4c930752014-01-07 16:46:26 -0700880 .size = {
881 .width = 220,
882 .height = 120,
883 },
884};
885
Thierry Reding280921d2013-08-30 15:10:14 +0200886static const struct drm_display_mode chunghwa_claa101wb01_mode = {
887 .clock = 69300,
888 .hdisplay = 1366,
889 .hsync_start = 1366 + 48,
890 .hsync_end = 1366 + 48 + 32,
891 .htotal = 1366 + 48 + 32 + 20,
892 .vdisplay = 768,
893 .vsync_start = 768 + 16,
894 .vsync_end = 768 + 16 + 8,
895 .vtotal = 768 + 16 + 8 + 16,
896 .vrefresh = 60,
897};
898
899static const struct panel_desc chunghwa_claa101wb01 = {
900 .modes = &chunghwa_claa101wb01_mode,
901 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -0700902 .bpc = 6,
Thierry Reding280921d2013-08-30 15:10:14 +0200903 .size = {
904 .width = 223,
905 .height = 125,
906 },
907};
908
Michal Vokáč97ceb1f2018-06-25 14:41:30 +0200909static const struct drm_display_mode dataimage_scf0700c48ggu18_mode = {
910 .clock = 33260,
911 .hdisplay = 800,
912 .hsync_start = 800 + 40,
913 .hsync_end = 800 + 40 + 128,
914 .htotal = 800 + 40 + 128 + 88,
915 .vdisplay = 480,
916 .vsync_start = 480 + 10,
917 .vsync_end = 480 + 10 + 2,
918 .vtotal = 480 + 10 + 2 + 33,
919 .vrefresh = 60,
920 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
921};
922
923static const struct panel_desc dataimage_scf0700c48ggu18 = {
924 .modes = &dataimage_scf0700c48ggu18_mode,
925 .num_modes = 1,
926 .bpc = 8,
927 .size = {
928 .width = 152,
929 .height = 91,
930 },
931 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
932 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
933};
934
Philipp Zabel0ca0c822018-05-23 11:25:04 +0200935static 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,
946};
947
948static const struct panel_desc dlc_dlc0700yzg_1 = {
949 .timings = &dlc_dlc0700yzg_1_timing,
950 .num_timings = 1,
951 .bpc = 6,
952 .size = {
953 .width = 154,
954 .height = 86,
955 },
956 .delay = {
957 .prepare = 30,
958 .enable = 200,
959 .disable = 200,
960 },
961 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
962};
963
Stefan Agner26ab0062014-05-15 11:38:45 +0200964static const struct drm_display_mode edt_et057090dhu_mode = {
965 .clock = 25175,
966 .hdisplay = 640,
967 .hsync_start = 640 + 16,
968 .hsync_end = 640 + 16 + 30,
969 .htotal = 640 + 16 + 30 + 114,
970 .vdisplay = 480,
971 .vsync_start = 480 + 10,
972 .vsync_end = 480 + 10 + 3,
973 .vtotal = 480 + 10 + 3 + 32,
974 .vrefresh = 60,
975 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
976};
977
978static const struct panel_desc edt_et057090dhu = {
979 .modes = &edt_et057090dhu_mode,
980 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -0700981 .bpc = 6,
Stefan Agner26ab0062014-05-15 11:38:45 +0200982 .size = {
983 .width = 115,
984 .height = 86,
985 },
Stefan Agnereaeebff2016-12-08 14:54:31 -0800986 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
987 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
Stefan Agner26ab0062014-05-15 11:38:45 +0200988};
989
Philipp Zabelfff5de42014-05-15 12:25:47 +0200990static const struct drm_display_mode edt_etm0700g0dh6_mode = {
991 .clock = 33260,
992 .hdisplay = 800,
993 .hsync_start = 800 + 40,
994 .hsync_end = 800 + 40 + 128,
995 .htotal = 800 + 40 + 128 + 88,
996 .vdisplay = 480,
997 .vsync_start = 480 + 10,
998 .vsync_end = 480 + 10 + 2,
999 .vtotal = 480 + 10 + 2 + 33,
1000 .vrefresh = 60,
1001 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1002};
1003
1004static const struct panel_desc edt_etm0700g0dh6 = {
1005 .modes = &edt_etm0700g0dh6_mode,
1006 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -07001007 .bpc = 6,
Philipp Zabelfff5de42014-05-15 12:25:47 +02001008 .size = {
1009 .width = 152,
1010 .height = 91,
1011 },
Stefan Agnereaeebff2016-12-08 14:54:31 -08001012 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1013 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
Philipp Zabelfff5de42014-05-15 12:25:47 +02001014};
1015
Jan Tuerkaa7e6452018-06-19 11:55:44 +02001016static const struct panel_desc edt_etm0700g0bdh6 = {
1017 .modes = &edt_etm0700g0dh6_mode,
1018 .num_modes = 1,
1019 .bpc = 6,
1020 .size = {
1021 .width = 152,
1022 .height = 91,
1023 },
1024 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1025 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
1026};
1027
Boris BREZILLON102932b2014-06-05 15:53:32 +02001028static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = {
1029 .clock = 32260,
1030 .hdisplay = 800,
1031 .hsync_start = 800 + 168,
1032 .hsync_end = 800 + 168 + 64,
1033 .htotal = 800 + 168 + 64 + 88,
1034 .vdisplay = 480,
1035 .vsync_start = 480 + 37,
1036 .vsync_end = 480 + 37 + 2,
1037 .vtotal = 480 + 37 + 2 + 8,
1038 .vrefresh = 60,
1039};
1040
1041static const struct panel_desc foxlink_fl500wvr00_a0t = {
1042 .modes = &foxlink_fl500wvr00_a0t_mode,
1043 .num_modes = 1,
Thierry Redingd7a839c2014-11-06 10:11:01 +01001044 .bpc = 8,
Boris BREZILLON102932b2014-06-05 15:53:32 +02001045 .size = {
1046 .width = 108,
1047 .height = 65,
1048 },
Boris Brezillonbb276cb2014-07-22 13:35:47 +02001049 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
Boris BREZILLON102932b2014-06-05 15:53:32 +02001050};
1051
Philipp Zabeld435a2a2014-11-19 10:29:55 +01001052static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
1053 .clock = 9000,
1054 .hdisplay = 480,
1055 .hsync_start = 480 + 5,
1056 .hsync_end = 480 + 5 + 1,
1057 .htotal = 480 + 5 + 1 + 40,
1058 .vdisplay = 272,
1059 .vsync_start = 272 + 8,
1060 .vsync_end = 272 + 8 + 1,
1061 .vtotal = 272 + 8 + 1 + 8,
1062 .vrefresh = 60,
1063};
1064
1065static const struct panel_desc giantplus_gpg482739qs5 = {
1066 .modes = &giantplus_gpg482739qs5_mode,
1067 .num_modes = 1,
1068 .bpc = 8,
1069 .size = {
1070 .width = 95,
1071 .height = 54,
1072 },
Philipp Zabel33536a02015-02-11 18:50:07 +01001073 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
Philipp Zabeld435a2a2014-11-19 10:29:55 +01001074};
1075
Philipp Zabelab077252014-12-11 18:32:46 +01001076static 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 },
Philipp Zabeld901d2b2015-08-12 12:32:13 +02001081 /*
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.
1085 */
1086 .hsync_len = { 58, 158, 661 },
Philipp Zabelab077252014-12-11 18:32:46 +01001087 .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,
Philipp Zabela8532052014-10-23 16:31:06 +02001092};
1093
1094static const struct panel_desc hannstar_hsd070pww1 = {
Philipp Zabelab077252014-12-11 18:32:46 +01001095 .timings = &hannstar_hsd070pww1_timing,
1096 .num_timings = 1,
Philipp Zabela8532052014-10-23 16:31:06 +02001097 .bpc = 6,
1098 .size = {
1099 .width = 151,
1100 .height = 94,
1101 },
Philipp Zabel58d6a7b2015-08-12 12:32:12 +02001102 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
Philipp Zabela8532052014-10-23 16:31:06 +02001103};
1104
Eric Nelsonc0d607e2015-04-13 15:09:26 -07001105static 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,
1116};
1117
1118static const struct panel_desc hannstar_hsd100pxn1 = {
1119 .timings = &hannstar_hsd100pxn1_timing,
1120 .num_timings = 1,
1121 .bpc = 6,
1122 .size = {
1123 .width = 203,
1124 .height = 152,
1125 },
Philipp Zabel4946b042015-05-20 11:34:08 +02001126 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
Eric Nelsonc0d607e2015-04-13 15:09:26 -07001127};
1128
Lucas Stach61ac0bf2014-11-06 17:44:35 +01001129static const struct drm_display_mode hitachi_tx23d38vm0caa_mode = {
1130 .clock = 33333,
1131 .hdisplay = 800,
1132 .hsync_start = 800 + 85,
1133 .hsync_end = 800 + 85 + 86,
1134 .htotal = 800 + 85 + 86 + 85,
1135 .vdisplay = 480,
1136 .vsync_start = 480 + 16,
1137 .vsync_end = 480 + 16 + 13,
1138 .vtotal = 480 + 16 + 13 + 16,
1139 .vrefresh = 60,
1140};
1141
1142static const struct panel_desc hitachi_tx23d38vm0caa = {
1143 .modes = &hitachi_tx23d38vm0caa_mode,
1144 .num_modes = 1,
1145 .bpc = 6,
1146 .size = {
1147 .width = 195,
1148 .height = 117,
1149 },
Philipp Zabel6c684e32017-10-11 14:59:58 +02001150 .delay = {
1151 .enable = 160,
1152 .disable = 160,
1153 },
Lucas Stach61ac0bf2014-11-06 17:44:35 +01001154};
1155
Nicolas Ferre41bcceb2015-03-19 14:43:01 +01001156static const struct drm_display_mode innolux_at043tn24_mode = {
1157 .clock = 9000,
1158 .hdisplay = 480,
1159 .hsync_start = 480 + 2,
1160 .hsync_end = 480 + 2 + 41,
1161 .htotal = 480 + 2 + 41 + 2,
1162 .vdisplay = 272,
1163 .vsync_start = 272 + 2,
Philipp Zabela4831592017-10-11 14:59:56 +02001164 .vsync_end = 272 + 2 + 10,
1165 .vtotal = 272 + 2 + 10 + 2,
Nicolas Ferre41bcceb2015-03-19 14:43:01 +01001166 .vrefresh = 60,
1167 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1168};
1169
1170static const struct panel_desc innolux_at043tn24 = {
1171 .modes = &innolux_at043tn24_mode,
1172 .num_modes = 1,
1173 .bpc = 8,
1174 .size = {
1175 .width = 95,
1176 .height = 54,
1177 },
1178 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
Philipp Zabel65602792017-10-11 14:59:57 +02001179 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
Nicolas Ferre41bcceb2015-03-19 14:43:01 +01001180};
1181
Riccardo Bortolato4fc24ab2016-04-20 15:37:15 +02001182static const struct drm_display_mode innolux_at070tn92_mode = {
1183 .clock = 33333,
1184 .hdisplay = 800,
1185 .hsync_start = 800 + 210,
1186 .hsync_end = 800 + 210 + 20,
1187 .htotal = 800 + 210 + 20 + 46,
1188 .vdisplay = 480,
1189 .vsync_start = 480 + 22,
1190 .vsync_end = 480 + 22 + 10,
1191 .vtotal = 480 + 22 + 23 + 10,
1192 .vrefresh = 60,
1193};
1194
1195static const struct panel_desc innolux_at070tn92 = {
1196 .modes = &innolux_at070tn92_mode,
1197 .num_modes = 1,
1198 .size = {
1199 .width = 154,
1200 .height = 86,
1201 },
1202 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1203};
1204
Christoph Fritza5d2ade2018-06-04 13:16:48 +02001205static 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,
1216};
1217
1218static const struct panel_desc innolux_g070y2_l01 = {
1219 .timings = &innolux_g070y2_l01_timing,
1220 .num_timings = 1,
1221 .bpc = 6,
1222 .size = {
1223 .width = 152,
1224 .height = 91,
1225 },
1226 .delay = {
1227 .prepare = 10,
1228 .enable = 100,
1229 .disable = 100,
1230 .unprepare = 800,
1231 },
1232 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1233};
1234
Michael Olbrich1e29b842016-08-15 14:32:02 +02001235static 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,
1246};
1247
1248static const struct panel_desc innolux_g101ice_l01 = {
1249 .timings = &innolux_g101ice_l01_timing,
1250 .num_timings = 1,
1251 .bpc = 8,
1252 .size = {
1253 .width = 217,
1254 .height = 135,
1255 },
1256 .delay = {
1257 .enable = 200,
1258 .disable = 200,
1259 },
1260 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1261};
1262
Lucas Stach4ae13e42016-11-30 14:09:54 +01001263static 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 },
Lucas Stachd731f662014-11-06 17:44:33 +01001273};
1274
1275static const struct panel_desc innolux_g121i1_l01 = {
Lucas Stach4ae13e42016-11-30 14:09:54 +01001276 .timings = &innolux_g121i1_l01_timing,
1277 .num_timings = 1,
Lucas Stachd731f662014-11-06 17:44:33 +01001278 .bpc = 6,
1279 .size = {
1280 .width = 261,
1281 .height = 163,
1282 },
Lucas Stach4ae13e42016-11-30 14:09:54 +01001283 .delay = {
1284 .enable = 200,
1285 .disable = 20,
1286 },
1287 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Lucas Stachd731f662014-11-06 17:44:33 +01001288};
1289
Akshay Bhatf8fa17b2015-11-18 15:57:47 -05001290static const struct drm_display_mode innolux_g121x1_l03_mode = {
1291 .clock = 65000,
1292 .hdisplay = 1024,
1293 .hsync_start = 1024 + 0,
1294 .hsync_end = 1024 + 1,
1295 .htotal = 1024 + 0 + 1 + 320,
1296 .vdisplay = 768,
1297 .vsync_start = 768 + 38,
1298 .vsync_end = 768 + 38 + 1,
1299 .vtotal = 768 + 38 + 1 + 0,
1300 .vrefresh = 60,
Akshay Bhat2e8c5eb2016-03-01 18:06:54 -05001301 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
Akshay Bhatf8fa17b2015-11-18 15:57:47 -05001302};
1303
1304static const struct panel_desc innolux_g121x1_l03 = {
1305 .modes = &innolux_g121x1_l03_mode,
1306 .num_modes = 1,
1307 .bpc = 6,
1308 .size = {
1309 .width = 246,
1310 .height = 185,
1311 },
1312 .delay = {
1313 .enable = 200,
1314 .unprepare = 200,
1315 .disable = 400,
1316 },
1317};
1318
Thierry Reding0a2288c2014-07-03 14:02:59 +02001319static const struct drm_display_mode innolux_n116bge_mode = {
Daniel Kurtz7fe8c772014-09-02 10:56:46 +08001320 .clock = 76420,
Thierry Reding0a2288c2014-07-03 14:02:59 +02001321 .hdisplay = 1366,
Daniel Kurtz7fe8c772014-09-02 10:56:46 +08001322 .hsync_start = 1366 + 136,
1323 .hsync_end = 1366 + 136 + 30,
1324 .htotal = 1366 + 136 + 30 + 60,
Thierry Reding0a2288c2014-07-03 14:02:59 +02001325 .vdisplay = 768,
1326 .vsync_start = 768 + 8,
Daniel Kurtz7fe8c772014-09-02 10:56:46 +08001327 .vsync_end = 768 + 8 + 12,
1328 .vtotal = 768 + 8 + 12 + 12,
Thierry Reding0a2288c2014-07-03 14:02:59 +02001329 .vrefresh = 60,
1330 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1331};
1332
1333static const struct panel_desc innolux_n116bge = {
1334 .modes = &innolux_n116bge_mode,
1335 .num_modes = 1,
1336 .bpc = 6,
1337 .size = {
1338 .width = 256,
1339 .height = 144,
1340 },
1341};
1342
Alban Bedelea447392014-07-22 08:38:55 +02001343static const struct drm_display_mode innolux_n156bge_l21_mode = {
1344 .clock = 69300,
1345 .hdisplay = 1366,
1346 .hsync_start = 1366 + 16,
1347 .hsync_end = 1366 + 16 + 34,
1348 .htotal = 1366 + 16 + 34 + 50,
1349 .vdisplay = 768,
1350 .vsync_start = 768 + 2,
1351 .vsync_end = 768 + 2 + 6,
1352 .vtotal = 768 + 2 + 6 + 12,
1353 .vrefresh = 60,
1354};
1355
1356static const struct panel_desc innolux_n156bge_l21 = {
1357 .modes = &innolux_n156bge_l21_mode,
1358 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -07001359 .bpc = 6,
Alban Bedelea447392014-07-22 08:38:55 +02001360 .size = {
1361 .width = 344,
1362 .height = 193,
1363 },
1364};
1365
spanda@codeaurora.orgda50bd42018-05-15 11:22:43 +05301366static const struct drm_display_mode innolux_tv123wam_mode = {
1367 .clock = 206016,
1368 .hdisplay = 2160,
1369 .hsync_start = 2160 + 48,
1370 .hsync_end = 2160 + 48 + 32,
1371 .htotal = 2160 + 48 + 32 + 80,
1372 .vdisplay = 1440,
1373 .vsync_start = 1440 + 3,
1374 .vsync_end = 1440 + 3 + 10,
1375 .vtotal = 1440 + 3 + 10 + 27,
1376 .vrefresh = 60,
1377 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
1378};
1379
1380static const struct panel_desc innolux_tv123wam = {
1381 .modes = &innolux_tv123wam_mode,
1382 .num_modes = 1,
1383 .bpc = 8,
1384 .size = {
1385 .width = 259,
1386 .height = 173,
1387 },
1388};
1389
Michael Grzeschikbccac3f2015-03-19 12:22:44 +01001390static const struct drm_display_mode innolux_zj070na_01p_mode = {
1391 .clock = 51501,
1392 .hdisplay = 1024,
1393 .hsync_start = 1024 + 128,
1394 .hsync_end = 1024 + 128 + 64,
1395 .htotal = 1024 + 128 + 64 + 128,
1396 .vdisplay = 600,
1397 .vsync_start = 600 + 16,
1398 .vsync_end = 600 + 16 + 4,
1399 .vtotal = 600 + 16 + 4 + 16,
1400 .vrefresh = 60,
1401};
1402
1403static const struct panel_desc innolux_zj070na_01p = {
1404 .modes = &innolux_zj070na_01p_mode,
1405 .num_modes = 1,
1406 .bpc = 6,
1407 .size = {
Thierry Reding81598842016-06-10 15:33:13 +02001408 .width = 154,
1409 .height = 90,
Michael Grzeschikbccac3f2015-03-19 12:22:44 +01001410 },
1411};
1412
Jagan Teki8cfe8342018-02-04 23:19:28 +05301413static const struct display_timing koe_tx31d200vm0baa_timing = {
1414 .pixelclock = { 39600000, 43200000, 48000000 },
1415 .hactive = { 1280, 1280, 1280 },
1416 .hfront_porch = { 16, 36, 56 },
1417 .hback_porch = { 16, 36, 56 },
1418 .hsync_len = { 8, 8, 8 },
1419 .vactive = { 480, 480, 480 },
Stefan Agnerc9b6be72018-04-19 23:20:03 +02001420 .vfront_porch = { 6, 21, 33 },
1421 .vback_porch = { 6, 21, 33 },
Jagan Teki8cfe8342018-02-04 23:19:28 +05301422 .vsync_len = { 8, 8, 8 },
1423 .flags = DISPLAY_FLAGS_DE_HIGH,
1424};
1425
1426static const struct panel_desc koe_tx31d200vm0baa = {
1427 .timings = &koe_tx31d200vm0baa_timing,
1428 .num_timings = 1,
1429 .bpc = 6,
1430 .size = {
1431 .width = 292,
1432 .height = 109,
1433 },
1434 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1435};
1436
Lucas Stach8def22e2015-12-02 19:41:11 +01001437static const struct display_timing kyo_tcg121xglp_timing = {
1438 .pixelclock = { 52000000, 65000000, 71000000 },
1439 .hactive = { 1024, 1024, 1024 },
1440 .hfront_porch = { 2, 2, 2 },
1441 .hback_porch = { 2, 2, 2 },
1442 .hsync_len = { 86, 124, 244 },
1443 .vactive = { 768, 768, 768 },
1444 .vfront_porch = { 2, 2, 2 },
1445 .vback_porch = { 2, 2, 2 },
1446 .vsync_len = { 6, 34, 73 },
1447 .flags = DISPLAY_FLAGS_DE_HIGH,
1448};
1449
1450static const struct panel_desc kyo_tcg121xglp = {
1451 .timings = &kyo_tcg121xglp_timing,
1452 .num_timings = 1,
1453 .bpc = 8,
1454 .size = {
1455 .width = 246,
1456 .height = 184,
1457 },
1458 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1459};
1460
Heiko Schocherdd015002015-05-22 10:25:57 +02001461static const struct drm_display_mode lg_lb070wv8_mode = {
1462 .clock = 33246,
1463 .hdisplay = 800,
1464 .hsync_start = 800 + 88,
1465 .hsync_end = 800 + 88 + 80,
1466 .htotal = 800 + 88 + 80 + 88,
1467 .vdisplay = 480,
1468 .vsync_start = 480 + 10,
1469 .vsync_end = 480 + 10 + 25,
1470 .vtotal = 480 + 10 + 25 + 10,
1471 .vrefresh = 60,
1472};
1473
1474static const struct panel_desc lg_lb070wv8 = {
1475 .modes = &lg_lb070wv8_mode,
1476 .num_modes = 1,
1477 .bpc = 16,
1478 .size = {
1479 .width = 151,
1480 .height = 91,
1481 },
1482 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1483};
1484
Yakir Yangc5ece402016-06-28 12:51:15 +08001485static const struct drm_display_mode lg_lp079qx1_sp0v_mode = {
1486 .clock = 200000,
1487 .hdisplay = 1536,
1488 .hsync_start = 1536 + 12,
1489 .hsync_end = 1536 + 12 + 16,
1490 .htotal = 1536 + 12 + 16 + 48,
1491 .vdisplay = 2048,
1492 .vsync_start = 2048 + 8,
1493 .vsync_end = 2048 + 8 + 4,
1494 .vtotal = 2048 + 8 + 4 + 8,
1495 .vrefresh = 60,
1496 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1497};
1498
1499static const struct panel_desc lg_lp079qx1_sp0v = {
1500 .modes = &lg_lp079qx1_sp0v_mode,
1501 .num_modes = 1,
1502 .size = {
1503 .width = 129,
1504 .height = 171,
1505 },
1506};
1507
Yakir Yang0355dde2016-06-12 10:56:02 +08001508static const struct drm_display_mode lg_lp097qx1_spa1_mode = {
1509 .clock = 205210,
1510 .hdisplay = 2048,
1511 .hsync_start = 2048 + 150,
1512 .hsync_end = 2048 + 150 + 5,
1513 .htotal = 2048 + 150 + 5 + 5,
1514 .vdisplay = 1536,
1515 .vsync_start = 1536 + 3,
1516 .vsync_end = 1536 + 3 + 1,
1517 .vtotal = 1536 + 3 + 1 + 9,
1518 .vrefresh = 60,
1519};
1520
1521static const struct panel_desc lg_lp097qx1_spa1 = {
1522 .modes = &lg_lp097qx1_spa1_mode,
1523 .num_modes = 1,
1524 .size = {
1525 .width = 208,
1526 .height = 147,
1527 },
1528};
1529
Jitao Shi690d8fa2016-02-22 19:01:44 +08001530static const struct drm_display_mode lg_lp120up1_mode = {
1531 .clock = 162300,
1532 .hdisplay = 1920,
1533 .hsync_start = 1920 + 40,
1534 .hsync_end = 1920 + 40 + 40,
1535 .htotal = 1920 + 40 + 40+ 80,
1536 .vdisplay = 1280,
1537 .vsync_start = 1280 + 4,
1538 .vsync_end = 1280 + 4 + 4,
1539 .vtotal = 1280 + 4 + 4 + 12,
1540 .vrefresh = 60,
1541};
1542
1543static const struct panel_desc lg_lp120up1 = {
1544 .modes = &lg_lp120up1_mode,
1545 .num_modes = 1,
1546 .bpc = 8,
1547 .size = {
1548 .width = 267,
1549 .height = 183,
1550 },
1551};
1552
Thierry Redingec7c5652013-11-15 15:59:32 +01001553static const struct drm_display_mode lg_lp129qe_mode = {
1554 .clock = 285250,
1555 .hdisplay = 2560,
1556 .hsync_start = 2560 + 48,
1557 .hsync_end = 2560 + 48 + 32,
1558 .htotal = 2560 + 48 + 32 + 80,
1559 .vdisplay = 1700,
1560 .vsync_start = 1700 + 3,
1561 .vsync_end = 1700 + 3 + 10,
1562 .vtotal = 1700 + 3 + 10 + 36,
1563 .vrefresh = 60,
1564};
1565
1566static const struct panel_desc lg_lp129qe = {
1567 .modes = &lg_lp129qe_mode,
1568 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -07001569 .bpc = 8,
Thierry Redingec7c5652013-11-15 15:59:32 +01001570 .size = {
1571 .width = 272,
1572 .height = 181,
1573 },
1574};
1575
Lukasz Majewski65c766c2017-10-21 00:18:37 +02001576static const struct drm_display_mode mitsubishi_aa070mc01_mode = {
1577 .clock = 30400,
1578 .hdisplay = 800,
1579 .hsync_start = 800 + 0,
1580 .hsync_end = 800 + 1,
1581 .htotal = 800 + 0 + 1 + 160,
1582 .vdisplay = 480,
1583 .vsync_start = 480 + 0,
1584 .vsync_end = 480 + 48 + 1,
1585 .vtotal = 480 + 48 + 1 + 0,
1586 .vrefresh = 60,
1587 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1588};
1589
1590static const struct panel_desc mitsubishi_aa070mc01 = {
1591 .modes = &mitsubishi_aa070mc01_mode,
1592 .num_modes = 1,
1593 .bpc = 8,
1594 .size = {
1595 .width = 152,
1596 .height = 91,
1597 },
1598
1599 .delay = {
1600 .enable = 200,
1601 .unprepare = 200,
1602 .disable = 400,
1603 },
1604 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1605 .bus_flags = DRM_BUS_FLAG_DE_HIGH,
1606};
1607
Lucas Stach01bacc132017-06-08 20:07:55 +02001608static const struct display_timing nec_nl12880bc20_05_timing = {
1609 .pixelclock = { 67000000, 71000000, 75000000 },
1610 .hactive = { 1280, 1280, 1280 },
1611 .hfront_porch = { 2, 30, 30 },
1612 .hback_porch = { 6, 100, 100 },
1613 .hsync_len = { 2, 30, 30 },
1614 .vactive = { 800, 800, 800 },
1615 .vfront_porch = { 5, 5, 5 },
1616 .vback_porch = { 11, 11, 11 },
1617 .vsync_len = { 7, 7, 7 },
1618};
1619
1620static const struct panel_desc nec_nl12880bc20_05 = {
1621 .timings = &nec_nl12880bc20_05_timing,
1622 .num_timings = 1,
1623 .bpc = 8,
1624 .size = {
1625 .width = 261,
1626 .height = 163,
1627 },
1628 .delay = {
1629 .enable = 50,
1630 .disable = 50,
1631 },
1632 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1633};
1634
jianwei wangc6e87f92015-07-29 16:30:02 +08001635static const struct drm_display_mode nec_nl4827hc19_05b_mode = {
1636 .clock = 10870,
1637 .hdisplay = 480,
1638 .hsync_start = 480 + 2,
1639 .hsync_end = 480 + 2 + 41,
1640 .htotal = 480 + 2 + 41 + 2,
1641 .vdisplay = 272,
1642 .vsync_start = 272 + 2,
1643 .vsync_end = 272 + 2 + 4,
1644 .vtotal = 272 + 2 + 4 + 2,
1645 .vrefresh = 74,
Stefan Agner4bc390c2015-11-17 19:10:29 -08001646 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
jianwei wangc6e87f92015-07-29 16:30:02 +08001647};
1648
1649static const struct panel_desc nec_nl4827hc19_05b = {
1650 .modes = &nec_nl4827hc19_05b_mode,
1651 .num_modes = 1,
1652 .bpc = 8,
1653 .size = {
1654 .width = 95,
1655 .height = 54,
1656 },
Stefan Agner2c806612016-02-08 12:50:13 -08001657 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1658 .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE,
jianwei wangc6e87f92015-07-29 16:30:02 +08001659};
1660
Maxime Riparde6c2f062016-09-06 16:46:17 +02001661static const struct drm_display_mode netron_dy_e231732_mode = {
1662 .clock = 66000,
1663 .hdisplay = 1024,
1664 .hsync_start = 1024 + 160,
1665 .hsync_end = 1024 + 160 + 70,
1666 .htotal = 1024 + 160 + 70 + 90,
1667 .vdisplay = 600,
1668 .vsync_start = 600 + 127,
1669 .vsync_end = 600 + 127 + 20,
1670 .vtotal = 600 + 127 + 20 + 3,
1671 .vrefresh = 60,
1672};
1673
1674static const struct panel_desc netron_dy_e231732 = {
1675 .modes = &netron_dy_e231732_mode,
1676 .num_modes = 1,
1677 .size = {
1678 .width = 154,
1679 .height = 87,
1680 },
1681 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1682};
1683
Tomi Valkeinen3b39ad72018-06-18 16:22:40 +03001684static const struct drm_display_mode newhaven_nhd_43_480272ef_atxl_mode = {
1685 .clock = 9000,
1686 .hdisplay = 480,
1687 .hsync_start = 480 + 2,
1688 .hsync_end = 480 + 2 + 41,
1689 .htotal = 480 + 2 + 41 + 2,
1690 .vdisplay = 272,
1691 .vsync_start = 272 + 2,
1692 .vsync_end = 272 + 2 + 10,
1693 .vtotal = 272 + 2 + 10 + 2,
1694 .vrefresh = 60,
1695 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1696};
1697
1698static const struct panel_desc newhaven_nhd_43_480272ef_atxl = {
1699 .modes = &newhaven_nhd_43_480272ef_atxl_mode,
1700 .num_modes = 1,
1701 .bpc = 8,
1702 .size = {
1703 .width = 95,
1704 .height = 54,
1705 },
1706 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1707 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE |
1708 DRM_BUS_FLAG_SYNC_POSEDGE,
1709};
1710
Lucas Stach4177fa62017-06-08 20:07:57 +02001711static const struct display_timing nlt_nl192108ac18_02d_timing = {
1712 .pixelclock = { 130000000, 148350000, 163000000 },
1713 .hactive = { 1920, 1920, 1920 },
1714 .hfront_porch = { 80, 100, 100 },
1715 .hback_porch = { 100, 120, 120 },
1716 .hsync_len = { 50, 60, 60 },
1717 .vactive = { 1080, 1080, 1080 },
1718 .vfront_porch = { 12, 30, 30 },
1719 .vback_porch = { 4, 10, 10 },
1720 .vsync_len = { 4, 5, 5 },
1721};
1722
1723static const struct panel_desc nlt_nl192108ac18_02d = {
1724 .timings = &nlt_nl192108ac18_02d_timing,
1725 .num_timings = 1,
1726 .bpc = 8,
1727 .size = {
1728 .width = 344,
1729 .height = 194,
1730 },
1731 .delay = {
1732 .unprepare = 500,
1733 },
1734 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1735};
1736
Fabien Lahoudere05ec0e42016-10-17 11:38:01 +02001737static const struct drm_display_mode nvd_9128_mode = {
1738 .clock = 29500,
1739 .hdisplay = 800,
1740 .hsync_start = 800 + 130,
1741 .hsync_end = 800 + 130 + 98,
1742 .htotal = 800 + 0 + 130 + 98,
1743 .vdisplay = 480,
1744 .vsync_start = 480 + 10,
1745 .vsync_end = 480 + 10 + 50,
1746 .vtotal = 480 + 0 + 10 + 50,
1747};
1748
1749static const struct panel_desc nvd_9128 = {
1750 .modes = &nvd_9128_mode,
1751 .num_modes = 1,
1752 .bpc = 8,
1753 .size = {
1754 .width = 156,
1755 .height = 88,
1756 },
1757 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1758};
1759
Gary Bissona99fb622015-06-10 18:44:23 +02001760static const struct display_timing okaya_rs800480t_7x0gp_timing = {
1761 .pixelclock = { 30000000, 30000000, 40000000 },
1762 .hactive = { 800, 800, 800 },
1763 .hfront_porch = { 40, 40, 40 },
1764 .hback_porch = { 40, 40, 40 },
1765 .hsync_len = { 1, 48, 48 },
1766 .vactive = { 480, 480, 480 },
1767 .vfront_porch = { 13, 13, 13 },
1768 .vback_porch = { 29, 29, 29 },
1769 .vsync_len = { 3, 3, 3 },
1770 .flags = DISPLAY_FLAGS_DE_HIGH,
1771};
1772
1773static const struct panel_desc okaya_rs800480t_7x0gp = {
1774 .timings = &okaya_rs800480t_7x0gp_timing,
1775 .num_timings = 1,
1776 .bpc = 6,
1777 .size = {
1778 .width = 154,
1779 .height = 87,
1780 },
1781 .delay = {
1782 .prepare = 41,
1783 .enable = 50,
1784 .unprepare = 41,
1785 .disable = 50,
1786 },
1787 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1788};
1789
Maxime Ripardcf5c9e62016-03-23 17:38:34 +01001790static const struct drm_display_mode olimex_lcd_olinuxino_43ts_mode = {
1791 .clock = 9000,
1792 .hdisplay = 480,
1793 .hsync_start = 480 + 5,
1794 .hsync_end = 480 + 5 + 30,
1795 .htotal = 480 + 5 + 30 + 10,
1796 .vdisplay = 272,
1797 .vsync_start = 272 + 8,
1798 .vsync_end = 272 + 8 + 5,
1799 .vtotal = 272 + 8 + 5 + 3,
1800 .vrefresh = 60,
1801};
1802
1803static const struct panel_desc olimex_lcd_olinuxino_43ts = {
1804 .modes = &olimex_lcd_olinuxino_43ts_mode,
1805 .num_modes = 1,
1806 .size = {
Jonathan Liu30c6d7ab92017-07-20 20:29:43 +10001807 .width = 95,
1808 .height = 54,
Maxime Ripardcf5c9e62016-03-23 17:38:34 +01001809 },
Jonathan Liu5c2a7c62016-09-11 20:46:55 +10001810 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
Maxime Ripardcf5c9e62016-03-23 17:38:34 +01001811};
1812
Eric Anholte8b6f562016-03-24 17:23:48 -07001813/*
1814 * 800x480 CVT. The panel appears to be quite accepting, at least as far as
1815 * pixel clocks, but this is the timing that was being used in the Adafruit
1816 * installation instructions.
1817 */
1818static const struct drm_display_mode ontat_yx700wv03_mode = {
1819 .clock = 29500,
1820 .hdisplay = 800,
1821 .hsync_start = 824,
1822 .hsync_end = 896,
1823 .htotal = 992,
1824 .vdisplay = 480,
1825 .vsync_start = 483,
1826 .vsync_end = 493,
1827 .vtotal = 500,
1828 .vrefresh = 60,
1829 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1830};
1831
1832/*
1833 * Specification at:
1834 * https://www.adafruit.com/images/product-files/2406/c3163.pdf
1835 */
1836static const struct panel_desc ontat_yx700wv03 = {
1837 .modes = &ontat_yx700wv03_mode,
1838 .num_modes = 1,
1839 .bpc = 8,
1840 .size = {
1841 .width = 154,
1842 .height = 83,
1843 },
Eric Anholt5651e5e2018-03-09 15:33:32 -08001844 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
Eric Anholte8b6f562016-03-24 17:23:48 -07001845};
1846
Philipp Zabel725c9d42015-02-11 18:50:11 +01001847static const struct drm_display_mode ortustech_com43h4m85ulc_mode = {
1848 .clock = 25000,
1849 .hdisplay = 480,
1850 .hsync_start = 480 + 10,
1851 .hsync_end = 480 + 10 + 10,
1852 .htotal = 480 + 10 + 10 + 15,
1853 .vdisplay = 800,
1854 .vsync_start = 800 + 3,
1855 .vsync_end = 800 + 3 + 3,
1856 .vtotal = 800 + 3 + 3 + 3,
1857 .vrefresh = 60,
1858};
1859
1860static const struct panel_desc ortustech_com43h4m85ulc = {
1861 .modes = &ortustech_com43h4m85ulc_mode,
1862 .num_modes = 1,
1863 .bpc = 8,
1864 .size = {
1865 .width = 56,
1866 .height = 93,
1867 },
1868 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
Marek Vasute0932f92016-08-26 18:26:00 +02001869 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
Philipp Zabel725c9d42015-02-11 18:50:11 +01001870};
1871
Josh Wud2a6f0f2015-10-08 17:42:41 +02001872static const struct drm_display_mode qd43003c0_40_mode = {
1873 .clock = 9000,
1874 .hdisplay = 480,
1875 .hsync_start = 480 + 8,
1876 .hsync_end = 480 + 8 + 4,
1877 .htotal = 480 + 8 + 4 + 39,
1878 .vdisplay = 272,
1879 .vsync_start = 272 + 4,
1880 .vsync_end = 272 + 4 + 10,
1881 .vtotal = 272 + 4 + 10 + 2,
1882 .vrefresh = 60,
1883};
1884
1885static const struct panel_desc qd43003c0_40 = {
1886 .modes = &qd43003c0_40_mode,
1887 .num_modes = 1,
1888 .bpc = 8,
1889 .size = {
1890 .width = 95,
1891 .height = 53,
1892 },
1893 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1894};
1895
Jagan Teki23167fa2018-06-07 19:16:48 +05301896static const struct display_timing rocktech_rk070er9427_timing = {
1897 .pixelclock = { 26400000, 33300000, 46800000 },
1898 .hactive = { 800, 800, 800 },
1899 .hfront_porch = { 16, 210, 354 },
1900 .hback_porch = { 46, 46, 46 },
1901 .hsync_len = { 1, 1, 1 },
1902 .vactive = { 480, 480, 480 },
1903 .vfront_porch = { 7, 22, 147 },
1904 .vback_porch = { 23, 23, 23 },
1905 .vsync_len = { 1, 1, 1 },
1906 .flags = DISPLAY_FLAGS_DE_HIGH,
1907};
1908
1909static const struct panel_desc rocktech_rk070er9427 = {
1910 .timings = &rocktech_rk070er9427_timing,
1911 .num_timings = 1,
1912 .bpc = 6,
1913 .size = {
1914 .width = 154,
1915 .height = 86,
1916 },
1917 .delay = {
1918 .prepare = 41,
1919 .enable = 50,
1920 .unprepare = 41,
1921 .disable = 50,
1922 },
1923 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1924};
1925
Yakir Yang0330eaf2016-06-12 10:56:13 +08001926static const struct drm_display_mode samsung_lsn122dl01_c01_mode = {
1927 .clock = 271560,
1928 .hdisplay = 2560,
1929 .hsync_start = 2560 + 48,
1930 .hsync_end = 2560 + 48 + 32,
1931 .htotal = 2560 + 48 + 32 + 80,
1932 .vdisplay = 1600,
1933 .vsync_start = 1600 + 2,
1934 .vsync_end = 1600 + 2 + 5,
1935 .vtotal = 1600 + 2 + 5 + 57,
1936 .vrefresh = 60,
1937};
1938
1939static const struct panel_desc samsung_lsn122dl01_c01 = {
1940 .modes = &samsung_lsn122dl01_c01_mode,
1941 .num_modes = 1,
1942 .size = {
1943 .width = 263,
1944 .height = 164,
1945 },
1946};
1947
Marc Dietrich6d54e3d2013-12-21 21:38:12 +01001948static const struct drm_display_mode samsung_ltn101nt05_mode = {
1949 .clock = 54030,
1950 .hdisplay = 1024,
1951 .hsync_start = 1024 + 24,
1952 .hsync_end = 1024 + 24 + 136,
1953 .htotal = 1024 + 24 + 136 + 160,
1954 .vdisplay = 600,
1955 .vsync_start = 600 + 3,
1956 .vsync_end = 600 + 3 + 6,
1957 .vtotal = 600 + 3 + 6 + 61,
1958 .vrefresh = 60,
1959};
1960
1961static const struct panel_desc samsung_ltn101nt05 = {
1962 .modes = &samsung_ltn101nt05_mode,
1963 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -07001964 .bpc = 6,
Marc Dietrich6d54e3d2013-12-21 21:38:12 +01001965 .size = {
Thierry Reding81598842016-06-10 15:33:13 +02001966 .width = 223,
1967 .height = 125,
Marc Dietrich6d54e3d2013-12-21 21:38:12 +01001968 },
1969};
1970
Stéphane Marchesin0c934302015-03-18 10:52:18 +01001971static const struct drm_display_mode samsung_ltn140at29_301_mode = {
1972 .clock = 76300,
1973 .hdisplay = 1366,
1974 .hsync_start = 1366 + 64,
1975 .hsync_end = 1366 + 64 + 48,
1976 .htotal = 1366 + 64 + 48 + 128,
1977 .vdisplay = 768,
1978 .vsync_start = 768 + 2,
1979 .vsync_end = 768 + 2 + 5,
1980 .vtotal = 768 + 2 + 5 + 17,
1981 .vrefresh = 60,
1982};
1983
1984static const struct panel_desc samsung_ltn140at29_301 = {
1985 .modes = &samsung_ltn140at29_301_mode,
1986 .num_modes = 1,
1987 .bpc = 6,
1988 .size = {
1989 .width = 320,
1990 .height = 187,
1991 },
1992};
1993
Joshua Clayton592aa022016-07-06 15:59:16 -07001994static const struct display_timing sharp_lq101k1ly04_timing = {
1995 .pixelclock = { 60000000, 65000000, 80000000 },
1996 .hactive = { 1280, 1280, 1280 },
1997 .hfront_porch = { 20, 20, 20 },
1998 .hback_porch = { 20, 20, 20 },
1999 .hsync_len = { 10, 10, 10 },
2000 .vactive = { 800, 800, 800 },
2001 .vfront_porch = { 4, 4, 4 },
2002 .vback_porch = { 4, 4, 4 },
2003 .vsync_len = { 4, 4, 4 },
2004 .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE,
2005};
2006
2007static const struct panel_desc sharp_lq101k1ly04 = {
2008 .timings = &sharp_lq101k1ly04_timing,
2009 .num_timings = 1,
2010 .bpc = 8,
2011 .size = {
2012 .width = 217,
2013 .height = 136,
2014 },
2015 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
2016};
2017
Sean Paul9f7bae22018-02-08 12:48:52 -05002018static const struct display_timing sharp_lq123p1jx31_timing = {
2019 .pixelclock = { 252750000, 252750000, 266604720 },
2020 .hactive = { 2400, 2400, 2400 },
2021 .hfront_porch = { 48, 48, 48 },
2022 .hback_porch = { 80, 80, 84 },
2023 .hsync_len = { 32, 32, 32 },
2024 .vactive = { 1600, 1600, 1600 },
2025 .vfront_porch = { 3, 3, 3 },
2026 .vback_porch = { 33, 33, 120 },
2027 .vsync_len = { 10, 10, 10 },
2028 .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW,
Yakir Yang739c7de2016-06-12 10:56:35 +08002029};
2030
2031static const struct panel_desc sharp_lq123p1jx31 = {
Sean Paul9f7bae22018-02-08 12:48:52 -05002032 .timings = &sharp_lq123p1jx31_timing,
2033 .num_timings = 1,
zain wang5466a632016-11-19 10:27:16 +08002034 .bpc = 8,
Yakir Yang739c7de2016-06-12 10:56:35 +08002035 .size = {
2036 .width = 259,
2037 .height = 173,
2038 },
Yakir Yanga42f6e32016-07-21 21:14:34 +08002039 .delay = {
2040 .prepare = 110,
2041 .enable = 50,
2042 .unprepare = 550,
2043 },
Yakir Yang739c7de2016-06-12 10:56:35 +08002044};
2045
Gustaf Lindström0f9cdd72016-10-04 17:29:21 +02002046static const struct drm_display_mode sharp_lq150x1lg11_mode = {
2047 .clock = 71100,
2048 .hdisplay = 1024,
2049 .hsync_start = 1024 + 168,
2050 .hsync_end = 1024 + 168 + 64,
2051 .htotal = 1024 + 168 + 64 + 88,
2052 .vdisplay = 768,
2053 .vsync_start = 768 + 37,
2054 .vsync_end = 768 + 37 + 2,
2055 .vtotal = 768 + 37 + 2 + 8,
2056 .vrefresh = 60,
2057};
2058
2059static const struct panel_desc sharp_lq150x1lg11 = {
2060 .modes = &sharp_lq150x1lg11_mode,
2061 .num_modes = 1,
2062 .bpc = 6,
2063 .size = {
2064 .width = 304,
2065 .height = 228,
2066 },
2067 .bus_format = MEDIA_BUS_FMT_RGB565_1X16,
2068};
2069
Boris BREZILLON9c6615b2015-03-19 14:43:00 +01002070static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = {
2071 .clock = 33300,
2072 .hdisplay = 800,
2073 .hsync_start = 800 + 1,
2074 .hsync_end = 800 + 1 + 64,
2075 .htotal = 800 + 1 + 64 + 64,
2076 .vdisplay = 480,
2077 .vsync_start = 480 + 1,
2078 .vsync_end = 480 + 1 + 23,
2079 .vtotal = 480 + 1 + 23 + 22,
2080 .vrefresh = 60,
2081};
2082
2083static const struct panel_desc shelly_sca07010_bfn_lnn = {
2084 .modes = &shelly_sca07010_bfn_lnn_mode,
2085 .num_modes = 1,
2086 .size = {
2087 .width = 152,
2088 .height = 91,
2089 },
2090 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2091};
2092
Douglas Anderson9bb34c42016-06-10 10:02:07 -07002093static const struct drm_display_mode starry_kr122ea0sra_mode = {
2094 .clock = 147000,
2095 .hdisplay = 1920,
2096 .hsync_start = 1920 + 16,
2097 .hsync_end = 1920 + 16 + 16,
2098 .htotal = 1920 + 16 + 16 + 32,
2099 .vdisplay = 1200,
2100 .vsync_start = 1200 + 15,
2101 .vsync_end = 1200 + 15 + 2,
2102 .vtotal = 1200 + 15 + 2 + 18,
2103 .vrefresh = 60,
2104 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2105};
2106
2107static const struct panel_desc starry_kr122ea0sra = {
2108 .modes = &starry_kr122ea0sra_mode,
2109 .num_modes = 1,
2110 .size = {
2111 .width = 263,
2112 .height = 164,
2113 },
Brian Norrisc46b9242016-08-26 14:32:14 -07002114 .delay = {
2115 .prepare = 10 + 200,
2116 .enable = 50,
2117 .unprepare = 10 + 500,
2118 },
Douglas Anderson9bb34c42016-06-10 10:02:07 -07002119};
2120
Gary Bissonadb973e2016-12-02 09:52:08 +01002121static const struct display_timing tianma_tm070jdhg30_timing = {
2122 .pixelclock = { 62600000, 68200000, 78100000 },
2123 .hactive = { 1280, 1280, 1280 },
2124 .hfront_porch = { 15, 64, 159 },
2125 .hback_porch = { 5, 5, 5 },
2126 .hsync_len = { 1, 1, 256 },
2127 .vactive = { 800, 800, 800 },
2128 .vfront_porch = { 3, 40, 99 },
2129 .vback_porch = { 2, 2, 2 },
2130 .vsync_len = { 1, 1, 128 },
2131 .flags = DISPLAY_FLAGS_DE_HIGH,
2132};
2133
2134static const struct panel_desc tianma_tm070jdhg30 = {
2135 .timings = &tianma_tm070jdhg30_timing,
2136 .num_timings = 1,
2137 .bpc = 8,
2138 .size = {
2139 .width = 151,
2140 .height = 95,
2141 },
2142 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2143};
2144
Lukasz Majewski870a0b12017-11-07 16:30:58 +01002145static const struct display_timing tianma_tm070rvhg71_timing = {
2146 .pixelclock = { 27700000, 29200000, 39600000 },
2147 .hactive = { 800, 800, 800 },
2148 .hfront_porch = { 12, 40, 212 },
2149 .hback_porch = { 88, 88, 88 },
2150 .hsync_len = { 1, 1, 40 },
2151 .vactive = { 480, 480, 480 },
2152 .vfront_porch = { 1, 13, 88 },
2153 .vback_porch = { 32, 32, 32 },
2154 .vsync_len = { 1, 1, 3 },
2155 .flags = DISPLAY_FLAGS_DE_HIGH,
2156};
2157
2158static const struct panel_desc tianma_tm070rvhg71 = {
2159 .timings = &tianma_tm070rvhg71_timing,
2160 .num_timings = 1,
2161 .bpc = 8,
2162 .size = {
2163 .width = 154,
2164 .height = 86,
2165 },
2166 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2167};
2168
Lucas Stach06e733e2017-10-18 19:22:40 +02002169static const struct drm_display_mode toshiba_lt089ac29000_mode = {
2170 .clock = 79500,
2171 .hdisplay = 1280,
2172 .hsync_start = 1280 + 192,
2173 .hsync_end = 1280 + 192 + 128,
2174 .htotal = 1280 + 192 + 128 + 64,
2175 .vdisplay = 768,
2176 .vsync_start = 768 + 20,
2177 .vsync_end = 768 + 20 + 7,
2178 .vtotal = 768 + 20 + 7 + 3,
2179 .vrefresh = 60,
2180};
2181
2182static const struct panel_desc toshiba_lt089ac29000 = {
2183 .modes = &toshiba_lt089ac29000_mode,
2184 .num_modes = 1,
2185 .size = {
2186 .width = 194,
2187 .height = 116,
2188 },
2189 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2190 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
2191};
2192
Bhuvanchandra DV227e4f42016-05-05 11:47:07 +05302193static const struct drm_display_mode tpk_f07a_0102_mode = {
2194 .clock = 33260,
2195 .hdisplay = 800,
2196 .hsync_start = 800 + 40,
2197 .hsync_end = 800 + 40 + 128,
2198 .htotal = 800 + 40 + 128 + 88,
2199 .vdisplay = 480,
2200 .vsync_start = 480 + 10,
2201 .vsync_end = 480 + 10 + 2,
2202 .vtotal = 480 + 10 + 2 + 33,
2203 .vrefresh = 60,
2204};
2205
2206static const struct panel_desc tpk_f07a_0102 = {
2207 .modes = &tpk_f07a_0102_mode,
2208 .num_modes = 1,
2209 .size = {
2210 .width = 152,
2211 .height = 91,
2212 },
2213 .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE,
2214};
2215
2216static const struct drm_display_mode tpk_f10a_0102_mode = {
2217 .clock = 45000,
2218 .hdisplay = 1024,
2219 .hsync_start = 1024 + 176,
2220 .hsync_end = 1024 + 176 + 5,
2221 .htotal = 1024 + 176 + 5 + 88,
2222 .vdisplay = 600,
2223 .vsync_start = 600 + 20,
2224 .vsync_end = 600 + 20 + 5,
2225 .vtotal = 600 + 20 + 5 + 25,
2226 .vrefresh = 60,
2227};
2228
2229static const struct panel_desc tpk_f10a_0102 = {
2230 .modes = &tpk_f10a_0102_mode,
2231 .num_modes = 1,
2232 .size = {
2233 .width = 223,
2234 .height = 125,
2235 },
2236};
2237
Maciej S. Szmigiero06a9dc62016-02-13 22:52:03 +01002238static const struct display_timing urt_umsh_8596md_timing = {
2239 .pixelclock = { 33260000, 33260000, 33260000 },
2240 .hactive = { 800, 800, 800 },
2241 .hfront_porch = { 41, 41, 41 },
2242 .hback_porch = { 216 - 128, 216 - 128, 216 - 128 },
2243 .hsync_len = { 71, 128, 128 },
2244 .vactive = { 480, 480, 480 },
2245 .vfront_porch = { 10, 10, 10 },
2246 .vback_porch = { 35 - 2, 35 - 2, 35 - 2 },
2247 .vsync_len = { 2, 2, 2 },
2248 .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE |
2249 DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
2250};
2251
2252static const struct panel_desc urt_umsh_8596md_lvds = {
2253 .timings = &urt_umsh_8596md_timing,
2254 .num_timings = 1,
2255 .bpc = 6,
2256 .size = {
2257 .width = 152,
2258 .height = 91,
2259 },
2260 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
2261};
2262
2263static const struct panel_desc urt_umsh_8596md_parallel = {
2264 .timings = &urt_umsh_8596md_timing,
2265 .num_timings = 1,
2266 .bpc = 6,
2267 .size = {
2268 .width = 152,
2269 .height = 91,
2270 },
2271 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2272};
2273
Richard Genoude4bac402017-03-27 12:33:23 +02002274static const struct drm_display_mode winstar_wf35ltiacd_mode = {
2275 .clock = 6410,
2276 .hdisplay = 320,
2277 .hsync_start = 320 + 20,
2278 .hsync_end = 320 + 20 + 30,
2279 .htotal = 320 + 20 + 30 + 38,
2280 .vdisplay = 240,
2281 .vsync_start = 240 + 4,
2282 .vsync_end = 240 + 4 + 3,
2283 .vtotal = 240 + 4 + 3 + 15,
2284 .vrefresh = 60,
2285 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2286};
2287
2288static const struct panel_desc winstar_wf35ltiacd = {
2289 .modes = &winstar_wf35ltiacd_mode,
2290 .num_modes = 1,
2291 .bpc = 8,
2292 .size = {
2293 .width = 70,
2294 .height = 53,
2295 },
2296 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2297};
2298
Thierry Reding280921d2013-08-30 15:10:14 +02002299static const struct of_device_id platform_of_match[] = {
2300 {
Yannick Fertre966fea72017-03-28 11:44:49 +02002301 .compatible = "ampire,am-480272h3tmqw-t01h",
2302 .data = &ampire_am_480272h3tmqw_t01h,
2303 }, {
Philipp Zabel1c550fa12015-02-11 18:50:09 +01002304 .compatible = "ampire,am800480r3tmqwa1h",
2305 .data = &ampire_am800480r3tmqwa1h,
2306 }, {
Thierry Reding280921d2013-08-30 15:10:14 +02002307 .compatible = "auo,b101aw03",
2308 .data = &auo_b101aw03,
2309 }, {
Huang Lina531bc32015-02-28 10:18:58 +08002310 .compatible = "auo,b101ean01",
2311 .data = &auo_b101ean01,
2312 }, {
Rob Clarkdac746e2014-08-01 17:01:06 -04002313 .compatible = "auo,b101xtn01",
2314 .data = &auo_b101xtn01,
2315 }, {
Ajay Kumare35e3052014-09-01 15:40:02 +05302316 .compatible = "auo,b116xw03",
2317 .data = &auo_b116xw03,
2318 }, {
Ajay Kumar3e51d602014-07-31 23:12:12 +05302319 .compatible = "auo,b133htn01",
2320 .data = &auo_b133htn01,
2321 }, {
Stéphane Marchesina333f7a2014-05-23 19:27:59 -07002322 .compatible = "auo,b133xtn01",
2323 .data = &auo_b133xtn01,
2324 }, {
Lukasz Majewskibccfaff2018-05-14 21:08:49 +02002325 .compatible = "auo,g070vvn01",
2326 .data = &auo_g070vvn01,
2327 }, {
Christoph Fritz4451c282017-12-16 14:13:36 +01002328 .compatible = "auo,g104sn02",
2329 .data = &auo_g104sn02,
2330 }, {
Lucas Stach697035c2016-11-30 14:09:55 +01002331 .compatible = "auo,g133han01",
2332 .data = &auo_g133han01,
2333 }, {
Lucas Stach8c31f602016-11-30 14:09:56 +01002334 .compatible = "auo,g185han01",
2335 .data = &auo_g185han01,
2336 }, {
Lucas Stach70c0d5b2017-06-08 20:07:58 +02002337 .compatible = "auo,p320hvn03",
2338 .data = &auo_p320hvn03,
2339 }, {
Haixia Shi7ee933a2016-10-11 14:59:16 -07002340 .compatible = "auo,t215hvn01",
2341 .data = &auo_t215hvn01,
2342 }, {
Philipp Zabeld47df632014-12-18 16:43:43 +01002343 .compatible = "avic,tm070ddh03",
2344 .data = &avic_tm070ddh03,
2345 }, {
Andrzej Hajdaae8cf412018-06-19 10:19:26 +02002346 .compatible = "boe,hv070wsa-100",
2347 .data = &boe_hv070wsa
2348 }, {
Caesar Wangcac1a412016-12-14 11:19:56 +08002349 .compatible = "boe,nv101wxmn51",
2350 .data = &boe_nv101wxmn51,
2351 }, {
Randy Li2cb35c82016-09-20 03:02:51 +08002352 .compatible = "chunghwa,claa070wp03xg",
2353 .data = &chunghwa_claa070wp03xg,
2354 }, {
Stephen Warren4c930752014-01-07 16:46:26 -07002355 .compatible = "chunghwa,claa101wa01a",
2356 .data = &chunghwa_claa101wa01a
2357 }, {
Thierry Reding280921d2013-08-30 15:10:14 +02002358 .compatible = "chunghwa,claa101wb01",
2359 .data = &chunghwa_claa101wb01
2360 }, {
Michal Vokáč97ceb1f2018-06-25 14:41:30 +02002361 .compatible = "dataimage,scf0700c48ggu18",
2362 .data = &dataimage_scf0700c48ggu18,
2363 }, {
Philipp Zabel0ca0c822018-05-23 11:25:04 +02002364 .compatible = "dlc,dlc0700yzg-1",
2365 .data = &dlc_dlc0700yzg_1,
2366 }, {
Stefan Agner26ab0062014-05-15 11:38:45 +02002367 .compatible = "edt,et057090dhu",
2368 .data = &edt_et057090dhu,
2369 }, {
Philipp Zabelfff5de42014-05-15 12:25:47 +02002370 .compatible = "edt,et070080dh6",
2371 .data = &edt_etm0700g0dh6,
2372 }, {
2373 .compatible = "edt,etm0700g0dh6",
2374 .data = &edt_etm0700g0dh6,
2375 }, {
Jan Tuerkaa7e6452018-06-19 11:55:44 +02002376 .compatible = "edt,etm0700g0bdh6",
2377 .data = &edt_etm0700g0bdh6,
2378 }, {
Jan Tuerkaad34de2018-06-19 11:55:45 +02002379 .compatible = "edt,etm0700g0edh6",
2380 .data = &edt_etm0700g0bdh6,
2381 }, {
Boris BREZILLON102932b2014-06-05 15:53:32 +02002382 .compatible = "foxlink,fl500wvr00-a0t",
2383 .data = &foxlink_fl500wvr00_a0t,
2384 }, {
Philipp Zabeld435a2a2014-11-19 10:29:55 +01002385 .compatible = "giantplus,gpg482739qs5",
2386 .data = &giantplus_gpg482739qs5
2387 }, {
Philipp Zabela8532052014-10-23 16:31:06 +02002388 .compatible = "hannstar,hsd070pww1",
2389 .data = &hannstar_hsd070pww1,
2390 }, {
Eric Nelsonc0d607e2015-04-13 15:09:26 -07002391 .compatible = "hannstar,hsd100pxn1",
2392 .data = &hannstar_hsd100pxn1,
2393 }, {
Lucas Stach61ac0bf2014-11-06 17:44:35 +01002394 .compatible = "hit,tx23d38vm0caa",
2395 .data = &hitachi_tx23d38vm0caa
2396 }, {
Nicolas Ferre41bcceb2015-03-19 14:43:01 +01002397 .compatible = "innolux,at043tn24",
2398 .data = &innolux_at043tn24,
2399 }, {
Riccardo Bortolato4fc24ab2016-04-20 15:37:15 +02002400 .compatible = "innolux,at070tn92",
2401 .data = &innolux_at070tn92,
2402 }, {
Christoph Fritza5d2ade2018-06-04 13:16:48 +02002403 .compatible = "innolux,g070y2-l01",
2404 .data = &innolux_g070y2_l01,
2405 }, {
2406 .compatible = "innolux,g101ice-l01",
Michael Olbrich1e29b842016-08-15 14:32:02 +02002407 .data = &innolux_g101ice_l01
2408 }, {
Christoph Fritza5d2ade2018-06-04 13:16:48 +02002409 .compatible = "innolux,g121i1-l01",
Lucas Stachd731f662014-11-06 17:44:33 +01002410 .data = &innolux_g121i1_l01
2411 }, {
Akshay Bhatf8fa17b2015-11-18 15:57:47 -05002412 .compatible = "innolux,g121x1-l03",
2413 .data = &innolux_g121x1_l03,
2414 }, {
Thierry Reding0a2288c2014-07-03 14:02:59 +02002415 .compatible = "innolux,n116bge",
2416 .data = &innolux_n116bge,
2417 }, {
Alban Bedelea447392014-07-22 08:38:55 +02002418 .compatible = "innolux,n156bge-l21",
2419 .data = &innolux_n156bge_l21,
2420 }, {
spanda@codeaurora.orgda50bd42018-05-15 11:22:43 +05302421 .compatible = "innolux,tv123wam",
2422 .data = &innolux_tv123wam,
2423 }, {
Michael Grzeschikbccac3f2015-03-19 12:22:44 +01002424 .compatible = "innolux,zj070na-01p",
2425 .data = &innolux_zj070na_01p,
2426 }, {
Jagan Teki8cfe8342018-02-04 23:19:28 +05302427 .compatible = "koe,tx31d200vm0baa",
2428 .data = &koe_tx31d200vm0baa,
2429 }, {
Lucas Stach8def22e2015-12-02 19:41:11 +01002430 .compatible = "kyo,tcg121xglp",
2431 .data = &kyo_tcg121xglp,
2432 }, {
Heiko Schocherdd015002015-05-22 10:25:57 +02002433 .compatible = "lg,lb070wv8",
2434 .data = &lg_lb070wv8,
2435 }, {
Yakir Yangc5ece402016-06-28 12:51:15 +08002436 .compatible = "lg,lp079qx1-sp0v",
2437 .data = &lg_lp079qx1_sp0v,
2438 }, {
Yakir Yang0355dde2016-06-12 10:56:02 +08002439 .compatible = "lg,lp097qx1-spa1",
2440 .data = &lg_lp097qx1_spa1,
2441 }, {
Jitao Shi690d8fa2016-02-22 19:01:44 +08002442 .compatible = "lg,lp120up1",
2443 .data = &lg_lp120up1,
2444 }, {
Thierry Redingec7c5652013-11-15 15:59:32 +01002445 .compatible = "lg,lp129qe",
2446 .data = &lg_lp129qe,
2447 }, {
Lukasz Majewski65c766c2017-10-21 00:18:37 +02002448 .compatible = "mitsubishi,aa070mc01-ca1",
2449 .data = &mitsubishi_aa070mc01,
2450 }, {
Lucas Stach01bacc132017-06-08 20:07:55 +02002451 .compatible = "nec,nl12880bc20-05",
2452 .data = &nec_nl12880bc20_05,
2453 }, {
jianwei wangc6e87f92015-07-29 16:30:02 +08002454 .compatible = "nec,nl4827hc19-05b",
2455 .data = &nec_nl4827hc19_05b,
2456 }, {
Maxime Riparde6c2f062016-09-06 16:46:17 +02002457 .compatible = "netron-dy,e231732",
2458 .data = &netron_dy_e231732,
2459 }, {
Tomi Valkeinen3b39ad72018-06-18 16:22:40 +03002460 .compatible = "newhaven,nhd-4.3-480272ef-atxl",
2461 .data = &newhaven_nhd_43_480272ef_atxl,
2462 }, {
Lucas Stach4177fa62017-06-08 20:07:57 +02002463 .compatible = "nlt,nl192108ac18-02d",
2464 .data = &nlt_nl192108ac18_02d,
2465 }, {
Fabien Lahoudere05ec0e42016-10-17 11:38:01 +02002466 .compatible = "nvd,9128",
2467 .data = &nvd_9128,
2468 }, {
Gary Bissona99fb622015-06-10 18:44:23 +02002469 .compatible = "okaya,rs800480t-7x0gp",
2470 .data = &okaya_rs800480t_7x0gp,
2471 }, {
Maxime Ripardcf5c9e62016-03-23 17:38:34 +01002472 .compatible = "olimex,lcd-olinuxino-43-ts",
2473 .data = &olimex_lcd_olinuxino_43ts,
2474 }, {
Eric Anholte8b6f562016-03-24 17:23:48 -07002475 .compatible = "ontat,yx700wv03",
2476 .data = &ontat_yx700wv03,
2477 }, {
Philipp Zabel725c9d42015-02-11 18:50:11 +01002478 .compatible = "ortustech,com43h4m85ulc",
2479 .data = &ortustech_com43h4m85ulc,
2480 }, {
Josh Wud2a6f0f2015-10-08 17:42:41 +02002481 .compatible = "qiaodian,qd43003c0-40",
2482 .data = &qd43003c0_40,
2483 }, {
Jagan Teki23167fa2018-06-07 19:16:48 +05302484 .compatible = "rocktech,rk070er9427",
2485 .data = &rocktech_rk070er9427,
2486 }, {
Yakir Yang0330eaf2016-06-12 10:56:13 +08002487 .compatible = "samsung,lsn122dl01-c01",
2488 .data = &samsung_lsn122dl01_c01,
2489 }, {
Marc Dietrich6d54e3d2013-12-21 21:38:12 +01002490 .compatible = "samsung,ltn101nt05",
2491 .data = &samsung_ltn101nt05,
2492 }, {
Stéphane Marchesin0c934302015-03-18 10:52:18 +01002493 .compatible = "samsung,ltn140at29-301",
2494 .data = &samsung_ltn140at29_301,
2495 }, {
Joshua Clayton592aa022016-07-06 15:59:16 -07002496 .compatible = "sharp,lq101k1ly04",
2497 .data = &sharp_lq101k1ly04,
2498 }, {
Yakir Yang739c7de2016-06-12 10:56:35 +08002499 .compatible = "sharp,lq123p1jx31",
2500 .data = &sharp_lq123p1jx31,
2501 }, {
Gustaf Lindström0f9cdd72016-10-04 17:29:21 +02002502 .compatible = "sharp,lq150x1lg11",
2503 .data = &sharp_lq150x1lg11,
2504 }, {
Boris BREZILLON9c6615b2015-03-19 14:43:00 +01002505 .compatible = "shelly,sca07010-bfn-lnn",
2506 .data = &shelly_sca07010_bfn_lnn,
2507 }, {
Douglas Anderson9bb34c42016-06-10 10:02:07 -07002508 .compatible = "starry,kr122ea0sra",
2509 .data = &starry_kr122ea0sra,
2510 }, {
Gary Bissonadb973e2016-12-02 09:52:08 +01002511 .compatible = "tianma,tm070jdhg30",
2512 .data = &tianma_tm070jdhg30,
2513 }, {
Lukasz Majewski870a0b12017-11-07 16:30:58 +01002514 .compatible = "tianma,tm070rvhg71",
2515 .data = &tianma_tm070rvhg71,
2516 }, {
Lucas Stach06e733e2017-10-18 19:22:40 +02002517 .compatible = "toshiba,lt089ac29000",
2518 .data = &toshiba_lt089ac29000,
2519 }, {
Bhuvanchandra DV227e4f42016-05-05 11:47:07 +05302520 .compatible = "tpk,f07a-0102",
2521 .data = &tpk_f07a_0102,
2522 }, {
2523 .compatible = "tpk,f10a-0102",
2524 .data = &tpk_f10a_0102,
2525 }, {
Maciej S. Szmigiero06a9dc62016-02-13 22:52:03 +01002526 .compatible = "urt,umsh-8596md-t",
2527 .data = &urt_umsh_8596md_parallel,
2528 }, {
2529 .compatible = "urt,umsh-8596md-1t",
2530 .data = &urt_umsh_8596md_parallel,
2531 }, {
2532 .compatible = "urt,umsh-8596md-7t",
2533 .data = &urt_umsh_8596md_parallel,
2534 }, {
2535 .compatible = "urt,umsh-8596md-11t",
2536 .data = &urt_umsh_8596md_lvds,
2537 }, {
2538 .compatible = "urt,umsh-8596md-19t",
2539 .data = &urt_umsh_8596md_lvds,
2540 }, {
2541 .compatible = "urt,umsh-8596md-20t",
2542 .data = &urt_umsh_8596md_parallel,
2543 }, {
Richard Genoude4bac402017-03-27 12:33:23 +02002544 .compatible = "winstar,wf35ltiacd",
2545 .data = &winstar_wf35ltiacd,
2546 }, {
Thierry Reding280921d2013-08-30 15:10:14 +02002547 /* sentinel */
2548 }
2549};
2550MODULE_DEVICE_TABLE(of, platform_of_match);
2551
2552static int panel_simple_platform_probe(struct platform_device *pdev)
2553{
2554 const struct of_device_id *id;
2555
2556 id = of_match_node(platform_of_match, pdev->dev.of_node);
2557 if (!id)
2558 return -ENODEV;
2559
2560 return panel_simple_probe(&pdev->dev, id->data);
2561}
2562
2563static int panel_simple_platform_remove(struct platform_device *pdev)
2564{
2565 return panel_simple_remove(&pdev->dev);
2566}
2567
Thierry Redingd02fd932014-04-29 17:21:21 +02002568static void panel_simple_platform_shutdown(struct platform_device *pdev)
2569{
2570 panel_simple_shutdown(&pdev->dev);
2571}
2572
Thierry Reding280921d2013-08-30 15:10:14 +02002573static struct platform_driver panel_simple_platform_driver = {
2574 .driver = {
2575 .name = "panel-simple",
Thierry Reding280921d2013-08-30 15:10:14 +02002576 .of_match_table = platform_of_match,
2577 },
2578 .probe = panel_simple_platform_probe,
2579 .remove = panel_simple_platform_remove,
Thierry Redingd02fd932014-04-29 17:21:21 +02002580 .shutdown = panel_simple_platform_shutdown,
Thierry Reding280921d2013-08-30 15:10:14 +02002581};
2582
Thierry Reding210fcd92013-11-22 19:27:11 +01002583struct panel_desc_dsi {
2584 struct panel_desc desc;
2585
Thierry Reding462658b2014-03-14 11:24:57 +01002586 unsigned long flags;
Thierry Reding210fcd92013-11-22 19:27:11 +01002587 enum mipi_dsi_pixel_format format;
2588 unsigned int lanes;
2589};
2590
Thierry Redingd718d792015-04-08 16:52:33 +02002591static const struct drm_display_mode auo_b080uan01_mode = {
2592 .clock = 154500,
2593 .hdisplay = 1200,
2594 .hsync_start = 1200 + 62,
2595 .hsync_end = 1200 + 62 + 4,
2596 .htotal = 1200 + 62 + 4 + 62,
2597 .vdisplay = 1920,
2598 .vsync_start = 1920 + 9,
2599 .vsync_end = 1920 + 9 + 2,
2600 .vtotal = 1920 + 9 + 2 + 8,
2601 .vrefresh = 60,
2602};
2603
2604static const struct panel_desc_dsi auo_b080uan01 = {
2605 .desc = {
2606 .modes = &auo_b080uan01_mode,
2607 .num_modes = 1,
2608 .bpc = 8,
2609 .size = {
2610 .width = 108,
2611 .height = 272,
2612 },
2613 },
2614 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
2615 .format = MIPI_DSI_FMT_RGB888,
2616 .lanes = 4,
2617};
2618
Chris Zhongc8521962015-11-20 16:15:37 +08002619static const struct drm_display_mode boe_tv080wum_nl0_mode = {
2620 .clock = 160000,
2621 .hdisplay = 1200,
2622 .hsync_start = 1200 + 120,
2623 .hsync_end = 1200 + 120 + 20,
2624 .htotal = 1200 + 120 + 20 + 21,
2625 .vdisplay = 1920,
2626 .vsync_start = 1920 + 21,
2627 .vsync_end = 1920 + 21 + 3,
2628 .vtotal = 1920 + 21 + 3 + 18,
2629 .vrefresh = 60,
2630 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2631};
2632
2633static const struct panel_desc_dsi boe_tv080wum_nl0 = {
2634 .desc = {
2635 .modes = &boe_tv080wum_nl0_mode,
2636 .num_modes = 1,
2637 .size = {
2638 .width = 107,
2639 .height = 172,
2640 },
2641 },
2642 .flags = MIPI_DSI_MODE_VIDEO |
2643 MIPI_DSI_MODE_VIDEO_BURST |
2644 MIPI_DSI_MODE_VIDEO_SYNC_PULSE,
2645 .format = MIPI_DSI_FMT_RGB888,
2646 .lanes = 4,
2647};
2648
Alexandre Courbot712ac1b2014-01-21 18:57:10 +09002649static const struct drm_display_mode lg_ld070wx3_sl01_mode = {
2650 .clock = 71000,
2651 .hdisplay = 800,
2652 .hsync_start = 800 + 32,
2653 .hsync_end = 800 + 32 + 1,
2654 .htotal = 800 + 32 + 1 + 57,
2655 .vdisplay = 1280,
2656 .vsync_start = 1280 + 28,
2657 .vsync_end = 1280 + 28 + 1,
2658 .vtotal = 1280 + 28 + 1 + 14,
2659 .vrefresh = 60,
2660};
2661
2662static const struct panel_desc_dsi lg_ld070wx3_sl01 = {
2663 .desc = {
2664 .modes = &lg_ld070wx3_sl01_mode,
2665 .num_modes = 1,
Thierry Redingd7a839c2014-11-06 10:11:01 +01002666 .bpc = 8,
Alexandre Courbot712ac1b2014-01-21 18:57:10 +09002667 .size = {
2668 .width = 94,
2669 .height = 151,
2670 },
2671 },
Alexandre Courbot5e4cc272014-07-08 21:32:12 +09002672 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
Alexandre Courbot712ac1b2014-01-21 18:57:10 +09002673 .format = MIPI_DSI_FMT_RGB888,
2674 .lanes = 4,
2675};
2676
Alexandre Courbot499ce852014-01-21 18:57:09 +09002677static const struct drm_display_mode lg_lh500wx1_sd03_mode = {
2678 .clock = 67000,
2679 .hdisplay = 720,
2680 .hsync_start = 720 + 12,
2681 .hsync_end = 720 + 12 + 4,
2682 .htotal = 720 + 12 + 4 + 112,
2683 .vdisplay = 1280,
2684 .vsync_start = 1280 + 8,
2685 .vsync_end = 1280 + 8 + 4,
2686 .vtotal = 1280 + 8 + 4 + 12,
2687 .vrefresh = 60,
2688};
2689
2690static const struct panel_desc_dsi lg_lh500wx1_sd03 = {
2691 .desc = {
2692 .modes = &lg_lh500wx1_sd03_mode,
2693 .num_modes = 1,
Thierry Redingd7a839c2014-11-06 10:11:01 +01002694 .bpc = 8,
Alexandre Courbot499ce852014-01-21 18:57:09 +09002695 .size = {
2696 .width = 62,
2697 .height = 110,
2698 },
2699 },
2700 .flags = MIPI_DSI_MODE_VIDEO,
2701 .format = MIPI_DSI_FMT_RGB888,
2702 .lanes = 4,
2703};
2704
Thierry Reding280921d2013-08-30 15:10:14 +02002705static const struct drm_display_mode panasonic_vvx10f004b00_mode = {
2706 .clock = 157200,
2707 .hdisplay = 1920,
2708 .hsync_start = 1920 + 154,
2709 .hsync_end = 1920 + 154 + 16,
2710 .htotal = 1920 + 154 + 16 + 32,
2711 .vdisplay = 1200,
2712 .vsync_start = 1200 + 17,
2713 .vsync_end = 1200 + 17 + 2,
2714 .vtotal = 1200 + 17 + 2 + 16,
2715 .vrefresh = 60,
2716};
2717
Thierry Reding210fcd92013-11-22 19:27:11 +01002718static const struct panel_desc_dsi panasonic_vvx10f004b00 = {
2719 .desc = {
2720 .modes = &panasonic_vvx10f004b00_mode,
2721 .num_modes = 1,
Thierry Redingd7a839c2014-11-06 10:11:01 +01002722 .bpc = 8,
Thierry Reding210fcd92013-11-22 19:27:11 +01002723 .size = {
2724 .width = 217,
2725 .height = 136,
2726 },
Thierry Reding280921d2013-08-30 15:10:14 +02002727 },
Alexandre Courbot5e4cc272014-07-08 21:32:12 +09002728 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
2729 MIPI_DSI_CLOCK_NON_CONTINUOUS,
Thierry Reding210fcd92013-11-22 19:27:11 +01002730 .format = MIPI_DSI_FMT_RGB888,
2731 .lanes = 4,
2732};
2733
2734static const struct of_device_id dsi_of_match[] = {
2735 {
Thierry Redingd718d792015-04-08 16:52:33 +02002736 .compatible = "auo,b080uan01",
2737 .data = &auo_b080uan01
2738 }, {
Chris Zhongc8521962015-11-20 16:15:37 +08002739 .compatible = "boe,tv080wum-nl0",
2740 .data = &boe_tv080wum_nl0
2741 }, {
Alexandre Courbot712ac1b2014-01-21 18:57:10 +09002742 .compatible = "lg,ld070wx3-sl01",
2743 .data = &lg_ld070wx3_sl01
2744 }, {
Alexandre Courbot499ce852014-01-21 18:57:09 +09002745 .compatible = "lg,lh500wx1-sd03",
2746 .data = &lg_lh500wx1_sd03
2747 }, {
Thierry Reding210fcd92013-11-22 19:27:11 +01002748 .compatible = "panasonic,vvx10f004b00",
2749 .data = &panasonic_vvx10f004b00
2750 }, {
2751 /* sentinel */
2752 }
2753};
2754MODULE_DEVICE_TABLE(of, dsi_of_match);
2755
2756static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
2757{
2758 const struct panel_desc_dsi *desc;
2759 const struct of_device_id *id;
2760 int err;
2761
2762 id = of_match_node(dsi_of_match, dsi->dev.of_node);
2763 if (!id)
2764 return -ENODEV;
2765
2766 desc = id->data;
2767
2768 err = panel_simple_probe(&dsi->dev, &desc->desc);
2769 if (err < 0)
2770 return err;
2771
Thierry Reding462658b2014-03-14 11:24:57 +01002772 dsi->mode_flags = desc->flags;
Thierry Reding210fcd92013-11-22 19:27:11 +01002773 dsi->format = desc->format;
2774 dsi->lanes = desc->lanes;
2775
2776 return mipi_dsi_attach(dsi);
2777}
2778
2779static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi)
2780{
2781 int err;
2782
2783 err = mipi_dsi_detach(dsi);
2784 if (err < 0)
2785 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
2786
2787 return panel_simple_remove(&dsi->dev);
2788}
2789
Thierry Redingd02fd932014-04-29 17:21:21 +02002790static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi)
2791{
2792 panel_simple_shutdown(&dsi->dev);
2793}
2794
Thierry Reding210fcd92013-11-22 19:27:11 +01002795static struct mipi_dsi_driver panel_simple_dsi_driver = {
2796 .driver = {
2797 .name = "panel-simple-dsi",
Thierry Reding210fcd92013-11-22 19:27:11 +01002798 .of_match_table = dsi_of_match,
2799 },
2800 .probe = panel_simple_dsi_probe,
2801 .remove = panel_simple_dsi_remove,
Thierry Redingd02fd932014-04-29 17:21:21 +02002802 .shutdown = panel_simple_dsi_shutdown,
Thierry Reding280921d2013-08-30 15:10:14 +02002803};
2804
2805static int __init panel_simple_init(void)
2806{
Thierry Reding210fcd92013-11-22 19:27:11 +01002807 int err;
2808
2809 err = platform_driver_register(&panel_simple_platform_driver);
2810 if (err < 0)
2811 return err;
2812
2813 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) {
2814 err = mipi_dsi_driver_register(&panel_simple_dsi_driver);
2815 if (err < 0)
2816 return err;
2817 }
2818
2819 return 0;
Thierry Reding280921d2013-08-30 15:10:14 +02002820}
2821module_init(panel_simple_init);
2822
2823static void __exit panel_simple_exit(void)
2824{
Thierry Reding210fcd92013-11-22 19:27:11 +01002825 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI))
2826 mipi_dsi_driver_unregister(&panel_simple_dsi_driver);
2827
Thierry Reding280921d2013-08-30 15:10:14 +02002828 platform_driver_unregister(&panel_simple_platform_driver);
2829}
2830module_exit(panel_simple_exit);
2831
2832MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>");
2833MODULE_DESCRIPTION("DRM Driver for Simple Panels");
2834MODULE_LICENSE("GPL and additional rights");