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> |
Douglas Anderson | 48834e6 | 2020-05-07 14:34:57 -0700 | [diff] [blame] | 26 | #include <linux/iopoll.h> |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 27 | #include <linux/module.h> |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 28 | #include <linux/of_platform.h> |
| 29 | #include <linux/platform_device.h> |
| 30 | #include <linux/regulator/consumer.h> |
| 31 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 32 | #include <video/display_timing.h> |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 33 | #include <video/of_display_timing.h> |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 34 | #include <video/videomode.h> |
| 35 | |
Sam Ravnborg | cb23eae | 2019-05-26 20:05:32 +0200 | [diff] [blame] | 36 | #include <drm/drm_crtc.h> |
| 37 | #include <drm/drm_device.h> |
| 38 | #include <drm/drm_mipi_dsi.h> |
| 39 | #include <drm/drm_panel.h> |
| 40 | |
Douglas Anderson | e362cc6 | 2019-07-12 09:33:33 -0700 | [diff] [blame] | 41 | /** |
| 42 | * @modes: Pointer to array of fixed modes appropriate for this panel. If |
| 43 | * only one mode then this can just be the address of this the mode. |
| 44 | * NOTE: cannot be used with "timings" and also if this is specified |
| 45 | * then you cannot override the mode in the device tree. |
| 46 | * @num_modes: Number of elements in modes array. |
| 47 | * @timings: Pointer to array of display timings. NOTE: cannot be used with |
| 48 | * "modes" and also these will be used to validate a device tree |
| 49 | * override if one is present. |
| 50 | * @num_timings: Number of elements in timings array. |
| 51 | * @bpc: Bits per color. |
| 52 | * @size: Structure containing the physical size of this panel. |
| 53 | * @delay: Structure containing various delay values for this panel. |
| 54 | * @bus_format: See MEDIA_BUS_FMT_... defines. |
| 55 | * @bus_flags: See DRM_BUS_FLAG_... defines. |
| 56 | */ |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 57 | struct panel_desc { |
| 58 | const struct drm_display_mode *modes; |
| 59 | unsigned int num_modes; |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 60 | const struct display_timing *timings; |
| 61 | unsigned int num_timings; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 62 | |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 63 | unsigned int bpc; |
| 64 | |
Ulrich Ölmann | 85533e3 | 2015-12-04 12:31:28 +0100 | [diff] [blame] | 65 | /** |
| 66 | * @width: width (in millimeters) of the panel's active display area |
| 67 | * @height: height (in millimeters) of the panel's active display area |
| 68 | */ |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 69 | struct { |
| 70 | unsigned int width; |
| 71 | unsigned int height; |
| 72 | } size; |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 73 | |
| 74 | /** |
| 75 | * @prepare: the time (in milliseconds) that it takes for the panel to |
| 76 | * become ready and start receiving video data |
Douglas Anderson | 2ed3e95 | 2018-10-25 15:21:30 -0700 | [diff] [blame] | 77 | * @hpd_absent_delay: Add this to the prepare delay if we know Hot |
| 78 | * Plug Detect isn't used. |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 79 | * @enable: the time (in milliseconds) that it takes for the panel to |
| 80 | * display the first valid frame after starting to receive |
| 81 | * video data |
| 82 | * @disable: the time (in milliseconds) that it takes for the panel to |
| 83 | * turn the display off (no content is visible) |
| 84 | * @unprepare: the time (in milliseconds) that it takes for the panel |
| 85 | * to power itself down completely |
| 86 | */ |
| 87 | struct { |
| 88 | unsigned int prepare; |
Douglas Anderson | 2ed3e95 | 2018-10-25 15:21:30 -0700 | [diff] [blame] | 89 | unsigned int hpd_absent_delay; |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 90 | unsigned int enable; |
| 91 | unsigned int disable; |
| 92 | unsigned int unprepare; |
| 93 | } delay; |
Boris Brezillon | 795f7ab | 2014-07-22 13:33:59 +0200 | [diff] [blame] | 94 | |
| 95 | u32 bus_format; |
Stefan Agner | f0aa083 | 2016-02-08 11:38:14 -0800 | [diff] [blame] | 96 | u32 bus_flags; |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 97 | int connector_type; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 98 | }; |
| 99 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 100 | struct panel_simple { |
| 101 | struct drm_panel base; |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 102 | bool prepared; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 103 | bool enabled; |
Douglas Anderson | 2ed3e95 | 2018-10-25 15:21:30 -0700 | [diff] [blame] | 104 | bool no_hpd; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 105 | |
| 106 | const struct panel_desc *desc; |
| 107 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 108 | struct regulator *supply; |
| 109 | struct i2c_adapter *ddc; |
| 110 | |
Alexandre Courbot | cfdf054 | 2014-03-01 14:00:58 +0900 | [diff] [blame] | 111 | struct gpio_desc *enable_gpio; |
Douglas Anderson | 48834e6 | 2020-05-07 14:34:57 -0700 | [diff] [blame] | 112 | struct gpio_desc *hpd_gpio; |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 113 | |
| 114 | struct drm_display_mode override_mode; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 115 | }; |
| 116 | |
| 117 | static inline struct panel_simple *to_panel_simple(struct drm_panel *panel) |
| 118 | { |
| 119 | return container_of(panel, struct panel_simple, base); |
| 120 | } |
| 121 | |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 122 | static unsigned int panel_simple_get_timings_modes(struct panel_simple *panel, |
| 123 | struct drm_connector *connector) |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 124 | { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 125 | struct drm_display_mode *mode; |
| 126 | unsigned int i, num = 0; |
| 127 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 128 | for (i = 0; i < panel->desc->num_timings; i++) { |
| 129 | const struct display_timing *dt = &panel->desc->timings[i]; |
| 130 | struct videomode vm; |
| 131 | |
| 132 | videomode_from_timing(dt, &vm); |
Sam Ravnborg | aa6c436 | 2019-12-07 15:03:35 +0100 | [diff] [blame] | 133 | mode = drm_mode_create(connector->dev); |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 134 | if (!mode) { |
Sam Ravnborg | aa6c436 | 2019-12-07 15:03:35 +0100 | [diff] [blame] | 135 | dev_err(panel->base.dev, "failed to add mode %ux%u\n", |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 136 | dt->hactive.typ, dt->vactive.typ); |
| 137 | continue; |
| 138 | } |
| 139 | |
| 140 | drm_display_mode_from_videomode(&vm, mode); |
Boris Brezillon | cda5537 | 2016-04-15 18:23:33 +0200 | [diff] [blame] | 141 | |
| 142 | mode->type |= DRM_MODE_TYPE_DRIVER; |
| 143 | |
Chen-Yu Tsai | 230c5b4 | 2016-10-24 21:21:15 +0800 | [diff] [blame] | 144 | if (panel->desc->num_timings == 1) |
Boris Brezillon | cda5537 | 2016-04-15 18:23:33 +0200 | [diff] [blame] | 145 | mode->type |= DRM_MODE_TYPE_PREFERRED; |
| 146 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 147 | drm_mode_probed_add(connector, mode); |
| 148 | num++; |
| 149 | } |
| 150 | |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 151 | return num; |
| 152 | } |
| 153 | |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 154 | static unsigned int panel_simple_get_display_modes(struct panel_simple *panel, |
| 155 | struct drm_connector *connector) |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 156 | { |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 157 | struct drm_display_mode *mode; |
| 158 | unsigned int i, num = 0; |
| 159 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 160 | for (i = 0; i < panel->desc->num_modes; i++) { |
| 161 | const struct drm_display_mode *m = &panel->desc->modes[i]; |
| 162 | |
Sam Ravnborg | aa6c436 | 2019-12-07 15:03:35 +0100 | [diff] [blame] | 163 | mode = drm_mode_duplicate(connector->dev, m); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 164 | if (!mode) { |
Sam Ravnborg | aa6c436 | 2019-12-07 15:03:35 +0100 | [diff] [blame] | 165 | dev_err(panel->base.dev, "failed to add mode %ux%u@%u\n", |
Ville Syrjälä | 0425662 | 2020-04-28 20:19:27 +0300 | [diff] [blame] | 166 | m->hdisplay, m->vdisplay, |
| 167 | drm_mode_vrefresh(m)); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 168 | continue; |
| 169 | } |
| 170 | |
Boris Brezillon | cda5537 | 2016-04-15 18:23:33 +0200 | [diff] [blame] | 171 | mode->type |= DRM_MODE_TYPE_DRIVER; |
| 172 | |
| 173 | if (panel->desc->num_modes == 1) |
| 174 | mode->type |= DRM_MODE_TYPE_PREFERRED; |
| 175 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 176 | drm_mode_set_name(mode); |
| 177 | |
| 178 | drm_mode_probed_add(connector, mode); |
| 179 | num++; |
| 180 | } |
| 181 | |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 182 | return num; |
| 183 | } |
| 184 | |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 185 | static int panel_simple_get_non_edid_modes(struct panel_simple *panel, |
| 186 | struct drm_connector *connector) |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 187 | { |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 188 | struct drm_display_mode *mode; |
| 189 | bool has_override = panel->override_mode.type; |
| 190 | unsigned int num = 0; |
| 191 | |
| 192 | if (!panel->desc) |
| 193 | return 0; |
| 194 | |
| 195 | if (has_override) { |
Sam Ravnborg | aa6c436 | 2019-12-07 15:03:35 +0100 | [diff] [blame] | 196 | mode = drm_mode_duplicate(connector->dev, |
| 197 | &panel->override_mode); |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 198 | if (mode) { |
| 199 | drm_mode_probed_add(connector, mode); |
| 200 | num = 1; |
| 201 | } else { |
Sam Ravnborg | aa6c436 | 2019-12-07 15:03:35 +0100 | [diff] [blame] | 202 | dev_err(panel->base.dev, "failed to add override mode\n"); |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 203 | } |
| 204 | } |
| 205 | |
| 206 | /* Only add timings if override was not there or failed to validate */ |
| 207 | if (num == 0 && panel->desc->num_timings) |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 208 | num = panel_simple_get_timings_modes(panel, connector); |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 209 | |
| 210 | /* |
| 211 | * Only add fixed modes if timings/override added no mode. |
| 212 | * |
| 213 | * We should only ever have either the display timings specified |
| 214 | * or a fixed mode. Anything else is rather bogus. |
| 215 | */ |
| 216 | WARN_ON(panel->desc->num_timings && panel->desc->num_modes); |
| 217 | if (num == 0) |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 218 | num = panel_simple_get_display_modes(panel, connector); |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 219 | |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 220 | connector->display_info.bpc = panel->desc->bpc; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 221 | connector->display_info.width_mm = panel->desc->size.width; |
| 222 | connector->display_info.height_mm = panel->desc->size.height; |
Boris Brezillon | 795f7ab | 2014-07-22 13:33:59 +0200 | [diff] [blame] | 223 | if (panel->desc->bus_format) |
| 224 | drm_display_info_set_bus_formats(&connector->display_info, |
| 225 | &panel->desc->bus_format, 1); |
Stefan Agner | f0aa083 | 2016-02-08 11:38:14 -0800 | [diff] [blame] | 226 | connector->display_info.bus_flags = panel->desc->bus_flags; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 227 | |
| 228 | return num; |
| 229 | } |
| 230 | |
| 231 | static int panel_simple_disable(struct drm_panel *panel) |
| 232 | { |
| 233 | struct panel_simple *p = to_panel_simple(panel); |
| 234 | |
| 235 | if (!p->enabled) |
| 236 | return 0; |
| 237 | |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 238 | if (p->desc->delay.disable) |
| 239 | msleep(p->desc->delay.disable); |
| 240 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 241 | p->enabled = false; |
| 242 | |
| 243 | return 0; |
| 244 | } |
| 245 | |
Ajay Kumar | c0e1d17 | 2014-07-31 23:12:04 +0530 | [diff] [blame] | 246 | static int panel_simple_unprepare(struct drm_panel *panel) |
| 247 | { |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 248 | struct panel_simple *p = to_panel_simple(panel); |
| 249 | |
| 250 | if (!p->prepared) |
| 251 | return 0; |
| 252 | |
Fabio Estevam | 756b918 | 2017-07-16 21:05:39 -0300 | [diff] [blame] | 253 | gpiod_set_value_cansleep(p->enable_gpio, 0); |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 254 | |
| 255 | regulator_disable(p->supply); |
| 256 | |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 257 | if (p->desc->delay.unprepare) |
| 258 | msleep(p->desc->delay.unprepare); |
| 259 | |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 260 | p->prepared = false; |
| 261 | |
Ajay Kumar | c0e1d17 | 2014-07-31 23:12:04 +0530 | [diff] [blame] | 262 | return 0; |
| 263 | } |
| 264 | |
Douglas Anderson | 48834e6 | 2020-05-07 14:34:57 -0700 | [diff] [blame] | 265 | static int panel_simple_get_hpd_gpio(struct device *dev, |
| 266 | struct panel_simple *p, bool from_probe) |
| 267 | { |
| 268 | int err; |
| 269 | |
| 270 | p->hpd_gpio = devm_gpiod_get_optional(dev, "hpd", GPIOD_IN); |
| 271 | if (IS_ERR(p->hpd_gpio)) { |
| 272 | err = PTR_ERR(p->hpd_gpio); |
| 273 | |
| 274 | /* |
| 275 | * If we're called from probe we won't consider '-EPROBE_DEFER' |
| 276 | * to be an error--we'll leave the error code in "hpd_gpio". |
| 277 | * When we try to use it we'll try again. This allows for |
| 278 | * circular dependencies where the component providing the |
| 279 | * hpd gpio needs the panel to init before probing. |
| 280 | */ |
| 281 | if (err != -EPROBE_DEFER || !from_probe) { |
| 282 | dev_err(dev, "failed to get 'hpd' GPIO: %d\n", err); |
| 283 | return err; |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | return 0; |
| 288 | } |
| 289 | |
Ajay Kumar | c0e1d17 | 2014-07-31 23:12:04 +0530 | [diff] [blame] | 290 | static int panel_simple_prepare(struct drm_panel *panel) |
| 291 | { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 292 | struct panel_simple *p = to_panel_simple(panel); |
Douglas Anderson | 2ed3e95 | 2018-10-25 15:21:30 -0700 | [diff] [blame] | 293 | unsigned int delay; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 294 | int err; |
Douglas Anderson | 48834e6 | 2020-05-07 14:34:57 -0700 | [diff] [blame] | 295 | int hpd_asserted; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 296 | |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 297 | if (p->prepared) |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 298 | return 0; |
| 299 | |
| 300 | err = regulator_enable(p->supply); |
| 301 | if (err < 0) { |
| 302 | dev_err(panel->dev, "failed to enable supply: %d\n", err); |
| 303 | return err; |
| 304 | } |
| 305 | |
Fabio Estevam | 756b918 | 2017-07-16 21:05:39 -0300 | [diff] [blame] | 306 | gpiod_set_value_cansleep(p->enable_gpio, 1); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 307 | |
Douglas Anderson | 2ed3e95 | 2018-10-25 15:21:30 -0700 | [diff] [blame] | 308 | delay = p->desc->delay.prepare; |
| 309 | if (p->no_hpd) |
| 310 | delay += p->desc->delay.hpd_absent_delay; |
| 311 | if (delay) |
| 312 | msleep(delay); |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 313 | |
Douglas Anderson | 48834e6 | 2020-05-07 14:34:57 -0700 | [diff] [blame] | 314 | if (p->hpd_gpio) { |
| 315 | if (IS_ERR(p->hpd_gpio)) { |
| 316 | err = panel_simple_get_hpd_gpio(panel->dev, p, false); |
| 317 | if (err) |
| 318 | return err; |
| 319 | } |
| 320 | |
| 321 | err = readx_poll_timeout(gpiod_get_value_cansleep, p->hpd_gpio, |
| 322 | hpd_asserted, hpd_asserted, |
| 323 | 1000, 2000000); |
| 324 | if (hpd_asserted < 0) |
| 325 | err = hpd_asserted; |
| 326 | |
| 327 | if (err) { |
| 328 | dev_err(panel->dev, |
| 329 | "error waiting for hpd GPIO: %d\n", err); |
| 330 | return err; |
| 331 | } |
| 332 | } |
| 333 | |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 334 | p->prepared = true; |
| 335 | |
| 336 | return 0; |
| 337 | } |
| 338 | |
| 339 | static int panel_simple_enable(struct drm_panel *panel) |
| 340 | { |
| 341 | struct panel_simple *p = to_panel_simple(panel); |
| 342 | |
| 343 | if (p->enabled) |
| 344 | return 0; |
| 345 | |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 346 | if (p->desc->delay.enable) |
| 347 | msleep(p->desc->delay.enable); |
| 348 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 349 | p->enabled = true; |
| 350 | |
| 351 | return 0; |
| 352 | } |
| 353 | |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 354 | static int panel_simple_get_modes(struct drm_panel *panel, |
| 355 | struct drm_connector *connector) |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 356 | { |
| 357 | struct panel_simple *p = to_panel_simple(panel); |
| 358 | int num = 0; |
| 359 | |
| 360 | /* probe EDID if a DDC bus is available */ |
| 361 | if (p->ddc) { |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 362 | struct edid *edid = drm_get_edid(connector, p->ddc); |
| 363 | |
| 364 | drm_connector_update_edid_property(connector, edid); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 365 | if (edid) { |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 366 | num += drm_add_edid_modes(connector, edid); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 367 | kfree(edid); |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | /* add hard-coded panel modes */ |
Sam Ravnborg | 0ce8ddd | 2019-12-07 15:03:33 +0100 | [diff] [blame] | 372 | num += panel_simple_get_non_edid_modes(p, connector); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 373 | |
| 374 | return num; |
| 375 | } |
| 376 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 377 | static int panel_simple_get_timings(struct drm_panel *panel, |
| 378 | unsigned int num_timings, |
| 379 | struct display_timing *timings) |
| 380 | { |
| 381 | struct panel_simple *p = to_panel_simple(panel); |
| 382 | unsigned int i; |
| 383 | |
| 384 | if (p->desc->num_timings < num_timings) |
| 385 | num_timings = p->desc->num_timings; |
| 386 | |
| 387 | if (timings) |
| 388 | for (i = 0; i < num_timings; i++) |
| 389 | timings[i] = p->desc->timings[i]; |
| 390 | |
| 391 | return p->desc->num_timings; |
| 392 | } |
| 393 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 394 | static const struct drm_panel_funcs panel_simple_funcs = { |
| 395 | .disable = panel_simple_disable, |
Ajay Kumar | c0e1d17 | 2014-07-31 23:12:04 +0530 | [diff] [blame] | 396 | .unprepare = panel_simple_unprepare, |
| 397 | .prepare = panel_simple_prepare, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 398 | .enable = panel_simple_enable, |
| 399 | .get_modes = panel_simple_get_modes, |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 400 | .get_timings = panel_simple_get_timings, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 401 | }; |
| 402 | |
Sam Ravnborg | 4a1d0db | 2020-02-16 19:15:13 +0100 | [diff] [blame] | 403 | static struct panel_desc panel_dpi; |
| 404 | |
| 405 | static int panel_dpi_probe(struct device *dev, |
| 406 | struct panel_simple *panel) |
| 407 | { |
| 408 | struct display_timing *timing; |
| 409 | const struct device_node *np; |
| 410 | struct panel_desc *desc; |
| 411 | unsigned int bus_flags; |
| 412 | struct videomode vm; |
Sam Ravnborg | 4a1d0db | 2020-02-16 19:15:13 +0100 | [diff] [blame] | 413 | int ret; |
| 414 | |
| 415 | np = dev->of_node; |
| 416 | desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL); |
| 417 | if (!desc) |
| 418 | return -ENOMEM; |
| 419 | |
| 420 | timing = devm_kzalloc(dev, sizeof(*timing), GFP_KERNEL); |
| 421 | if (!timing) |
| 422 | return -ENOMEM; |
| 423 | |
| 424 | ret = of_get_display_timing(np, "panel-timing", timing); |
| 425 | if (ret < 0) { |
| 426 | dev_err(dev, "%pOF: no panel-timing node found for \"panel-dpi\" binding\n", |
| 427 | np); |
| 428 | return ret; |
| 429 | } |
| 430 | |
| 431 | desc->timings = timing; |
| 432 | desc->num_timings = 1; |
| 433 | |
| 434 | of_property_read_u32(np, "width-mm", &desc->size.width); |
| 435 | of_property_read_u32(np, "height-mm", &desc->size.height); |
| 436 | |
Sam Ravnborg | 4a1d0db | 2020-02-16 19:15:13 +0100 | [diff] [blame] | 437 | /* Extract bus_flags from display_timing */ |
| 438 | bus_flags = 0; |
| 439 | vm.flags = timing->flags; |
| 440 | drm_bus_flags_from_videomode(&vm, &bus_flags); |
| 441 | desc->bus_flags = bus_flags; |
| 442 | |
| 443 | /* We do not know the connector for the DT node, so guess it */ |
| 444 | desc->connector_type = DRM_MODE_CONNECTOR_DPI; |
| 445 | |
| 446 | panel->desc = desc; |
| 447 | |
| 448 | return 0; |
| 449 | } |
| 450 | |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 451 | #define PANEL_SIMPLE_BOUNDS_CHECK(to_check, bounds, field) \ |
| 452 | (to_check->field.typ >= bounds->field.min && \ |
| 453 | to_check->field.typ <= bounds->field.max) |
Douglas Anderson | e362cc6 | 2019-07-12 09:33:33 -0700 | [diff] [blame] | 454 | static void panel_simple_parse_panel_timing_node(struct device *dev, |
| 455 | struct panel_simple *panel, |
| 456 | const struct display_timing *ot) |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 457 | { |
| 458 | const struct panel_desc *desc = panel->desc; |
| 459 | struct videomode vm; |
| 460 | unsigned int i; |
| 461 | |
| 462 | if (WARN_ON(desc->num_modes)) { |
| 463 | dev_err(dev, "Reject override mode: panel has a fixed mode\n"); |
| 464 | return; |
| 465 | } |
| 466 | if (WARN_ON(!desc->num_timings)) { |
| 467 | dev_err(dev, "Reject override mode: no timings specified\n"); |
| 468 | return; |
| 469 | } |
| 470 | |
| 471 | for (i = 0; i < panel->desc->num_timings; i++) { |
| 472 | const struct display_timing *dt = &panel->desc->timings[i]; |
| 473 | |
| 474 | if (!PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hactive) || |
| 475 | !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hfront_porch) || |
| 476 | !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hback_porch) || |
| 477 | !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hsync_len) || |
| 478 | !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vactive) || |
| 479 | !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vfront_porch) || |
| 480 | !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vback_porch) || |
| 481 | !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vsync_len)) |
| 482 | continue; |
| 483 | |
| 484 | if (ot->flags != dt->flags) |
| 485 | continue; |
| 486 | |
| 487 | videomode_from_timing(ot, &vm); |
| 488 | drm_display_mode_from_videomode(&vm, &panel->override_mode); |
| 489 | panel->override_mode.type |= DRM_MODE_TYPE_DRIVER | |
| 490 | DRM_MODE_TYPE_PREFERRED; |
| 491 | break; |
| 492 | } |
| 493 | |
| 494 | if (WARN_ON(!panel->override_mode.type)) |
| 495 | dev_err(dev, "Reject override mode: No display_timing found\n"); |
| 496 | } |
| 497 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 498 | static int panel_simple_probe(struct device *dev, const struct panel_desc *desc) |
| 499 | { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 500 | struct panel_simple *panel; |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 501 | struct display_timing dt; |
Sam Ravnborg | 0fe1564 | 2019-12-07 15:03:31 +0100 | [diff] [blame] | 502 | struct device_node *ddc; |
Sam Ravnborg | 9f069c6 | 2020-07-26 22:33:11 +0200 | [diff] [blame] | 503 | int connector_type; |
Sam Ravnborg | ddb8e85 | 2020-07-26 22:33:10 +0200 | [diff] [blame] | 504 | u32 bus_flags; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 505 | int err; |
| 506 | |
| 507 | panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL); |
| 508 | if (!panel) |
| 509 | return -ENOMEM; |
| 510 | |
| 511 | panel->enabled = false; |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 512 | panel->prepared = false; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 513 | panel->desc = desc; |
| 514 | |
Douglas Anderson | 2ed3e95 | 2018-10-25 15:21:30 -0700 | [diff] [blame] | 515 | panel->no_hpd = of_property_read_bool(dev->of_node, "no-hpd"); |
Douglas Anderson | 48834e6 | 2020-05-07 14:34:57 -0700 | [diff] [blame] | 516 | if (!panel->no_hpd) { |
| 517 | err = panel_simple_get_hpd_gpio(dev, panel, true); |
| 518 | if (err) |
| 519 | return err; |
| 520 | } |
Douglas Anderson | 2ed3e95 | 2018-10-25 15:21:30 -0700 | [diff] [blame] | 521 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 522 | panel->supply = devm_regulator_get(dev, "power"); |
| 523 | if (IS_ERR(panel->supply)) |
| 524 | return PTR_ERR(panel->supply); |
| 525 | |
Alexandre Courbot | a61400d | 2014-10-23 17:16:58 +0900 | [diff] [blame] | 526 | panel->enable_gpio = devm_gpiod_get_optional(dev, "enable", |
| 527 | GPIOD_OUT_LOW); |
Alexandre Courbot | cfdf054 | 2014-03-01 14:00:58 +0900 | [diff] [blame] | 528 | if (IS_ERR(panel->enable_gpio)) { |
| 529 | err = PTR_ERR(panel->enable_gpio); |
Fabio Estevam | b8e9380 | 2017-06-30 18:14:46 -0300 | [diff] [blame] | 530 | if (err != -EPROBE_DEFER) |
| 531 | dev_err(dev, "failed to request GPIO: %d\n", err); |
Alexandre Courbot | 9746c61 | 2014-07-25 23:47:25 +0900 | [diff] [blame] | 532 | return err; |
| 533 | } |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 534 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 535 | ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0); |
| 536 | if (ddc) { |
| 537 | panel->ddc = of_find_i2c_adapter_by_node(ddc); |
| 538 | of_node_put(ddc); |
| 539 | |
Sam Ravnborg | 0fe1564 | 2019-12-07 15:03:31 +0100 | [diff] [blame] | 540 | if (!panel->ddc) |
| 541 | return -EPROBE_DEFER; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 542 | } |
| 543 | |
Sam Ravnborg | 4a1d0db | 2020-02-16 19:15:13 +0100 | [diff] [blame] | 544 | if (desc == &panel_dpi) { |
| 545 | /* Handle the generic panel-dpi binding */ |
| 546 | err = panel_dpi_probe(dev, panel); |
| 547 | if (err) |
| 548 | goto free_ddc; |
| 549 | } else { |
| 550 | if (!of_get_display_timing(dev->of_node, "panel-timing", &dt)) |
| 551 | panel_simple_parse_panel_timing_node(dev, panel, &dt); |
| 552 | } |
Sean Paul | b8a2948 | 2019-07-11 13:34:53 -0700 | [diff] [blame] | 553 | |
Sam Ravnborg | 9f069c6 | 2020-07-26 22:33:11 +0200 | [diff] [blame] | 554 | connector_type = desc->connector_type; |
Sam Ravnborg | ddb8e85 | 2020-07-26 22:33:10 +0200 | [diff] [blame] | 555 | /* Catch common mistakes for panels. */ |
Sam Ravnborg | 9f069c6 | 2020-07-26 22:33:11 +0200 | [diff] [blame] | 556 | switch (connector_type) { |
Sam Ravnborg | ddb8e85 | 2020-07-26 22:33:10 +0200 | [diff] [blame] | 557 | case 0: |
| 558 | dev_warn(dev, "Specify missing connector_type\n"); |
Sam Ravnborg | 9f069c6 | 2020-07-26 22:33:11 +0200 | [diff] [blame] | 559 | connector_type = DRM_MODE_CONNECTOR_DPI; |
Sam Ravnborg | ddb8e85 | 2020-07-26 22:33:10 +0200 | [diff] [blame] | 560 | break; |
| 561 | case DRM_MODE_CONNECTOR_LVDS: |
Laurent Pinchart | c471583 | 2020-06-30 02:33:19 +0300 | [diff] [blame] | 562 | WARN_ON(desc->bus_flags & |
| 563 | ~(DRM_BUS_FLAG_DE_LOW | |
| 564 | DRM_BUS_FLAG_DE_HIGH | |
| 565 | DRM_BUS_FLAG_DATA_MSB_TO_LSB | |
| 566 | DRM_BUS_FLAG_DATA_LSB_TO_MSB)); |
Laurent Pinchart | 1185c40 | 2020-06-30 02:33:20 +0300 | [diff] [blame] | 567 | WARN_ON(desc->bus_format != MEDIA_BUS_FMT_RGB666_1X7X3_SPWG && |
| 568 | desc->bus_format != MEDIA_BUS_FMT_RGB888_1X7X4_SPWG && |
| 569 | desc->bus_format != MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA); |
| 570 | WARN_ON(desc->bus_format == MEDIA_BUS_FMT_RGB666_1X7X3_SPWG && |
| 571 | desc->bpc != 6); |
| 572 | WARN_ON((desc->bus_format == MEDIA_BUS_FMT_RGB888_1X7X4_SPWG || |
| 573 | desc->bus_format == MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA) && |
| 574 | desc->bpc != 8); |
Sam Ravnborg | ddb8e85 | 2020-07-26 22:33:10 +0200 | [diff] [blame] | 575 | break; |
| 576 | case DRM_MODE_CONNECTOR_eDP: |
| 577 | if (desc->bus_format == 0) |
| 578 | dev_warn(dev, "Specify missing bus_format\n"); |
| 579 | if (desc->bpc != 6 && desc->bpc != 8) |
| 580 | dev_warn(dev, "Expected bpc in {6,8} but got: %u\n", desc->bpc); |
| 581 | break; |
| 582 | case DRM_MODE_CONNECTOR_DSI: |
| 583 | if (desc->bpc != 6 && desc->bpc != 8) |
| 584 | dev_warn(dev, "Expected bpc in {6,8} but got: %u\n", desc->bpc); |
| 585 | break; |
| 586 | case DRM_MODE_CONNECTOR_DPI: |
| 587 | bus_flags = DRM_BUS_FLAG_DE_LOW | |
| 588 | DRM_BUS_FLAG_DE_HIGH | |
| 589 | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE | |
| 590 | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE | |
| 591 | DRM_BUS_FLAG_DATA_MSB_TO_LSB | |
| 592 | DRM_BUS_FLAG_DATA_LSB_TO_MSB | |
| 593 | DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE | |
| 594 | DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE; |
| 595 | if (desc->bus_flags & ~bus_flags) |
| 596 | dev_warn(dev, "Unexpected bus_flags(%d)\n", desc->bus_flags & ~bus_flags); |
| 597 | if (!(desc->bus_flags & bus_flags)) |
| 598 | dev_warn(dev, "Specify missing bus_flags\n"); |
| 599 | if (desc->bus_format == 0) |
| 600 | dev_warn(dev, "Specify missing bus_format\n"); |
| 601 | if (desc->bpc != 6 && desc->bpc != 8) |
| 602 | dev_warn(dev, "Expected bpc in {6,8} but got: %u\n", desc->bpc); |
| 603 | break; |
| 604 | default: |
| 605 | dev_warn(dev, "Specify a valid connector_type: %d\n", desc->connector_type); |
Sam Ravnborg | 9f069c6 | 2020-07-26 22:33:11 +0200 | [diff] [blame] | 606 | connector_type = DRM_MODE_CONNECTOR_DPI; |
Sam Ravnborg | ddb8e85 | 2020-07-26 22:33:10 +0200 | [diff] [blame] | 607 | break; |
Laurent Pinchart | 1185c40 | 2020-06-30 02:33:20 +0300 | [diff] [blame] | 608 | } |
Laurent Pinchart | c471583 | 2020-06-30 02:33:19 +0300 | [diff] [blame] | 609 | |
Sam Ravnborg | 9f069c6 | 2020-07-26 22:33:11 +0200 | [diff] [blame] | 610 | drm_panel_init(&panel->base, dev, &panel_simple_funcs, connector_type); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 611 | |
Sam Ravnborg | 0fe1564 | 2019-12-07 15:03:31 +0100 | [diff] [blame] | 612 | err = drm_panel_of_backlight(&panel->base); |
| 613 | if (err) |
| 614 | goto free_ddc; |
| 615 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 616 | err = drm_panel_add(&panel->base); |
| 617 | if (err < 0) |
| 618 | goto free_ddc; |
| 619 | |
| 620 | dev_set_drvdata(dev, panel); |
| 621 | |
| 622 | return 0; |
| 623 | |
| 624 | free_ddc: |
| 625 | if (panel->ddc) |
| 626 | put_device(&panel->ddc->dev); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 627 | |
| 628 | return err; |
| 629 | } |
| 630 | |
| 631 | static int panel_simple_remove(struct device *dev) |
| 632 | { |
| 633 | struct panel_simple *panel = dev_get_drvdata(dev); |
| 634 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 635 | drm_panel_remove(&panel->base); |
Sam Ravnborg | 0fe1564 | 2019-12-07 15:03:31 +0100 | [diff] [blame] | 636 | drm_panel_disable(&panel->base); |
| 637 | drm_panel_unprepare(&panel->base); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 638 | |
| 639 | if (panel->ddc) |
| 640 | put_device(&panel->ddc->dev); |
| 641 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 642 | return 0; |
| 643 | } |
| 644 | |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 645 | static void panel_simple_shutdown(struct device *dev) |
| 646 | { |
| 647 | struct panel_simple *panel = dev_get_drvdata(dev); |
| 648 | |
Sam Ravnborg | 0fe1564 | 2019-12-07 15:03:31 +0100 | [diff] [blame] | 649 | drm_panel_disable(&panel->base); |
| 650 | drm_panel_unprepare(&panel->base); |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 651 | } |
| 652 | |
Yannick Fertre | 966fea7 | 2017-03-28 11:44:49 +0200 | [diff] [blame] | 653 | static const struct drm_display_mode ampire_am_480272h3tmqw_t01h_mode = { |
| 654 | .clock = 9000, |
| 655 | .hdisplay = 480, |
| 656 | .hsync_start = 480 + 2, |
| 657 | .hsync_end = 480 + 2 + 41, |
| 658 | .htotal = 480 + 2 + 41 + 2, |
| 659 | .vdisplay = 272, |
| 660 | .vsync_start = 272 + 2, |
| 661 | .vsync_end = 272 + 2 + 10, |
| 662 | .vtotal = 272 + 2 + 10 + 2, |
Yannick Fertre | 966fea7 | 2017-03-28 11:44:49 +0200 | [diff] [blame] | 663 | .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, |
| 664 | }; |
| 665 | |
| 666 | static const struct panel_desc ampire_am_480272h3tmqw_t01h = { |
| 667 | .modes = &ire_am_480272h3tmqw_t01h_mode, |
| 668 | .num_modes = 1, |
| 669 | .bpc = 8, |
| 670 | .size = { |
| 671 | .width = 105, |
| 672 | .height = 67, |
| 673 | }, |
| 674 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 675 | }; |
| 676 | |
Philipp Zabel | 1c550fa1 | 2015-02-11 18:50:09 +0100 | [diff] [blame] | 677 | static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = { |
| 678 | .clock = 33333, |
| 679 | .hdisplay = 800, |
| 680 | .hsync_start = 800 + 0, |
| 681 | .hsync_end = 800 + 0 + 255, |
| 682 | .htotal = 800 + 0 + 255 + 0, |
| 683 | .vdisplay = 480, |
| 684 | .vsync_start = 480 + 2, |
| 685 | .vsync_end = 480 + 2 + 45, |
| 686 | .vtotal = 480 + 2 + 45 + 0, |
Philipp Zabel | 1c550fa1 | 2015-02-11 18:50:09 +0100 | [diff] [blame] | 687 | .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, |
| 688 | }; |
| 689 | |
| 690 | static const struct panel_desc ampire_am800480r3tmqwa1h = { |
| 691 | .modes = &ire_am800480r3tmqwa1h_mode, |
| 692 | .num_modes = 1, |
| 693 | .bpc = 6, |
| 694 | .size = { |
| 695 | .width = 152, |
| 696 | .height = 91, |
| 697 | }, |
| 698 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 699 | }; |
| 700 | |
Sébastien Szymanski | c479450f | 2019-05-07 17:27:12 +0200 | [diff] [blame] | 701 | static const struct display_timing santek_st0700i5y_rbslw_f_timing = { |
| 702 | .pixelclock = { 26400000, 33300000, 46800000 }, |
| 703 | .hactive = { 800, 800, 800 }, |
| 704 | .hfront_porch = { 16, 210, 354 }, |
| 705 | .hback_porch = { 45, 36, 6 }, |
| 706 | .hsync_len = { 1, 10, 40 }, |
| 707 | .vactive = { 480, 480, 480 }, |
| 708 | .vfront_porch = { 7, 22, 147 }, |
| 709 | .vback_porch = { 22, 13, 3 }, |
| 710 | .vsync_len = { 1, 10, 20 }, |
| 711 | .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | |
| 712 | DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
| 713 | }; |
| 714 | |
| 715 | static const struct panel_desc armadeus_st0700_adapt = { |
| 716 | .timings = &santek_st0700i5y_rbslw_f_timing, |
| 717 | .num_timings = 1, |
| 718 | .bpc = 6, |
| 719 | .size = { |
| 720 | .width = 154, |
| 721 | .height = 86, |
| 722 | }, |
| 723 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
Sam Ravnborg | f5436f7 | 2020-06-30 20:05:43 +0200 | [diff] [blame] | 724 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, |
Sébastien Szymanski | c479450f | 2019-05-07 17:27:12 +0200 | [diff] [blame] | 725 | }; |
| 726 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 727 | static const struct drm_display_mode auo_b101aw03_mode = { |
| 728 | .clock = 51450, |
| 729 | .hdisplay = 1024, |
| 730 | .hsync_start = 1024 + 156, |
| 731 | .hsync_end = 1024 + 156 + 8, |
| 732 | .htotal = 1024 + 156 + 8 + 156, |
| 733 | .vdisplay = 600, |
| 734 | .vsync_start = 600 + 16, |
| 735 | .vsync_end = 600 + 16 + 6, |
| 736 | .vtotal = 600 + 16 + 6 + 16, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 737 | }; |
| 738 | |
| 739 | static const struct panel_desc auo_b101aw03 = { |
| 740 | .modes = &auo_b101aw03_mode, |
| 741 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 742 | .bpc = 6, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 743 | .size = { |
| 744 | .width = 223, |
| 745 | .height = 125, |
| 746 | }, |
Dmitry Osipenko | 8556082 | 2020-06-22 01:27:42 +0300 | [diff] [blame] | 747 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Laurent Pinchart | c471583 | 2020-06-30 02:33:19 +0300 | [diff] [blame] | 748 | .bus_flags = DRM_BUS_FLAG_DE_HIGH, |
Dmitry Osipenko | 94f0791 | 2020-06-18 01:27:03 +0300 | [diff] [blame] | 749 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 750 | }; |
| 751 | |
Douglas Anderson | 374bf82 | 2019-07-11 13:34:55 -0700 | [diff] [blame] | 752 | static const struct display_timing auo_b101ean01_timing = { |
| 753 | .pixelclock = { 65300000, 72500000, 75000000 }, |
| 754 | .hactive = { 1280, 1280, 1280 }, |
| 755 | .hfront_porch = { 18, 119, 119 }, |
| 756 | .hback_porch = { 21, 21, 21 }, |
| 757 | .hsync_len = { 32, 32, 32 }, |
| 758 | .vactive = { 800, 800, 800 }, |
| 759 | .vfront_porch = { 4, 4, 4 }, |
| 760 | .vback_porch = { 8, 8, 8 }, |
| 761 | .vsync_len = { 18, 20, 20 }, |
Huang Lin | a531bc3 | 2015-02-28 10:18:58 +0800 | [diff] [blame] | 762 | }; |
| 763 | |
| 764 | static const struct panel_desc auo_b101ean01 = { |
Douglas Anderson | 374bf82 | 2019-07-11 13:34:55 -0700 | [diff] [blame] | 765 | .timings = &auo_b101ean01_timing, |
| 766 | .num_timings = 1, |
Huang Lin | a531bc3 | 2015-02-28 10:18:58 +0800 | [diff] [blame] | 767 | .bpc = 6, |
| 768 | .size = { |
| 769 | .width = 217, |
| 770 | .height = 136, |
| 771 | }, |
| 772 | }; |
| 773 | |
Rob Clark | dac746e | 2014-08-01 17:01:06 -0400 | [diff] [blame] | 774 | static const struct drm_display_mode auo_b101xtn01_mode = { |
| 775 | .clock = 72000, |
| 776 | .hdisplay = 1366, |
| 777 | .hsync_start = 1366 + 20, |
| 778 | .hsync_end = 1366 + 20 + 70, |
| 779 | .htotal = 1366 + 20 + 70, |
| 780 | .vdisplay = 768, |
| 781 | .vsync_start = 768 + 14, |
| 782 | .vsync_end = 768 + 14 + 42, |
| 783 | .vtotal = 768 + 14 + 42, |
Rob Clark | dac746e | 2014-08-01 17:01:06 -0400 | [diff] [blame] | 784 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 785 | }; |
| 786 | |
| 787 | static const struct panel_desc auo_b101xtn01 = { |
| 788 | .modes = &auo_b101xtn01_mode, |
| 789 | .num_modes = 1, |
| 790 | .bpc = 6, |
| 791 | .size = { |
| 792 | .width = 223, |
| 793 | .height = 125, |
| 794 | }, |
| 795 | }; |
| 796 | |
Rob Clark | da458286 | 2020-01-08 15:53:56 -0800 | [diff] [blame] | 797 | static const struct drm_display_mode auo_b116xak01_mode = { |
| 798 | .clock = 69300, |
| 799 | .hdisplay = 1366, |
| 800 | .hsync_start = 1366 + 48, |
| 801 | .hsync_end = 1366 + 48 + 32, |
| 802 | .htotal = 1366 + 48 + 32 + 10, |
| 803 | .vdisplay = 768, |
| 804 | .vsync_start = 768 + 4, |
| 805 | .vsync_end = 768 + 4 + 6, |
| 806 | .vtotal = 768 + 4 + 6 + 15, |
Rob Clark | da458286 | 2020-01-08 15:53:56 -0800 | [diff] [blame] | 807 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 808 | }; |
| 809 | |
| 810 | static const struct panel_desc auo_b116xak01 = { |
| 811 | .modes = &auo_b116xak01_mode, |
| 812 | .num_modes = 1, |
| 813 | .bpc = 6, |
| 814 | .size = { |
| 815 | .width = 256, |
| 816 | .height = 144, |
| 817 | }, |
| 818 | .delay = { |
| 819 | .hpd_absent_delay = 200, |
| 820 | }, |
| 821 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 822 | .connector_type = DRM_MODE_CONNECTOR_eDP, |
| 823 | }; |
| 824 | |
Ajay Kumar | e35e305 | 2014-09-01 15:40:02 +0530 | [diff] [blame] | 825 | static const struct drm_display_mode auo_b116xw03_mode = { |
| 826 | .clock = 70589, |
| 827 | .hdisplay = 1366, |
| 828 | .hsync_start = 1366 + 40, |
| 829 | .hsync_end = 1366 + 40 + 40, |
| 830 | .htotal = 1366 + 40 + 40 + 32, |
| 831 | .vdisplay = 768, |
| 832 | .vsync_start = 768 + 10, |
| 833 | .vsync_end = 768 + 10 + 12, |
| 834 | .vtotal = 768 + 10 + 12 + 6, |
Jitao Shi | 88d3457 | 2020-07-05 17:45:14 +0800 | [diff] [blame] | 835 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
Ajay Kumar | e35e305 | 2014-09-01 15:40:02 +0530 | [diff] [blame] | 836 | }; |
| 837 | |
| 838 | static const struct panel_desc auo_b116xw03 = { |
| 839 | .modes = &auo_b116xw03_mode, |
| 840 | .num_modes = 1, |
| 841 | .bpc = 6, |
| 842 | .size = { |
| 843 | .width = 256, |
| 844 | .height = 144, |
| 845 | }, |
Jitao Shi | 88d3457 | 2020-07-05 17:45:14 +0800 | [diff] [blame] | 846 | .delay = { |
| 847 | .enable = 400, |
| 848 | }, |
| 849 | .bus_flags = DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE, |
| 850 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 851 | .connector_type = DRM_MODE_CONNECTOR_eDP, |
Ajay Kumar | e35e305 | 2014-09-01 15:40:02 +0530 | [diff] [blame] | 852 | }; |
| 853 | |
Stéphane Marchesin | a333f7a | 2014-05-23 19:27:59 -0700 | [diff] [blame] | 854 | static const struct drm_display_mode auo_b133xtn01_mode = { |
| 855 | .clock = 69500, |
| 856 | .hdisplay = 1366, |
| 857 | .hsync_start = 1366 + 48, |
| 858 | .hsync_end = 1366 + 48 + 32, |
| 859 | .htotal = 1366 + 48 + 32 + 20, |
| 860 | .vdisplay = 768, |
| 861 | .vsync_start = 768 + 3, |
| 862 | .vsync_end = 768 + 3 + 6, |
| 863 | .vtotal = 768 + 3 + 6 + 13, |
Stéphane Marchesin | a333f7a | 2014-05-23 19:27:59 -0700 | [diff] [blame] | 864 | }; |
| 865 | |
| 866 | static const struct panel_desc auo_b133xtn01 = { |
| 867 | .modes = &auo_b133xtn01_mode, |
| 868 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 869 | .bpc = 6, |
Stéphane Marchesin | a333f7a | 2014-05-23 19:27:59 -0700 | [diff] [blame] | 870 | .size = { |
| 871 | .width = 293, |
| 872 | .height = 165, |
| 873 | }, |
| 874 | }; |
| 875 | |
Ajay Kumar | 3e51d60 | 2014-07-31 23:12:12 +0530 | [diff] [blame] | 876 | static const struct drm_display_mode auo_b133htn01_mode = { |
| 877 | .clock = 150660, |
| 878 | .hdisplay = 1920, |
| 879 | .hsync_start = 1920 + 172, |
| 880 | .hsync_end = 1920 + 172 + 80, |
| 881 | .htotal = 1920 + 172 + 80 + 60, |
| 882 | .vdisplay = 1080, |
| 883 | .vsync_start = 1080 + 25, |
| 884 | .vsync_end = 1080 + 25 + 10, |
| 885 | .vtotal = 1080 + 25 + 10 + 10, |
Ajay Kumar | 3e51d60 | 2014-07-31 23:12:12 +0530 | [diff] [blame] | 886 | }; |
| 887 | |
| 888 | static const struct panel_desc auo_b133htn01 = { |
| 889 | .modes = &auo_b133htn01_mode, |
| 890 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 891 | .bpc = 6, |
Ajay Kumar | 3e51d60 | 2014-07-31 23:12:12 +0530 | [diff] [blame] | 892 | .size = { |
| 893 | .width = 293, |
| 894 | .height = 165, |
| 895 | }, |
| 896 | .delay = { |
| 897 | .prepare = 105, |
| 898 | .enable = 20, |
| 899 | .unprepare = 50, |
| 900 | }, |
| 901 | }; |
| 902 | |
Lukasz Majewski | bccfaff | 2018-05-14 21:08:49 +0200 | [diff] [blame] | 903 | static const struct display_timing auo_g070vvn01_timings = { |
| 904 | .pixelclock = { 33300000, 34209000, 45000000 }, |
| 905 | .hactive = { 800, 800, 800 }, |
| 906 | .hfront_porch = { 20, 40, 200 }, |
| 907 | .hback_porch = { 87, 40, 1 }, |
| 908 | .hsync_len = { 1, 48, 87 }, |
| 909 | .vactive = { 480, 480, 480 }, |
| 910 | .vfront_porch = { 5, 13, 200 }, |
| 911 | .vback_porch = { 31, 31, 29 }, |
| 912 | .vsync_len = { 1, 1, 3 }, |
| 913 | }; |
| 914 | |
| 915 | static const struct panel_desc auo_g070vvn01 = { |
| 916 | .timings = &auo_g070vvn01_timings, |
| 917 | .num_timings = 1, |
| 918 | .bpc = 8, |
| 919 | .size = { |
| 920 | .width = 152, |
| 921 | .height = 91, |
| 922 | }, |
| 923 | .delay = { |
| 924 | .prepare = 200, |
| 925 | .enable = 50, |
| 926 | .disable = 50, |
| 927 | .unprepare = 1000, |
| 928 | }, |
| 929 | }; |
| 930 | |
Alex Gonzalez | 4fb8640 | 2018-10-25 17:09:30 +0200 | [diff] [blame] | 931 | static const struct drm_display_mode auo_g101evn010_mode = { |
| 932 | .clock = 68930, |
| 933 | .hdisplay = 1280, |
| 934 | .hsync_start = 1280 + 82, |
| 935 | .hsync_end = 1280 + 82 + 2, |
| 936 | .htotal = 1280 + 82 + 2 + 84, |
| 937 | .vdisplay = 800, |
| 938 | .vsync_start = 800 + 8, |
| 939 | .vsync_end = 800 + 8 + 2, |
| 940 | .vtotal = 800 + 8 + 2 + 6, |
Alex Gonzalez | 4fb8640 | 2018-10-25 17:09:30 +0200 | [diff] [blame] | 941 | }; |
| 942 | |
| 943 | static const struct panel_desc auo_g101evn010 = { |
| 944 | .modes = &auo_g101evn010_mode, |
| 945 | .num_modes = 1, |
| 946 | .bpc = 6, |
| 947 | .size = { |
| 948 | .width = 216, |
| 949 | .height = 135, |
| 950 | }, |
Tomi Valkeinen | 27a46fb | 2020-04-17 14:40:43 +0300 | [diff] [blame] | 951 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
| 952 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Alex Gonzalez | 4fb8640 | 2018-10-25 17:09:30 +0200 | [diff] [blame] | 953 | }; |
| 954 | |
Christoph Fritz | 4451c28 | 2017-12-16 14:13:36 +0100 | [diff] [blame] | 955 | static const struct drm_display_mode auo_g104sn02_mode = { |
| 956 | .clock = 40000, |
| 957 | .hdisplay = 800, |
| 958 | .hsync_start = 800 + 40, |
| 959 | .hsync_end = 800 + 40 + 216, |
| 960 | .htotal = 800 + 40 + 216 + 128, |
| 961 | .vdisplay = 600, |
| 962 | .vsync_start = 600 + 10, |
| 963 | .vsync_end = 600 + 10 + 35, |
| 964 | .vtotal = 600 + 10 + 35 + 2, |
Christoph Fritz | 4451c28 | 2017-12-16 14:13:36 +0100 | [diff] [blame] | 965 | }; |
| 966 | |
| 967 | static const struct panel_desc auo_g104sn02 = { |
| 968 | .modes = &auo_g104sn02_mode, |
| 969 | .num_modes = 1, |
| 970 | .bpc = 8, |
| 971 | .size = { |
| 972 | .width = 211, |
| 973 | .height = 158, |
| 974 | }, |
| 975 | }; |
| 976 | |
Sebastian Reichel | 03e909a | 2020-04-15 19:27:25 +0200 | [diff] [blame] | 977 | static const struct drm_display_mode auo_g121ean01_mode = { |
| 978 | .clock = 66700, |
| 979 | .hdisplay = 1280, |
| 980 | .hsync_start = 1280 + 58, |
| 981 | .hsync_end = 1280 + 58 + 8, |
| 982 | .htotal = 1280 + 58 + 8 + 70, |
| 983 | .vdisplay = 800, |
| 984 | .vsync_start = 800 + 6, |
| 985 | .vsync_end = 800 + 6 + 4, |
| 986 | .vtotal = 800 + 6 + 4 + 10, |
Sebastian Reichel | 03e909a | 2020-04-15 19:27:25 +0200 | [diff] [blame] | 987 | }; |
| 988 | |
| 989 | static const struct panel_desc auo_g121ean01 = { |
| 990 | .modes = &auo_g121ean01_mode, |
| 991 | .num_modes = 1, |
| 992 | .bpc = 8, |
| 993 | .size = { |
| 994 | .width = 261, |
| 995 | .height = 163, |
| 996 | }, |
| 997 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 998 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
| 999 | }; |
| 1000 | |
Lucas Stach | 697035c | 2016-11-30 14:09:55 +0100 | [diff] [blame] | 1001 | static const struct display_timing auo_g133han01_timings = { |
| 1002 | .pixelclock = { 134000000, 141200000, 149000000 }, |
| 1003 | .hactive = { 1920, 1920, 1920 }, |
| 1004 | .hfront_porch = { 39, 58, 77 }, |
| 1005 | .hback_porch = { 59, 88, 117 }, |
| 1006 | .hsync_len = { 28, 42, 56 }, |
| 1007 | .vactive = { 1080, 1080, 1080 }, |
| 1008 | .vfront_porch = { 3, 8, 11 }, |
| 1009 | .vback_porch = { 5, 14, 19 }, |
| 1010 | .vsync_len = { 4, 14, 19 }, |
| 1011 | }; |
| 1012 | |
| 1013 | static const struct panel_desc auo_g133han01 = { |
| 1014 | .timings = &auo_g133han01_timings, |
| 1015 | .num_timings = 1, |
| 1016 | .bpc = 8, |
| 1017 | .size = { |
| 1018 | .width = 293, |
| 1019 | .height = 165, |
| 1020 | }, |
| 1021 | .delay = { |
| 1022 | .prepare = 200, |
| 1023 | .enable = 50, |
| 1024 | .disable = 50, |
| 1025 | .unprepare = 1000, |
| 1026 | }, |
| 1027 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1028 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | 697035c | 2016-11-30 14:09:55 +0100 | [diff] [blame] | 1029 | }; |
| 1030 | |
Sebastian Reichel | d9ccd1f | 2020-04-15 19:27:24 +0200 | [diff] [blame] | 1031 | static const struct drm_display_mode auo_g156xtn01_mode = { |
| 1032 | .clock = 76000, |
| 1033 | .hdisplay = 1366, |
| 1034 | .hsync_start = 1366 + 33, |
| 1035 | .hsync_end = 1366 + 33 + 67, |
| 1036 | .htotal = 1560, |
| 1037 | .vdisplay = 768, |
| 1038 | .vsync_start = 768 + 4, |
| 1039 | .vsync_end = 768 + 4 + 4, |
| 1040 | .vtotal = 806, |
Sebastian Reichel | d9ccd1f | 2020-04-15 19:27:24 +0200 | [diff] [blame] | 1041 | }; |
| 1042 | |
| 1043 | static const struct panel_desc auo_g156xtn01 = { |
| 1044 | .modes = &auo_g156xtn01_mode, |
| 1045 | .num_modes = 1, |
| 1046 | .bpc = 8, |
| 1047 | .size = { |
| 1048 | .width = 344, |
| 1049 | .height = 194, |
| 1050 | }, |
| 1051 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 1052 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
| 1053 | }; |
| 1054 | |
Lucas Stach | 8c31f60 | 2016-11-30 14:09:56 +0100 | [diff] [blame] | 1055 | static const struct display_timing auo_g185han01_timings = { |
| 1056 | .pixelclock = { 120000000, 144000000, 175000000 }, |
| 1057 | .hactive = { 1920, 1920, 1920 }, |
Lucas Stach | f8c6bfc | 2019-07-10 15:07:40 +0200 | [diff] [blame] | 1058 | .hfront_porch = { 36, 120, 148 }, |
| 1059 | .hback_porch = { 24, 88, 108 }, |
| 1060 | .hsync_len = { 20, 48, 64 }, |
Lucas Stach | 8c31f60 | 2016-11-30 14:09:56 +0100 | [diff] [blame] | 1061 | .vactive = { 1080, 1080, 1080 }, |
| 1062 | .vfront_porch = { 6, 10, 40 }, |
| 1063 | .vback_porch = { 2, 5, 20 }, |
| 1064 | .vsync_len = { 2, 5, 20 }, |
| 1065 | }; |
| 1066 | |
| 1067 | static const struct panel_desc auo_g185han01 = { |
| 1068 | .timings = &auo_g185han01_timings, |
| 1069 | .num_timings = 1, |
| 1070 | .bpc = 8, |
| 1071 | .size = { |
| 1072 | .width = 409, |
| 1073 | .height = 230, |
| 1074 | }, |
| 1075 | .delay = { |
| 1076 | .prepare = 50, |
| 1077 | .enable = 200, |
| 1078 | .disable = 110, |
| 1079 | .unprepare = 1000, |
| 1080 | }, |
| 1081 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1082 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | 8c31f60 | 2016-11-30 14:09:56 +0100 | [diff] [blame] | 1083 | }; |
| 1084 | |
Sebastian Reichel | 2f7b832 | 2020-04-15 19:27:23 +0200 | [diff] [blame] | 1085 | static const struct display_timing auo_g190ean01_timings = { |
| 1086 | .pixelclock = { 90000000, 108000000, 135000000 }, |
| 1087 | .hactive = { 1280, 1280, 1280 }, |
| 1088 | .hfront_porch = { 126, 184, 1266 }, |
| 1089 | .hback_porch = { 84, 122, 844 }, |
| 1090 | .hsync_len = { 70, 102, 704 }, |
| 1091 | .vactive = { 1024, 1024, 1024 }, |
| 1092 | .vfront_porch = { 4, 26, 76 }, |
| 1093 | .vback_porch = { 2, 8, 25 }, |
| 1094 | .vsync_len = { 2, 8, 25 }, |
| 1095 | }; |
| 1096 | |
| 1097 | static const struct panel_desc auo_g190ean01 = { |
| 1098 | .timings = &auo_g190ean01_timings, |
| 1099 | .num_timings = 1, |
| 1100 | .bpc = 8, |
| 1101 | .size = { |
| 1102 | .width = 376, |
| 1103 | .height = 301, |
| 1104 | }, |
| 1105 | .delay = { |
| 1106 | .prepare = 50, |
| 1107 | .enable = 200, |
| 1108 | .disable = 110, |
| 1109 | .unprepare = 1000, |
| 1110 | }, |
| 1111 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 1112 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
| 1113 | }; |
| 1114 | |
Lucas Stach | 70c0d5b | 2017-06-08 20:07:58 +0200 | [diff] [blame] | 1115 | static const struct display_timing auo_p320hvn03_timings = { |
| 1116 | .pixelclock = { 106000000, 148500000, 164000000 }, |
| 1117 | .hactive = { 1920, 1920, 1920 }, |
| 1118 | .hfront_porch = { 25, 50, 130 }, |
| 1119 | .hback_porch = { 25, 50, 130 }, |
| 1120 | .hsync_len = { 20, 40, 105 }, |
| 1121 | .vactive = { 1080, 1080, 1080 }, |
| 1122 | .vfront_porch = { 8, 17, 150 }, |
| 1123 | .vback_porch = { 8, 17, 150 }, |
| 1124 | .vsync_len = { 4, 11, 100 }, |
| 1125 | }; |
| 1126 | |
| 1127 | static const struct panel_desc auo_p320hvn03 = { |
| 1128 | .timings = &auo_p320hvn03_timings, |
| 1129 | .num_timings = 1, |
| 1130 | .bpc = 8, |
| 1131 | .size = { |
| 1132 | .width = 698, |
| 1133 | .height = 393, |
| 1134 | }, |
| 1135 | .delay = { |
| 1136 | .prepare = 1, |
| 1137 | .enable = 450, |
| 1138 | .unprepare = 500, |
| 1139 | }, |
Lucas Stach | 2554f15 | 2018-04-11 17:27:41 +0200 | [diff] [blame] | 1140 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1141 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | 70c0d5b | 2017-06-08 20:07:58 +0200 | [diff] [blame] | 1142 | }; |
| 1143 | |
Haixia Shi | 7ee933a | 2016-10-11 14:59:16 -0700 | [diff] [blame] | 1144 | static const struct drm_display_mode auo_t215hvn01_mode = { |
| 1145 | .clock = 148800, |
| 1146 | .hdisplay = 1920, |
| 1147 | .hsync_start = 1920 + 88, |
| 1148 | .hsync_end = 1920 + 88 + 44, |
| 1149 | .htotal = 1920 + 88 + 44 + 148, |
| 1150 | .vdisplay = 1080, |
| 1151 | .vsync_start = 1080 + 4, |
| 1152 | .vsync_end = 1080 + 4 + 5, |
| 1153 | .vtotal = 1080 + 4 + 5 + 36, |
Haixia Shi | 7ee933a | 2016-10-11 14:59:16 -0700 | [diff] [blame] | 1154 | }; |
| 1155 | |
| 1156 | static const struct panel_desc auo_t215hvn01 = { |
| 1157 | .modes = &auo_t215hvn01_mode, |
| 1158 | .num_modes = 1, |
| 1159 | .bpc = 8, |
| 1160 | .size = { |
| 1161 | .width = 430, |
| 1162 | .height = 270, |
| 1163 | }, |
| 1164 | .delay = { |
| 1165 | .disable = 5, |
| 1166 | .unprepare = 1000, |
| 1167 | } |
| 1168 | }; |
| 1169 | |
Philipp Zabel | d47df63 | 2014-12-18 16:43:43 +0100 | [diff] [blame] | 1170 | static const struct drm_display_mode avic_tm070ddh03_mode = { |
| 1171 | .clock = 51200, |
| 1172 | .hdisplay = 1024, |
| 1173 | .hsync_start = 1024 + 160, |
| 1174 | .hsync_end = 1024 + 160 + 4, |
| 1175 | .htotal = 1024 + 160 + 4 + 156, |
| 1176 | .vdisplay = 600, |
| 1177 | .vsync_start = 600 + 17, |
| 1178 | .vsync_end = 600 + 17 + 1, |
| 1179 | .vtotal = 600 + 17 + 1 + 17, |
Philipp Zabel | d47df63 | 2014-12-18 16:43:43 +0100 | [diff] [blame] | 1180 | }; |
| 1181 | |
| 1182 | static const struct panel_desc avic_tm070ddh03 = { |
| 1183 | .modes = &avic_tm070ddh03_mode, |
| 1184 | .num_modes = 1, |
| 1185 | .bpc = 8, |
| 1186 | .size = { |
| 1187 | .width = 154, |
| 1188 | .height = 90, |
| 1189 | }, |
| 1190 | .delay = { |
| 1191 | .prepare = 20, |
| 1192 | .enable = 200, |
| 1193 | .disable = 200, |
| 1194 | }, |
| 1195 | }; |
| 1196 | |
Chen-Yu Tsai | 7ad8b41 | 2018-09-07 12:19:46 +0800 | [diff] [blame] | 1197 | static const struct drm_display_mode bananapi_s070wv20_ct16_mode = { |
| 1198 | .clock = 30000, |
| 1199 | .hdisplay = 800, |
| 1200 | .hsync_start = 800 + 40, |
| 1201 | .hsync_end = 800 + 40 + 48, |
| 1202 | .htotal = 800 + 40 + 48 + 40, |
| 1203 | .vdisplay = 480, |
| 1204 | .vsync_start = 480 + 13, |
| 1205 | .vsync_end = 480 + 13 + 3, |
| 1206 | .vtotal = 480 + 13 + 3 + 29, |
| 1207 | }; |
| 1208 | |
| 1209 | static const struct panel_desc bananapi_s070wv20_ct16 = { |
| 1210 | .modes = &bananapi_s070wv20_ct16_mode, |
| 1211 | .num_modes = 1, |
| 1212 | .bpc = 6, |
| 1213 | .size = { |
| 1214 | .width = 154, |
| 1215 | .height = 86, |
| 1216 | }, |
| 1217 | }; |
| 1218 | |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 1219 | static const struct drm_display_mode boe_hv070wsa_mode = { |
Andrzej Hajda | e077e2f | 2018-07-25 17:46:43 +0200 | [diff] [blame] | 1220 | .clock = 42105, |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 1221 | .hdisplay = 1024, |
Andrzej Hajda | e077e2f | 2018-07-25 17:46:43 +0200 | [diff] [blame] | 1222 | .hsync_start = 1024 + 30, |
| 1223 | .hsync_end = 1024 + 30 + 30, |
| 1224 | .htotal = 1024 + 30 + 30 + 30, |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 1225 | .vdisplay = 600, |
Andrzej Hajda | e077e2f | 2018-07-25 17:46:43 +0200 | [diff] [blame] | 1226 | .vsync_start = 600 + 10, |
| 1227 | .vsync_end = 600 + 10 + 10, |
| 1228 | .vtotal = 600 + 10 + 10 + 10, |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 1229 | }; |
| 1230 | |
| 1231 | static const struct panel_desc boe_hv070wsa = { |
| 1232 | .modes = &boe_hv070wsa_mode, |
| 1233 | .num_modes = 1, |
Sam Ravnborg | 2a5c2ff | 2020-04-13 20:30:05 +0200 | [diff] [blame] | 1234 | .bpc = 8, |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 1235 | .size = { |
| 1236 | .width = 154, |
| 1237 | .height = 90, |
| 1238 | }, |
Sam Ravnborg | 2a5c2ff | 2020-04-13 20:30:05 +0200 | [diff] [blame] | 1239 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 1240 | .bus_flags = DRM_BUS_FLAG_DE_HIGH, |
| 1241 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 1242 | }; |
| 1243 | |
Caesar Wang | cac1a41 | 2016-12-14 11:19:56 +0800 | [diff] [blame] | 1244 | static const struct drm_display_mode boe_nv101wxmn51_modes[] = { |
| 1245 | { |
| 1246 | .clock = 71900, |
| 1247 | .hdisplay = 1280, |
| 1248 | .hsync_start = 1280 + 48, |
| 1249 | .hsync_end = 1280 + 48 + 32, |
| 1250 | .htotal = 1280 + 48 + 32 + 80, |
| 1251 | .vdisplay = 800, |
| 1252 | .vsync_start = 800 + 3, |
| 1253 | .vsync_end = 800 + 3 + 5, |
| 1254 | .vtotal = 800 + 3 + 5 + 24, |
Caesar Wang | cac1a41 | 2016-12-14 11:19:56 +0800 | [diff] [blame] | 1255 | }, |
| 1256 | { |
| 1257 | .clock = 57500, |
| 1258 | .hdisplay = 1280, |
| 1259 | .hsync_start = 1280 + 48, |
| 1260 | .hsync_end = 1280 + 48 + 32, |
| 1261 | .htotal = 1280 + 48 + 32 + 80, |
| 1262 | .vdisplay = 800, |
| 1263 | .vsync_start = 800 + 3, |
| 1264 | .vsync_end = 800 + 3 + 5, |
| 1265 | .vtotal = 800 + 3 + 5 + 24, |
Caesar Wang | cac1a41 | 2016-12-14 11:19:56 +0800 | [diff] [blame] | 1266 | }, |
| 1267 | }; |
| 1268 | |
| 1269 | static const struct panel_desc boe_nv101wxmn51 = { |
| 1270 | .modes = boe_nv101wxmn51_modes, |
| 1271 | .num_modes = ARRAY_SIZE(boe_nv101wxmn51_modes), |
| 1272 | .bpc = 8, |
| 1273 | .size = { |
| 1274 | .width = 217, |
| 1275 | .height = 136, |
| 1276 | }, |
| 1277 | .delay = { |
| 1278 | .prepare = 210, |
| 1279 | .enable = 50, |
| 1280 | .unprepare = 160, |
| 1281 | }, |
| 1282 | }; |
| 1283 | |
Douglas Anderson | cfe40d0 | 2020-05-08 15:59:02 -0700 | [diff] [blame] | 1284 | /* Also used for boe_nv133fhm_n62 */ |
Bjorn Andersson | b0c664c | 2020-04-20 14:57:42 -0700 | [diff] [blame] | 1285 | static const struct drm_display_mode boe_nv133fhm_n61_modes = { |
| 1286 | .clock = 147840, |
| 1287 | .hdisplay = 1920, |
| 1288 | .hsync_start = 1920 + 48, |
| 1289 | .hsync_end = 1920 + 48 + 32, |
| 1290 | .htotal = 1920 + 48 + 32 + 200, |
| 1291 | .vdisplay = 1080, |
| 1292 | .vsync_start = 1080 + 3, |
| 1293 | .vsync_end = 1080 + 3 + 6, |
| 1294 | .vtotal = 1080 + 3 + 6 + 31, |
Bjorn Andersson | b0c664c | 2020-04-20 14:57:42 -0700 | [diff] [blame] | 1295 | }; |
| 1296 | |
Douglas Anderson | cfe40d0 | 2020-05-08 15:59:02 -0700 | [diff] [blame] | 1297 | /* Also used for boe_nv133fhm_n62 */ |
Bjorn Andersson | b0c664c | 2020-04-20 14:57:42 -0700 | [diff] [blame] | 1298 | static const struct panel_desc boe_nv133fhm_n61 = { |
| 1299 | .modes = &boe_nv133fhm_n61_modes, |
| 1300 | .num_modes = 1, |
Douglas Anderson | 9694d9c | 2020-05-08 15:59:00 -0700 | [diff] [blame] | 1301 | .bpc = 6, |
Bjorn Andersson | b0c664c | 2020-04-20 14:57:42 -0700 | [diff] [blame] | 1302 | .size = { |
Douglas Anderson | 9694d9c | 2020-05-08 15:59:00 -0700 | [diff] [blame] | 1303 | .width = 294, |
| 1304 | .height = 165, |
Bjorn Andersson | b0c664c | 2020-04-20 14:57:42 -0700 | [diff] [blame] | 1305 | }, |
| 1306 | .delay = { |
| 1307 | .hpd_absent_delay = 200, |
| 1308 | .unprepare = 500, |
| 1309 | }, |
| 1310 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 1311 | .bus_flags = DRM_BUS_FLAG_DATA_MSB_TO_LSB, |
| 1312 | .connector_type = DRM_MODE_CONNECTOR_eDP, |
| 1313 | }; |
| 1314 | |
Tobias Schramm | a511981 | 2020-01-09 12:29:52 +0100 | [diff] [blame] | 1315 | static const struct drm_display_mode boe_nv140fhmn49_modes[] = { |
| 1316 | { |
| 1317 | .clock = 148500, |
| 1318 | .hdisplay = 1920, |
| 1319 | .hsync_start = 1920 + 48, |
| 1320 | .hsync_end = 1920 + 48 + 32, |
| 1321 | .htotal = 2200, |
| 1322 | .vdisplay = 1080, |
| 1323 | .vsync_start = 1080 + 3, |
| 1324 | .vsync_end = 1080 + 3 + 5, |
| 1325 | .vtotal = 1125, |
Tobias Schramm | a511981 | 2020-01-09 12:29:52 +0100 | [diff] [blame] | 1326 | }, |
| 1327 | }; |
| 1328 | |
| 1329 | static const struct panel_desc boe_nv140fhmn49 = { |
| 1330 | .modes = boe_nv140fhmn49_modes, |
| 1331 | .num_modes = ARRAY_SIZE(boe_nv140fhmn49_modes), |
| 1332 | .bpc = 6, |
| 1333 | .size = { |
| 1334 | .width = 309, |
| 1335 | .height = 174, |
| 1336 | }, |
| 1337 | .delay = { |
| 1338 | .prepare = 210, |
| 1339 | .enable = 50, |
| 1340 | .unprepare = 160, |
| 1341 | }, |
| 1342 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 1343 | .connector_type = DRM_MODE_CONNECTOR_eDP, |
| 1344 | }; |
| 1345 | |
Giulio Benetti | e58edce | 2018-07-31 01:11:16 +0200 | [diff] [blame] | 1346 | static const struct drm_display_mode cdtech_s043wq26h_ct7_mode = { |
| 1347 | .clock = 9000, |
| 1348 | .hdisplay = 480, |
| 1349 | .hsync_start = 480 + 5, |
| 1350 | .hsync_end = 480 + 5 + 5, |
| 1351 | .htotal = 480 + 5 + 5 + 40, |
| 1352 | .vdisplay = 272, |
| 1353 | .vsync_start = 272 + 8, |
| 1354 | .vsync_end = 272 + 8 + 8, |
| 1355 | .vtotal = 272 + 8 + 8 + 8, |
Giulio Benetti | e58edce | 2018-07-31 01:11:16 +0200 | [diff] [blame] | 1356 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 1357 | }; |
| 1358 | |
| 1359 | static const struct panel_desc cdtech_s043wq26h_ct7 = { |
| 1360 | .modes = &cdtech_s043wq26h_ct7_mode, |
| 1361 | .num_modes = 1, |
| 1362 | .bpc = 8, |
| 1363 | .size = { |
| 1364 | .width = 95, |
| 1365 | .height = 54, |
| 1366 | }, |
Laurent Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 1367 | .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, |
Giulio Benetti | e58edce | 2018-07-31 01:11:16 +0200 | [diff] [blame] | 1368 | }; |
| 1369 | |
Michael Krummsdorf | 0e3b67f | 2020-06-12 09:22:18 +0200 | [diff] [blame] | 1370 | /* S070PWS19HP-FC21 2017/04/22 */ |
| 1371 | static const struct drm_display_mode cdtech_s070pws19hp_fc21_mode = { |
| 1372 | .clock = 51200, |
| 1373 | .hdisplay = 1024, |
| 1374 | .hsync_start = 1024 + 160, |
| 1375 | .hsync_end = 1024 + 160 + 20, |
| 1376 | .htotal = 1024 + 160 + 20 + 140, |
| 1377 | .vdisplay = 600, |
| 1378 | .vsync_start = 600 + 12, |
| 1379 | .vsync_end = 600 + 12 + 3, |
| 1380 | .vtotal = 600 + 12 + 3 + 20, |
| 1381 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 1382 | }; |
| 1383 | |
| 1384 | static const struct panel_desc cdtech_s070pws19hp_fc21 = { |
| 1385 | .modes = &cdtech_s070pws19hp_fc21_mode, |
| 1386 | .num_modes = 1, |
| 1387 | .bpc = 6, |
| 1388 | .size = { |
| 1389 | .width = 154, |
| 1390 | .height = 86, |
| 1391 | }, |
| 1392 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
Sam Ravnborg | f5436f7 | 2020-06-30 20:05:43 +0200 | [diff] [blame] | 1393 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, |
Michael Krummsdorf | 0e3b67f | 2020-06-12 09:22:18 +0200 | [diff] [blame] | 1394 | .connector_type = DRM_MODE_CONNECTOR_DPI, |
| 1395 | }; |
| 1396 | |
| 1397 | /* S070SWV29HG-DC44 2017/09/21 */ |
| 1398 | static const struct drm_display_mode cdtech_s070swv29hg_dc44_mode = { |
| 1399 | .clock = 33300, |
| 1400 | .hdisplay = 800, |
| 1401 | .hsync_start = 800 + 210, |
| 1402 | .hsync_end = 800 + 210 + 2, |
| 1403 | .htotal = 800 + 210 + 2 + 44, |
| 1404 | .vdisplay = 480, |
| 1405 | .vsync_start = 480 + 22, |
| 1406 | .vsync_end = 480 + 22 + 2, |
| 1407 | .vtotal = 480 + 22 + 2 + 21, |
| 1408 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 1409 | }; |
| 1410 | |
| 1411 | static const struct panel_desc cdtech_s070swv29hg_dc44 = { |
| 1412 | .modes = &cdtech_s070swv29hg_dc44_mode, |
| 1413 | .num_modes = 1, |
| 1414 | .bpc = 6, |
| 1415 | .size = { |
| 1416 | .width = 154, |
| 1417 | .height = 86, |
| 1418 | }, |
| 1419 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
Sam Ravnborg | f5436f7 | 2020-06-30 20:05:43 +0200 | [diff] [blame] | 1420 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, |
Michael Krummsdorf | 0e3b67f | 2020-06-12 09:22:18 +0200 | [diff] [blame] | 1421 | .connector_type = DRM_MODE_CONNECTOR_DPI, |
| 1422 | }; |
| 1423 | |
Giulio Benetti | 982f944 | 2018-07-31 01:11:14 +0200 | [diff] [blame] | 1424 | static const struct drm_display_mode cdtech_s070wv95_ct16_mode = { |
| 1425 | .clock = 35000, |
| 1426 | .hdisplay = 800, |
| 1427 | .hsync_start = 800 + 40, |
| 1428 | .hsync_end = 800 + 40 + 40, |
| 1429 | .htotal = 800 + 40 + 40 + 48, |
| 1430 | .vdisplay = 480, |
| 1431 | .vsync_start = 480 + 29, |
| 1432 | .vsync_end = 480 + 29 + 13, |
| 1433 | .vtotal = 480 + 29 + 13 + 3, |
Giulio Benetti | 982f944 | 2018-07-31 01:11:14 +0200 | [diff] [blame] | 1434 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 1435 | }; |
| 1436 | |
| 1437 | static const struct panel_desc cdtech_s070wv95_ct16 = { |
| 1438 | .modes = &cdtech_s070wv95_ct16_mode, |
| 1439 | .num_modes = 1, |
| 1440 | .bpc = 8, |
| 1441 | .size = { |
| 1442 | .width = 154, |
| 1443 | .height = 85, |
| 1444 | }, |
| 1445 | }; |
| 1446 | |
Randy Li | 2cb35c8 | 2016-09-20 03:02:51 +0800 | [diff] [blame] | 1447 | static const struct drm_display_mode chunghwa_claa070wp03xg_mode = { |
| 1448 | .clock = 66770, |
| 1449 | .hdisplay = 800, |
| 1450 | .hsync_start = 800 + 49, |
| 1451 | .hsync_end = 800 + 49 + 33, |
| 1452 | .htotal = 800 + 49 + 33 + 17, |
| 1453 | .vdisplay = 1280, |
| 1454 | .vsync_start = 1280 + 1, |
| 1455 | .vsync_end = 1280 + 1 + 7, |
| 1456 | .vtotal = 1280 + 1 + 7 + 15, |
Randy Li | 2cb35c8 | 2016-09-20 03:02:51 +0800 | [diff] [blame] | 1457 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 1458 | }; |
| 1459 | |
| 1460 | static const struct panel_desc chunghwa_claa070wp03xg = { |
| 1461 | .modes = &chunghwa_claa070wp03xg_mode, |
| 1462 | .num_modes = 1, |
| 1463 | .bpc = 6, |
| 1464 | .size = { |
| 1465 | .width = 94, |
| 1466 | .height = 150, |
| 1467 | }, |
Dmitry Osipenko | 8556082 | 2020-06-22 01:27:42 +0300 | [diff] [blame] | 1468 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Laurent Pinchart | c471583 | 2020-06-30 02:33:19 +0300 | [diff] [blame] | 1469 | .bus_flags = DRM_BUS_FLAG_DE_HIGH, |
Dmitry Osipenko | 94f0791 | 2020-06-18 01:27:03 +0300 | [diff] [blame] | 1470 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Randy Li | 2cb35c8 | 2016-09-20 03:02:51 +0800 | [diff] [blame] | 1471 | }; |
| 1472 | |
Stephen Warren | 4c93075 | 2014-01-07 16:46:26 -0700 | [diff] [blame] | 1473 | static const struct drm_display_mode chunghwa_claa101wa01a_mode = { |
| 1474 | .clock = 72070, |
| 1475 | .hdisplay = 1366, |
| 1476 | .hsync_start = 1366 + 58, |
| 1477 | .hsync_end = 1366 + 58 + 58, |
| 1478 | .htotal = 1366 + 58 + 58 + 58, |
| 1479 | .vdisplay = 768, |
| 1480 | .vsync_start = 768 + 4, |
| 1481 | .vsync_end = 768 + 4 + 4, |
| 1482 | .vtotal = 768 + 4 + 4 + 4, |
Stephen Warren | 4c93075 | 2014-01-07 16:46:26 -0700 | [diff] [blame] | 1483 | }; |
| 1484 | |
| 1485 | static const struct panel_desc chunghwa_claa101wa01a = { |
| 1486 | .modes = &chunghwa_claa101wa01a_mode, |
| 1487 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1488 | .bpc = 6, |
Stephen Warren | 4c93075 | 2014-01-07 16:46:26 -0700 | [diff] [blame] | 1489 | .size = { |
| 1490 | .width = 220, |
| 1491 | .height = 120, |
| 1492 | }, |
Dmitry Osipenko | 8556082 | 2020-06-22 01:27:42 +0300 | [diff] [blame] | 1493 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Laurent Pinchart | c471583 | 2020-06-30 02:33:19 +0300 | [diff] [blame] | 1494 | .bus_flags = DRM_BUS_FLAG_DE_HIGH, |
Dmitry Osipenko | 94f0791 | 2020-06-18 01:27:03 +0300 | [diff] [blame] | 1495 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Stephen Warren | 4c93075 | 2014-01-07 16:46:26 -0700 | [diff] [blame] | 1496 | }; |
| 1497 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1498 | static const struct drm_display_mode chunghwa_claa101wb01_mode = { |
| 1499 | .clock = 69300, |
| 1500 | .hdisplay = 1366, |
| 1501 | .hsync_start = 1366 + 48, |
| 1502 | .hsync_end = 1366 + 48 + 32, |
| 1503 | .htotal = 1366 + 48 + 32 + 20, |
| 1504 | .vdisplay = 768, |
| 1505 | .vsync_start = 768 + 16, |
| 1506 | .vsync_end = 768 + 16 + 8, |
| 1507 | .vtotal = 768 + 16 + 8 + 16, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1508 | }; |
| 1509 | |
| 1510 | static const struct panel_desc chunghwa_claa101wb01 = { |
| 1511 | .modes = &chunghwa_claa101wb01_mode, |
| 1512 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1513 | .bpc = 6, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1514 | .size = { |
| 1515 | .width = 223, |
| 1516 | .height = 125, |
| 1517 | }, |
Dmitry Osipenko | 8556082 | 2020-06-22 01:27:42 +0300 | [diff] [blame] | 1518 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Laurent Pinchart | c471583 | 2020-06-30 02:33:19 +0300 | [diff] [blame] | 1519 | .bus_flags = DRM_BUS_FLAG_DE_HIGH, |
Dmitry Osipenko | 94f0791 | 2020-06-18 01:27:03 +0300 | [diff] [blame] | 1520 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1521 | }; |
| 1522 | |
Michal Vokáč | 97ceb1f | 2018-06-25 14:41:30 +0200 | [diff] [blame] | 1523 | static const struct drm_display_mode dataimage_scf0700c48ggu18_mode = { |
| 1524 | .clock = 33260, |
| 1525 | .hdisplay = 800, |
| 1526 | .hsync_start = 800 + 40, |
| 1527 | .hsync_end = 800 + 40 + 128, |
| 1528 | .htotal = 800 + 40 + 128 + 88, |
| 1529 | .vdisplay = 480, |
| 1530 | .vsync_start = 480 + 10, |
| 1531 | .vsync_end = 480 + 10 + 2, |
| 1532 | .vtotal = 480 + 10 + 2 + 33, |
Michal Vokáč | 97ceb1f | 2018-06-25 14:41:30 +0200 | [diff] [blame] | 1533 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 1534 | }; |
| 1535 | |
| 1536 | static const struct panel_desc dataimage_scf0700c48ggu18 = { |
| 1537 | .modes = &dataimage_scf0700c48ggu18_mode, |
| 1538 | .num_modes = 1, |
| 1539 | .bpc = 8, |
| 1540 | .size = { |
| 1541 | .width = 152, |
| 1542 | .height = 91, |
| 1543 | }, |
| 1544 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Laurent Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 1545 | .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] | 1546 | }; |
| 1547 | |
Philipp Zabel | 0ca0c82 | 2018-05-23 11:25:04 +0200 | [diff] [blame] | 1548 | static const struct display_timing dlc_dlc0700yzg_1_timing = { |
| 1549 | .pixelclock = { 45000000, 51200000, 57000000 }, |
| 1550 | .hactive = { 1024, 1024, 1024 }, |
| 1551 | .hfront_porch = { 100, 106, 113 }, |
| 1552 | .hback_porch = { 100, 106, 113 }, |
| 1553 | .hsync_len = { 100, 108, 114 }, |
| 1554 | .vactive = { 600, 600, 600 }, |
| 1555 | .vfront_porch = { 8, 11, 15 }, |
| 1556 | .vback_porch = { 8, 11, 15 }, |
| 1557 | .vsync_len = { 9, 13, 15 }, |
| 1558 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 1559 | }; |
| 1560 | |
| 1561 | static const struct panel_desc dlc_dlc0700yzg_1 = { |
| 1562 | .timings = &dlc_dlc0700yzg_1_timing, |
| 1563 | .num_timings = 1, |
| 1564 | .bpc = 6, |
| 1565 | .size = { |
| 1566 | .width = 154, |
| 1567 | .height = 86, |
| 1568 | }, |
| 1569 | .delay = { |
| 1570 | .prepare = 30, |
| 1571 | .enable = 200, |
| 1572 | .disable = 200, |
| 1573 | }, |
| 1574 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1575 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Philipp Zabel | 0ca0c82 | 2018-05-23 11:25:04 +0200 | [diff] [blame] | 1576 | }; |
| 1577 | |
Marco Felsch | 6cbe7cd | 2018-09-24 17:26:10 +0200 | [diff] [blame] | 1578 | static const struct display_timing dlc_dlc1010gig_timing = { |
| 1579 | .pixelclock = { 68900000, 71100000, 73400000 }, |
| 1580 | .hactive = { 1280, 1280, 1280 }, |
| 1581 | .hfront_porch = { 43, 53, 63 }, |
| 1582 | .hback_porch = { 43, 53, 63 }, |
| 1583 | .hsync_len = { 44, 54, 64 }, |
| 1584 | .vactive = { 800, 800, 800 }, |
| 1585 | .vfront_porch = { 5, 8, 11 }, |
| 1586 | .vback_porch = { 5, 8, 11 }, |
| 1587 | .vsync_len = { 5, 7, 11 }, |
| 1588 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 1589 | }; |
| 1590 | |
| 1591 | static const struct panel_desc dlc_dlc1010gig = { |
| 1592 | .timings = &dlc_dlc1010gig_timing, |
| 1593 | .num_timings = 1, |
| 1594 | .bpc = 8, |
| 1595 | .size = { |
| 1596 | .width = 216, |
| 1597 | .height = 135, |
| 1598 | }, |
| 1599 | .delay = { |
| 1600 | .prepare = 60, |
| 1601 | .enable = 150, |
| 1602 | .disable = 100, |
| 1603 | .unprepare = 60, |
| 1604 | }, |
| 1605 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1606 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Marco Felsch | 6cbe7cd | 2018-09-24 17:26:10 +0200 | [diff] [blame] | 1607 | }; |
| 1608 | |
Andreas Pretzsch | c2d24af | 2019-04-16 12:16:30 +0200 | [diff] [blame] | 1609 | static const struct drm_display_mode edt_et035012dm6_mode = { |
| 1610 | .clock = 6500, |
| 1611 | .hdisplay = 320, |
| 1612 | .hsync_start = 320 + 20, |
| 1613 | .hsync_end = 320 + 20 + 30, |
| 1614 | .htotal = 320 + 20 + 68, |
| 1615 | .vdisplay = 240, |
| 1616 | .vsync_start = 240 + 4, |
| 1617 | .vsync_end = 240 + 4 + 4, |
| 1618 | .vtotal = 240 + 4 + 4 + 14, |
Andreas Pretzsch | c2d24af | 2019-04-16 12:16:30 +0200 | [diff] [blame] | 1619 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 1620 | }; |
| 1621 | |
| 1622 | static const struct panel_desc edt_et035012dm6 = { |
| 1623 | .modes = &edt_et035012dm6_mode, |
| 1624 | .num_modes = 1, |
| 1625 | .bpc = 8, |
| 1626 | .size = { |
| 1627 | .width = 70, |
| 1628 | .height = 52, |
| 1629 | }, |
| 1630 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Sam Ravnborg | f5436f7 | 2020-06-30 20:05:43 +0200 | [diff] [blame] | 1631 | .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, |
Andreas Pretzsch | c2d24af | 2019-04-16 12:16:30 +0200 | [diff] [blame] | 1632 | }; |
| 1633 | |
Marian-Cristian Rotariu | 82d57a5 | 2020-01-30 12:08:38 +0000 | [diff] [blame] | 1634 | static const struct drm_display_mode edt_etm043080dh6gp_mode = { |
| 1635 | .clock = 10870, |
| 1636 | .hdisplay = 480, |
| 1637 | .hsync_start = 480 + 8, |
| 1638 | .hsync_end = 480 + 8 + 4, |
| 1639 | .htotal = 480 + 8 + 4 + 41, |
| 1640 | |
| 1641 | /* |
| 1642 | * IWG22M: Y resolution changed for "dc_linuxfb" module crashing while |
| 1643 | * fb_align |
| 1644 | */ |
| 1645 | |
| 1646 | .vdisplay = 288, |
| 1647 | .vsync_start = 288 + 2, |
| 1648 | .vsync_end = 288 + 2 + 4, |
| 1649 | .vtotal = 288 + 2 + 4 + 10, |
Marian-Cristian Rotariu | 82d57a5 | 2020-01-30 12:08:38 +0000 | [diff] [blame] | 1650 | }; |
| 1651 | |
| 1652 | static const struct panel_desc edt_etm043080dh6gp = { |
| 1653 | .modes = &edt_etm043080dh6gp_mode, |
| 1654 | .num_modes = 1, |
| 1655 | .bpc = 8, |
| 1656 | .size = { |
| 1657 | .width = 100, |
| 1658 | .height = 65, |
| 1659 | }, |
| 1660 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 1661 | .connector_type = DRM_MODE_CONNECTOR_DPI, |
| 1662 | }; |
| 1663 | |
Marek Vasut | fd819bf | 2019-02-19 15:04:38 +0100 | [diff] [blame] | 1664 | static const struct drm_display_mode edt_etm0430g0dh6_mode = { |
| 1665 | .clock = 9000, |
| 1666 | .hdisplay = 480, |
| 1667 | .hsync_start = 480 + 2, |
| 1668 | .hsync_end = 480 + 2 + 41, |
| 1669 | .htotal = 480 + 2 + 41 + 2, |
| 1670 | .vdisplay = 272, |
| 1671 | .vsync_start = 272 + 2, |
| 1672 | .vsync_end = 272 + 2 + 10, |
| 1673 | .vtotal = 272 + 2 + 10 + 2, |
Marek Vasut | fd819bf | 2019-02-19 15:04:38 +0100 | [diff] [blame] | 1674 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 1675 | }; |
| 1676 | |
| 1677 | static const struct panel_desc edt_etm0430g0dh6 = { |
| 1678 | .modes = &edt_etm0430g0dh6_mode, |
| 1679 | .num_modes = 1, |
| 1680 | .bpc = 6, |
| 1681 | .size = { |
| 1682 | .width = 95, |
| 1683 | .height = 54, |
| 1684 | }, |
| 1685 | }; |
| 1686 | |
Stefan Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 1687 | static const struct drm_display_mode edt_et057090dhu_mode = { |
| 1688 | .clock = 25175, |
| 1689 | .hdisplay = 640, |
| 1690 | .hsync_start = 640 + 16, |
| 1691 | .hsync_end = 640 + 16 + 30, |
| 1692 | .htotal = 640 + 16 + 30 + 114, |
| 1693 | .vdisplay = 480, |
| 1694 | .vsync_start = 480 + 10, |
| 1695 | .vsync_end = 480 + 10 + 3, |
| 1696 | .vtotal = 480 + 10 + 3 + 32, |
Stefan Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 1697 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 1698 | }; |
| 1699 | |
| 1700 | static const struct panel_desc edt_et057090dhu = { |
| 1701 | .modes = &edt_et057090dhu_mode, |
| 1702 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1703 | .bpc = 6, |
Stefan Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 1704 | .size = { |
| 1705 | .width = 115, |
| 1706 | .height = 86, |
| 1707 | }, |
Stefan Agner | eaeebff | 2016-12-08 14:54:31 -0800 | [diff] [blame] | 1708 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
Laurent Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 1709 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, |
Dmitry Osipenko | 75e7322 | 2020-06-22 01:27:41 +0300 | [diff] [blame] | 1710 | .connector_type = DRM_MODE_CONNECTOR_DPI, |
Stefan Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 1711 | }; |
| 1712 | |
Philipp Zabel | fff5de4 | 2014-05-15 12:25:47 +0200 | [diff] [blame] | 1713 | static const struct drm_display_mode edt_etm0700g0dh6_mode = { |
| 1714 | .clock = 33260, |
| 1715 | .hdisplay = 800, |
| 1716 | .hsync_start = 800 + 40, |
| 1717 | .hsync_end = 800 + 40 + 128, |
| 1718 | .htotal = 800 + 40 + 128 + 88, |
| 1719 | .vdisplay = 480, |
| 1720 | .vsync_start = 480 + 10, |
| 1721 | .vsync_end = 480 + 10 + 2, |
| 1722 | .vtotal = 480 + 10 + 2 + 33, |
Philipp Zabel | fff5de4 | 2014-05-15 12:25:47 +0200 | [diff] [blame] | 1723 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 1724 | }; |
| 1725 | |
| 1726 | static const struct panel_desc edt_etm0700g0dh6 = { |
| 1727 | .modes = &edt_etm0700g0dh6_mode, |
| 1728 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1729 | .bpc = 6, |
Philipp Zabel | fff5de4 | 2014-05-15 12:25:47 +0200 | [diff] [blame] | 1730 | .size = { |
| 1731 | .width = 152, |
| 1732 | .height = 91, |
| 1733 | }, |
Stefan Agner | eaeebff | 2016-12-08 14:54:31 -0800 | [diff] [blame] | 1734 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
Laurent Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 1735 | .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] | 1736 | }; |
| 1737 | |
Jan Tuerk | aa7e645 | 2018-06-19 11:55:44 +0200 | [diff] [blame] | 1738 | static const struct panel_desc edt_etm0700g0bdh6 = { |
| 1739 | .modes = &edt_etm0700g0dh6_mode, |
| 1740 | .num_modes = 1, |
| 1741 | .bpc = 6, |
| 1742 | .size = { |
| 1743 | .width = 152, |
| 1744 | .height = 91, |
| 1745 | }, |
| 1746 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
Laurent Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 1747 | .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] | 1748 | }; |
| 1749 | |
Marco Felsch | 9158e3c | 2019-04-16 12:06:45 +0200 | [diff] [blame] | 1750 | static const struct display_timing evervision_vgg804821_timing = { |
| 1751 | .pixelclock = { 27600000, 33300000, 50000000 }, |
| 1752 | .hactive = { 800, 800, 800 }, |
| 1753 | .hfront_porch = { 40, 66, 70 }, |
| 1754 | .hback_porch = { 40, 67, 70 }, |
| 1755 | .hsync_len = { 40, 67, 70 }, |
| 1756 | .vactive = { 480, 480, 480 }, |
| 1757 | .vfront_porch = { 6, 10, 10 }, |
| 1758 | .vback_porch = { 7, 11, 11 }, |
| 1759 | .vsync_len = { 7, 11, 11 }, |
| 1760 | .flags = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_HIGH | |
| 1761 | DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE | |
| 1762 | DISPLAY_FLAGS_SYNC_NEGEDGE, |
| 1763 | }; |
| 1764 | |
| 1765 | static const struct panel_desc evervision_vgg804821 = { |
| 1766 | .timings = &evervision_vgg804821_timing, |
| 1767 | .num_timings = 1, |
| 1768 | .bpc = 8, |
| 1769 | .size = { |
| 1770 | .width = 108, |
| 1771 | .height = 64, |
| 1772 | }, |
| 1773 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Sam Ravnborg | f5436f7 | 2020-06-30 20:05:43 +0200 | [diff] [blame] | 1774 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, |
Marco Felsch | 9158e3c | 2019-04-16 12:06:45 +0200 | [diff] [blame] | 1775 | }; |
| 1776 | |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 1777 | static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = { |
| 1778 | .clock = 32260, |
| 1779 | .hdisplay = 800, |
| 1780 | .hsync_start = 800 + 168, |
| 1781 | .hsync_end = 800 + 168 + 64, |
| 1782 | .htotal = 800 + 168 + 64 + 88, |
| 1783 | .vdisplay = 480, |
| 1784 | .vsync_start = 480 + 37, |
| 1785 | .vsync_end = 480 + 37 + 2, |
| 1786 | .vtotal = 480 + 37 + 2 + 8, |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 1787 | }; |
| 1788 | |
| 1789 | static const struct panel_desc foxlink_fl500wvr00_a0t = { |
| 1790 | .modes = &foxlink_fl500wvr00_a0t_mode, |
| 1791 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 1792 | .bpc = 8, |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 1793 | .size = { |
| 1794 | .width = 108, |
| 1795 | .height = 65, |
| 1796 | }, |
Boris Brezillon | bb276cb | 2014-07-22 13:35:47 +0200 | [diff] [blame] | 1797 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 1798 | }; |
| 1799 | |
Paul Cercueil | 795db2a | 2020-07-16 14:56:47 +0200 | [diff] [blame] | 1800 | static const struct drm_display_mode frida_frd350h54004_modes[] = { |
| 1801 | { /* 60 Hz */ |
| 1802 | .clock = 6000, |
| 1803 | .hdisplay = 320, |
| 1804 | .hsync_start = 320 + 44, |
| 1805 | .hsync_end = 320 + 44 + 16, |
| 1806 | .htotal = 320 + 44 + 16 + 20, |
| 1807 | .vdisplay = 240, |
| 1808 | .vsync_start = 240 + 2, |
| 1809 | .vsync_end = 240 + 2 + 6, |
| 1810 | .vtotal = 240 + 2 + 6 + 2, |
| 1811 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 1812 | }, |
| 1813 | { /* 50 Hz */ |
| 1814 | .clock = 5400, |
| 1815 | .hdisplay = 320, |
| 1816 | .hsync_start = 320 + 56, |
| 1817 | .hsync_end = 320 + 56 + 16, |
| 1818 | .htotal = 320 + 56 + 16 + 40, |
| 1819 | .vdisplay = 240, |
| 1820 | .vsync_start = 240 + 2, |
| 1821 | .vsync_end = 240 + 2 + 6, |
| 1822 | .vtotal = 240 + 2 + 6 + 2, |
| 1823 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 1824 | }, |
Paul Cercueil | 7b6bd84 | 2020-01-13 13:17:41 -0300 | [diff] [blame] | 1825 | }; |
| 1826 | |
| 1827 | static const struct panel_desc frida_frd350h54004 = { |
Paul Cercueil | 795db2a | 2020-07-16 14:56:47 +0200 | [diff] [blame] | 1828 | .modes = frida_frd350h54004_modes, |
| 1829 | .num_modes = ARRAY_SIZE(frida_frd350h54004_modes), |
Paul Cercueil | 7b6bd84 | 2020-01-13 13:17:41 -0300 | [diff] [blame] | 1830 | .bpc = 8, |
| 1831 | .size = { |
| 1832 | .width = 77, |
| 1833 | .height = 64, |
| 1834 | }, |
| 1835 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Sam Ravnborg | f5436f7 | 2020-06-30 20:05:43 +0200 | [diff] [blame] | 1836 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, |
Paul Cercueil | 7b6bd84 | 2020-01-13 13:17:41 -0300 | [diff] [blame] | 1837 | .connector_type = DRM_MODE_CONNECTOR_DPI, |
| 1838 | }; |
| 1839 | |
Jagan Teki | 3be2071 | 2019-05-07 18:37:07 +0530 | [diff] [blame] | 1840 | static const struct drm_display_mode friendlyarm_hd702e_mode = { |
| 1841 | .clock = 67185, |
| 1842 | .hdisplay = 800, |
| 1843 | .hsync_start = 800 + 20, |
| 1844 | .hsync_end = 800 + 20 + 24, |
| 1845 | .htotal = 800 + 20 + 24 + 20, |
| 1846 | .vdisplay = 1280, |
| 1847 | .vsync_start = 1280 + 4, |
| 1848 | .vsync_end = 1280 + 4 + 8, |
| 1849 | .vtotal = 1280 + 4 + 8 + 4, |
Jagan Teki | 3be2071 | 2019-05-07 18:37:07 +0530 | [diff] [blame] | 1850 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 1851 | }; |
| 1852 | |
| 1853 | static const struct panel_desc friendlyarm_hd702e = { |
| 1854 | .modes = &friendlyarm_hd702e_mode, |
| 1855 | .num_modes = 1, |
| 1856 | .size = { |
| 1857 | .width = 94, |
| 1858 | .height = 151, |
| 1859 | }, |
| 1860 | }; |
| 1861 | |
Philipp Zabel | d435a2a | 2014-11-19 10:29:55 +0100 | [diff] [blame] | 1862 | static const struct drm_display_mode giantplus_gpg482739qs5_mode = { |
| 1863 | .clock = 9000, |
| 1864 | .hdisplay = 480, |
| 1865 | .hsync_start = 480 + 5, |
| 1866 | .hsync_end = 480 + 5 + 1, |
| 1867 | .htotal = 480 + 5 + 1 + 40, |
| 1868 | .vdisplay = 272, |
| 1869 | .vsync_start = 272 + 8, |
| 1870 | .vsync_end = 272 + 8 + 1, |
| 1871 | .vtotal = 272 + 8 + 1 + 8, |
Philipp Zabel | d435a2a | 2014-11-19 10:29:55 +0100 | [diff] [blame] | 1872 | }; |
| 1873 | |
| 1874 | static const struct panel_desc giantplus_gpg482739qs5 = { |
| 1875 | .modes = &giantplus_gpg482739qs5_mode, |
| 1876 | .num_modes = 1, |
| 1877 | .bpc = 8, |
| 1878 | .size = { |
| 1879 | .width = 95, |
| 1880 | .height = 54, |
| 1881 | }, |
Philipp Zabel | 33536a0 | 2015-02-11 18:50:07 +0100 | [diff] [blame] | 1882 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Philipp Zabel | d435a2a | 2014-11-19 10:29:55 +0100 | [diff] [blame] | 1883 | }; |
| 1884 | |
Paul Cercueil | 2c6574a | 2019-06-06 00:22:47 +0200 | [diff] [blame] | 1885 | static const struct display_timing giantplus_gpm940b0_timing = { |
| 1886 | .pixelclock = { 13500000, 27000000, 27500000 }, |
| 1887 | .hactive = { 320, 320, 320 }, |
| 1888 | .hfront_porch = { 14, 686, 718 }, |
| 1889 | .hback_porch = { 50, 70, 255 }, |
| 1890 | .hsync_len = { 1, 1, 1 }, |
| 1891 | .vactive = { 240, 240, 240 }, |
| 1892 | .vfront_porch = { 1, 1, 179 }, |
| 1893 | .vback_porch = { 1, 21, 31 }, |
| 1894 | .vsync_len = { 1, 1, 6 }, |
| 1895 | .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW, |
| 1896 | }; |
| 1897 | |
| 1898 | static const struct panel_desc giantplus_gpm940b0 = { |
| 1899 | .timings = &giantplus_gpm940b0_timing, |
| 1900 | .num_timings = 1, |
| 1901 | .bpc = 8, |
| 1902 | .size = { |
| 1903 | .width = 60, |
| 1904 | .height = 45, |
| 1905 | }, |
| 1906 | .bus_format = MEDIA_BUS_FMT_RGB888_3X8, |
Sam Ravnborg | f5436f7 | 2020-06-30 20:05:43 +0200 | [diff] [blame] | 1907 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, |
Paul Cercueil | 2c6574a | 2019-06-06 00:22:47 +0200 | [diff] [blame] | 1908 | }; |
| 1909 | |
Philipp Zabel | ab07725 | 2014-12-11 18:32:46 +0100 | [diff] [blame] | 1910 | static const struct display_timing hannstar_hsd070pww1_timing = { |
| 1911 | .pixelclock = { 64300000, 71100000, 82000000 }, |
| 1912 | .hactive = { 1280, 1280, 1280 }, |
| 1913 | .hfront_porch = { 1, 1, 10 }, |
| 1914 | .hback_porch = { 1, 1, 10 }, |
Philipp Zabel | d901d2b | 2015-08-12 12:32:13 +0200 | [diff] [blame] | 1915 | /* |
| 1916 | * According to the data sheet, the minimum horizontal blanking interval |
| 1917 | * is 54 clocks (1 + 52 + 1), but tests with a Nitrogen6X have shown the |
| 1918 | * minimum working horizontal blanking interval to be 60 clocks. |
| 1919 | */ |
| 1920 | .hsync_len = { 58, 158, 661 }, |
Philipp Zabel | ab07725 | 2014-12-11 18:32:46 +0100 | [diff] [blame] | 1921 | .vactive = { 800, 800, 800 }, |
| 1922 | .vfront_porch = { 1, 1, 10 }, |
| 1923 | .vback_porch = { 1, 1, 10 }, |
| 1924 | .vsync_len = { 1, 21, 203 }, |
| 1925 | .flags = DISPLAY_FLAGS_DE_HIGH, |
Philipp Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 1926 | }; |
| 1927 | |
| 1928 | static const struct panel_desc hannstar_hsd070pww1 = { |
Philipp Zabel | ab07725 | 2014-12-11 18:32:46 +0100 | [diff] [blame] | 1929 | .timings = &hannstar_hsd070pww1_timing, |
| 1930 | .num_timings = 1, |
Philipp Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 1931 | .bpc = 6, |
| 1932 | .size = { |
| 1933 | .width = 151, |
| 1934 | .height = 94, |
| 1935 | }, |
Philipp Zabel | 58d6a7b | 2015-08-12 12:32:12 +0200 | [diff] [blame] | 1936 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1937 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Philipp Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 1938 | }; |
| 1939 | |
Eric Nelson | c0d607e | 2015-04-13 15:09:26 -0700 | [diff] [blame] | 1940 | static const struct display_timing hannstar_hsd100pxn1_timing = { |
| 1941 | .pixelclock = { 55000000, 65000000, 75000000 }, |
| 1942 | .hactive = { 1024, 1024, 1024 }, |
| 1943 | .hfront_porch = { 40, 40, 40 }, |
| 1944 | .hback_porch = { 220, 220, 220 }, |
| 1945 | .hsync_len = { 20, 60, 100 }, |
| 1946 | .vactive = { 768, 768, 768 }, |
| 1947 | .vfront_porch = { 7, 7, 7 }, |
| 1948 | .vback_porch = { 21, 21, 21 }, |
| 1949 | .vsync_len = { 10, 10, 10 }, |
| 1950 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 1951 | }; |
| 1952 | |
| 1953 | static const struct panel_desc hannstar_hsd100pxn1 = { |
| 1954 | .timings = &hannstar_hsd100pxn1_timing, |
| 1955 | .num_timings = 1, |
| 1956 | .bpc = 6, |
| 1957 | .size = { |
| 1958 | .width = 203, |
| 1959 | .height = 152, |
| 1960 | }, |
Philipp Zabel | 4946b04 | 2015-05-20 11:34:08 +0200 | [diff] [blame] | 1961 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 1962 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Eric Nelson | c0d607e | 2015-04-13 15:09:26 -0700 | [diff] [blame] | 1963 | }; |
| 1964 | |
Lucas Stach | 61ac0bf | 2014-11-06 17:44:35 +0100 | [diff] [blame] | 1965 | static const struct drm_display_mode hitachi_tx23d38vm0caa_mode = { |
| 1966 | .clock = 33333, |
| 1967 | .hdisplay = 800, |
| 1968 | .hsync_start = 800 + 85, |
| 1969 | .hsync_end = 800 + 85 + 86, |
| 1970 | .htotal = 800 + 85 + 86 + 85, |
| 1971 | .vdisplay = 480, |
| 1972 | .vsync_start = 480 + 16, |
| 1973 | .vsync_end = 480 + 16 + 13, |
| 1974 | .vtotal = 480 + 16 + 13 + 16, |
Lucas Stach | 61ac0bf | 2014-11-06 17:44:35 +0100 | [diff] [blame] | 1975 | }; |
| 1976 | |
| 1977 | static const struct panel_desc hitachi_tx23d38vm0caa = { |
| 1978 | .modes = &hitachi_tx23d38vm0caa_mode, |
| 1979 | .num_modes = 1, |
| 1980 | .bpc = 6, |
| 1981 | .size = { |
| 1982 | .width = 195, |
| 1983 | .height = 117, |
| 1984 | }, |
Philipp Zabel | 6c684e3 | 2017-10-11 14:59:58 +0200 | [diff] [blame] | 1985 | .delay = { |
| 1986 | .enable = 160, |
| 1987 | .disable = 160, |
| 1988 | }, |
Lucas Stach | 61ac0bf | 2014-11-06 17:44:35 +0100 | [diff] [blame] | 1989 | }; |
| 1990 | |
Nicolas Ferre | 41bcceb | 2015-03-19 14:43:01 +0100 | [diff] [blame] | 1991 | static const struct drm_display_mode innolux_at043tn24_mode = { |
| 1992 | .clock = 9000, |
| 1993 | .hdisplay = 480, |
| 1994 | .hsync_start = 480 + 2, |
| 1995 | .hsync_end = 480 + 2 + 41, |
| 1996 | .htotal = 480 + 2 + 41 + 2, |
| 1997 | .vdisplay = 272, |
| 1998 | .vsync_start = 272 + 2, |
Philipp Zabel | a483159 | 2017-10-11 14:59:56 +0200 | [diff] [blame] | 1999 | .vsync_end = 272 + 2 + 10, |
| 2000 | .vtotal = 272 + 2 + 10 + 2, |
Nicolas Ferre | 41bcceb | 2015-03-19 14:43:01 +0100 | [diff] [blame] | 2001 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 2002 | }; |
| 2003 | |
| 2004 | static const struct panel_desc innolux_at043tn24 = { |
| 2005 | .modes = &innolux_at043tn24_mode, |
| 2006 | .num_modes = 1, |
| 2007 | .bpc = 8, |
| 2008 | .size = { |
| 2009 | .width = 95, |
| 2010 | .height = 54, |
| 2011 | }, |
| 2012 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Laurent Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 2013 | .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] | 2014 | }; |
| 2015 | |
Riccardo Bortolato | 4fc24ab | 2016-04-20 15:37:15 +0200 | [diff] [blame] | 2016 | static const struct drm_display_mode innolux_at070tn92_mode = { |
| 2017 | .clock = 33333, |
| 2018 | .hdisplay = 800, |
| 2019 | .hsync_start = 800 + 210, |
| 2020 | .hsync_end = 800 + 210 + 20, |
| 2021 | .htotal = 800 + 210 + 20 + 46, |
| 2022 | .vdisplay = 480, |
| 2023 | .vsync_start = 480 + 22, |
| 2024 | .vsync_end = 480 + 22 + 10, |
| 2025 | .vtotal = 480 + 22 + 23 + 10, |
Riccardo Bortolato | 4fc24ab | 2016-04-20 15:37:15 +0200 | [diff] [blame] | 2026 | }; |
| 2027 | |
| 2028 | static const struct panel_desc innolux_at070tn92 = { |
| 2029 | .modes = &innolux_at070tn92_mode, |
| 2030 | .num_modes = 1, |
| 2031 | .size = { |
| 2032 | .width = 154, |
| 2033 | .height = 86, |
| 2034 | }, |
| 2035 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 2036 | }; |
| 2037 | |
Christoph Fritz | a5d2ade | 2018-06-04 13:16:48 +0200 | [diff] [blame] | 2038 | static const struct display_timing innolux_g070y2_l01_timing = { |
| 2039 | .pixelclock = { 28000000, 29500000, 32000000 }, |
| 2040 | .hactive = { 800, 800, 800 }, |
| 2041 | .hfront_porch = { 61, 91, 141 }, |
| 2042 | .hback_porch = { 60, 90, 140 }, |
| 2043 | .hsync_len = { 12, 12, 12 }, |
| 2044 | .vactive = { 480, 480, 480 }, |
| 2045 | .vfront_porch = { 4, 9, 30 }, |
| 2046 | .vback_porch = { 4, 8, 28 }, |
| 2047 | .vsync_len = { 2, 2, 2 }, |
| 2048 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 2049 | }; |
| 2050 | |
| 2051 | static const struct panel_desc innolux_g070y2_l01 = { |
| 2052 | .timings = &innolux_g070y2_l01_timing, |
| 2053 | .num_timings = 1, |
| 2054 | .bpc = 6, |
| 2055 | .size = { |
| 2056 | .width = 152, |
| 2057 | .height = 91, |
| 2058 | }, |
| 2059 | .delay = { |
| 2060 | .prepare = 10, |
| 2061 | .enable = 100, |
| 2062 | .disable = 100, |
| 2063 | .unprepare = 800, |
| 2064 | }, |
| 2065 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2066 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Christoph Fritz | a5d2ade | 2018-06-04 13:16:48 +0200 | [diff] [blame] | 2067 | }; |
| 2068 | |
Michael Olbrich | 1e29b84 | 2016-08-15 14:32:02 +0200 | [diff] [blame] | 2069 | static const struct display_timing innolux_g101ice_l01_timing = { |
| 2070 | .pixelclock = { 60400000, 71100000, 74700000 }, |
| 2071 | .hactive = { 1280, 1280, 1280 }, |
| 2072 | .hfront_porch = { 41, 80, 100 }, |
| 2073 | .hback_porch = { 40, 79, 99 }, |
| 2074 | .hsync_len = { 1, 1, 1 }, |
| 2075 | .vactive = { 800, 800, 800 }, |
| 2076 | .vfront_porch = { 5, 11, 14 }, |
| 2077 | .vback_porch = { 4, 11, 14 }, |
| 2078 | .vsync_len = { 1, 1, 1 }, |
| 2079 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 2080 | }; |
| 2081 | |
| 2082 | static const struct panel_desc innolux_g101ice_l01 = { |
| 2083 | .timings = &innolux_g101ice_l01_timing, |
| 2084 | .num_timings = 1, |
| 2085 | .bpc = 8, |
| 2086 | .size = { |
| 2087 | .width = 217, |
| 2088 | .height = 135, |
| 2089 | }, |
| 2090 | .delay = { |
| 2091 | .enable = 200, |
| 2092 | .disable = 200, |
| 2093 | }, |
| 2094 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2095 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Michael Olbrich | 1e29b84 | 2016-08-15 14:32:02 +0200 | [diff] [blame] | 2096 | }; |
| 2097 | |
Lucas Stach | 4ae13e4 | 2016-11-30 14:09:54 +0100 | [diff] [blame] | 2098 | static const struct display_timing innolux_g121i1_l01_timing = { |
| 2099 | .pixelclock = { 67450000, 71000000, 74550000 }, |
| 2100 | .hactive = { 1280, 1280, 1280 }, |
| 2101 | .hfront_porch = { 40, 80, 160 }, |
| 2102 | .hback_porch = { 39, 79, 159 }, |
| 2103 | .hsync_len = { 1, 1, 1 }, |
| 2104 | .vactive = { 800, 800, 800 }, |
| 2105 | .vfront_porch = { 5, 11, 100 }, |
| 2106 | .vback_porch = { 4, 11, 99 }, |
| 2107 | .vsync_len = { 1, 1, 1 }, |
Lucas Stach | d731f66 | 2014-11-06 17:44:33 +0100 | [diff] [blame] | 2108 | }; |
| 2109 | |
| 2110 | static const struct panel_desc innolux_g121i1_l01 = { |
Lucas Stach | 4ae13e4 | 2016-11-30 14:09:54 +0100 | [diff] [blame] | 2111 | .timings = &innolux_g121i1_l01_timing, |
| 2112 | .num_timings = 1, |
Lucas Stach | d731f66 | 2014-11-06 17:44:33 +0100 | [diff] [blame] | 2113 | .bpc = 6, |
| 2114 | .size = { |
| 2115 | .width = 261, |
| 2116 | .height = 163, |
| 2117 | }, |
Lucas Stach | 4ae13e4 | 2016-11-30 14:09:54 +0100 | [diff] [blame] | 2118 | .delay = { |
| 2119 | .enable = 200, |
| 2120 | .disable = 20, |
| 2121 | }, |
| 2122 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2123 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | d731f66 | 2014-11-06 17:44:33 +0100 | [diff] [blame] | 2124 | }; |
| 2125 | |
Akshay Bhat | f8fa17b | 2015-11-18 15:57:47 -0500 | [diff] [blame] | 2126 | static const struct drm_display_mode innolux_g121x1_l03_mode = { |
| 2127 | .clock = 65000, |
| 2128 | .hdisplay = 1024, |
| 2129 | .hsync_start = 1024 + 0, |
| 2130 | .hsync_end = 1024 + 1, |
| 2131 | .htotal = 1024 + 0 + 1 + 320, |
| 2132 | .vdisplay = 768, |
| 2133 | .vsync_start = 768 + 38, |
| 2134 | .vsync_end = 768 + 38 + 1, |
| 2135 | .vtotal = 768 + 38 + 1 + 0, |
Akshay Bhat | 2e8c5eb | 2016-03-01 18:06:54 -0500 | [diff] [blame] | 2136 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
Akshay Bhat | f8fa17b | 2015-11-18 15:57:47 -0500 | [diff] [blame] | 2137 | }; |
| 2138 | |
| 2139 | static const struct panel_desc innolux_g121x1_l03 = { |
| 2140 | .modes = &innolux_g121x1_l03_mode, |
| 2141 | .num_modes = 1, |
| 2142 | .bpc = 6, |
| 2143 | .size = { |
| 2144 | .width = 246, |
| 2145 | .height = 185, |
| 2146 | }, |
| 2147 | .delay = { |
| 2148 | .enable = 200, |
| 2149 | .unprepare = 200, |
| 2150 | .disable = 400, |
| 2151 | }, |
| 2152 | }; |
| 2153 | |
Douglas Anderson | d719cbe | 2019-07-11 13:34:54 -0700 | [diff] [blame] | 2154 | /* |
| 2155 | * Datasheet specifies that at 60 Hz refresh rate: |
| 2156 | * - total horizontal time: { 1506, 1592, 1716 } |
| 2157 | * - total vertical time: { 788, 800, 868 } |
| 2158 | * |
| 2159 | * ...but doesn't go into exactly how that should be split into a front |
| 2160 | * porch, back porch, or sync length. For now we'll leave a single setting |
| 2161 | * here which allows a bit of tweaking of the pixel clock at the expense of |
| 2162 | * refresh rate. |
| 2163 | */ |
| 2164 | static const struct display_timing innolux_n116bge_timing = { |
| 2165 | .pixelclock = { 72600000, 76420000, 80240000 }, |
| 2166 | .hactive = { 1366, 1366, 1366 }, |
| 2167 | .hfront_porch = { 136, 136, 136 }, |
| 2168 | .hback_porch = { 60, 60, 60 }, |
| 2169 | .hsync_len = { 30, 30, 30 }, |
| 2170 | .vactive = { 768, 768, 768 }, |
| 2171 | .vfront_porch = { 8, 8, 8 }, |
| 2172 | .vback_porch = { 12, 12, 12 }, |
| 2173 | .vsync_len = { 12, 12, 12 }, |
| 2174 | .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW, |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 2175 | }; |
| 2176 | |
| 2177 | static const struct panel_desc innolux_n116bge = { |
Douglas Anderson | d719cbe | 2019-07-11 13:34:54 -0700 | [diff] [blame] | 2178 | .timings = &innolux_n116bge_timing, |
| 2179 | .num_timings = 1, |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 2180 | .bpc = 6, |
| 2181 | .size = { |
| 2182 | .width = 256, |
| 2183 | .height = 144, |
| 2184 | }, |
| 2185 | }; |
| 2186 | |
Alban Bedel | ea44739 | 2014-07-22 08:38:55 +0200 | [diff] [blame] | 2187 | static const struct drm_display_mode innolux_n156bge_l21_mode = { |
| 2188 | .clock = 69300, |
| 2189 | .hdisplay = 1366, |
| 2190 | .hsync_start = 1366 + 16, |
| 2191 | .hsync_end = 1366 + 16 + 34, |
| 2192 | .htotal = 1366 + 16 + 34 + 50, |
| 2193 | .vdisplay = 768, |
| 2194 | .vsync_start = 768 + 2, |
| 2195 | .vsync_end = 768 + 2 + 6, |
| 2196 | .vtotal = 768 + 2 + 6 + 12, |
Alban Bedel | ea44739 | 2014-07-22 08:38:55 +0200 | [diff] [blame] | 2197 | }; |
| 2198 | |
| 2199 | static const struct panel_desc innolux_n156bge_l21 = { |
| 2200 | .modes = &innolux_n156bge_l21_mode, |
| 2201 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 2202 | .bpc = 6, |
Alban Bedel | ea44739 | 2014-07-22 08:38:55 +0200 | [diff] [blame] | 2203 | .size = { |
| 2204 | .width = 344, |
| 2205 | .height = 193, |
| 2206 | }, |
Dmitry Osipenko | 8556082 | 2020-06-22 01:27:42 +0300 | [diff] [blame] | 2207 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Laurent Pinchart | c471583 | 2020-06-30 02:33:19 +0300 | [diff] [blame] | 2208 | .bus_flags = DRM_BUS_FLAG_DE_HIGH, |
Dmitry Osipenko | 94f0791 | 2020-06-18 01:27:03 +0300 | [diff] [blame] | 2209 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Alban Bedel | ea44739 | 2014-07-22 08:38:55 +0200 | [diff] [blame] | 2210 | }; |
| 2211 | |
Douglas Anderson | 8f054b6 | 2018-10-25 15:21:34 -0700 | [diff] [blame] | 2212 | static const struct drm_display_mode innolux_p120zdg_bf1_mode = { |
spanda@codeaurora.org | da50bd4 | 2018-05-15 11:22:43 +0530 | [diff] [blame] | 2213 | .clock = 206016, |
| 2214 | .hdisplay = 2160, |
| 2215 | .hsync_start = 2160 + 48, |
| 2216 | .hsync_end = 2160 + 48 + 32, |
| 2217 | .htotal = 2160 + 48 + 32 + 80, |
| 2218 | .vdisplay = 1440, |
| 2219 | .vsync_start = 1440 + 3, |
| 2220 | .vsync_end = 1440 + 3 + 10, |
| 2221 | .vtotal = 1440 + 3 + 10 + 27, |
spanda@codeaurora.org | da50bd4 | 2018-05-15 11:22:43 +0530 | [diff] [blame] | 2222 | .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, |
| 2223 | }; |
| 2224 | |
Douglas Anderson | 8f054b6 | 2018-10-25 15:21:34 -0700 | [diff] [blame] | 2225 | static const struct panel_desc innolux_p120zdg_bf1 = { |
| 2226 | .modes = &innolux_p120zdg_bf1_mode, |
spanda@codeaurora.org | da50bd4 | 2018-05-15 11:22:43 +0530 | [diff] [blame] | 2227 | .num_modes = 1, |
| 2228 | .bpc = 8, |
| 2229 | .size = { |
Douglas Anderson | 8f054b6 | 2018-10-25 15:21:34 -0700 | [diff] [blame] | 2230 | .width = 254, |
| 2231 | .height = 169, |
spanda@codeaurora.org | da50bd4 | 2018-05-15 11:22:43 +0530 | [diff] [blame] | 2232 | }, |
Sean Paul | 22fd99e | 2018-08-13 17:30:40 -0400 | [diff] [blame] | 2233 | .delay = { |
Douglas Anderson | 625d3b5 | 2018-10-25 15:21:31 -0700 | [diff] [blame] | 2234 | .hpd_absent_delay = 200, |
Sean Paul | 22fd99e | 2018-08-13 17:30:40 -0400 | [diff] [blame] | 2235 | .unprepare = 500, |
| 2236 | }, |
spanda@codeaurora.org | da50bd4 | 2018-05-15 11:22:43 +0530 | [diff] [blame] | 2237 | }; |
| 2238 | |
Michael Grzeschik | bccac3f | 2015-03-19 12:22:44 +0100 | [diff] [blame] | 2239 | static const struct drm_display_mode innolux_zj070na_01p_mode = { |
| 2240 | .clock = 51501, |
| 2241 | .hdisplay = 1024, |
| 2242 | .hsync_start = 1024 + 128, |
| 2243 | .hsync_end = 1024 + 128 + 64, |
| 2244 | .htotal = 1024 + 128 + 64 + 128, |
| 2245 | .vdisplay = 600, |
| 2246 | .vsync_start = 600 + 16, |
| 2247 | .vsync_end = 600 + 16 + 4, |
| 2248 | .vtotal = 600 + 16 + 4 + 16, |
Michael Grzeschik | bccac3f | 2015-03-19 12:22:44 +0100 | [diff] [blame] | 2249 | }; |
| 2250 | |
| 2251 | static const struct panel_desc innolux_zj070na_01p = { |
| 2252 | .modes = &innolux_zj070na_01p_mode, |
| 2253 | .num_modes = 1, |
| 2254 | .bpc = 6, |
| 2255 | .size = { |
Thierry Reding | 8159884 | 2016-06-10 15:33:13 +0200 | [diff] [blame] | 2256 | .width = 154, |
| 2257 | .height = 90, |
Michael Grzeschik | bccac3f | 2015-03-19 12:22:44 +0100 | [diff] [blame] | 2258 | }, |
| 2259 | }; |
| 2260 | |
Bjorn Andersson | e1ca518 | 2020-04-20 14:57:28 -0700 | [diff] [blame] | 2261 | static const struct drm_display_mode ivo_m133nwf4_r0_mode = { |
| 2262 | .clock = 138778, |
| 2263 | .hdisplay = 1920, |
| 2264 | .hsync_start = 1920 + 24, |
| 2265 | .hsync_end = 1920 + 24 + 48, |
| 2266 | .htotal = 1920 + 24 + 48 + 88, |
| 2267 | .vdisplay = 1080, |
| 2268 | .vsync_start = 1080 + 3, |
| 2269 | .vsync_end = 1080 + 3 + 12, |
| 2270 | .vtotal = 1080 + 3 + 12 + 17, |
Bjorn Andersson | e1ca518 | 2020-04-20 14:57:28 -0700 | [diff] [blame] | 2271 | .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, |
| 2272 | }; |
| 2273 | |
| 2274 | static const struct panel_desc ivo_m133nwf4_r0 = { |
| 2275 | .modes = &ivo_m133nwf4_r0_mode, |
| 2276 | .num_modes = 1, |
| 2277 | .bpc = 8, |
| 2278 | .size = { |
| 2279 | .width = 294, |
| 2280 | .height = 165, |
| 2281 | }, |
| 2282 | .delay = { |
| 2283 | .hpd_absent_delay = 200, |
| 2284 | .unprepare = 500, |
| 2285 | }, |
| 2286 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 2287 | .bus_flags = DRM_BUS_FLAG_DATA_MSB_TO_LSB, |
| 2288 | .connector_type = DRM_MODE_CONNECTOR_eDP, |
| 2289 | }; |
| 2290 | |
Lukasz Majewski | 14bf60c | 2019-05-15 18:06:12 +0200 | [diff] [blame] | 2291 | static const struct display_timing koe_tx14d24vm1bpa_timing = { |
| 2292 | .pixelclock = { 5580000, 5850000, 6200000 }, |
| 2293 | .hactive = { 320, 320, 320 }, |
| 2294 | .hfront_porch = { 30, 30, 30 }, |
| 2295 | .hback_porch = { 30, 30, 30 }, |
| 2296 | .hsync_len = { 1, 5, 17 }, |
| 2297 | .vactive = { 240, 240, 240 }, |
| 2298 | .vfront_porch = { 6, 6, 6 }, |
| 2299 | .vback_porch = { 5, 5, 5 }, |
| 2300 | .vsync_len = { 1, 2, 11 }, |
| 2301 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 2302 | }; |
| 2303 | |
| 2304 | static const struct panel_desc koe_tx14d24vm1bpa = { |
| 2305 | .timings = &koe_tx14d24vm1bpa_timing, |
| 2306 | .num_timings = 1, |
| 2307 | .bpc = 6, |
| 2308 | .size = { |
| 2309 | .width = 115, |
| 2310 | .height = 86, |
| 2311 | }, |
| 2312 | }; |
| 2313 | |
Liu Ying | 8a07052 | 2020-06-01 14:11:20 +0800 | [diff] [blame] | 2314 | static const struct display_timing koe_tx26d202vm0bwa_timing = { |
| 2315 | .pixelclock = { 151820000, 156720000, 159780000 }, |
| 2316 | .hactive = { 1920, 1920, 1920 }, |
| 2317 | .hfront_porch = { 105, 130, 142 }, |
| 2318 | .hback_porch = { 45, 70, 82 }, |
| 2319 | .hsync_len = { 30, 30, 30 }, |
| 2320 | .vactive = { 1200, 1200, 1200}, |
| 2321 | .vfront_porch = { 3, 5, 10 }, |
| 2322 | .vback_porch = { 2, 5, 10 }, |
| 2323 | .vsync_len = { 5, 5, 5 }, |
| 2324 | }; |
| 2325 | |
| 2326 | static const struct panel_desc koe_tx26d202vm0bwa = { |
| 2327 | .timings = &koe_tx26d202vm0bwa_timing, |
| 2328 | .num_timings = 1, |
| 2329 | .bpc = 8, |
| 2330 | .size = { |
| 2331 | .width = 217, |
| 2332 | .height = 136, |
| 2333 | }, |
| 2334 | .delay = { |
| 2335 | .prepare = 1000, |
| 2336 | .enable = 1000, |
| 2337 | .unprepare = 1000, |
| 2338 | .disable = 1000, |
| 2339 | }, |
| 2340 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | c471583 | 2020-06-30 02:33:19 +0300 | [diff] [blame] | 2341 | .bus_flags = DRM_BUS_FLAG_DE_HIGH, |
Liu Ying | 8a07052 | 2020-06-01 14:11:20 +0800 | [diff] [blame] | 2342 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
| 2343 | }; |
| 2344 | |
Jagan Teki | 8cfe834 | 2018-02-04 23:19:28 +0530 | [diff] [blame] | 2345 | static const struct display_timing koe_tx31d200vm0baa_timing = { |
| 2346 | .pixelclock = { 39600000, 43200000, 48000000 }, |
| 2347 | .hactive = { 1280, 1280, 1280 }, |
| 2348 | .hfront_porch = { 16, 36, 56 }, |
| 2349 | .hback_porch = { 16, 36, 56 }, |
| 2350 | .hsync_len = { 8, 8, 8 }, |
| 2351 | .vactive = { 480, 480, 480 }, |
Stefan Agner | c9b6be7 | 2018-04-19 23:20:03 +0200 | [diff] [blame] | 2352 | .vfront_porch = { 6, 21, 33 }, |
| 2353 | .vback_porch = { 6, 21, 33 }, |
Jagan Teki | 8cfe834 | 2018-02-04 23:19:28 +0530 | [diff] [blame] | 2354 | .vsync_len = { 8, 8, 8 }, |
| 2355 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 2356 | }; |
| 2357 | |
| 2358 | static const struct panel_desc koe_tx31d200vm0baa = { |
| 2359 | .timings = &koe_tx31d200vm0baa_timing, |
| 2360 | .num_timings = 1, |
| 2361 | .bpc = 6, |
| 2362 | .size = { |
| 2363 | .width = 292, |
| 2364 | .height = 109, |
| 2365 | }, |
| 2366 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2367 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Jagan Teki | 8cfe834 | 2018-02-04 23:19:28 +0530 | [diff] [blame] | 2368 | }; |
| 2369 | |
Lucas Stach | 8def22e | 2015-12-02 19:41:11 +0100 | [diff] [blame] | 2370 | static const struct display_timing kyo_tcg121xglp_timing = { |
| 2371 | .pixelclock = { 52000000, 65000000, 71000000 }, |
| 2372 | .hactive = { 1024, 1024, 1024 }, |
| 2373 | .hfront_porch = { 2, 2, 2 }, |
| 2374 | .hback_porch = { 2, 2, 2 }, |
| 2375 | .hsync_len = { 86, 124, 244 }, |
| 2376 | .vactive = { 768, 768, 768 }, |
| 2377 | .vfront_porch = { 2, 2, 2 }, |
| 2378 | .vback_porch = { 2, 2, 2 }, |
| 2379 | .vsync_len = { 6, 34, 73 }, |
| 2380 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 2381 | }; |
| 2382 | |
| 2383 | static const struct panel_desc kyo_tcg121xglp = { |
| 2384 | .timings = &kyo_tcg121xglp_timing, |
| 2385 | .num_timings = 1, |
| 2386 | .bpc = 8, |
| 2387 | .size = { |
| 2388 | .width = 246, |
| 2389 | .height = 184, |
| 2390 | }, |
| 2391 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2392 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | 8def22e | 2015-12-02 19:41:11 +0100 | [diff] [blame] | 2393 | }; |
| 2394 | |
Paul Kocialkowski | 27abdd8 | 2018-11-07 19:18:41 +0100 | [diff] [blame] | 2395 | static const struct drm_display_mode lemaker_bl035_rgb_002_mode = { |
| 2396 | .clock = 7000, |
| 2397 | .hdisplay = 320, |
| 2398 | .hsync_start = 320 + 20, |
| 2399 | .hsync_end = 320 + 20 + 30, |
| 2400 | .htotal = 320 + 20 + 30 + 38, |
| 2401 | .vdisplay = 240, |
| 2402 | .vsync_start = 240 + 4, |
| 2403 | .vsync_end = 240 + 4 + 3, |
| 2404 | .vtotal = 240 + 4 + 3 + 15, |
Paul Kocialkowski | 27abdd8 | 2018-11-07 19:18:41 +0100 | [diff] [blame] | 2405 | }; |
| 2406 | |
| 2407 | static const struct panel_desc lemaker_bl035_rgb_002 = { |
| 2408 | .modes = &lemaker_bl035_rgb_002_mode, |
| 2409 | .num_modes = 1, |
| 2410 | .size = { |
| 2411 | .width = 70, |
| 2412 | .height = 52, |
| 2413 | }, |
| 2414 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 2415 | .bus_flags = DRM_BUS_FLAG_DE_LOW, |
| 2416 | }; |
| 2417 | |
Heiko Schocher | dd01500 | 2015-05-22 10:25:57 +0200 | [diff] [blame] | 2418 | static const struct drm_display_mode lg_lb070wv8_mode = { |
| 2419 | .clock = 33246, |
| 2420 | .hdisplay = 800, |
| 2421 | .hsync_start = 800 + 88, |
| 2422 | .hsync_end = 800 + 88 + 80, |
| 2423 | .htotal = 800 + 88 + 80 + 88, |
| 2424 | .vdisplay = 480, |
| 2425 | .vsync_start = 480 + 10, |
| 2426 | .vsync_end = 480 + 10 + 25, |
| 2427 | .vtotal = 480 + 10 + 25 + 10, |
Heiko Schocher | dd01500 | 2015-05-22 10:25:57 +0200 | [diff] [blame] | 2428 | }; |
| 2429 | |
| 2430 | static const struct panel_desc lg_lb070wv8 = { |
| 2431 | .modes = &lg_lb070wv8_mode, |
| 2432 | .num_modes = 1, |
Laurent Pinchart | a6ae2fe | 2020-07-12 01:53:17 +0300 | [diff] [blame] | 2433 | .bpc = 8, |
Heiko Schocher | dd01500 | 2015-05-22 10:25:57 +0200 | [diff] [blame] | 2434 | .size = { |
| 2435 | .width = 151, |
| 2436 | .height = 91, |
| 2437 | }, |
| 2438 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2439 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Heiko Schocher | dd01500 | 2015-05-22 10:25:57 +0200 | [diff] [blame] | 2440 | }; |
| 2441 | |
Yakir Yang | c5ece40 | 2016-06-28 12:51:15 +0800 | [diff] [blame] | 2442 | static const struct drm_display_mode lg_lp079qx1_sp0v_mode = { |
| 2443 | .clock = 200000, |
| 2444 | .hdisplay = 1536, |
| 2445 | .hsync_start = 1536 + 12, |
| 2446 | .hsync_end = 1536 + 12 + 16, |
| 2447 | .htotal = 1536 + 12 + 16 + 48, |
| 2448 | .vdisplay = 2048, |
| 2449 | .vsync_start = 2048 + 8, |
| 2450 | .vsync_end = 2048 + 8 + 4, |
| 2451 | .vtotal = 2048 + 8 + 4 + 8, |
Yakir Yang | c5ece40 | 2016-06-28 12:51:15 +0800 | [diff] [blame] | 2452 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 2453 | }; |
| 2454 | |
| 2455 | static const struct panel_desc lg_lp079qx1_sp0v = { |
| 2456 | .modes = &lg_lp079qx1_sp0v_mode, |
| 2457 | .num_modes = 1, |
| 2458 | .size = { |
| 2459 | .width = 129, |
| 2460 | .height = 171, |
| 2461 | }, |
| 2462 | }; |
| 2463 | |
Yakir Yang | 0355dde | 2016-06-12 10:56:02 +0800 | [diff] [blame] | 2464 | static const struct drm_display_mode lg_lp097qx1_spa1_mode = { |
| 2465 | .clock = 205210, |
| 2466 | .hdisplay = 2048, |
| 2467 | .hsync_start = 2048 + 150, |
| 2468 | .hsync_end = 2048 + 150 + 5, |
| 2469 | .htotal = 2048 + 150 + 5 + 5, |
| 2470 | .vdisplay = 1536, |
| 2471 | .vsync_start = 1536 + 3, |
| 2472 | .vsync_end = 1536 + 3 + 1, |
| 2473 | .vtotal = 1536 + 3 + 1 + 9, |
Yakir Yang | 0355dde | 2016-06-12 10:56:02 +0800 | [diff] [blame] | 2474 | }; |
| 2475 | |
| 2476 | static const struct panel_desc lg_lp097qx1_spa1 = { |
| 2477 | .modes = &lg_lp097qx1_spa1_mode, |
| 2478 | .num_modes = 1, |
| 2479 | .size = { |
| 2480 | .width = 208, |
| 2481 | .height = 147, |
| 2482 | }, |
| 2483 | }; |
| 2484 | |
Jitao Shi | 690d8fa | 2016-02-22 19:01:44 +0800 | [diff] [blame] | 2485 | static const struct drm_display_mode lg_lp120up1_mode = { |
| 2486 | .clock = 162300, |
| 2487 | .hdisplay = 1920, |
| 2488 | .hsync_start = 1920 + 40, |
| 2489 | .hsync_end = 1920 + 40 + 40, |
| 2490 | .htotal = 1920 + 40 + 40+ 80, |
| 2491 | .vdisplay = 1280, |
| 2492 | .vsync_start = 1280 + 4, |
| 2493 | .vsync_end = 1280 + 4 + 4, |
| 2494 | .vtotal = 1280 + 4 + 4 + 12, |
Jitao Shi | 690d8fa | 2016-02-22 19:01:44 +0800 | [diff] [blame] | 2495 | }; |
| 2496 | |
| 2497 | static const struct panel_desc lg_lp120up1 = { |
| 2498 | .modes = &lg_lp120up1_mode, |
| 2499 | .num_modes = 1, |
| 2500 | .bpc = 8, |
| 2501 | .size = { |
| 2502 | .width = 267, |
| 2503 | .height = 183, |
| 2504 | }, |
Enric Balletbo i Serra | d53139b | 2020-04-16 18:44:03 +0200 | [diff] [blame] | 2505 | .connector_type = DRM_MODE_CONNECTOR_eDP, |
Jitao Shi | 690d8fa | 2016-02-22 19:01:44 +0800 | [diff] [blame] | 2506 | }; |
| 2507 | |
Thierry Reding | ec7c565 | 2013-11-15 15:59:32 +0100 | [diff] [blame] | 2508 | static const struct drm_display_mode lg_lp129qe_mode = { |
| 2509 | .clock = 285250, |
| 2510 | .hdisplay = 2560, |
| 2511 | .hsync_start = 2560 + 48, |
| 2512 | .hsync_end = 2560 + 48 + 32, |
| 2513 | .htotal = 2560 + 48 + 32 + 80, |
| 2514 | .vdisplay = 1700, |
| 2515 | .vsync_start = 1700 + 3, |
| 2516 | .vsync_end = 1700 + 3 + 10, |
| 2517 | .vtotal = 1700 + 3 + 10 + 36, |
Thierry Reding | ec7c565 | 2013-11-15 15:59:32 +0100 | [diff] [blame] | 2518 | }; |
| 2519 | |
| 2520 | static const struct panel_desc lg_lp129qe = { |
| 2521 | .modes = &lg_lp129qe_mode, |
| 2522 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 2523 | .bpc = 8, |
Thierry Reding | ec7c565 | 2013-11-15 15:59:32 +0100 | [diff] [blame] | 2524 | .size = { |
| 2525 | .width = 272, |
| 2526 | .height = 181, |
| 2527 | }, |
| 2528 | }; |
| 2529 | |
Marcel Ziswiler | 5728fe7 | 2020-01-20 09:01:00 +0100 | [diff] [blame] | 2530 | static const struct display_timing logictechno_lt161010_2nh_timing = { |
| 2531 | .pixelclock = { 26400000, 33300000, 46800000 }, |
| 2532 | .hactive = { 800, 800, 800 }, |
| 2533 | .hfront_porch = { 16, 210, 354 }, |
| 2534 | .hback_porch = { 46, 46, 46 }, |
| 2535 | .hsync_len = { 1, 20, 40 }, |
| 2536 | .vactive = { 480, 480, 480 }, |
| 2537 | .vfront_porch = { 7, 22, 147 }, |
| 2538 | .vback_porch = { 23, 23, 23 }, |
| 2539 | .vsync_len = { 1, 10, 20 }, |
| 2540 | .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | |
| 2541 | DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE | |
| 2542 | DISPLAY_FLAGS_SYNC_POSEDGE, |
| 2543 | }; |
| 2544 | |
| 2545 | static const struct panel_desc logictechno_lt161010_2nh = { |
| 2546 | .timings = &logictechno_lt161010_2nh_timing, |
| 2547 | .num_timings = 1, |
| 2548 | .size = { |
| 2549 | .width = 154, |
| 2550 | .height = 86, |
| 2551 | }, |
| 2552 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 2553 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | |
| 2554 | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE | |
| 2555 | DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE, |
| 2556 | .connector_type = DRM_MODE_CONNECTOR_DPI, |
| 2557 | }; |
| 2558 | |
| 2559 | static const struct display_timing logictechno_lt170410_2whc_timing = { |
| 2560 | .pixelclock = { 68900000, 71100000, 73400000 }, |
| 2561 | .hactive = { 1280, 1280, 1280 }, |
| 2562 | .hfront_porch = { 23, 60, 71 }, |
| 2563 | .hback_porch = { 23, 60, 71 }, |
| 2564 | .hsync_len = { 15, 40, 47 }, |
| 2565 | .vactive = { 800, 800, 800 }, |
| 2566 | .vfront_porch = { 5, 7, 10 }, |
| 2567 | .vback_porch = { 5, 7, 10 }, |
| 2568 | .vsync_len = { 6, 9, 12 }, |
| 2569 | .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | |
| 2570 | DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE | |
| 2571 | DISPLAY_FLAGS_SYNC_POSEDGE, |
| 2572 | }; |
| 2573 | |
| 2574 | static const struct panel_desc logictechno_lt170410_2whc = { |
| 2575 | .timings = &logictechno_lt170410_2whc_timing, |
| 2576 | .num_timings = 1, |
| 2577 | .size = { |
| 2578 | .width = 217, |
| 2579 | .height = 136, |
| 2580 | }, |
| 2581 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | c471583 | 2020-06-30 02:33:19 +0300 | [diff] [blame] | 2582 | .bus_flags = DRM_BUS_FLAG_DE_HIGH, |
Marcel Ziswiler | 5728fe7 | 2020-01-20 09:01:00 +0100 | [diff] [blame] | 2583 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
| 2584 | }; |
| 2585 | |
Lukasz Majewski | 65c766c | 2017-10-21 00:18:37 +0200 | [diff] [blame] | 2586 | static const struct drm_display_mode mitsubishi_aa070mc01_mode = { |
| 2587 | .clock = 30400, |
| 2588 | .hdisplay = 800, |
| 2589 | .hsync_start = 800 + 0, |
| 2590 | .hsync_end = 800 + 1, |
| 2591 | .htotal = 800 + 0 + 1 + 160, |
| 2592 | .vdisplay = 480, |
| 2593 | .vsync_start = 480 + 0, |
| 2594 | .vsync_end = 480 + 48 + 1, |
| 2595 | .vtotal = 480 + 48 + 1 + 0, |
Lukasz Majewski | 65c766c | 2017-10-21 00:18:37 +0200 | [diff] [blame] | 2596 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 2597 | }; |
| 2598 | |
Adam Ford | 0d35408 | 2019-10-16 08:51:45 -0500 | [diff] [blame] | 2599 | static const struct drm_display_mode logicpd_type_28_mode = { |
Ville Syrjälä | f873c5d | 2020-03-02 22:34:40 +0200 | [diff] [blame] | 2600 | .clock = 9107, |
Adam Ford | 0d35408 | 2019-10-16 08:51:45 -0500 | [diff] [blame] | 2601 | .hdisplay = 480, |
| 2602 | .hsync_start = 480 + 3, |
| 2603 | .hsync_end = 480 + 3 + 42, |
| 2604 | .htotal = 480 + 3 + 42 + 2, |
| 2605 | |
| 2606 | .vdisplay = 272, |
| 2607 | .vsync_start = 272 + 2, |
| 2608 | .vsync_end = 272 + 2 + 11, |
| 2609 | .vtotal = 272 + 2 + 11 + 3, |
Adam Ford | 0d35408 | 2019-10-16 08:51:45 -0500 | [diff] [blame] | 2610 | .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, |
| 2611 | }; |
| 2612 | |
| 2613 | static const struct panel_desc logicpd_type_28 = { |
| 2614 | .modes = &logicpd_type_28_mode, |
| 2615 | .num_modes = 1, |
| 2616 | .bpc = 8, |
| 2617 | .size = { |
| 2618 | .width = 105, |
| 2619 | .height = 67, |
| 2620 | }, |
| 2621 | .delay = { |
| 2622 | .prepare = 200, |
| 2623 | .enable = 200, |
| 2624 | .unprepare = 200, |
| 2625 | .disable = 200, |
| 2626 | }, |
| 2627 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 2628 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE | |
| 2629 | DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE, |
| 2630 | }; |
| 2631 | |
Lukasz Majewski | 65c766c | 2017-10-21 00:18:37 +0200 | [diff] [blame] | 2632 | static const struct panel_desc mitsubishi_aa070mc01 = { |
| 2633 | .modes = &mitsubishi_aa070mc01_mode, |
| 2634 | .num_modes = 1, |
| 2635 | .bpc = 8, |
| 2636 | .size = { |
| 2637 | .width = 152, |
| 2638 | .height = 91, |
| 2639 | }, |
| 2640 | |
| 2641 | .delay = { |
| 2642 | .enable = 200, |
| 2643 | .unprepare = 200, |
| 2644 | .disable = 400, |
| 2645 | }, |
| 2646 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2647 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lukasz Majewski | 65c766c | 2017-10-21 00:18:37 +0200 | [diff] [blame] | 2648 | .bus_flags = DRM_BUS_FLAG_DE_HIGH, |
| 2649 | }; |
| 2650 | |
Lucas Stach | 01bacc13 | 2017-06-08 20:07:55 +0200 | [diff] [blame] | 2651 | static const struct display_timing nec_nl12880bc20_05_timing = { |
| 2652 | .pixelclock = { 67000000, 71000000, 75000000 }, |
| 2653 | .hactive = { 1280, 1280, 1280 }, |
| 2654 | .hfront_porch = { 2, 30, 30 }, |
| 2655 | .hback_porch = { 6, 100, 100 }, |
| 2656 | .hsync_len = { 2, 30, 30 }, |
| 2657 | .vactive = { 800, 800, 800 }, |
| 2658 | .vfront_porch = { 5, 5, 5 }, |
| 2659 | .vback_porch = { 11, 11, 11 }, |
| 2660 | .vsync_len = { 7, 7, 7 }, |
| 2661 | }; |
| 2662 | |
| 2663 | static const struct panel_desc nec_nl12880bc20_05 = { |
| 2664 | .timings = &nec_nl12880bc20_05_timing, |
| 2665 | .num_timings = 1, |
| 2666 | .bpc = 8, |
| 2667 | .size = { |
| 2668 | .width = 261, |
| 2669 | .height = 163, |
| 2670 | }, |
| 2671 | .delay = { |
| 2672 | .enable = 50, |
| 2673 | .disable = 50, |
| 2674 | }, |
| 2675 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2676 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | 01bacc13 | 2017-06-08 20:07:55 +0200 | [diff] [blame] | 2677 | }; |
| 2678 | |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 2679 | static const struct drm_display_mode nec_nl4827hc19_05b_mode = { |
| 2680 | .clock = 10870, |
| 2681 | .hdisplay = 480, |
| 2682 | .hsync_start = 480 + 2, |
| 2683 | .hsync_end = 480 + 2 + 41, |
| 2684 | .htotal = 480 + 2 + 41 + 2, |
| 2685 | .vdisplay = 272, |
| 2686 | .vsync_start = 272 + 2, |
| 2687 | .vsync_end = 272 + 2 + 4, |
| 2688 | .vtotal = 272 + 2 + 4 + 2, |
Stefan Agner | 4bc390c | 2015-11-17 19:10:29 -0800 | [diff] [blame] | 2689 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 2690 | }; |
| 2691 | |
| 2692 | static const struct panel_desc nec_nl4827hc19_05b = { |
| 2693 | .modes = &nec_nl4827hc19_05b_mode, |
| 2694 | .num_modes = 1, |
| 2695 | .bpc = 8, |
| 2696 | .size = { |
| 2697 | .width = 95, |
| 2698 | .height = 54, |
| 2699 | }, |
Stefan Agner | 2c80661 | 2016-02-08 12:50:13 -0800 | [diff] [blame] | 2700 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Laurent Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 2701 | .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 2702 | }; |
| 2703 | |
Maxime Ripard | e6c2f06 | 2016-09-06 16:46:17 +0200 | [diff] [blame] | 2704 | static const struct drm_display_mode netron_dy_e231732_mode = { |
| 2705 | .clock = 66000, |
| 2706 | .hdisplay = 1024, |
| 2707 | .hsync_start = 1024 + 160, |
| 2708 | .hsync_end = 1024 + 160 + 70, |
| 2709 | .htotal = 1024 + 160 + 70 + 90, |
| 2710 | .vdisplay = 600, |
| 2711 | .vsync_start = 600 + 127, |
| 2712 | .vsync_end = 600 + 127 + 20, |
| 2713 | .vtotal = 600 + 127 + 20 + 3, |
Maxime Ripard | e6c2f06 | 2016-09-06 16:46:17 +0200 | [diff] [blame] | 2714 | }; |
| 2715 | |
| 2716 | static const struct panel_desc netron_dy_e231732 = { |
| 2717 | .modes = &netron_dy_e231732_mode, |
| 2718 | .num_modes = 1, |
| 2719 | .size = { |
| 2720 | .width = 154, |
| 2721 | .height = 87, |
| 2722 | }, |
| 2723 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 2724 | }; |
| 2725 | |
Vasily Khoruzhick | 258145e | 2020-02-26 00:10:10 -0800 | [diff] [blame] | 2726 | static const struct drm_display_mode neweast_wjfh116008a_modes[] = { |
| 2727 | { |
| 2728 | .clock = 138500, |
| 2729 | .hdisplay = 1920, |
| 2730 | .hsync_start = 1920 + 48, |
| 2731 | .hsync_end = 1920 + 48 + 32, |
| 2732 | .htotal = 1920 + 48 + 32 + 80, |
| 2733 | .vdisplay = 1080, |
| 2734 | .vsync_start = 1080 + 3, |
| 2735 | .vsync_end = 1080 + 3 + 5, |
| 2736 | .vtotal = 1080 + 3 + 5 + 23, |
Vasily Khoruzhick | 258145e | 2020-02-26 00:10:10 -0800 | [diff] [blame] | 2737 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 2738 | }, { |
| 2739 | .clock = 110920, |
| 2740 | .hdisplay = 1920, |
| 2741 | .hsync_start = 1920 + 48, |
| 2742 | .hsync_end = 1920 + 48 + 32, |
| 2743 | .htotal = 1920 + 48 + 32 + 80, |
| 2744 | .vdisplay = 1080, |
| 2745 | .vsync_start = 1080 + 3, |
| 2746 | .vsync_end = 1080 + 3 + 5, |
| 2747 | .vtotal = 1080 + 3 + 5 + 23, |
Vasily Khoruzhick | 258145e | 2020-02-26 00:10:10 -0800 | [diff] [blame] | 2748 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 2749 | } |
| 2750 | }; |
| 2751 | |
| 2752 | static const struct panel_desc neweast_wjfh116008a = { |
| 2753 | .modes = neweast_wjfh116008a_modes, |
| 2754 | .num_modes = 2, |
| 2755 | .bpc = 6, |
| 2756 | .size = { |
| 2757 | .width = 260, |
| 2758 | .height = 150, |
| 2759 | }, |
| 2760 | .delay = { |
| 2761 | .prepare = 110, |
| 2762 | .enable = 20, |
| 2763 | .unprepare = 500, |
| 2764 | }, |
| 2765 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 2766 | .connector_type = DRM_MODE_CONNECTOR_eDP, |
| 2767 | }; |
| 2768 | |
Tomi Valkeinen | 3b39ad7 | 2018-06-18 16:22:40 +0300 | [diff] [blame] | 2769 | static const struct drm_display_mode newhaven_nhd_43_480272ef_atxl_mode = { |
| 2770 | .clock = 9000, |
| 2771 | .hdisplay = 480, |
| 2772 | .hsync_start = 480 + 2, |
| 2773 | .hsync_end = 480 + 2 + 41, |
| 2774 | .htotal = 480 + 2 + 41 + 2, |
| 2775 | .vdisplay = 272, |
| 2776 | .vsync_start = 272 + 2, |
| 2777 | .vsync_end = 272 + 2 + 10, |
| 2778 | .vtotal = 272 + 2 + 10 + 2, |
Tomi Valkeinen | 3b39ad7 | 2018-06-18 16:22:40 +0300 | [diff] [blame] | 2779 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 2780 | }; |
| 2781 | |
| 2782 | static const struct panel_desc newhaven_nhd_43_480272ef_atxl = { |
| 2783 | .modes = &newhaven_nhd_43_480272ef_atxl_mode, |
| 2784 | .num_modes = 1, |
| 2785 | .bpc = 8, |
| 2786 | .size = { |
| 2787 | .width = 95, |
| 2788 | .height = 54, |
| 2789 | }, |
| 2790 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Laurent Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 2791 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE | |
| 2792 | DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE, |
Tomi Valkeinen | 3b39ad7 | 2018-06-18 16:22:40 +0300 | [diff] [blame] | 2793 | }; |
| 2794 | |
Lucas Stach | 4177fa6 | 2017-06-08 20:07:57 +0200 | [diff] [blame] | 2795 | static const struct display_timing nlt_nl192108ac18_02d_timing = { |
| 2796 | .pixelclock = { 130000000, 148350000, 163000000 }, |
| 2797 | .hactive = { 1920, 1920, 1920 }, |
| 2798 | .hfront_porch = { 80, 100, 100 }, |
| 2799 | .hback_porch = { 100, 120, 120 }, |
| 2800 | .hsync_len = { 50, 60, 60 }, |
| 2801 | .vactive = { 1080, 1080, 1080 }, |
| 2802 | .vfront_porch = { 12, 30, 30 }, |
| 2803 | .vback_porch = { 4, 10, 10 }, |
| 2804 | .vsync_len = { 4, 5, 5 }, |
| 2805 | }; |
| 2806 | |
| 2807 | static const struct panel_desc nlt_nl192108ac18_02d = { |
| 2808 | .timings = &nlt_nl192108ac18_02d_timing, |
| 2809 | .num_timings = 1, |
| 2810 | .bpc = 8, |
| 2811 | .size = { |
| 2812 | .width = 344, |
| 2813 | .height = 194, |
| 2814 | }, |
| 2815 | .delay = { |
| 2816 | .unprepare = 500, |
| 2817 | }, |
| 2818 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2819 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | 4177fa6 | 2017-06-08 20:07:57 +0200 | [diff] [blame] | 2820 | }; |
| 2821 | |
Fabien Lahoudere | 05ec0e4 | 2016-10-17 11:38:01 +0200 | [diff] [blame] | 2822 | static const struct drm_display_mode nvd_9128_mode = { |
| 2823 | .clock = 29500, |
| 2824 | .hdisplay = 800, |
| 2825 | .hsync_start = 800 + 130, |
| 2826 | .hsync_end = 800 + 130 + 98, |
| 2827 | .htotal = 800 + 0 + 130 + 98, |
| 2828 | .vdisplay = 480, |
| 2829 | .vsync_start = 480 + 10, |
| 2830 | .vsync_end = 480 + 10 + 50, |
| 2831 | .vtotal = 480 + 0 + 10 + 50, |
| 2832 | }; |
| 2833 | |
| 2834 | static const struct panel_desc nvd_9128 = { |
| 2835 | .modes = &nvd_9128_mode, |
| 2836 | .num_modes = 1, |
| 2837 | .bpc = 8, |
| 2838 | .size = { |
| 2839 | .width = 156, |
| 2840 | .height = 88, |
| 2841 | }, |
| 2842 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 2843 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Fabien Lahoudere | 05ec0e4 | 2016-10-17 11:38:01 +0200 | [diff] [blame] | 2844 | }; |
| 2845 | |
Gary Bisson | a99fb62 | 2015-06-10 18:44:23 +0200 | [diff] [blame] | 2846 | static const struct display_timing okaya_rs800480t_7x0gp_timing = { |
| 2847 | .pixelclock = { 30000000, 30000000, 40000000 }, |
| 2848 | .hactive = { 800, 800, 800 }, |
| 2849 | .hfront_porch = { 40, 40, 40 }, |
| 2850 | .hback_porch = { 40, 40, 40 }, |
| 2851 | .hsync_len = { 1, 48, 48 }, |
| 2852 | .vactive = { 480, 480, 480 }, |
| 2853 | .vfront_porch = { 13, 13, 13 }, |
| 2854 | .vback_porch = { 29, 29, 29 }, |
| 2855 | .vsync_len = { 3, 3, 3 }, |
| 2856 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 2857 | }; |
| 2858 | |
| 2859 | static const struct panel_desc okaya_rs800480t_7x0gp = { |
| 2860 | .timings = &okaya_rs800480t_7x0gp_timing, |
| 2861 | .num_timings = 1, |
| 2862 | .bpc = 6, |
| 2863 | .size = { |
| 2864 | .width = 154, |
| 2865 | .height = 87, |
| 2866 | }, |
| 2867 | .delay = { |
| 2868 | .prepare = 41, |
| 2869 | .enable = 50, |
| 2870 | .unprepare = 41, |
| 2871 | .disable = 50, |
| 2872 | }, |
| 2873 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 2874 | }; |
| 2875 | |
Maxime Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 2876 | static const struct drm_display_mode olimex_lcd_olinuxino_43ts_mode = { |
| 2877 | .clock = 9000, |
| 2878 | .hdisplay = 480, |
| 2879 | .hsync_start = 480 + 5, |
| 2880 | .hsync_end = 480 + 5 + 30, |
| 2881 | .htotal = 480 + 5 + 30 + 10, |
| 2882 | .vdisplay = 272, |
| 2883 | .vsync_start = 272 + 8, |
| 2884 | .vsync_end = 272 + 8 + 5, |
| 2885 | .vtotal = 272 + 8 + 5 + 3, |
Maxime Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 2886 | }; |
| 2887 | |
| 2888 | static const struct panel_desc olimex_lcd_olinuxino_43ts = { |
| 2889 | .modes = &olimex_lcd_olinuxino_43ts_mode, |
| 2890 | .num_modes = 1, |
| 2891 | .size = { |
Jonathan Liu | 30c6d7ab9 | 2017-07-20 20:29:43 +1000 | [diff] [blame] | 2892 | .width = 95, |
| 2893 | .height = 54, |
Maxime Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 2894 | }, |
Jonathan Liu | 5c2a7c6 | 2016-09-11 20:46:55 +1000 | [diff] [blame] | 2895 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Maxime Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 2896 | }; |
| 2897 | |
Eric Anholt | e8b6f56 | 2016-03-24 17:23:48 -0700 | [diff] [blame] | 2898 | /* |
| 2899 | * 800x480 CVT. The panel appears to be quite accepting, at least as far as |
| 2900 | * pixel clocks, but this is the timing that was being used in the Adafruit |
| 2901 | * installation instructions. |
| 2902 | */ |
| 2903 | static const struct drm_display_mode ontat_yx700wv03_mode = { |
| 2904 | .clock = 29500, |
| 2905 | .hdisplay = 800, |
| 2906 | .hsync_start = 824, |
| 2907 | .hsync_end = 896, |
| 2908 | .htotal = 992, |
| 2909 | .vdisplay = 480, |
| 2910 | .vsync_start = 483, |
| 2911 | .vsync_end = 493, |
| 2912 | .vtotal = 500, |
Eric Anholt | e8b6f56 | 2016-03-24 17:23:48 -0700 | [diff] [blame] | 2913 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 2914 | }; |
| 2915 | |
| 2916 | /* |
| 2917 | * Specification at: |
| 2918 | * https://www.adafruit.com/images/product-files/2406/c3163.pdf |
| 2919 | */ |
| 2920 | static const struct panel_desc ontat_yx700wv03 = { |
| 2921 | .modes = &ontat_yx700wv03_mode, |
| 2922 | .num_modes = 1, |
| 2923 | .bpc = 8, |
| 2924 | .size = { |
| 2925 | .width = 154, |
| 2926 | .height = 83, |
| 2927 | }, |
Eric Anholt | 5651e5e | 2018-03-09 15:33:32 -0800 | [diff] [blame] | 2928 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
Eric Anholt | e8b6f56 | 2016-03-24 17:23:48 -0700 | [diff] [blame] | 2929 | }; |
| 2930 | |
H. Nikolaus Schaller | 9c31dcb | 2019-06-07 13:11:08 +0200 | [diff] [blame] | 2931 | static const struct drm_display_mode ortustech_com37h3m_mode = { |
H. Nikolaus Schaller | 855e764 | 2020-03-10 08:43:19 +0100 | [diff] [blame] | 2932 | .clock = 22230, |
H. Nikolaus Schaller | 9c31dcb | 2019-06-07 13:11:08 +0200 | [diff] [blame] | 2933 | .hdisplay = 480, |
H. Nikolaus Schaller | 855e764 | 2020-03-10 08:43:19 +0100 | [diff] [blame] | 2934 | .hsync_start = 480 + 40, |
| 2935 | .hsync_end = 480 + 40 + 10, |
| 2936 | .htotal = 480 + 40 + 10 + 40, |
H. Nikolaus Schaller | 9c31dcb | 2019-06-07 13:11:08 +0200 | [diff] [blame] | 2937 | .vdisplay = 640, |
| 2938 | .vsync_start = 640 + 4, |
H. Nikolaus Schaller | 855e764 | 2020-03-10 08:43:19 +0100 | [diff] [blame] | 2939 | .vsync_end = 640 + 4 + 2, |
| 2940 | .vtotal = 640 + 4 + 2 + 4, |
H. Nikolaus Schaller | 9c31dcb | 2019-06-07 13:11:08 +0200 | [diff] [blame] | 2941 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 2942 | }; |
| 2943 | |
| 2944 | static const struct panel_desc ortustech_com37h3m = { |
| 2945 | .modes = &ortustech_com37h3m_mode, |
| 2946 | .num_modes = 1, |
| 2947 | .bpc = 8, |
| 2948 | .size = { |
| 2949 | .width = 56, /* 56.16mm */ |
| 2950 | .height = 75, /* 74.88mm */ |
| 2951 | }, |
| 2952 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Sam Ravnborg | f5436f7 | 2020-06-30 20:05:43 +0200 | [diff] [blame] | 2953 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE | |
H. Nikolaus Schaller | 9c31dcb | 2019-06-07 13:11:08 +0200 | [diff] [blame] | 2954 | DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE, |
| 2955 | }; |
| 2956 | |
Philipp Zabel | 725c9d4 | 2015-02-11 18:50:11 +0100 | [diff] [blame] | 2957 | static const struct drm_display_mode ortustech_com43h4m85ulc_mode = { |
| 2958 | .clock = 25000, |
| 2959 | .hdisplay = 480, |
| 2960 | .hsync_start = 480 + 10, |
| 2961 | .hsync_end = 480 + 10 + 10, |
| 2962 | .htotal = 480 + 10 + 10 + 15, |
| 2963 | .vdisplay = 800, |
| 2964 | .vsync_start = 800 + 3, |
| 2965 | .vsync_end = 800 + 3 + 3, |
| 2966 | .vtotal = 800 + 3 + 3 + 3, |
Philipp Zabel | 725c9d4 | 2015-02-11 18:50:11 +0100 | [diff] [blame] | 2967 | }; |
| 2968 | |
| 2969 | static const struct panel_desc ortustech_com43h4m85ulc = { |
| 2970 | .modes = &ortustech_com43h4m85ulc_mode, |
| 2971 | .num_modes = 1, |
| 2972 | .bpc = 8, |
| 2973 | .size = { |
| 2974 | .width = 56, |
| 2975 | .height = 93, |
| 2976 | }, |
| 2977 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Laurent Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 2978 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, |
Laurent Pinchart | 2ccedf4 | 2020-03-09 20:42:10 +0200 | [diff] [blame] | 2979 | .connector_type = DRM_MODE_CONNECTOR_DPI, |
Philipp Zabel | 725c9d4 | 2015-02-11 18:50:11 +0100 | [diff] [blame] | 2980 | }; |
| 2981 | |
Laurent Pinchart | 163f7a3 | 2018-12-07 22:13:44 +0200 | [diff] [blame] | 2982 | static const struct drm_display_mode osddisplays_osd070t1718_19ts_mode = { |
| 2983 | .clock = 33000, |
| 2984 | .hdisplay = 800, |
| 2985 | .hsync_start = 800 + 210, |
| 2986 | .hsync_end = 800 + 210 + 30, |
| 2987 | .htotal = 800 + 210 + 30 + 16, |
| 2988 | .vdisplay = 480, |
| 2989 | .vsync_start = 480 + 22, |
| 2990 | .vsync_end = 480 + 22 + 13, |
| 2991 | .vtotal = 480 + 22 + 13 + 10, |
Laurent Pinchart | 163f7a3 | 2018-12-07 22:13:44 +0200 | [diff] [blame] | 2992 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 2993 | }; |
| 2994 | |
| 2995 | static const struct panel_desc osddisplays_osd070t1718_19ts = { |
| 2996 | .modes = &osddisplays_osd070t1718_19ts_mode, |
| 2997 | .num_modes = 1, |
| 2998 | .bpc = 8, |
| 2999 | .size = { |
| 3000 | .width = 152, |
| 3001 | .height = 91, |
| 3002 | }, |
| 3003 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Tomi Valkeinen | fb0629e | 2019-11-14 11:39:50 +0200 | [diff] [blame] | 3004 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE | |
| 3005 | DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE, |
Laurent Pinchart | a793f0e | 2019-09-04 16:37:23 +0300 | [diff] [blame] | 3006 | .connector_type = DRM_MODE_CONNECTOR_DPI, |
Laurent Pinchart | 163f7a3 | 2018-12-07 22:13:44 +0200 | [diff] [blame] | 3007 | }; |
| 3008 | |
Eugen Hristev | 4ba3e56 | 2019-01-14 09:43:31 +0000 | [diff] [blame] | 3009 | static const struct drm_display_mode pda_91_00156_a0_mode = { |
| 3010 | .clock = 33300, |
| 3011 | .hdisplay = 800, |
| 3012 | .hsync_start = 800 + 1, |
| 3013 | .hsync_end = 800 + 1 + 64, |
| 3014 | .htotal = 800 + 1 + 64 + 64, |
| 3015 | .vdisplay = 480, |
| 3016 | .vsync_start = 480 + 1, |
| 3017 | .vsync_end = 480 + 1 + 23, |
| 3018 | .vtotal = 480 + 1 + 23 + 22, |
Eugen Hristev | 4ba3e56 | 2019-01-14 09:43:31 +0000 | [diff] [blame] | 3019 | }; |
| 3020 | |
| 3021 | static const struct panel_desc pda_91_00156_a0 = { |
| 3022 | .modes = &pda_91_00156_a0_mode, |
| 3023 | .num_modes = 1, |
| 3024 | .size = { |
| 3025 | .width = 152, |
| 3026 | .height = 91, |
| 3027 | }, |
| 3028 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 3029 | }; |
| 3030 | |
Marek Vasut | d69de69 | 2020-07-28 14:12:46 +0200 | [diff] [blame^] | 3031 | static const struct drm_display_mode powertip_ph800480t013_idf02_mode = { |
| 3032 | .clock = 24750, |
| 3033 | .hdisplay = 800, |
| 3034 | .hsync_start = 800 + 54, |
| 3035 | .hsync_end = 800 + 54 + 2, |
| 3036 | .htotal = 800 + 54 + 2 + 44, |
| 3037 | .vdisplay = 480, |
| 3038 | .vsync_start = 480 + 49, |
| 3039 | .vsync_end = 480 + 49 + 2, |
| 3040 | .vtotal = 480 + 49 + 2 + 22, |
| 3041 | }; |
| 3042 | |
| 3043 | static const struct panel_desc powertip_ph800480t013_idf02 = { |
| 3044 | .modes = &powertip_ph800480t013_idf02_mode, |
| 3045 | .num_modes = 1, |
| 3046 | .size = { |
| 3047 | .width = 152, |
| 3048 | .height = 91, |
| 3049 | }, |
| 3050 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | |
| 3051 | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE | |
| 3052 | DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE, |
| 3053 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 3054 | .connector_type = DRM_MODE_CONNECTOR_DPI, |
| 3055 | }; |
Eugen Hristev | 4ba3e56 | 2019-01-14 09:43:31 +0000 | [diff] [blame] | 3056 | |
Josh Wu | d2a6f0f | 2015-10-08 17:42:41 +0200 | [diff] [blame] | 3057 | static const struct drm_display_mode qd43003c0_40_mode = { |
| 3058 | .clock = 9000, |
| 3059 | .hdisplay = 480, |
| 3060 | .hsync_start = 480 + 8, |
| 3061 | .hsync_end = 480 + 8 + 4, |
| 3062 | .htotal = 480 + 8 + 4 + 39, |
| 3063 | .vdisplay = 272, |
| 3064 | .vsync_start = 272 + 4, |
| 3065 | .vsync_end = 272 + 4 + 10, |
| 3066 | .vtotal = 272 + 4 + 10 + 2, |
Josh Wu | d2a6f0f | 2015-10-08 17:42:41 +0200 | [diff] [blame] | 3067 | }; |
| 3068 | |
| 3069 | static const struct panel_desc qd43003c0_40 = { |
| 3070 | .modes = &qd43003c0_40_mode, |
| 3071 | .num_modes = 1, |
| 3072 | .bpc = 8, |
| 3073 | .size = { |
| 3074 | .width = 95, |
| 3075 | .height = 53, |
| 3076 | }, |
| 3077 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 3078 | }; |
| 3079 | |
Jagan Teki | 23167fa | 2018-06-07 19:16:48 +0530 | [diff] [blame] | 3080 | static const struct display_timing rocktech_rk070er9427_timing = { |
| 3081 | .pixelclock = { 26400000, 33300000, 46800000 }, |
| 3082 | .hactive = { 800, 800, 800 }, |
| 3083 | .hfront_porch = { 16, 210, 354 }, |
| 3084 | .hback_porch = { 46, 46, 46 }, |
| 3085 | .hsync_len = { 1, 1, 1 }, |
| 3086 | .vactive = { 480, 480, 480 }, |
| 3087 | .vfront_porch = { 7, 22, 147 }, |
| 3088 | .vback_porch = { 23, 23, 23 }, |
| 3089 | .vsync_len = { 1, 1, 1 }, |
| 3090 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 3091 | }; |
| 3092 | |
| 3093 | static const struct panel_desc rocktech_rk070er9427 = { |
| 3094 | .timings = &rocktech_rk070er9427_timing, |
| 3095 | .num_timings = 1, |
| 3096 | .bpc = 6, |
| 3097 | .size = { |
| 3098 | .width = 154, |
| 3099 | .height = 86, |
| 3100 | }, |
| 3101 | .delay = { |
| 3102 | .prepare = 41, |
| 3103 | .enable = 50, |
| 3104 | .unprepare = 41, |
| 3105 | .disable = 50, |
| 3106 | }, |
| 3107 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 3108 | }; |
| 3109 | |
Jyri Sarha | f305047 | 2020-02-11 14:17:18 +0200 | [diff] [blame] | 3110 | static const struct drm_display_mode rocktech_rk101ii01d_ct_mode = { |
| 3111 | .clock = 71100, |
| 3112 | .hdisplay = 1280, |
| 3113 | .hsync_start = 1280 + 48, |
| 3114 | .hsync_end = 1280 + 48 + 32, |
| 3115 | .htotal = 1280 + 48 + 32 + 80, |
| 3116 | .vdisplay = 800, |
| 3117 | .vsync_start = 800 + 2, |
| 3118 | .vsync_end = 800 + 2 + 5, |
| 3119 | .vtotal = 800 + 2 + 5 + 16, |
Jyri Sarha | f305047 | 2020-02-11 14:17:18 +0200 | [diff] [blame] | 3120 | }; |
| 3121 | |
| 3122 | static const struct panel_desc rocktech_rk101ii01d_ct = { |
| 3123 | .modes = &rocktech_rk101ii01d_ct_mode, |
| 3124 | .num_modes = 1, |
| 3125 | .size = { |
| 3126 | .width = 217, |
| 3127 | .height = 136, |
| 3128 | }, |
| 3129 | .delay = { |
| 3130 | .prepare = 50, |
| 3131 | .disable = 50, |
| 3132 | }, |
| 3133 | .bus_flags = DRM_BUS_FLAG_DE_HIGH, |
| 3134 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 3135 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
| 3136 | }; |
| 3137 | |
Yakir Yang | 0330eaf | 2016-06-12 10:56:13 +0800 | [diff] [blame] | 3138 | static const struct drm_display_mode samsung_lsn122dl01_c01_mode = { |
| 3139 | .clock = 271560, |
| 3140 | .hdisplay = 2560, |
| 3141 | .hsync_start = 2560 + 48, |
| 3142 | .hsync_end = 2560 + 48 + 32, |
| 3143 | .htotal = 2560 + 48 + 32 + 80, |
| 3144 | .vdisplay = 1600, |
| 3145 | .vsync_start = 1600 + 2, |
| 3146 | .vsync_end = 1600 + 2 + 5, |
| 3147 | .vtotal = 1600 + 2 + 5 + 57, |
Yakir Yang | 0330eaf | 2016-06-12 10:56:13 +0800 | [diff] [blame] | 3148 | }; |
| 3149 | |
| 3150 | static const struct panel_desc samsung_lsn122dl01_c01 = { |
| 3151 | .modes = &samsung_lsn122dl01_c01_mode, |
| 3152 | .num_modes = 1, |
| 3153 | .size = { |
| 3154 | .width = 263, |
| 3155 | .height = 164, |
| 3156 | }, |
| 3157 | }; |
| 3158 | |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 3159 | static const struct drm_display_mode samsung_ltn101nt05_mode = { |
| 3160 | .clock = 54030, |
| 3161 | .hdisplay = 1024, |
| 3162 | .hsync_start = 1024 + 24, |
| 3163 | .hsync_end = 1024 + 24 + 136, |
| 3164 | .htotal = 1024 + 24 + 136 + 160, |
| 3165 | .vdisplay = 600, |
| 3166 | .vsync_start = 600 + 3, |
| 3167 | .vsync_end = 600 + 3 + 6, |
| 3168 | .vtotal = 600 + 3 + 6 + 61, |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 3169 | }; |
| 3170 | |
| 3171 | static const struct panel_desc samsung_ltn101nt05 = { |
| 3172 | .modes = &samsung_ltn101nt05_mode, |
| 3173 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 3174 | .bpc = 6, |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 3175 | .size = { |
Thierry Reding | 8159884 | 2016-06-10 15:33:13 +0200 | [diff] [blame] | 3176 | .width = 223, |
| 3177 | .height = 125, |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 3178 | }, |
Dmitry Osipenko | 8556082 | 2020-06-22 01:27:42 +0300 | [diff] [blame] | 3179 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Laurent Pinchart | c471583 | 2020-06-30 02:33:19 +0300 | [diff] [blame] | 3180 | .bus_flags = DRM_BUS_FLAG_DE_HIGH, |
Dmitry Osipenko | 94f0791 | 2020-06-18 01:27:03 +0300 | [diff] [blame] | 3181 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 3182 | }; |
| 3183 | |
Stéphane Marchesin | 0c93430 | 2015-03-18 10:52:18 +0100 | [diff] [blame] | 3184 | static const struct drm_display_mode samsung_ltn140at29_301_mode = { |
| 3185 | .clock = 76300, |
| 3186 | .hdisplay = 1366, |
| 3187 | .hsync_start = 1366 + 64, |
| 3188 | .hsync_end = 1366 + 64 + 48, |
| 3189 | .htotal = 1366 + 64 + 48 + 128, |
| 3190 | .vdisplay = 768, |
| 3191 | .vsync_start = 768 + 2, |
| 3192 | .vsync_end = 768 + 2 + 5, |
| 3193 | .vtotal = 768 + 2 + 5 + 17, |
Stéphane Marchesin | 0c93430 | 2015-03-18 10:52:18 +0100 | [diff] [blame] | 3194 | }; |
| 3195 | |
| 3196 | static const struct panel_desc samsung_ltn140at29_301 = { |
| 3197 | .modes = &samsung_ltn140at29_301_mode, |
| 3198 | .num_modes = 1, |
| 3199 | .bpc = 6, |
| 3200 | .size = { |
| 3201 | .width = 320, |
| 3202 | .height = 187, |
| 3203 | }, |
| 3204 | }; |
| 3205 | |
Miquel Raynal | 44c58c5 | 2020-01-09 19:40:37 +0100 | [diff] [blame] | 3206 | static const struct display_timing satoz_sat050at40h12r2_timing = { |
| 3207 | .pixelclock = {33300000, 33300000, 50000000}, |
| 3208 | .hactive = {800, 800, 800}, |
| 3209 | .hfront_porch = {16, 210, 354}, |
| 3210 | .hback_porch = {46, 46, 46}, |
| 3211 | .hsync_len = {1, 1, 40}, |
| 3212 | .vactive = {480, 480, 480}, |
| 3213 | .vfront_porch = {7, 22, 147}, |
| 3214 | .vback_porch = {23, 23, 23}, |
| 3215 | .vsync_len = {1, 1, 20}, |
| 3216 | }; |
| 3217 | |
| 3218 | static const struct panel_desc satoz_sat050at40h12r2 = { |
| 3219 | .timings = &satoz_sat050at40h12r2_timing, |
| 3220 | .num_timings = 1, |
| 3221 | .bpc = 8, |
| 3222 | .size = { |
| 3223 | .width = 108, |
| 3224 | .height = 65, |
| 3225 | }, |
Laurent Pinchart | 34ca6b5 | 2020-06-30 02:33:18 +0300 | [diff] [blame] | 3226 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Miquel Raynal | 44c58c5 | 2020-01-09 19:40:37 +0100 | [diff] [blame] | 3227 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
| 3228 | }; |
| 3229 | |
Jeffrey Hugo | cd5e1cb | 2019-07-08 09:58:11 -0700 | [diff] [blame] | 3230 | static const struct drm_display_mode sharp_ld_d5116z01b_mode = { |
| 3231 | .clock = 168480, |
| 3232 | .hdisplay = 1920, |
| 3233 | .hsync_start = 1920 + 48, |
| 3234 | .hsync_end = 1920 + 48 + 32, |
| 3235 | .htotal = 1920 + 48 + 32 + 80, |
| 3236 | .vdisplay = 1280, |
| 3237 | .vsync_start = 1280 + 3, |
| 3238 | .vsync_end = 1280 + 3 + 10, |
| 3239 | .vtotal = 1280 + 3 + 10 + 57, |
Jeffrey Hugo | cd5e1cb | 2019-07-08 09:58:11 -0700 | [diff] [blame] | 3240 | .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, |
| 3241 | }; |
| 3242 | |
| 3243 | static const struct panel_desc sharp_ld_d5116z01b = { |
| 3244 | .modes = &sharp_ld_d5116z01b_mode, |
| 3245 | .num_modes = 1, |
| 3246 | .bpc = 8, |
| 3247 | .size = { |
| 3248 | .width = 260, |
| 3249 | .height = 120, |
| 3250 | }, |
| 3251 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 3252 | .bus_flags = DRM_BUS_FLAG_DATA_MSB_TO_LSB, |
| 3253 | }; |
| 3254 | |
H. Nikolaus Schaller | dda0e4b | 2019-06-07 13:11:07 +0200 | [diff] [blame] | 3255 | static const struct drm_display_mode sharp_lq070y3dg3b_mode = { |
| 3256 | .clock = 33260, |
| 3257 | .hdisplay = 800, |
| 3258 | .hsync_start = 800 + 64, |
| 3259 | .hsync_end = 800 + 64 + 128, |
| 3260 | .htotal = 800 + 64 + 128 + 64, |
| 3261 | .vdisplay = 480, |
| 3262 | .vsync_start = 480 + 8, |
| 3263 | .vsync_end = 480 + 8 + 2, |
| 3264 | .vtotal = 480 + 8 + 2 + 35, |
H. Nikolaus Schaller | dda0e4b | 2019-06-07 13:11:07 +0200 | [diff] [blame] | 3265 | .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE, |
| 3266 | }; |
| 3267 | |
| 3268 | static const struct panel_desc sharp_lq070y3dg3b = { |
| 3269 | .modes = &sharp_lq070y3dg3b_mode, |
| 3270 | .num_modes = 1, |
| 3271 | .bpc = 8, |
| 3272 | .size = { |
| 3273 | .width = 152, /* 152.4mm */ |
| 3274 | .height = 91, /* 91.4mm */ |
| 3275 | }, |
| 3276 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Sam Ravnborg | f5436f7 | 2020-06-30 20:05:43 +0200 | [diff] [blame] | 3277 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE | |
H. Nikolaus Schaller | dda0e4b | 2019-06-07 13:11:07 +0200 | [diff] [blame] | 3278 | DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE, |
| 3279 | }; |
| 3280 | |
Vladimir Zapolskiy | 03e3ec9 | 2018-07-06 21:51:01 +0300 | [diff] [blame] | 3281 | static const struct drm_display_mode sharp_lq035q7db03_mode = { |
| 3282 | .clock = 5500, |
| 3283 | .hdisplay = 240, |
| 3284 | .hsync_start = 240 + 16, |
| 3285 | .hsync_end = 240 + 16 + 7, |
| 3286 | .htotal = 240 + 16 + 7 + 5, |
| 3287 | .vdisplay = 320, |
| 3288 | .vsync_start = 320 + 9, |
| 3289 | .vsync_end = 320 + 9 + 1, |
| 3290 | .vtotal = 320 + 9 + 1 + 7, |
Vladimir Zapolskiy | 03e3ec9 | 2018-07-06 21:51:01 +0300 | [diff] [blame] | 3291 | }; |
| 3292 | |
| 3293 | static const struct panel_desc sharp_lq035q7db03 = { |
| 3294 | .modes = &sharp_lq035q7db03_mode, |
| 3295 | .num_modes = 1, |
| 3296 | .bpc = 6, |
| 3297 | .size = { |
| 3298 | .width = 54, |
| 3299 | .height = 72, |
| 3300 | }, |
| 3301 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 3302 | }; |
| 3303 | |
Joshua Clayton | 592aa02 | 2016-07-06 15:59:16 -0700 | [diff] [blame] | 3304 | static const struct display_timing sharp_lq101k1ly04_timing = { |
| 3305 | .pixelclock = { 60000000, 65000000, 80000000 }, |
| 3306 | .hactive = { 1280, 1280, 1280 }, |
| 3307 | .hfront_porch = { 20, 20, 20 }, |
| 3308 | .hback_porch = { 20, 20, 20 }, |
| 3309 | .hsync_len = { 10, 10, 10 }, |
| 3310 | .vactive = { 800, 800, 800 }, |
| 3311 | .vfront_porch = { 4, 4, 4 }, |
| 3312 | .vback_porch = { 4, 4, 4 }, |
| 3313 | .vsync_len = { 4, 4, 4 }, |
| 3314 | .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE, |
| 3315 | }; |
| 3316 | |
| 3317 | static const struct panel_desc sharp_lq101k1ly04 = { |
| 3318 | .timings = &sharp_lq101k1ly04_timing, |
| 3319 | .num_timings = 1, |
| 3320 | .bpc = 8, |
| 3321 | .size = { |
| 3322 | .width = 217, |
| 3323 | .height = 136, |
| 3324 | }, |
| 3325 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 3326 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Joshua Clayton | 592aa02 | 2016-07-06 15:59:16 -0700 | [diff] [blame] | 3327 | }; |
| 3328 | |
Sean Paul | 9f7bae2 | 2018-02-08 12:48:52 -0500 | [diff] [blame] | 3329 | static const struct display_timing sharp_lq123p1jx31_timing = { |
| 3330 | .pixelclock = { 252750000, 252750000, 266604720 }, |
| 3331 | .hactive = { 2400, 2400, 2400 }, |
| 3332 | .hfront_porch = { 48, 48, 48 }, |
| 3333 | .hback_porch = { 80, 80, 84 }, |
| 3334 | .hsync_len = { 32, 32, 32 }, |
| 3335 | .vactive = { 1600, 1600, 1600 }, |
| 3336 | .vfront_porch = { 3, 3, 3 }, |
| 3337 | .vback_porch = { 33, 33, 120 }, |
| 3338 | .vsync_len = { 10, 10, 10 }, |
| 3339 | .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW, |
Yakir Yang | 739c7de | 2016-06-12 10:56:35 +0800 | [diff] [blame] | 3340 | }; |
| 3341 | |
| 3342 | static const struct panel_desc sharp_lq123p1jx31 = { |
Sean Paul | 9f7bae2 | 2018-02-08 12:48:52 -0500 | [diff] [blame] | 3343 | .timings = &sharp_lq123p1jx31_timing, |
| 3344 | .num_timings = 1, |
zain wang | 5466a63 | 2016-11-19 10:27:16 +0800 | [diff] [blame] | 3345 | .bpc = 8, |
Yakir Yang | 739c7de | 2016-06-12 10:56:35 +0800 | [diff] [blame] | 3346 | .size = { |
| 3347 | .width = 259, |
| 3348 | .height = 173, |
| 3349 | }, |
Yakir Yang | a42f6e3 | 2016-07-21 21:14:34 +0800 | [diff] [blame] | 3350 | .delay = { |
| 3351 | .prepare = 110, |
| 3352 | .enable = 50, |
| 3353 | .unprepare = 550, |
| 3354 | }, |
Yakir Yang | 739c7de | 2016-06-12 10:56:35 +0800 | [diff] [blame] | 3355 | }; |
| 3356 | |
Paul Cercueil | f1bd37f | 2019-06-03 17:31:20 +0200 | [diff] [blame] | 3357 | static const struct display_timing sharp_ls020b1dd01d_timing = { |
| 3358 | .pixelclock = { 2000000, 4200000, 5000000 }, |
| 3359 | .hactive = { 240, 240, 240 }, |
| 3360 | .hfront_porch = { 66, 66, 66 }, |
| 3361 | .hback_porch = { 1, 1, 1 }, |
| 3362 | .hsync_len = { 1, 1, 1 }, |
| 3363 | .vactive = { 160, 160, 160 }, |
| 3364 | .vfront_porch = { 52, 52, 52 }, |
| 3365 | .vback_porch = { 6, 6, 6 }, |
| 3366 | .vsync_len = { 10, 10, 10 }, |
| 3367 | .flags = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_LOW, |
| 3368 | }; |
| 3369 | |
| 3370 | static const struct panel_desc sharp_ls020b1dd01d = { |
| 3371 | .timings = &sharp_ls020b1dd01d_timing, |
| 3372 | .num_timings = 1, |
| 3373 | .bpc = 6, |
| 3374 | .size = { |
| 3375 | .width = 42, |
| 3376 | .height = 28, |
| 3377 | }, |
| 3378 | .bus_format = MEDIA_BUS_FMT_RGB565_1X16, |
| 3379 | .bus_flags = DRM_BUS_FLAG_DE_HIGH |
Sam Ravnborg | f5436f7 | 2020-06-30 20:05:43 +0200 | [diff] [blame] | 3380 | | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE |
Paul Cercueil | f1bd37f | 2019-06-03 17:31:20 +0200 | [diff] [blame] | 3381 | | DRM_BUS_FLAG_SHARP_SIGNALS, |
| 3382 | }; |
| 3383 | |
Boris BREZILLON | 9c6615b | 2015-03-19 14:43:00 +0100 | [diff] [blame] | 3384 | static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = { |
| 3385 | .clock = 33300, |
| 3386 | .hdisplay = 800, |
| 3387 | .hsync_start = 800 + 1, |
| 3388 | .hsync_end = 800 + 1 + 64, |
| 3389 | .htotal = 800 + 1 + 64 + 64, |
| 3390 | .vdisplay = 480, |
| 3391 | .vsync_start = 480 + 1, |
| 3392 | .vsync_end = 480 + 1 + 23, |
| 3393 | .vtotal = 480 + 1 + 23 + 22, |
Boris BREZILLON | 9c6615b | 2015-03-19 14:43:00 +0100 | [diff] [blame] | 3394 | }; |
| 3395 | |
| 3396 | static const struct panel_desc shelly_sca07010_bfn_lnn = { |
| 3397 | .modes = &shelly_sca07010_bfn_lnn_mode, |
| 3398 | .num_modes = 1, |
| 3399 | .size = { |
| 3400 | .width = 152, |
| 3401 | .height = 91, |
| 3402 | }, |
| 3403 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 3404 | }; |
| 3405 | |
Pascal Roeleven | 105235e | 2020-03-20 12:21:33 +0100 | [diff] [blame] | 3406 | static const struct drm_display_mode starry_kr070pe2t_mode = { |
| 3407 | .clock = 33000, |
| 3408 | .hdisplay = 800, |
| 3409 | .hsync_start = 800 + 209, |
| 3410 | .hsync_end = 800 + 209 + 1, |
| 3411 | .htotal = 800 + 209 + 1 + 45, |
| 3412 | .vdisplay = 480, |
| 3413 | .vsync_start = 480 + 22, |
| 3414 | .vsync_end = 480 + 22 + 1, |
| 3415 | .vtotal = 480 + 22 + 1 + 22, |
Pascal Roeleven | 105235e | 2020-03-20 12:21:33 +0100 | [diff] [blame] | 3416 | }; |
| 3417 | |
| 3418 | static const struct panel_desc starry_kr070pe2t = { |
| 3419 | .modes = &starry_kr070pe2t_mode, |
| 3420 | .num_modes = 1, |
| 3421 | .bpc = 8, |
| 3422 | .size = { |
| 3423 | .width = 152, |
| 3424 | .height = 86, |
| 3425 | }, |
| 3426 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 3427 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, |
Laurent Pinchart | 41fad30 | 2020-06-30 02:33:17 +0300 | [diff] [blame] | 3428 | .connector_type = DRM_MODE_CONNECTOR_DPI, |
Pascal Roeleven | 105235e | 2020-03-20 12:21:33 +0100 | [diff] [blame] | 3429 | }; |
| 3430 | |
Douglas Anderson | 9bb34c4 | 2016-06-10 10:02:07 -0700 | [diff] [blame] | 3431 | static const struct drm_display_mode starry_kr122ea0sra_mode = { |
| 3432 | .clock = 147000, |
| 3433 | .hdisplay = 1920, |
| 3434 | .hsync_start = 1920 + 16, |
| 3435 | .hsync_end = 1920 + 16 + 16, |
| 3436 | .htotal = 1920 + 16 + 16 + 32, |
| 3437 | .vdisplay = 1200, |
| 3438 | .vsync_start = 1200 + 15, |
| 3439 | .vsync_end = 1200 + 15 + 2, |
| 3440 | .vtotal = 1200 + 15 + 2 + 18, |
Douglas Anderson | 9bb34c4 | 2016-06-10 10:02:07 -0700 | [diff] [blame] | 3441 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 3442 | }; |
| 3443 | |
| 3444 | static const struct panel_desc starry_kr122ea0sra = { |
| 3445 | .modes = &starry_kr122ea0sra_mode, |
| 3446 | .num_modes = 1, |
| 3447 | .size = { |
| 3448 | .width = 263, |
| 3449 | .height = 164, |
| 3450 | }, |
Brian Norris | c46b924 | 2016-08-26 14:32:14 -0700 | [diff] [blame] | 3451 | .delay = { |
| 3452 | .prepare = 10 + 200, |
| 3453 | .enable = 50, |
| 3454 | .unprepare = 10 + 500, |
| 3455 | }, |
Douglas Anderson | 9bb34c4 | 2016-06-10 10:02:07 -0700 | [diff] [blame] | 3456 | }; |
| 3457 | |
Jyri Sarha | 4216153 | 2019-03-22 10:33:36 +0200 | [diff] [blame] | 3458 | static const struct drm_display_mode tfc_s9700rtwv43tr_01b_mode = { |
| 3459 | .clock = 30000, |
| 3460 | .hdisplay = 800, |
| 3461 | .hsync_start = 800 + 39, |
| 3462 | .hsync_end = 800 + 39 + 47, |
| 3463 | .htotal = 800 + 39 + 47 + 39, |
| 3464 | .vdisplay = 480, |
| 3465 | .vsync_start = 480 + 13, |
| 3466 | .vsync_end = 480 + 13 + 2, |
| 3467 | .vtotal = 480 + 13 + 2 + 29, |
Jyri Sarha | 4216153 | 2019-03-22 10:33:36 +0200 | [diff] [blame] | 3468 | }; |
| 3469 | |
| 3470 | static const struct panel_desc tfc_s9700rtwv43tr_01b = { |
| 3471 | .modes = &tfc_s9700rtwv43tr_01b_mode, |
| 3472 | .num_modes = 1, |
| 3473 | .bpc = 8, |
| 3474 | .size = { |
| 3475 | .width = 155, |
| 3476 | .height = 90, |
| 3477 | }, |
| 3478 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Sam Ravnborg | f5436f7 | 2020-06-30 20:05:43 +0200 | [diff] [blame] | 3479 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, |
Jyri Sarha | 4216153 | 2019-03-22 10:33:36 +0200 | [diff] [blame] | 3480 | }; |
| 3481 | |
Gary Bisson | adb973e | 2016-12-02 09:52:08 +0100 | [diff] [blame] | 3482 | static const struct display_timing tianma_tm070jdhg30_timing = { |
| 3483 | .pixelclock = { 62600000, 68200000, 78100000 }, |
| 3484 | .hactive = { 1280, 1280, 1280 }, |
| 3485 | .hfront_porch = { 15, 64, 159 }, |
| 3486 | .hback_porch = { 5, 5, 5 }, |
| 3487 | .hsync_len = { 1, 1, 256 }, |
| 3488 | .vactive = { 800, 800, 800 }, |
| 3489 | .vfront_porch = { 3, 40, 99 }, |
| 3490 | .vback_porch = { 2, 2, 2 }, |
| 3491 | .vsync_len = { 1, 1, 128 }, |
| 3492 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 3493 | }; |
| 3494 | |
| 3495 | static const struct panel_desc tianma_tm070jdhg30 = { |
| 3496 | .timings = &tianma_tm070jdhg30_timing, |
| 3497 | .num_timings = 1, |
| 3498 | .bpc = 8, |
| 3499 | .size = { |
| 3500 | .width = 151, |
| 3501 | .height = 95, |
| 3502 | }, |
| 3503 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 3504 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Gary Bisson | adb973e | 2016-12-02 09:52:08 +0100 | [diff] [blame] | 3505 | }; |
| 3506 | |
Max Merchel | b3bfcdf | 2020-06-12 09:22:19 +0200 | [diff] [blame] | 3507 | static const struct panel_desc tianma_tm070jvhg33 = { |
| 3508 | .timings = &tianma_tm070jdhg30_timing, |
| 3509 | .num_timings = 1, |
| 3510 | .bpc = 8, |
| 3511 | .size = { |
| 3512 | .width = 150, |
| 3513 | .height = 94, |
| 3514 | }, |
| 3515 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 3516 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
| 3517 | }; |
| 3518 | |
Lukasz Majewski | 870a0b1 | 2017-11-07 16:30:58 +0100 | [diff] [blame] | 3519 | static const struct display_timing tianma_tm070rvhg71_timing = { |
| 3520 | .pixelclock = { 27700000, 29200000, 39600000 }, |
| 3521 | .hactive = { 800, 800, 800 }, |
| 3522 | .hfront_porch = { 12, 40, 212 }, |
| 3523 | .hback_porch = { 88, 88, 88 }, |
| 3524 | .hsync_len = { 1, 1, 40 }, |
| 3525 | .vactive = { 480, 480, 480 }, |
| 3526 | .vfront_porch = { 1, 13, 88 }, |
| 3527 | .vback_porch = { 32, 32, 32 }, |
| 3528 | .vsync_len = { 1, 1, 3 }, |
| 3529 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 3530 | }; |
| 3531 | |
| 3532 | static const struct panel_desc tianma_tm070rvhg71 = { |
| 3533 | .timings = &tianma_tm070rvhg71_timing, |
| 3534 | .num_timings = 1, |
| 3535 | .bpc = 8, |
| 3536 | .size = { |
| 3537 | .width = 154, |
| 3538 | .height = 86, |
| 3539 | }, |
| 3540 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 3541 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lukasz Majewski | 870a0b1 | 2017-11-07 16:30:58 +0100 | [diff] [blame] | 3542 | }; |
| 3543 | |
Linus Walleij | d8a0d6a | 2019-08-05 10:58:46 +0200 | [diff] [blame] | 3544 | static const struct drm_display_mode ti_nspire_cx_lcd_mode[] = { |
| 3545 | { |
| 3546 | .clock = 10000, |
| 3547 | .hdisplay = 320, |
| 3548 | .hsync_start = 320 + 50, |
| 3549 | .hsync_end = 320 + 50 + 6, |
| 3550 | .htotal = 320 + 50 + 6 + 38, |
| 3551 | .vdisplay = 240, |
| 3552 | .vsync_start = 240 + 3, |
| 3553 | .vsync_end = 240 + 3 + 1, |
| 3554 | .vtotal = 240 + 3 + 1 + 17, |
Linus Walleij | d8a0d6a | 2019-08-05 10:58:46 +0200 | [diff] [blame] | 3555 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 3556 | }, |
| 3557 | }; |
| 3558 | |
| 3559 | static const struct panel_desc ti_nspire_cx_lcd_panel = { |
| 3560 | .modes = ti_nspire_cx_lcd_mode, |
| 3561 | .num_modes = 1, |
| 3562 | .bpc = 8, |
| 3563 | .size = { |
| 3564 | .width = 65, |
| 3565 | .height = 49, |
| 3566 | }, |
| 3567 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Sam Ravnborg | f5436f7 | 2020-06-30 20:05:43 +0200 | [diff] [blame] | 3568 | .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE, |
Linus Walleij | d8a0d6a | 2019-08-05 10:58:46 +0200 | [diff] [blame] | 3569 | }; |
| 3570 | |
| 3571 | static const struct drm_display_mode ti_nspire_classic_lcd_mode[] = { |
| 3572 | { |
| 3573 | .clock = 10000, |
| 3574 | .hdisplay = 320, |
| 3575 | .hsync_start = 320 + 6, |
| 3576 | .hsync_end = 320 + 6 + 6, |
| 3577 | .htotal = 320 + 6 + 6 + 6, |
| 3578 | .vdisplay = 240, |
| 3579 | .vsync_start = 240 + 0, |
| 3580 | .vsync_end = 240 + 0 + 1, |
| 3581 | .vtotal = 240 + 0 + 1 + 0, |
Linus Walleij | d8a0d6a | 2019-08-05 10:58:46 +0200 | [diff] [blame] | 3582 | .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, |
| 3583 | }, |
| 3584 | }; |
| 3585 | |
| 3586 | static const struct panel_desc ti_nspire_classic_lcd_panel = { |
| 3587 | .modes = ti_nspire_classic_lcd_mode, |
| 3588 | .num_modes = 1, |
| 3589 | /* The grayscale panel has 8 bit for the color .. Y (black) */ |
| 3590 | .bpc = 8, |
| 3591 | .size = { |
| 3592 | .width = 71, |
| 3593 | .height = 53, |
| 3594 | }, |
| 3595 | /* This is the grayscale bus format */ |
| 3596 | .bus_format = MEDIA_BUS_FMT_Y8_1X8, |
Sam Ravnborg | f5436f7 | 2020-06-30 20:05:43 +0200 | [diff] [blame] | 3597 | .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, |
Linus Walleij | d8a0d6a | 2019-08-05 10:58:46 +0200 | [diff] [blame] | 3598 | }; |
| 3599 | |
Lucas Stach | 06e733e | 2017-10-18 19:22:40 +0200 | [diff] [blame] | 3600 | static const struct drm_display_mode toshiba_lt089ac29000_mode = { |
| 3601 | .clock = 79500, |
| 3602 | .hdisplay = 1280, |
| 3603 | .hsync_start = 1280 + 192, |
| 3604 | .hsync_end = 1280 + 192 + 128, |
| 3605 | .htotal = 1280 + 192 + 128 + 64, |
| 3606 | .vdisplay = 768, |
| 3607 | .vsync_start = 768 + 20, |
| 3608 | .vsync_end = 768 + 20 + 7, |
| 3609 | .vtotal = 768 + 20 + 7 + 3, |
Lucas Stach | 06e733e | 2017-10-18 19:22:40 +0200 | [diff] [blame] | 3610 | }; |
| 3611 | |
| 3612 | static const struct panel_desc toshiba_lt089ac29000 = { |
| 3613 | .modes = &toshiba_lt089ac29000_mode, |
| 3614 | .num_modes = 1, |
| 3615 | .size = { |
| 3616 | .width = 194, |
| 3617 | .height = 116, |
| 3618 | }, |
Boris Brezillon | 9781bd1 | 2020-01-28 14:55:13 +0100 | [diff] [blame] | 3619 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, |
Laurent Pinchart | c471583 | 2020-06-30 02:33:19 +0300 | [diff] [blame] | 3620 | .bus_flags = DRM_BUS_FLAG_DE_HIGH, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 3621 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Lucas Stach | 06e733e | 2017-10-18 19:22:40 +0200 | [diff] [blame] | 3622 | }; |
| 3623 | |
Bhuvanchandra DV | 227e4f4 | 2016-05-05 11:47:07 +0530 | [diff] [blame] | 3624 | static const struct drm_display_mode tpk_f07a_0102_mode = { |
| 3625 | .clock = 33260, |
| 3626 | .hdisplay = 800, |
| 3627 | .hsync_start = 800 + 40, |
| 3628 | .hsync_end = 800 + 40 + 128, |
| 3629 | .htotal = 800 + 40 + 128 + 88, |
| 3630 | .vdisplay = 480, |
| 3631 | .vsync_start = 480 + 10, |
| 3632 | .vsync_end = 480 + 10 + 2, |
| 3633 | .vtotal = 480 + 10 + 2 + 33, |
Bhuvanchandra DV | 227e4f4 | 2016-05-05 11:47:07 +0530 | [diff] [blame] | 3634 | }; |
| 3635 | |
| 3636 | static const struct panel_desc tpk_f07a_0102 = { |
| 3637 | .modes = &tpk_f07a_0102_mode, |
| 3638 | .num_modes = 1, |
| 3639 | .size = { |
| 3640 | .width = 152, |
| 3641 | .height = 91, |
| 3642 | }, |
Laurent Pinchart | 88bc417 | 2018-09-22 15:02:42 +0300 | [diff] [blame] | 3643 | .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, |
Bhuvanchandra DV | 227e4f4 | 2016-05-05 11:47:07 +0530 | [diff] [blame] | 3644 | }; |
| 3645 | |
| 3646 | static const struct drm_display_mode tpk_f10a_0102_mode = { |
| 3647 | .clock = 45000, |
| 3648 | .hdisplay = 1024, |
| 3649 | .hsync_start = 1024 + 176, |
| 3650 | .hsync_end = 1024 + 176 + 5, |
| 3651 | .htotal = 1024 + 176 + 5 + 88, |
| 3652 | .vdisplay = 600, |
| 3653 | .vsync_start = 600 + 20, |
| 3654 | .vsync_end = 600 + 20 + 5, |
| 3655 | .vtotal = 600 + 20 + 5 + 25, |
Bhuvanchandra DV | 227e4f4 | 2016-05-05 11:47:07 +0530 | [diff] [blame] | 3656 | }; |
| 3657 | |
| 3658 | static const struct panel_desc tpk_f10a_0102 = { |
| 3659 | .modes = &tpk_f10a_0102_mode, |
| 3660 | .num_modes = 1, |
| 3661 | .size = { |
| 3662 | .width = 223, |
| 3663 | .height = 125, |
| 3664 | }, |
| 3665 | }; |
| 3666 | |
Maciej S. Szmigiero | 06a9dc6 | 2016-02-13 22:52:03 +0100 | [diff] [blame] | 3667 | static const struct display_timing urt_umsh_8596md_timing = { |
| 3668 | .pixelclock = { 33260000, 33260000, 33260000 }, |
| 3669 | .hactive = { 800, 800, 800 }, |
| 3670 | .hfront_porch = { 41, 41, 41 }, |
| 3671 | .hback_porch = { 216 - 128, 216 - 128, 216 - 128 }, |
| 3672 | .hsync_len = { 71, 128, 128 }, |
| 3673 | .vactive = { 480, 480, 480 }, |
| 3674 | .vfront_porch = { 10, 10, 10 }, |
| 3675 | .vback_porch = { 35 - 2, 35 - 2, 35 - 2 }, |
| 3676 | .vsync_len = { 2, 2, 2 }, |
| 3677 | .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE | |
| 3678 | DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW, |
| 3679 | }; |
| 3680 | |
| 3681 | static const struct panel_desc urt_umsh_8596md_lvds = { |
| 3682 | .timings = &urt_umsh_8596md_timing, |
| 3683 | .num_timings = 1, |
| 3684 | .bpc = 6, |
| 3685 | .size = { |
| 3686 | .width = 152, |
| 3687 | .height = 91, |
| 3688 | }, |
| 3689 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Laurent Pinchart | 9a2654c | 2019-09-04 16:28:03 +0300 | [diff] [blame] | 3690 | .connector_type = DRM_MODE_CONNECTOR_LVDS, |
Maciej S. Szmigiero | 06a9dc6 | 2016-02-13 22:52:03 +0100 | [diff] [blame] | 3691 | }; |
| 3692 | |
| 3693 | static const struct panel_desc urt_umsh_8596md_parallel = { |
| 3694 | .timings = &urt_umsh_8596md_timing, |
| 3695 | .num_timings = 1, |
| 3696 | .bpc = 6, |
| 3697 | .size = { |
| 3698 | .width = 152, |
| 3699 | .height = 91, |
| 3700 | }, |
| 3701 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 3702 | }; |
| 3703 | |
Fabio Estevam | 0420618 | 2019-02-18 21:27:06 -0300 | [diff] [blame] | 3704 | static const struct drm_display_mode vl050_8048nt_c01_mode = { |
| 3705 | .clock = 33333, |
| 3706 | .hdisplay = 800, |
| 3707 | .hsync_start = 800 + 210, |
| 3708 | .hsync_end = 800 + 210 + 20, |
| 3709 | .htotal = 800 + 210 + 20 + 46, |
| 3710 | .vdisplay = 480, |
| 3711 | .vsync_start = 480 + 22, |
| 3712 | .vsync_end = 480 + 22 + 10, |
| 3713 | .vtotal = 480 + 22 + 10 + 23, |
Fabio Estevam | 0420618 | 2019-02-18 21:27:06 -0300 | [diff] [blame] | 3714 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 3715 | }; |
| 3716 | |
| 3717 | static const struct panel_desc vl050_8048nt_c01 = { |
| 3718 | .modes = &vl050_8048nt_c01_mode, |
| 3719 | .num_modes = 1, |
| 3720 | .bpc = 8, |
| 3721 | .size = { |
| 3722 | .width = 120, |
| 3723 | .height = 76, |
| 3724 | }, |
| 3725 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Sam Ravnborg | f5436f7 | 2020-06-30 20:05:43 +0200 | [diff] [blame] | 3726 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE, |
Fabio Estevam | 0420618 | 2019-02-18 21:27:06 -0300 | [diff] [blame] | 3727 | }; |
| 3728 | |
Richard Genoud | e4bac40 | 2017-03-27 12:33:23 +0200 | [diff] [blame] | 3729 | static const struct drm_display_mode winstar_wf35ltiacd_mode = { |
| 3730 | .clock = 6410, |
| 3731 | .hdisplay = 320, |
| 3732 | .hsync_start = 320 + 20, |
| 3733 | .hsync_end = 320 + 20 + 30, |
| 3734 | .htotal = 320 + 20 + 30 + 38, |
| 3735 | .vdisplay = 240, |
| 3736 | .vsync_start = 240 + 4, |
| 3737 | .vsync_end = 240 + 4 + 3, |
| 3738 | .vtotal = 240 + 4 + 3 + 15, |
Richard Genoud | e4bac40 | 2017-03-27 12:33:23 +0200 | [diff] [blame] | 3739 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 3740 | }; |
| 3741 | |
| 3742 | static const struct panel_desc winstar_wf35ltiacd = { |
| 3743 | .modes = &winstar_wf35ltiacd_mode, |
| 3744 | .num_modes = 1, |
| 3745 | .bpc = 8, |
| 3746 | .size = { |
| 3747 | .width = 70, |
| 3748 | .height = 53, |
| 3749 | }, |
| 3750 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 3751 | }; |
| 3752 | |
Linus Walleij | fcec416 | 2018-10-26 13:13:34 +0200 | [diff] [blame] | 3753 | static const struct drm_display_mode arm_rtsm_mode[] = { |
| 3754 | { |
| 3755 | .clock = 65000, |
| 3756 | .hdisplay = 1024, |
| 3757 | .hsync_start = 1024 + 24, |
| 3758 | .hsync_end = 1024 + 24 + 136, |
| 3759 | .htotal = 1024 + 24 + 136 + 160, |
| 3760 | .vdisplay = 768, |
| 3761 | .vsync_start = 768 + 3, |
| 3762 | .vsync_end = 768 + 3 + 6, |
| 3763 | .vtotal = 768 + 3 + 6 + 29, |
Linus Walleij | fcec416 | 2018-10-26 13:13:34 +0200 | [diff] [blame] | 3764 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 3765 | }, |
| 3766 | }; |
| 3767 | |
| 3768 | static const struct panel_desc arm_rtsm = { |
| 3769 | .modes = arm_rtsm_mode, |
| 3770 | .num_modes = 1, |
| 3771 | .bpc = 8, |
| 3772 | .size = { |
| 3773 | .width = 400, |
| 3774 | .height = 300, |
| 3775 | }, |
| 3776 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 3777 | }; |
| 3778 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 3779 | static const struct of_device_id platform_of_match[] = { |
| 3780 | { |
Yannick Fertre | 966fea7 | 2017-03-28 11:44:49 +0200 | [diff] [blame] | 3781 | .compatible = "ampire,am-480272h3tmqw-t01h", |
| 3782 | .data = &ire_am_480272h3tmqw_t01h, |
| 3783 | }, { |
Philipp Zabel | 1c550fa1 | 2015-02-11 18:50:09 +0100 | [diff] [blame] | 3784 | .compatible = "ampire,am800480r3tmqwa1h", |
| 3785 | .data = &ire_am800480r3tmqwa1h, |
| 3786 | }, { |
Linus Walleij | fcec416 | 2018-10-26 13:13:34 +0200 | [diff] [blame] | 3787 | .compatible = "arm,rtsm-display", |
| 3788 | .data = &arm_rtsm, |
| 3789 | }, { |
Sébastien Szymanski | c479450f | 2019-05-07 17:27:12 +0200 | [diff] [blame] | 3790 | .compatible = "armadeus,st0700-adapt", |
| 3791 | .data = &armadeus_st0700_adapt, |
| 3792 | }, { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 3793 | .compatible = "auo,b101aw03", |
| 3794 | .data = &auo_b101aw03, |
| 3795 | }, { |
Huang Lin | a531bc3 | 2015-02-28 10:18:58 +0800 | [diff] [blame] | 3796 | .compatible = "auo,b101ean01", |
| 3797 | .data = &auo_b101ean01, |
| 3798 | }, { |
Rob Clark | dac746e | 2014-08-01 17:01:06 -0400 | [diff] [blame] | 3799 | .compatible = "auo,b101xtn01", |
| 3800 | .data = &auo_b101xtn01, |
| 3801 | }, { |
Rob Clark | da458286 | 2020-01-08 15:53:56 -0800 | [diff] [blame] | 3802 | .compatible = "auo,b116xa01", |
| 3803 | .data = &auo_b116xak01, |
| 3804 | }, { |
Ajay Kumar | e35e305 | 2014-09-01 15:40:02 +0530 | [diff] [blame] | 3805 | .compatible = "auo,b116xw03", |
| 3806 | .data = &auo_b116xw03, |
| 3807 | }, { |
Ajay Kumar | 3e51d60 | 2014-07-31 23:12:12 +0530 | [diff] [blame] | 3808 | .compatible = "auo,b133htn01", |
| 3809 | .data = &auo_b133htn01, |
| 3810 | }, { |
Stéphane Marchesin | a333f7a | 2014-05-23 19:27:59 -0700 | [diff] [blame] | 3811 | .compatible = "auo,b133xtn01", |
| 3812 | .data = &auo_b133xtn01, |
| 3813 | }, { |
Lukasz Majewski | bccfaff | 2018-05-14 21:08:49 +0200 | [diff] [blame] | 3814 | .compatible = "auo,g070vvn01", |
| 3815 | .data = &auo_g070vvn01, |
| 3816 | }, { |
Alex Gonzalez | 4fb8640 | 2018-10-25 17:09:30 +0200 | [diff] [blame] | 3817 | .compatible = "auo,g101evn010", |
| 3818 | .data = &auo_g101evn010, |
| 3819 | }, { |
Christoph Fritz | 4451c28 | 2017-12-16 14:13:36 +0100 | [diff] [blame] | 3820 | .compatible = "auo,g104sn02", |
| 3821 | .data = &auo_g104sn02, |
| 3822 | }, { |
Sebastian Reichel | 03e909a | 2020-04-15 19:27:25 +0200 | [diff] [blame] | 3823 | .compatible = "auo,g121ean01", |
| 3824 | .data = &auo_g121ean01, |
| 3825 | }, { |
Lucas Stach | 697035c | 2016-11-30 14:09:55 +0100 | [diff] [blame] | 3826 | .compatible = "auo,g133han01", |
| 3827 | .data = &auo_g133han01, |
| 3828 | }, { |
Sebastian Reichel | d9ccd1f | 2020-04-15 19:27:24 +0200 | [diff] [blame] | 3829 | .compatible = "auo,g156xtn01", |
| 3830 | .data = &auo_g156xtn01, |
| 3831 | }, { |
Lucas Stach | 8c31f60 | 2016-11-30 14:09:56 +0100 | [diff] [blame] | 3832 | .compatible = "auo,g185han01", |
| 3833 | .data = &auo_g185han01, |
| 3834 | }, { |
Sebastian Reichel | 2f7b832 | 2020-04-15 19:27:23 +0200 | [diff] [blame] | 3835 | .compatible = "auo,g190ean01", |
| 3836 | .data = &auo_g190ean01, |
| 3837 | }, { |
Lucas Stach | 70c0d5b | 2017-06-08 20:07:58 +0200 | [diff] [blame] | 3838 | .compatible = "auo,p320hvn03", |
| 3839 | .data = &auo_p320hvn03, |
| 3840 | }, { |
Haixia Shi | 7ee933a | 2016-10-11 14:59:16 -0700 | [diff] [blame] | 3841 | .compatible = "auo,t215hvn01", |
| 3842 | .data = &auo_t215hvn01, |
| 3843 | }, { |
Philipp Zabel | d47df63 | 2014-12-18 16:43:43 +0100 | [diff] [blame] | 3844 | .compatible = "avic,tm070ddh03", |
| 3845 | .data = &avic_tm070ddh03, |
| 3846 | }, { |
Chen-Yu Tsai | 7ad8b41 | 2018-09-07 12:19:46 +0800 | [diff] [blame] | 3847 | .compatible = "bananapi,s070wv20-ct16", |
| 3848 | .data = &bananapi_s070wv20_ct16, |
| 3849 | }, { |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 3850 | .compatible = "boe,hv070wsa-100", |
| 3851 | .data = &boe_hv070wsa |
| 3852 | }, { |
Caesar Wang | cac1a41 | 2016-12-14 11:19:56 +0800 | [diff] [blame] | 3853 | .compatible = "boe,nv101wxmn51", |
| 3854 | .data = &boe_nv101wxmn51, |
| 3855 | }, { |
Bjorn Andersson | b0c664c | 2020-04-20 14:57:42 -0700 | [diff] [blame] | 3856 | .compatible = "boe,nv133fhm-n61", |
| 3857 | .data = &boe_nv133fhm_n61, |
| 3858 | }, { |
Douglas Anderson | cfe40d0 | 2020-05-08 15:59:02 -0700 | [diff] [blame] | 3859 | .compatible = "boe,nv133fhm-n62", |
| 3860 | .data = &boe_nv133fhm_n61, |
| 3861 | }, { |
Tobias Schramm | a511981 | 2020-01-09 12:29:52 +0100 | [diff] [blame] | 3862 | .compatible = "boe,nv140fhmn49", |
| 3863 | .data = &boe_nv140fhmn49, |
| 3864 | }, { |
Giulio Benetti | e58edce | 2018-07-31 01:11:16 +0200 | [diff] [blame] | 3865 | .compatible = "cdtech,s043wq26h-ct7", |
| 3866 | .data = &cdtech_s043wq26h_ct7, |
| 3867 | }, { |
Michael Krummsdorf | 0e3b67f | 2020-06-12 09:22:18 +0200 | [diff] [blame] | 3868 | .compatible = "cdtech,s070pws19hp-fc21", |
| 3869 | .data = &cdtech_s070pws19hp_fc21, |
| 3870 | }, { |
| 3871 | .compatible = "cdtech,s070swv29hg-dc44", |
| 3872 | .data = &cdtech_s070swv29hg_dc44, |
| 3873 | }, { |
Giulio Benetti | 982f944 | 2018-07-31 01:11:14 +0200 | [diff] [blame] | 3874 | .compatible = "cdtech,s070wv95-ct16", |
| 3875 | .data = &cdtech_s070wv95_ct16, |
| 3876 | }, { |
Randy Li | 2cb35c8 | 2016-09-20 03:02:51 +0800 | [diff] [blame] | 3877 | .compatible = "chunghwa,claa070wp03xg", |
| 3878 | .data = &chunghwa_claa070wp03xg, |
| 3879 | }, { |
Stephen Warren | 4c93075 | 2014-01-07 16:46:26 -0700 | [diff] [blame] | 3880 | .compatible = "chunghwa,claa101wa01a", |
| 3881 | .data = &chunghwa_claa101wa01a |
| 3882 | }, { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 3883 | .compatible = "chunghwa,claa101wb01", |
| 3884 | .data = &chunghwa_claa101wb01 |
| 3885 | }, { |
Michal Vokáč | 97ceb1f | 2018-06-25 14:41:30 +0200 | [diff] [blame] | 3886 | .compatible = "dataimage,scf0700c48ggu18", |
| 3887 | .data = &dataimage_scf0700c48ggu18, |
| 3888 | }, { |
Philipp Zabel | 0ca0c82 | 2018-05-23 11:25:04 +0200 | [diff] [blame] | 3889 | .compatible = "dlc,dlc0700yzg-1", |
| 3890 | .data = &dlc_dlc0700yzg_1, |
| 3891 | }, { |
Marco Felsch | 6cbe7cd | 2018-09-24 17:26:10 +0200 | [diff] [blame] | 3892 | .compatible = "dlc,dlc1010gig", |
| 3893 | .data = &dlc_dlc1010gig, |
| 3894 | }, { |
Andreas Pretzsch | c2d24af | 2019-04-16 12:16:30 +0200 | [diff] [blame] | 3895 | .compatible = "edt,et035012dm6", |
| 3896 | .data = &edt_et035012dm6, |
| 3897 | }, { |
Marian-Cristian Rotariu | 82d57a5 | 2020-01-30 12:08:38 +0000 | [diff] [blame] | 3898 | .compatible = "edt,etm043080dh6gp", |
| 3899 | .data = &edt_etm043080dh6gp, |
| 3900 | }, { |
Marek Vasut | fd819bf | 2019-02-19 15:04:38 +0100 | [diff] [blame] | 3901 | .compatible = "edt,etm0430g0dh6", |
| 3902 | .data = &edt_etm0430g0dh6, |
| 3903 | }, { |
Stefan Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 3904 | .compatible = "edt,et057090dhu", |
| 3905 | .data = &edt_et057090dhu, |
| 3906 | }, { |
Philipp Zabel | fff5de4 | 2014-05-15 12:25:47 +0200 | [diff] [blame] | 3907 | .compatible = "edt,et070080dh6", |
| 3908 | .data = &edt_etm0700g0dh6, |
| 3909 | }, { |
| 3910 | .compatible = "edt,etm0700g0dh6", |
| 3911 | .data = &edt_etm0700g0dh6, |
| 3912 | }, { |
Jan Tuerk | aa7e645 | 2018-06-19 11:55:44 +0200 | [diff] [blame] | 3913 | .compatible = "edt,etm0700g0bdh6", |
| 3914 | .data = &edt_etm0700g0bdh6, |
| 3915 | }, { |
Jan Tuerk | aad34de | 2018-06-19 11:55:45 +0200 | [diff] [blame] | 3916 | .compatible = "edt,etm0700g0edh6", |
| 3917 | .data = &edt_etm0700g0bdh6, |
| 3918 | }, { |
Marco Felsch | 9158e3c | 2019-04-16 12:06:45 +0200 | [diff] [blame] | 3919 | .compatible = "evervision,vgg804821", |
| 3920 | .data = &evervision_vgg804821, |
| 3921 | }, { |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 3922 | .compatible = "foxlink,fl500wvr00-a0t", |
| 3923 | .data = &foxlink_fl500wvr00_a0t, |
| 3924 | }, { |
Paul Cercueil | 7b6bd84 | 2020-01-13 13:17:41 -0300 | [diff] [blame] | 3925 | .compatible = "frida,frd350h54004", |
| 3926 | .data = &frida_frd350h54004, |
| 3927 | }, { |
Jagan Teki | 3be2071 | 2019-05-07 18:37:07 +0530 | [diff] [blame] | 3928 | .compatible = "friendlyarm,hd702e", |
| 3929 | .data = &friendlyarm_hd702e, |
| 3930 | }, { |
Philipp Zabel | d435a2a | 2014-11-19 10:29:55 +0100 | [diff] [blame] | 3931 | .compatible = "giantplus,gpg482739qs5", |
| 3932 | .data = &giantplus_gpg482739qs5 |
| 3933 | }, { |
Paul Cercueil | 2c6574a | 2019-06-06 00:22:47 +0200 | [diff] [blame] | 3934 | .compatible = "giantplus,gpm940b0", |
| 3935 | .data = &giantplus_gpm940b0, |
| 3936 | }, { |
Philipp Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 3937 | .compatible = "hannstar,hsd070pww1", |
| 3938 | .data = &hannstar_hsd070pww1, |
| 3939 | }, { |
Eric Nelson | c0d607e | 2015-04-13 15:09:26 -0700 | [diff] [blame] | 3940 | .compatible = "hannstar,hsd100pxn1", |
| 3941 | .data = &hannstar_hsd100pxn1, |
| 3942 | }, { |
Lucas Stach | 61ac0bf | 2014-11-06 17:44:35 +0100 | [diff] [blame] | 3943 | .compatible = "hit,tx23d38vm0caa", |
| 3944 | .data = &hitachi_tx23d38vm0caa |
| 3945 | }, { |
Nicolas Ferre | 41bcceb | 2015-03-19 14:43:01 +0100 | [diff] [blame] | 3946 | .compatible = "innolux,at043tn24", |
| 3947 | .data = &innolux_at043tn24, |
| 3948 | }, { |
Riccardo Bortolato | 4fc24ab | 2016-04-20 15:37:15 +0200 | [diff] [blame] | 3949 | .compatible = "innolux,at070tn92", |
| 3950 | .data = &innolux_at070tn92, |
| 3951 | }, { |
Christoph Fritz | a5d2ade | 2018-06-04 13:16:48 +0200 | [diff] [blame] | 3952 | .compatible = "innolux,g070y2-l01", |
| 3953 | .data = &innolux_g070y2_l01, |
| 3954 | }, { |
| 3955 | .compatible = "innolux,g101ice-l01", |
Michael Olbrich | 1e29b84 | 2016-08-15 14:32:02 +0200 | [diff] [blame] | 3956 | .data = &innolux_g101ice_l01 |
| 3957 | }, { |
Christoph Fritz | a5d2ade | 2018-06-04 13:16:48 +0200 | [diff] [blame] | 3958 | .compatible = "innolux,g121i1-l01", |
Lucas Stach | d731f66 | 2014-11-06 17:44:33 +0100 | [diff] [blame] | 3959 | .data = &innolux_g121i1_l01 |
| 3960 | }, { |
Akshay Bhat | f8fa17b | 2015-11-18 15:57:47 -0500 | [diff] [blame] | 3961 | .compatible = "innolux,g121x1-l03", |
| 3962 | .data = &innolux_g121x1_l03, |
| 3963 | }, { |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 3964 | .compatible = "innolux,n116bge", |
| 3965 | .data = &innolux_n116bge, |
| 3966 | }, { |
Alban Bedel | ea44739 | 2014-07-22 08:38:55 +0200 | [diff] [blame] | 3967 | .compatible = "innolux,n156bge-l21", |
| 3968 | .data = &innolux_n156bge_l21, |
| 3969 | }, { |
Douglas Anderson | 8f054b6 | 2018-10-25 15:21:34 -0700 | [diff] [blame] | 3970 | .compatible = "innolux,p120zdg-bf1", |
| 3971 | .data = &innolux_p120zdg_bf1, |
spanda@codeaurora.org | da50bd4 | 2018-05-15 11:22:43 +0530 | [diff] [blame] | 3972 | }, { |
Michael Grzeschik | bccac3f | 2015-03-19 12:22:44 +0100 | [diff] [blame] | 3973 | .compatible = "innolux,zj070na-01p", |
| 3974 | .data = &innolux_zj070na_01p, |
| 3975 | }, { |
Bjorn Andersson | e1ca518 | 2020-04-20 14:57:28 -0700 | [diff] [blame] | 3976 | .compatible = "ivo,m133nwf4-r0", |
| 3977 | .data = &ivo_m133nwf4_r0, |
| 3978 | }, { |
Lukasz Majewski | 14bf60c | 2019-05-15 18:06:12 +0200 | [diff] [blame] | 3979 | .compatible = "koe,tx14d24vm1bpa", |
| 3980 | .data = &koe_tx14d24vm1bpa, |
| 3981 | }, { |
Liu Ying | 8a07052 | 2020-06-01 14:11:20 +0800 | [diff] [blame] | 3982 | .compatible = "koe,tx26d202vm0bwa", |
| 3983 | .data = &koe_tx26d202vm0bwa, |
| 3984 | }, { |
Jagan Teki | 8cfe834 | 2018-02-04 23:19:28 +0530 | [diff] [blame] | 3985 | .compatible = "koe,tx31d200vm0baa", |
| 3986 | .data = &koe_tx31d200vm0baa, |
| 3987 | }, { |
Lucas Stach | 8def22e | 2015-12-02 19:41:11 +0100 | [diff] [blame] | 3988 | .compatible = "kyo,tcg121xglp", |
| 3989 | .data = &kyo_tcg121xglp, |
| 3990 | }, { |
Paul Kocialkowski | 27abdd8 | 2018-11-07 19:18:41 +0100 | [diff] [blame] | 3991 | .compatible = "lemaker,bl035-rgb-002", |
| 3992 | .data = &lemaker_bl035_rgb_002, |
| 3993 | }, { |
Heiko Schocher | dd01500 | 2015-05-22 10:25:57 +0200 | [diff] [blame] | 3994 | .compatible = "lg,lb070wv8", |
| 3995 | .data = &lg_lb070wv8, |
| 3996 | }, { |
Yakir Yang | c5ece40 | 2016-06-28 12:51:15 +0800 | [diff] [blame] | 3997 | .compatible = "lg,lp079qx1-sp0v", |
| 3998 | .data = &lg_lp079qx1_sp0v, |
| 3999 | }, { |
Yakir Yang | 0355dde | 2016-06-12 10:56:02 +0800 | [diff] [blame] | 4000 | .compatible = "lg,lp097qx1-spa1", |
| 4001 | .data = &lg_lp097qx1_spa1, |
| 4002 | }, { |
Jitao Shi | 690d8fa | 2016-02-22 19:01:44 +0800 | [diff] [blame] | 4003 | .compatible = "lg,lp120up1", |
| 4004 | .data = &lg_lp120up1, |
| 4005 | }, { |
Thierry Reding | ec7c565 | 2013-11-15 15:59:32 +0100 | [diff] [blame] | 4006 | .compatible = "lg,lp129qe", |
| 4007 | .data = &lg_lp129qe, |
| 4008 | }, { |
Adam Ford | 0d35408 | 2019-10-16 08:51:45 -0500 | [diff] [blame] | 4009 | .compatible = "logicpd,type28", |
| 4010 | .data = &logicpd_type_28, |
| 4011 | }, { |
Marcel Ziswiler | 5728fe7 | 2020-01-20 09:01:00 +0100 | [diff] [blame] | 4012 | .compatible = "logictechno,lt161010-2nhc", |
| 4013 | .data = &logictechno_lt161010_2nh, |
| 4014 | }, { |
| 4015 | .compatible = "logictechno,lt161010-2nhr", |
| 4016 | .data = &logictechno_lt161010_2nh, |
| 4017 | }, { |
| 4018 | .compatible = "logictechno,lt170410-2whc", |
| 4019 | .data = &logictechno_lt170410_2whc, |
| 4020 | }, { |
Lukasz Majewski | 65c766c | 2017-10-21 00:18:37 +0200 | [diff] [blame] | 4021 | .compatible = "mitsubishi,aa070mc01-ca1", |
| 4022 | .data = &mitsubishi_aa070mc01, |
| 4023 | }, { |
Lucas Stach | 01bacc13 | 2017-06-08 20:07:55 +0200 | [diff] [blame] | 4024 | .compatible = "nec,nl12880bc20-05", |
| 4025 | .data = &nec_nl12880bc20_05, |
| 4026 | }, { |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 4027 | .compatible = "nec,nl4827hc19-05b", |
| 4028 | .data = &nec_nl4827hc19_05b, |
| 4029 | }, { |
Maxime Ripard | e6c2f06 | 2016-09-06 16:46:17 +0200 | [diff] [blame] | 4030 | .compatible = "netron-dy,e231732", |
| 4031 | .data = &netron_dy_e231732, |
| 4032 | }, { |
Vasily Khoruzhick | 258145e | 2020-02-26 00:10:10 -0800 | [diff] [blame] | 4033 | .compatible = "neweast,wjfh116008a", |
| 4034 | .data = &neweast_wjfh116008a, |
| 4035 | }, { |
Tomi Valkeinen | 3b39ad7 | 2018-06-18 16:22:40 +0300 | [diff] [blame] | 4036 | .compatible = "newhaven,nhd-4.3-480272ef-atxl", |
| 4037 | .data = &newhaven_nhd_43_480272ef_atxl, |
| 4038 | }, { |
Lucas Stach | 4177fa6 | 2017-06-08 20:07:57 +0200 | [diff] [blame] | 4039 | .compatible = "nlt,nl192108ac18-02d", |
| 4040 | .data = &nlt_nl192108ac18_02d, |
| 4041 | }, { |
Fabien Lahoudere | 05ec0e4 | 2016-10-17 11:38:01 +0200 | [diff] [blame] | 4042 | .compatible = "nvd,9128", |
| 4043 | .data = &nvd_9128, |
| 4044 | }, { |
Gary Bisson | a99fb62 | 2015-06-10 18:44:23 +0200 | [diff] [blame] | 4045 | .compatible = "okaya,rs800480t-7x0gp", |
| 4046 | .data = &okaya_rs800480t_7x0gp, |
| 4047 | }, { |
Maxime Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 4048 | .compatible = "olimex,lcd-olinuxino-43-ts", |
| 4049 | .data = &olimex_lcd_olinuxino_43ts, |
| 4050 | }, { |
Eric Anholt | e8b6f56 | 2016-03-24 17:23:48 -0700 | [diff] [blame] | 4051 | .compatible = "ontat,yx700wv03", |
| 4052 | .data = &ontat_yx700wv03, |
| 4053 | }, { |
H. Nikolaus Schaller | 9c31dcb | 2019-06-07 13:11:08 +0200 | [diff] [blame] | 4054 | .compatible = "ortustech,com37h3m05dtc", |
| 4055 | .data = &ortustech_com37h3m, |
| 4056 | }, { |
| 4057 | .compatible = "ortustech,com37h3m99dtc", |
| 4058 | .data = &ortustech_com37h3m, |
| 4059 | }, { |
Philipp Zabel | 725c9d4 | 2015-02-11 18:50:11 +0100 | [diff] [blame] | 4060 | .compatible = "ortustech,com43h4m85ulc", |
| 4061 | .data = &ortustech_com43h4m85ulc, |
| 4062 | }, { |
Laurent Pinchart | 163f7a3 | 2018-12-07 22:13:44 +0200 | [diff] [blame] | 4063 | .compatible = "osddisplays,osd070t1718-19ts", |
| 4064 | .data = &osddisplays_osd070t1718_19ts, |
| 4065 | }, { |
Eugen Hristev | 4ba3e56 | 2019-01-14 09:43:31 +0000 | [diff] [blame] | 4066 | .compatible = "pda,91-00156-a0", |
| 4067 | .data = &pda_91_00156_a0, |
| 4068 | }, { |
Marek Vasut | d69de69 | 2020-07-28 14:12:46 +0200 | [diff] [blame^] | 4069 | .compatible = "powertip,ph800480t013-idf02", |
| 4070 | .data = &powertip_ph800480t013_idf02, |
| 4071 | }, { |
Josh Wu | d2a6f0f | 2015-10-08 17:42:41 +0200 | [diff] [blame] | 4072 | .compatible = "qiaodian,qd43003c0-40", |
| 4073 | .data = &qd43003c0_40, |
| 4074 | }, { |
Jagan Teki | 23167fa | 2018-06-07 19:16:48 +0530 | [diff] [blame] | 4075 | .compatible = "rocktech,rk070er9427", |
| 4076 | .data = &rocktech_rk070er9427, |
| 4077 | }, { |
Jyri Sarha | f305047 | 2020-02-11 14:17:18 +0200 | [diff] [blame] | 4078 | .compatible = "rocktech,rk101ii01d-ct", |
| 4079 | .data = &rocktech_rk101ii01d_ct, |
| 4080 | }, { |
Yakir Yang | 0330eaf | 2016-06-12 10:56:13 +0800 | [diff] [blame] | 4081 | .compatible = "samsung,lsn122dl01-c01", |
| 4082 | .data = &samsung_lsn122dl01_c01, |
| 4083 | }, { |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 4084 | .compatible = "samsung,ltn101nt05", |
| 4085 | .data = &samsung_ltn101nt05, |
| 4086 | }, { |
Stéphane Marchesin | 0c93430 | 2015-03-18 10:52:18 +0100 | [diff] [blame] | 4087 | .compatible = "samsung,ltn140at29-301", |
| 4088 | .data = &samsung_ltn140at29_301, |
| 4089 | }, { |
Miquel Raynal | 44c58c5 | 2020-01-09 19:40:37 +0100 | [diff] [blame] | 4090 | .compatible = "satoz,sat050at40h12r2", |
| 4091 | .data = &satoz_sat050at40h12r2, |
| 4092 | }, { |
Jeffrey Hugo | cd5e1cb | 2019-07-08 09:58:11 -0700 | [diff] [blame] | 4093 | .compatible = "sharp,ld-d5116z01b", |
| 4094 | .data = &sharp_ld_d5116z01b, |
| 4095 | }, { |
Vladimir Zapolskiy | 03e3ec9 | 2018-07-06 21:51:01 +0300 | [diff] [blame] | 4096 | .compatible = "sharp,lq035q7db03", |
| 4097 | .data = &sharp_lq035q7db03, |
| 4098 | }, { |
H. Nikolaus Schaller | dda0e4b | 2019-06-07 13:11:07 +0200 | [diff] [blame] | 4099 | .compatible = "sharp,lq070y3dg3b", |
| 4100 | .data = &sharp_lq070y3dg3b, |
| 4101 | }, { |
Joshua Clayton | 592aa02 | 2016-07-06 15:59:16 -0700 | [diff] [blame] | 4102 | .compatible = "sharp,lq101k1ly04", |
| 4103 | .data = &sharp_lq101k1ly04, |
| 4104 | }, { |
Yakir Yang | 739c7de | 2016-06-12 10:56:35 +0800 | [diff] [blame] | 4105 | .compatible = "sharp,lq123p1jx31", |
| 4106 | .data = &sharp_lq123p1jx31, |
| 4107 | }, { |
Paul Cercueil | f1bd37f | 2019-06-03 17:31:20 +0200 | [diff] [blame] | 4108 | .compatible = "sharp,ls020b1dd01d", |
| 4109 | .data = &sharp_ls020b1dd01d, |
| 4110 | }, { |
Boris BREZILLON | 9c6615b | 2015-03-19 14:43:00 +0100 | [diff] [blame] | 4111 | .compatible = "shelly,sca07010-bfn-lnn", |
| 4112 | .data = &shelly_sca07010_bfn_lnn, |
| 4113 | }, { |
Pascal Roeleven | 105235e | 2020-03-20 12:21:33 +0100 | [diff] [blame] | 4114 | .compatible = "starry,kr070pe2t", |
| 4115 | .data = &starry_kr070pe2t, |
| 4116 | }, { |
Douglas Anderson | 9bb34c4 | 2016-06-10 10:02:07 -0700 | [diff] [blame] | 4117 | .compatible = "starry,kr122ea0sra", |
| 4118 | .data = &starry_kr122ea0sra, |
| 4119 | }, { |
Jyri Sarha | 4216153 | 2019-03-22 10:33:36 +0200 | [diff] [blame] | 4120 | .compatible = "tfc,s9700rtwv43tr-01b", |
| 4121 | .data = &tfc_s9700rtwv43tr_01b, |
| 4122 | }, { |
Gary Bisson | adb973e | 2016-12-02 09:52:08 +0100 | [diff] [blame] | 4123 | .compatible = "tianma,tm070jdhg30", |
| 4124 | .data = &tianma_tm070jdhg30, |
| 4125 | }, { |
Max Merchel | b3bfcdf | 2020-06-12 09:22:19 +0200 | [diff] [blame] | 4126 | .compatible = "tianma,tm070jvhg33", |
| 4127 | .data = &tianma_tm070jvhg33, |
| 4128 | }, { |
Lukasz Majewski | 870a0b1 | 2017-11-07 16:30:58 +0100 | [diff] [blame] | 4129 | .compatible = "tianma,tm070rvhg71", |
| 4130 | .data = &tianma_tm070rvhg71, |
| 4131 | }, { |
Linus Walleij | d8a0d6a | 2019-08-05 10:58:46 +0200 | [diff] [blame] | 4132 | .compatible = "ti,nspire-cx-lcd-panel", |
| 4133 | .data = &ti_nspire_cx_lcd_panel, |
| 4134 | }, { |
| 4135 | .compatible = "ti,nspire-classic-lcd-panel", |
| 4136 | .data = &ti_nspire_classic_lcd_panel, |
| 4137 | }, { |
Lucas Stach | 06e733e | 2017-10-18 19:22:40 +0200 | [diff] [blame] | 4138 | .compatible = "toshiba,lt089ac29000", |
| 4139 | .data = &toshiba_lt089ac29000, |
| 4140 | }, { |
Bhuvanchandra DV | 227e4f4 | 2016-05-05 11:47:07 +0530 | [diff] [blame] | 4141 | .compatible = "tpk,f07a-0102", |
| 4142 | .data = &tpk_f07a_0102, |
| 4143 | }, { |
| 4144 | .compatible = "tpk,f10a-0102", |
| 4145 | .data = &tpk_f10a_0102, |
| 4146 | }, { |
Maciej S. Szmigiero | 06a9dc6 | 2016-02-13 22:52:03 +0100 | [diff] [blame] | 4147 | .compatible = "urt,umsh-8596md-t", |
| 4148 | .data = &urt_umsh_8596md_parallel, |
| 4149 | }, { |
| 4150 | .compatible = "urt,umsh-8596md-1t", |
| 4151 | .data = &urt_umsh_8596md_parallel, |
| 4152 | }, { |
| 4153 | .compatible = "urt,umsh-8596md-7t", |
| 4154 | .data = &urt_umsh_8596md_parallel, |
| 4155 | }, { |
| 4156 | .compatible = "urt,umsh-8596md-11t", |
| 4157 | .data = &urt_umsh_8596md_lvds, |
| 4158 | }, { |
| 4159 | .compatible = "urt,umsh-8596md-19t", |
| 4160 | .data = &urt_umsh_8596md_lvds, |
| 4161 | }, { |
| 4162 | .compatible = "urt,umsh-8596md-20t", |
| 4163 | .data = &urt_umsh_8596md_parallel, |
| 4164 | }, { |
Fabio Estevam | 0420618 | 2019-02-18 21:27:06 -0300 | [diff] [blame] | 4165 | .compatible = "vxt,vl050-8048nt-c01", |
| 4166 | .data = &vl050_8048nt_c01, |
| 4167 | }, { |
Richard Genoud | e4bac40 | 2017-03-27 12:33:23 +0200 | [diff] [blame] | 4168 | .compatible = "winstar,wf35ltiacd", |
| 4169 | .data = &winstar_wf35ltiacd, |
| 4170 | }, { |
Sam Ravnborg | 4a1d0db | 2020-02-16 19:15:13 +0100 | [diff] [blame] | 4171 | /* Must be the last entry */ |
| 4172 | .compatible = "panel-dpi", |
| 4173 | .data = &panel_dpi, |
| 4174 | }, { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 4175 | /* sentinel */ |
| 4176 | } |
| 4177 | }; |
| 4178 | MODULE_DEVICE_TABLE(of, platform_of_match); |
| 4179 | |
| 4180 | static int panel_simple_platform_probe(struct platform_device *pdev) |
| 4181 | { |
| 4182 | const struct of_device_id *id; |
| 4183 | |
| 4184 | id = of_match_node(platform_of_match, pdev->dev.of_node); |
| 4185 | if (!id) |
| 4186 | return -ENODEV; |
| 4187 | |
| 4188 | return panel_simple_probe(&pdev->dev, id->data); |
| 4189 | } |
| 4190 | |
| 4191 | static int panel_simple_platform_remove(struct platform_device *pdev) |
| 4192 | { |
| 4193 | return panel_simple_remove(&pdev->dev); |
| 4194 | } |
| 4195 | |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 4196 | static void panel_simple_platform_shutdown(struct platform_device *pdev) |
| 4197 | { |
| 4198 | panel_simple_shutdown(&pdev->dev); |
| 4199 | } |
| 4200 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 4201 | static struct platform_driver panel_simple_platform_driver = { |
| 4202 | .driver = { |
| 4203 | .name = "panel-simple", |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 4204 | .of_match_table = platform_of_match, |
| 4205 | }, |
| 4206 | .probe = panel_simple_platform_probe, |
| 4207 | .remove = panel_simple_platform_remove, |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 4208 | .shutdown = panel_simple_platform_shutdown, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 4209 | }; |
| 4210 | |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4211 | struct panel_desc_dsi { |
| 4212 | struct panel_desc desc; |
| 4213 | |
Thierry Reding | 462658b | 2014-03-14 11:24:57 +0100 | [diff] [blame] | 4214 | unsigned long flags; |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4215 | enum mipi_dsi_pixel_format format; |
| 4216 | unsigned int lanes; |
| 4217 | }; |
| 4218 | |
Thierry Reding | d718d79 | 2015-04-08 16:52:33 +0200 | [diff] [blame] | 4219 | static const struct drm_display_mode auo_b080uan01_mode = { |
| 4220 | .clock = 154500, |
| 4221 | .hdisplay = 1200, |
| 4222 | .hsync_start = 1200 + 62, |
| 4223 | .hsync_end = 1200 + 62 + 4, |
| 4224 | .htotal = 1200 + 62 + 4 + 62, |
| 4225 | .vdisplay = 1920, |
| 4226 | .vsync_start = 1920 + 9, |
| 4227 | .vsync_end = 1920 + 9 + 2, |
| 4228 | .vtotal = 1920 + 9 + 2 + 8, |
Thierry Reding | d718d79 | 2015-04-08 16:52:33 +0200 | [diff] [blame] | 4229 | }; |
| 4230 | |
| 4231 | static const struct panel_desc_dsi auo_b080uan01 = { |
| 4232 | .desc = { |
| 4233 | .modes = &auo_b080uan01_mode, |
| 4234 | .num_modes = 1, |
| 4235 | .bpc = 8, |
| 4236 | .size = { |
| 4237 | .width = 108, |
| 4238 | .height = 272, |
| 4239 | }, |
Laurent Pinchart | cb62cde | 2020-06-02 20:12:40 +0300 | [diff] [blame] | 4240 | .connector_type = DRM_MODE_CONNECTOR_DSI, |
Thierry Reding | d718d79 | 2015-04-08 16:52:33 +0200 | [diff] [blame] | 4241 | }, |
| 4242 | .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS, |
| 4243 | .format = MIPI_DSI_FMT_RGB888, |
| 4244 | .lanes = 4, |
| 4245 | }; |
| 4246 | |
Chris Zhong | c852196 | 2015-11-20 16:15:37 +0800 | [diff] [blame] | 4247 | static const struct drm_display_mode boe_tv080wum_nl0_mode = { |
| 4248 | .clock = 160000, |
| 4249 | .hdisplay = 1200, |
| 4250 | .hsync_start = 1200 + 120, |
| 4251 | .hsync_end = 1200 + 120 + 20, |
| 4252 | .htotal = 1200 + 120 + 20 + 21, |
| 4253 | .vdisplay = 1920, |
| 4254 | .vsync_start = 1920 + 21, |
| 4255 | .vsync_end = 1920 + 21 + 3, |
| 4256 | .vtotal = 1920 + 21 + 3 + 18, |
Chris Zhong | c852196 | 2015-11-20 16:15:37 +0800 | [diff] [blame] | 4257 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 4258 | }; |
| 4259 | |
| 4260 | static const struct panel_desc_dsi boe_tv080wum_nl0 = { |
| 4261 | .desc = { |
| 4262 | .modes = &boe_tv080wum_nl0_mode, |
| 4263 | .num_modes = 1, |
| 4264 | .size = { |
| 4265 | .width = 107, |
| 4266 | .height = 172, |
| 4267 | }, |
Laurent Pinchart | cb62cde | 2020-06-02 20:12:40 +0300 | [diff] [blame] | 4268 | .connector_type = DRM_MODE_CONNECTOR_DSI, |
Chris Zhong | c852196 | 2015-11-20 16:15:37 +0800 | [diff] [blame] | 4269 | }, |
| 4270 | .flags = MIPI_DSI_MODE_VIDEO | |
| 4271 | MIPI_DSI_MODE_VIDEO_BURST | |
| 4272 | MIPI_DSI_MODE_VIDEO_SYNC_PULSE, |
| 4273 | .format = MIPI_DSI_FMT_RGB888, |
| 4274 | .lanes = 4, |
| 4275 | }; |
| 4276 | |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 4277 | static const struct drm_display_mode lg_ld070wx3_sl01_mode = { |
| 4278 | .clock = 71000, |
| 4279 | .hdisplay = 800, |
| 4280 | .hsync_start = 800 + 32, |
| 4281 | .hsync_end = 800 + 32 + 1, |
| 4282 | .htotal = 800 + 32 + 1 + 57, |
| 4283 | .vdisplay = 1280, |
| 4284 | .vsync_start = 1280 + 28, |
| 4285 | .vsync_end = 1280 + 28 + 1, |
| 4286 | .vtotal = 1280 + 28 + 1 + 14, |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 4287 | }; |
| 4288 | |
| 4289 | static const struct panel_desc_dsi lg_ld070wx3_sl01 = { |
| 4290 | .desc = { |
| 4291 | .modes = &lg_ld070wx3_sl01_mode, |
| 4292 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 4293 | .bpc = 8, |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 4294 | .size = { |
| 4295 | .width = 94, |
| 4296 | .height = 151, |
| 4297 | }, |
Laurent Pinchart | cb62cde | 2020-06-02 20:12:40 +0300 | [diff] [blame] | 4298 | .connector_type = DRM_MODE_CONNECTOR_DSI, |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 4299 | }, |
Alexandre Courbot | 5e4cc27 | 2014-07-08 21:32:12 +0900 | [diff] [blame] | 4300 | .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS, |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 4301 | .format = MIPI_DSI_FMT_RGB888, |
| 4302 | .lanes = 4, |
| 4303 | }; |
| 4304 | |
Alexandre Courbot | 499ce85 | 2014-01-21 18:57:09 +0900 | [diff] [blame] | 4305 | static const struct drm_display_mode lg_lh500wx1_sd03_mode = { |
| 4306 | .clock = 67000, |
| 4307 | .hdisplay = 720, |
| 4308 | .hsync_start = 720 + 12, |
| 4309 | .hsync_end = 720 + 12 + 4, |
| 4310 | .htotal = 720 + 12 + 4 + 112, |
| 4311 | .vdisplay = 1280, |
| 4312 | .vsync_start = 1280 + 8, |
| 4313 | .vsync_end = 1280 + 8 + 4, |
| 4314 | .vtotal = 1280 + 8 + 4 + 12, |
Alexandre Courbot | 499ce85 | 2014-01-21 18:57:09 +0900 | [diff] [blame] | 4315 | }; |
| 4316 | |
| 4317 | static const struct panel_desc_dsi lg_lh500wx1_sd03 = { |
| 4318 | .desc = { |
| 4319 | .modes = &lg_lh500wx1_sd03_mode, |
| 4320 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 4321 | .bpc = 8, |
Alexandre Courbot | 499ce85 | 2014-01-21 18:57:09 +0900 | [diff] [blame] | 4322 | .size = { |
| 4323 | .width = 62, |
| 4324 | .height = 110, |
| 4325 | }, |
Laurent Pinchart | cb62cde | 2020-06-02 20:12:40 +0300 | [diff] [blame] | 4326 | .connector_type = DRM_MODE_CONNECTOR_DSI, |
Alexandre Courbot | 499ce85 | 2014-01-21 18:57:09 +0900 | [diff] [blame] | 4327 | }, |
| 4328 | .flags = MIPI_DSI_MODE_VIDEO, |
| 4329 | .format = MIPI_DSI_FMT_RGB888, |
| 4330 | .lanes = 4, |
| 4331 | }; |
| 4332 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 4333 | static const struct drm_display_mode panasonic_vvx10f004b00_mode = { |
| 4334 | .clock = 157200, |
| 4335 | .hdisplay = 1920, |
| 4336 | .hsync_start = 1920 + 154, |
| 4337 | .hsync_end = 1920 + 154 + 16, |
| 4338 | .htotal = 1920 + 154 + 16 + 32, |
| 4339 | .vdisplay = 1200, |
| 4340 | .vsync_start = 1200 + 17, |
| 4341 | .vsync_end = 1200 + 17 + 2, |
| 4342 | .vtotal = 1200 + 17 + 2 + 16, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 4343 | }; |
| 4344 | |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4345 | static const struct panel_desc_dsi panasonic_vvx10f004b00 = { |
| 4346 | .desc = { |
| 4347 | .modes = &panasonic_vvx10f004b00_mode, |
| 4348 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 4349 | .bpc = 8, |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4350 | .size = { |
| 4351 | .width = 217, |
| 4352 | .height = 136, |
| 4353 | }, |
Laurent Pinchart | cb62cde | 2020-06-02 20:12:40 +0300 | [diff] [blame] | 4354 | .connector_type = DRM_MODE_CONNECTOR_DSI, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 4355 | }, |
Alexandre Courbot | 5e4cc27 | 2014-07-08 21:32:12 +0900 | [diff] [blame] | 4356 | .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | |
| 4357 | MIPI_DSI_CLOCK_NON_CONTINUOUS, |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4358 | .format = MIPI_DSI_FMT_RGB888, |
| 4359 | .lanes = 4, |
| 4360 | }; |
| 4361 | |
Jonathan Marek | debcd8f | 2018-11-24 15:06:28 -0500 | [diff] [blame] | 4362 | static const struct drm_display_mode lg_acx467akm_7_mode = { |
| 4363 | .clock = 150000, |
| 4364 | .hdisplay = 1080, |
| 4365 | .hsync_start = 1080 + 2, |
| 4366 | .hsync_end = 1080 + 2 + 2, |
| 4367 | .htotal = 1080 + 2 + 2 + 2, |
| 4368 | .vdisplay = 1920, |
| 4369 | .vsync_start = 1920 + 2, |
| 4370 | .vsync_end = 1920 + 2 + 2, |
| 4371 | .vtotal = 1920 + 2 + 2 + 2, |
Jonathan Marek | debcd8f | 2018-11-24 15:06:28 -0500 | [diff] [blame] | 4372 | }; |
| 4373 | |
| 4374 | static const struct panel_desc_dsi lg_acx467akm_7 = { |
| 4375 | .desc = { |
| 4376 | .modes = &lg_acx467akm_7_mode, |
| 4377 | .num_modes = 1, |
| 4378 | .bpc = 8, |
| 4379 | .size = { |
| 4380 | .width = 62, |
| 4381 | .height = 110, |
| 4382 | }, |
Laurent Pinchart | cb62cde | 2020-06-02 20:12:40 +0300 | [diff] [blame] | 4383 | .connector_type = DRM_MODE_CONNECTOR_DSI, |
Jonathan Marek | debcd8f | 2018-11-24 15:06:28 -0500 | [diff] [blame] | 4384 | }, |
| 4385 | .flags = 0, |
| 4386 | .format = MIPI_DSI_FMT_RGB888, |
| 4387 | .lanes = 4, |
| 4388 | }; |
| 4389 | |
Peter Ujfalusi | 6296723 | 2019-02-26 09:55:21 +0200 | [diff] [blame] | 4390 | static const struct drm_display_mode osd101t2045_53ts_mode = { |
| 4391 | .clock = 154500, |
| 4392 | .hdisplay = 1920, |
| 4393 | .hsync_start = 1920 + 112, |
| 4394 | .hsync_end = 1920 + 112 + 16, |
| 4395 | .htotal = 1920 + 112 + 16 + 32, |
| 4396 | .vdisplay = 1200, |
| 4397 | .vsync_start = 1200 + 16, |
| 4398 | .vsync_end = 1200 + 16 + 2, |
| 4399 | .vtotal = 1200 + 16 + 2 + 16, |
Peter Ujfalusi | 6296723 | 2019-02-26 09:55:21 +0200 | [diff] [blame] | 4400 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 4401 | }; |
| 4402 | |
| 4403 | static const struct panel_desc_dsi osd101t2045_53ts = { |
| 4404 | .desc = { |
| 4405 | .modes = &osd101t2045_53ts_mode, |
| 4406 | .num_modes = 1, |
| 4407 | .bpc = 8, |
| 4408 | .size = { |
| 4409 | .width = 217, |
| 4410 | .height = 136, |
| 4411 | }, |
Laurent Pinchart | cb62cde | 2020-06-02 20:12:40 +0300 | [diff] [blame] | 4412 | .connector_type = DRM_MODE_CONNECTOR_DSI, |
Peter Ujfalusi | 6296723 | 2019-02-26 09:55:21 +0200 | [diff] [blame] | 4413 | }, |
| 4414 | .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | |
| 4415 | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | |
| 4416 | MIPI_DSI_MODE_EOT_PACKET, |
| 4417 | .format = MIPI_DSI_FMT_RGB888, |
| 4418 | .lanes = 4, |
| 4419 | }; |
| 4420 | |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4421 | static const struct of_device_id dsi_of_match[] = { |
| 4422 | { |
Thierry Reding | d718d79 | 2015-04-08 16:52:33 +0200 | [diff] [blame] | 4423 | .compatible = "auo,b080uan01", |
| 4424 | .data = &auo_b080uan01 |
| 4425 | }, { |
Chris Zhong | c852196 | 2015-11-20 16:15:37 +0800 | [diff] [blame] | 4426 | .compatible = "boe,tv080wum-nl0", |
| 4427 | .data = &boe_tv080wum_nl0 |
| 4428 | }, { |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 4429 | .compatible = "lg,ld070wx3-sl01", |
| 4430 | .data = &lg_ld070wx3_sl01 |
| 4431 | }, { |
Alexandre Courbot | 499ce85 | 2014-01-21 18:57:09 +0900 | [diff] [blame] | 4432 | .compatible = "lg,lh500wx1-sd03", |
| 4433 | .data = &lg_lh500wx1_sd03 |
| 4434 | }, { |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4435 | .compatible = "panasonic,vvx10f004b00", |
| 4436 | .data = &panasonic_vvx10f004b00 |
| 4437 | }, { |
Jonathan Marek | debcd8f | 2018-11-24 15:06:28 -0500 | [diff] [blame] | 4438 | .compatible = "lg,acx467akm-7", |
| 4439 | .data = &lg_acx467akm_7 |
| 4440 | }, { |
Peter Ujfalusi | 6296723 | 2019-02-26 09:55:21 +0200 | [diff] [blame] | 4441 | .compatible = "osddisplays,osd101t2045-53ts", |
| 4442 | .data = &osd101t2045_53ts |
| 4443 | }, { |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4444 | /* sentinel */ |
| 4445 | } |
| 4446 | }; |
| 4447 | MODULE_DEVICE_TABLE(of, dsi_of_match); |
| 4448 | |
| 4449 | static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi) |
| 4450 | { |
| 4451 | const struct panel_desc_dsi *desc; |
| 4452 | const struct of_device_id *id; |
| 4453 | int err; |
| 4454 | |
| 4455 | id = of_match_node(dsi_of_match, dsi->dev.of_node); |
| 4456 | if (!id) |
| 4457 | return -ENODEV; |
| 4458 | |
| 4459 | desc = id->data; |
| 4460 | |
| 4461 | err = panel_simple_probe(&dsi->dev, &desc->desc); |
| 4462 | if (err < 0) |
| 4463 | return err; |
| 4464 | |
Thierry Reding | 462658b | 2014-03-14 11:24:57 +0100 | [diff] [blame] | 4465 | dsi->mode_flags = desc->flags; |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4466 | dsi->format = desc->format; |
| 4467 | dsi->lanes = desc->lanes; |
| 4468 | |
Peter Ujfalusi | 7ad9db6 | 2019-02-26 10:11:53 +0200 | [diff] [blame] | 4469 | err = mipi_dsi_attach(dsi); |
| 4470 | if (err) { |
| 4471 | struct panel_simple *panel = dev_get_drvdata(&dsi->dev); |
| 4472 | |
| 4473 | drm_panel_remove(&panel->base); |
| 4474 | } |
| 4475 | |
| 4476 | return err; |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4477 | } |
| 4478 | |
| 4479 | static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi) |
| 4480 | { |
| 4481 | int err; |
| 4482 | |
| 4483 | err = mipi_dsi_detach(dsi); |
| 4484 | if (err < 0) |
| 4485 | dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err); |
| 4486 | |
| 4487 | return panel_simple_remove(&dsi->dev); |
| 4488 | } |
| 4489 | |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 4490 | static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi) |
| 4491 | { |
| 4492 | panel_simple_shutdown(&dsi->dev); |
| 4493 | } |
| 4494 | |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4495 | static struct mipi_dsi_driver panel_simple_dsi_driver = { |
| 4496 | .driver = { |
| 4497 | .name = "panel-simple-dsi", |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4498 | .of_match_table = dsi_of_match, |
| 4499 | }, |
| 4500 | .probe = panel_simple_dsi_probe, |
| 4501 | .remove = panel_simple_dsi_remove, |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 4502 | .shutdown = panel_simple_dsi_shutdown, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 4503 | }; |
| 4504 | |
| 4505 | static int __init panel_simple_init(void) |
| 4506 | { |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4507 | int err; |
| 4508 | |
| 4509 | err = platform_driver_register(&panel_simple_platform_driver); |
| 4510 | if (err < 0) |
| 4511 | return err; |
| 4512 | |
| 4513 | if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) { |
| 4514 | err = mipi_dsi_driver_register(&panel_simple_dsi_driver); |
| 4515 | if (err < 0) |
| 4516 | return err; |
| 4517 | } |
| 4518 | |
| 4519 | return 0; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 4520 | } |
| 4521 | module_init(panel_simple_init); |
| 4522 | |
| 4523 | static void __exit panel_simple_exit(void) |
| 4524 | { |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 4525 | if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) |
| 4526 | mipi_dsi_driver_unregister(&panel_simple_dsi_driver); |
| 4527 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 4528 | platform_driver_unregister(&panel_simple_platform_driver); |
| 4529 | } |
| 4530 | module_exit(panel_simple_exit); |
| 4531 | |
| 4532 | MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>"); |
| 4533 | MODULE_DESCRIPTION("DRM Driver for Simple Panels"); |
| 4534 | MODULE_LICENSE("GPL and additional rights"); |