Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1 | /* |
| 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 Ravnborg | cb23eae | 2019-05-26 20:05:32 +0200 | [diff] [blame] | 24 | #include <linux/delay.h> |
Alexandre Courbot | cfdf054 | 2014-03-01 14:00:58 +0900 | [diff] [blame] | 25 | #include <linux/gpio/consumer.h> |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 26 | #include <linux/module.h> |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 27 | #include <linux/of_platform.h> |
| 28 | #include <linux/platform_device.h> |
| 29 | #include <linux/regulator/consumer.h> |
| 30 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 31 | #include <video/display_timing.h> |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 32 | #include <video/of_display_timing.h> |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 33 | #include <video/videomode.h> |
| 34 | |
Sam Ravnborg | cb23eae | 2019-05-26 20:05:32 +0200 | [diff] [blame] | 35 | #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 Anderson | e362cc6 | 2019-07-12 09:33:33 -0700 | [diff] [blame] | 40 | /** |
| 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 Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 56 | struct panel_desc { |
| 57 | const struct drm_display_mode *modes; |
| 58 | unsigned int num_modes; |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 59 | const struct display_timing *timings; |
| 60 | unsigned int num_timings; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 61 | |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 62 | unsigned int bpc; |
| 63 | |
Ulrich Ölmann | 85533e3 | 2015-12-04 12:31:28 +0100 | [diff] [blame] | 64 | /** |
| 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 Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 68 | struct { |
| 69 | unsigned int width; |
| 70 | unsigned int height; |
| 71 | } size; |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 72 | |
| 73 | /** |
| 74 | * @prepare: the time (in milliseconds) that it takes for the panel to |
| 75 | * become ready and start receiving video data |
Douglas Anderson | 2ed3e95 | 2018-10-25 15:21:30 -0700 | [diff] [blame] | 76 | * @hpd_absent_delay: Add this to the prepare delay if we know Hot |
| 77 | * Plug Detect isn't used. |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 78 | * @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 Anderson | 2ed3e95 | 2018-10-25 15:21:30 -0700 | [diff] [blame] | 88 | unsigned int hpd_absent_delay; |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 89 | unsigned int enable; |
| 90 | unsigned int disable; |
| 91 | unsigned int unprepare; |
| 92 | } delay; |
Boris Brezillon | 795f7ab | 2014-07-22 13:33:59 +0200 | [diff] [blame] | 93 | |
| 94 | u32 bus_format; |
Stefan Agner | f0aa083 | 2016-02-08 11:38:14 -0800 | [diff] [blame] | 95 | u32 bus_flags; |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 96 | int connector_type; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 97 | }; |
| 98 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 99 | struct panel_simple { |
| 100 | struct drm_panel base; |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 101 | bool prepared; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 102 | bool enabled; |
Douglas Anderson | 2ed3e95 | 2018-10-25 15:21:30 -0700 | [diff] [blame] | 103 | bool no_hpd; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 104 | |
| 105 | const struct panel_desc *desc; |
| 106 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 107 | struct regulator *supply; |
| 108 | struct i2c_adapter *ddc; |
| 109 | |
Alexandre Courbot | cfdf054 | 2014-03-01 14:00:58 +0900 | [diff] [blame] | 110 | struct gpio_desc *enable_gpio; |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 111 | |
| 112 | struct drm_display_mode override_mode; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 113 | }; |
| 114 | |
| 115 | static inline struct panel_simple *to_panel_simple(struct drm_panel *panel) |
| 116 | { |
| 117 | return container_of(panel, struct panel_simple, base); |
| 118 | } |
| 119 | |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 120 | static unsigned int panel_simple_get_timings_modes(struct panel_simple *panel, |
| 121 | struct drm_connector *connector) |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 122 | { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 123 | struct drm_display_mode *mode; |
| 124 | unsigned int i, num = 0; |
| 125 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 126 | 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 Ravnborg | aa6c436 | 2019-12-07 15:03:35 +0100 | [diff] [blame] | 131 | mode = drm_mode_create(connector->dev); |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 132 | if (!mode) { |
Sam Ravnborg | aa6c436 | 2019-12-07 15:03:35 +0100 | [diff] [blame] | 133 | dev_err(panel->base.dev, "failed to add mode %ux%u\n", |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 134 | dt->hactive.typ, dt->vactive.typ); |
| 135 | continue; |
| 136 | } |
| 137 | |
| 138 | drm_display_mode_from_videomode(&vm, mode); |
Boris Brezillon | cda5537 | 2016-04-15 18:23:33 +0200 | [diff] [blame] | 139 | |
| 140 | mode->type |= DRM_MODE_TYPE_DRIVER; |
| 141 | |
Chen-Yu Tsai | 230c5b4 | 2016-10-24 21:21:15 +0800 | [diff] [blame] | 142 | if (panel->desc->num_timings == 1) |
Boris Brezillon | cda5537 | 2016-04-15 18:23:33 +0200 | [diff] [blame] | 143 | mode->type |= DRM_MODE_TYPE_PREFERRED; |
| 144 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 145 | drm_mode_probed_add(connector, mode); |
| 146 | num++; |
| 147 | } |
| 148 | |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 149 | return num; |
| 150 | } |
| 151 | |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 152 | static unsigned int panel_simple_get_display_modes(struct panel_simple *panel, |
| 153 | struct drm_connector *connector) |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 154 | { |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 155 | struct drm_display_mode *mode; |
| 156 | unsigned int i, num = 0; |
| 157 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 158 | for (i = 0; i < panel->desc->num_modes; i++) { |
| 159 | const struct drm_display_mode *m = &panel->desc->modes[i]; |
| 160 | |
Sam Ravnborg | aa6c436 | 2019-12-07 15:03:35 +0100 | [diff] [blame] | 161 | mode = drm_mode_duplicate(connector->dev, m); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 162 | if (!mode) { |
Sam Ravnborg | aa6c436 | 2019-12-07 15:03:35 +0100 | [diff] [blame] | 163 | dev_err(panel->base.dev, "failed to add mode %ux%u@%u\n", |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 164 | m->hdisplay, m->vdisplay, m->vrefresh); |
| 165 | continue; |
| 166 | } |
| 167 | |
Boris Brezillon | cda5537 | 2016-04-15 18:23:33 +0200 | [diff] [blame] | 168 | mode->type |= DRM_MODE_TYPE_DRIVER; |
| 169 | |
| 170 | if (panel->desc->num_modes == 1) |
| 171 | mode->type |= DRM_MODE_TYPE_PREFERRED; |
| 172 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 173 | drm_mode_set_name(mode); |
| 174 | |
| 175 | drm_mode_probed_add(connector, mode); |
| 176 | num++; |
| 177 | } |
| 178 | |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 179 | return num; |
| 180 | } |
| 181 | |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 182 | static int panel_simple_get_non_edid_modes(struct panel_simple *panel, |
| 183 | struct drm_connector *connector) |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 184 | { |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 185 | 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 Ravnborg | aa6c436 | 2019-12-07 15:03:35 +0100 | [diff] [blame] | 193 | mode = drm_mode_duplicate(connector->dev, |
| 194 | &panel->override_mode); |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 195 | if (mode) { |
| 196 | drm_mode_probed_add(connector, mode); |
| 197 | num = 1; |
| 198 | } else { |
Sam Ravnborg | aa6c436 | 2019-12-07 15:03:35 +0100 | [diff] [blame] | 199 | dev_err(panel->base.dev, "failed to add override mode\n"); |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 200 | } |
| 201 | } |
| 202 | |
| 203 | /* Only add timings if override was not there or failed to validate */ |
| 204 | if (num == 0 && panel->desc->num_timings) |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 205 | num = panel_simple_get_timings_modes(panel, connector); |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 206 | |
| 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 Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 215 | num = panel_simple_get_display_modes(panel, connector); |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 216 | |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 217 | connector->display_info.bpc = panel->desc->bpc; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 218 | connector->display_info.width_mm = panel->desc->size.width; |
| 219 | connector->display_info.height_mm = panel->desc->size.height; |
Boris Brezillon | 795f7ab | 2014-07-22 13:33:59 +0200 | [diff] [blame] | 220 | if (panel->desc->bus_format) |
| 221 | drm_display_info_set_bus_formats(&connector->display_info, |
| 222 | &panel->desc->bus_format, 1); |
Stefan Agner | f0aa083 | 2016-02-08 11:38:14 -0800 | [diff] [blame] | 223 | connector->display_info.bus_flags = panel->desc->bus_flags; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 224 | |
| 225 | return num; |
| 226 | } |
| 227 | |
| 228 | static 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 Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 235 | if (p->desc->delay.disable) |
| 236 | msleep(p->desc->delay.disable); |
| 237 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 238 | p->enabled = false; |
| 239 | |
| 240 | return 0; |
| 241 | } |
| 242 | |
Ajay Kumar | c0e1d17 | 2014-07-31 23:12:04 +0530 | [diff] [blame] | 243 | static int panel_simple_unprepare(struct drm_panel *panel) |
| 244 | { |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 245 | struct panel_simple *p = to_panel_simple(panel); |
| 246 | |
| 247 | if (!p->prepared) |
| 248 | return 0; |
| 249 | |
Fabio Estevam | 756b918 | 2017-07-16 21:05:39 -0300 | [diff] [blame] | 250 | gpiod_set_value_cansleep(p->enable_gpio, 0); |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 251 | |
| 252 | regulator_disable(p->supply); |
| 253 | |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 254 | if (p->desc->delay.unprepare) |
| 255 | msleep(p->desc->delay.unprepare); |
| 256 | |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 257 | p->prepared = false; |
| 258 | |
Ajay Kumar | c0e1d17 | 2014-07-31 23:12:04 +0530 | [diff] [blame] | 259 | return 0; |
| 260 | } |
| 261 | |
| 262 | static int panel_simple_prepare(struct drm_panel *panel) |
| 263 | { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 264 | struct panel_simple *p = to_panel_simple(panel); |
Douglas Anderson | 2ed3e95 | 2018-10-25 15:21:30 -0700 | [diff] [blame] | 265 | unsigned int delay; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 266 | int err; |
| 267 | |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 268 | if (p->prepared) |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 269 | 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 Estevam | 756b918 | 2017-07-16 21:05:39 -0300 | [diff] [blame] | 277 | gpiod_set_value_cansleep(p->enable_gpio, 1); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 278 | |
Douglas Anderson | 2ed3e95 | 2018-10-25 15:21:30 -0700 | [diff] [blame] | 279 | 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 Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 284 | |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 285 | p->prepared = true; |
| 286 | |
| 287 | return 0; |
| 288 | } |
| 289 | |
| 290 | static 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 Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 297 | if (p->desc->delay.enable) |
| 298 | msleep(p->desc->delay.enable); |
| 299 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 300 | p->enabled = true; |
| 301 | |
| 302 | return 0; |
| 303 | } |
| 304 | |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 305 | static int panel_simple_get_modes(struct drm_panel *panel, |
| 306 | struct drm_connector *connector) |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 307 | { |
| 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 Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 313 | struct edid *edid = drm_get_edid(connector, p->ddc); |
| 314 | |
| 315 | drm_connector_update_edid_property(connector, edid); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 316 | if (edid) { |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 317 | num += drm_add_edid_modes(connector, edid); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 318 | kfree(edid); |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | /* add hard-coded panel modes */ |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 323 | num += panel_simple_get_non_edid_modes(p, connector); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 324 | |
| 325 | return num; |
| 326 | } |
| 327 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 328 | static 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 Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 345 | static const struct drm_panel_funcs panel_simple_funcs = { |
| 346 | .disable = panel_simple_disable, |
Ajay Kumar | c0e1d17 | 2014-07-31 23:12:04 +0530 | [diff] [blame] | 347 | .unprepare = panel_simple_unprepare, |
| 348 | .prepare = panel_simple_prepare, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 349 | .enable = panel_simple_enable, |
| 350 | .get_modes = panel_simple_get_modes, |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 351 | .get_timings = panel_simple_get_timings, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 352 | }; |
| 353 | |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 354 | #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 Anderson | e362cc6 | 2019-07-12 09:33:33 -0700 | [diff] [blame] | 357 | static void panel_simple_parse_panel_timing_node(struct device *dev, |
| 358 | struct panel_simple *panel, |
| 359 | const struct display_timing *ot) |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 360 | { |
| 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 Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 401 | static int panel_simple_probe(struct device *dev, const struct panel_desc *desc) |
| 402 | { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 403 | struct panel_simple *panel; |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 404 | struct display_timing dt; |
Sam Ravnborg | 0fe1564 | 2019-12-07 15:03:31 +0100 | [diff] [blame] | 405 | struct device_node *ddc; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 406 | int err; |
| 407 | |
| 408 | panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL); |
| 409 | if (!panel) |
| 410 | return -ENOMEM; |
| 411 | |
| 412 | panel->enabled = false; |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 413 | panel->prepared = false; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 414 | panel->desc = desc; |
| 415 | |
Douglas Anderson | 2ed3e95 | 2018-10-25 15:21:30 -0700 | [diff] [blame] | 416 | panel->no_hpd = of_property_read_bool(dev->of_node, "no-hpd"); |
| 417 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 418 | panel->supply = devm_regulator_get(dev, "power"); |
| 419 | if (IS_ERR(panel->supply)) |
| 420 | return PTR_ERR(panel->supply); |
| 421 | |
Alexandre Courbot | a61400d | 2014-10-23 17:16:58 +0900 | [diff] [blame] | 422 | panel->enable_gpio = devm_gpiod_get_optional(dev, "enable", |
| 423 | GPIOD_OUT_LOW); |
Alexandre Courbot | cfdf054 | 2014-03-01 14:00:58 +0900 | [diff] [blame] | 424 | if (IS_ERR(panel->enable_gpio)) { |
| 425 | err = PTR_ERR(panel->enable_gpio); |
Fabio Estevam | b8e9380 | 2017-06-30 18:14:46 -0300 | [diff] [blame] | 426 | if (err != -EPROBE_DEFER) |
| 427 | dev_err(dev, "failed to request GPIO: %d\n", err); |
Alexandre Courbot | 9746c61 | 2014-07-25 23:47:25 +0900 | [diff] [blame] | 428 | return err; |
| 429 | } |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 430 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 431 | 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 Ravnborg | 0fe1564 | 2019-12-07 15:03:31 +0100 | [diff] [blame] | 436 | if (!panel->ddc) |
| 437 | return -EPROBE_DEFER; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 438 | } |
| 439 | |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 440 | if (!of_get_display_timing(dev->of_node, "panel-timing", &dt)) |
Douglas Anderson | e362cc6 | 2019-07-12 09:33:33 -0700 | [diff] [blame] | 441 | panel_simple_parse_panel_timing_node(dev, panel, &dt); |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 442 | |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 443 | drm_panel_init(&panel->base, dev, &panel_simple_funcs, |
| 444 | desc->connector_type); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 445 | |
Sam Ravnborg | 0fe1564 | 2019-12-07 15:03:31 +0100 | [diff] [blame] | 446 | err = drm_panel_of_backlight(&panel->base); |
| 447 | if (err) |
| 448 | goto free_ddc; |
| 449 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 450 | 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 | |
| 458 | free_ddc: |
| 459 | if (panel->ddc) |
| 460 | put_device(&panel->ddc->dev); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 461 | |
| 462 | return err; |
| 463 | } |
| 464 | |
| 465 | static int panel_simple_remove(struct device *dev) |
| 466 | { |
| 467 | struct panel_simple *panel = dev_get_drvdata(dev); |
| 468 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 469 | drm_panel_remove(&panel->base); |
Sam Ravnborg | 0fe1564 | 2019-12-07 15:03:31 +0100 | [diff] [blame] | 470 | drm_panel_disable(&panel->base); |
| 471 | drm_panel_unprepare(&panel->base); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 472 | |
| 473 | if (panel->ddc) |
| 474 | put_device(&panel->ddc->dev); |
| 475 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 476 | return 0; |
| 477 | } |
| 478 | |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 479 | static void panel_simple_shutdown(struct device *dev) |
| 480 | { |
| 481 | struct panel_simple *panel = dev_get_drvdata(dev); |
| 482 | |
Sam Ravnborg | 0fe1564 | 2019-12-07 15:03:31 +0100 | [diff] [blame] | 483 | drm_panel_disable(&panel->base); |
| 484 | drm_panel_unprepare(&panel->base); |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 485 | } |
| 486 | |
Yannick Fertre | 966fea7 | 2017-03-28 11:44:49 +0200 | [diff] [blame] | 487 | static 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 | |
| 501 | static const struct panel_desc ampire_am_480272h3tmqw_t01h = { |
| 502 | .modes = &ire_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 Zabel | 1c550fa1 | 2015-02-11 18:50:09 +0100 | [diff] [blame] | 512 | static 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 | |
| 526 | static const struct panel_desc ampire_am800480r3tmqwa1h = { |
| 527 | .modes = &ire_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 Szymanski | c479450f | 2019-05-07 17:27:12 +0200 | [diff] [blame] | 537 | static 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 | |
| 551 | static 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 Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 563 | static 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 | |
| 576 | static const struct panel_desc auo_b101aw03 = { |
| 577 | .modes = &auo_b101aw03_mode, |
| 578 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 579 | .bpc = 6, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 580 | .size = { |
| 581 | .width = 223, |
| 582 | .height = 125, |
| 583 | }, |
| 584 | }; |
| 585 | |
Douglas Anderson | 374bf82 | 2019-07-11 13:34:55 -0700 | [diff] [blame] | 586 | static 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 Lin | a531bc3 | 2015-02-28 10:18:58 +0800 | [diff] [blame] | 596 | }; |
| 597 | |
| 598 | static const struct panel_desc auo_b101ean01 = { |
Douglas Anderson | 374bf82 | 2019-07-11 13:34:55 -0700 | [diff] [blame] | 599 | .timings = &auo_b101ean01_timing, |
| 600 | .num_timings = 1, |
Huang Lin | a531bc3 | 2015-02-28 10:18:58 +0800 | [diff] [blame] | 601 | .bpc = 6, |
| 602 | .size = { |
| 603 | .width = 217, |
| 604 | .height = 136, |
| 605 | }, |
| 606 | }; |
| 607 | |
Rob Clark | dac746e | 2014-08-01 17:01:06 -0400 | [diff] [blame] | 608 | static 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 | |
| 622 | static 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 Clark | da458286 | 2020-01-08 15:53:56 -0800 | [diff] [blame] | 632 | static 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 | |
| 646 | static 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 Kumar | e35e305 | 2014-09-01 15:40:02 +0530 | [diff] [blame] | 661 | static 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 | |
| 674 | static 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 Marchesin | a333f7a | 2014-05-23 19:27:59 -0700 | [diff] [blame] | 684 | static 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 | |
| 697 | static const struct panel_desc auo_b133xtn01 = { |
| 698 | .modes = &auo_b133xtn01_mode, |
| 699 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 700 | .bpc = 6, |
Stéphane Marchesin | a333f7a | 2014-05-23 19:27:59 -0700 | [diff] [blame] | 701 | .size = { |
| 702 | .width = 293, |
| 703 | .height = 165, |
| 704 | }, |
| 705 | }; |
| 706 | |
Ajay Kumar | 3e51d60 | 2014-07-31 23:12:12 +0530 | [diff] [blame] | 707 | static 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 | |
| 720 | static const struct panel_desc auo_b133htn01 = { |
| 721 | .modes = &auo_b133htn01_mode, |
| 722 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 723 | .bpc = 6, |
Ajay Kumar | 3e51d60 | 2014-07-31 23:12:12 +0530 | [diff] [blame] | 724 | .size = { |
| 725 | .width = 293, |
| 726 | .height = 165, |
| 727 | }, |
| 728 | .delay = { |
| 729 | .prepare = 105, |
| 730 | .enable = 20, |
| 731 | .unprepare = 50, |
| 732 | }, |
| 733 | }; |
| 734 | |
Lukasz Majewski | bccfaff | 2018-05-14 21:08:49 +0200 | [diff] [blame] | 735 | static 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 | |
| 747 | static 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 Gonzalez | 4fb8640 | 2018-10-25 17:09:30 +0200 | [diff] [blame] | 763 | static 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 | |
| 776 | static 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 Fritz | 4451c28 | 2017-12-16 14:13:36 +0100 | [diff] [blame] | 787 | static 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 | |
| 800 | static 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 Stach | 697035c | 2016-11-30 14:09:55 +0100 | [diff] [blame] | 810 | static 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 | |
| 822 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 837 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | 697035c | 2016-11-30 14:09:55 +0100 | [diff] [blame] | 838 | }; |
| 839 | |
Lucas Stach | 8c31f60 | 2016-11-30 14:09:56 +0100 | [diff] [blame] | 840 | static const struct display_timing auo_g185han01_timings = { |
| 841 | .pixelclock = { 120000000, 144000000, 175000000 }, |
| 842 | .hactive = { 1920, 1920, 1920 }, |
Lucas Stach | f8c6bfc | 2019-07-10 15:07:40 +0200 | [diff] [blame] | 843 | .hfront_porch = { 36, 120, 148 }, |
| 844 | .hback_porch = { 24, 88, 108 }, |
| 845 | .hsync_len = { 20, 48, 64 }, |
Lucas Stach | 8c31f60 | 2016-11-30 14:09:56 +0100 | [diff] [blame] | 846 | .vactive = { 1080, 1080, 1080 }, |
| 847 | .vfront_porch = { 6, 10, 40 }, |
| 848 | .vback_porch = { 2, 5, 20 }, |
| 849 | .vsync_len = { 2, 5, 20 }, |
| 850 | }; |
| 851 | |
| 852 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 867 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | 8c31f60 | 2016-11-30 14:09:56 +0100 | [diff] [blame] | 868 | }; |
| 869 | |
Lucas Stach | 70c0d5b | 2017-06-08 20:07:58 +0200 | [diff] [blame] | 870 | static 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 | |
| 882 | static 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 Stach | 2554f15 | 2018-04-11 17:27:41 +0200 | [diff] [blame] | 895 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 896 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | 70c0d5b | 2017-06-08 20:07:58 +0200 | [diff] [blame] | 897 | }; |
| 898 | |
Haixia Shi | 7ee933a | 2016-10-11 14:59:16 -0700 | [diff] [blame] | 899 | static 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 | |
| 912 | static 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 Zabel | d47df63 | 2014-12-18 16:43:43 +0100 | [diff] [blame] | 926 | static 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 | |
| 939 | static 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 Tsai | 7ad8b41 | 2018-09-07 12:19:46 +0800 | [diff] [blame] | 954 | static 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 | |
| 966 | static 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 Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 976 | static const struct drm_display_mode boe_hv070wsa_mode = { |
Andrzej Hajda | e077e2f | 2018-07-25 17:46:43 +0200 | [diff] [blame] | 977 | .clock = 42105, |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 978 | .hdisplay = 1024, |
Andrzej Hajda | e077e2f | 2018-07-25 17:46:43 +0200 | [diff] [blame] | 979 | .hsync_start = 1024 + 30, |
| 980 | .hsync_end = 1024 + 30 + 30, |
| 981 | .htotal = 1024 + 30 + 30 + 30, |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 982 | .vdisplay = 600, |
Andrzej Hajda | e077e2f | 2018-07-25 17:46:43 +0200 | [diff] [blame] | 983 | .vsync_start = 600 + 10, |
| 984 | .vsync_end = 600 + 10 + 10, |
| 985 | .vtotal = 600 + 10 + 10 + 10, |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 986 | .vrefresh = 60, |
| 987 | }; |
| 988 | |
| 989 | static 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 Wang | cac1a41 | 2016-12-14 11:19:56 +0800 | [diff] [blame] | 998 | static 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 | |
| 1025 | static 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 Schramm | a511981 | 2020-01-09 12:29:52 +0100 | [diff] [blame] | 1040 | static 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 | |
| 1055 | static 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 Benetti | e58edce | 2018-07-31 01:11:16 +0200 | [diff] [blame] | 1072 | static 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 | |
| 1086 | static 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 Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 1094 | .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, |
Giulio Benetti | e58edce | 2018-07-31 01:11:16 +0200 | [diff] [blame] | 1095 | }; |
| 1096 | |
Giulio Benetti | 982f944 | 2018-07-31 01:11:14 +0200 | [diff] [blame] | 1097 | static 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 | |
| 1111 | static 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 Li | 2cb35c8 | 2016-09-20 03:02:51 +0800 | [diff] [blame] | 1121 | static 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 | |
| 1135 | static 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 Warren | 4c93075 | 2014-01-07 16:46:26 -0700 | [diff] [blame] | 1145 | static 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 | |
| 1158 | static const struct panel_desc chunghwa_claa101wa01a = { |
| 1159 | .modes = &chunghwa_claa101wa01a_mode, |
| 1160 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1161 | .bpc = 6, |
Stephen Warren | 4c93075 | 2014-01-07 16:46:26 -0700 | [diff] [blame] | 1162 | .size = { |
| 1163 | .width = 220, |
| 1164 | .height = 120, |
| 1165 | }, |
| 1166 | }; |
| 1167 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1168 | static 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 | |
| 1181 | static const struct panel_desc chunghwa_claa101wb01 = { |
| 1182 | .modes = &chunghwa_claa101wb01_mode, |
| 1183 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1184 | .bpc = 6, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1185 | .size = { |
| 1186 | .width = 223, |
| 1187 | .height = 125, |
| 1188 | }, |
| 1189 | }; |
| 1190 | |
Michal Vokáč | 97ceb1f | 2018-06-25 14:41:30 +0200 | [diff] [blame] | 1191 | static 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 | |
| 1205 | static 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 Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 1214 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, |
Michal Vokáč | 97ceb1f | 2018-06-25 14:41:30 +0200 | [diff] [blame] | 1215 | }; |
| 1216 | |
Philipp Zabel | 0ca0c82 | 2018-05-23 11:25:04 +0200 | [diff] [blame] | 1217 | static 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 | |
| 1230 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1244 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Philipp Zabel | 0ca0c82 | 2018-05-23 11:25:04 +0200 | [diff] [blame] | 1245 | }; |
| 1246 | |
Marco Felsch | 6cbe7cd | 2018-09-24 17:26:10 +0200 | [diff] [blame] | 1247 | static 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 | |
| 1260 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1275 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Marco Felsch | 6cbe7cd | 2018-09-24 17:26:10 +0200 | [diff] [blame] | 1276 | }; |
| 1277 | |
Andreas Pretzsch | c2d24af | 2019-04-16 12:16:30 +0200 | [diff] [blame] | 1278 | static 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 | |
| 1292 | static 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 Rotariu | 82d57a5 | 2020-01-30 12:08:38 +0000 | [diff] [blame] | 1304 | static 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 | |
| 1323 | static 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 Vasut | fd819bf | 2019-02-19 15:04:38 +0100 | [diff] [blame] | 1335 | static 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 | |
| 1349 | static 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 Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 1359 | static 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 | |
| 1373 | static const struct panel_desc edt_et057090dhu = { |
| 1374 | .modes = &edt_et057090dhu_mode, |
| 1375 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1376 | .bpc = 6, |
Stefan Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 1377 | .size = { |
| 1378 | .width = 115, |
| 1379 | .height = 86, |
| 1380 | }, |
Stefan Agner | eaeebff | 2016-12-08 14:54:31 -0800 | [diff] [blame] | 1381 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
Laurent Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 1382 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, |
Stefan Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 1383 | }; |
| 1384 | |
Philipp Zabel | fff5de4 | 2014-05-15 12:25:47 +0200 | [diff] [blame] | 1385 | static 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 | |
| 1399 | static const struct panel_desc edt_etm0700g0dh6 = { |
| 1400 | .modes = &edt_etm0700g0dh6_mode, |
| 1401 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1402 | .bpc = 6, |
Philipp Zabel | fff5de4 | 2014-05-15 12:25:47 +0200 | [diff] [blame] | 1403 | .size = { |
| 1404 | .width = 152, |
| 1405 | .height = 91, |
| 1406 | }, |
Stefan Agner | eaeebff | 2016-12-08 14:54:31 -0800 | [diff] [blame] | 1407 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
Laurent Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 1408 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, |
Philipp Zabel | fff5de4 | 2014-05-15 12:25:47 +0200 | [diff] [blame] | 1409 | }; |
| 1410 | |
Jan Tuerk | aa7e645 | 2018-06-19 11:55:44 +0200 | [diff] [blame] | 1411 | static 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 Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 1420 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, |
Jan Tuerk | aa7e645 | 2018-06-19 11:55:44 +0200 | [diff] [blame] | 1421 | }; |
| 1422 | |
Marco Felsch | 9158e3c | 2019-04-16 12:06:45 +0200 | [diff] [blame] | 1423 | static 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 | |
| 1438 | static 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 BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 1450 | static 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 | |
| 1463 | static const struct panel_desc foxlink_fl500wvr00_a0t = { |
| 1464 | .modes = &foxlink_fl500wvr00_a0t_mode, |
| 1465 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 1466 | .bpc = 8, |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 1467 | .size = { |
| 1468 | .width = 108, |
| 1469 | .height = 65, |
| 1470 | }, |
Boris Brezillon | bb276cb | 2014-07-22 13:35:47 +0200 | [diff] [blame] | 1471 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 1472 | }; |
| 1473 | |
Paul Cercueil | 7b6bd84 | 2020-01-13 13:17:41 -0300 | [diff] [blame] | 1474 | static 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 | |
| 1488 | static 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 Teki | 3be2071 | 2019-05-07 18:37:07 +0530 | [diff] [blame] | 1501 | static 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 | |
| 1515 | static 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 Zabel | d435a2a | 2014-11-19 10:29:55 +0100 | [diff] [blame] | 1524 | static 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 | |
| 1537 | static 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 Zabel | 33536a0 | 2015-02-11 18:50:07 +0100 | [diff] [blame] | 1545 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Philipp Zabel | d435a2a | 2014-11-19 10:29:55 +0100 | [diff] [blame] | 1546 | }; |
| 1547 | |
Paul Cercueil | 2c6574a | 2019-06-06 00:22:47 +0200 | [diff] [blame] | 1548 | static 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 | |
| 1561 | static 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 Zabel | ab07725 | 2014-12-11 18:32:46 +0100 | [diff] [blame] | 1573 | static 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 Zabel | d901d2b | 2015-08-12 12:32:13 +0200 | [diff] [blame] | 1578 | /* |
| 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 Zabel | ab07725 | 2014-12-11 18:32:46 +0100 | [diff] [blame] | 1584 | .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 Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 1589 | }; |
| 1590 | |
| 1591 | static const struct panel_desc hannstar_hsd070pww1 = { |
Philipp Zabel | ab07725 | 2014-12-11 18:32:46 +0100 | [diff] [blame] | 1592 | .timings = &hannstar_hsd070pww1_timing, |
| 1593 | .num_timings = 1, |
Philipp Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 1594 | .bpc = 6, |
| 1595 | .size = { |
| 1596 | .width = 151, |
| 1597 | .height = 94, |
| 1598 | }, |
Philipp Zabel | 58d6a7b | 2015-08-12 12:32:12 +0200 | [diff] [blame] | 1599 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1600 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Philipp Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 1601 | }; |
| 1602 | |
Eric Nelson | c0d607e | 2015-04-13 15:09:26 -0700 | [diff] [blame] | 1603 | static 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 | |
| 1616 | static 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 Zabel | 4946b04 | 2015-05-20 11:34:08 +0200 | [diff] [blame] | 1624 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1625 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Eric Nelson | c0d607e | 2015-04-13 15:09:26 -0700 | [diff] [blame] | 1626 | }; |
| 1627 | |
Lucas Stach | 61ac0bf | 2014-11-06 17:44:35 +0100 | [diff] [blame] | 1628 | static 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 | |
| 1641 | static 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 Zabel | 6c684e3 | 2017-10-11 14:59:58 +0200 | [diff] [blame] | 1649 | .delay = { |
| 1650 | .enable = 160, |
| 1651 | .disable = 160, |
| 1652 | }, |
Lucas Stach | 61ac0bf | 2014-11-06 17:44:35 +0100 | [diff] [blame] | 1653 | }; |
| 1654 | |
Nicolas Ferre | 41bcceb | 2015-03-19 14:43:01 +0100 | [diff] [blame] | 1655 | static 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 Zabel | a483159 | 2017-10-11 14:59:56 +0200 | [diff] [blame] | 1663 | .vsync_end = 272 + 2 + 10, |
| 1664 | .vtotal = 272 + 2 + 10 + 2, |
Nicolas Ferre | 41bcceb | 2015-03-19 14:43:01 +0100 | [diff] [blame] | 1665 | .vrefresh = 60, |
| 1666 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 1667 | }; |
| 1668 | |
| 1669 | static 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 Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 1678 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, |
Nicolas Ferre | 41bcceb | 2015-03-19 14:43:01 +0100 | [diff] [blame] | 1679 | }; |
| 1680 | |
Riccardo Bortolato | 4fc24ab | 2016-04-20 15:37:15 +0200 | [diff] [blame] | 1681 | static 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 | |
| 1694 | static 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 Fritz | a5d2ade | 2018-06-04 13:16:48 +0200 | [diff] [blame] | 1704 | static 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 | |
| 1717 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1732 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Christoph Fritz | a5d2ade | 2018-06-04 13:16:48 +0200 | [diff] [blame] | 1733 | }; |
| 1734 | |
Michael Olbrich | 1e29b84 | 2016-08-15 14:32:02 +0200 | [diff] [blame] | 1735 | static 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 | |
| 1748 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1761 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Michael Olbrich | 1e29b84 | 2016-08-15 14:32:02 +0200 | [diff] [blame] | 1762 | }; |
| 1763 | |
Lucas Stach | 4ae13e4 | 2016-11-30 14:09:54 +0100 | [diff] [blame] | 1764 | static 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 Stach | d731f66 | 2014-11-06 17:44:33 +0100 | [diff] [blame] | 1774 | }; |
| 1775 | |
| 1776 | static const struct panel_desc innolux_g121i1_l01 = { |
Lucas Stach | 4ae13e4 | 2016-11-30 14:09:54 +0100 | [diff] [blame] | 1777 | .timings = &innolux_g121i1_l01_timing, |
| 1778 | .num_timings = 1, |
Lucas Stach | d731f66 | 2014-11-06 17:44:33 +0100 | [diff] [blame] | 1779 | .bpc = 6, |
| 1780 | .size = { |
| 1781 | .width = 261, |
| 1782 | .height = 163, |
| 1783 | }, |
Lucas Stach | 4ae13e4 | 2016-11-30 14:09:54 +0100 | [diff] [blame] | 1784 | .delay = { |
| 1785 | .enable = 200, |
| 1786 | .disable = 20, |
| 1787 | }, |
| 1788 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1789 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | d731f66 | 2014-11-06 17:44:33 +0100 | [diff] [blame] | 1790 | }; |
| 1791 | |
Akshay Bhat | f8fa17b | 2015-11-18 15:57:47 -0500 | [diff] [blame] | 1792 | static 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 Bhat | 2e8c5eb | 2016-03-01 18:06:54 -0500 | [diff] [blame] | 1803 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
Akshay Bhat | f8fa17b | 2015-11-18 15:57:47 -0500 | [diff] [blame] | 1804 | }; |
| 1805 | |
| 1806 | static 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 Anderson | d719cbe | 2019-07-11 13:34:54 -0700 | [diff] [blame] | 1821 | /* |
| 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 | */ |
| 1831 | static 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 Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 1842 | }; |
| 1843 | |
| 1844 | static const struct panel_desc innolux_n116bge = { |
Douglas Anderson | d719cbe | 2019-07-11 13:34:54 -0700 | [diff] [blame] | 1845 | .timings = &innolux_n116bge_timing, |
| 1846 | .num_timings = 1, |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 1847 | .bpc = 6, |
| 1848 | .size = { |
| 1849 | .width = 256, |
| 1850 | .height = 144, |
| 1851 | }, |
| 1852 | }; |
| 1853 | |
Alban Bedel | ea44739 | 2014-07-22 08:38:55 +0200 | [diff] [blame] | 1854 | static 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 | |
| 1867 | static const struct panel_desc innolux_n156bge_l21 = { |
| 1868 | .modes = &innolux_n156bge_l21_mode, |
| 1869 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1870 | .bpc = 6, |
Alban Bedel | ea44739 | 2014-07-22 08:38:55 +0200 | [diff] [blame] | 1871 | .size = { |
| 1872 | .width = 344, |
| 1873 | .height = 193, |
| 1874 | }, |
| 1875 | }; |
| 1876 | |
Douglas Anderson | 8f054b6 | 2018-10-25 15:21:34 -0700 | [diff] [blame] | 1877 | static const struct drm_display_mode innolux_p120zdg_bf1_mode = { |
spanda@codeaurora.org | da50bd4 | 2018-05-15 11:22:43 +0530 | [diff] [blame] | 1878 | .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 Anderson | 8f054b6 | 2018-10-25 15:21:34 -0700 | [diff] [blame] | 1891 | static const struct panel_desc innolux_p120zdg_bf1 = { |
| 1892 | .modes = &innolux_p120zdg_bf1_mode, |
spanda@codeaurora.org | da50bd4 | 2018-05-15 11:22:43 +0530 | [diff] [blame] | 1893 | .num_modes = 1, |
| 1894 | .bpc = 8, |
| 1895 | .size = { |
Douglas Anderson | 8f054b6 | 2018-10-25 15:21:34 -0700 | [diff] [blame] | 1896 | .width = 254, |
| 1897 | .height = 169, |
spanda@codeaurora.org | da50bd4 | 2018-05-15 11:22:43 +0530 | [diff] [blame] | 1898 | }, |
Sean Paul | 22fd99e | 2018-08-13 17:30:40 -0400 | [diff] [blame] | 1899 | .delay = { |
Douglas Anderson | 625d3b5 | 2018-10-25 15:21:31 -0700 | [diff] [blame] | 1900 | .hpd_absent_delay = 200, |
Sean Paul | 22fd99e | 2018-08-13 17:30:40 -0400 | [diff] [blame] | 1901 | .unprepare = 500, |
| 1902 | }, |
spanda@codeaurora.org | da50bd4 | 2018-05-15 11:22:43 +0530 | [diff] [blame] | 1903 | }; |
| 1904 | |
Michael Grzeschik | bccac3f | 2015-03-19 12:22:44 +0100 | [diff] [blame] | 1905 | static 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 | |
| 1918 | static const struct panel_desc innolux_zj070na_01p = { |
| 1919 | .modes = &innolux_zj070na_01p_mode, |
| 1920 | .num_modes = 1, |
| 1921 | .bpc = 6, |
| 1922 | .size = { |
Thierry Reding | 8159884 | 2016-06-10 15:33:13 +0200 | [diff] [blame] | 1923 | .width = 154, |
| 1924 | .height = 90, |
Michael Grzeschik | bccac3f | 2015-03-19 12:22:44 +0100 | [diff] [blame] | 1925 | }, |
| 1926 | }; |
| 1927 | |
Lukasz Majewski | 14bf60c | 2019-05-15 18:06:12 +0200 | [diff] [blame] | 1928 | static 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 | |
| 1941 | static 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 Teki | 8cfe834 | 2018-02-04 23:19:28 +0530 | [diff] [blame] | 1951 | static 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 Agner | c9b6be7 | 2018-04-19 23:20:03 +0200 | [diff] [blame] | 1958 | .vfront_porch = { 6, 21, 33 }, |
| 1959 | .vback_porch = { 6, 21, 33 }, |
Jagan Teki | 8cfe834 | 2018-02-04 23:19:28 +0530 | [diff] [blame] | 1960 | .vsync_len = { 8, 8, 8 }, |
| 1961 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 1962 | }; |
| 1963 | |
| 1964 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1973 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Jagan Teki | 8cfe834 | 2018-02-04 23:19:28 +0530 | [diff] [blame] | 1974 | }; |
| 1975 | |
Lucas Stach | 8def22e | 2015-12-02 19:41:11 +0100 | [diff] [blame] | 1976 | static 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 | |
| 1989 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1998 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | 8def22e | 2015-12-02 19:41:11 +0100 | [diff] [blame] | 1999 | }; |
| 2000 | |
Paul Kocialkowski | 27abdd8 | 2018-11-07 19:18:41 +0100 | [diff] [blame] | 2001 | static 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 | |
| 2014 | static 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 Schocher | dd01500 | 2015-05-22 10:25:57 +0200 | [diff] [blame] | 2025 | static 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 | |
| 2038 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2047 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Heiko Schocher | dd01500 | 2015-05-22 10:25:57 +0200 | [diff] [blame] | 2048 | }; |
| 2049 | |
Yakir Yang | c5ece40 | 2016-06-28 12:51:15 +0800 | [diff] [blame] | 2050 | static 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 | |
| 2064 | static 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 Yang | 0355dde | 2016-06-12 10:56:02 +0800 | [diff] [blame] | 2073 | static 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 | |
| 2086 | static 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 Shi | 690d8fa | 2016-02-22 19:01:44 +0800 | [diff] [blame] | 2095 | static 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 | |
| 2108 | static 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 Reding | ec7c565 | 2013-11-15 15:59:32 +0100 | [diff] [blame] | 2118 | static 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 | |
| 2131 | static const struct panel_desc lg_lp129qe = { |
| 2132 | .modes = &lg_lp129qe_mode, |
| 2133 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 2134 | .bpc = 8, |
Thierry Reding | ec7c565 | 2013-11-15 15:59:32 +0100 | [diff] [blame] | 2135 | .size = { |
| 2136 | .width = 272, |
| 2137 | .height = 181, |
| 2138 | }, |
| 2139 | }; |
| 2140 | |
Marcel Ziswiler | 5728fe7 | 2020-01-20 09:01:00 +0100 | [diff] [blame] | 2141 | static 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 | |
| 2156 | static 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 | |
| 2170 | static 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 | |
| 2185 | static 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 Majewski | 65c766c | 2017-10-21 00:18:37 +0200 | [diff] [blame] | 2199 | static 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 Ford | 0d35408 | 2019-10-16 08:51:45 -0500 | [diff] [blame] | 2213 | static 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 | |
| 2228 | static 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 Majewski | 65c766c | 2017-10-21 00:18:37 +0200 | [diff] [blame] | 2247 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2262 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lukasz Majewski | 65c766c | 2017-10-21 00:18:37 +0200 | [diff] [blame] | 2263 | .bus_flags = DRM_BUS_FLAG_DE_HIGH, |
| 2264 | }; |
| 2265 | |
Lucas Stach | 01bacc13 | 2017-06-08 20:07:55 +0200 | [diff] [blame] | 2266 | static 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 | |
| 2278 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2291 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | 01bacc13 | 2017-06-08 20:07:55 +0200 | [diff] [blame] | 2292 | }; |
| 2293 | |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 2294 | static 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 Agner | 4bc390c | 2015-11-17 19:10:29 -0800 | [diff] [blame] | 2305 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 2306 | }; |
| 2307 | |
| 2308 | static 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 Agner | 2c80661 | 2016-02-08 12:50:13 -0800 | [diff] [blame] | 2316 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Laurent Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 2317 | .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 2318 | }; |
| 2319 | |
Maxime Ripard | e6c2f06 | 2016-09-06 16:46:17 +0200 | [diff] [blame] | 2320 | static 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 | |
| 2333 | static 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 Valkeinen | 3b39ad7 | 2018-06-18 16:22:40 +0300 | [diff] [blame] | 2343 | static 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 | |
| 2357 | static 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 Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 2366 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE | |
| 2367 | DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE, |
Tomi Valkeinen | 3b39ad7 | 2018-06-18 16:22:40 +0300 | [diff] [blame] | 2368 | }; |
| 2369 | |
Lucas Stach | 4177fa6 | 2017-06-08 20:07:57 +0200 | [diff] [blame] | 2370 | static 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 | |
| 2382 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2394 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | 4177fa6 | 2017-06-08 20:07:57 +0200 | [diff] [blame] | 2395 | }; |
| 2396 | |
Fabien Lahoudere | 05ec0e4 | 2016-10-17 11:38:01 +0200 | [diff] [blame] | 2397 | static 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 | |
| 2409 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2418 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Fabien Lahoudere | 05ec0e4 | 2016-10-17 11:38:01 +0200 | [diff] [blame] | 2419 | }; |
| 2420 | |
Gary Bisson | a99fb62 | 2015-06-10 18:44:23 +0200 | [diff] [blame] | 2421 | static 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 | |
| 2434 | static 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 Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 2451 | static 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 | |
| 2464 | static const struct panel_desc olimex_lcd_olinuxino_43ts = { |
| 2465 | .modes = &olimex_lcd_olinuxino_43ts_mode, |
| 2466 | .num_modes = 1, |
| 2467 | .size = { |
Jonathan Liu | 30c6d7ab9 | 2017-07-20 20:29:43 +1000 | [diff] [blame] | 2468 | .width = 95, |
| 2469 | .height = 54, |
Maxime Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 2470 | }, |
Jonathan Liu | 5c2a7c6 | 2016-09-11 20:46:55 +1000 | [diff] [blame] | 2471 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Maxime Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 2472 | }; |
| 2473 | |
Eric Anholt | e8b6f56 | 2016-03-24 17:23:48 -0700 | [diff] [blame] | 2474 | /* |
| 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 | */ |
| 2479 | static 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 | */ |
| 2497 | static 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 Anholt | 5651e5e | 2018-03-09 15:33:32 -0800 | [diff] [blame] | 2505 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
Eric Anholt | e8b6f56 | 2016-03-24 17:23:48 -0700 | [diff] [blame] | 2506 | }; |
| 2507 | |
H. Nikolaus Schaller | 9c31dcb | 2019-06-07 13:11:08 +0200 | [diff] [blame] | 2508 | static 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 | |
| 2522 | static 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 Zabel | 725c9d4 | 2015-02-11 18:50:11 +0100 | [diff] [blame] | 2535 | static 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 | |
| 2548 | static 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 Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 2557 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, |
Philipp Zabel | 725c9d4 | 2015-02-11 18:50:11 +0100 | [diff] [blame] | 2558 | }; |
| 2559 | |
Laurent Pinchart | 163f7a3 | 2018-12-07 22:13:44 +0200 | [diff] [blame] | 2560 | static 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 | |
| 2574 | static 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 Pinchart | a793f0e | 2019-09-04 16:37:23 +0300 | [diff] [blame] | 2584 | .connector_type = DRM_MODE_CONNECTOR_DPI, |
Laurent Pinchart | 163f7a3 | 2018-12-07 22:13:44 +0200 | [diff] [blame] | 2585 | }; |
| 2586 | |
Eugen Hristev | 4ba3e56 | 2019-01-14 09:43:31 +0000 | [diff] [blame] | 2587 | static 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 | |
| 2600 | static 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 Wu | d2a6f0f | 2015-10-08 17:42:41 +0200 | [diff] [blame] | 2611 | static 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 | |
| 2624 | static 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 Teki | 23167fa | 2018-06-07 19:16:48 +0530 | [diff] [blame] | 2635 | static 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 | |
| 2648 | static 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 Sarha | f305047 | 2020-02-11 14:17:18 +0200 | [diff] [blame^] | 2665 | static 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 | |
| 2678 | static 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 Yang | 0330eaf | 2016-06-12 10:56:13 +0800 | [diff] [blame] | 2694 | static 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 | |
| 2707 | static 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 Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 2716 | static 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 | |
| 2729 | static const struct panel_desc samsung_ltn101nt05 = { |
| 2730 | .modes = &samsung_ltn101nt05_mode, |
| 2731 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 2732 | .bpc = 6, |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 2733 | .size = { |
Thierry Reding | 8159884 | 2016-06-10 15:33:13 +0200 | [diff] [blame] | 2734 | .width = 223, |
| 2735 | .height = 125, |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 2736 | }, |
| 2737 | }; |
| 2738 | |
Stéphane Marchesin | 0c93430 | 2015-03-18 10:52:18 +0100 | [diff] [blame] | 2739 | static 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 | |
| 2752 | static 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 Raynal | 44c58c5 | 2020-01-09 19:40:37 +0100 | [diff] [blame] | 2762 | static 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 | |
| 2774 | static 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 Hugo | cd5e1cb | 2019-07-08 09:58:11 -0700 | [diff] [blame] | 2786 | static 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 | |
| 2800 | static 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 Schaller | dda0e4b | 2019-06-07 13:11:07 +0200 | [diff] [blame] | 2812 | static 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 | |
| 2826 | static 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 Zapolskiy | 03e3ec9 | 2018-07-06 21:51:01 +0300 | [diff] [blame] | 2839 | static 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 | |
| 2852 | static 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 Clayton | 592aa02 | 2016-07-06 15:59:16 -0700 | [diff] [blame] | 2863 | static 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 | |
| 2876 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2885 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Joshua Clayton | 592aa02 | 2016-07-06 15:59:16 -0700 | [diff] [blame] | 2886 | }; |
| 2887 | |
Sean Paul | 9f7bae2 | 2018-02-08 12:48:52 -0500 | [diff] [blame] | 2888 | static 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 Yang | 739c7de | 2016-06-12 10:56:35 +0800 | [diff] [blame] | 2899 | }; |
| 2900 | |
| 2901 | static const struct panel_desc sharp_lq123p1jx31 = { |
Sean Paul | 9f7bae2 | 2018-02-08 12:48:52 -0500 | [diff] [blame] | 2902 | .timings = &sharp_lq123p1jx31_timing, |
| 2903 | .num_timings = 1, |
zain wang | 5466a63 | 2016-11-19 10:27:16 +0800 | [diff] [blame] | 2904 | .bpc = 8, |
Yakir Yang | 739c7de | 2016-06-12 10:56:35 +0800 | [diff] [blame] | 2905 | .size = { |
| 2906 | .width = 259, |
| 2907 | .height = 173, |
| 2908 | }, |
Yakir Yang | a42f6e3 | 2016-07-21 21:14:34 +0800 | [diff] [blame] | 2909 | .delay = { |
| 2910 | .prepare = 110, |
| 2911 | .enable = 50, |
| 2912 | .unprepare = 550, |
| 2913 | }, |
Yakir Yang | 739c7de | 2016-06-12 10:56:35 +0800 | [diff] [blame] | 2914 | }; |
| 2915 | |
Gustaf Lindström | 0f9cdd7 | 2016-10-04 17:29:21 +0200 | [diff] [blame] | 2916 | static 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 | |
| 2929 | static 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 Cercueil | f1bd37f | 2019-06-03 17:31:20 +0200 | [diff] [blame] | 2940 | static 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 | |
| 2953 | static 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 BREZILLON | 9c6615b | 2015-03-19 14:43:00 +0100 | [diff] [blame] | 2967 | static 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 | |
| 2980 | static 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 Anderson | 9bb34c4 | 2016-06-10 10:02:07 -0700 | [diff] [blame] | 2990 | static 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 | |
| 3004 | static 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 Norris | c46b924 | 2016-08-26 14:32:14 -0700 | [diff] [blame] | 3011 | .delay = { |
| 3012 | .prepare = 10 + 200, |
| 3013 | .enable = 50, |
| 3014 | .unprepare = 10 + 500, |
| 3015 | }, |
Douglas Anderson | 9bb34c4 | 2016-06-10 10:02:07 -0700 | [diff] [blame] | 3016 | }; |
| 3017 | |
Jyri Sarha | 4216153 | 2019-03-22 10:33:36 +0200 | [diff] [blame] | 3018 | static 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 | |
| 3031 | static 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 Bisson | adb973e | 2016-12-02 09:52:08 +0100 | [diff] [blame] | 3043 | static 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 | |
| 3056 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 3065 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Gary Bisson | adb973e | 2016-12-02 09:52:08 +0100 | [diff] [blame] | 3066 | }; |
| 3067 | |
Lukasz Majewski | 870a0b1 | 2017-11-07 16:30:58 +0100 | [diff] [blame] | 3068 | static 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 | |
| 3081 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 3090 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lukasz Majewski | 870a0b1 | 2017-11-07 16:30:58 +0100 | [diff] [blame] | 3091 | }; |
| 3092 | |
Linus Walleij | d8a0d6a | 2019-08-05 10:58:46 +0200 | [diff] [blame] | 3093 | static 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 | |
| 3109 | static 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 | |
| 3121 | static 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 | |
| 3137 | static 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 Stach | 06e733e | 2017-10-18 19:22:40 +0200 | [diff] [blame] | 3151 | static 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 | |
| 3164 | static 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 Brezillon | 9781bd1 | 2020-01-28 14:55:13 +0100 | [diff] [blame] | 3171 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, |
Laurent Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 3172 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 3173 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | 06e733e | 2017-10-18 19:22:40 +0200 | [diff] [blame] | 3174 | }; |
| 3175 | |
Bhuvanchandra DV | 227e4f4 | 2016-05-05 11:47:07 +0530 | [diff] [blame] | 3176 | static 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 | |
| 3189 | static 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 Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 3196 | .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, |
Bhuvanchandra DV | 227e4f4 | 2016-05-05 11:47:07 +0530 | [diff] [blame] | 3197 | }; |
| 3198 | |
| 3199 | static 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 | |
| 3212 | static 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. Szmigiero | 06a9dc6 | 2016-02-13 22:52:03 +0100 | [diff] [blame] | 3221 | static 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 | |
| 3235 | static 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 Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 3244 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Maciej S. Szmigiero | 06a9dc6 | 2016-02-13 22:52:03 +0100 | [diff] [blame] | 3245 | }; |
| 3246 | |
| 3247 | static 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 Estevam | 0420618 | 2019-02-18 21:27:06 -0300 | [diff] [blame] | 3258 | static 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 | |
| 3272 | static 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 Genoud | e4bac40 | 2017-03-27 12:33:23 +0200 | [diff] [blame] | 3284 | static 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 | |
| 3298 | static 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 Walleij | fcec416 | 2018-10-26 13:13:34 +0200 | [diff] [blame] | 3309 | static 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 | |
| 3325 | static 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 Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 3336 | static const struct of_device_id platform_of_match[] = { |
| 3337 | { |
Yannick Fertre | 966fea7 | 2017-03-28 11:44:49 +0200 | [diff] [blame] | 3338 | .compatible = "ampire,am-480272h3tmqw-t01h", |
| 3339 | .data = &ire_am_480272h3tmqw_t01h, |
| 3340 | }, { |
Philipp Zabel | 1c550fa1 | 2015-02-11 18:50:09 +0100 | [diff] [blame] | 3341 | .compatible = "ampire,am800480r3tmqwa1h", |
| 3342 | .data = &ire_am800480r3tmqwa1h, |
| 3343 | }, { |
Linus Walleij | fcec416 | 2018-10-26 13:13:34 +0200 | [diff] [blame] | 3344 | .compatible = "arm,rtsm-display", |
| 3345 | .data = &arm_rtsm, |
| 3346 | }, { |
Sébastien Szymanski | c479450f | 2019-05-07 17:27:12 +0200 | [diff] [blame] | 3347 | .compatible = "armadeus,st0700-adapt", |
| 3348 | .data = &armadeus_st0700_adapt, |
| 3349 | }, { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 3350 | .compatible = "auo,b101aw03", |
| 3351 | .data = &auo_b101aw03, |
| 3352 | }, { |
Huang Lin | a531bc3 | 2015-02-28 10:18:58 +0800 | [diff] [blame] | 3353 | .compatible = "auo,b101ean01", |
| 3354 | .data = &auo_b101ean01, |
| 3355 | }, { |
Rob Clark | dac746e | 2014-08-01 17:01:06 -0400 | [diff] [blame] | 3356 | .compatible = "auo,b101xtn01", |
| 3357 | .data = &auo_b101xtn01, |
| 3358 | }, { |
Rob Clark | da458286 | 2020-01-08 15:53:56 -0800 | [diff] [blame] | 3359 | .compatible = "auo,b116xa01", |
| 3360 | .data = &auo_b116xak01, |
| 3361 | }, { |
Ajay Kumar | e35e305 | 2014-09-01 15:40:02 +0530 | [diff] [blame] | 3362 | .compatible = "auo,b116xw03", |
| 3363 | .data = &auo_b116xw03, |
| 3364 | }, { |
Ajay Kumar | 3e51d60 | 2014-07-31 23:12:12 +0530 | [diff] [blame] | 3365 | .compatible = "auo,b133htn01", |
| 3366 | .data = &auo_b133htn01, |
| 3367 | }, { |
Stéphane Marchesin | a333f7a | 2014-05-23 19:27:59 -0700 | [diff] [blame] | 3368 | .compatible = "auo,b133xtn01", |
| 3369 | .data = &auo_b133xtn01, |
| 3370 | }, { |
Lukasz Majewski | bccfaff | 2018-05-14 21:08:49 +0200 | [diff] [blame] | 3371 | .compatible = "auo,g070vvn01", |
| 3372 | .data = &auo_g070vvn01, |
| 3373 | }, { |
Alex Gonzalez | 4fb8640 | 2018-10-25 17:09:30 +0200 | [diff] [blame] | 3374 | .compatible = "auo,g101evn010", |
| 3375 | .data = &auo_g101evn010, |
| 3376 | }, { |
Christoph Fritz | 4451c28 | 2017-12-16 14:13:36 +0100 | [diff] [blame] | 3377 | .compatible = "auo,g104sn02", |
| 3378 | .data = &auo_g104sn02, |
| 3379 | }, { |
Lucas Stach | 697035c | 2016-11-30 14:09:55 +0100 | [diff] [blame] | 3380 | .compatible = "auo,g133han01", |
| 3381 | .data = &auo_g133han01, |
| 3382 | }, { |
Lucas Stach | 8c31f60 | 2016-11-30 14:09:56 +0100 | [diff] [blame] | 3383 | .compatible = "auo,g185han01", |
| 3384 | .data = &auo_g185han01, |
| 3385 | }, { |
Lucas Stach | 70c0d5b | 2017-06-08 20:07:58 +0200 | [diff] [blame] | 3386 | .compatible = "auo,p320hvn03", |
| 3387 | .data = &auo_p320hvn03, |
| 3388 | }, { |
Haixia Shi | 7ee933a | 2016-10-11 14:59:16 -0700 | [diff] [blame] | 3389 | .compatible = "auo,t215hvn01", |
| 3390 | .data = &auo_t215hvn01, |
| 3391 | }, { |
Philipp Zabel | d47df63 | 2014-12-18 16:43:43 +0100 | [diff] [blame] | 3392 | .compatible = "avic,tm070ddh03", |
| 3393 | .data = &avic_tm070ddh03, |
| 3394 | }, { |
Chen-Yu Tsai | 7ad8b41 | 2018-09-07 12:19:46 +0800 | [diff] [blame] | 3395 | .compatible = "bananapi,s070wv20-ct16", |
| 3396 | .data = &bananapi_s070wv20_ct16, |
| 3397 | }, { |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 3398 | .compatible = "boe,hv070wsa-100", |
| 3399 | .data = &boe_hv070wsa |
| 3400 | }, { |
Caesar Wang | cac1a41 | 2016-12-14 11:19:56 +0800 | [diff] [blame] | 3401 | .compatible = "boe,nv101wxmn51", |
| 3402 | .data = &boe_nv101wxmn51, |
| 3403 | }, { |
Tobias Schramm | a511981 | 2020-01-09 12:29:52 +0100 | [diff] [blame] | 3404 | .compatible = "boe,nv140fhmn49", |
| 3405 | .data = &boe_nv140fhmn49, |
| 3406 | }, { |
Giulio Benetti | e58edce | 2018-07-31 01:11:16 +0200 | [diff] [blame] | 3407 | .compatible = "cdtech,s043wq26h-ct7", |
| 3408 | .data = &cdtech_s043wq26h_ct7, |
| 3409 | }, { |
Giulio Benetti | 982f944 | 2018-07-31 01:11:14 +0200 | [diff] [blame] | 3410 | .compatible = "cdtech,s070wv95-ct16", |
| 3411 | .data = &cdtech_s070wv95_ct16, |
| 3412 | }, { |
Randy Li | 2cb35c8 | 2016-09-20 03:02:51 +0800 | [diff] [blame] | 3413 | .compatible = "chunghwa,claa070wp03xg", |
| 3414 | .data = &chunghwa_claa070wp03xg, |
| 3415 | }, { |
Stephen Warren | 4c93075 | 2014-01-07 16:46:26 -0700 | [diff] [blame] | 3416 | .compatible = "chunghwa,claa101wa01a", |
| 3417 | .data = &chunghwa_claa101wa01a |
| 3418 | }, { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 3419 | .compatible = "chunghwa,claa101wb01", |
| 3420 | .data = &chunghwa_claa101wb01 |
| 3421 | }, { |
Michal Vokáč | 97ceb1f | 2018-06-25 14:41:30 +0200 | [diff] [blame] | 3422 | .compatible = "dataimage,scf0700c48ggu18", |
| 3423 | .data = &dataimage_scf0700c48ggu18, |
| 3424 | }, { |
Philipp Zabel | 0ca0c82 | 2018-05-23 11:25:04 +0200 | [diff] [blame] | 3425 | .compatible = "dlc,dlc0700yzg-1", |
| 3426 | .data = &dlc_dlc0700yzg_1, |
| 3427 | }, { |
Marco Felsch | 6cbe7cd | 2018-09-24 17:26:10 +0200 | [diff] [blame] | 3428 | .compatible = "dlc,dlc1010gig", |
| 3429 | .data = &dlc_dlc1010gig, |
| 3430 | }, { |
Andreas Pretzsch | c2d24af | 2019-04-16 12:16:30 +0200 | [diff] [blame] | 3431 | .compatible = "edt,et035012dm6", |
| 3432 | .data = &edt_et035012dm6, |
| 3433 | }, { |
Marian-Cristian Rotariu | 82d57a5 | 2020-01-30 12:08:38 +0000 | [diff] [blame] | 3434 | .compatible = "edt,etm043080dh6gp", |
| 3435 | .data = &edt_etm043080dh6gp, |
| 3436 | }, { |
Marek Vasut | fd819bf | 2019-02-19 15:04:38 +0100 | [diff] [blame] | 3437 | .compatible = "edt,etm0430g0dh6", |
| 3438 | .data = &edt_etm0430g0dh6, |
| 3439 | }, { |
Stefan Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 3440 | .compatible = "edt,et057090dhu", |
| 3441 | .data = &edt_et057090dhu, |
| 3442 | }, { |
Philipp Zabel | fff5de4 | 2014-05-15 12:25:47 +0200 | [diff] [blame] | 3443 | .compatible = "edt,et070080dh6", |
| 3444 | .data = &edt_etm0700g0dh6, |
| 3445 | }, { |
| 3446 | .compatible = "edt,etm0700g0dh6", |
| 3447 | .data = &edt_etm0700g0dh6, |
| 3448 | }, { |
Jan Tuerk | aa7e645 | 2018-06-19 11:55:44 +0200 | [diff] [blame] | 3449 | .compatible = "edt,etm0700g0bdh6", |
| 3450 | .data = &edt_etm0700g0bdh6, |
| 3451 | }, { |
Jan Tuerk | aad34de | 2018-06-19 11:55:45 +0200 | [diff] [blame] | 3452 | .compatible = "edt,etm0700g0edh6", |
| 3453 | .data = &edt_etm0700g0bdh6, |
| 3454 | }, { |
Marco Felsch | 9158e3c | 2019-04-16 12:06:45 +0200 | [diff] [blame] | 3455 | .compatible = "evervision,vgg804821", |
| 3456 | .data = &evervision_vgg804821, |
| 3457 | }, { |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 3458 | .compatible = "foxlink,fl500wvr00-a0t", |
| 3459 | .data = &foxlink_fl500wvr00_a0t, |
| 3460 | }, { |
Paul Cercueil | 7b6bd84 | 2020-01-13 13:17:41 -0300 | [diff] [blame] | 3461 | .compatible = "frida,frd350h54004", |
| 3462 | .data = &frida_frd350h54004, |
| 3463 | }, { |
Jagan Teki | 3be2071 | 2019-05-07 18:37:07 +0530 | [diff] [blame] | 3464 | .compatible = "friendlyarm,hd702e", |
| 3465 | .data = &friendlyarm_hd702e, |
| 3466 | }, { |
Philipp Zabel | d435a2a | 2014-11-19 10:29:55 +0100 | [diff] [blame] | 3467 | .compatible = "giantplus,gpg482739qs5", |
| 3468 | .data = &giantplus_gpg482739qs5 |
| 3469 | }, { |
Paul Cercueil | 2c6574a | 2019-06-06 00:22:47 +0200 | [diff] [blame] | 3470 | .compatible = "giantplus,gpm940b0", |
| 3471 | .data = &giantplus_gpm940b0, |
| 3472 | }, { |
Philipp Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 3473 | .compatible = "hannstar,hsd070pww1", |
| 3474 | .data = &hannstar_hsd070pww1, |
| 3475 | }, { |
Eric Nelson | c0d607e | 2015-04-13 15:09:26 -0700 | [diff] [blame] | 3476 | .compatible = "hannstar,hsd100pxn1", |
| 3477 | .data = &hannstar_hsd100pxn1, |
| 3478 | }, { |
Lucas Stach | 61ac0bf | 2014-11-06 17:44:35 +0100 | [diff] [blame] | 3479 | .compatible = "hit,tx23d38vm0caa", |
| 3480 | .data = &hitachi_tx23d38vm0caa |
| 3481 | }, { |
Nicolas Ferre | 41bcceb | 2015-03-19 14:43:01 +0100 | [diff] [blame] | 3482 | .compatible = "innolux,at043tn24", |
| 3483 | .data = &innolux_at043tn24, |
| 3484 | }, { |
Riccardo Bortolato | 4fc24ab | 2016-04-20 15:37:15 +0200 | [diff] [blame] | 3485 | .compatible = "innolux,at070tn92", |
| 3486 | .data = &innolux_at070tn92, |
| 3487 | }, { |
Christoph Fritz | a5d2ade | 2018-06-04 13:16:48 +0200 | [diff] [blame] | 3488 | .compatible = "innolux,g070y2-l01", |
| 3489 | .data = &innolux_g070y2_l01, |
| 3490 | }, { |
| 3491 | .compatible = "innolux,g101ice-l01", |
Michael Olbrich | 1e29b84 | 2016-08-15 14:32:02 +0200 | [diff] [blame] | 3492 | .data = &innolux_g101ice_l01 |
| 3493 | }, { |
Christoph Fritz | a5d2ade | 2018-06-04 13:16:48 +0200 | [diff] [blame] | 3494 | .compatible = "innolux,g121i1-l01", |
Lucas Stach | d731f66 | 2014-11-06 17:44:33 +0100 | [diff] [blame] | 3495 | .data = &innolux_g121i1_l01 |
| 3496 | }, { |
Akshay Bhat | f8fa17b | 2015-11-18 15:57:47 -0500 | [diff] [blame] | 3497 | .compatible = "innolux,g121x1-l03", |
| 3498 | .data = &innolux_g121x1_l03, |
| 3499 | }, { |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 3500 | .compatible = "innolux,n116bge", |
| 3501 | .data = &innolux_n116bge, |
| 3502 | }, { |
Alban Bedel | ea44739 | 2014-07-22 08:38:55 +0200 | [diff] [blame] | 3503 | .compatible = "innolux,n156bge-l21", |
| 3504 | .data = &innolux_n156bge_l21, |
| 3505 | }, { |
Douglas Anderson | 8f054b6 | 2018-10-25 15:21:34 -0700 | [diff] [blame] | 3506 | .compatible = "innolux,p120zdg-bf1", |
| 3507 | .data = &innolux_p120zdg_bf1, |
spanda@codeaurora.org | da50bd4 | 2018-05-15 11:22:43 +0530 | [diff] [blame] | 3508 | }, { |
Michael Grzeschik | bccac3f | 2015-03-19 12:22:44 +0100 | [diff] [blame] | 3509 | .compatible = "innolux,zj070na-01p", |
| 3510 | .data = &innolux_zj070na_01p, |
| 3511 | }, { |
Lukasz Majewski | 14bf60c | 2019-05-15 18:06:12 +0200 | [diff] [blame] | 3512 | .compatible = "koe,tx14d24vm1bpa", |
| 3513 | .data = &koe_tx14d24vm1bpa, |
| 3514 | }, { |
Jagan Teki | 8cfe834 | 2018-02-04 23:19:28 +0530 | [diff] [blame] | 3515 | .compatible = "koe,tx31d200vm0baa", |
| 3516 | .data = &koe_tx31d200vm0baa, |
| 3517 | }, { |
Lucas Stach | 8def22e | 2015-12-02 19:41:11 +0100 | [diff] [blame] | 3518 | .compatible = "kyo,tcg121xglp", |
| 3519 | .data = &kyo_tcg121xglp, |
| 3520 | }, { |
Paul Kocialkowski | 27abdd8 | 2018-11-07 19:18:41 +0100 | [diff] [blame] | 3521 | .compatible = "lemaker,bl035-rgb-002", |
| 3522 | .data = &lemaker_bl035_rgb_002, |
| 3523 | }, { |
Heiko Schocher | dd01500 | 2015-05-22 10:25:57 +0200 | [diff] [blame] | 3524 | .compatible = "lg,lb070wv8", |
| 3525 | .data = &lg_lb070wv8, |
| 3526 | }, { |
Yakir Yang | c5ece40 | 2016-06-28 12:51:15 +0800 | [diff] [blame] | 3527 | .compatible = "lg,lp079qx1-sp0v", |
| 3528 | .data = &lg_lp079qx1_sp0v, |
| 3529 | }, { |
Yakir Yang | 0355dde | 2016-06-12 10:56:02 +0800 | [diff] [blame] | 3530 | .compatible = "lg,lp097qx1-spa1", |
| 3531 | .data = &lg_lp097qx1_spa1, |
| 3532 | }, { |
Jitao Shi | 690d8fa | 2016-02-22 19:01:44 +0800 | [diff] [blame] | 3533 | .compatible = "lg,lp120up1", |
| 3534 | .data = &lg_lp120up1, |
| 3535 | }, { |
Thierry Reding | ec7c565 | 2013-11-15 15:59:32 +0100 | [diff] [blame] | 3536 | .compatible = "lg,lp129qe", |
| 3537 | .data = &lg_lp129qe, |
| 3538 | }, { |
Adam Ford | 0d35408 | 2019-10-16 08:51:45 -0500 | [diff] [blame] | 3539 | .compatible = "logicpd,type28", |
| 3540 | .data = &logicpd_type_28, |
| 3541 | }, { |
Marcel Ziswiler | 5728fe7 | 2020-01-20 09:01:00 +0100 | [diff] [blame] | 3542 | .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 Majewski | 65c766c | 2017-10-21 00:18:37 +0200 | [diff] [blame] | 3551 | .compatible = "mitsubishi,aa070mc01-ca1", |
| 3552 | .data = &mitsubishi_aa070mc01, |
| 3553 | }, { |
Lucas Stach | 01bacc13 | 2017-06-08 20:07:55 +0200 | [diff] [blame] | 3554 | .compatible = "nec,nl12880bc20-05", |
| 3555 | .data = &nec_nl12880bc20_05, |
| 3556 | }, { |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 3557 | .compatible = "nec,nl4827hc19-05b", |
| 3558 | .data = &nec_nl4827hc19_05b, |
| 3559 | }, { |
Maxime Ripard | e6c2f06 | 2016-09-06 16:46:17 +0200 | [diff] [blame] | 3560 | .compatible = "netron-dy,e231732", |
| 3561 | .data = &netron_dy_e231732, |
| 3562 | }, { |
Tomi Valkeinen | 3b39ad7 | 2018-06-18 16:22:40 +0300 | [diff] [blame] | 3563 | .compatible = "newhaven,nhd-4.3-480272ef-atxl", |
| 3564 | .data = &newhaven_nhd_43_480272ef_atxl, |
| 3565 | }, { |
Lucas Stach | 4177fa6 | 2017-06-08 20:07:57 +0200 | [diff] [blame] | 3566 | .compatible = "nlt,nl192108ac18-02d", |
| 3567 | .data = &nlt_nl192108ac18_02d, |
| 3568 | }, { |
Fabien Lahoudere | 05ec0e4 | 2016-10-17 11:38:01 +0200 | [diff] [blame] | 3569 | .compatible = "nvd,9128", |
| 3570 | .data = &nvd_9128, |
| 3571 | }, { |
Gary Bisson | a99fb62 | 2015-06-10 18:44:23 +0200 | [diff] [blame] | 3572 | .compatible = "okaya,rs800480t-7x0gp", |
| 3573 | .data = &okaya_rs800480t_7x0gp, |
| 3574 | }, { |
Maxime Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 3575 | .compatible = "olimex,lcd-olinuxino-43-ts", |
| 3576 | .data = &olimex_lcd_olinuxino_43ts, |
| 3577 | }, { |
Eric Anholt | e8b6f56 | 2016-03-24 17:23:48 -0700 | [diff] [blame] | 3578 | .compatible = "ontat,yx700wv03", |
| 3579 | .data = &ontat_yx700wv03, |
| 3580 | }, { |
H. Nikolaus Schaller | 9c31dcb | 2019-06-07 13:11:08 +0200 | [diff] [blame] | 3581 | .compatible = "ortustech,com37h3m05dtc", |
| 3582 | .data = &ortustech_com37h3m, |
| 3583 | }, { |
| 3584 | .compatible = "ortustech,com37h3m99dtc", |
| 3585 | .data = &ortustech_com37h3m, |
| 3586 | }, { |
Philipp Zabel | 725c9d4 | 2015-02-11 18:50:11 +0100 | [diff] [blame] | 3587 | .compatible = "ortustech,com43h4m85ulc", |
| 3588 | .data = &ortustech_com43h4m85ulc, |
| 3589 | }, { |
Laurent Pinchart | 163f7a3 | 2018-12-07 22:13:44 +0200 | [diff] [blame] | 3590 | .compatible = "osddisplays,osd070t1718-19ts", |
| 3591 | .data = &osddisplays_osd070t1718_19ts, |
| 3592 | }, { |
Eugen Hristev | 4ba3e56 | 2019-01-14 09:43:31 +0000 | [diff] [blame] | 3593 | .compatible = "pda,91-00156-a0", |
| 3594 | .data = &pda_91_00156_a0, |
| 3595 | }, { |
Josh Wu | d2a6f0f | 2015-10-08 17:42:41 +0200 | [diff] [blame] | 3596 | .compatible = "qiaodian,qd43003c0-40", |
| 3597 | .data = &qd43003c0_40, |
| 3598 | }, { |
Jagan Teki | 23167fa | 2018-06-07 19:16:48 +0530 | [diff] [blame] | 3599 | .compatible = "rocktech,rk070er9427", |
| 3600 | .data = &rocktech_rk070er9427, |
| 3601 | }, { |
Jyri Sarha | f305047 | 2020-02-11 14:17:18 +0200 | [diff] [blame^] | 3602 | .compatible = "rocktech,rk101ii01d-ct", |
| 3603 | .data = &rocktech_rk101ii01d_ct, |
| 3604 | }, { |
Yakir Yang | 0330eaf | 2016-06-12 10:56:13 +0800 | [diff] [blame] | 3605 | .compatible = "samsung,lsn122dl01-c01", |
| 3606 | .data = &samsung_lsn122dl01_c01, |
| 3607 | }, { |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 3608 | .compatible = "samsung,ltn101nt05", |
| 3609 | .data = &samsung_ltn101nt05, |
| 3610 | }, { |
Stéphane Marchesin | 0c93430 | 2015-03-18 10:52:18 +0100 | [diff] [blame] | 3611 | .compatible = "samsung,ltn140at29-301", |
| 3612 | .data = &samsung_ltn140at29_301, |
| 3613 | }, { |
Miquel Raynal | 44c58c5 | 2020-01-09 19:40:37 +0100 | [diff] [blame] | 3614 | .compatible = "satoz,sat050at40h12r2", |
| 3615 | .data = &satoz_sat050at40h12r2, |
| 3616 | }, { |
Jeffrey Hugo | cd5e1cb | 2019-07-08 09:58:11 -0700 | [diff] [blame] | 3617 | .compatible = "sharp,ld-d5116z01b", |
| 3618 | .data = &sharp_ld_d5116z01b, |
| 3619 | }, { |
Vladimir Zapolskiy | 03e3ec9 | 2018-07-06 21:51:01 +0300 | [diff] [blame] | 3620 | .compatible = "sharp,lq035q7db03", |
| 3621 | .data = &sharp_lq035q7db03, |
| 3622 | }, { |
H. Nikolaus Schaller | dda0e4b | 2019-06-07 13:11:07 +0200 | [diff] [blame] | 3623 | .compatible = "sharp,lq070y3dg3b", |
| 3624 | .data = &sharp_lq070y3dg3b, |
| 3625 | }, { |
Joshua Clayton | 592aa02 | 2016-07-06 15:59:16 -0700 | [diff] [blame] | 3626 | .compatible = "sharp,lq101k1ly04", |
| 3627 | .data = &sharp_lq101k1ly04, |
| 3628 | }, { |
Yakir Yang | 739c7de | 2016-06-12 10:56:35 +0800 | [diff] [blame] | 3629 | .compatible = "sharp,lq123p1jx31", |
| 3630 | .data = &sharp_lq123p1jx31, |
| 3631 | }, { |
Gustaf Lindström | 0f9cdd7 | 2016-10-04 17:29:21 +0200 | [diff] [blame] | 3632 | .compatible = "sharp,lq150x1lg11", |
| 3633 | .data = &sharp_lq150x1lg11, |
| 3634 | }, { |
Paul Cercueil | f1bd37f | 2019-06-03 17:31:20 +0200 | [diff] [blame] | 3635 | .compatible = "sharp,ls020b1dd01d", |
| 3636 | .data = &sharp_ls020b1dd01d, |
| 3637 | }, { |
Boris BREZILLON | 9c6615b | 2015-03-19 14:43:00 +0100 | [diff] [blame] | 3638 | .compatible = "shelly,sca07010-bfn-lnn", |
| 3639 | .data = &shelly_sca07010_bfn_lnn, |
| 3640 | }, { |
Douglas Anderson | 9bb34c4 | 2016-06-10 10:02:07 -0700 | [diff] [blame] | 3641 | .compatible = "starry,kr122ea0sra", |
| 3642 | .data = &starry_kr122ea0sra, |
| 3643 | }, { |
Jyri Sarha | 4216153 | 2019-03-22 10:33:36 +0200 | [diff] [blame] | 3644 | .compatible = "tfc,s9700rtwv43tr-01b", |
| 3645 | .data = &tfc_s9700rtwv43tr_01b, |
| 3646 | }, { |
Gary Bisson | adb973e | 2016-12-02 09:52:08 +0100 | [diff] [blame] | 3647 | .compatible = "tianma,tm070jdhg30", |
| 3648 | .data = &tianma_tm070jdhg30, |
| 3649 | }, { |
Lukasz Majewski | 870a0b1 | 2017-11-07 16:30:58 +0100 | [diff] [blame] | 3650 | .compatible = "tianma,tm070rvhg71", |
| 3651 | .data = &tianma_tm070rvhg71, |
| 3652 | }, { |
Linus Walleij | d8a0d6a | 2019-08-05 10:58:46 +0200 | [diff] [blame] | 3653 | .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 Stach | 06e733e | 2017-10-18 19:22:40 +0200 | [diff] [blame] | 3659 | .compatible = "toshiba,lt089ac29000", |
| 3660 | .data = &toshiba_lt089ac29000, |
| 3661 | }, { |
Bhuvanchandra DV | 227e4f4 | 2016-05-05 11:47:07 +0530 | [diff] [blame] | 3662 | .compatible = "tpk,f07a-0102", |
| 3663 | .data = &tpk_f07a_0102, |
| 3664 | }, { |
| 3665 | .compatible = "tpk,f10a-0102", |
| 3666 | .data = &tpk_f10a_0102, |
| 3667 | }, { |
Maciej S. Szmigiero | 06a9dc6 | 2016-02-13 22:52:03 +0100 | [diff] [blame] | 3668 | .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 Estevam | 0420618 | 2019-02-18 21:27:06 -0300 | [diff] [blame] | 3686 | .compatible = "vxt,vl050-8048nt-c01", |
| 3687 | .data = &vl050_8048nt_c01, |
| 3688 | }, { |
Richard Genoud | e4bac40 | 2017-03-27 12:33:23 +0200 | [diff] [blame] | 3689 | .compatible = "winstar,wf35ltiacd", |
| 3690 | .data = &winstar_wf35ltiacd, |
| 3691 | }, { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 3692 | /* sentinel */ |
| 3693 | } |
| 3694 | }; |
| 3695 | MODULE_DEVICE_TABLE(of, platform_of_match); |
| 3696 | |
| 3697 | static 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 | |
| 3708 | static int panel_simple_platform_remove(struct platform_device *pdev) |
| 3709 | { |
| 3710 | return panel_simple_remove(&pdev->dev); |
| 3711 | } |
| 3712 | |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 3713 | static void panel_simple_platform_shutdown(struct platform_device *pdev) |
| 3714 | { |
| 3715 | panel_simple_shutdown(&pdev->dev); |
| 3716 | } |
| 3717 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 3718 | static struct platform_driver panel_simple_platform_driver = { |
| 3719 | .driver = { |
| 3720 | .name = "panel-simple", |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 3721 | .of_match_table = platform_of_match, |
| 3722 | }, |
| 3723 | .probe = panel_simple_platform_probe, |
| 3724 | .remove = panel_simple_platform_remove, |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 3725 | .shutdown = panel_simple_platform_shutdown, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 3726 | }; |
| 3727 | |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 3728 | struct panel_desc_dsi { |
| 3729 | struct panel_desc desc; |
| 3730 | |
Thierry Reding | 462658b | 2014-03-14 11:24:57 +0100 | [diff] [blame] | 3731 | unsigned long flags; |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 3732 | enum mipi_dsi_pixel_format format; |
| 3733 | unsigned int lanes; |
| 3734 | }; |
| 3735 | |
Thierry Reding | d718d79 | 2015-04-08 16:52:33 +0200 | [diff] [blame] | 3736 | static 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 | |
| 3749 | static 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 Zhong | c852196 | 2015-11-20 16:15:37 +0800 | [diff] [blame] | 3764 | static 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 | |
| 3778 | static 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 Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 3794 | static 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 | |
| 3807 | static const struct panel_desc_dsi lg_ld070wx3_sl01 = { |
| 3808 | .desc = { |
| 3809 | .modes = &lg_ld070wx3_sl01_mode, |
| 3810 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 3811 | .bpc = 8, |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 3812 | .size = { |
| 3813 | .width = 94, |
| 3814 | .height = 151, |
| 3815 | }, |
| 3816 | }, |
Alexandre Courbot | 5e4cc27 | 2014-07-08 21:32:12 +0900 | [diff] [blame] | 3817 | .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS, |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 3818 | .format = MIPI_DSI_FMT_RGB888, |
| 3819 | .lanes = 4, |
| 3820 | }; |
| 3821 | |
Alexandre Courbot | 499ce85 | 2014-01-21 18:57:09 +0900 | [diff] [blame] | 3822 | static 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 | |
| 3835 | static const struct panel_desc_dsi lg_lh500wx1_sd03 = { |
| 3836 | .desc = { |
| 3837 | .modes = &lg_lh500wx1_sd03_mode, |
| 3838 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 3839 | .bpc = 8, |
Alexandre Courbot | 499ce85 | 2014-01-21 18:57:09 +0900 | [diff] [blame] | 3840 | .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 Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 3850 | static 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 Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 3863 | static const struct panel_desc_dsi panasonic_vvx10f004b00 = { |
| 3864 | .desc = { |
| 3865 | .modes = &panasonic_vvx10f004b00_mode, |
| 3866 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 3867 | .bpc = 8, |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 3868 | .size = { |
| 3869 | .width = 217, |
| 3870 | .height = 136, |
| 3871 | }, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 3872 | }, |
Alexandre Courbot | 5e4cc27 | 2014-07-08 21:32:12 +0900 | [diff] [blame] | 3873 | .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | |
| 3874 | MIPI_DSI_CLOCK_NON_CONTINUOUS, |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 3875 | .format = MIPI_DSI_FMT_RGB888, |
| 3876 | .lanes = 4, |
| 3877 | }; |
| 3878 | |
Jonathan Marek | debcd8f | 2018-11-24 15:06:28 -0500 | [diff] [blame] | 3879 | static 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 | |
| 3892 | static 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 Ujfalusi | 6296723 | 2019-02-26 09:55:21 +0200 | [diff] [blame] | 3907 | static 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 | |
| 3921 | static 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 Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 3938 | static const struct of_device_id dsi_of_match[] = { |
| 3939 | { |
Thierry Reding | d718d79 | 2015-04-08 16:52:33 +0200 | [diff] [blame] | 3940 | .compatible = "auo,b080uan01", |
| 3941 | .data = &auo_b080uan01 |
| 3942 | }, { |
Chris Zhong | c852196 | 2015-11-20 16:15:37 +0800 | [diff] [blame] | 3943 | .compatible = "boe,tv080wum-nl0", |
| 3944 | .data = &boe_tv080wum_nl0 |
| 3945 | }, { |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 3946 | .compatible = "lg,ld070wx3-sl01", |
| 3947 | .data = &lg_ld070wx3_sl01 |
| 3948 | }, { |
Alexandre Courbot | 499ce85 | 2014-01-21 18:57:09 +0900 | [diff] [blame] | 3949 | .compatible = "lg,lh500wx1-sd03", |
| 3950 | .data = &lg_lh500wx1_sd03 |
| 3951 | }, { |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 3952 | .compatible = "panasonic,vvx10f004b00", |
| 3953 | .data = &panasonic_vvx10f004b00 |
| 3954 | }, { |
Jonathan Marek | debcd8f | 2018-11-24 15:06:28 -0500 | [diff] [blame] | 3955 | .compatible = "lg,acx467akm-7", |
| 3956 | .data = &lg_acx467akm_7 |
| 3957 | }, { |
Peter Ujfalusi | 6296723 | 2019-02-26 09:55:21 +0200 | [diff] [blame] | 3958 | .compatible = "osddisplays,osd101t2045-53ts", |
| 3959 | .data = &osd101t2045_53ts |
| 3960 | }, { |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 3961 | /* sentinel */ |
| 3962 | } |
| 3963 | }; |
| 3964 | MODULE_DEVICE_TABLE(of, dsi_of_match); |
| 3965 | |
| 3966 | static 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 Reding | 462658b | 2014-03-14 11:24:57 +0100 | [diff] [blame] | 3982 | dsi->mode_flags = desc->flags; |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 3983 | dsi->format = desc->format; |
| 3984 | dsi->lanes = desc->lanes; |
| 3985 | |
Peter Ujfalusi | 7ad9db6 | 2019-02-26 10:11:53 +0200 | [diff] [blame] | 3986 | 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 Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 3994 | } |
| 3995 | |
| 3996 | static 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 Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 4007 | static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi) |
| 4008 | { |
| 4009 | panel_simple_shutdown(&dsi->dev); |
| 4010 | } |
| 4011 | |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4012 | static struct mipi_dsi_driver panel_simple_dsi_driver = { |
| 4013 | .driver = { |
| 4014 | .name = "panel-simple-dsi", |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4015 | .of_match_table = dsi_of_match, |
| 4016 | }, |
| 4017 | .probe = panel_simple_dsi_probe, |
| 4018 | .remove = panel_simple_dsi_remove, |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 4019 | .shutdown = panel_simple_dsi_shutdown, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 4020 | }; |
| 4021 | |
| 4022 | static int __init panel_simple_init(void) |
| 4023 | { |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4024 | 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 Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 4037 | } |
| 4038 | module_init(panel_simple_init); |
| 4039 | |
| 4040 | static void __exit panel_simple_exit(void) |
| 4041 | { |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4042 | if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) |
| 4043 | mipi_dsi_driver_unregister(&panel_simple_dsi_driver); |
| 4044 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 4045 | platform_driver_unregister(&panel_simple_platform_driver); |
| 4046 | } |
| 4047 | module_exit(panel_simple_exit); |
| 4048 | |
| 4049 | MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>"); |
| 4050 | MODULE_DESCRIPTION("DRM Driver for Simple Panels"); |
| 4051 | MODULE_LICENSE("GPL and additional rights"); |