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