blob: 82363d05bad4c13ef45f3766a477e4973fb73b66 [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
Sam Ravnborgcb23eae2019-05-26 20:05:32 +020024#include <linux/delay.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
Philipp Zabela5d3e622014-12-11 18:32:45 +010031#include <video/display_timing.h>
Sean Paulb8a29482019-07-11 13:34:53 -070032#include <video/of_display_timing.h>
Philipp Zabela5d3e622014-12-11 18:32:45 +010033#include <video/videomode.h>
34
Sam Ravnborgcb23eae2019-05-26 20:05:32 +020035#include <drm/drm_crtc.h>
36#include <drm/drm_device.h>
37#include <drm/drm_mipi_dsi.h>
38#include <drm/drm_panel.h>
39
Douglas Andersone362cc62019-07-12 09:33:33 -070040/**
41 * @modes: Pointer to array of fixed modes appropriate for this panel. If
42 * only one mode then this can just be the address of this the mode.
43 * NOTE: cannot be used with "timings" and also if this is specified
44 * then you cannot override the mode in the device tree.
45 * @num_modes: Number of elements in modes array.
46 * @timings: Pointer to array of display timings. NOTE: cannot be used with
47 * "modes" and also these will be used to validate a device tree
48 * override if one is present.
49 * @num_timings: Number of elements in timings array.
50 * @bpc: Bits per color.
51 * @size: Structure containing the physical size of this panel.
52 * @delay: Structure containing various delay values for this panel.
53 * @bus_format: See MEDIA_BUS_FMT_... defines.
54 * @bus_flags: See DRM_BUS_FLAG_... defines.
55 */
Thierry Reding280921d2013-08-30 15:10:14 +020056struct panel_desc {
57 const struct drm_display_mode *modes;
58 unsigned int num_modes;
Philipp Zabela5d3e622014-12-11 18:32:45 +010059 const struct display_timing *timings;
60 unsigned int num_timings;
Thierry Reding280921d2013-08-30 15:10:14 +020061
Stéphane Marchesin0208d512014-06-19 18:18:28 -070062 unsigned int bpc;
63
Ulrich Ölmann85533e32015-12-04 12:31:28 +010064 /**
65 * @width: width (in millimeters) of the panel's active display area
66 * @height: height (in millimeters) of the panel's active display area
67 */
Thierry Reding280921d2013-08-30 15:10:14 +020068 struct {
69 unsigned int width;
70 unsigned int height;
71 } size;
Ajay Kumarf673c372014-07-31 23:12:11 +053072
73 /**
74 * @prepare: the time (in milliseconds) that it takes for the panel to
75 * become ready and start receiving video data
Douglas Anderson2ed3e952018-10-25 15:21:30 -070076 * @hpd_absent_delay: Add this to the prepare delay if we know Hot
77 * Plug Detect isn't used.
Ajay Kumarf673c372014-07-31 23:12:11 +053078 * @enable: the time (in milliseconds) that it takes for the panel to
79 * display the first valid frame after starting to receive
80 * video data
81 * @disable: the time (in milliseconds) that it takes for the panel to
82 * turn the display off (no content is visible)
83 * @unprepare: the time (in milliseconds) that it takes for the panel
84 * to power itself down completely
85 */
86 struct {
87 unsigned int prepare;
Douglas Anderson2ed3e952018-10-25 15:21:30 -070088 unsigned int hpd_absent_delay;
Ajay Kumarf673c372014-07-31 23:12:11 +053089 unsigned int enable;
90 unsigned int disable;
91 unsigned int unprepare;
92 } delay;
Boris Brezillon795f7ab2014-07-22 13:33:59 +020093
94 u32 bus_format;
Stefan Agnerf0aa0832016-02-08 11:38:14 -080095 u32 bus_flags;
Laurent Pinchart9a2654c2019-09-04 16:28:03 +030096 int connector_type;
Thierry Reding280921d2013-08-30 15:10:14 +020097};
98
Thierry Reding280921d2013-08-30 15:10:14 +020099struct panel_simple {
100 struct drm_panel base;
Ajay Kumar613a6332014-07-31 23:12:10 +0530101 bool prepared;
Thierry Reding280921d2013-08-30 15:10:14 +0200102 bool enabled;
Douglas Anderson2ed3e952018-10-25 15:21:30 -0700103 bool no_hpd;
Thierry Reding280921d2013-08-30 15:10:14 +0200104
105 const struct panel_desc *desc;
106
Thierry Reding280921d2013-08-30 15:10:14 +0200107 struct regulator *supply;
108 struct i2c_adapter *ddc;
109
Alexandre Courbotcfdf0542014-03-01 14:00:58 +0900110 struct gpio_desc *enable_gpio;
Sean Paulb8a29482019-07-11 13:34:53 -0700111
112 struct drm_display_mode override_mode;
Thierry Reding280921d2013-08-30 15:10:14 +0200113};
114
115static inline struct panel_simple *to_panel_simple(struct drm_panel *panel)
116{
117 return container_of(panel, struct panel_simple, base);
118}
119
Sam Ravnborg0ce8ddd2019-12-07 15:03:33 +0100120static unsigned int panel_simple_get_timings_modes(struct panel_simple *panel,
121 struct drm_connector *connector)
Thierry Reding280921d2013-08-30 15:10:14 +0200122{
Thierry Reding280921d2013-08-30 15:10:14 +0200123 struct drm_display_mode *mode;
124 unsigned int i, num = 0;
125
Philipp Zabela5d3e622014-12-11 18:32:45 +0100126 for (i = 0; i < panel->desc->num_timings; i++) {
127 const struct display_timing *dt = &panel->desc->timings[i];
128 struct videomode vm;
129
130 videomode_from_timing(dt, &vm);
Sam Ravnborgaa6c4362019-12-07 15:03:35 +0100131 mode = drm_mode_create(connector->dev);
Philipp Zabela5d3e622014-12-11 18:32:45 +0100132 if (!mode) {
Sam Ravnborgaa6c4362019-12-07 15:03:35 +0100133 dev_err(panel->base.dev, "failed to add mode %ux%u\n",
Philipp Zabela5d3e622014-12-11 18:32:45 +0100134 dt->hactive.typ, dt->vactive.typ);
135 continue;
136 }
137
138 drm_display_mode_from_videomode(&vm, mode);
Boris Brezilloncda55372016-04-15 18:23:33 +0200139
140 mode->type |= DRM_MODE_TYPE_DRIVER;
141
Chen-Yu Tsai230c5b42016-10-24 21:21:15 +0800142 if (panel->desc->num_timings == 1)
Boris Brezilloncda55372016-04-15 18:23:33 +0200143 mode->type |= DRM_MODE_TYPE_PREFERRED;
144
Philipp Zabela5d3e622014-12-11 18:32:45 +0100145 drm_mode_probed_add(connector, mode);
146 num++;
147 }
148
Sean Paulb8a29482019-07-11 13:34:53 -0700149 return num;
150}
151
Sam Ravnborg0ce8ddd2019-12-07 15:03:33 +0100152static unsigned int panel_simple_get_display_modes(struct panel_simple *panel,
153 struct drm_connector *connector)
Sean Paulb8a29482019-07-11 13:34:53 -0700154{
Sean Paulb8a29482019-07-11 13:34:53 -0700155 struct drm_display_mode *mode;
156 unsigned int i, num = 0;
157
Thierry Reding280921d2013-08-30 15:10:14 +0200158 for (i = 0; i < panel->desc->num_modes; i++) {
159 const struct drm_display_mode *m = &panel->desc->modes[i];
160
Sam Ravnborgaa6c4362019-12-07 15:03:35 +0100161 mode = drm_mode_duplicate(connector->dev, m);
Thierry Reding280921d2013-08-30 15:10:14 +0200162 if (!mode) {
Sam Ravnborgaa6c4362019-12-07 15:03:35 +0100163 dev_err(panel->base.dev, "failed to add mode %ux%u@%u\n",
Thierry Reding280921d2013-08-30 15:10:14 +0200164 m->hdisplay, m->vdisplay, m->vrefresh);
165 continue;
166 }
167
Boris Brezilloncda55372016-04-15 18:23:33 +0200168 mode->type |= DRM_MODE_TYPE_DRIVER;
169
170 if (panel->desc->num_modes == 1)
171 mode->type |= DRM_MODE_TYPE_PREFERRED;
172
Thierry Reding280921d2013-08-30 15:10:14 +0200173 drm_mode_set_name(mode);
174
175 drm_mode_probed_add(connector, mode);
176 num++;
177 }
178
Sean Paulb8a29482019-07-11 13:34:53 -0700179 return num;
180}
181
Sam Ravnborg0ce8ddd2019-12-07 15:03:33 +0100182static int panel_simple_get_non_edid_modes(struct panel_simple *panel,
183 struct drm_connector *connector)
Sean Paulb8a29482019-07-11 13:34:53 -0700184{
Sean Paulb8a29482019-07-11 13:34:53 -0700185 struct drm_display_mode *mode;
186 bool has_override = panel->override_mode.type;
187 unsigned int num = 0;
188
189 if (!panel->desc)
190 return 0;
191
192 if (has_override) {
Sam Ravnborgaa6c4362019-12-07 15:03:35 +0100193 mode = drm_mode_duplicate(connector->dev,
194 &panel->override_mode);
Sean Paulb8a29482019-07-11 13:34:53 -0700195 if (mode) {
196 drm_mode_probed_add(connector, mode);
197 num = 1;
198 } else {
Sam Ravnborgaa6c4362019-12-07 15:03:35 +0100199 dev_err(panel->base.dev, "failed to add override mode\n");
Sean Paulb8a29482019-07-11 13:34:53 -0700200 }
201 }
202
203 /* Only add timings if override was not there or failed to validate */
204 if (num == 0 && panel->desc->num_timings)
Sam Ravnborg0ce8ddd2019-12-07 15:03:33 +0100205 num = panel_simple_get_timings_modes(panel, connector);
Sean Paulb8a29482019-07-11 13:34:53 -0700206
207 /*
208 * Only add fixed modes if timings/override added no mode.
209 *
210 * We should only ever have either the display timings specified
211 * or a fixed mode. Anything else is rather bogus.
212 */
213 WARN_ON(panel->desc->num_timings && panel->desc->num_modes);
214 if (num == 0)
Sam Ravnborg0ce8ddd2019-12-07 15:03:33 +0100215 num = panel_simple_get_display_modes(panel, connector);
Sean Paulb8a29482019-07-11 13:34:53 -0700216
Stéphane Marchesin0208d512014-06-19 18:18:28 -0700217 connector->display_info.bpc = panel->desc->bpc;
Thierry Reding280921d2013-08-30 15:10:14 +0200218 connector->display_info.width_mm = panel->desc->size.width;
219 connector->display_info.height_mm = panel->desc->size.height;
Boris Brezillon795f7ab2014-07-22 13:33:59 +0200220 if (panel->desc->bus_format)
221 drm_display_info_set_bus_formats(&connector->display_info,
222 &panel->desc->bus_format, 1);
Stefan Agnerf0aa0832016-02-08 11:38:14 -0800223 connector->display_info.bus_flags = panel->desc->bus_flags;
Thierry Reding280921d2013-08-30 15:10:14 +0200224
225 return num;
226}
227
228static int panel_simple_disable(struct drm_panel *panel)
229{
230 struct panel_simple *p = to_panel_simple(panel);
231
232 if (!p->enabled)
233 return 0;
234
Ajay Kumarf673c372014-07-31 23:12:11 +0530235 if (p->desc->delay.disable)
236 msleep(p->desc->delay.disable);
237
Thierry Reding280921d2013-08-30 15:10:14 +0200238 p->enabled = false;
239
240 return 0;
241}
242
Ajay Kumarc0e1d172014-07-31 23:12:04 +0530243static int panel_simple_unprepare(struct drm_panel *panel)
244{
Ajay Kumar613a6332014-07-31 23:12:10 +0530245 struct panel_simple *p = to_panel_simple(panel);
246
247 if (!p->prepared)
248 return 0;
249
Fabio Estevam756b9182017-07-16 21:05:39 -0300250 gpiod_set_value_cansleep(p->enable_gpio, 0);
Ajay Kumar613a6332014-07-31 23:12:10 +0530251
252 regulator_disable(p->supply);
253
Ajay Kumarf673c372014-07-31 23:12:11 +0530254 if (p->desc->delay.unprepare)
255 msleep(p->desc->delay.unprepare);
256
Ajay Kumar613a6332014-07-31 23:12:10 +0530257 p->prepared = false;
258
Ajay Kumarc0e1d172014-07-31 23:12:04 +0530259 return 0;
260}
261
262static int panel_simple_prepare(struct drm_panel *panel)
263{
Thierry Reding280921d2013-08-30 15:10:14 +0200264 struct panel_simple *p = to_panel_simple(panel);
Douglas Anderson2ed3e952018-10-25 15:21:30 -0700265 unsigned int delay;
Thierry Reding280921d2013-08-30 15:10:14 +0200266 int err;
267
Ajay Kumar613a6332014-07-31 23:12:10 +0530268 if (p->prepared)
Thierry Reding280921d2013-08-30 15:10:14 +0200269 return 0;
270
271 err = regulator_enable(p->supply);
272 if (err < 0) {
273 dev_err(panel->dev, "failed to enable supply: %d\n", err);
274 return err;
275 }
276
Fabio Estevam756b9182017-07-16 21:05:39 -0300277 gpiod_set_value_cansleep(p->enable_gpio, 1);
Thierry Reding280921d2013-08-30 15:10:14 +0200278
Douglas Anderson2ed3e952018-10-25 15:21:30 -0700279 delay = p->desc->delay.prepare;
280 if (p->no_hpd)
281 delay += p->desc->delay.hpd_absent_delay;
282 if (delay)
283 msleep(delay);
Ajay Kumarf673c372014-07-31 23:12:11 +0530284
Ajay Kumar613a6332014-07-31 23:12:10 +0530285 p->prepared = true;
286
287 return 0;
288}
289
290static int panel_simple_enable(struct drm_panel *panel)
291{
292 struct panel_simple *p = to_panel_simple(panel);
293
294 if (p->enabled)
295 return 0;
296
Ajay Kumarf673c372014-07-31 23:12:11 +0530297 if (p->desc->delay.enable)
298 msleep(p->desc->delay.enable);
299
Thierry Reding280921d2013-08-30 15:10:14 +0200300 p->enabled = true;
301
302 return 0;
303}
304
Sam Ravnborg0ce8ddd2019-12-07 15:03:33 +0100305static int panel_simple_get_modes(struct drm_panel *panel,
306 struct drm_connector *connector)
Thierry Reding280921d2013-08-30 15:10:14 +0200307{
308 struct panel_simple *p = to_panel_simple(panel);
309 int num = 0;
310
311 /* probe EDID if a DDC bus is available */
312 if (p->ddc) {
Sam Ravnborg0ce8ddd2019-12-07 15:03:33 +0100313 struct edid *edid = drm_get_edid(connector, p->ddc);
314
315 drm_connector_update_edid_property(connector, edid);
Thierry Reding280921d2013-08-30 15:10:14 +0200316 if (edid) {
Sam Ravnborg0ce8ddd2019-12-07 15:03:33 +0100317 num += drm_add_edid_modes(connector, edid);
Thierry Reding280921d2013-08-30 15:10:14 +0200318 kfree(edid);
319 }
320 }
321
322 /* add hard-coded panel modes */
Sam Ravnborg0ce8ddd2019-12-07 15:03:33 +0100323 num += panel_simple_get_non_edid_modes(p, connector);
Thierry Reding280921d2013-08-30 15:10:14 +0200324
325 return num;
326}
327
Philipp Zabela5d3e622014-12-11 18:32:45 +0100328static int panel_simple_get_timings(struct drm_panel *panel,
329 unsigned int num_timings,
330 struct display_timing *timings)
331{
332 struct panel_simple *p = to_panel_simple(panel);
333 unsigned int i;
334
335 if (p->desc->num_timings < num_timings)
336 num_timings = p->desc->num_timings;
337
338 if (timings)
339 for (i = 0; i < num_timings; i++)
340 timings[i] = p->desc->timings[i];
341
342 return p->desc->num_timings;
343}
344
Thierry Reding280921d2013-08-30 15:10:14 +0200345static const struct drm_panel_funcs panel_simple_funcs = {
346 .disable = panel_simple_disable,
Ajay Kumarc0e1d172014-07-31 23:12:04 +0530347 .unprepare = panel_simple_unprepare,
348 .prepare = panel_simple_prepare,
Thierry Reding280921d2013-08-30 15:10:14 +0200349 .enable = panel_simple_enable,
350 .get_modes = panel_simple_get_modes,
Philipp Zabela5d3e622014-12-11 18:32:45 +0100351 .get_timings = panel_simple_get_timings,
Thierry Reding280921d2013-08-30 15:10:14 +0200352};
353
Sean Paulb8a29482019-07-11 13:34:53 -0700354#define PANEL_SIMPLE_BOUNDS_CHECK(to_check, bounds, field) \
355 (to_check->field.typ >= bounds->field.min && \
356 to_check->field.typ <= bounds->field.max)
Douglas Andersone362cc62019-07-12 09:33:33 -0700357static void panel_simple_parse_panel_timing_node(struct device *dev,
358 struct panel_simple *panel,
359 const struct display_timing *ot)
Sean Paulb8a29482019-07-11 13:34:53 -0700360{
361 const struct panel_desc *desc = panel->desc;
362 struct videomode vm;
363 unsigned int i;
364
365 if (WARN_ON(desc->num_modes)) {
366 dev_err(dev, "Reject override mode: panel has a fixed mode\n");
367 return;
368 }
369 if (WARN_ON(!desc->num_timings)) {
370 dev_err(dev, "Reject override mode: no timings specified\n");
371 return;
372 }
373
374 for (i = 0; i < panel->desc->num_timings; i++) {
375 const struct display_timing *dt = &panel->desc->timings[i];
376
377 if (!PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hactive) ||
378 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hfront_porch) ||
379 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hback_porch) ||
380 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hsync_len) ||
381 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vactive) ||
382 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vfront_porch) ||
383 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vback_porch) ||
384 !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vsync_len))
385 continue;
386
387 if (ot->flags != dt->flags)
388 continue;
389
390 videomode_from_timing(ot, &vm);
391 drm_display_mode_from_videomode(&vm, &panel->override_mode);
392 panel->override_mode.type |= DRM_MODE_TYPE_DRIVER |
393 DRM_MODE_TYPE_PREFERRED;
394 break;
395 }
396
397 if (WARN_ON(!panel->override_mode.type))
398 dev_err(dev, "Reject override mode: No display_timing found\n");
399}
400
Thierry Reding280921d2013-08-30 15:10:14 +0200401static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
402{
Thierry Reding280921d2013-08-30 15:10:14 +0200403 struct panel_simple *panel;
Sean Paulb8a29482019-07-11 13:34:53 -0700404 struct display_timing dt;
Sam Ravnborg0fe15642019-12-07 15:03:31 +0100405 struct device_node *ddc;
Thierry Reding280921d2013-08-30 15:10:14 +0200406 int err;
407
408 panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL);
409 if (!panel)
410 return -ENOMEM;
411
412 panel->enabled = false;
Ajay Kumar613a6332014-07-31 23:12:10 +0530413 panel->prepared = false;
Thierry Reding280921d2013-08-30 15:10:14 +0200414 panel->desc = desc;
415
Douglas Anderson2ed3e952018-10-25 15:21:30 -0700416 panel->no_hpd = of_property_read_bool(dev->of_node, "no-hpd");
417
Thierry Reding280921d2013-08-30 15:10:14 +0200418 panel->supply = devm_regulator_get(dev, "power");
419 if (IS_ERR(panel->supply))
420 return PTR_ERR(panel->supply);
421
Alexandre Courbota61400d2014-10-23 17:16:58 +0900422 panel->enable_gpio = devm_gpiod_get_optional(dev, "enable",
423 GPIOD_OUT_LOW);
Alexandre Courbotcfdf0542014-03-01 14:00:58 +0900424 if (IS_ERR(panel->enable_gpio)) {
425 err = PTR_ERR(panel->enable_gpio);
Fabio Estevamb8e93802017-06-30 18:14:46 -0300426 if (err != -EPROBE_DEFER)
427 dev_err(dev, "failed to request GPIO: %d\n", err);
Alexandre Courbot9746c612014-07-25 23:47:25 +0900428 return err;
429 }
Thierry Reding280921d2013-08-30 15:10:14 +0200430
Thierry Reding280921d2013-08-30 15:10:14 +0200431 ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0);
432 if (ddc) {
433 panel->ddc = of_find_i2c_adapter_by_node(ddc);
434 of_node_put(ddc);
435
Sam Ravnborg0fe15642019-12-07 15:03:31 +0100436 if (!panel->ddc)
437 return -EPROBE_DEFER;
Thierry Reding280921d2013-08-30 15:10:14 +0200438 }
439
Sean Paulb8a29482019-07-11 13:34:53 -0700440 if (!of_get_display_timing(dev->of_node, "panel-timing", &dt))
Douglas Andersone362cc62019-07-12 09:33:33 -0700441 panel_simple_parse_panel_timing_node(dev, panel, &dt);
Sean Paulb8a29482019-07-11 13:34:53 -0700442
Laurent Pinchart9a2654c2019-09-04 16:28:03 +0300443 drm_panel_init(&panel->base, dev, &panel_simple_funcs,
444 desc->connector_type);
Thierry Reding280921d2013-08-30 15:10:14 +0200445
Sam Ravnborg0fe15642019-12-07 15:03:31 +0100446 err = drm_panel_of_backlight(&panel->base);
447 if (err)
448 goto free_ddc;
449
Thierry Reding280921d2013-08-30 15:10:14 +0200450 err = drm_panel_add(&panel->base);
451 if (err < 0)
452 goto free_ddc;
453
454 dev_set_drvdata(dev, panel);
455
456 return 0;
457
458free_ddc:
459 if (panel->ddc)
460 put_device(&panel->ddc->dev);
Thierry Reding280921d2013-08-30 15:10:14 +0200461
462 return err;
463}
464
465static int panel_simple_remove(struct device *dev)
466{
467 struct panel_simple *panel = dev_get_drvdata(dev);
468
Thierry Reding280921d2013-08-30 15:10:14 +0200469 drm_panel_remove(&panel->base);
Sam Ravnborg0fe15642019-12-07 15:03:31 +0100470 drm_panel_disable(&panel->base);
471 drm_panel_unprepare(&panel->base);
Thierry Reding280921d2013-08-30 15:10:14 +0200472
473 if (panel->ddc)
474 put_device(&panel->ddc->dev);
475
Thierry Reding280921d2013-08-30 15:10:14 +0200476 return 0;
477}
478
Thierry Redingd02fd932014-04-29 17:21:21 +0200479static void panel_simple_shutdown(struct device *dev)
480{
481 struct panel_simple *panel = dev_get_drvdata(dev);
482
Sam Ravnborg0fe15642019-12-07 15:03:31 +0100483 drm_panel_disable(&panel->base);
484 drm_panel_unprepare(&panel->base);
Thierry Redingd02fd932014-04-29 17:21:21 +0200485}
486
Yannick Fertre966fea72017-03-28 11:44:49 +0200487static const struct drm_display_mode ampire_am_480272h3tmqw_t01h_mode = {
488 .clock = 9000,
489 .hdisplay = 480,
490 .hsync_start = 480 + 2,
491 .hsync_end = 480 + 2 + 41,
492 .htotal = 480 + 2 + 41 + 2,
493 .vdisplay = 272,
494 .vsync_start = 272 + 2,
495 .vsync_end = 272 + 2 + 10,
496 .vtotal = 272 + 2 + 10 + 2,
497 .vrefresh = 60,
498 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
499};
500
501static const struct panel_desc ampire_am_480272h3tmqw_t01h = {
502 .modes = &ampire_am_480272h3tmqw_t01h_mode,
503 .num_modes = 1,
504 .bpc = 8,
505 .size = {
506 .width = 105,
507 .height = 67,
508 },
509 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
510};
511
Philipp Zabel1c550fa12015-02-11 18:50:09 +0100512static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = {
513 .clock = 33333,
514 .hdisplay = 800,
515 .hsync_start = 800 + 0,
516 .hsync_end = 800 + 0 + 255,
517 .htotal = 800 + 0 + 255 + 0,
518 .vdisplay = 480,
519 .vsync_start = 480 + 2,
520 .vsync_end = 480 + 2 + 45,
521 .vtotal = 480 + 2 + 45 + 0,
522 .vrefresh = 60,
523 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
524};
525
526static const struct panel_desc ampire_am800480r3tmqwa1h = {
527 .modes = &ampire_am800480r3tmqwa1h_mode,
528 .num_modes = 1,
529 .bpc = 6,
530 .size = {
531 .width = 152,
532 .height = 91,
533 },
534 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
535};
536
Sébastien Szymanskic479450f2019-05-07 17:27:12 +0200537static const struct display_timing santek_st0700i5y_rbslw_f_timing = {
538 .pixelclock = { 26400000, 33300000, 46800000 },
539 .hactive = { 800, 800, 800 },
540 .hfront_porch = { 16, 210, 354 },
541 .hback_porch = { 45, 36, 6 },
542 .hsync_len = { 1, 10, 40 },
543 .vactive = { 480, 480, 480 },
544 .vfront_porch = { 7, 22, 147 },
545 .vback_porch = { 22, 13, 3 },
546 .vsync_len = { 1, 10, 20 },
547 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
548 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE
549};
550
551static const struct panel_desc armadeus_st0700_adapt = {
552 .timings = &santek_st0700i5y_rbslw_f_timing,
553 .num_timings = 1,
554 .bpc = 6,
555 .size = {
556 .width = 154,
557 .height = 86,
558 },
559 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
560 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
561};
562
Thierry Reding280921d2013-08-30 15:10:14 +0200563static const struct drm_display_mode auo_b101aw03_mode = {
564 .clock = 51450,
565 .hdisplay = 1024,
566 .hsync_start = 1024 + 156,
567 .hsync_end = 1024 + 156 + 8,
568 .htotal = 1024 + 156 + 8 + 156,
569 .vdisplay = 600,
570 .vsync_start = 600 + 16,
571 .vsync_end = 600 + 16 + 6,
572 .vtotal = 600 + 16 + 6 + 16,
573 .vrefresh = 60,
574};
575
576static const struct panel_desc auo_b101aw03 = {
577 .modes = &auo_b101aw03_mode,
578 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -0700579 .bpc = 6,
Thierry Reding280921d2013-08-30 15:10:14 +0200580 .size = {
581 .width = 223,
582 .height = 125,
583 },
584};
585
Douglas Anderson374bf822019-07-11 13:34:55 -0700586static const struct display_timing auo_b101ean01_timing = {
587 .pixelclock = { 65300000, 72500000, 75000000 },
588 .hactive = { 1280, 1280, 1280 },
589 .hfront_porch = { 18, 119, 119 },
590 .hback_porch = { 21, 21, 21 },
591 .hsync_len = { 32, 32, 32 },
592 .vactive = { 800, 800, 800 },
593 .vfront_porch = { 4, 4, 4 },
594 .vback_porch = { 8, 8, 8 },
595 .vsync_len = { 18, 20, 20 },
Huang Lina531bc32015-02-28 10:18:58 +0800596};
597
598static const struct panel_desc auo_b101ean01 = {
Douglas Anderson374bf822019-07-11 13:34:55 -0700599 .timings = &auo_b101ean01_timing,
600 .num_timings = 1,
Huang Lina531bc32015-02-28 10:18:58 +0800601 .bpc = 6,
602 .size = {
603 .width = 217,
604 .height = 136,
605 },
606};
607
Rob Clarkdac746e2014-08-01 17:01:06 -0400608static const struct drm_display_mode auo_b101xtn01_mode = {
609 .clock = 72000,
610 .hdisplay = 1366,
611 .hsync_start = 1366 + 20,
612 .hsync_end = 1366 + 20 + 70,
613 .htotal = 1366 + 20 + 70,
614 .vdisplay = 768,
615 .vsync_start = 768 + 14,
616 .vsync_end = 768 + 14 + 42,
617 .vtotal = 768 + 14 + 42,
618 .vrefresh = 60,
619 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
620};
621
622static const struct panel_desc auo_b101xtn01 = {
623 .modes = &auo_b101xtn01_mode,
624 .num_modes = 1,
625 .bpc = 6,
626 .size = {
627 .width = 223,
628 .height = 125,
629 },
630};
631
Rob Clarkda4582862020-01-08 15:53:56 -0800632static const struct drm_display_mode auo_b116xak01_mode = {
633 .clock = 69300,
634 .hdisplay = 1366,
635 .hsync_start = 1366 + 48,
636 .hsync_end = 1366 + 48 + 32,
637 .htotal = 1366 + 48 + 32 + 10,
638 .vdisplay = 768,
639 .vsync_start = 768 + 4,
640 .vsync_end = 768 + 4 + 6,
641 .vtotal = 768 + 4 + 6 + 15,
642 .vrefresh = 60,
643 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
644};
645
646static const struct panel_desc auo_b116xak01 = {
647 .modes = &auo_b116xak01_mode,
648 .num_modes = 1,
649 .bpc = 6,
650 .size = {
651 .width = 256,
652 .height = 144,
653 },
654 .delay = {
655 .hpd_absent_delay = 200,
656 },
657 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
658 .connector_type = DRM_MODE_CONNECTOR_eDP,
659};
660
Ajay Kumare35e3052014-09-01 15:40:02 +0530661static const struct drm_display_mode auo_b116xw03_mode = {
662 .clock = 70589,
663 .hdisplay = 1366,
664 .hsync_start = 1366 + 40,
665 .hsync_end = 1366 + 40 + 40,
666 .htotal = 1366 + 40 + 40 + 32,
667 .vdisplay = 768,
668 .vsync_start = 768 + 10,
669 .vsync_end = 768 + 10 + 12,
670 .vtotal = 768 + 10 + 12 + 6,
671 .vrefresh = 60,
672};
673
674static const struct panel_desc auo_b116xw03 = {
675 .modes = &auo_b116xw03_mode,
676 .num_modes = 1,
677 .bpc = 6,
678 .size = {
679 .width = 256,
680 .height = 144,
681 },
682};
683
Stéphane Marchesina333f7a2014-05-23 19:27:59 -0700684static const struct drm_display_mode auo_b133xtn01_mode = {
685 .clock = 69500,
686 .hdisplay = 1366,
687 .hsync_start = 1366 + 48,
688 .hsync_end = 1366 + 48 + 32,
689 .htotal = 1366 + 48 + 32 + 20,
690 .vdisplay = 768,
691 .vsync_start = 768 + 3,
692 .vsync_end = 768 + 3 + 6,
693 .vtotal = 768 + 3 + 6 + 13,
694 .vrefresh = 60,
695};
696
697static const struct panel_desc auo_b133xtn01 = {
698 .modes = &auo_b133xtn01_mode,
699 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -0700700 .bpc = 6,
Stéphane Marchesina333f7a2014-05-23 19:27:59 -0700701 .size = {
702 .width = 293,
703 .height = 165,
704 },
705};
706
Ajay Kumar3e51d602014-07-31 23:12:12 +0530707static const struct drm_display_mode auo_b133htn01_mode = {
708 .clock = 150660,
709 .hdisplay = 1920,
710 .hsync_start = 1920 + 172,
711 .hsync_end = 1920 + 172 + 80,
712 .htotal = 1920 + 172 + 80 + 60,
713 .vdisplay = 1080,
714 .vsync_start = 1080 + 25,
715 .vsync_end = 1080 + 25 + 10,
716 .vtotal = 1080 + 25 + 10 + 10,
717 .vrefresh = 60,
718};
719
720static const struct panel_desc auo_b133htn01 = {
721 .modes = &auo_b133htn01_mode,
722 .num_modes = 1,
Thierry Redingd7a839c2014-11-06 10:11:01 +0100723 .bpc = 6,
Ajay Kumar3e51d602014-07-31 23:12:12 +0530724 .size = {
725 .width = 293,
726 .height = 165,
727 },
728 .delay = {
729 .prepare = 105,
730 .enable = 20,
731 .unprepare = 50,
732 },
733};
734
Lukasz Majewskibccfaff2018-05-14 21:08:49 +0200735static const struct display_timing auo_g070vvn01_timings = {
736 .pixelclock = { 33300000, 34209000, 45000000 },
737 .hactive = { 800, 800, 800 },
738 .hfront_porch = { 20, 40, 200 },
739 .hback_porch = { 87, 40, 1 },
740 .hsync_len = { 1, 48, 87 },
741 .vactive = { 480, 480, 480 },
742 .vfront_porch = { 5, 13, 200 },
743 .vback_porch = { 31, 31, 29 },
744 .vsync_len = { 1, 1, 3 },
745};
746
747static const struct panel_desc auo_g070vvn01 = {
748 .timings = &auo_g070vvn01_timings,
749 .num_timings = 1,
750 .bpc = 8,
751 .size = {
752 .width = 152,
753 .height = 91,
754 },
755 .delay = {
756 .prepare = 200,
757 .enable = 50,
758 .disable = 50,
759 .unprepare = 1000,
760 },
761};
762
Alex Gonzalez4fb86402018-10-25 17:09:30 +0200763static const struct drm_display_mode auo_g101evn010_mode = {
764 .clock = 68930,
765 .hdisplay = 1280,
766 .hsync_start = 1280 + 82,
767 .hsync_end = 1280 + 82 + 2,
768 .htotal = 1280 + 82 + 2 + 84,
769 .vdisplay = 800,
770 .vsync_start = 800 + 8,
771 .vsync_end = 800 + 8 + 2,
772 .vtotal = 800 + 8 + 2 + 6,
773 .vrefresh = 60,
774};
775
776static const struct panel_desc auo_g101evn010 = {
777 .modes = &auo_g101evn010_mode,
778 .num_modes = 1,
779 .bpc = 6,
780 .size = {
781 .width = 216,
782 .height = 135,
783 },
784 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
785};
786
Christoph Fritz4451c282017-12-16 14:13:36 +0100787static const struct drm_display_mode auo_g104sn02_mode = {
788 .clock = 40000,
789 .hdisplay = 800,
790 .hsync_start = 800 + 40,
791 .hsync_end = 800 + 40 + 216,
792 .htotal = 800 + 40 + 216 + 128,
793 .vdisplay = 600,
794 .vsync_start = 600 + 10,
795 .vsync_end = 600 + 10 + 35,
796 .vtotal = 600 + 10 + 35 + 2,
797 .vrefresh = 60,
798};
799
800static const struct panel_desc auo_g104sn02 = {
801 .modes = &auo_g104sn02_mode,
802 .num_modes = 1,
803 .bpc = 8,
804 .size = {
805 .width = 211,
806 .height = 158,
807 },
808};
809
Lucas Stach697035c2016-11-30 14:09:55 +0100810static const struct display_timing auo_g133han01_timings = {
811 .pixelclock = { 134000000, 141200000, 149000000 },
812 .hactive = { 1920, 1920, 1920 },
813 .hfront_porch = { 39, 58, 77 },
814 .hback_porch = { 59, 88, 117 },
815 .hsync_len = { 28, 42, 56 },
816 .vactive = { 1080, 1080, 1080 },
817 .vfront_porch = { 3, 8, 11 },
818 .vback_porch = { 5, 14, 19 },
819 .vsync_len = { 4, 14, 19 },
820};
821
822static const struct panel_desc auo_g133han01 = {
823 .timings = &auo_g133han01_timings,
824 .num_timings = 1,
825 .bpc = 8,
826 .size = {
827 .width = 293,
828 .height = 165,
829 },
830 .delay = {
831 .prepare = 200,
832 .enable = 50,
833 .disable = 50,
834 .unprepare = 1000,
835 },
836 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +0300837 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Lucas Stach697035c2016-11-30 14:09:55 +0100838};
839
Lucas Stach8c31f602016-11-30 14:09:56 +0100840static const struct display_timing auo_g185han01_timings = {
841 .pixelclock = { 120000000, 144000000, 175000000 },
842 .hactive = { 1920, 1920, 1920 },
Lucas Stachf8c6bfc2019-07-10 15:07:40 +0200843 .hfront_porch = { 36, 120, 148 },
844 .hback_porch = { 24, 88, 108 },
845 .hsync_len = { 20, 48, 64 },
Lucas Stach8c31f602016-11-30 14:09:56 +0100846 .vactive = { 1080, 1080, 1080 },
847 .vfront_porch = { 6, 10, 40 },
848 .vback_porch = { 2, 5, 20 },
849 .vsync_len = { 2, 5, 20 },
850};
851
852static const struct panel_desc auo_g185han01 = {
853 .timings = &auo_g185han01_timings,
854 .num_timings = 1,
855 .bpc = 8,
856 .size = {
857 .width = 409,
858 .height = 230,
859 },
860 .delay = {
861 .prepare = 50,
862 .enable = 200,
863 .disable = 110,
864 .unprepare = 1000,
865 },
866 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +0300867 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Lucas Stach8c31f602016-11-30 14:09:56 +0100868};
869
Lucas Stach70c0d5b2017-06-08 20:07:58 +0200870static const struct display_timing auo_p320hvn03_timings = {
871 .pixelclock = { 106000000, 148500000, 164000000 },
872 .hactive = { 1920, 1920, 1920 },
873 .hfront_porch = { 25, 50, 130 },
874 .hback_porch = { 25, 50, 130 },
875 .hsync_len = { 20, 40, 105 },
876 .vactive = { 1080, 1080, 1080 },
877 .vfront_porch = { 8, 17, 150 },
878 .vback_porch = { 8, 17, 150 },
879 .vsync_len = { 4, 11, 100 },
880};
881
882static const struct panel_desc auo_p320hvn03 = {
883 .timings = &auo_p320hvn03_timings,
884 .num_timings = 1,
885 .bpc = 8,
886 .size = {
887 .width = 698,
888 .height = 393,
889 },
890 .delay = {
891 .prepare = 1,
892 .enable = 450,
893 .unprepare = 500,
894 },
Lucas Stach2554f152018-04-11 17:27:41 +0200895 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +0300896 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Lucas Stach70c0d5b2017-06-08 20:07:58 +0200897};
898
Haixia Shi7ee933a2016-10-11 14:59:16 -0700899static const struct drm_display_mode auo_t215hvn01_mode = {
900 .clock = 148800,
901 .hdisplay = 1920,
902 .hsync_start = 1920 + 88,
903 .hsync_end = 1920 + 88 + 44,
904 .htotal = 1920 + 88 + 44 + 148,
905 .vdisplay = 1080,
906 .vsync_start = 1080 + 4,
907 .vsync_end = 1080 + 4 + 5,
908 .vtotal = 1080 + 4 + 5 + 36,
909 .vrefresh = 60,
910};
911
912static const struct panel_desc auo_t215hvn01 = {
913 .modes = &auo_t215hvn01_mode,
914 .num_modes = 1,
915 .bpc = 8,
916 .size = {
917 .width = 430,
918 .height = 270,
919 },
920 .delay = {
921 .disable = 5,
922 .unprepare = 1000,
923 }
924};
925
Philipp Zabeld47df632014-12-18 16:43:43 +0100926static const struct drm_display_mode avic_tm070ddh03_mode = {
927 .clock = 51200,
928 .hdisplay = 1024,
929 .hsync_start = 1024 + 160,
930 .hsync_end = 1024 + 160 + 4,
931 .htotal = 1024 + 160 + 4 + 156,
932 .vdisplay = 600,
933 .vsync_start = 600 + 17,
934 .vsync_end = 600 + 17 + 1,
935 .vtotal = 600 + 17 + 1 + 17,
936 .vrefresh = 60,
937};
938
939static const struct panel_desc avic_tm070ddh03 = {
940 .modes = &avic_tm070ddh03_mode,
941 .num_modes = 1,
942 .bpc = 8,
943 .size = {
944 .width = 154,
945 .height = 90,
946 },
947 .delay = {
948 .prepare = 20,
949 .enable = 200,
950 .disable = 200,
951 },
952};
953
Chen-Yu Tsai7ad8b412018-09-07 12:19:46 +0800954static const struct drm_display_mode bananapi_s070wv20_ct16_mode = {
955 .clock = 30000,
956 .hdisplay = 800,
957 .hsync_start = 800 + 40,
958 .hsync_end = 800 + 40 + 48,
959 .htotal = 800 + 40 + 48 + 40,
960 .vdisplay = 480,
961 .vsync_start = 480 + 13,
962 .vsync_end = 480 + 13 + 3,
963 .vtotal = 480 + 13 + 3 + 29,
964};
965
966static const struct panel_desc bananapi_s070wv20_ct16 = {
967 .modes = &bananapi_s070wv20_ct16_mode,
968 .num_modes = 1,
969 .bpc = 6,
970 .size = {
971 .width = 154,
972 .height = 86,
973 },
974};
975
Andrzej Hajdaae8cf412018-06-19 10:19:26 +0200976static const struct drm_display_mode boe_hv070wsa_mode = {
Andrzej Hajdae077e2f2018-07-25 17:46:43 +0200977 .clock = 42105,
Andrzej Hajdaae8cf412018-06-19 10:19:26 +0200978 .hdisplay = 1024,
Andrzej Hajdae077e2f2018-07-25 17:46:43 +0200979 .hsync_start = 1024 + 30,
980 .hsync_end = 1024 + 30 + 30,
981 .htotal = 1024 + 30 + 30 + 30,
Andrzej Hajdaae8cf412018-06-19 10:19:26 +0200982 .vdisplay = 600,
Andrzej Hajdae077e2f2018-07-25 17:46:43 +0200983 .vsync_start = 600 + 10,
984 .vsync_end = 600 + 10 + 10,
985 .vtotal = 600 + 10 + 10 + 10,
Andrzej Hajdaae8cf412018-06-19 10:19:26 +0200986 .vrefresh = 60,
987};
988
989static const struct panel_desc boe_hv070wsa = {
990 .modes = &boe_hv070wsa_mode,
991 .num_modes = 1,
992 .size = {
993 .width = 154,
994 .height = 90,
995 },
996};
997
Caesar Wangcac1a412016-12-14 11:19:56 +0800998static const struct drm_display_mode boe_nv101wxmn51_modes[] = {
999 {
1000 .clock = 71900,
1001 .hdisplay = 1280,
1002 .hsync_start = 1280 + 48,
1003 .hsync_end = 1280 + 48 + 32,
1004 .htotal = 1280 + 48 + 32 + 80,
1005 .vdisplay = 800,
1006 .vsync_start = 800 + 3,
1007 .vsync_end = 800 + 3 + 5,
1008 .vtotal = 800 + 3 + 5 + 24,
1009 .vrefresh = 60,
1010 },
1011 {
1012 .clock = 57500,
1013 .hdisplay = 1280,
1014 .hsync_start = 1280 + 48,
1015 .hsync_end = 1280 + 48 + 32,
1016 .htotal = 1280 + 48 + 32 + 80,
1017 .vdisplay = 800,
1018 .vsync_start = 800 + 3,
1019 .vsync_end = 800 + 3 + 5,
1020 .vtotal = 800 + 3 + 5 + 24,
1021 .vrefresh = 48,
1022 },
1023};
1024
1025static const struct panel_desc boe_nv101wxmn51 = {
1026 .modes = boe_nv101wxmn51_modes,
1027 .num_modes = ARRAY_SIZE(boe_nv101wxmn51_modes),
1028 .bpc = 8,
1029 .size = {
1030 .width = 217,
1031 .height = 136,
1032 },
1033 .delay = {
1034 .prepare = 210,
1035 .enable = 50,
1036 .unprepare = 160,
1037 },
1038};
1039
Tobias Schramma5119812020-01-09 12:29:52 +01001040static const struct drm_display_mode boe_nv140fhmn49_modes[] = {
1041 {
1042 .clock = 148500,
1043 .hdisplay = 1920,
1044 .hsync_start = 1920 + 48,
1045 .hsync_end = 1920 + 48 + 32,
1046 .htotal = 2200,
1047 .vdisplay = 1080,
1048 .vsync_start = 1080 + 3,
1049 .vsync_end = 1080 + 3 + 5,
1050 .vtotal = 1125,
1051 .vrefresh = 60,
1052 },
1053};
1054
1055static const struct panel_desc boe_nv140fhmn49 = {
1056 .modes = boe_nv140fhmn49_modes,
1057 .num_modes = ARRAY_SIZE(boe_nv140fhmn49_modes),
1058 .bpc = 6,
1059 .size = {
1060 .width = 309,
1061 .height = 174,
1062 },
1063 .delay = {
1064 .prepare = 210,
1065 .enable = 50,
1066 .unprepare = 160,
1067 },
1068 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1069 .connector_type = DRM_MODE_CONNECTOR_eDP,
1070};
1071
Giulio Benettie58edce2018-07-31 01:11:16 +02001072static const struct drm_display_mode cdtech_s043wq26h_ct7_mode = {
1073 .clock = 9000,
1074 .hdisplay = 480,
1075 .hsync_start = 480 + 5,
1076 .hsync_end = 480 + 5 + 5,
1077 .htotal = 480 + 5 + 5 + 40,
1078 .vdisplay = 272,
1079 .vsync_start = 272 + 8,
1080 .vsync_end = 272 + 8 + 8,
1081 .vtotal = 272 + 8 + 8 + 8,
1082 .vrefresh = 60,
1083 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1084};
1085
1086static const struct panel_desc cdtech_s043wq26h_ct7 = {
1087 .modes = &cdtech_s043wq26h_ct7_mode,
1088 .num_modes = 1,
1089 .bpc = 8,
1090 .size = {
1091 .width = 95,
1092 .height = 54,
1093 },
Laurent Pinchart88bc4172018-09-22 15:02:42 +03001094 .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
Giulio Benettie58edce2018-07-31 01:11:16 +02001095};
1096
Giulio Benetti982f9442018-07-31 01:11:14 +02001097static const struct drm_display_mode cdtech_s070wv95_ct16_mode = {
1098 .clock = 35000,
1099 .hdisplay = 800,
1100 .hsync_start = 800 + 40,
1101 .hsync_end = 800 + 40 + 40,
1102 .htotal = 800 + 40 + 40 + 48,
1103 .vdisplay = 480,
1104 .vsync_start = 480 + 29,
1105 .vsync_end = 480 + 29 + 13,
1106 .vtotal = 480 + 29 + 13 + 3,
1107 .vrefresh = 60,
1108 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1109};
1110
1111static const struct panel_desc cdtech_s070wv95_ct16 = {
1112 .modes = &cdtech_s070wv95_ct16_mode,
1113 .num_modes = 1,
1114 .bpc = 8,
1115 .size = {
1116 .width = 154,
1117 .height = 85,
1118 },
1119};
1120
Randy Li2cb35c82016-09-20 03:02:51 +08001121static const struct drm_display_mode chunghwa_claa070wp03xg_mode = {
1122 .clock = 66770,
1123 .hdisplay = 800,
1124 .hsync_start = 800 + 49,
1125 .hsync_end = 800 + 49 + 33,
1126 .htotal = 800 + 49 + 33 + 17,
1127 .vdisplay = 1280,
1128 .vsync_start = 1280 + 1,
1129 .vsync_end = 1280 + 1 + 7,
1130 .vtotal = 1280 + 1 + 7 + 15,
1131 .vrefresh = 60,
1132 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1133};
1134
1135static const struct panel_desc chunghwa_claa070wp03xg = {
1136 .modes = &chunghwa_claa070wp03xg_mode,
1137 .num_modes = 1,
1138 .bpc = 6,
1139 .size = {
1140 .width = 94,
1141 .height = 150,
1142 },
1143};
1144
Stephen Warren4c930752014-01-07 16:46:26 -07001145static const struct drm_display_mode chunghwa_claa101wa01a_mode = {
1146 .clock = 72070,
1147 .hdisplay = 1366,
1148 .hsync_start = 1366 + 58,
1149 .hsync_end = 1366 + 58 + 58,
1150 .htotal = 1366 + 58 + 58 + 58,
1151 .vdisplay = 768,
1152 .vsync_start = 768 + 4,
1153 .vsync_end = 768 + 4 + 4,
1154 .vtotal = 768 + 4 + 4 + 4,
1155 .vrefresh = 60,
1156};
1157
1158static const struct panel_desc chunghwa_claa101wa01a = {
1159 .modes = &chunghwa_claa101wa01a_mode,
1160 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -07001161 .bpc = 6,
Stephen Warren4c930752014-01-07 16:46:26 -07001162 .size = {
1163 .width = 220,
1164 .height = 120,
1165 },
1166};
1167
Thierry Reding280921d2013-08-30 15:10:14 +02001168static const struct drm_display_mode chunghwa_claa101wb01_mode = {
1169 .clock = 69300,
1170 .hdisplay = 1366,
1171 .hsync_start = 1366 + 48,
1172 .hsync_end = 1366 + 48 + 32,
1173 .htotal = 1366 + 48 + 32 + 20,
1174 .vdisplay = 768,
1175 .vsync_start = 768 + 16,
1176 .vsync_end = 768 + 16 + 8,
1177 .vtotal = 768 + 16 + 8 + 16,
1178 .vrefresh = 60,
1179};
1180
1181static const struct panel_desc chunghwa_claa101wb01 = {
1182 .modes = &chunghwa_claa101wb01_mode,
1183 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -07001184 .bpc = 6,
Thierry Reding280921d2013-08-30 15:10:14 +02001185 .size = {
1186 .width = 223,
1187 .height = 125,
1188 },
1189};
1190
Michal Vokáč97ceb1f2018-06-25 14:41:30 +02001191static const struct drm_display_mode dataimage_scf0700c48ggu18_mode = {
1192 .clock = 33260,
1193 .hdisplay = 800,
1194 .hsync_start = 800 + 40,
1195 .hsync_end = 800 + 40 + 128,
1196 .htotal = 800 + 40 + 128 + 88,
1197 .vdisplay = 480,
1198 .vsync_start = 480 + 10,
1199 .vsync_end = 480 + 10 + 2,
1200 .vtotal = 480 + 10 + 2 + 33,
1201 .vrefresh = 60,
1202 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1203};
1204
1205static const struct panel_desc dataimage_scf0700c48ggu18 = {
1206 .modes = &dataimage_scf0700c48ggu18_mode,
1207 .num_modes = 1,
1208 .bpc = 8,
1209 .size = {
1210 .width = 152,
1211 .height = 91,
1212 },
1213 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
Laurent Pinchart88bc4172018-09-22 15:02:42 +03001214 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
Michal Vokáč97ceb1f2018-06-25 14:41:30 +02001215};
1216
Philipp Zabel0ca0c822018-05-23 11:25:04 +02001217static const struct display_timing dlc_dlc0700yzg_1_timing = {
1218 .pixelclock = { 45000000, 51200000, 57000000 },
1219 .hactive = { 1024, 1024, 1024 },
1220 .hfront_porch = { 100, 106, 113 },
1221 .hback_porch = { 100, 106, 113 },
1222 .hsync_len = { 100, 108, 114 },
1223 .vactive = { 600, 600, 600 },
1224 .vfront_porch = { 8, 11, 15 },
1225 .vback_porch = { 8, 11, 15 },
1226 .vsync_len = { 9, 13, 15 },
1227 .flags = DISPLAY_FLAGS_DE_HIGH,
1228};
1229
1230static const struct panel_desc dlc_dlc0700yzg_1 = {
1231 .timings = &dlc_dlc0700yzg_1_timing,
1232 .num_timings = 1,
1233 .bpc = 6,
1234 .size = {
1235 .width = 154,
1236 .height = 86,
1237 },
1238 .delay = {
1239 .prepare = 30,
1240 .enable = 200,
1241 .disable = 200,
1242 },
1243 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03001244 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Philipp Zabel0ca0c822018-05-23 11:25:04 +02001245};
1246
Marco Felsch6cbe7cd2018-09-24 17:26:10 +02001247static const struct display_timing dlc_dlc1010gig_timing = {
1248 .pixelclock = { 68900000, 71100000, 73400000 },
1249 .hactive = { 1280, 1280, 1280 },
1250 .hfront_porch = { 43, 53, 63 },
1251 .hback_porch = { 43, 53, 63 },
1252 .hsync_len = { 44, 54, 64 },
1253 .vactive = { 800, 800, 800 },
1254 .vfront_porch = { 5, 8, 11 },
1255 .vback_porch = { 5, 8, 11 },
1256 .vsync_len = { 5, 7, 11 },
1257 .flags = DISPLAY_FLAGS_DE_HIGH,
1258};
1259
1260static const struct panel_desc dlc_dlc1010gig = {
1261 .timings = &dlc_dlc1010gig_timing,
1262 .num_timings = 1,
1263 .bpc = 8,
1264 .size = {
1265 .width = 216,
1266 .height = 135,
1267 },
1268 .delay = {
1269 .prepare = 60,
1270 .enable = 150,
1271 .disable = 100,
1272 .unprepare = 60,
1273 },
1274 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03001275 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Marco Felsch6cbe7cd2018-09-24 17:26:10 +02001276};
1277
Andreas Pretzschc2d24af2019-04-16 12:16:30 +02001278static const struct drm_display_mode edt_et035012dm6_mode = {
1279 .clock = 6500,
1280 .hdisplay = 320,
1281 .hsync_start = 320 + 20,
1282 .hsync_end = 320 + 20 + 30,
1283 .htotal = 320 + 20 + 68,
1284 .vdisplay = 240,
1285 .vsync_start = 240 + 4,
1286 .vsync_end = 240 + 4 + 4,
1287 .vtotal = 240 + 4 + 4 + 14,
1288 .vrefresh = 60,
1289 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1290};
1291
1292static const struct panel_desc edt_et035012dm6 = {
1293 .modes = &edt_et035012dm6_mode,
1294 .num_modes = 1,
1295 .bpc = 8,
1296 .size = {
1297 .width = 70,
1298 .height = 52,
1299 },
1300 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1301 .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
1302};
1303
Marian-Cristian Rotariu82d57a52020-01-30 12:08:38 +00001304static const struct drm_display_mode edt_etm043080dh6gp_mode = {
1305 .clock = 10870,
1306 .hdisplay = 480,
1307 .hsync_start = 480 + 8,
1308 .hsync_end = 480 + 8 + 4,
1309 .htotal = 480 + 8 + 4 + 41,
1310
1311 /*
1312 * IWG22M: Y resolution changed for "dc_linuxfb" module crashing while
1313 * fb_align
1314 */
1315
1316 .vdisplay = 288,
1317 .vsync_start = 288 + 2,
1318 .vsync_end = 288 + 2 + 4,
1319 .vtotal = 288 + 2 + 4 + 10,
1320 .vrefresh = 60,
1321};
1322
1323static const struct panel_desc edt_etm043080dh6gp = {
1324 .modes = &edt_etm043080dh6gp_mode,
1325 .num_modes = 1,
1326 .bpc = 8,
1327 .size = {
1328 .width = 100,
1329 .height = 65,
1330 },
1331 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1332 .connector_type = DRM_MODE_CONNECTOR_DPI,
1333};
1334
Marek Vasutfd819bf2019-02-19 15:04:38 +01001335static const struct drm_display_mode edt_etm0430g0dh6_mode = {
1336 .clock = 9000,
1337 .hdisplay = 480,
1338 .hsync_start = 480 + 2,
1339 .hsync_end = 480 + 2 + 41,
1340 .htotal = 480 + 2 + 41 + 2,
1341 .vdisplay = 272,
1342 .vsync_start = 272 + 2,
1343 .vsync_end = 272 + 2 + 10,
1344 .vtotal = 272 + 2 + 10 + 2,
1345 .vrefresh = 60,
1346 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1347};
1348
1349static const struct panel_desc edt_etm0430g0dh6 = {
1350 .modes = &edt_etm0430g0dh6_mode,
1351 .num_modes = 1,
1352 .bpc = 6,
1353 .size = {
1354 .width = 95,
1355 .height = 54,
1356 },
1357};
1358
Stefan Agner26ab0062014-05-15 11:38:45 +02001359static const struct drm_display_mode edt_et057090dhu_mode = {
1360 .clock = 25175,
1361 .hdisplay = 640,
1362 .hsync_start = 640 + 16,
1363 .hsync_end = 640 + 16 + 30,
1364 .htotal = 640 + 16 + 30 + 114,
1365 .vdisplay = 480,
1366 .vsync_start = 480 + 10,
1367 .vsync_end = 480 + 10 + 3,
1368 .vtotal = 480 + 10 + 3 + 32,
1369 .vrefresh = 60,
1370 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1371};
1372
1373static const struct panel_desc edt_et057090dhu = {
1374 .modes = &edt_et057090dhu_mode,
1375 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -07001376 .bpc = 6,
Stefan Agner26ab0062014-05-15 11:38:45 +02001377 .size = {
1378 .width = 115,
1379 .height = 86,
1380 },
Stefan Agnereaeebff2016-12-08 14:54:31 -08001381 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
Laurent Pinchart88bc4172018-09-22 15:02:42 +03001382 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
Stefan Agner26ab0062014-05-15 11:38:45 +02001383};
1384
Philipp Zabelfff5de42014-05-15 12:25:47 +02001385static const struct drm_display_mode edt_etm0700g0dh6_mode = {
1386 .clock = 33260,
1387 .hdisplay = 800,
1388 .hsync_start = 800 + 40,
1389 .hsync_end = 800 + 40 + 128,
1390 .htotal = 800 + 40 + 128 + 88,
1391 .vdisplay = 480,
1392 .vsync_start = 480 + 10,
1393 .vsync_end = 480 + 10 + 2,
1394 .vtotal = 480 + 10 + 2 + 33,
1395 .vrefresh = 60,
1396 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1397};
1398
1399static const struct panel_desc edt_etm0700g0dh6 = {
1400 .modes = &edt_etm0700g0dh6_mode,
1401 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -07001402 .bpc = 6,
Philipp Zabelfff5de42014-05-15 12:25:47 +02001403 .size = {
1404 .width = 152,
1405 .height = 91,
1406 },
Stefan Agnereaeebff2016-12-08 14:54:31 -08001407 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
Laurent Pinchart88bc4172018-09-22 15:02:42 +03001408 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
Philipp Zabelfff5de42014-05-15 12:25:47 +02001409};
1410
Jan Tuerkaa7e6452018-06-19 11:55:44 +02001411static const struct panel_desc edt_etm0700g0bdh6 = {
1412 .modes = &edt_etm0700g0dh6_mode,
1413 .num_modes = 1,
1414 .bpc = 6,
1415 .size = {
1416 .width = 152,
1417 .height = 91,
1418 },
1419 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
Laurent Pinchart88bc4172018-09-22 15:02:42 +03001420 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
Jan Tuerkaa7e6452018-06-19 11:55:44 +02001421};
1422
Marco Felsch9158e3c2019-04-16 12:06:45 +02001423static const struct display_timing evervision_vgg804821_timing = {
1424 .pixelclock = { 27600000, 33300000, 50000000 },
1425 .hactive = { 800, 800, 800 },
1426 .hfront_porch = { 40, 66, 70 },
1427 .hback_porch = { 40, 67, 70 },
1428 .hsync_len = { 40, 67, 70 },
1429 .vactive = { 480, 480, 480 },
1430 .vfront_porch = { 6, 10, 10 },
1431 .vback_porch = { 7, 11, 11 },
1432 .vsync_len = { 7, 11, 11 },
1433 .flags = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_HIGH |
1434 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE |
1435 DISPLAY_FLAGS_SYNC_NEGEDGE,
1436};
1437
1438static const struct panel_desc evervision_vgg804821 = {
1439 .timings = &evervision_vgg804821_timing,
1440 .num_timings = 1,
1441 .bpc = 8,
1442 .size = {
1443 .width = 108,
1444 .height = 64,
1445 },
1446 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1447 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
1448};
1449
Boris BREZILLON102932b2014-06-05 15:53:32 +02001450static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = {
1451 .clock = 32260,
1452 .hdisplay = 800,
1453 .hsync_start = 800 + 168,
1454 .hsync_end = 800 + 168 + 64,
1455 .htotal = 800 + 168 + 64 + 88,
1456 .vdisplay = 480,
1457 .vsync_start = 480 + 37,
1458 .vsync_end = 480 + 37 + 2,
1459 .vtotal = 480 + 37 + 2 + 8,
1460 .vrefresh = 60,
1461};
1462
1463static const struct panel_desc foxlink_fl500wvr00_a0t = {
1464 .modes = &foxlink_fl500wvr00_a0t_mode,
1465 .num_modes = 1,
Thierry Redingd7a839c2014-11-06 10:11:01 +01001466 .bpc = 8,
Boris BREZILLON102932b2014-06-05 15:53:32 +02001467 .size = {
1468 .width = 108,
1469 .height = 65,
1470 },
Boris Brezillonbb276cb2014-07-22 13:35:47 +02001471 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
Boris BREZILLON102932b2014-06-05 15:53:32 +02001472};
1473
Paul Cercueil7b6bd842020-01-13 13:17:41 -03001474static const struct drm_display_mode frida_frd350h54004_mode = {
1475 .clock = 6000,
1476 .hdisplay = 320,
1477 .hsync_start = 320 + 44,
1478 .hsync_end = 320 + 44 + 16,
1479 .htotal = 320 + 44 + 16 + 20,
1480 .vdisplay = 240,
1481 .vsync_start = 240 + 2,
1482 .vsync_end = 240 + 2 + 6,
1483 .vtotal = 240 + 2 + 6 + 2,
1484 .vrefresh = 60,
1485 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
1486};
1487
1488static const struct panel_desc frida_frd350h54004 = {
1489 .modes = &frida_frd350h54004_mode,
1490 .num_modes = 1,
1491 .bpc = 8,
1492 .size = {
1493 .width = 77,
1494 .height = 64,
1495 },
1496 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1497 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
1498 .connector_type = DRM_MODE_CONNECTOR_DPI,
1499};
1500
Jagan Teki3be20712019-05-07 18:37:07 +05301501static const struct drm_display_mode friendlyarm_hd702e_mode = {
1502 .clock = 67185,
1503 .hdisplay = 800,
1504 .hsync_start = 800 + 20,
1505 .hsync_end = 800 + 20 + 24,
1506 .htotal = 800 + 20 + 24 + 20,
1507 .vdisplay = 1280,
1508 .vsync_start = 1280 + 4,
1509 .vsync_end = 1280 + 4 + 8,
1510 .vtotal = 1280 + 4 + 8 + 4,
1511 .vrefresh = 60,
1512 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1513};
1514
1515static const struct panel_desc friendlyarm_hd702e = {
1516 .modes = &friendlyarm_hd702e_mode,
1517 .num_modes = 1,
1518 .size = {
1519 .width = 94,
1520 .height = 151,
1521 },
1522};
1523
Philipp Zabeld435a2a2014-11-19 10:29:55 +01001524static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
1525 .clock = 9000,
1526 .hdisplay = 480,
1527 .hsync_start = 480 + 5,
1528 .hsync_end = 480 + 5 + 1,
1529 .htotal = 480 + 5 + 1 + 40,
1530 .vdisplay = 272,
1531 .vsync_start = 272 + 8,
1532 .vsync_end = 272 + 8 + 1,
1533 .vtotal = 272 + 8 + 1 + 8,
1534 .vrefresh = 60,
1535};
1536
1537static const struct panel_desc giantplus_gpg482739qs5 = {
1538 .modes = &giantplus_gpg482739qs5_mode,
1539 .num_modes = 1,
1540 .bpc = 8,
1541 .size = {
1542 .width = 95,
1543 .height = 54,
1544 },
Philipp Zabel33536a02015-02-11 18:50:07 +01001545 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
Philipp Zabeld435a2a2014-11-19 10:29:55 +01001546};
1547
Paul Cercueil2c6574a2019-06-06 00:22:47 +02001548static const struct display_timing giantplus_gpm940b0_timing = {
1549 .pixelclock = { 13500000, 27000000, 27500000 },
1550 .hactive = { 320, 320, 320 },
1551 .hfront_porch = { 14, 686, 718 },
1552 .hback_porch = { 50, 70, 255 },
1553 .hsync_len = { 1, 1, 1 },
1554 .vactive = { 240, 240, 240 },
1555 .vfront_porch = { 1, 1, 179 },
1556 .vback_porch = { 1, 21, 31 },
1557 .vsync_len = { 1, 1, 6 },
1558 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
1559};
1560
1561static const struct panel_desc giantplus_gpm940b0 = {
1562 .timings = &giantplus_gpm940b0_timing,
1563 .num_timings = 1,
1564 .bpc = 8,
1565 .size = {
1566 .width = 60,
1567 .height = 45,
1568 },
1569 .bus_format = MEDIA_BUS_FMT_RGB888_3X8,
1570 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE,
1571};
1572
Philipp Zabelab077252014-12-11 18:32:46 +01001573static const struct display_timing hannstar_hsd070pww1_timing = {
1574 .pixelclock = { 64300000, 71100000, 82000000 },
1575 .hactive = { 1280, 1280, 1280 },
1576 .hfront_porch = { 1, 1, 10 },
1577 .hback_porch = { 1, 1, 10 },
Philipp Zabeld901d2b2015-08-12 12:32:13 +02001578 /*
1579 * According to the data sheet, the minimum horizontal blanking interval
1580 * is 54 clocks (1 + 52 + 1), but tests with a Nitrogen6X have shown the
1581 * minimum working horizontal blanking interval to be 60 clocks.
1582 */
1583 .hsync_len = { 58, 158, 661 },
Philipp Zabelab077252014-12-11 18:32:46 +01001584 .vactive = { 800, 800, 800 },
1585 .vfront_porch = { 1, 1, 10 },
1586 .vback_porch = { 1, 1, 10 },
1587 .vsync_len = { 1, 21, 203 },
1588 .flags = DISPLAY_FLAGS_DE_HIGH,
Philipp Zabela8532052014-10-23 16:31:06 +02001589};
1590
1591static const struct panel_desc hannstar_hsd070pww1 = {
Philipp Zabelab077252014-12-11 18:32:46 +01001592 .timings = &hannstar_hsd070pww1_timing,
1593 .num_timings = 1,
Philipp Zabela8532052014-10-23 16:31:06 +02001594 .bpc = 6,
1595 .size = {
1596 .width = 151,
1597 .height = 94,
1598 },
Philipp Zabel58d6a7b2015-08-12 12:32:12 +02001599 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03001600 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Philipp Zabela8532052014-10-23 16:31:06 +02001601};
1602
Eric Nelsonc0d607e2015-04-13 15:09:26 -07001603static const struct display_timing hannstar_hsd100pxn1_timing = {
1604 .pixelclock = { 55000000, 65000000, 75000000 },
1605 .hactive = { 1024, 1024, 1024 },
1606 .hfront_porch = { 40, 40, 40 },
1607 .hback_porch = { 220, 220, 220 },
1608 .hsync_len = { 20, 60, 100 },
1609 .vactive = { 768, 768, 768 },
1610 .vfront_porch = { 7, 7, 7 },
1611 .vback_porch = { 21, 21, 21 },
1612 .vsync_len = { 10, 10, 10 },
1613 .flags = DISPLAY_FLAGS_DE_HIGH,
1614};
1615
1616static const struct panel_desc hannstar_hsd100pxn1 = {
1617 .timings = &hannstar_hsd100pxn1_timing,
1618 .num_timings = 1,
1619 .bpc = 6,
1620 .size = {
1621 .width = 203,
1622 .height = 152,
1623 },
Philipp Zabel4946b042015-05-20 11:34:08 +02001624 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03001625 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Eric Nelsonc0d607e2015-04-13 15:09:26 -07001626};
1627
Lucas Stach61ac0bf2014-11-06 17:44:35 +01001628static const struct drm_display_mode hitachi_tx23d38vm0caa_mode = {
1629 .clock = 33333,
1630 .hdisplay = 800,
1631 .hsync_start = 800 + 85,
1632 .hsync_end = 800 + 85 + 86,
1633 .htotal = 800 + 85 + 86 + 85,
1634 .vdisplay = 480,
1635 .vsync_start = 480 + 16,
1636 .vsync_end = 480 + 16 + 13,
1637 .vtotal = 480 + 16 + 13 + 16,
1638 .vrefresh = 60,
1639};
1640
1641static const struct panel_desc hitachi_tx23d38vm0caa = {
1642 .modes = &hitachi_tx23d38vm0caa_mode,
1643 .num_modes = 1,
1644 .bpc = 6,
1645 .size = {
1646 .width = 195,
1647 .height = 117,
1648 },
Philipp Zabel6c684e32017-10-11 14:59:58 +02001649 .delay = {
1650 .enable = 160,
1651 .disable = 160,
1652 },
Lucas Stach61ac0bf2014-11-06 17:44:35 +01001653};
1654
Nicolas Ferre41bcceb2015-03-19 14:43:01 +01001655static const struct drm_display_mode innolux_at043tn24_mode = {
1656 .clock = 9000,
1657 .hdisplay = 480,
1658 .hsync_start = 480 + 2,
1659 .hsync_end = 480 + 2 + 41,
1660 .htotal = 480 + 2 + 41 + 2,
1661 .vdisplay = 272,
1662 .vsync_start = 272 + 2,
Philipp Zabela4831592017-10-11 14:59:56 +02001663 .vsync_end = 272 + 2 + 10,
1664 .vtotal = 272 + 2 + 10 + 2,
Nicolas Ferre41bcceb2015-03-19 14:43:01 +01001665 .vrefresh = 60,
1666 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1667};
1668
1669static const struct panel_desc innolux_at043tn24 = {
1670 .modes = &innolux_at043tn24_mode,
1671 .num_modes = 1,
1672 .bpc = 8,
1673 .size = {
1674 .width = 95,
1675 .height = 54,
1676 },
1677 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
Laurent Pinchart88bc4172018-09-22 15:02:42 +03001678 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
Nicolas Ferre41bcceb2015-03-19 14:43:01 +01001679};
1680
Riccardo Bortolato4fc24ab2016-04-20 15:37:15 +02001681static const struct drm_display_mode innolux_at070tn92_mode = {
1682 .clock = 33333,
1683 .hdisplay = 800,
1684 .hsync_start = 800 + 210,
1685 .hsync_end = 800 + 210 + 20,
1686 .htotal = 800 + 210 + 20 + 46,
1687 .vdisplay = 480,
1688 .vsync_start = 480 + 22,
1689 .vsync_end = 480 + 22 + 10,
1690 .vtotal = 480 + 22 + 23 + 10,
1691 .vrefresh = 60,
1692};
1693
1694static const struct panel_desc innolux_at070tn92 = {
1695 .modes = &innolux_at070tn92_mode,
1696 .num_modes = 1,
1697 .size = {
1698 .width = 154,
1699 .height = 86,
1700 },
1701 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1702};
1703
Christoph Fritza5d2ade2018-06-04 13:16:48 +02001704static const struct display_timing innolux_g070y2_l01_timing = {
1705 .pixelclock = { 28000000, 29500000, 32000000 },
1706 .hactive = { 800, 800, 800 },
1707 .hfront_porch = { 61, 91, 141 },
1708 .hback_porch = { 60, 90, 140 },
1709 .hsync_len = { 12, 12, 12 },
1710 .vactive = { 480, 480, 480 },
1711 .vfront_porch = { 4, 9, 30 },
1712 .vback_porch = { 4, 8, 28 },
1713 .vsync_len = { 2, 2, 2 },
1714 .flags = DISPLAY_FLAGS_DE_HIGH,
1715};
1716
1717static const struct panel_desc innolux_g070y2_l01 = {
1718 .timings = &innolux_g070y2_l01_timing,
1719 .num_timings = 1,
1720 .bpc = 6,
1721 .size = {
1722 .width = 152,
1723 .height = 91,
1724 },
1725 .delay = {
1726 .prepare = 10,
1727 .enable = 100,
1728 .disable = 100,
1729 .unprepare = 800,
1730 },
1731 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03001732 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Christoph Fritza5d2ade2018-06-04 13:16:48 +02001733};
1734
Michael Olbrich1e29b842016-08-15 14:32:02 +02001735static const struct display_timing innolux_g101ice_l01_timing = {
1736 .pixelclock = { 60400000, 71100000, 74700000 },
1737 .hactive = { 1280, 1280, 1280 },
1738 .hfront_porch = { 41, 80, 100 },
1739 .hback_porch = { 40, 79, 99 },
1740 .hsync_len = { 1, 1, 1 },
1741 .vactive = { 800, 800, 800 },
1742 .vfront_porch = { 5, 11, 14 },
1743 .vback_porch = { 4, 11, 14 },
1744 .vsync_len = { 1, 1, 1 },
1745 .flags = DISPLAY_FLAGS_DE_HIGH,
1746};
1747
1748static const struct panel_desc innolux_g101ice_l01 = {
1749 .timings = &innolux_g101ice_l01_timing,
1750 .num_timings = 1,
1751 .bpc = 8,
1752 .size = {
1753 .width = 217,
1754 .height = 135,
1755 },
1756 .delay = {
1757 .enable = 200,
1758 .disable = 200,
1759 },
1760 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03001761 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Michael Olbrich1e29b842016-08-15 14:32:02 +02001762};
1763
Lucas Stach4ae13e42016-11-30 14:09:54 +01001764static const struct display_timing innolux_g121i1_l01_timing = {
1765 .pixelclock = { 67450000, 71000000, 74550000 },
1766 .hactive = { 1280, 1280, 1280 },
1767 .hfront_porch = { 40, 80, 160 },
1768 .hback_porch = { 39, 79, 159 },
1769 .hsync_len = { 1, 1, 1 },
1770 .vactive = { 800, 800, 800 },
1771 .vfront_porch = { 5, 11, 100 },
1772 .vback_porch = { 4, 11, 99 },
1773 .vsync_len = { 1, 1, 1 },
Lucas Stachd731f662014-11-06 17:44:33 +01001774};
1775
1776static const struct panel_desc innolux_g121i1_l01 = {
Lucas Stach4ae13e42016-11-30 14:09:54 +01001777 .timings = &innolux_g121i1_l01_timing,
1778 .num_timings = 1,
Lucas Stachd731f662014-11-06 17:44:33 +01001779 .bpc = 6,
1780 .size = {
1781 .width = 261,
1782 .height = 163,
1783 },
Lucas Stach4ae13e42016-11-30 14:09:54 +01001784 .delay = {
1785 .enable = 200,
1786 .disable = 20,
1787 },
1788 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03001789 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Lucas Stachd731f662014-11-06 17:44:33 +01001790};
1791
Akshay Bhatf8fa17b2015-11-18 15:57:47 -05001792static const struct drm_display_mode innolux_g121x1_l03_mode = {
1793 .clock = 65000,
1794 .hdisplay = 1024,
1795 .hsync_start = 1024 + 0,
1796 .hsync_end = 1024 + 1,
1797 .htotal = 1024 + 0 + 1 + 320,
1798 .vdisplay = 768,
1799 .vsync_start = 768 + 38,
1800 .vsync_end = 768 + 38 + 1,
1801 .vtotal = 768 + 38 + 1 + 0,
1802 .vrefresh = 60,
Akshay Bhat2e8c5eb2016-03-01 18:06:54 -05001803 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
Akshay Bhatf8fa17b2015-11-18 15:57:47 -05001804};
1805
1806static const struct panel_desc innolux_g121x1_l03 = {
1807 .modes = &innolux_g121x1_l03_mode,
1808 .num_modes = 1,
1809 .bpc = 6,
1810 .size = {
1811 .width = 246,
1812 .height = 185,
1813 },
1814 .delay = {
1815 .enable = 200,
1816 .unprepare = 200,
1817 .disable = 400,
1818 },
1819};
1820
Douglas Andersond719cbe2019-07-11 13:34:54 -07001821/*
1822 * Datasheet specifies that at 60 Hz refresh rate:
1823 * - total horizontal time: { 1506, 1592, 1716 }
1824 * - total vertical time: { 788, 800, 868 }
1825 *
1826 * ...but doesn't go into exactly how that should be split into a front
1827 * porch, back porch, or sync length. For now we'll leave a single setting
1828 * here which allows a bit of tweaking of the pixel clock at the expense of
1829 * refresh rate.
1830 */
1831static const struct display_timing innolux_n116bge_timing = {
1832 .pixelclock = { 72600000, 76420000, 80240000 },
1833 .hactive = { 1366, 1366, 1366 },
1834 .hfront_porch = { 136, 136, 136 },
1835 .hback_porch = { 60, 60, 60 },
1836 .hsync_len = { 30, 30, 30 },
1837 .vactive = { 768, 768, 768 },
1838 .vfront_porch = { 8, 8, 8 },
1839 .vback_porch = { 12, 12, 12 },
1840 .vsync_len = { 12, 12, 12 },
1841 .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW,
Thierry Reding0a2288c2014-07-03 14:02:59 +02001842};
1843
1844static const struct panel_desc innolux_n116bge = {
Douglas Andersond719cbe2019-07-11 13:34:54 -07001845 .timings = &innolux_n116bge_timing,
1846 .num_timings = 1,
Thierry Reding0a2288c2014-07-03 14:02:59 +02001847 .bpc = 6,
1848 .size = {
1849 .width = 256,
1850 .height = 144,
1851 },
1852};
1853
Alban Bedelea447392014-07-22 08:38:55 +02001854static const struct drm_display_mode innolux_n156bge_l21_mode = {
1855 .clock = 69300,
1856 .hdisplay = 1366,
1857 .hsync_start = 1366 + 16,
1858 .hsync_end = 1366 + 16 + 34,
1859 .htotal = 1366 + 16 + 34 + 50,
1860 .vdisplay = 768,
1861 .vsync_start = 768 + 2,
1862 .vsync_end = 768 + 2 + 6,
1863 .vtotal = 768 + 2 + 6 + 12,
1864 .vrefresh = 60,
1865};
1866
1867static const struct panel_desc innolux_n156bge_l21 = {
1868 .modes = &innolux_n156bge_l21_mode,
1869 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -07001870 .bpc = 6,
Alban Bedelea447392014-07-22 08:38:55 +02001871 .size = {
1872 .width = 344,
1873 .height = 193,
1874 },
1875};
1876
Douglas Anderson8f054b62018-10-25 15:21:34 -07001877static const struct drm_display_mode innolux_p120zdg_bf1_mode = {
spanda@codeaurora.orgda50bd42018-05-15 11:22:43 +05301878 .clock = 206016,
1879 .hdisplay = 2160,
1880 .hsync_start = 2160 + 48,
1881 .hsync_end = 2160 + 48 + 32,
1882 .htotal = 2160 + 48 + 32 + 80,
1883 .vdisplay = 1440,
1884 .vsync_start = 1440 + 3,
1885 .vsync_end = 1440 + 3 + 10,
1886 .vtotal = 1440 + 3 + 10 + 27,
1887 .vrefresh = 60,
1888 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
1889};
1890
Douglas Anderson8f054b62018-10-25 15:21:34 -07001891static const struct panel_desc innolux_p120zdg_bf1 = {
1892 .modes = &innolux_p120zdg_bf1_mode,
spanda@codeaurora.orgda50bd42018-05-15 11:22:43 +05301893 .num_modes = 1,
1894 .bpc = 8,
1895 .size = {
Douglas Anderson8f054b62018-10-25 15:21:34 -07001896 .width = 254,
1897 .height = 169,
spanda@codeaurora.orgda50bd42018-05-15 11:22:43 +05301898 },
Sean Paul22fd99e2018-08-13 17:30:40 -04001899 .delay = {
Douglas Anderson625d3b52018-10-25 15:21:31 -07001900 .hpd_absent_delay = 200,
Sean Paul22fd99e2018-08-13 17:30:40 -04001901 .unprepare = 500,
1902 },
spanda@codeaurora.orgda50bd42018-05-15 11:22:43 +05301903};
1904
Michael Grzeschikbccac3f2015-03-19 12:22:44 +01001905static const struct drm_display_mode innolux_zj070na_01p_mode = {
1906 .clock = 51501,
1907 .hdisplay = 1024,
1908 .hsync_start = 1024 + 128,
1909 .hsync_end = 1024 + 128 + 64,
1910 .htotal = 1024 + 128 + 64 + 128,
1911 .vdisplay = 600,
1912 .vsync_start = 600 + 16,
1913 .vsync_end = 600 + 16 + 4,
1914 .vtotal = 600 + 16 + 4 + 16,
1915 .vrefresh = 60,
1916};
1917
1918static const struct panel_desc innolux_zj070na_01p = {
1919 .modes = &innolux_zj070na_01p_mode,
1920 .num_modes = 1,
1921 .bpc = 6,
1922 .size = {
Thierry Reding81598842016-06-10 15:33:13 +02001923 .width = 154,
1924 .height = 90,
Michael Grzeschikbccac3f2015-03-19 12:22:44 +01001925 },
1926};
1927
Lukasz Majewski14bf60c2019-05-15 18:06:12 +02001928static const struct display_timing koe_tx14d24vm1bpa_timing = {
1929 .pixelclock = { 5580000, 5850000, 6200000 },
1930 .hactive = { 320, 320, 320 },
1931 .hfront_porch = { 30, 30, 30 },
1932 .hback_porch = { 30, 30, 30 },
1933 .hsync_len = { 1, 5, 17 },
1934 .vactive = { 240, 240, 240 },
1935 .vfront_porch = { 6, 6, 6 },
1936 .vback_porch = { 5, 5, 5 },
1937 .vsync_len = { 1, 2, 11 },
1938 .flags = DISPLAY_FLAGS_DE_HIGH,
1939};
1940
1941static const struct panel_desc koe_tx14d24vm1bpa = {
1942 .timings = &koe_tx14d24vm1bpa_timing,
1943 .num_timings = 1,
1944 .bpc = 6,
1945 .size = {
1946 .width = 115,
1947 .height = 86,
1948 },
1949};
1950
Jagan Teki8cfe8342018-02-04 23:19:28 +05301951static const struct display_timing koe_tx31d200vm0baa_timing = {
1952 .pixelclock = { 39600000, 43200000, 48000000 },
1953 .hactive = { 1280, 1280, 1280 },
1954 .hfront_porch = { 16, 36, 56 },
1955 .hback_porch = { 16, 36, 56 },
1956 .hsync_len = { 8, 8, 8 },
1957 .vactive = { 480, 480, 480 },
Stefan Agnerc9b6be72018-04-19 23:20:03 +02001958 .vfront_porch = { 6, 21, 33 },
1959 .vback_porch = { 6, 21, 33 },
Jagan Teki8cfe8342018-02-04 23:19:28 +05301960 .vsync_len = { 8, 8, 8 },
1961 .flags = DISPLAY_FLAGS_DE_HIGH,
1962};
1963
1964static const struct panel_desc koe_tx31d200vm0baa = {
1965 .timings = &koe_tx31d200vm0baa_timing,
1966 .num_timings = 1,
1967 .bpc = 6,
1968 .size = {
1969 .width = 292,
1970 .height = 109,
1971 },
1972 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03001973 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Jagan Teki8cfe8342018-02-04 23:19:28 +05301974};
1975
Lucas Stach8def22e2015-12-02 19:41:11 +01001976static const struct display_timing kyo_tcg121xglp_timing = {
1977 .pixelclock = { 52000000, 65000000, 71000000 },
1978 .hactive = { 1024, 1024, 1024 },
1979 .hfront_porch = { 2, 2, 2 },
1980 .hback_porch = { 2, 2, 2 },
1981 .hsync_len = { 86, 124, 244 },
1982 .vactive = { 768, 768, 768 },
1983 .vfront_porch = { 2, 2, 2 },
1984 .vback_porch = { 2, 2, 2 },
1985 .vsync_len = { 6, 34, 73 },
1986 .flags = DISPLAY_FLAGS_DE_HIGH,
1987};
1988
1989static const struct panel_desc kyo_tcg121xglp = {
1990 .timings = &kyo_tcg121xglp_timing,
1991 .num_timings = 1,
1992 .bpc = 8,
1993 .size = {
1994 .width = 246,
1995 .height = 184,
1996 },
1997 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03001998 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Lucas Stach8def22e2015-12-02 19:41:11 +01001999};
2000
Paul Kocialkowski27abdd82018-11-07 19:18:41 +01002001static const struct drm_display_mode lemaker_bl035_rgb_002_mode = {
2002 .clock = 7000,
2003 .hdisplay = 320,
2004 .hsync_start = 320 + 20,
2005 .hsync_end = 320 + 20 + 30,
2006 .htotal = 320 + 20 + 30 + 38,
2007 .vdisplay = 240,
2008 .vsync_start = 240 + 4,
2009 .vsync_end = 240 + 4 + 3,
2010 .vtotal = 240 + 4 + 3 + 15,
2011 .vrefresh = 60,
2012};
2013
2014static const struct panel_desc lemaker_bl035_rgb_002 = {
2015 .modes = &lemaker_bl035_rgb_002_mode,
2016 .num_modes = 1,
2017 .size = {
2018 .width = 70,
2019 .height = 52,
2020 },
2021 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2022 .bus_flags = DRM_BUS_FLAG_DE_LOW,
2023};
2024
Heiko Schocherdd015002015-05-22 10:25:57 +02002025static const struct drm_display_mode lg_lb070wv8_mode = {
2026 .clock = 33246,
2027 .hdisplay = 800,
2028 .hsync_start = 800 + 88,
2029 .hsync_end = 800 + 88 + 80,
2030 .htotal = 800 + 88 + 80 + 88,
2031 .vdisplay = 480,
2032 .vsync_start = 480 + 10,
2033 .vsync_end = 480 + 10 + 25,
2034 .vtotal = 480 + 10 + 25 + 10,
2035 .vrefresh = 60,
2036};
2037
2038static const struct panel_desc lg_lb070wv8 = {
2039 .modes = &lg_lb070wv8_mode,
2040 .num_modes = 1,
2041 .bpc = 16,
2042 .size = {
2043 .width = 151,
2044 .height = 91,
2045 },
2046 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03002047 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Heiko Schocherdd015002015-05-22 10:25:57 +02002048};
2049
Yakir Yangc5ece402016-06-28 12:51:15 +08002050static const struct drm_display_mode lg_lp079qx1_sp0v_mode = {
2051 .clock = 200000,
2052 .hdisplay = 1536,
2053 .hsync_start = 1536 + 12,
2054 .hsync_end = 1536 + 12 + 16,
2055 .htotal = 1536 + 12 + 16 + 48,
2056 .vdisplay = 2048,
2057 .vsync_start = 2048 + 8,
2058 .vsync_end = 2048 + 8 + 4,
2059 .vtotal = 2048 + 8 + 4 + 8,
2060 .vrefresh = 60,
2061 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2062};
2063
2064static const struct panel_desc lg_lp079qx1_sp0v = {
2065 .modes = &lg_lp079qx1_sp0v_mode,
2066 .num_modes = 1,
2067 .size = {
2068 .width = 129,
2069 .height = 171,
2070 },
2071};
2072
Yakir Yang0355dde2016-06-12 10:56:02 +08002073static const struct drm_display_mode lg_lp097qx1_spa1_mode = {
2074 .clock = 205210,
2075 .hdisplay = 2048,
2076 .hsync_start = 2048 + 150,
2077 .hsync_end = 2048 + 150 + 5,
2078 .htotal = 2048 + 150 + 5 + 5,
2079 .vdisplay = 1536,
2080 .vsync_start = 1536 + 3,
2081 .vsync_end = 1536 + 3 + 1,
2082 .vtotal = 1536 + 3 + 1 + 9,
2083 .vrefresh = 60,
2084};
2085
2086static const struct panel_desc lg_lp097qx1_spa1 = {
2087 .modes = &lg_lp097qx1_spa1_mode,
2088 .num_modes = 1,
2089 .size = {
2090 .width = 208,
2091 .height = 147,
2092 },
2093};
2094
Jitao Shi690d8fa2016-02-22 19:01:44 +08002095static const struct drm_display_mode lg_lp120up1_mode = {
2096 .clock = 162300,
2097 .hdisplay = 1920,
2098 .hsync_start = 1920 + 40,
2099 .hsync_end = 1920 + 40 + 40,
2100 .htotal = 1920 + 40 + 40+ 80,
2101 .vdisplay = 1280,
2102 .vsync_start = 1280 + 4,
2103 .vsync_end = 1280 + 4 + 4,
2104 .vtotal = 1280 + 4 + 4 + 12,
2105 .vrefresh = 60,
2106};
2107
2108static const struct panel_desc lg_lp120up1 = {
2109 .modes = &lg_lp120up1_mode,
2110 .num_modes = 1,
2111 .bpc = 8,
2112 .size = {
2113 .width = 267,
2114 .height = 183,
2115 },
2116};
2117
Thierry Redingec7c5652013-11-15 15:59:32 +01002118static const struct drm_display_mode lg_lp129qe_mode = {
2119 .clock = 285250,
2120 .hdisplay = 2560,
2121 .hsync_start = 2560 + 48,
2122 .hsync_end = 2560 + 48 + 32,
2123 .htotal = 2560 + 48 + 32 + 80,
2124 .vdisplay = 1700,
2125 .vsync_start = 1700 + 3,
2126 .vsync_end = 1700 + 3 + 10,
2127 .vtotal = 1700 + 3 + 10 + 36,
2128 .vrefresh = 60,
2129};
2130
2131static const struct panel_desc lg_lp129qe = {
2132 .modes = &lg_lp129qe_mode,
2133 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -07002134 .bpc = 8,
Thierry Redingec7c5652013-11-15 15:59:32 +01002135 .size = {
2136 .width = 272,
2137 .height = 181,
2138 },
2139};
2140
Marcel Ziswiler5728fe72020-01-20 09:01:00 +01002141static const struct display_timing logictechno_lt161010_2nh_timing = {
2142 .pixelclock = { 26400000, 33300000, 46800000 },
2143 .hactive = { 800, 800, 800 },
2144 .hfront_porch = { 16, 210, 354 },
2145 .hback_porch = { 46, 46, 46 },
2146 .hsync_len = { 1, 20, 40 },
2147 .vactive = { 480, 480, 480 },
2148 .vfront_porch = { 7, 22, 147 },
2149 .vback_porch = { 23, 23, 23 },
2150 .vsync_len = { 1, 10, 20 },
2151 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
2152 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
2153 DISPLAY_FLAGS_SYNC_POSEDGE,
2154};
2155
2156static const struct panel_desc logictechno_lt161010_2nh = {
2157 .timings = &logictechno_lt161010_2nh_timing,
2158 .num_timings = 1,
2159 .size = {
2160 .width = 154,
2161 .height = 86,
2162 },
2163 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2164 .bus_flags = DRM_BUS_FLAG_DE_HIGH |
2165 DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
2166 DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE,
2167 .connector_type = DRM_MODE_CONNECTOR_DPI,
2168};
2169
2170static const struct display_timing logictechno_lt170410_2whc_timing = {
2171 .pixelclock = { 68900000, 71100000, 73400000 },
2172 .hactive = { 1280, 1280, 1280 },
2173 .hfront_porch = { 23, 60, 71 },
2174 .hback_porch = { 23, 60, 71 },
2175 .hsync_len = { 15, 40, 47 },
2176 .vactive = { 800, 800, 800 },
2177 .vfront_porch = { 5, 7, 10 },
2178 .vback_porch = { 5, 7, 10 },
2179 .vsync_len = { 6, 9, 12 },
2180 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
2181 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
2182 DISPLAY_FLAGS_SYNC_POSEDGE,
2183};
2184
2185static const struct panel_desc logictechno_lt170410_2whc = {
2186 .timings = &logictechno_lt170410_2whc_timing,
2187 .num_timings = 1,
2188 .size = {
2189 .width = 217,
2190 .height = 136,
2191 },
2192 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2193 .bus_flags = DRM_BUS_FLAG_DE_HIGH |
2194 DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
2195 DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE,
2196 .connector_type = DRM_MODE_CONNECTOR_LVDS,
2197};
2198
Lukasz Majewski65c766c2017-10-21 00:18:37 +02002199static const struct drm_display_mode mitsubishi_aa070mc01_mode = {
2200 .clock = 30400,
2201 .hdisplay = 800,
2202 .hsync_start = 800 + 0,
2203 .hsync_end = 800 + 1,
2204 .htotal = 800 + 0 + 1 + 160,
2205 .vdisplay = 480,
2206 .vsync_start = 480 + 0,
2207 .vsync_end = 480 + 48 + 1,
2208 .vtotal = 480 + 48 + 1 + 0,
2209 .vrefresh = 60,
2210 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
2211};
2212
Adam Ford0d354082019-10-16 08:51:45 -05002213static const struct drm_display_mode logicpd_type_28_mode = {
2214 .clock = 9000,
2215 .hdisplay = 480,
2216 .hsync_start = 480 + 3,
2217 .hsync_end = 480 + 3 + 42,
2218 .htotal = 480 + 3 + 42 + 2,
2219
2220 .vdisplay = 272,
2221 .vsync_start = 272 + 2,
2222 .vsync_end = 272 + 2 + 11,
2223 .vtotal = 272 + 2 + 11 + 3,
2224 .vrefresh = 60,
2225 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
2226};
2227
2228static const struct panel_desc logicpd_type_28 = {
2229 .modes = &logicpd_type_28_mode,
2230 .num_modes = 1,
2231 .bpc = 8,
2232 .size = {
2233 .width = 105,
2234 .height = 67,
2235 },
2236 .delay = {
2237 .prepare = 200,
2238 .enable = 200,
2239 .unprepare = 200,
2240 .disable = 200,
2241 },
2242 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2243 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
2244 DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE,
2245};
2246
Lukasz Majewski65c766c2017-10-21 00:18:37 +02002247static const struct panel_desc mitsubishi_aa070mc01 = {
2248 .modes = &mitsubishi_aa070mc01_mode,
2249 .num_modes = 1,
2250 .bpc = 8,
2251 .size = {
2252 .width = 152,
2253 .height = 91,
2254 },
2255
2256 .delay = {
2257 .enable = 200,
2258 .unprepare = 200,
2259 .disable = 400,
2260 },
2261 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03002262 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Lukasz Majewski65c766c2017-10-21 00:18:37 +02002263 .bus_flags = DRM_BUS_FLAG_DE_HIGH,
2264};
2265
Lucas Stach01bacc132017-06-08 20:07:55 +02002266static const struct display_timing nec_nl12880bc20_05_timing = {
2267 .pixelclock = { 67000000, 71000000, 75000000 },
2268 .hactive = { 1280, 1280, 1280 },
2269 .hfront_porch = { 2, 30, 30 },
2270 .hback_porch = { 6, 100, 100 },
2271 .hsync_len = { 2, 30, 30 },
2272 .vactive = { 800, 800, 800 },
2273 .vfront_porch = { 5, 5, 5 },
2274 .vback_porch = { 11, 11, 11 },
2275 .vsync_len = { 7, 7, 7 },
2276};
2277
2278static const struct panel_desc nec_nl12880bc20_05 = {
2279 .timings = &nec_nl12880bc20_05_timing,
2280 .num_timings = 1,
2281 .bpc = 8,
2282 .size = {
2283 .width = 261,
2284 .height = 163,
2285 },
2286 .delay = {
2287 .enable = 50,
2288 .disable = 50,
2289 },
2290 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03002291 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Lucas Stach01bacc132017-06-08 20:07:55 +02002292};
2293
jianwei wangc6e87f92015-07-29 16:30:02 +08002294static const struct drm_display_mode nec_nl4827hc19_05b_mode = {
2295 .clock = 10870,
2296 .hdisplay = 480,
2297 .hsync_start = 480 + 2,
2298 .hsync_end = 480 + 2 + 41,
2299 .htotal = 480 + 2 + 41 + 2,
2300 .vdisplay = 272,
2301 .vsync_start = 272 + 2,
2302 .vsync_end = 272 + 2 + 4,
2303 .vtotal = 272 + 2 + 4 + 2,
2304 .vrefresh = 74,
Stefan Agner4bc390c2015-11-17 19:10:29 -08002305 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
jianwei wangc6e87f92015-07-29 16:30:02 +08002306};
2307
2308static const struct panel_desc nec_nl4827hc19_05b = {
2309 .modes = &nec_nl4827hc19_05b_mode,
2310 .num_modes = 1,
2311 .bpc = 8,
2312 .size = {
2313 .width = 95,
2314 .height = 54,
2315 },
Stefan Agner2c806612016-02-08 12:50:13 -08002316 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
Laurent Pinchart88bc4172018-09-22 15:02:42 +03002317 .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
jianwei wangc6e87f92015-07-29 16:30:02 +08002318};
2319
Maxime Riparde6c2f062016-09-06 16:46:17 +02002320static const struct drm_display_mode netron_dy_e231732_mode = {
2321 .clock = 66000,
2322 .hdisplay = 1024,
2323 .hsync_start = 1024 + 160,
2324 .hsync_end = 1024 + 160 + 70,
2325 .htotal = 1024 + 160 + 70 + 90,
2326 .vdisplay = 600,
2327 .vsync_start = 600 + 127,
2328 .vsync_end = 600 + 127 + 20,
2329 .vtotal = 600 + 127 + 20 + 3,
2330 .vrefresh = 60,
2331};
2332
2333static const struct panel_desc netron_dy_e231732 = {
2334 .modes = &netron_dy_e231732_mode,
2335 .num_modes = 1,
2336 .size = {
2337 .width = 154,
2338 .height = 87,
2339 },
2340 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2341};
2342
Tomi Valkeinen3b39ad72018-06-18 16:22:40 +03002343static const struct drm_display_mode newhaven_nhd_43_480272ef_atxl_mode = {
2344 .clock = 9000,
2345 .hdisplay = 480,
2346 .hsync_start = 480 + 2,
2347 .hsync_end = 480 + 2 + 41,
2348 .htotal = 480 + 2 + 41 + 2,
2349 .vdisplay = 272,
2350 .vsync_start = 272 + 2,
2351 .vsync_end = 272 + 2 + 10,
2352 .vtotal = 272 + 2 + 10 + 2,
2353 .vrefresh = 60,
2354 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2355};
2356
2357static const struct panel_desc newhaven_nhd_43_480272ef_atxl = {
2358 .modes = &newhaven_nhd_43_480272ef_atxl_mode,
2359 .num_modes = 1,
2360 .bpc = 8,
2361 .size = {
2362 .width = 95,
2363 .height = 54,
2364 },
2365 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
Laurent Pinchart88bc4172018-09-22 15:02:42 +03002366 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
2367 DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
Tomi Valkeinen3b39ad72018-06-18 16:22:40 +03002368};
2369
Lucas Stach4177fa62017-06-08 20:07:57 +02002370static const struct display_timing nlt_nl192108ac18_02d_timing = {
2371 .pixelclock = { 130000000, 148350000, 163000000 },
2372 .hactive = { 1920, 1920, 1920 },
2373 .hfront_porch = { 80, 100, 100 },
2374 .hback_porch = { 100, 120, 120 },
2375 .hsync_len = { 50, 60, 60 },
2376 .vactive = { 1080, 1080, 1080 },
2377 .vfront_porch = { 12, 30, 30 },
2378 .vback_porch = { 4, 10, 10 },
2379 .vsync_len = { 4, 5, 5 },
2380};
2381
2382static const struct panel_desc nlt_nl192108ac18_02d = {
2383 .timings = &nlt_nl192108ac18_02d_timing,
2384 .num_timings = 1,
2385 .bpc = 8,
2386 .size = {
2387 .width = 344,
2388 .height = 194,
2389 },
2390 .delay = {
2391 .unprepare = 500,
2392 },
2393 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03002394 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Lucas Stach4177fa62017-06-08 20:07:57 +02002395};
2396
Fabien Lahoudere05ec0e42016-10-17 11:38:01 +02002397static const struct drm_display_mode nvd_9128_mode = {
2398 .clock = 29500,
2399 .hdisplay = 800,
2400 .hsync_start = 800 + 130,
2401 .hsync_end = 800 + 130 + 98,
2402 .htotal = 800 + 0 + 130 + 98,
2403 .vdisplay = 480,
2404 .vsync_start = 480 + 10,
2405 .vsync_end = 480 + 10 + 50,
2406 .vtotal = 480 + 0 + 10 + 50,
2407};
2408
2409static const struct panel_desc nvd_9128 = {
2410 .modes = &nvd_9128_mode,
2411 .num_modes = 1,
2412 .bpc = 8,
2413 .size = {
2414 .width = 156,
2415 .height = 88,
2416 },
2417 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03002418 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Fabien Lahoudere05ec0e42016-10-17 11:38:01 +02002419};
2420
Gary Bissona99fb622015-06-10 18:44:23 +02002421static const struct display_timing okaya_rs800480t_7x0gp_timing = {
2422 .pixelclock = { 30000000, 30000000, 40000000 },
2423 .hactive = { 800, 800, 800 },
2424 .hfront_porch = { 40, 40, 40 },
2425 .hback_porch = { 40, 40, 40 },
2426 .hsync_len = { 1, 48, 48 },
2427 .vactive = { 480, 480, 480 },
2428 .vfront_porch = { 13, 13, 13 },
2429 .vback_porch = { 29, 29, 29 },
2430 .vsync_len = { 3, 3, 3 },
2431 .flags = DISPLAY_FLAGS_DE_HIGH,
2432};
2433
2434static const struct panel_desc okaya_rs800480t_7x0gp = {
2435 .timings = &okaya_rs800480t_7x0gp_timing,
2436 .num_timings = 1,
2437 .bpc = 6,
2438 .size = {
2439 .width = 154,
2440 .height = 87,
2441 },
2442 .delay = {
2443 .prepare = 41,
2444 .enable = 50,
2445 .unprepare = 41,
2446 .disable = 50,
2447 },
2448 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2449};
2450
Maxime Ripardcf5c9e62016-03-23 17:38:34 +01002451static const struct drm_display_mode olimex_lcd_olinuxino_43ts_mode = {
2452 .clock = 9000,
2453 .hdisplay = 480,
2454 .hsync_start = 480 + 5,
2455 .hsync_end = 480 + 5 + 30,
2456 .htotal = 480 + 5 + 30 + 10,
2457 .vdisplay = 272,
2458 .vsync_start = 272 + 8,
2459 .vsync_end = 272 + 8 + 5,
2460 .vtotal = 272 + 8 + 5 + 3,
2461 .vrefresh = 60,
2462};
2463
2464static const struct panel_desc olimex_lcd_olinuxino_43ts = {
2465 .modes = &olimex_lcd_olinuxino_43ts_mode,
2466 .num_modes = 1,
2467 .size = {
Jonathan Liu30c6d7ab92017-07-20 20:29:43 +10002468 .width = 95,
2469 .height = 54,
Maxime Ripardcf5c9e62016-03-23 17:38:34 +01002470 },
Jonathan Liu5c2a7c62016-09-11 20:46:55 +10002471 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
Maxime Ripardcf5c9e62016-03-23 17:38:34 +01002472};
2473
Eric Anholte8b6f562016-03-24 17:23:48 -07002474/*
2475 * 800x480 CVT. The panel appears to be quite accepting, at least as far as
2476 * pixel clocks, but this is the timing that was being used in the Adafruit
2477 * installation instructions.
2478 */
2479static const struct drm_display_mode ontat_yx700wv03_mode = {
2480 .clock = 29500,
2481 .hdisplay = 800,
2482 .hsync_start = 824,
2483 .hsync_end = 896,
2484 .htotal = 992,
2485 .vdisplay = 480,
2486 .vsync_start = 483,
2487 .vsync_end = 493,
2488 .vtotal = 500,
2489 .vrefresh = 60,
2490 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2491};
2492
2493/*
2494 * Specification at:
2495 * https://www.adafruit.com/images/product-files/2406/c3163.pdf
2496 */
2497static const struct panel_desc ontat_yx700wv03 = {
2498 .modes = &ontat_yx700wv03_mode,
2499 .num_modes = 1,
2500 .bpc = 8,
2501 .size = {
2502 .width = 154,
2503 .height = 83,
2504 },
Eric Anholt5651e5e2018-03-09 15:33:32 -08002505 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
Eric Anholte8b6f562016-03-24 17:23:48 -07002506};
2507
H. Nikolaus Schaller9c31dcb2019-06-07 13:11:08 +02002508static const struct drm_display_mode ortustech_com37h3m_mode = {
2509 .clock = 22153,
2510 .hdisplay = 480,
2511 .hsync_start = 480 + 8,
2512 .hsync_end = 480 + 8 + 10,
2513 .htotal = 480 + 8 + 10 + 10,
2514 .vdisplay = 640,
2515 .vsync_start = 640 + 4,
2516 .vsync_end = 640 + 4 + 3,
2517 .vtotal = 640 + 4 + 3 + 4,
2518 .vrefresh = 60,
2519 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2520};
2521
2522static const struct panel_desc ortustech_com37h3m = {
2523 .modes = &ortustech_com37h3m_mode,
2524 .num_modes = 1,
2525 .bpc = 8,
2526 .size = {
2527 .width = 56, /* 56.16mm */
2528 .height = 75, /* 74.88mm */
2529 },
2530 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2531 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE |
2532 DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
2533};
2534
Philipp Zabel725c9d42015-02-11 18:50:11 +01002535static const struct drm_display_mode ortustech_com43h4m85ulc_mode = {
2536 .clock = 25000,
2537 .hdisplay = 480,
2538 .hsync_start = 480 + 10,
2539 .hsync_end = 480 + 10 + 10,
2540 .htotal = 480 + 10 + 10 + 15,
2541 .vdisplay = 800,
2542 .vsync_start = 800 + 3,
2543 .vsync_end = 800 + 3 + 3,
2544 .vtotal = 800 + 3 + 3 + 3,
2545 .vrefresh = 60,
2546};
2547
2548static const struct panel_desc ortustech_com43h4m85ulc = {
2549 .modes = &ortustech_com43h4m85ulc_mode,
2550 .num_modes = 1,
2551 .bpc = 8,
2552 .size = {
2553 .width = 56,
2554 .height = 93,
2555 },
2556 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
Laurent Pinchart88bc4172018-09-22 15:02:42 +03002557 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
Philipp Zabel725c9d42015-02-11 18:50:11 +01002558};
2559
Laurent Pinchart163f7a32018-12-07 22:13:44 +02002560static const struct drm_display_mode osddisplays_osd070t1718_19ts_mode = {
2561 .clock = 33000,
2562 .hdisplay = 800,
2563 .hsync_start = 800 + 210,
2564 .hsync_end = 800 + 210 + 30,
2565 .htotal = 800 + 210 + 30 + 16,
2566 .vdisplay = 480,
2567 .vsync_start = 480 + 22,
2568 .vsync_end = 480 + 22 + 13,
2569 .vtotal = 480 + 22 + 13 + 10,
2570 .vrefresh = 60,
2571 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2572};
2573
2574static const struct panel_desc osddisplays_osd070t1718_19ts = {
2575 .modes = &osddisplays_osd070t1718_19ts_mode,
2576 .num_modes = 1,
2577 .bpc = 8,
2578 .size = {
2579 .width = 152,
2580 .height = 91,
2581 },
2582 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2583 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
Laurent Pincharta793f0e2019-09-04 16:37:23 +03002584 .connector_type = DRM_MODE_CONNECTOR_DPI,
Laurent Pinchart163f7a32018-12-07 22:13:44 +02002585};
2586
Eugen Hristev4ba3e562019-01-14 09:43:31 +00002587static const struct drm_display_mode pda_91_00156_a0_mode = {
2588 .clock = 33300,
2589 .hdisplay = 800,
2590 .hsync_start = 800 + 1,
2591 .hsync_end = 800 + 1 + 64,
2592 .htotal = 800 + 1 + 64 + 64,
2593 .vdisplay = 480,
2594 .vsync_start = 480 + 1,
2595 .vsync_end = 480 + 1 + 23,
2596 .vtotal = 480 + 1 + 23 + 22,
2597 .vrefresh = 60,
2598};
2599
2600static const struct panel_desc pda_91_00156_a0 = {
2601 .modes = &pda_91_00156_a0_mode,
2602 .num_modes = 1,
2603 .size = {
2604 .width = 152,
2605 .height = 91,
2606 },
2607 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2608};
2609
2610
Josh Wud2a6f0f2015-10-08 17:42:41 +02002611static const struct drm_display_mode qd43003c0_40_mode = {
2612 .clock = 9000,
2613 .hdisplay = 480,
2614 .hsync_start = 480 + 8,
2615 .hsync_end = 480 + 8 + 4,
2616 .htotal = 480 + 8 + 4 + 39,
2617 .vdisplay = 272,
2618 .vsync_start = 272 + 4,
2619 .vsync_end = 272 + 4 + 10,
2620 .vtotal = 272 + 4 + 10 + 2,
2621 .vrefresh = 60,
2622};
2623
2624static const struct panel_desc qd43003c0_40 = {
2625 .modes = &qd43003c0_40_mode,
2626 .num_modes = 1,
2627 .bpc = 8,
2628 .size = {
2629 .width = 95,
2630 .height = 53,
2631 },
2632 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2633};
2634
Jagan Teki23167fa2018-06-07 19:16:48 +05302635static const struct display_timing rocktech_rk070er9427_timing = {
2636 .pixelclock = { 26400000, 33300000, 46800000 },
2637 .hactive = { 800, 800, 800 },
2638 .hfront_porch = { 16, 210, 354 },
2639 .hback_porch = { 46, 46, 46 },
2640 .hsync_len = { 1, 1, 1 },
2641 .vactive = { 480, 480, 480 },
2642 .vfront_porch = { 7, 22, 147 },
2643 .vback_porch = { 23, 23, 23 },
2644 .vsync_len = { 1, 1, 1 },
2645 .flags = DISPLAY_FLAGS_DE_HIGH,
2646};
2647
2648static const struct panel_desc rocktech_rk070er9427 = {
2649 .timings = &rocktech_rk070er9427_timing,
2650 .num_timings = 1,
2651 .bpc = 6,
2652 .size = {
2653 .width = 154,
2654 .height = 86,
2655 },
2656 .delay = {
2657 .prepare = 41,
2658 .enable = 50,
2659 .unprepare = 41,
2660 .disable = 50,
2661 },
2662 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2663};
2664
Jyri Sarhaf3050472020-02-11 14:17:18 +02002665static const struct drm_display_mode rocktech_rk101ii01d_ct_mode = {
2666 .clock = 71100,
2667 .hdisplay = 1280,
2668 .hsync_start = 1280 + 48,
2669 .hsync_end = 1280 + 48 + 32,
2670 .htotal = 1280 + 48 + 32 + 80,
2671 .vdisplay = 800,
2672 .vsync_start = 800 + 2,
2673 .vsync_end = 800 + 2 + 5,
2674 .vtotal = 800 + 2 + 5 + 16,
2675 .vrefresh = 60,
2676};
2677
2678static const struct panel_desc rocktech_rk101ii01d_ct = {
2679 .modes = &rocktech_rk101ii01d_ct_mode,
2680 .num_modes = 1,
2681 .size = {
2682 .width = 217,
2683 .height = 136,
2684 },
2685 .delay = {
2686 .prepare = 50,
2687 .disable = 50,
2688 },
2689 .bus_flags = DRM_BUS_FLAG_DE_HIGH,
2690 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2691 .connector_type = DRM_MODE_CONNECTOR_LVDS,
2692};
2693
Yakir Yang0330eaf2016-06-12 10:56:13 +08002694static const struct drm_display_mode samsung_lsn122dl01_c01_mode = {
2695 .clock = 271560,
2696 .hdisplay = 2560,
2697 .hsync_start = 2560 + 48,
2698 .hsync_end = 2560 + 48 + 32,
2699 .htotal = 2560 + 48 + 32 + 80,
2700 .vdisplay = 1600,
2701 .vsync_start = 1600 + 2,
2702 .vsync_end = 1600 + 2 + 5,
2703 .vtotal = 1600 + 2 + 5 + 57,
2704 .vrefresh = 60,
2705};
2706
2707static const struct panel_desc samsung_lsn122dl01_c01 = {
2708 .modes = &samsung_lsn122dl01_c01_mode,
2709 .num_modes = 1,
2710 .size = {
2711 .width = 263,
2712 .height = 164,
2713 },
2714};
2715
Marc Dietrich6d54e3d2013-12-21 21:38:12 +01002716static const struct drm_display_mode samsung_ltn101nt05_mode = {
2717 .clock = 54030,
2718 .hdisplay = 1024,
2719 .hsync_start = 1024 + 24,
2720 .hsync_end = 1024 + 24 + 136,
2721 .htotal = 1024 + 24 + 136 + 160,
2722 .vdisplay = 600,
2723 .vsync_start = 600 + 3,
2724 .vsync_end = 600 + 3 + 6,
2725 .vtotal = 600 + 3 + 6 + 61,
2726 .vrefresh = 60,
2727};
2728
2729static const struct panel_desc samsung_ltn101nt05 = {
2730 .modes = &samsung_ltn101nt05_mode,
2731 .num_modes = 1,
Stéphane Marchesin0208d512014-06-19 18:18:28 -07002732 .bpc = 6,
Marc Dietrich6d54e3d2013-12-21 21:38:12 +01002733 .size = {
Thierry Reding81598842016-06-10 15:33:13 +02002734 .width = 223,
2735 .height = 125,
Marc Dietrich6d54e3d2013-12-21 21:38:12 +01002736 },
2737};
2738
Stéphane Marchesin0c934302015-03-18 10:52:18 +01002739static const struct drm_display_mode samsung_ltn140at29_301_mode = {
2740 .clock = 76300,
2741 .hdisplay = 1366,
2742 .hsync_start = 1366 + 64,
2743 .hsync_end = 1366 + 64 + 48,
2744 .htotal = 1366 + 64 + 48 + 128,
2745 .vdisplay = 768,
2746 .vsync_start = 768 + 2,
2747 .vsync_end = 768 + 2 + 5,
2748 .vtotal = 768 + 2 + 5 + 17,
2749 .vrefresh = 60,
2750};
2751
2752static const struct panel_desc samsung_ltn140at29_301 = {
2753 .modes = &samsung_ltn140at29_301_mode,
2754 .num_modes = 1,
2755 .bpc = 6,
2756 .size = {
2757 .width = 320,
2758 .height = 187,
2759 },
2760};
2761
Miquel Raynal44c58c52020-01-09 19:40:37 +01002762static const struct display_timing satoz_sat050at40h12r2_timing = {
2763 .pixelclock = {33300000, 33300000, 50000000},
2764 .hactive = {800, 800, 800},
2765 .hfront_porch = {16, 210, 354},
2766 .hback_porch = {46, 46, 46},
2767 .hsync_len = {1, 1, 40},
2768 .vactive = {480, 480, 480},
2769 .vfront_porch = {7, 22, 147},
2770 .vback_porch = {23, 23, 23},
2771 .vsync_len = {1, 1, 20},
2772};
2773
2774static const struct panel_desc satoz_sat050at40h12r2 = {
2775 .timings = &satoz_sat050at40h12r2_timing,
2776 .num_timings = 1,
2777 .bpc = 8,
2778 .size = {
2779 .width = 108,
2780 .height = 65,
2781 },
2782 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2783 .connector_type = DRM_MODE_CONNECTOR_LVDS,
2784};
2785
Jeffrey Hugocd5e1cb2019-07-08 09:58:11 -07002786static const struct drm_display_mode sharp_ld_d5116z01b_mode = {
2787 .clock = 168480,
2788 .hdisplay = 1920,
2789 .hsync_start = 1920 + 48,
2790 .hsync_end = 1920 + 48 + 32,
2791 .htotal = 1920 + 48 + 32 + 80,
2792 .vdisplay = 1280,
2793 .vsync_start = 1280 + 3,
2794 .vsync_end = 1280 + 3 + 10,
2795 .vtotal = 1280 + 3 + 10 + 57,
2796 .vrefresh = 60,
2797 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
2798};
2799
2800static const struct panel_desc sharp_ld_d5116z01b = {
2801 .modes = &sharp_ld_d5116z01b_mode,
2802 .num_modes = 1,
2803 .bpc = 8,
2804 .size = {
2805 .width = 260,
2806 .height = 120,
2807 },
2808 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2809 .bus_flags = DRM_BUS_FLAG_DATA_MSB_TO_LSB,
2810};
2811
H. Nikolaus Schallerdda0e4b2019-06-07 13:11:07 +02002812static const struct drm_display_mode sharp_lq070y3dg3b_mode = {
2813 .clock = 33260,
2814 .hdisplay = 800,
2815 .hsync_start = 800 + 64,
2816 .hsync_end = 800 + 64 + 128,
2817 .htotal = 800 + 64 + 128 + 64,
2818 .vdisplay = 480,
2819 .vsync_start = 480 + 8,
2820 .vsync_end = 480 + 8 + 2,
2821 .vtotal = 480 + 8 + 2 + 35,
2822 .vrefresh = 60,
2823 .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE,
2824};
2825
2826static const struct panel_desc sharp_lq070y3dg3b = {
2827 .modes = &sharp_lq070y3dg3b_mode,
2828 .num_modes = 1,
2829 .bpc = 8,
2830 .size = {
2831 .width = 152, /* 152.4mm */
2832 .height = 91, /* 91.4mm */
2833 },
2834 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2835 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE |
2836 DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
2837};
2838
Vladimir Zapolskiy03e3ec92018-07-06 21:51:01 +03002839static const struct drm_display_mode sharp_lq035q7db03_mode = {
2840 .clock = 5500,
2841 .hdisplay = 240,
2842 .hsync_start = 240 + 16,
2843 .hsync_end = 240 + 16 + 7,
2844 .htotal = 240 + 16 + 7 + 5,
2845 .vdisplay = 320,
2846 .vsync_start = 320 + 9,
2847 .vsync_end = 320 + 9 + 1,
2848 .vtotal = 320 + 9 + 1 + 7,
2849 .vrefresh = 60,
2850};
2851
2852static const struct panel_desc sharp_lq035q7db03 = {
2853 .modes = &sharp_lq035q7db03_mode,
2854 .num_modes = 1,
2855 .bpc = 6,
2856 .size = {
2857 .width = 54,
2858 .height = 72,
2859 },
2860 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2861};
2862
Joshua Clayton592aa022016-07-06 15:59:16 -07002863static const struct display_timing sharp_lq101k1ly04_timing = {
2864 .pixelclock = { 60000000, 65000000, 80000000 },
2865 .hactive = { 1280, 1280, 1280 },
2866 .hfront_porch = { 20, 20, 20 },
2867 .hback_porch = { 20, 20, 20 },
2868 .hsync_len = { 10, 10, 10 },
2869 .vactive = { 800, 800, 800 },
2870 .vfront_porch = { 4, 4, 4 },
2871 .vback_porch = { 4, 4, 4 },
2872 .vsync_len = { 4, 4, 4 },
2873 .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE,
2874};
2875
2876static const struct panel_desc sharp_lq101k1ly04 = {
2877 .timings = &sharp_lq101k1ly04_timing,
2878 .num_timings = 1,
2879 .bpc = 8,
2880 .size = {
2881 .width = 217,
2882 .height = 136,
2883 },
2884 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03002885 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Joshua Clayton592aa022016-07-06 15:59:16 -07002886};
2887
Sean Paul9f7bae22018-02-08 12:48:52 -05002888static const struct display_timing sharp_lq123p1jx31_timing = {
2889 .pixelclock = { 252750000, 252750000, 266604720 },
2890 .hactive = { 2400, 2400, 2400 },
2891 .hfront_porch = { 48, 48, 48 },
2892 .hback_porch = { 80, 80, 84 },
2893 .hsync_len = { 32, 32, 32 },
2894 .vactive = { 1600, 1600, 1600 },
2895 .vfront_porch = { 3, 3, 3 },
2896 .vback_porch = { 33, 33, 120 },
2897 .vsync_len = { 10, 10, 10 },
2898 .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW,
Yakir Yang739c7de2016-06-12 10:56:35 +08002899};
2900
2901static const struct panel_desc sharp_lq123p1jx31 = {
Sean Paul9f7bae22018-02-08 12:48:52 -05002902 .timings = &sharp_lq123p1jx31_timing,
2903 .num_timings = 1,
zain wang5466a632016-11-19 10:27:16 +08002904 .bpc = 8,
Yakir Yang739c7de2016-06-12 10:56:35 +08002905 .size = {
2906 .width = 259,
2907 .height = 173,
2908 },
Yakir Yanga42f6e32016-07-21 21:14:34 +08002909 .delay = {
2910 .prepare = 110,
2911 .enable = 50,
2912 .unprepare = 550,
2913 },
Yakir Yang739c7de2016-06-12 10:56:35 +08002914};
2915
Gustaf Lindström0f9cdd72016-10-04 17:29:21 +02002916static const struct drm_display_mode sharp_lq150x1lg11_mode = {
2917 .clock = 71100,
2918 .hdisplay = 1024,
2919 .hsync_start = 1024 + 168,
2920 .hsync_end = 1024 + 168 + 64,
2921 .htotal = 1024 + 168 + 64 + 88,
2922 .vdisplay = 768,
2923 .vsync_start = 768 + 37,
2924 .vsync_end = 768 + 37 + 2,
2925 .vtotal = 768 + 37 + 2 + 8,
2926 .vrefresh = 60,
2927};
2928
2929static const struct panel_desc sharp_lq150x1lg11 = {
2930 .modes = &sharp_lq150x1lg11_mode,
2931 .num_modes = 1,
2932 .bpc = 6,
2933 .size = {
2934 .width = 304,
2935 .height = 228,
2936 },
2937 .bus_format = MEDIA_BUS_FMT_RGB565_1X16,
2938};
2939
Paul Cercueilf1bd37f2019-06-03 17:31:20 +02002940static const struct display_timing sharp_ls020b1dd01d_timing = {
2941 .pixelclock = { 2000000, 4200000, 5000000 },
2942 .hactive = { 240, 240, 240 },
2943 .hfront_porch = { 66, 66, 66 },
2944 .hback_porch = { 1, 1, 1 },
2945 .hsync_len = { 1, 1, 1 },
2946 .vactive = { 160, 160, 160 },
2947 .vfront_porch = { 52, 52, 52 },
2948 .vback_porch = { 6, 6, 6 },
2949 .vsync_len = { 10, 10, 10 },
2950 .flags = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_LOW,
2951};
2952
2953static const struct panel_desc sharp_ls020b1dd01d = {
2954 .timings = &sharp_ls020b1dd01d_timing,
2955 .num_timings = 1,
2956 .bpc = 6,
2957 .size = {
2958 .width = 42,
2959 .height = 28,
2960 },
2961 .bus_format = MEDIA_BUS_FMT_RGB565_1X16,
2962 .bus_flags = DRM_BUS_FLAG_DE_HIGH
2963 | DRM_BUS_FLAG_PIXDATA_NEGEDGE
2964 | DRM_BUS_FLAG_SHARP_SIGNALS,
2965};
2966
Boris BREZILLON9c6615b2015-03-19 14:43:00 +01002967static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = {
2968 .clock = 33300,
2969 .hdisplay = 800,
2970 .hsync_start = 800 + 1,
2971 .hsync_end = 800 + 1 + 64,
2972 .htotal = 800 + 1 + 64 + 64,
2973 .vdisplay = 480,
2974 .vsync_start = 480 + 1,
2975 .vsync_end = 480 + 1 + 23,
2976 .vtotal = 480 + 1 + 23 + 22,
2977 .vrefresh = 60,
2978};
2979
2980static const struct panel_desc shelly_sca07010_bfn_lnn = {
2981 .modes = &shelly_sca07010_bfn_lnn_mode,
2982 .num_modes = 1,
2983 .size = {
2984 .width = 152,
2985 .height = 91,
2986 },
2987 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2988};
2989
Douglas Anderson9bb34c42016-06-10 10:02:07 -07002990static const struct drm_display_mode starry_kr122ea0sra_mode = {
2991 .clock = 147000,
2992 .hdisplay = 1920,
2993 .hsync_start = 1920 + 16,
2994 .hsync_end = 1920 + 16 + 16,
2995 .htotal = 1920 + 16 + 16 + 32,
2996 .vdisplay = 1200,
2997 .vsync_start = 1200 + 15,
2998 .vsync_end = 1200 + 15 + 2,
2999 .vtotal = 1200 + 15 + 2 + 18,
3000 .vrefresh = 60,
3001 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3002};
3003
3004static const struct panel_desc starry_kr122ea0sra = {
3005 .modes = &starry_kr122ea0sra_mode,
3006 .num_modes = 1,
3007 .size = {
3008 .width = 263,
3009 .height = 164,
3010 },
Brian Norrisc46b9242016-08-26 14:32:14 -07003011 .delay = {
3012 .prepare = 10 + 200,
3013 .enable = 50,
3014 .unprepare = 10 + 500,
3015 },
Douglas Anderson9bb34c42016-06-10 10:02:07 -07003016};
3017
Jyri Sarha42161532019-03-22 10:33:36 +02003018static const struct drm_display_mode tfc_s9700rtwv43tr_01b_mode = {
3019 .clock = 30000,
3020 .hdisplay = 800,
3021 .hsync_start = 800 + 39,
3022 .hsync_end = 800 + 39 + 47,
3023 .htotal = 800 + 39 + 47 + 39,
3024 .vdisplay = 480,
3025 .vsync_start = 480 + 13,
3026 .vsync_end = 480 + 13 + 2,
3027 .vtotal = 480 + 13 + 2 + 29,
3028 .vrefresh = 62,
3029};
3030
3031static const struct panel_desc tfc_s9700rtwv43tr_01b = {
3032 .modes = &tfc_s9700rtwv43tr_01b_mode,
3033 .num_modes = 1,
3034 .bpc = 8,
3035 .size = {
3036 .width = 155,
3037 .height = 90,
3038 },
3039 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3040 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
3041};
3042
Gary Bissonadb973e2016-12-02 09:52:08 +01003043static const struct display_timing tianma_tm070jdhg30_timing = {
3044 .pixelclock = { 62600000, 68200000, 78100000 },
3045 .hactive = { 1280, 1280, 1280 },
3046 .hfront_porch = { 15, 64, 159 },
3047 .hback_porch = { 5, 5, 5 },
3048 .hsync_len = { 1, 1, 256 },
3049 .vactive = { 800, 800, 800 },
3050 .vfront_porch = { 3, 40, 99 },
3051 .vback_porch = { 2, 2, 2 },
3052 .vsync_len = { 1, 1, 128 },
3053 .flags = DISPLAY_FLAGS_DE_HIGH,
3054};
3055
3056static const struct panel_desc tianma_tm070jdhg30 = {
3057 .timings = &tianma_tm070jdhg30_timing,
3058 .num_timings = 1,
3059 .bpc = 8,
3060 .size = {
3061 .width = 151,
3062 .height = 95,
3063 },
3064 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03003065 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Gary Bissonadb973e2016-12-02 09:52:08 +01003066};
3067
Lukasz Majewski870a0b12017-11-07 16:30:58 +01003068static const struct display_timing tianma_tm070rvhg71_timing = {
3069 .pixelclock = { 27700000, 29200000, 39600000 },
3070 .hactive = { 800, 800, 800 },
3071 .hfront_porch = { 12, 40, 212 },
3072 .hback_porch = { 88, 88, 88 },
3073 .hsync_len = { 1, 1, 40 },
3074 .vactive = { 480, 480, 480 },
3075 .vfront_porch = { 1, 13, 88 },
3076 .vback_porch = { 32, 32, 32 },
3077 .vsync_len = { 1, 1, 3 },
3078 .flags = DISPLAY_FLAGS_DE_HIGH,
3079};
3080
3081static const struct panel_desc tianma_tm070rvhg71 = {
3082 .timings = &tianma_tm070rvhg71_timing,
3083 .num_timings = 1,
3084 .bpc = 8,
3085 .size = {
3086 .width = 154,
3087 .height = 86,
3088 },
3089 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03003090 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Lukasz Majewski870a0b12017-11-07 16:30:58 +01003091};
3092
Linus Walleijd8a0d6a2019-08-05 10:58:46 +02003093static const struct drm_display_mode ti_nspire_cx_lcd_mode[] = {
3094 {
3095 .clock = 10000,
3096 .hdisplay = 320,
3097 .hsync_start = 320 + 50,
3098 .hsync_end = 320 + 50 + 6,
3099 .htotal = 320 + 50 + 6 + 38,
3100 .vdisplay = 240,
3101 .vsync_start = 240 + 3,
3102 .vsync_end = 240 + 3 + 1,
3103 .vtotal = 240 + 3 + 1 + 17,
3104 .vrefresh = 60,
3105 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3106 },
3107};
3108
3109static const struct panel_desc ti_nspire_cx_lcd_panel = {
3110 .modes = ti_nspire_cx_lcd_mode,
3111 .num_modes = 1,
3112 .bpc = 8,
3113 .size = {
3114 .width = 65,
3115 .height = 49,
3116 },
3117 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3118 .bus_flags = DRM_BUS_FLAG_PIXDATA_NEGEDGE,
3119};
3120
3121static const struct drm_display_mode ti_nspire_classic_lcd_mode[] = {
3122 {
3123 .clock = 10000,
3124 .hdisplay = 320,
3125 .hsync_start = 320 + 6,
3126 .hsync_end = 320 + 6 + 6,
3127 .htotal = 320 + 6 + 6 + 6,
3128 .vdisplay = 240,
3129 .vsync_start = 240 + 0,
3130 .vsync_end = 240 + 0 + 1,
3131 .vtotal = 240 + 0 + 1 + 0,
3132 .vrefresh = 60,
3133 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
3134 },
3135};
3136
3137static const struct panel_desc ti_nspire_classic_lcd_panel = {
3138 .modes = ti_nspire_classic_lcd_mode,
3139 .num_modes = 1,
3140 /* The grayscale panel has 8 bit for the color .. Y (black) */
3141 .bpc = 8,
3142 .size = {
3143 .width = 71,
3144 .height = 53,
3145 },
3146 /* This is the grayscale bus format */
3147 .bus_format = MEDIA_BUS_FMT_Y8_1X8,
3148 .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE,
3149};
3150
Lucas Stach06e733e2017-10-18 19:22:40 +02003151static const struct drm_display_mode toshiba_lt089ac29000_mode = {
3152 .clock = 79500,
3153 .hdisplay = 1280,
3154 .hsync_start = 1280 + 192,
3155 .hsync_end = 1280 + 192 + 128,
3156 .htotal = 1280 + 192 + 128 + 64,
3157 .vdisplay = 768,
3158 .vsync_start = 768 + 20,
3159 .vsync_end = 768 + 20 + 7,
3160 .vtotal = 768 + 20 + 7 + 3,
3161 .vrefresh = 60,
3162};
3163
3164static const struct panel_desc toshiba_lt089ac29000 = {
3165 .modes = &toshiba_lt089ac29000_mode,
3166 .num_modes = 1,
3167 .size = {
3168 .width = 194,
3169 .height = 116,
3170 },
Boris Brezillon9781bd12020-01-28 14:55:13 +01003171 .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
Laurent Pinchart88bc4172018-09-22 15:02:42 +03003172 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03003173 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Lucas Stach06e733e2017-10-18 19:22:40 +02003174};
3175
Bhuvanchandra DV227e4f42016-05-05 11:47:07 +05303176static const struct drm_display_mode tpk_f07a_0102_mode = {
3177 .clock = 33260,
3178 .hdisplay = 800,
3179 .hsync_start = 800 + 40,
3180 .hsync_end = 800 + 40 + 128,
3181 .htotal = 800 + 40 + 128 + 88,
3182 .vdisplay = 480,
3183 .vsync_start = 480 + 10,
3184 .vsync_end = 480 + 10 + 2,
3185 .vtotal = 480 + 10 + 2 + 33,
3186 .vrefresh = 60,
3187};
3188
3189static const struct panel_desc tpk_f07a_0102 = {
3190 .modes = &tpk_f07a_0102_mode,
3191 .num_modes = 1,
3192 .size = {
3193 .width = 152,
3194 .height = 91,
3195 },
Laurent Pinchart88bc4172018-09-22 15:02:42 +03003196 .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
Bhuvanchandra DV227e4f42016-05-05 11:47:07 +05303197};
3198
3199static const struct drm_display_mode tpk_f10a_0102_mode = {
3200 .clock = 45000,
3201 .hdisplay = 1024,
3202 .hsync_start = 1024 + 176,
3203 .hsync_end = 1024 + 176 + 5,
3204 .htotal = 1024 + 176 + 5 + 88,
3205 .vdisplay = 600,
3206 .vsync_start = 600 + 20,
3207 .vsync_end = 600 + 20 + 5,
3208 .vtotal = 600 + 20 + 5 + 25,
3209 .vrefresh = 60,
3210};
3211
3212static const struct panel_desc tpk_f10a_0102 = {
3213 .modes = &tpk_f10a_0102_mode,
3214 .num_modes = 1,
3215 .size = {
3216 .width = 223,
3217 .height = 125,
3218 },
3219};
3220
Maciej S. Szmigiero06a9dc62016-02-13 22:52:03 +01003221static const struct display_timing urt_umsh_8596md_timing = {
3222 .pixelclock = { 33260000, 33260000, 33260000 },
3223 .hactive = { 800, 800, 800 },
3224 .hfront_porch = { 41, 41, 41 },
3225 .hback_porch = { 216 - 128, 216 - 128, 216 - 128 },
3226 .hsync_len = { 71, 128, 128 },
3227 .vactive = { 480, 480, 480 },
3228 .vfront_porch = { 10, 10, 10 },
3229 .vback_porch = { 35 - 2, 35 - 2, 35 - 2 },
3230 .vsync_len = { 2, 2, 2 },
3231 .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE |
3232 DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
3233};
3234
3235static const struct panel_desc urt_umsh_8596md_lvds = {
3236 .timings = &urt_umsh_8596md_timing,
3237 .num_timings = 1,
3238 .bpc = 6,
3239 .size = {
3240 .width = 152,
3241 .height = 91,
3242 },
3243 .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
Laurent Pinchart9a2654c2019-09-04 16:28:03 +03003244 .connector_type = DRM_MODE_CONNECTOR_LVDS,
Maciej S. Szmigiero06a9dc62016-02-13 22:52:03 +01003245};
3246
3247static const struct panel_desc urt_umsh_8596md_parallel = {
3248 .timings = &urt_umsh_8596md_timing,
3249 .num_timings = 1,
3250 .bpc = 6,
3251 .size = {
3252 .width = 152,
3253 .height = 91,
3254 },
3255 .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
3256};
3257
Fabio Estevam04206182019-02-18 21:27:06 -03003258static const struct drm_display_mode vl050_8048nt_c01_mode = {
3259 .clock = 33333,
3260 .hdisplay = 800,
3261 .hsync_start = 800 + 210,
3262 .hsync_end = 800 + 210 + 20,
3263 .htotal = 800 + 210 + 20 + 46,
3264 .vdisplay = 480,
3265 .vsync_start = 480 + 22,
3266 .vsync_end = 480 + 22 + 10,
3267 .vtotal = 480 + 22 + 10 + 23,
3268 .vrefresh = 60,
3269 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
3270};
3271
3272static const struct panel_desc vl050_8048nt_c01 = {
3273 .modes = &vl050_8048nt_c01_mode,
3274 .num_modes = 1,
3275 .bpc = 8,
3276 .size = {
3277 .width = 120,
3278 .height = 76,
3279 },
3280 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3281 .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE,
3282};
3283
Richard Genoude4bac402017-03-27 12:33:23 +02003284static const struct drm_display_mode winstar_wf35ltiacd_mode = {
3285 .clock = 6410,
3286 .hdisplay = 320,
3287 .hsync_start = 320 + 20,
3288 .hsync_end = 320 + 20 + 30,
3289 .htotal = 320 + 20 + 30 + 38,
3290 .vdisplay = 240,
3291 .vsync_start = 240 + 4,
3292 .vsync_end = 240 + 4 + 3,
3293 .vtotal = 240 + 4 + 3 + 15,
3294 .vrefresh = 60,
3295 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3296};
3297
3298static const struct panel_desc winstar_wf35ltiacd = {
3299 .modes = &winstar_wf35ltiacd_mode,
3300 .num_modes = 1,
3301 .bpc = 8,
3302 .size = {
3303 .width = 70,
3304 .height = 53,
3305 },
3306 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3307};
3308
Linus Walleijfcec4162018-10-26 13:13:34 +02003309static const struct drm_display_mode arm_rtsm_mode[] = {
3310 {
3311 .clock = 65000,
3312 .hdisplay = 1024,
3313 .hsync_start = 1024 + 24,
3314 .hsync_end = 1024 + 24 + 136,
3315 .htotal = 1024 + 24 + 136 + 160,
3316 .vdisplay = 768,
3317 .vsync_start = 768 + 3,
3318 .vsync_end = 768 + 3 + 6,
3319 .vtotal = 768 + 3 + 6 + 29,
3320 .vrefresh = 60,
3321 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3322 },
3323};
3324
3325static const struct panel_desc arm_rtsm = {
3326 .modes = arm_rtsm_mode,
3327 .num_modes = 1,
3328 .bpc = 8,
3329 .size = {
3330 .width = 400,
3331 .height = 300,
3332 },
3333 .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3334};
3335
Thierry Reding280921d2013-08-30 15:10:14 +02003336static const struct of_device_id platform_of_match[] = {
3337 {
Yannick Fertre966fea72017-03-28 11:44:49 +02003338 .compatible = "ampire,am-480272h3tmqw-t01h",
3339 .data = &ampire_am_480272h3tmqw_t01h,
3340 }, {
Philipp Zabel1c550fa12015-02-11 18:50:09 +01003341 .compatible = "ampire,am800480r3tmqwa1h",
3342 .data = &ampire_am800480r3tmqwa1h,
3343 }, {
Linus Walleijfcec4162018-10-26 13:13:34 +02003344 .compatible = "arm,rtsm-display",
3345 .data = &arm_rtsm,
3346 }, {
Sébastien Szymanskic479450f2019-05-07 17:27:12 +02003347 .compatible = "armadeus,st0700-adapt",
3348 .data = &armadeus_st0700_adapt,
3349 }, {
Thierry Reding280921d2013-08-30 15:10:14 +02003350 .compatible = "auo,b101aw03",
3351 .data = &auo_b101aw03,
3352 }, {
Huang Lina531bc32015-02-28 10:18:58 +08003353 .compatible = "auo,b101ean01",
3354 .data = &auo_b101ean01,
3355 }, {
Rob Clarkdac746e2014-08-01 17:01:06 -04003356 .compatible = "auo,b101xtn01",
3357 .data = &auo_b101xtn01,
3358 }, {
Rob Clarkda4582862020-01-08 15:53:56 -08003359 .compatible = "auo,b116xa01",
3360 .data = &auo_b116xak01,
3361 }, {
Ajay Kumare35e3052014-09-01 15:40:02 +05303362 .compatible = "auo,b116xw03",
3363 .data = &auo_b116xw03,
3364 }, {
Ajay Kumar3e51d602014-07-31 23:12:12 +05303365 .compatible = "auo,b133htn01",
3366 .data = &auo_b133htn01,
3367 }, {
Stéphane Marchesina333f7a2014-05-23 19:27:59 -07003368 .compatible = "auo,b133xtn01",
3369 .data = &auo_b133xtn01,
3370 }, {
Lukasz Majewskibccfaff2018-05-14 21:08:49 +02003371 .compatible = "auo,g070vvn01",
3372 .data = &auo_g070vvn01,
3373 }, {
Alex Gonzalez4fb86402018-10-25 17:09:30 +02003374 .compatible = "auo,g101evn010",
3375 .data = &auo_g101evn010,
3376 }, {
Christoph Fritz4451c282017-12-16 14:13:36 +01003377 .compatible = "auo,g104sn02",
3378 .data = &auo_g104sn02,
3379 }, {
Lucas Stach697035c2016-11-30 14:09:55 +01003380 .compatible = "auo,g133han01",
3381 .data = &auo_g133han01,
3382 }, {
Lucas Stach8c31f602016-11-30 14:09:56 +01003383 .compatible = "auo,g185han01",
3384 .data = &auo_g185han01,
3385 }, {
Lucas Stach70c0d5b2017-06-08 20:07:58 +02003386 .compatible = "auo,p320hvn03",
3387 .data = &auo_p320hvn03,
3388 }, {
Haixia Shi7ee933a2016-10-11 14:59:16 -07003389 .compatible = "auo,t215hvn01",
3390 .data = &auo_t215hvn01,
3391 }, {
Philipp Zabeld47df632014-12-18 16:43:43 +01003392 .compatible = "avic,tm070ddh03",
3393 .data = &avic_tm070ddh03,
3394 }, {
Chen-Yu Tsai7ad8b412018-09-07 12:19:46 +08003395 .compatible = "bananapi,s070wv20-ct16",
3396 .data = &bananapi_s070wv20_ct16,
3397 }, {
Andrzej Hajdaae8cf412018-06-19 10:19:26 +02003398 .compatible = "boe,hv070wsa-100",
3399 .data = &boe_hv070wsa
3400 }, {
Caesar Wangcac1a412016-12-14 11:19:56 +08003401 .compatible = "boe,nv101wxmn51",
3402 .data = &boe_nv101wxmn51,
3403 }, {
Tobias Schramma5119812020-01-09 12:29:52 +01003404 .compatible = "boe,nv140fhmn49",
3405 .data = &boe_nv140fhmn49,
3406 }, {
Giulio Benettie58edce2018-07-31 01:11:16 +02003407 .compatible = "cdtech,s043wq26h-ct7",
3408 .data = &cdtech_s043wq26h_ct7,
3409 }, {
Giulio Benetti982f9442018-07-31 01:11:14 +02003410 .compatible = "cdtech,s070wv95-ct16",
3411 .data = &cdtech_s070wv95_ct16,
3412 }, {
Randy Li2cb35c82016-09-20 03:02:51 +08003413 .compatible = "chunghwa,claa070wp03xg",
3414 .data = &chunghwa_claa070wp03xg,
3415 }, {
Stephen Warren4c930752014-01-07 16:46:26 -07003416 .compatible = "chunghwa,claa101wa01a",
3417 .data = &chunghwa_claa101wa01a
3418 }, {
Thierry Reding280921d2013-08-30 15:10:14 +02003419 .compatible = "chunghwa,claa101wb01",
3420 .data = &chunghwa_claa101wb01
3421 }, {
Michal Vokáč97ceb1f2018-06-25 14:41:30 +02003422 .compatible = "dataimage,scf0700c48ggu18",
3423 .data = &dataimage_scf0700c48ggu18,
3424 }, {
Philipp Zabel0ca0c822018-05-23 11:25:04 +02003425 .compatible = "dlc,dlc0700yzg-1",
3426 .data = &dlc_dlc0700yzg_1,
3427 }, {
Marco Felsch6cbe7cd2018-09-24 17:26:10 +02003428 .compatible = "dlc,dlc1010gig",
3429 .data = &dlc_dlc1010gig,
3430 }, {
Andreas Pretzschc2d24af2019-04-16 12:16:30 +02003431 .compatible = "edt,et035012dm6",
3432 .data = &edt_et035012dm6,
3433 }, {
Marian-Cristian Rotariu82d57a52020-01-30 12:08:38 +00003434 .compatible = "edt,etm043080dh6gp",
3435 .data = &edt_etm043080dh6gp,
3436 }, {
Marek Vasutfd819bf2019-02-19 15:04:38 +01003437 .compatible = "edt,etm0430g0dh6",
3438 .data = &edt_etm0430g0dh6,
3439 }, {
Stefan Agner26ab0062014-05-15 11:38:45 +02003440 .compatible = "edt,et057090dhu",
3441 .data = &edt_et057090dhu,
3442 }, {
Philipp Zabelfff5de42014-05-15 12:25:47 +02003443 .compatible = "edt,et070080dh6",
3444 .data = &edt_etm0700g0dh6,
3445 }, {
3446 .compatible = "edt,etm0700g0dh6",
3447 .data = &edt_etm0700g0dh6,
3448 }, {
Jan Tuerkaa7e6452018-06-19 11:55:44 +02003449 .compatible = "edt,etm0700g0bdh6",
3450 .data = &edt_etm0700g0bdh6,
3451 }, {
Jan Tuerkaad34de2018-06-19 11:55:45 +02003452 .compatible = "edt,etm0700g0edh6",
3453 .data = &edt_etm0700g0bdh6,
3454 }, {
Marco Felsch9158e3c2019-04-16 12:06:45 +02003455 .compatible = "evervision,vgg804821",
3456 .data = &evervision_vgg804821,
3457 }, {
Boris BREZILLON102932b2014-06-05 15:53:32 +02003458 .compatible = "foxlink,fl500wvr00-a0t",
3459 .data = &foxlink_fl500wvr00_a0t,
3460 }, {
Paul Cercueil7b6bd842020-01-13 13:17:41 -03003461 .compatible = "frida,frd350h54004",
3462 .data = &frida_frd350h54004,
3463 }, {
Jagan Teki3be20712019-05-07 18:37:07 +05303464 .compatible = "friendlyarm,hd702e",
3465 .data = &friendlyarm_hd702e,
3466 }, {
Philipp Zabeld435a2a2014-11-19 10:29:55 +01003467 .compatible = "giantplus,gpg482739qs5",
3468 .data = &giantplus_gpg482739qs5
3469 }, {
Paul Cercueil2c6574a2019-06-06 00:22:47 +02003470 .compatible = "giantplus,gpm940b0",
3471 .data = &giantplus_gpm940b0,
3472 }, {
Philipp Zabela8532052014-10-23 16:31:06 +02003473 .compatible = "hannstar,hsd070pww1",
3474 .data = &hannstar_hsd070pww1,
3475 }, {
Eric Nelsonc0d607e2015-04-13 15:09:26 -07003476 .compatible = "hannstar,hsd100pxn1",
3477 .data = &hannstar_hsd100pxn1,
3478 }, {
Lucas Stach61ac0bf2014-11-06 17:44:35 +01003479 .compatible = "hit,tx23d38vm0caa",
3480 .data = &hitachi_tx23d38vm0caa
3481 }, {
Nicolas Ferre41bcceb2015-03-19 14:43:01 +01003482 .compatible = "innolux,at043tn24",
3483 .data = &innolux_at043tn24,
3484 }, {
Riccardo Bortolato4fc24ab2016-04-20 15:37:15 +02003485 .compatible = "innolux,at070tn92",
3486 .data = &innolux_at070tn92,
3487 }, {
Christoph Fritza5d2ade2018-06-04 13:16:48 +02003488 .compatible = "innolux,g070y2-l01",
3489 .data = &innolux_g070y2_l01,
3490 }, {
3491 .compatible = "innolux,g101ice-l01",
Michael Olbrich1e29b842016-08-15 14:32:02 +02003492 .data = &innolux_g101ice_l01
3493 }, {
Christoph Fritza5d2ade2018-06-04 13:16:48 +02003494 .compatible = "innolux,g121i1-l01",
Lucas Stachd731f662014-11-06 17:44:33 +01003495 .data = &innolux_g121i1_l01
3496 }, {
Akshay Bhatf8fa17b2015-11-18 15:57:47 -05003497 .compatible = "innolux,g121x1-l03",
3498 .data = &innolux_g121x1_l03,
3499 }, {
Thierry Reding0a2288c2014-07-03 14:02:59 +02003500 .compatible = "innolux,n116bge",
3501 .data = &innolux_n116bge,
3502 }, {
Alban Bedelea447392014-07-22 08:38:55 +02003503 .compatible = "innolux,n156bge-l21",
3504 .data = &innolux_n156bge_l21,
3505 }, {
Douglas Anderson8f054b62018-10-25 15:21:34 -07003506 .compatible = "innolux,p120zdg-bf1",
3507 .data = &innolux_p120zdg_bf1,
spanda@codeaurora.orgda50bd42018-05-15 11:22:43 +05303508 }, {
Michael Grzeschikbccac3f2015-03-19 12:22:44 +01003509 .compatible = "innolux,zj070na-01p",
3510 .data = &innolux_zj070na_01p,
3511 }, {
Lukasz Majewski14bf60c2019-05-15 18:06:12 +02003512 .compatible = "koe,tx14d24vm1bpa",
3513 .data = &koe_tx14d24vm1bpa,
3514 }, {
Jagan Teki8cfe8342018-02-04 23:19:28 +05303515 .compatible = "koe,tx31d200vm0baa",
3516 .data = &koe_tx31d200vm0baa,
3517 }, {
Lucas Stach8def22e2015-12-02 19:41:11 +01003518 .compatible = "kyo,tcg121xglp",
3519 .data = &kyo_tcg121xglp,
3520 }, {
Paul Kocialkowski27abdd82018-11-07 19:18:41 +01003521 .compatible = "lemaker,bl035-rgb-002",
3522 .data = &lemaker_bl035_rgb_002,
3523 }, {
Heiko Schocherdd015002015-05-22 10:25:57 +02003524 .compatible = "lg,lb070wv8",
3525 .data = &lg_lb070wv8,
3526 }, {
Yakir Yangc5ece402016-06-28 12:51:15 +08003527 .compatible = "lg,lp079qx1-sp0v",
3528 .data = &lg_lp079qx1_sp0v,
3529 }, {
Yakir Yang0355dde2016-06-12 10:56:02 +08003530 .compatible = "lg,lp097qx1-spa1",
3531 .data = &lg_lp097qx1_spa1,
3532 }, {
Jitao Shi690d8fa2016-02-22 19:01:44 +08003533 .compatible = "lg,lp120up1",
3534 .data = &lg_lp120up1,
3535 }, {
Thierry Redingec7c5652013-11-15 15:59:32 +01003536 .compatible = "lg,lp129qe",
3537 .data = &lg_lp129qe,
3538 }, {
Adam Ford0d354082019-10-16 08:51:45 -05003539 .compatible = "logicpd,type28",
3540 .data = &logicpd_type_28,
3541 }, {
Marcel Ziswiler5728fe72020-01-20 09:01:00 +01003542 .compatible = "logictechno,lt161010-2nhc",
3543 .data = &logictechno_lt161010_2nh,
3544 }, {
3545 .compatible = "logictechno,lt161010-2nhr",
3546 .data = &logictechno_lt161010_2nh,
3547 }, {
3548 .compatible = "logictechno,lt170410-2whc",
3549 .data = &logictechno_lt170410_2whc,
3550 }, {
Lukasz Majewski65c766c2017-10-21 00:18:37 +02003551 .compatible = "mitsubishi,aa070mc01-ca1",
3552 .data = &mitsubishi_aa070mc01,
3553 }, {
Lucas Stach01bacc132017-06-08 20:07:55 +02003554 .compatible = "nec,nl12880bc20-05",
3555 .data = &nec_nl12880bc20_05,
3556 }, {
jianwei wangc6e87f92015-07-29 16:30:02 +08003557 .compatible = "nec,nl4827hc19-05b",
3558 .data = &nec_nl4827hc19_05b,
3559 }, {
Maxime Riparde6c2f062016-09-06 16:46:17 +02003560 .compatible = "netron-dy,e231732",
3561 .data = &netron_dy_e231732,
3562 }, {
Tomi Valkeinen3b39ad72018-06-18 16:22:40 +03003563 .compatible = "newhaven,nhd-4.3-480272ef-atxl",
3564 .data = &newhaven_nhd_43_480272ef_atxl,
3565 }, {
Lucas Stach4177fa62017-06-08 20:07:57 +02003566 .compatible = "nlt,nl192108ac18-02d",
3567 .data = &nlt_nl192108ac18_02d,
3568 }, {
Fabien Lahoudere05ec0e42016-10-17 11:38:01 +02003569 .compatible = "nvd,9128",
3570 .data = &nvd_9128,
3571 }, {
Gary Bissona99fb622015-06-10 18:44:23 +02003572 .compatible = "okaya,rs800480t-7x0gp",
3573 .data = &okaya_rs800480t_7x0gp,
3574 }, {
Maxime Ripardcf5c9e62016-03-23 17:38:34 +01003575 .compatible = "olimex,lcd-olinuxino-43-ts",
3576 .data = &olimex_lcd_olinuxino_43ts,
3577 }, {
Eric Anholte8b6f562016-03-24 17:23:48 -07003578 .compatible = "ontat,yx700wv03",
3579 .data = &ontat_yx700wv03,
3580 }, {
H. Nikolaus Schaller9c31dcb2019-06-07 13:11:08 +02003581 .compatible = "ortustech,com37h3m05dtc",
3582 .data = &ortustech_com37h3m,
3583 }, {
3584 .compatible = "ortustech,com37h3m99dtc",
3585 .data = &ortustech_com37h3m,
3586 }, {
Philipp Zabel725c9d42015-02-11 18:50:11 +01003587 .compatible = "ortustech,com43h4m85ulc",
3588 .data = &ortustech_com43h4m85ulc,
3589 }, {
Laurent Pinchart163f7a32018-12-07 22:13:44 +02003590 .compatible = "osddisplays,osd070t1718-19ts",
3591 .data = &osddisplays_osd070t1718_19ts,
3592 }, {
Eugen Hristev4ba3e562019-01-14 09:43:31 +00003593 .compatible = "pda,91-00156-a0",
3594 .data = &pda_91_00156_a0,
3595 }, {
Josh Wud2a6f0f2015-10-08 17:42:41 +02003596 .compatible = "qiaodian,qd43003c0-40",
3597 .data = &qd43003c0_40,
3598 }, {
Jagan Teki23167fa2018-06-07 19:16:48 +05303599 .compatible = "rocktech,rk070er9427",
3600 .data = &rocktech_rk070er9427,
3601 }, {
Jyri Sarhaf3050472020-02-11 14:17:18 +02003602 .compatible = "rocktech,rk101ii01d-ct",
3603 .data = &rocktech_rk101ii01d_ct,
3604 }, {
Yakir Yang0330eaf2016-06-12 10:56:13 +08003605 .compatible = "samsung,lsn122dl01-c01",
3606 .data = &samsung_lsn122dl01_c01,
3607 }, {
Marc Dietrich6d54e3d2013-12-21 21:38:12 +01003608 .compatible = "samsung,ltn101nt05",
3609 .data = &samsung_ltn101nt05,
3610 }, {
Stéphane Marchesin0c934302015-03-18 10:52:18 +01003611 .compatible = "samsung,ltn140at29-301",
3612 .data = &samsung_ltn140at29_301,
3613 }, {
Miquel Raynal44c58c52020-01-09 19:40:37 +01003614 .compatible = "satoz,sat050at40h12r2",
3615 .data = &satoz_sat050at40h12r2,
3616 }, {
Jeffrey Hugocd5e1cb2019-07-08 09:58:11 -07003617 .compatible = "sharp,ld-d5116z01b",
3618 .data = &sharp_ld_d5116z01b,
3619 }, {
Vladimir Zapolskiy03e3ec92018-07-06 21:51:01 +03003620 .compatible = "sharp,lq035q7db03",
3621 .data = &sharp_lq035q7db03,
3622 }, {
H. Nikolaus Schallerdda0e4b2019-06-07 13:11:07 +02003623 .compatible = "sharp,lq070y3dg3b",
3624 .data = &sharp_lq070y3dg3b,
3625 }, {
Joshua Clayton592aa022016-07-06 15:59:16 -07003626 .compatible = "sharp,lq101k1ly04",
3627 .data = &sharp_lq101k1ly04,
3628 }, {
Yakir Yang739c7de2016-06-12 10:56:35 +08003629 .compatible = "sharp,lq123p1jx31",
3630 .data = &sharp_lq123p1jx31,
3631 }, {
Gustaf Lindström0f9cdd72016-10-04 17:29:21 +02003632 .compatible = "sharp,lq150x1lg11",
3633 .data = &sharp_lq150x1lg11,
3634 }, {
Paul Cercueilf1bd37f2019-06-03 17:31:20 +02003635 .compatible = "sharp,ls020b1dd01d",
3636 .data = &sharp_ls020b1dd01d,
3637 }, {
Boris BREZILLON9c6615b2015-03-19 14:43:00 +01003638 .compatible = "shelly,sca07010-bfn-lnn",
3639 .data = &shelly_sca07010_bfn_lnn,
3640 }, {
Douglas Anderson9bb34c42016-06-10 10:02:07 -07003641 .compatible = "starry,kr122ea0sra",
3642 .data = &starry_kr122ea0sra,
3643 }, {
Jyri Sarha42161532019-03-22 10:33:36 +02003644 .compatible = "tfc,s9700rtwv43tr-01b",
3645 .data = &tfc_s9700rtwv43tr_01b,
3646 }, {
Gary Bissonadb973e2016-12-02 09:52:08 +01003647 .compatible = "tianma,tm070jdhg30",
3648 .data = &tianma_tm070jdhg30,
3649 }, {
Lukasz Majewski870a0b12017-11-07 16:30:58 +01003650 .compatible = "tianma,tm070rvhg71",
3651 .data = &tianma_tm070rvhg71,
3652 }, {
Linus Walleijd8a0d6a2019-08-05 10:58:46 +02003653 .compatible = "ti,nspire-cx-lcd-panel",
3654 .data = &ti_nspire_cx_lcd_panel,
3655 }, {
3656 .compatible = "ti,nspire-classic-lcd-panel",
3657 .data = &ti_nspire_classic_lcd_panel,
3658 }, {
Lucas Stach06e733e2017-10-18 19:22:40 +02003659 .compatible = "toshiba,lt089ac29000",
3660 .data = &toshiba_lt089ac29000,
3661 }, {
Bhuvanchandra DV227e4f42016-05-05 11:47:07 +05303662 .compatible = "tpk,f07a-0102",
3663 .data = &tpk_f07a_0102,
3664 }, {
3665 .compatible = "tpk,f10a-0102",
3666 .data = &tpk_f10a_0102,
3667 }, {
Maciej S. Szmigiero06a9dc62016-02-13 22:52:03 +01003668 .compatible = "urt,umsh-8596md-t",
3669 .data = &urt_umsh_8596md_parallel,
3670 }, {
3671 .compatible = "urt,umsh-8596md-1t",
3672 .data = &urt_umsh_8596md_parallel,
3673 }, {
3674 .compatible = "urt,umsh-8596md-7t",
3675 .data = &urt_umsh_8596md_parallel,
3676 }, {
3677 .compatible = "urt,umsh-8596md-11t",
3678 .data = &urt_umsh_8596md_lvds,
3679 }, {
3680 .compatible = "urt,umsh-8596md-19t",
3681 .data = &urt_umsh_8596md_lvds,
3682 }, {
3683 .compatible = "urt,umsh-8596md-20t",
3684 .data = &urt_umsh_8596md_parallel,
3685 }, {
Fabio Estevam04206182019-02-18 21:27:06 -03003686 .compatible = "vxt,vl050-8048nt-c01",
3687 .data = &vl050_8048nt_c01,
3688 }, {
Richard Genoude4bac402017-03-27 12:33:23 +02003689 .compatible = "winstar,wf35ltiacd",
3690 .data = &winstar_wf35ltiacd,
3691 }, {
Thierry Reding280921d2013-08-30 15:10:14 +02003692 /* sentinel */
3693 }
3694};
3695MODULE_DEVICE_TABLE(of, platform_of_match);
3696
3697static int panel_simple_platform_probe(struct platform_device *pdev)
3698{
3699 const struct of_device_id *id;
3700
3701 id = of_match_node(platform_of_match, pdev->dev.of_node);
3702 if (!id)
3703 return -ENODEV;
3704
3705 return panel_simple_probe(&pdev->dev, id->data);
3706}
3707
3708static int panel_simple_platform_remove(struct platform_device *pdev)
3709{
3710 return panel_simple_remove(&pdev->dev);
3711}
3712
Thierry Redingd02fd932014-04-29 17:21:21 +02003713static void panel_simple_platform_shutdown(struct platform_device *pdev)
3714{
3715 panel_simple_shutdown(&pdev->dev);
3716}
3717
Thierry Reding280921d2013-08-30 15:10:14 +02003718static struct platform_driver panel_simple_platform_driver = {
3719 .driver = {
3720 .name = "panel-simple",
Thierry Reding280921d2013-08-30 15:10:14 +02003721 .of_match_table = platform_of_match,
3722 },
3723 .probe = panel_simple_platform_probe,
3724 .remove = panel_simple_platform_remove,
Thierry Redingd02fd932014-04-29 17:21:21 +02003725 .shutdown = panel_simple_platform_shutdown,
Thierry Reding280921d2013-08-30 15:10:14 +02003726};
3727
Thierry Reding210fcd92013-11-22 19:27:11 +01003728struct panel_desc_dsi {
3729 struct panel_desc desc;
3730
Thierry Reding462658b2014-03-14 11:24:57 +01003731 unsigned long flags;
Thierry Reding210fcd92013-11-22 19:27:11 +01003732 enum mipi_dsi_pixel_format format;
3733 unsigned int lanes;
3734};
3735
Thierry Redingd718d792015-04-08 16:52:33 +02003736static const struct drm_display_mode auo_b080uan01_mode = {
3737 .clock = 154500,
3738 .hdisplay = 1200,
3739 .hsync_start = 1200 + 62,
3740 .hsync_end = 1200 + 62 + 4,
3741 .htotal = 1200 + 62 + 4 + 62,
3742 .vdisplay = 1920,
3743 .vsync_start = 1920 + 9,
3744 .vsync_end = 1920 + 9 + 2,
3745 .vtotal = 1920 + 9 + 2 + 8,
3746 .vrefresh = 60,
3747};
3748
3749static const struct panel_desc_dsi auo_b080uan01 = {
3750 .desc = {
3751 .modes = &auo_b080uan01_mode,
3752 .num_modes = 1,
3753 .bpc = 8,
3754 .size = {
3755 .width = 108,
3756 .height = 272,
3757 },
3758 },
3759 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
3760 .format = MIPI_DSI_FMT_RGB888,
3761 .lanes = 4,
3762};
3763
Chris Zhongc8521962015-11-20 16:15:37 +08003764static const struct drm_display_mode boe_tv080wum_nl0_mode = {
3765 .clock = 160000,
3766 .hdisplay = 1200,
3767 .hsync_start = 1200 + 120,
3768 .hsync_end = 1200 + 120 + 20,
3769 .htotal = 1200 + 120 + 20 + 21,
3770 .vdisplay = 1920,
3771 .vsync_start = 1920 + 21,
3772 .vsync_end = 1920 + 21 + 3,
3773 .vtotal = 1920 + 21 + 3 + 18,
3774 .vrefresh = 60,
3775 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3776};
3777
3778static const struct panel_desc_dsi boe_tv080wum_nl0 = {
3779 .desc = {
3780 .modes = &boe_tv080wum_nl0_mode,
3781 .num_modes = 1,
3782 .size = {
3783 .width = 107,
3784 .height = 172,
3785 },
3786 },
3787 .flags = MIPI_DSI_MODE_VIDEO |
3788 MIPI_DSI_MODE_VIDEO_BURST |
3789 MIPI_DSI_MODE_VIDEO_SYNC_PULSE,
3790 .format = MIPI_DSI_FMT_RGB888,
3791 .lanes = 4,
3792};
3793
Alexandre Courbot712ac1b2014-01-21 18:57:10 +09003794static const struct drm_display_mode lg_ld070wx3_sl01_mode = {
3795 .clock = 71000,
3796 .hdisplay = 800,
3797 .hsync_start = 800 + 32,
3798 .hsync_end = 800 + 32 + 1,
3799 .htotal = 800 + 32 + 1 + 57,
3800 .vdisplay = 1280,
3801 .vsync_start = 1280 + 28,
3802 .vsync_end = 1280 + 28 + 1,
3803 .vtotal = 1280 + 28 + 1 + 14,
3804 .vrefresh = 60,
3805};
3806
3807static const struct panel_desc_dsi lg_ld070wx3_sl01 = {
3808 .desc = {
3809 .modes = &lg_ld070wx3_sl01_mode,
3810 .num_modes = 1,
Thierry Redingd7a839c2014-11-06 10:11:01 +01003811 .bpc = 8,
Alexandre Courbot712ac1b2014-01-21 18:57:10 +09003812 .size = {
3813 .width = 94,
3814 .height = 151,
3815 },
3816 },
Alexandre Courbot5e4cc272014-07-08 21:32:12 +09003817 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
Alexandre Courbot712ac1b2014-01-21 18:57:10 +09003818 .format = MIPI_DSI_FMT_RGB888,
3819 .lanes = 4,
3820};
3821
Alexandre Courbot499ce852014-01-21 18:57:09 +09003822static const struct drm_display_mode lg_lh500wx1_sd03_mode = {
3823 .clock = 67000,
3824 .hdisplay = 720,
3825 .hsync_start = 720 + 12,
3826 .hsync_end = 720 + 12 + 4,
3827 .htotal = 720 + 12 + 4 + 112,
3828 .vdisplay = 1280,
3829 .vsync_start = 1280 + 8,
3830 .vsync_end = 1280 + 8 + 4,
3831 .vtotal = 1280 + 8 + 4 + 12,
3832 .vrefresh = 60,
3833};
3834
3835static const struct panel_desc_dsi lg_lh500wx1_sd03 = {
3836 .desc = {
3837 .modes = &lg_lh500wx1_sd03_mode,
3838 .num_modes = 1,
Thierry Redingd7a839c2014-11-06 10:11:01 +01003839 .bpc = 8,
Alexandre Courbot499ce852014-01-21 18:57:09 +09003840 .size = {
3841 .width = 62,
3842 .height = 110,
3843 },
3844 },
3845 .flags = MIPI_DSI_MODE_VIDEO,
3846 .format = MIPI_DSI_FMT_RGB888,
3847 .lanes = 4,
3848};
3849
Thierry Reding280921d2013-08-30 15:10:14 +02003850static const struct drm_display_mode panasonic_vvx10f004b00_mode = {
3851 .clock = 157200,
3852 .hdisplay = 1920,
3853 .hsync_start = 1920 + 154,
3854 .hsync_end = 1920 + 154 + 16,
3855 .htotal = 1920 + 154 + 16 + 32,
3856 .vdisplay = 1200,
3857 .vsync_start = 1200 + 17,
3858 .vsync_end = 1200 + 17 + 2,
3859 .vtotal = 1200 + 17 + 2 + 16,
3860 .vrefresh = 60,
3861};
3862
Thierry Reding210fcd92013-11-22 19:27:11 +01003863static const struct panel_desc_dsi panasonic_vvx10f004b00 = {
3864 .desc = {
3865 .modes = &panasonic_vvx10f004b00_mode,
3866 .num_modes = 1,
Thierry Redingd7a839c2014-11-06 10:11:01 +01003867 .bpc = 8,
Thierry Reding210fcd92013-11-22 19:27:11 +01003868 .size = {
3869 .width = 217,
3870 .height = 136,
3871 },
Thierry Reding280921d2013-08-30 15:10:14 +02003872 },
Alexandre Courbot5e4cc272014-07-08 21:32:12 +09003873 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
3874 MIPI_DSI_CLOCK_NON_CONTINUOUS,
Thierry Reding210fcd92013-11-22 19:27:11 +01003875 .format = MIPI_DSI_FMT_RGB888,
3876 .lanes = 4,
3877};
3878
Jonathan Marekdebcd8f2018-11-24 15:06:28 -05003879static const struct drm_display_mode lg_acx467akm_7_mode = {
3880 .clock = 150000,
3881 .hdisplay = 1080,
3882 .hsync_start = 1080 + 2,
3883 .hsync_end = 1080 + 2 + 2,
3884 .htotal = 1080 + 2 + 2 + 2,
3885 .vdisplay = 1920,
3886 .vsync_start = 1920 + 2,
3887 .vsync_end = 1920 + 2 + 2,
3888 .vtotal = 1920 + 2 + 2 + 2,
3889 .vrefresh = 60,
3890};
3891
3892static const struct panel_desc_dsi lg_acx467akm_7 = {
3893 .desc = {
3894 .modes = &lg_acx467akm_7_mode,
3895 .num_modes = 1,
3896 .bpc = 8,
3897 .size = {
3898 .width = 62,
3899 .height = 110,
3900 },
3901 },
3902 .flags = 0,
3903 .format = MIPI_DSI_FMT_RGB888,
3904 .lanes = 4,
3905};
3906
Peter Ujfalusi62967232019-02-26 09:55:21 +02003907static const struct drm_display_mode osd101t2045_53ts_mode = {
3908 .clock = 154500,
3909 .hdisplay = 1920,
3910 .hsync_start = 1920 + 112,
3911 .hsync_end = 1920 + 112 + 16,
3912 .htotal = 1920 + 112 + 16 + 32,
3913 .vdisplay = 1200,
3914 .vsync_start = 1200 + 16,
3915 .vsync_end = 1200 + 16 + 2,
3916 .vtotal = 1200 + 16 + 2 + 16,
3917 .vrefresh = 60,
3918 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
3919};
3920
3921static const struct panel_desc_dsi osd101t2045_53ts = {
3922 .desc = {
3923 .modes = &osd101t2045_53ts_mode,
3924 .num_modes = 1,
3925 .bpc = 8,
3926 .size = {
3927 .width = 217,
3928 .height = 136,
3929 },
3930 },
3931 .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
3932 MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
3933 MIPI_DSI_MODE_EOT_PACKET,
3934 .format = MIPI_DSI_FMT_RGB888,
3935 .lanes = 4,
3936};
3937
Thierry Reding210fcd92013-11-22 19:27:11 +01003938static const struct of_device_id dsi_of_match[] = {
3939 {
Thierry Redingd718d792015-04-08 16:52:33 +02003940 .compatible = "auo,b080uan01",
3941 .data = &auo_b080uan01
3942 }, {
Chris Zhongc8521962015-11-20 16:15:37 +08003943 .compatible = "boe,tv080wum-nl0",
3944 .data = &boe_tv080wum_nl0
3945 }, {
Alexandre Courbot712ac1b2014-01-21 18:57:10 +09003946 .compatible = "lg,ld070wx3-sl01",
3947 .data = &lg_ld070wx3_sl01
3948 }, {
Alexandre Courbot499ce852014-01-21 18:57:09 +09003949 .compatible = "lg,lh500wx1-sd03",
3950 .data = &lg_lh500wx1_sd03
3951 }, {
Thierry Reding210fcd92013-11-22 19:27:11 +01003952 .compatible = "panasonic,vvx10f004b00",
3953 .data = &panasonic_vvx10f004b00
3954 }, {
Jonathan Marekdebcd8f2018-11-24 15:06:28 -05003955 .compatible = "lg,acx467akm-7",
3956 .data = &lg_acx467akm_7
3957 }, {
Peter Ujfalusi62967232019-02-26 09:55:21 +02003958 .compatible = "osddisplays,osd101t2045-53ts",
3959 .data = &osd101t2045_53ts
3960 }, {
Thierry Reding210fcd92013-11-22 19:27:11 +01003961 /* sentinel */
3962 }
3963};
3964MODULE_DEVICE_TABLE(of, dsi_of_match);
3965
3966static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
3967{
3968 const struct panel_desc_dsi *desc;
3969 const struct of_device_id *id;
3970 int err;
3971
3972 id = of_match_node(dsi_of_match, dsi->dev.of_node);
3973 if (!id)
3974 return -ENODEV;
3975
3976 desc = id->data;
3977
3978 err = panel_simple_probe(&dsi->dev, &desc->desc);
3979 if (err < 0)
3980 return err;
3981
Thierry Reding462658b2014-03-14 11:24:57 +01003982 dsi->mode_flags = desc->flags;
Thierry Reding210fcd92013-11-22 19:27:11 +01003983 dsi->format = desc->format;
3984 dsi->lanes = desc->lanes;
3985
Peter Ujfalusi7ad9db62019-02-26 10:11:53 +02003986 err = mipi_dsi_attach(dsi);
3987 if (err) {
3988 struct panel_simple *panel = dev_get_drvdata(&dsi->dev);
3989
3990 drm_panel_remove(&panel->base);
3991 }
3992
3993 return err;
Thierry Reding210fcd92013-11-22 19:27:11 +01003994}
3995
3996static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi)
3997{
3998 int err;
3999
4000 err = mipi_dsi_detach(dsi);
4001 if (err < 0)
4002 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
4003
4004 return panel_simple_remove(&dsi->dev);
4005}
4006
Thierry Redingd02fd932014-04-29 17:21:21 +02004007static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi)
4008{
4009 panel_simple_shutdown(&dsi->dev);
4010}
4011
Thierry Reding210fcd92013-11-22 19:27:11 +01004012static struct mipi_dsi_driver panel_simple_dsi_driver = {
4013 .driver = {
4014 .name = "panel-simple-dsi",
Thierry Reding210fcd92013-11-22 19:27:11 +01004015 .of_match_table = dsi_of_match,
4016 },
4017 .probe = panel_simple_dsi_probe,
4018 .remove = panel_simple_dsi_remove,
Thierry Redingd02fd932014-04-29 17:21:21 +02004019 .shutdown = panel_simple_dsi_shutdown,
Thierry Reding280921d2013-08-30 15:10:14 +02004020};
4021
4022static int __init panel_simple_init(void)
4023{
Thierry Reding210fcd92013-11-22 19:27:11 +01004024 int err;
4025
4026 err = platform_driver_register(&panel_simple_platform_driver);
4027 if (err < 0)
4028 return err;
4029
4030 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) {
4031 err = mipi_dsi_driver_register(&panel_simple_dsi_driver);
4032 if (err < 0)
4033 return err;
4034 }
4035
4036 return 0;
Thierry Reding280921d2013-08-30 15:10:14 +02004037}
4038module_init(panel_simple_init);
4039
4040static void __exit panel_simple_exit(void)
4041{
Thierry Reding210fcd92013-11-22 19:27:11 +01004042 if (IS_ENABLED(CONFIG_DRM_MIPI_DSI))
4043 mipi_dsi_driver_unregister(&panel_simple_dsi_driver);
4044
Thierry Reding280921d2013-08-30 15:10:14 +02004045 platform_driver_unregister(&panel_simple_platform_driver);
4046}
4047module_exit(panel_simple_exit);
4048
4049MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>");
4050MODULE_DESCRIPTION("DRM Driver for Simple Panels");
4051MODULE_LICENSE("GPL and additional rights");