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