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