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 | |
| 24 | #include <linux/backlight.h> |
Alexandre Courbot | cfdf054 | 2014-03-01 14:00:58 +0900 | [diff] [blame] | 25 | #include <linux/gpio/consumer.h> |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 26 | #include <linux/module.h> |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 27 | #include <linux/of_platform.h> |
| 28 | #include <linux/platform_device.h> |
| 29 | #include <linux/regulator/consumer.h> |
| 30 | |
| 31 | #include <drm/drmP.h> |
| 32 | #include <drm/drm_crtc.h> |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 33 | #include <drm/drm_mipi_dsi.h> |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 34 | #include <drm/drm_panel.h> |
| 35 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 36 | #include <video/display_timing.h> |
| 37 | #include <video/videomode.h> |
| 38 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 39 | struct panel_desc { |
| 40 | const struct drm_display_mode *modes; |
| 41 | unsigned int num_modes; |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 42 | const struct display_timing *timings; |
| 43 | unsigned int num_timings; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 44 | |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 45 | unsigned int bpc; |
| 46 | |
Ulrich Ölmann | 85533e3 | 2015-12-04 12:31:28 +0100 | [diff] [blame] | 47 | /** |
| 48 | * @width: width (in millimeters) of the panel's active display area |
| 49 | * @height: height (in millimeters) of the panel's active display area |
| 50 | */ |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 51 | struct { |
| 52 | unsigned int width; |
| 53 | unsigned int height; |
| 54 | } size; |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 55 | |
| 56 | /** |
| 57 | * @prepare: the time (in milliseconds) that it takes for the panel to |
| 58 | * become ready and start receiving video data |
| 59 | * @enable: the time (in milliseconds) that it takes for the panel to |
| 60 | * display the first valid frame after starting to receive |
| 61 | * video data |
| 62 | * @disable: the time (in milliseconds) that it takes for the panel to |
| 63 | * turn the display off (no content is visible) |
| 64 | * @unprepare: the time (in milliseconds) that it takes for the panel |
| 65 | * to power itself down completely |
| 66 | */ |
| 67 | struct { |
| 68 | unsigned int prepare; |
| 69 | unsigned int enable; |
| 70 | unsigned int disable; |
| 71 | unsigned int unprepare; |
| 72 | } delay; |
Boris Brezillon | 795f7ab | 2014-07-22 13:33:59 +0200 | [diff] [blame] | 73 | |
| 74 | u32 bus_format; |
Stefan Agner | f0aa083 | 2016-02-08 11:38:14 -0800 | [diff] [blame] | 75 | u32 bus_flags; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 76 | }; |
| 77 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 78 | struct panel_simple { |
| 79 | struct drm_panel base; |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 80 | bool prepared; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 81 | bool enabled; |
| 82 | |
| 83 | const struct panel_desc *desc; |
| 84 | |
| 85 | struct backlight_device *backlight; |
| 86 | struct regulator *supply; |
| 87 | struct i2c_adapter *ddc; |
| 88 | |
Alexandre Courbot | cfdf054 | 2014-03-01 14:00:58 +0900 | [diff] [blame] | 89 | struct gpio_desc *enable_gpio; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 90 | }; |
| 91 | |
| 92 | static inline struct panel_simple *to_panel_simple(struct drm_panel *panel) |
| 93 | { |
| 94 | return container_of(panel, struct panel_simple, base); |
| 95 | } |
| 96 | |
| 97 | static int panel_simple_get_fixed_modes(struct panel_simple *panel) |
| 98 | { |
| 99 | struct drm_connector *connector = panel->base.connector; |
| 100 | struct drm_device *drm = panel->base.drm; |
| 101 | struct drm_display_mode *mode; |
| 102 | unsigned int i, num = 0; |
| 103 | |
| 104 | if (!panel->desc) |
| 105 | return 0; |
| 106 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 107 | for (i = 0; i < panel->desc->num_timings; i++) { |
| 108 | const struct display_timing *dt = &panel->desc->timings[i]; |
| 109 | struct videomode vm; |
| 110 | |
| 111 | videomode_from_timing(dt, &vm); |
| 112 | mode = drm_mode_create(drm); |
| 113 | if (!mode) { |
| 114 | dev_err(drm->dev, "failed to add mode %ux%u\n", |
| 115 | dt->hactive.typ, dt->vactive.typ); |
| 116 | continue; |
| 117 | } |
| 118 | |
| 119 | drm_display_mode_from_videomode(&vm, mode); |
Boris Brezillon | cda5537 | 2016-04-15 18:23:33 +0200 | [diff] [blame] | 120 | |
| 121 | mode->type |= DRM_MODE_TYPE_DRIVER; |
| 122 | |
Chen-Yu Tsai | 230c5b4 | 2016-10-24 21:21:15 +0800 | [diff] [blame] | 123 | if (panel->desc->num_timings == 1) |
Boris Brezillon | cda5537 | 2016-04-15 18:23:33 +0200 | [diff] [blame] | 124 | mode->type |= DRM_MODE_TYPE_PREFERRED; |
| 125 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 126 | drm_mode_probed_add(connector, mode); |
| 127 | num++; |
| 128 | } |
| 129 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 130 | for (i = 0; i < panel->desc->num_modes; i++) { |
| 131 | const struct drm_display_mode *m = &panel->desc->modes[i]; |
| 132 | |
| 133 | mode = drm_mode_duplicate(drm, m); |
| 134 | if (!mode) { |
| 135 | dev_err(drm->dev, "failed to add mode %ux%u@%u\n", |
| 136 | m->hdisplay, m->vdisplay, m->vrefresh); |
| 137 | continue; |
| 138 | } |
| 139 | |
Boris Brezillon | cda5537 | 2016-04-15 18:23:33 +0200 | [diff] [blame] | 140 | mode->type |= DRM_MODE_TYPE_DRIVER; |
| 141 | |
| 142 | if (panel->desc->num_modes == 1) |
| 143 | mode->type |= DRM_MODE_TYPE_PREFERRED; |
| 144 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 145 | drm_mode_set_name(mode); |
| 146 | |
| 147 | drm_mode_probed_add(connector, mode); |
| 148 | num++; |
| 149 | } |
| 150 | |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 151 | connector->display_info.bpc = panel->desc->bpc; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 152 | connector->display_info.width_mm = panel->desc->size.width; |
| 153 | connector->display_info.height_mm = panel->desc->size.height; |
Boris Brezillon | 795f7ab | 2014-07-22 13:33:59 +0200 | [diff] [blame] | 154 | if (panel->desc->bus_format) |
| 155 | drm_display_info_set_bus_formats(&connector->display_info, |
| 156 | &panel->desc->bus_format, 1); |
Stefan Agner | f0aa083 | 2016-02-08 11:38:14 -0800 | [diff] [blame] | 157 | connector->display_info.bus_flags = panel->desc->bus_flags; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 158 | |
| 159 | return num; |
| 160 | } |
| 161 | |
| 162 | static int panel_simple_disable(struct drm_panel *panel) |
| 163 | { |
| 164 | struct panel_simple *p = to_panel_simple(panel); |
| 165 | |
| 166 | if (!p->enabled) |
| 167 | return 0; |
| 168 | |
| 169 | if (p->backlight) { |
| 170 | p->backlight->props.power = FB_BLANK_POWERDOWN; |
Thierry Reding | e4aa342 | 2016-06-17 19:11:53 +0200 | [diff] [blame] | 171 | p->backlight->props.state |= BL_CORE_FBBLANK; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 172 | backlight_update_status(p->backlight); |
| 173 | } |
| 174 | |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 175 | if (p->desc->delay.disable) |
| 176 | msleep(p->desc->delay.disable); |
| 177 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 178 | p->enabled = false; |
| 179 | |
| 180 | return 0; |
| 181 | } |
| 182 | |
Ajay Kumar | c0e1d17 | 2014-07-31 23:12:04 +0530 | [diff] [blame] | 183 | static int panel_simple_unprepare(struct drm_panel *panel) |
| 184 | { |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 185 | struct panel_simple *p = to_panel_simple(panel); |
| 186 | |
| 187 | if (!p->prepared) |
| 188 | return 0; |
| 189 | |
Fabio Estevam | 756b918 | 2017-07-16 21:05:39 -0300 | [diff] [blame] | 190 | gpiod_set_value_cansleep(p->enable_gpio, 0); |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 191 | |
| 192 | regulator_disable(p->supply); |
| 193 | |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 194 | if (p->desc->delay.unprepare) |
| 195 | msleep(p->desc->delay.unprepare); |
| 196 | |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 197 | p->prepared = false; |
| 198 | |
Ajay Kumar | c0e1d17 | 2014-07-31 23:12:04 +0530 | [diff] [blame] | 199 | return 0; |
| 200 | } |
| 201 | |
| 202 | static int panel_simple_prepare(struct drm_panel *panel) |
| 203 | { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 204 | struct panel_simple *p = to_panel_simple(panel); |
| 205 | int err; |
| 206 | |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 207 | if (p->prepared) |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 208 | return 0; |
| 209 | |
| 210 | err = regulator_enable(p->supply); |
| 211 | if (err < 0) { |
| 212 | dev_err(panel->dev, "failed to enable supply: %d\n", err); |
| 213 | return err; |
| 214 | } |
| 215 | |
Fabio Estevam | 756b918 | 2017-07-16 21:05:39 -0300 | [diff] [blame] | 216 | gpiod_set_value_cansleep(p->enable_gpio, 1); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 217 | |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 218 | if (p->desc->delay.prepare) |
| 219 | msleep(p->desc->delay.prepare); |
| 220 | |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 221 | p->prepared = true; |
| 222 | |
| 223 | return 0; |
| 224 | } |
| 225 | |
| 226 | static int panel_simple_enable(struct drm_panel *panel) |
| 227 | { |
| 228 | struct panel_simple *p = to_panel_simple(panel); |
| 229 | |
| 230 | if (p->enabled) |
| 231 | return 0; |
| 232 | |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 233 | if (p->desc->delay.enable) |
| 234 | msleep(p->desc->delay.enable); |
| 235 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 236 | if (p->backlight) { |
Thierry Reding | e4aa342 | 2016-06-17 19:11:53 +0200 | [diff] [blame] | 237 | p->backlight->props.state &= ~BL_CORE_FBBLANK; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 238 | p->backlight->props.power = FB_BLANK_UNBLANK; |
| 239 | backlight_update_status(p->backlight); |
| 240 | } |
| 241 | |
| 242 | p->enabled = true; |
| 243 | |
| 244 | return 0; |
| 245 | } |
| 246 | |
| 247 | static int panel_simple_get_modes(struct drm_panel *panel) |
| 248 | { |
| 249 | struct panel_simple *p = to_panel_simple(panel); |
| 250 | int num = 0; |
| 251 | |
| 252 | /* probe EDID if a DDC bus is available */ |
| 253 | if (p->ddc) { |
| 254 | struct edid *edid = drm_get_edid(panel->connector, p->ddc); |
Daniel Vetter | c555f02 | 2018-07-09 10:40:06 +0200 | [diff] [blame] | 255 | drm_connector_update_edid_property(panel->connector, edid); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 256 | if (edid) { |
| 257 | num += drm_add_edid_modes(panel->connector, edid); |
| 258 | kfree(edid); |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | /* add hard-coded panel modes */ |
| 263 | num += panel_simple_get_fixed_modes(p); |
| 264 | |
| 265 | return num; |
| 266 | } |
| 267 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 268 | static int panel_simple_get_timings(struct drm_panel *panel, |
| 269 | unsigned int num_timings, |
| 270 | struct display_timing *timings) |
| 271 | { |
| 272 | struct panel_simple *p = to_panel_simple(panel); |
| 273 | unsigned int i; |
| 274 | |
| 275 | if (p->desc->num_timings < num_timings) |
| 276 | num_timings = p->desc->num_timings; |
| 277 | |
| 278 | if (timings) |
| 279 | for (i = 0; i < num_timings; i++) |
| 280 | timings[i] = p->desc->timings[i]; |
| 281 | |
| 282 | return p->desc->num_timings; |
| 283 | } |
| 284 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 285 | static const struct drm_panel_funcs panel_simple_funcs = { |
| 286 | .disable = panel_simple_disable, |
Ajay Kumar | c0e1d17 | 2014-07-31 23:12:04 +0530 | [diff] [blame] | 287 | .unprepare = panel_simple_unprepare, |
| 288 | .prepare = panel_simple_prepare, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 289 | .enable = panel_simple_enable, |
| 290 | .get_modes = panel_simple_get_modes, |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 291 | .get_timings = panel_simple_get_timings, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 292 | }; |
| 293 | |
| 294 | static int panel_simple_probe(struct device *dev, const struct panel_desc *desc) |
| 295 | { |
| 296 | struct device_node *backlight, *ddc; |
| 297 | struct panel_simple *panel; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 298 | int err; |
| 299 | |
| 300 | panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL); |
| 301 | if (!panel) |
| 302 | return -ENOMEM; |
| 303 | |
| 304 | panel->enabled = false; |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 305 | panel->prepared = false; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 306 | panel->desc = desc; |
| 307 | |
| 308 | panel->supply = devm_regulator_get(dev, "power"); |
| 309 | if (IS_ERR(panel->supply)) |
| 310 | return PTR_ERR(panel->supply); |
| 311 | |
Alexandre Courbot | a61400d | 2014-10-23 17:16:58 +0900 | [diff] [blame] | 312 | panel->enable_gpio = devm_gpiod_get_optional(dev, "enable", |
| 313 | GPIOD_OUT_LOW); |
Alexandre Courbot | cfdf054 | 2014-03-01 14:00:58 +0900 | [diff] [blame] | 314 | if (IS_ERR(panel->enable_gpio)) { |
| 315 | err = PTR_ERR(panel->enable_gpio); |
Fabio Estevam | b8e9380 | 2017-06-30 18:14:46 -0300 | [diff] [blame] | 316 | if (err != -EPROBE_DEFER) |
| 317 | dev_err(dev, "failed to request GPIO: %d\n", err); |
Alexandre Courbot | 9746c61 | 2014-07-25 23:47:25 +0900 | [diff] [blame] | 318 | return err; |
| 319 | } |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 320 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 321 | backlight = of_parse_phandle(dev->of_node, "backlight", 0); |
| 322 | if (backlight) { |
| 323 | panel->backlight = of_find_backlight_by_node(backlight); |
| 324 | of_node_put(backlight); |
| 325 | |
Alexandre Courbot | cfdf054 | 2014-03-01 14:00:58 +0900 | [diff] [blame] | 326 | if (!panel->backlight) |
| 327 | return -EPROBE_DEFER; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 328 | } |
| 329 | |
| 330 | ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0); |
| 331 | if (ddc) { |
| 332 | panel->ddc = of_find_i2c_adapter_by_node(ddc); |
| 333 | of_node_put(ddc); |
| 334 | |
| 335 | if (!panel->ddc) { |
| 336 | err = -EPROBE_DEFER; |
| 337 | goto free_backlight; |
| 338 | } |
| 339 | } |
| 340 | |
| 341 | drm_panel_init(&panel->base); |
| 342 | panel->base.dev = dev; |
| 343 | panel->base.funcs = &panel_simple_funcs; |
| 344 | |
| 345 | err = drm_panel_add(&panel->base); |
| 346 | if (err < 0) |
| 347 | goto free_ddc; |
| 348 | |
| 349 | dev_set_drvdata(dev, panel); |
| 350 | |
| 351 | return 0; |
| 352 | |
| 353 | free_ddc: |
| 354 | if (panel->ddc) |
| 355 | put_device(&panel->ddc->dev); |
| 356 | free_backlight: |
| 357 | if (panel->backlight) |
| 358 | put_device(&panel->backlight->dev); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 359 | |
| 360 | return err; |
| 361 | } |
| 362 | |
| 363 | static int panel_simple_remove(struct device *dev) |
| 364 | { |
| 365 | struct panel_simple *panel = dev_get_drvdata(dev); |
| 366 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 367 | drm_panel_remove(&panel->base); |
| 368 | |
| 369 | panel_simple_disable(&panel->base); |
Jonathan Liu | f3621a8 | 2017-08-07 21:55:45 +1000 | [diff] [blame] | 370 | panel_simple_unprepare(&panel->base); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 371 | |
| 372 | if (panel->ddc) |
| 373 | put_device(&panel->ddc->dev); |
| 374 | |
| 375 | if (panel->backlight) |
| 376 | put_device(&panel->backlight->dev); |
| 377 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 378 | return 0; |
| 379 | } |
| 380 | |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 381 | static void panel_simple_shutdown(struct device *dev) |
| 382 | { |
| 383 | struct panel_simple *panel = dev_get_drvdata(dev); |
| 384 | |
| 385 | panel_simple_disable(&panel->base); |
Jonathan Liu | f3621a8 | 2017-08-07 21:55:45 +1000 | [diff] [blame] | 386 | panel_simple_unprepare(&panel->base); |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 387 | } |
| 388 | |
Yannick Fertre | 966fea7 | 2017-03-28 11:44:49 +0200 | [diff] [blame] | 389 | static const struct drm_display_mode ampire_am_480272h3tmqw_t01h_mode = { |
| 390 | .clock = 9000, |
| 391 | .hdisplay = 480, |
| 392 | .hsync_start = 480 + 2, |
| 393 | .hsync_end = 480 + 2 + 41, |
| 394 | .htotal = 480 + 2 + 41 + 2, |
| 395 | .vdisplay = 272, |
| 396 | .vsync_start = 272 + 2, |
| 397 | .vsync_end = 272 + 2 + 10, |
| 398 | .vtotal = 272 + 2 + 10 + 2, |
| 399 | .vrefresh = 60, |
| 400 | .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, |
| 401 | }; |
| 402 | |
| 403 | static const struct panel_desc ampire_am_480272h3tmqw_t01h = { |
| 404 | .modes = &ire_am_480272h3tmqw_t01h_mode, |
| 405 | .num_modes = 1, |
| 406 | .bpc = 8, |
| 407 | .size = { |
| 408 | .width = 105, |
| 409 | .height = 67, |
| 410 | }, |
| 411 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 412 | }; |
| 413 | |
Philipp Zabel | 1c550fa1 | 2015-02-11 18:50:09 +0100 | [diff] [blame] | 414 | static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = { |
| 415 | .clock = 33333, |
| 416 | .hdisplay = 800, |
| 417 | .hsync_start = 800 + 0, |
| 418 | .hsync_end = 800 + 0 + 255, |
| 419 | .htotal = 800 + 0 + 255 + 0, |
| 420 | .vdisplay = 480, |
| 421 | .vsync_start = 480 + 2, |
| 422 | .vsync_end = 480 + 2 + 45, |
| 423 | .vtotal = 480 + 2 + 45 + 0, |
| 424 | .vrefresh = 60, |
| 425 | .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, |
| 426 | }; |
| 427 | |
| 428 | static const struct panel_desc ampire_am800480r3tmqwa1h = { |
| 429 | .modes = &ire_am800480r3tmqwa1h_mode, |
| 430 | .num_modes = 1, |
| 431 | .bpc = 6, |
| 432 | .size = { |
| 433 | .width = 152, |
| 434 | .height = 91, |
| 435 | }, |
| 436 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 437 | }; |
| 438 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 439 | static const struct drm_display_mode auo_b101aw03_mode = { |
| 440 | .clock = 51450, |
| 441 | .hdisplay = 1024, |
| 442 | .hsync_start = 1024 + 156, |
| 443 | .hsync_end = 1024 + 156 + 8, |
| 444 | .htotal = 1024 + 156 + 8 + 156, |
| 445 | .vdisplay = 600, |
| 446 | .vsync_start = 600 + 16, |
| 447 | .vsync_end = 600 + 16 + 6, |
| 448 | .vtotal = 600 + 16 + 6 + 16, |
| 449 | .vrefresh = 60, |
| 450 | }; |
| 451 | |
| 452 | static const struct panel_desc auo_b101aw03 = { |
| 453 | .modes = &auo_b101aw03_mode, |
| 454 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 455 | .bpc = 6, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 456 | .size = { |
| 457 | .width = 223, |
| 458 | .height = 125, |
| 459 | }, |
| 460 | }; |
| 461 | |
Huang Lin | a531bc3 | 2015-02-28 10:18:58 +0800 | [diff] [blame] | 462 | static const struct drm_display_mode auo_b101ean01_mode = { |
| 463 | .clock = 72500, |
| 464 | .hdisplay = 1280, |
| 465 | .hsync_start = 1280 + 119, |
| 466 | .hsync_end = 1280 + 119 + 32, |
| 467 | .htotal = 1280 + 119 + 32 + 21, |
| 468 | .vdisplay = 800, |
| 469 | .vsync_start = 800 + 4, |
| 470 | .vsync_end = 800 + 4 + 20, |
| 471 | .vtotal = 800 + 4 + 20 + 8, |
| 472 | .vrefresh = 60, |
| 473 | }; |
| 474 | |
| 475 | static const struct panel_desc auo_b101ean01 = { |
| 476 | .modes = &auo_b101ean01_mode, |
| 477 | .num_modes = 1, |
| 478 | .bpc = 6, |
| 479 | .size = { |
| 480 | .width = 217, |
| 481 | .height = 136, |
| 482 | }, |
| 483 | }; |
| 484 | |
Rob Clark | dac746e | 2014-08-01 17:01:06 -0400 | [diff] [blame] | 485 | static const struct drm_display_mode auo_b101xtn01_mode = { |
| 486 | .clock = 72000, |
| 487 | .hdisplay = 1366, |
| 488 | .hsync_start = 1366 + 20, |
| 489 | .hsync_end = 1366 + 20 + 70, |
| 490 | .htotal = 1366 + 20 + 70, |
| 491 | .vdisplay = 768, |
| 492 | .vsync_start = 768 + 14, |
| 493 | .vsync_end = 768 + 14 + 42, |
| 494 | .vtotal = 768 + 14 + 42, |
| 495 | .vrefresh = 60, |
| 496 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 497 | }; |
| 498 | |
| 499 | static const struct panel_desc auo_b101xtn01 = { |
| 500 | .modes = &auo_b101xtn01_mode, |
| 501 | .num_modes = 1, |
| 502 | .bpc = 6, |
| 503 | .size = { |
| 504 | .width = 223, |
| 505 | .height = 125, |
| 506 | }, |
| 507 | }; |
| 508 | |
Ajay Kumar | e35e305 | 2014-09-01 15:40:02 +0530 | [diff] [blame] | 509 | static const struct drm_display_mode auo_b116xw03_mode = { |
| 510 | .clock = 70589, |
| 511 | .hdisplay = 1366, |
| 512 | .hsync_start = 1366 + 40, |
| 513 | .hsync_end = 1366 + 40 + 40, |
| 514 | .htotal = 1366 + 40 + 40 + 32, |
| 515 | .vdisplay = 768, |
| 516 | .vsync_start = 768 + 10, |
| 517 | .vsync_end = 768 + 10 + 12, |
| 518 | .vtotal = 768 + 10 + 12 + 6, |
| 519 | .vrefresh = 60, |
| 520 | }; |
| 521 | |
| 522 | static const struct panel_desc auo_b116xw03 = { |
| 523 | .modes = &auo_b116xw03_mode, |
| 524 | .num_modes = 1, |
| 525 | .bpc = 6, |
| 526 | .size = { |
| 527 | .width = 256, |
| 528 | .height = 144, |
| 529 | }, |
| 530 | }; |
| 531 | |
Stéphane Marchesin | a333f7a | 2014-05-23 19:27:59 -0700 | [diff] [blame] | 532 | static const struct drm_display_mode auo_b133xtn01_mode = { |
| 533 | .clock = 69500, |
| 534 | .hdisplay = 1366, |
| 535 | .hsync_start = 1366 + 48, |
| 536 | .hsync_end = 1366 + 48 + 32, |
| 537 | .htotal = 1366 + 48 + 32 + 20, |
| 538 | .vdisplay = 768, |
| 539 | .vsync_start = 768 + 3, |
| 540 | .vsync_end = 768 + 3 + 6, |
| 541 | .vtotal = 768 + 3 + 6 + 13, |
| 542 | .vrefresh = 60, |
| 543 | }; |
| 544 | |
| 545 | static const struct panel_desc auo_b133xtn01 = { |
| 546 | .modes = &auo_b133xtn01_mode, |
| 547 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 548 | .bpc = 6, |
Stéphane Marchesin | a333f7a | 2014-05-23 19:27:59 -0700 | [diff] [blame] | 549 | .size = { |
| 550 | .width = 293, |
| 551 | .height = 165, |
| 552 | }, |
| 553 | }; |
| 554 | |
Ajay Kumar | 3e51d60 | 2014-07-31 23:12:12 +0530 | [diff] [blame] | 555 | static const struct drm_display_mode auo_b133htn01_mode = { |
| 556 | .clock = 150660, |
| 557 | .hdisplay = 1920, |
| 558 | .hsync_start = 1920 + 172, |
| 559 | .hsync_end = 1920 + 172 + 80, |
| 560 | .htotal = 1920 + 172 + 80 + 60, |
| 561 | .vdisplay = 1080, |
| 562 | .vsync_start = 1080 + 25, |
| 563 | .vsync_end = 1080 + 25 + 10, |
| 564 | .vtotal = 1080 + 25 + 10 + 10, |
| 565 | .vrefresh = 60, |
| 566 | }; |
| 567 | |
| 568 | static const struct panel_desc auo_b133htn01 = { |
| 569 | .modes = &auo_b133htn01_mode, |
| 570 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 571 | .bpc = 6, |
Ajay Kumar | 3e51d60 | 2014-07-31 23:12:12 +0530 | [diff] [blame] | 572 | .size = { |
| 573 | .width = 293, |
| 574 | .height = 165, |
| 575 | }, |
| 576 | .delay = { |
| 577 | .prepare = 105, |
| 578 | .enable = 20, |
| 579 | .unprepare = 50, |
| 580 | }, |
| 581 | }; |
| 582 | |
Lukasz Majewski | bccfaff | 2018-05-14 21:08:49 +0200 | [diff] [blame] | 583 | static const struct display_timing auo_g070vvn01_timings = { |
| 584 | .pixelclock = { 33300000, 34209000, 45000000 }, |
| 585 | .hactive = { 800, 800, 800 }, |
| 586 | .hfront_porch = { 20, 40, 200 }, |
| 587 | .hback_porch = { 87, 40, 1 }, |
| 588 | .hsync_len = { 1, 48, 87 }, |
| 589 | .vactive = { 480, 480, 480 }, |
| 590 | .vfront_porch = { 5, 13, 200 }, |
| 591 | .vback_porch = { 31, 31, 29 }, |
| 592 | .vsync_len = { 1, 1, 3 }, |
| 593 | }; |
| 594 | |
| 595 | static const struct panel_desc auo_g070vvn01 = { |
| 596 | .timings = &auo_g070vvn01_timings, |
| 597 | .num_timings = 1, |
| 598 | .bpc = 8, |
| 599 | .size = { |
| 600 | .width = 152, |
| 601 | .height = 91, |
| 602 | }, |
| 603 | .delay = { |
| 604 | .prepare = 200, |
| 605 | .enable = 50, |
| 606 | .disable = 50, |
| 607 | .unprepare = 1000, |
| 608 | }, |
| 609 | }; |
| 610 | |
Christoph Fritz | 4451c28 | 2017-12-16 14:13:36 +0100 | [diff] [blame] | 611 | static const struct drm_display_mode auo_g104sn02_mode = { |
| 612 | .clock = 40000, |
| 613 | .hdisplay = 800, |
| 614 | .hsync_start = 800 + 40, |
| 615 | .hsync_end = 800 + 40 + 216, |
| 616 | .htotal = 800 + 40 + 216 + 128, |
| 617 | .vdisplay = 600, |
| 618 | .vsync_start = 600 + 10, |
| 619 | .vsync_end = 600 + 10 + 35, |
| 620 | .vtotal = 600 + 10 + 35 + 2, |
| 621 | .vrefresh = 60, |
| 622 | }; |
| 623 | |
| 624 | static const struct panel_desc auo_g104sn02 = { |
| 625 | .modes = &auo_g104sn02_mode, |
| 626 | .num_modes = 1, |
| 627 | .bpc = 8, |
| 628 | .size = { |
| 629 | .width = 211, |
| 630 | .height = 158, |
| 631 | }, |
| 632 | }; |
| 633 | |
Lucas Stach | 697035c | 2016-11-30 14:09:55 +0100 | [diff] [blame] | 634 | static const struct display_timing auo_g133han01_timings = { |
| 635 | .pixelclock = { 134000000, 141200000, 149000000 }, |
| 636 | .hactive = { 1920, 1920, 1920 }, |
| 637 | .hfront_porch = { 39, 58, 77 }, |
| 638 | .hback_porch = { 59, 88, 117 }, |
| 639 | .hsync_len = { 28, 42, 56 }, |
| 640 | .vactive = { 1080, 1080, 1080 }, |
| 641 | .vfront_porch = { 3, 8, 11 }, |
| 642 | .vback_porch = { 5, 14, 19 }, |
| 643 | .vsync_len = { 4, 14, 19 }, |
| 644 | }; |
| 645 | |
| 646 | static const struct panel_desc auo_g133han01 = { |
| 647 | .timings = &auo_g133han01_timings, |
| 648 | .num_timings = 1, |
| 649 | .bpc = 8, |
| 650 | .size = { |
| 651 | .width = 293, |
| 652 | .height = 165, |
| 653 | }, |
| 654 | .delay = { |
| 655 | .prepare = 200, |
| 656 | .enable = 50, |
| 657 | .disable = 50, |
| 658 | .unprepare = 1000, |
| 659 | }, |
| 660 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, |
| 661 | }; |
| 662 | |
Lucas Stach | 8c31f60 | 2016-11-30 14:09:56 +0100 | [diff] [blame] | 663 | static const struct display_timing auo_g185han01_timings = { |
| 664 | .pixelclock = { 120000000, 144000000, 175000000 }, |
| 665 | .hactive = { 1920, 1920, 1920 }, |
| 666 | .hfront_porch = { 18, 60, 74 }, |
| 667 | .hback_porch = { 12, 44, 54 }, |
| 668 | .hsync_len = { 10, 24, 32 }, |
| 669 | .vactive = { 1080, 1080, 1080 }, |
| 670 | .vfront_porch = { 6, 10, 40 }, |
| 671 | .vback_porch = { 2, 5, 20 }, |
| 672 | .vsync_len = { 2, 5, 20 }, |
| 673 | }; |
| 674 | |
| 675 | static const struct panel_desc auo_g185han01 = { |
| 676 | .timings = &auo_g185han01_timings, |
| 677 | .num_timings = 1, |
| 678 | .bpc = 8, |
| 679 | .size = { |
| 680 | .width = 409, |
| 681 | .height = 230, |
| 682 | }, |
| 683 | .delay = { |
| 684 | .prepare = 50, |
| 685 | .enable = 200, |
| 686 | .disable = 110, |
| 687 | .unprepare = 1000, |
| 688 | }, |
| 689 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 690 | }; |
| 691 | |
Lucas Stach | 70c0d5b | 2017-06-08 20:07:58 +0200 | [diff] [blame] | 692 | static const struct display_timing auo_p320hvn03_timings = { |
| 693 | .pixelclock = { 106000000, 148500000, 164000000 }, |
| 694 | .hactive = { 1920, 1920, 1920 }, |
| 695 | .hfront_porch = { 25, 50, 130 }, |
| 696 | .hback_porch = { 25, 50, 130 }, |
| 697 | .hsync_len = { 20, 40, 105 }, |
| 698 | .vactive = { 1080, 1080, 1080 }, |
| 699 | .vfront_porch = { 8, 17, 150 }, |
| 700 | .vback_porch = { 8, 17, 150 }, |
| 701 | .vsync_len = { 4, 11, 100 }, |
| 702 | }; |
| 703 | |
| 704 | static const struct panel_desc auo_p320hvn03 = { |
| 705 | .timings = &auo_p320hvn03_timings, |
| 706 | .num_timings = 1, |
| 707 | .bpc = 8, |
| 708 | .size = { |
| 709 | .width = 698, |
| 710 | .height = 393, |
| 711 | }, |
| 712 | .delay = { |
| 713 | .prepare = 1, |
| 714 | .enable = 450, |
| 715 | .unprepare = 500, |
| 716 | }, |
Lucas Stach | 2554f15 | 2018-04-11 17:27:41 +0200 | [diff] [blame] | 717 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Lucas Stach | 70c0d5b | 2017-06-08 20:07:58 +0200 | [diff] [blame] | 718 | }; |
| 719 | |
Haixia Shi | 7ee933a | 2016-10-11 14:59:16 -0700 | [diff] [blame] | 720 | static const struct drm_display_mode auo_t215hvn01_mode = { |
| 721 | .clock = 148800, |
| 722 | .hdisplay = 1920, |
| 723 | .hsync_start = 1920 + 88, |
| 724 | .hsync_end = 1920 + 88 + 44, |
| 725 | .htotal = 1920 + 88 + 44 + 148, |
| 726 | .vdisplay = 1080, |
| 727 | .vsync_start = 1080 + 4, |
| 728 | .vsync_end = 1080 + 4 + 5, |
| 729 | .vtotal = 1080 + 4 + 5 + 36, |
| 730 | .vrefresh = 60, |
| 731 | }; |
| 732 | |
| 733 | static const struct panel_desc auo_t215hvn01 = { |
| 734 | .modes = &auo_t215hvn01_mode, |
| 735 | .num_modes = 1, |
| 736 | .bpc = 8, |
| 737 | .size = { |
| 738 | .width = 430, |
| 739 | .height = 270, |
| 740 | }, |
| 741 | .delay = { |
| 742 | .disable = 5, |
| 743 | .unprepare = 1000, |
| 744 | } |
| 745 | }; |
| 746 | |
Philipp Zabel | d47df63 | 2014-12-18 16:43:43 +0100 | [diff] [blame] | 747 | static const struct drm_display_mode avic_tm070ddh03_mode = { |
| 748 | .clock = 51200, |
| 749 | .hdisplay = 1024, |
| 750 | .hsync_start = 1024 + 160, |
| 751 | .hsync_end = 1024 + 160 + 4, |
| 752 | .htotal = 1024 + 160 + 4 + 156, |
| 753 | .vdisplay = 600, |
| 754 | .vsync_start = 600 + 17, |
| 755 | .vsync_end = 600 + 17 + 1, |
| 756 | .vtotal = 600 + 17 + 1 + 17, |
| 757 | .vrefresh = 60, |
| 758 | }; |
| 759 | |
| 760 | static const struct panel_desc avic_tm070ddh03 = { |
| 761 | .modes = &avic_tm070ddh03_mode, |
| 762 | .num_modes = 1, |
| 763 | .bpc = 8, |
| 764 | .size = { |
| 765 | .width = 154, |
| 766 | .height = 90, |
| 767 | }, |
| 768 | .delay = { |
| 769 | .prepare = 20, |
| 770 | .enable = 200, |
| 771 | .disable = 200, |
| 772 | }, |
| 773 | }; |
| 774 | |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 775 | static const struct drm_display_mode boe_hv070wsa_mode = { |
Andrzej Hajda | e077e2f | 2018-07-25 17:46:43 +0200 | [diff] [blame] | 776 | .clock = 42105, |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 777 | .hdisplay = 1024, |
Andrzej Hajda | e077e2f | 2018-07-25 17:46:43 +0200 | [diff] [blame] | 778 | .hsync_start = 1024 + 30, |
| 779 | .hsync_end = 1024 + 30 + 30, |
| 780 | .htotal = 1024 + 30 + 30 + 30, |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 781 | .vdisplay = 600, |
Andrzej Hajda | e077e2f | 2018-07-25 17:46:43 +0200 | [diff] [blame] | 782 | .vsync_start = 600 + 10, |
| 783 | .vsync_end = 600 + 10 + 10, |
| 784 | .vtotal = 600 + 10 + 10 + 10, |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 785 | .vrefresh = 60, |
| 786 | }; |
| 787 | |
| 788 | static const struct panel_desc boe_hv070wsa = { |
| 789 | .modes = &boe_hv070wsa_mode, |
| 790 | .num_modes = 1, |
| 791 | .size = { |
| 792 | .width = 154, |
| 793 | .height = 90, |
| 794 | }, |
| 795 | }; |
| 796 | |
Caesar Wang | cac1a41 | 2016-12-14 11:19:56 +0800 | [diff] [blame] | 797 | static const struct drm_display_mode boe_nv101wxmn51_modes[] = { |
| 798 | { |
| 799 | .clock = 71900, |
| 800 | .hdisplay = 1280, |
| 801 | .hsync_start = 1280 + 48, |
| 802 | .hsync_end = 1280 + 48 + 32, |
| 803 | .htotal = 1280 + 48 + 32 + 80, |
| 804 | .vdisplay = 800, |
| 805 | .vsync_start = 800 + 3, |
| 806 | .vsync_end = 800 + 3 + 5, |
| 807 | .vtotal = 800 + 3 + 5 + 24, |
| 808 | .vrefresh = 60, |
| 809 | }, |
| 810 | { |
| 811 | .clock = 57500, |
| 812 | .hdisplay = 1280, |
| 813 | .hsync_start = 1280 + 48, |
| 814 | .hsync_end = 1280 + 48 + 32, |
| 815 | .htotal = 1280 + 48 + 32 + 80, |
| 816 | .vdisplay = 800, |
| 817 | .vsync_start = 800 + 3, |
| 818 | .vsync_end = 800 + 3 + 5, |
| 819 | .vtotal = 800 + 3 + 5 + 24, |
| 820 | .vrefresh = 48, |
| 821 | }, |
| 822 | }; |
| 823 | |
| 824 | static const struct panel_desc boe_nv101wxmn51 = { |
| 825 | .modes = boe_nv101wxmn51_modes, |
| 826 | .num_modes = ARRAY_SIZE(boe_nv101wxmn51_modes), |
| 827 | .bpc = 8, |
| 828 | .size = { |
| 829 | .width = 217, |
| 830 | .height = 136, |
| 831 | }, |
| 832 | .delay = { |
| 833 | .prepare = 210, |
| 834 | .enable = 50, |
| 835 | .unprepare = 160, |
| 836 | }, |
| 837 | }; |
| 838 | |
Giulio Benetti | e58edce | 2018-07-31 01:11:16 +0200 | [diff] [blame^] | 839 | static const struct drm_display_mode cdtech_s043wq26h_ct7_mode = { |
| 840 | .clock = 9000, |
| 841 | .hdisplay = 480, |
| 842 | .hsync_start = 480 + 5, |
| 843 | .hsync_end = 480 + 5 + 5, |
| 844 | .htotal = 480 + 5 + 5 + 40, |
| 845 | .vdisplay = 272, |
| 846 | .vsync_start = 272 + 8, |
| 847 | .vsync_end = 272 + 8 + 8, |
| 848 | .vtotal = 272 + 8 + 8 + 8, |
| 849 | .vrefresh = 60, |
| 850 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 851 | }; |
| 852 | |
| 853 | static const struct panel_desc cdtech_s043wq26h_ct7 = { |
| 854 | .modes = &cdtech_s043wq26h_ct7_mode, |
| 855 | .num_modes = 1, |
| 856 | .bpc = 8, |
| 857 | .size = { |
| 858 | .width = 95, |
| 859 | .height = 54, |
| 860 | }, |
| 861 | .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE, |
| 862 | }; |
| 863 | |
Giulio Benetti | 982f944 | 2018-07-31 01:11:14 +0200 | [diff] [blame] | 864 | static const struct drm_display_mode cdtech_s070wv95_ct16_mode = { |
| 865 | .clock = 35000, |
| 866 | .hdisplay = 800, |
| 867 | .hsync_start = 800 + 40, |
| 868 | .hsync_end = 800 + 40 + 40, |
| 869 | .htotal = 800 + 40 + 40 + 48, |
| 870 | .vdisplay = 480, |
| 871 | .vsync_start = 480 + 29, |
| 872 | .vsync_end = 480 + 29 + 13, |
| 873 | .vtotal = 480 + 29 + 13 + 3, |
| 874 | .vrefresh = 60, |
| 875 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 876 | }; |
| 877 | |
| 878 | static const struct panel_desc cdtech_s070wv95_ct16 = { |
| 879 | .modes = &cdtech_s070wv95_ct16_mode, |
| 880 | .num_modes = 1, |
| 881 | .bpc = 8, |
| 882 | .size = { |
| 883 | .width = 154, |
| 884 | .height = 85, |
| 885 | }, |
| 886 | }; |
| 887 | |
Randy Li | 2cb35c8 | 2016-09-20 03:02:51 +0800 | [diff] [blame] | 888 | static const struct drm_display_mode chunghwa_claa070wp03xg_mode = { |
| 889 | .clock = 66770, |
| 890 | .hdisplay = 800, |
| 891 | .hsync_start = 800 + 49, |
| 892 | .hsync_end = 800 + 49 + 33, |
| 893 | .htotal = 800 + 49 + 33 + 17, |
| 894 | .vdisplay = 1280, |
| 895 | .vsync_start = 1280 + 1, |
| 896 | .vsync_end = 1280 + 1 + 7, |
| 897 | .vtotal = 1280 + 1 + 7 + 15, |
| 898 | .vrefresh = 60, |
| 899 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 900 | }; |
| 901 | |
| 902 | static const struct panel_desc chunghwa_claa070wp03xg = { |
| 903 | .modes = &chunghwa_claa070wp03xg_mode, |
| 904 | .num_modes = 1, |
| 905 | .bpc = 6, |
| 906 | .size = { |
| 907 | .width = 94, |
| 908 | .height = 150, |
| 909 | }, |
| 910 | }; |
| 911 | |
Stephen Warren | 4c93075 | 2014-01-07 16:46:26 -0700 | [diff] [blame] | 912 | static const struct drm_display_mode chunghwa_claa101wa01a_mode = { |
| 913 | .clock = 72070, |
| 914 | .hdisplay = 1366, |
| 915 | .hsync_start = 1366 + 58, |
| 916 | .hsync_end = 1366 + 58 + 58, |
| 917 | .htotal = 1366 + 58 + 58 + 58, |
| 918 | .vdisplay = 768, |
| 919 | .vsync_start = 768 + 4, |
| 920 | .vsync_end = 768 + 4 + 4, |
| 921 | .vtotal = 768 + 4 + 4 + 4, |
| 922 | .vrefresh = 60, |
| 923 | }; |
| 924 | |
| 925 | static const struct panel_desc chunghwa_claa101wa01a = { |
| 926 | .modes = &chunghwa_claa101wa01a_mode, |
| 927 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 928 | .bpc = 6, |
Stephen Warren | 4c93075 | 2014-01-07 16:46:26 -0700 | [diff] [blame] | 929 | .size = { |
| 930 | .width = 220, |
| 931 | .height = 120, |
| 932 | }, |
| 933 | }; |
| 934 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 935 | static const struct drm_display_mode chunghwa_claa101wb01_mode = { |
| 936 | .clock = 69300, |
| 937 | .hdisplay = 1366, |
| 938 | .hsync_start = 1366 + 48, |
| 939 | .hsync_end = 1366 + 48 + 32, |
| 940 | .htotal = 1366 + 48 + 32 + 20, |
| 941 | .vdisplay = 768, |
| 942 | .vsync_start = 768 + 16, |
| 943 | .vsync_end = 768 + 16 + 8, |
| 944 | .vtotal = 768 + 16 + 8 + 16, |
| 945 | .vrefresh = 60, |
| 946 | }; |
| 947 | |
| 948 | static const struct panel_desc chunghwa_claa101wb01 = { |
| 949 | .modes = &chunghwa_claa101wb01_mode, |
| 950 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 951 | .bpc = 6, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 952 | .size = { |
| 953 | .width = 223, |
| 954 | .height = 125, |
| 955 | }, |
| 956 | }; |
| 957 | |
Michal Vokáč | 97ceb1f | 2018-06-25 14:41:30 +0200 | [diff] [blame] | 958 | static const struct drm_display_mode dataimage_scf0700c48ggu18_mode = { |
| 959 | .clock = 33260, |
| 960 | .hdisplay = 800, |
| 961 | .hsync_start = 800 + 40, |
| 962 | .hsync_end = 800 + 40 + 128, |
| 963 | .htotal = 800 + 40 + 128 + 88, |
| 964 | .vdisplay = 480, |
| 965 | .vsync_start = 480 + 10, |
| 966 | .vsync_end = 480 + 10 + 2, |
| 967 | .vtotal = 480 + 10 + 2 + 33, |
| 968 | .vrefresh = 60, |
| 969 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 970 | }; |
| 971 | |
| 972 | static const struct panel_desc dataimage_scf0700c48ggu18 = { |
| 973 | .modes = &dataimage_scf0700c48ggu18_mode, |
| 974 | .num_modes = 1, |
| 975 | .bpc = 8, |
| 976 | .size = { |
| 977 | .width = 152, |
| 978 | .height = 91, |
| 979 | }, |
| 980 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 981 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE, |
| 982 | }; |
| 983 | |
Philipp Zabel | 0ca0c82 | 2018-05-23 11:25:04 +0200 | [diff] [blame] | 984 | static const struct display_timing dlc_dlc0700yzg_1_timing = { |
| 985 | .pixelclock = { 45000000, 51200000, 57000000 }, |
| 986 | .hactive = { 1024, 1024, 1024 }, |
| 987 | .hfront_porch = { 100, 106, 113 }, |
| 988 | .hback_porch = { 100, 106, 113 }, |
| 989 | .hsync_len = { 100, 108, 114 }, |
| 990 | .vactive = { 600, 600, 600 }, |
| 991 | .vfront_porch = { 8, 11, 15 }, |
| 992 | .vback_porch = { 8, 11, 15 }, |
| 993 | .vsync_len = { 9, 13, 15 }, |
| 994 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 995 | }; |
| 996 | |
| 997 | static const struct panel_desc dlc_dlc0700yzg_1 = { |
| 998 | .timings = &dlc_dlc0700yzg_1_timing, |
| 999 | .num_timings = 1, |
| 1000 | .bpc = 6, |
| 1001 | .size = { |
| 1002 | .width = 154, |
| 1003 | .height = 86, |
| 1004 | }, |
| 1005 | .delay = { |
| 1006 | .prepare = 30, |
| 1007 | .enable = 200, |
| 1008 | .disable = 200, |
| 1009 | }, |
| 1010 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
| 1011 | }; |
| 1012 | |
Stefan Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 1013 | static const struct drm_display_mode edt_et057090dhu_mode = { |
| 1014 | .clock = 25175, |
| 1015 | .hdisplay = 640, |
| 1016 | .hsync_start = 640 + 16, |
| 1017 | .hsync_end = 640 + 16 + 30, |
| 1018 | .htotal = 640 + 16 + 30 + 114, |
| 1019 | .vdisplay = 480, |
| 1020 | .vsync_start = 480 + 10, |
| 1021 | .vsync_end = 480 + 10 + 3, |
| 1022 | .vtotal = 480 + 10 + 3 + 32, |
| 1023 | .vrefresh = 60, |
| 1024 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 1025 | }; |
| 1026 | |
| 1027 | static const struct panel_desc edt_et057090dhu = { |
| 1028 | .modes = &edt_et057090dhu_mode, |
| 1029 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1030 | .bpc = 6, |
Stefan Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 1031 | .size = { |
| 1032 | .width = 115, |
| 1033 | .height = 86, |
| 1034 | }, |
Stefan Agner | eaeebff | 2016-12-08 14:54:31 -0800 | [diff] [blame] | 1035 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 1036 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE, |
Stefan Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 1037 | }; |
| 1038 | |
Philipp Zabel | fff5de4 | 2014-05-15 12:25:47 +0200 | [diff] [blame] | 1039 | static const struct drm_display_mode edt_etm0700g0dh6_mode = { |
| 1040 | .clock = 33260, |
| 1041 | .hdisplay = 800, |
| 1042 | .hsync_start = 800 + 40, |
| 1043 | .hsync_end = 800 + 40 + 128, |
| 1044 | .htotal = 800 + 40 + 128 + 88, |
| 1045 | .vdisplay = 480, |
| 1046 | .vsync_start = 480 + 10, |
| 1047 | .vsync_end = 480 + 10 + 2, |
| 1048 | .vtotal = 480 + 10 + 2 + 33, |
| 1049 | .vrefresh = 60, |
| 1050 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 1051 | }; |
| 1052 | |
| 1053 | static const struct panel_desc edt_etm0700g0dh6 = { |
| 1054 | .modes = &edt_etm0700g0dh6_mode, |
| 1055 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1056 | .bpc = 6, |
Philipp Zabel | fff5de4 | 2014-05-15 12:25:47 +0200 | [diff] [blame] | 1057 | .size = { |
| 1058 | .width = 152, |
| 1059 | .height = 91, |
| 1060 | }, |
Stefan Agner | eaeebff | 2016-12-08 14:54:31 -0800 | [diff] [blame] | 1061 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 1062 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE, |
Philipp Zabel | fff5de4 | 2014-05-15 12:25:47 +0200 | [diff] [blame] | 1063 | }; |
| 1064 | |
Jan Tuerk | aa7e645 | 2018-06-19 11:55:44 +0200 | [diff] [blame] | 1065 | static const struct panel_desc edt_etm0700g0bdh6 = { |
| 1066 | .modes = &edt_etm0700g0dh6_mode, |
| 1067 | .num_modes = 1, |
| 1068 | .bpc = 6, |
| 1069 | .size = { |
| 1070 | .width = 152, |
| 1071 | .height = 91, |
| 1072 | }, |
| 1073 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 1074 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE, |
| 1075 | }; |
| 1076 | |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 1077 | static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = { |
| 1078 | .clock = 32260, |
| 1079 | .hdisplay = 800, |
| 1080 | .hsync_start = 800 + 168, |
| 1081 | .hsync_end = 800 + 168 + 64, |
| 1082 | .htotal = 800 + 168 + 64 + 88, |
| 1083 | .vdisplay = 480, |
| 1084 | .vsync_start = 480 + 37, |
| 1085 | .vsync_end = 480 + 37 + 2, |
| 1086 | .vtotal = 480 + 37 + 2 + 8, |
| 1087 | .vrefresh = 60, |
| 1088 | }; |
| 1089 | |
| 1090 | static const struct panel_desc foxlink_fl500wvr00_a0t = { |
| 1091 | .modes = &foxlink_fl500wvr00_a0t_mode, |
| 1092 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 1093 | .bpc = 8, |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 1094 | .size = { |
| 1095 | .width = 108, |
| 1096 | .height = 65, |
| 1097 | }, |
Boris Brezillon | bb276cb | 2014-07-22 13:35:47 +0200 | [diff] [blame] | 1098 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 1099 | }; |
| 1100 | |
Philipp Zabel | d435a2a | 2014-11-19 10:29:55 +0100 | [diff] [blame] | 1101 | static const struct drm_display_mode giantplus_gpg482739qs5_mode = { |
| 1102 | .clock = 9000, |
| 1103 | .hdisplay = 480, |
| 1104 | .hsync_start = 480 + 5, |
| 1105 | .hsync_end = 480 + 5 + 1, |
| 1106 | .htotal = 480 + 5 + 1 + 40, |
| 1107 | .vdisplay = 272, |
| 1108 | .vsync_start = 272 + 8, |
| 1109 | .vsync_end = 272 + 8 + 1, |
| 1110 | .vtotal = 272 + 8 + 1 + 8, |
| 1111 | .vrefresh = 60, |
| 1112 | }; |
| 1113 | |
| 1114 | static const struct panel_desc giantplus_gpg482739qs5 = { |
| 1115 | .modes = &giantplus_gpg482739qs5_mode, |
| 1116 | .num_modes = 1, |
| 1117 | .bpc = 8, |
| 1118 | .size = { |
| 1119 | .width = 95, |
| 1120 | .height = 54, |
| 1121 | }, |
Philipp Zabel | 33536a0 | 2015-02-11 18:50:07 +0100 | [diff] [blame] | 1122 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Philipp Zabel | d435a2a | 2014-11-19 10:29:55 +0100 | [diff] [blame] | 1123 | }; |
| 1124 | |
Philipp Zabel | ab07725 | 2014-12-11 18:32:46 +0100 | [diff] [blame] | 1125 | static const struct display_timing hannstar_hsd070pww1_timing = { |
| 1126 | .pixelclock = { 64300000, 71100000, 82000000 }, |
| 1127 | .hactive = { 1280, 1280, 1280 }, |
| 1128 | .hfront_porch = { 1, 1, 10 }, |
| 1129 | .hback_porch = { 1, 1, 10 }, |
Philipp Zabel | d901d2b | 2015-08-12 12:32:13 +0200 | [diff] [blame] | 1130 | /* |
| 1131 | * According to the data sheet, the minimum horizontal blanking interval |
| 1132 | * is 54 clocks (1 + 52 + 1), but tests with a Nitrogen6X have shown the |
| 1133 | * minimum working horizontal blanking interval to be 60 clocks. |
| 1134 | */ |
| 1135 | .hsync_len = { 58, 158, 661 }, |
Philipp Zabel | ab07725 | 2014-12-11 18:32:46 +0100 | [diff] [blame] | 1136 | .vactive = { 800, 800, 800 }, |
| 1137 | .vfront_porch = { 1, 1, 10 }, |
| 1138 | .vback_porch = { 1, 1, 10 }, |
| 1139 | .vsync_len = { 1, 21, 203 }, |
| 1140 | .flags = DISPLAY_FLAGS_DE_HIGH, |
Philipp Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 1141 | }; |
| 1142 | |
| 1143 | static const struct panel_desc hannstar_hsd070pww1 = { |
Philipp Zabel | ab07725 | 2014-12-11 18:32:46 +0100 | [diff] [blame] | 1144 | .timings = &hannstar_hsd070pww1_timing, |
| 1145 | .num_timings = 1, |
Philipp Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 1146 | .bpc = 6, |
| 1147 | .size = { |
| 1148 | .width = 151, |
| 1149 | .height = 94, |
| 1150 | }, |
Philipp Zabel | 58d6a7b | 2015-08-12 12:32:12 +0200 | [diff] [blame] | 1151 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Philipp Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 1152 | }; |
| 1153 | |
Eric Nelson | c0d607e | 2015-04-13 15:09:26 -0700 | [diff] [blame] | 1154 | static const struct display_timing hannstar_hsd100pxn1_timing = { |
| 1155 | .pixelclock = { 55000000, 65000000, 75000000 }, |
| 1156 | .hactive = { 1024, 1024, 1024 }, |
| 1157 | .hfront_porch = { 40, 40, 40 }, |
| 1158 | .hback_porch = { 220, 220, 220 }, |
| 1159 | .hsync_len = { 20, 60, 100 }, |
| 1160 | .vactive = { 768, 768, 768 }, |
| 1161 | .vfront_porch = { 7, 7, 7 }, |
| 1162 | .vback_porch = { 21, 21, 21 }, |
| 1163 | .vsync_len = { 10, 10, 10 }, |
| 1164 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 1165 | }; |
| 1166 | |
| 1167 | static const struct panel_desc hannstar_hsd100pxn1 = { |
| 1168 | .timings = &hannstar_hsd100pxn1_timing, |
| 1169 | .num_timings = 1, |
| 1170 | .bpc = 6, |
| 1171 | .size = { |
| 1172 | .width = 203, |
| 1173 | .height = 152, |
| 1174 | }, |
Philipp Zabel | 4946b04 | 2015-05-20 11:34:08 +0200 | [diff] [blame] | 1175 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Eric Nelson | c0d607e | 2015-04-13 15:09:26 -0700 | [diff] [blame] | 1176 | }; |
| 1177 | |
Lucas Stach | 61ac0bf | 2014-11-06 17:44:35 +0100 | [diff] [blame] | 1178 | static const struct drm_display_mode hitachi_tx23d38vm0caa_mode = { |
| 1179 | .clock = 33333, |
| 1180 | .hdisplay = 800, |
| 1181 | .hsync_start = 800 + 85, |
| 1182 | .hsync_end = 800 + 85 + 86, |
| 1183 | .htotal = 800 + 85 + 86 + 85, |
| 1184 | .vdisplay = 480, |
| 1185 | .vsync_start = 480 + 16, |
| 1186 | .vsync_end = 480 + 16 + 13, |
| 1187 | .vtotal = 480 + 16 + 13 + 16, |
| 1188 | .vrefresh = 60, |
| 1189 | }; |
| 1190 | |
| 1191 | static const struct panel_desc hitachi_tx23d38vm0caa = { |
| 1192 | .modes = &hitachi_tx23d38vm0caa_mode, |
| 1193 | .num_modes = 1, |
| 1194 | .bpc = 6, |
| 1195 | .size = { |
| 1196 | .width = 195, |
| 1197 | .height = 117, |
| 1198 | }, |
Philipp Zabel | 6c684e3 | 2017-10-11 14:59:58 +0200 | [diff] [blame] | 1199 | .delay = { |
| 1200 | .enable = 160, |
| 1201 | .disable = 160, |
| 1202 | }, |
Lucas Stach | 61ac0bf | 2014-11-06 17:44:35 +0100 | [diff] [blame] | 1203 | }; |
| 1204 | |
Nicolas Ferre | 41bcceb | 2015-03-19 14:43:01 +0100 | [diff] [blame] | 1205 | static const struct drm_display_mode innolux_at043tn24_mode = { |
| 1206 | .clock = 9000, |
| 1207 | .hdisplay = 480, |
| 1208 | .hsync_start = 480 + 2, |
| 1209 | .hsync_end = 480 + 2 + 41, |
| 1210 | .htotal = 480 + 2 + 41 + 2, |
| 1211 | .vdisplay = 272, |
| 1212 | .vsync_start = 272 + 2, |
Philipp Zabel | a483159 | 2017-10-11 14:59:56 +0200 | [diff] [blame] | 1213 | .vsync_end = 272 + 2 + 10, |
| 1214 | .vtotal = 272 + 2 + 10 + 2, |
Nicolas Ferre | 41bcceb | 2015-03-19 14:43:01 +0100 | [diff] [blame] | 1215 | .vrefresh = 60, |
| 1216 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 1217 | }; |
| 1218 | |
| 1219 | static const struct panel_desc innolux_at043tn24 = { |
| 1220 | .modes = &innolux_at043tn24_mode, |
| 1221 | .num_modes = 1, |
| 1222 | .bpc = 8, |
| 1223 | .size = { |
| 1224 | .width = 95, |
| 1225 | .height = 54, |
| 1226 | }, |
| 1227 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Philipp Zabel | 6560279 | 2017-10-11 14:59:57 +0200 | [diff] [blame] | 1228 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE, |
Nicolas Ferre | 41bcceb | 2015-03-19 14:43:01 +0100 | [diff] [blame] | 1229 | }; |
| 1230 | |
Riccardo Bortolato | 4fc24ab | 2016-04-20 15:37:15 +0200 | [diff] [blame] | 1231 | static const struct drm_display_mode innolux_at070tn92_mode = { |
| 1232 | .clock = 33333, |
| 1233 | .hdisplay = 800, |
| 1234 | .hsync_start = 800 + 210, |
| 1235 | .hsync_end = 800 + 210 + 20, |
| 1236 | .htotal = 800 + 210 + 20 + 46, |
| 1237 | .vdisplay = 480, |
| 1238 | .vsync_start = 480 + 22, |
| 1239 | .vsync_end = 480 + 22 + 10, |
| 1240 | .vtotal = 480 + 22 + 23 + 10, |
| 1241 | .vrefresh = 60, |
| 1242 | }; |
| 1243 | |
| 1244 | static const struct panel_desc innolux_at070tn92 = { |
| 1245 | .modes = &innolux_at070tn92_mode, |
| 1246 | .num_modes = 1, |
| 1247 | .size = { |
| 1248 | .width = 154, |
| 1249 | .height = 86, |
| 1250 | }, |
| 1251 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 1252 | }; |
| 1253 | |
Christoph Fritz | a5d2ade | 2018-06-04 13:16:48 +0200 | [diff] [blame] | 1254 | static const struct display_timing innolux_g070y2_l01_timing = { |
| 1255 | .pixelclock = { 28000000, 29500000, 32000000 }, |
| 1256 | .hactive = { 800, 800, 800 }, |
| 1257 | .hfront_porch = { 61, 91, 141 }, |
| 1258 | .hback_porch = { 60, 90, 140 }, |
| 1259 | .hsync_len = { 12, 12, 12 }, |
| 1260 | .vactive = { 480, 480, 480 }, |
| 1261 | .vfront_porch = { 4, 9, 30 }, |
| 1262 | .vback_porch = { 4, 8, 28 }, |
| 1263 | .vsync_len = { 2, 2, 2 }, |
| 1264 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 1265 | }; |
| 1266 | |
| 1267 | static const struct panel_desc innolux_g070y2_l01 = { |
| 1268 | .timings = &innolux_g070y2_l01_timing, |
| 1269 | .num_timings = 1, |
| 1270 | .bpc = 6, |
| 1271 | .size = { |
| 1272 | .width = 152, |
| 1273 | .height = 91, |
| 1274 | }, |
| 1275 | .delay = { |
| 1276 | .prepare = 10, |
| 1277 | .enable = 100, |
| 1278 | .disable = 100, |
| 1279 | .unprepare = 800, |
| 1280 | }, |
| 1281 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 1282 | }; |
| 1283 | |
Michael Olbrich | 1e29b84 | 2016-08-15 14:32:02 +0200 | [diff] [blame] | 1284 | static const struct display_timing innolux_g101ice_l01_timing = { |
| 1285 | .pixelclock = { 60400000, 71100000, 74700000 }, |
| 1286 | .hactive = { 1280, 1280, 1280 }, |
| 1287 | .hfront_porch = { 41, 80, 100 }, |
| 1288 | .hback_porch = { 40, 79, 99 }, |
| 1289 | .hsync_len = { 1, 1, 1 }, |
| 1290 | .vactive = { 800, 800, 800 }, |
| 1291 | .vfront_porch = { 5, 11, 14 }, |
| 1292 | .vback_porch = { 4, 11, 14 }, |
| 1293 | .vsync_len = { 1, 1, 1 }, |
| 1294 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 1295 | }; |
| 1296 | |
| 1297 | static const struct panel_desc innolux_g101ice_l01 = { |
| 1298 | .timings = &innolux_g101ice_l01_timing, |
| 1299 | .num_timings = 1, |
| 1300 | .bpc = 8, |
| 1301 | .size = { |
| 1302 | .width = 217, |
| 1303 | .height = 135, |
| 1304 | }, |
| 1305 | .delay = { |
| 1306 | .enable = 200, |
| 1307 | .disable = 200, |
| 1308 | }, |
| 1309 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 1310 | }; |
| 1311 | |
Lucas Stach | 4ae13e4 | 2016-11-30 14:09:54 +0100 | [diff] [blame] | 1312 | static const struct display_timing innolux_g121i1_l01_timing = { |
| 1313 | .pixelclock = { 67450000, 71000000, 74550000 }, |
| 1314 | .hactive = { 1280, 1280, 1280 }, |
| 1315 | .hfront_porch = { 40, 80, 160 }, |
| 1316 | .hback_porch = { 39, 79, 159 }, |
| 1317 | .hsync_len = { 1, 1, 1 }, |
| 1318 | .vactive = { 800, 800, 800 }, |
| 1319 | .vfront_porch = { 5, 11, 100 }, |
| 1320 | .vback_porch = { 4, 11, 99 }, |
| 1321 | .vsync_len = { 1, 1, 1 }, |
Lucas Stach | d731f66 | 2014-11-06 17:44:33 +0100 | [diff] [blame] | 1322 | }; |
| 1323 | |
| 1324 | static const struct panel_desc innolux_g121i1_l01 = { |
Lucas Stach | 4ae13e4 | 2016-11-30 14:09:54 +0100 | [diff] [blame] | 1325 | .timings = &innolux_g121i1_l01_timing, |
| 1326 | .num_timings = 1, |
Lucas Stach | d731f66 | 2014-11-06 17:44:33 +0100 | [diff] [blame] | 1327 | .bpc = 6, |
| 1328 | .size = { |
| 1329 | .width = 261, |
| 1330 | .height = 163, |
| 1331 | }, |
Lucas Stach | 4ae13e4 | 2016-11-30 14:09:54 +0100 | [diff] [blame] | 1332 | .delay = { |
| 1333 | .enable = 200, |
| 1334 | .disable = 20, |
| 1335 | }, |
| 1336 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
Lucas Stach | d731f66 | 2014-11-06 17:44:33 +0100 | [diff] [blame] | 1337 | }; |
| 1338 | |
Akshay Bhat | f8fa17b | 2015-11-18 15:57:47 -0500 | [diff] [blame] | 1339 | static const struct drm_display_mode innolux_g121x1_l03_mode = { |
| 1340 | .clock = 65000, |
| 1341 | .hdisplay = 1024, |
| 1342 | .hsync_start = 1024 + 0, |
| 1343 | .hsync_end = 1024 + 1, |
| 1344 | .htotal = 1024 + 0 + 1 + 320, |
| 1345 | .vdisplay = 768, |
| 1346 | .vsync_start = 768 + 38, |
| 1347 | .vsync_end = 768 + 38 + 1, |
| 1348 | .vtotal = 768 + 38 + 1 + 0, |
| 1349 | .vrefresh = 60, |
Akshay Bhat | 2e8c5eb | 2016-03-01 18:06:54 -0500 | [diff] [blame] | 1350 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
Akshay Bhat | f8fa17b | 2015-11-18 15:57:47 -0500 | [diff] [blame] | 1351 | }; |
| 1352 | |
| 1353 | static const struct panel_desc innolux_g121x1_l03 = { |
| 1354 | .modes = &innolux_g121x1_l03_mode, |
| 1355 | .num_modes = 1, |
| 1356 | .bpc = 6, |
| 1357 | .size = { |
| 1358 | .width = 246, |
| 1359 | .height = 185, |
| 1360 | }, |
| 1361 | .delay = { |
| 1362 | .enable = 200, |
| 1363 | .unprepare = 200, |
| 1364 | .disable = 400, |
| 1365 | }, |
| 1366 | }; |
| 1367 | |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 1368 | static const struct drm_display_mode innolux_n116bge_mode = { |
Daniel Kurtz | 7fe8c77 | 2014-09-02 10:56:46 +0800 | [diff] [blame] | 1369 | .clock = 76420, |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 1370 | .hdisplay = 1366, |
Daniel Kurtz | 7fe8c77 | 2014-09-02 10:56:46 +0800 | [diff] [blame] | 1371 | .hsync_start = 1366 + 136, |
| 1372 | .hsync_end = 1366 + 136 + 30, |
| 1373 | .htotal = 1366 + 136 + 30 + 60, |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 1374 | .vdisplay = 768, |
| 1375 | .vsync_start = 768 + 8, |
Daniel Kurtz | 7fe8c77 | 2014-09-02 10:56:46 +0800 | [diff] [blame] | 1376 | .vsync_end = 768 + 8 + 12, |
| 1377 | .vtotal = 768 + 8 + 12 + 12, |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 1378 | .vrefresh = 60, |
| 1379 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 1380 | }; |
| 1381 | |
| 1382 | static const struct panel_desc innolux_n116bge = { |
| 1383 | .modes = &innolux_n116bge_mode, |
| 1384 | .num_modes = 1, |
| 1385 | .bpc = 6, |
| 1386 | .size = { |
| 1387 | .width = 256, |
| 1388 | .height = 144, |
| 1389 | }, |
| 1390 | }; |
| 1391 | |
Alban Bedel | ea44739 | 2014-07-22 08:38:55 +0200 | [diff] [blame] | 1392 | static const struct drm_display_mode innolux_n156bge_l21_mode = { |
| 1393 | .clock = 69300, |
| 1394 | .hdisplay = 1366, |
| 1395 | .hsync_start = 1366 + 16, |
| 1396 | .hsync_end = 1366 + 16 + 34, |
| 1397 | .htotal = 1366 + 16 + 34 + 50, |
| 1398 | .vdisplay = 768, |
| 1399 | .vsync_start = 768 + 2, |
| 1400 | .vsync_end = 768 + 2 + 6, |
| 1401 | .vtotal = 768 + 2 + 6 + 12, |
| 1402 | .vrefresh = 60, |
| 1403 | }; |
| 1404 | |
| 1405 | static const struct panel_desc innolux_n156bge_l21 = { |
| 1406 | .modes = &innolux_n156bge_l21_mode, |
| 1407 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1408 | .bpc = 6, |
Alban Bedel | ea44739 | 2014-07-22 08:38:55 +0200 | [diff] [blame] | 1409 | .size = { |
| 1410 | .width = 344, |
| 1411 | .height = 193, |
| 1412 | }, |
| 1413 | }; |
| 1414 | |
spanda@codeaurora.org | da50bd4 | 2018-05-15 11:22:43 +0530 | [diff] [blame] | 1415 | static const struct drm_display_mode innolux_tv123wam_mode = { |
| 1416 | .clock = 206016, |
| 1417 | .hdisplay = 2160, |
| 1418 | .hsync_start = 2160 + 48, |
| 1419 | .hsync_end = 2160 + 48 + 32, |
| 1420 | .htotal = 2160 + 48 + 32 + 80, |
| 1421 | .vdisplay = 1440, |
| 1422 | .vsync_start = 1440 + 3, |
| 1423 | .vsync_end = 1440 + 3 + 10, |
| 1424 | .vtotal = 1440 + 3 + 10 + 27, |
| 1425 | .vrefresh = 60, |
| 1426 | .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, |
| 1427 | }; |
| 1428 | |
| 1429 | static const struct panel_desc innolux_tv123wam = { |
| 1430 | .modes = &innolux_tv123wam_mode, |
| 1431 | .num_modes = 1, |
| 1432 | .bpc = 8, |
| 1433 | .size = { |
| 1434 | .width = 259, |
| 1435 | .height = 173, |
| 1436 | }, |
Sean Paul | 22fd99e | 2018-08-13 17:30:40 -0400 | [diff] [blame] | 1437 | .delay = { |
| 1438 | .unprepare = 500, |
| 1439 | }, |
spanda@codeaurora.org | da50bd4 | 2018-05-15 11:22:43 +0530 | [diff] [blame] | 1440 | }; |
| 1441 | |
Michael Grzeschik | bccac3f | 2015-03-19 12:22:44 +0100 | [diff] [blame] | 1442 | static const struct drm_display_mode innolux_zj070na_01p_mode = { |
| 1443 | .clock = 51501, |
| 1444 | .hdisplay = 1024, |
| 1445 | .hsync_start = 1024 + 128, |
| 1446 | .hsync_end = 1024 + 128 + 64, |
| 1447 | .htotal = 1024 + 128 + 64 + 128, |
| 1448 | .vdisplay = 600, |
| 1449 | .vsync_start = 600 + 16, |
| 1450 | .vsync_end = 600 + 16 + 4, |
| 1451 | .vtotal = 600 + 16 + 4 + 16, |
| 1452 | .vrefresh = 60, |
| 1453 | }; |
| 1454 | |
| 1455 | static const struct panel_desc innolux_zj070na_01p = { |
| 1456 | .modes = &innolux_zj070na_01p_mode, |
| 1457 | .num_modes = 1, |
| 1458 | .bpc = 6, |
| 1459 | .size = { |
Thierry Reding | 8159884 | 2016-06-10 15:33:13 +0200 | [diff] [blame] | 1460 | .width = 154, |
| 1461 | .height = 90, |
Michael Grzeschik | bccac3f | 2015-03-19 12:22:44 +0100 | [diff] [blame] | 1462 | }, |
| 1463 | }; |
| 1464 | |
Jagan Teki | 8cfe834 | 2018-02-04 23:19:28 +0530 | [diff] [blame] | 1465 | static const struct display_timing koe_tx31d200vm0baa_timing = { |
| 1466 | .pixelclock = { 39600000, 43200000, 48000000 }, |
| 1467 | .hactive = { 1280, 1280, 1280 }, |
| 1468 | .hfront_porch = { 16, 36, 56 }, |
| 1469 | .hback_porch = { 16, 36, 56 }, |
| 1470 | .hsync_len = { 8, 8, 8 }, |
| 1471 | .vactive = { 480, 480, 480 }, |
Stefan Agner | c9b6be7 | 2018-04-19 23:20:03 +0200 | [diff] [blame] | 1472 | .vfront_porch = { 6, 21, 33 }, |
| 1473 | .vback_porch = { 6, 21, 33 }, |
Jagan Teki | 8cfe834 | 2018-02-04 23:19:28 +0530 | [diff] [blame] | 1474 | .vsync_len = { 8, 8, 8 }, |
| 1475 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 1476 | }; |
| 1477 | |
| 1478 | static const struct panel_desc koe_tx31d200vm0baa = { |
| 1479 | .timings = &koe_tx31d200vm0baa_timing, |
| 1480 | .num_timings = 1, |
| 1481 | .bpc = 6, |
| 1482 | .size = { |
| 1483 | .width = 292, |
| 1484 | .height = 109, |
| 1485 | }, |
| 1486 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
| 1487 | }; |
| 1488 | |
Lucas Stach | 8def22e | 2015-12-02 19:41:11 +0100 | [diff] [blame] | 1489 | static const struct display_timing kyo_tcg121xglp_timing = { |
| 1490 | .pixelclock = { 52000000, 65000000, 71000000 }, |
| 1491 | .hactive = { 1024, 1024, 1024 }, |
| 1492 | .hfront_porch = { 2, 2, 2 }, |
| 1493 | .hback_porch = { 2, 2, 2 }, |
| 1494 | .hsync_len = { 86, 124, 244 }, |
| 1495 | .vactive = { 768, 768, 768 }, |
| 1496 | .vfront_porch = { 2, 2, 2 }, |
| 1497 | .vback_porch = { 2, 2, 2 }, |
| 1498 | .vsync_len = { 6, 34, 73 }, |
| 1499 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 1500 | }; |
| 1501 | |
| 1502 | static const struct panel_desc kyo_tcg121xglp = { |
| 1503 | .timings = &kyo_tcg121xglp_timing, |
| 1504 | .num_timings = 1, |
| 1505 | .bpc = 8, |
| 1506 | .size = { |
| 1507 | .width = 246, |
| 1508 | .height = 184, |
| 1509 | }, |
| 1510 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 1511 | }; |
| 1512 | |
Heiko Schocher | dd01500 | 2015-05-22 10:25:57 +0200 | [diff] [blame] | 1513 | static const struct drm_display_mode lg_lb070wv8_mode = { |
| 1514 | .clock = 33246, |
| 1515 | .hdisplay = 800, |
| 1516 | .hsync_start = 800 + 88, |
| 1517 | .hsync_end = 800 + 88 + 80, |
| 1518 | .htotal = 800 + 88 + 80 + 88, |
| 1519 | .vdisplay = 480, |
| 1520 | .vsync_start = 480 + 10, |
| 1521 | .vsync_end = 480 + 10 + 25, |
| 1522 | .vtotal = 480 + 10 + 25 + 10, |
| 1523 | .vrefresh = 60, |
| 1524 | }; |
| 1525 | |
| 1526 | static const struct panel_desc lg_lb070wv8 = { |
| 1527 | .modes = &lg_lb070wv8_mode, |
| 1528 | .num_modes = 1, |
| 1529 | .bpc = 16, |
| 1530 | .size = { |
| 1531 | .width = 151, |
| 1532 | .height = 91, |
| 1533 | }, |
| 1534 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 1535 | }; |
| 1536 | |
Yakir Yang | c5ece40 | 2016-06-28 12:51:15 +0800 | [diff] [blame] | 1537 | static const struct drm_display_mode lg_lp079qx1_sp0v_mode = { |
| 1538 | .clock = 200000, |
| 1539 | .hdisplay = 1536, |
| 1540 | .hsync_start = 1536 + 12, |
| 1541 | .hsync_end = 1536 + 12 + 16, |
| 1542 | .htotal = 1536 + 12 + 16 + 48, |
| 1543 | .vdisplay = 2048, |
| 1544 | .vsync_start = 2048 + 8, |
| 1545 | .vsync_end = 2048 + 8 + 4, |
| 1546 | .vtotal = 2048 + 8 + 4 + 8, |
| 1547 | .vrefresh = 60, |
| 1548 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 1549 | }; |
| 1550 | |
| 1551 | static const struct panel_desc lg_lp079qx1_sp0v = { |
| 1552 | .modes = &lg_lp079qx1_sp0v_mode, |
| 1553 | .num_modes = 1, |
| 1554 | .size = { |
| 1555 | .width = 129, |
| 1556 | .height = 171, |
| 1557 | }, |
| 1558 | }; |
| 1559 | |
Yakir Yang | 0355dde | 2016-06-12 10:56:02 +0800 | [diff] [blame] | 1560 | static const struct drm_display_mode lg_lp097qx1_spa1_mode = { |
| 1561 | .clock = 205210, |
| 1562 | .hdisplay = 2048, |
| 1563 | .hsync_start = 2048 + 150, |
| 1564 | .hsync_end = 2048 + 150 + 5, |
| 1565 | .htotal = 2048 + 150 + 5 + 5, |
| 1566 | .vdisplay = 1536, |
| 1567 | .vsync_start = 1536 + 3, |
| 1568 | .vsync_end = 1536 + 3 + 1, |
| 1569 | .vtotal = 1536 + 3 + 1 + 9, |
| 1570 | .vrefresh = 60, |
| 1571 | }; |
| 1572 | |
| 1573 | static const struct panel_desc lg_lp097qx1_spa1 = { |
| 1574 | .modes = &lg_lp097qx1_spa1_mode, |
| 1575 | .num_modes = 1, |
| 1576 | .size = { |
| 1577 | .width = 208, |
| 1578 | .height = 147, |
| 1579 | }, |
| 1580 | }; |
| 1581 | |
Jitao Shi | 690d8fa | 2016-02-22 19:01:44 +0800 | [diff] [blame] | 1582 | static const struct drm_display_mode lg_lp120up1_mode = { |
| 1583 | .clock = 162300, |
| 1584 | .hdisplay = 1920, |
| 1585 | .hsync_start = 1920 + 40, |
| 1586 | .hsync_end = 1920 + 40 + 40, |
| 1587 | .htotal = 1920 + 40 + 40+ 80, |
| 1588 | .vdisplay = 1280, |
| 1589 | .vsync_start = 1280 + 4, |
| 1590 | .vsync_end = 1280 + 4 + 4, |
| 1591 | .vtotal = 1280 + 4 + 4 + 12, |
| 1592 | .vrefresh = 60, |
| 1593 | }; |
| 1594 | |
| 1595 | static const struct panel_desc lg_lp120up1 = { |
| 1596 | .modes = &lg_lp120up1_mode, |
| 1597 | .num_modes = 1, |
| 1598 | .bpc = 8, |
| 1599 | .size = { |
| 1600 | .width = 267, |
| 1601 | .height = 183, |
| 1602 | }, |
| 1603 | }; |
| 1604 | |
Thierry Reding | ec7c565 | 2013-11-15 15:59:32 +0100 | [diff] [blame] | 1605 | static const struct drm_display_mode lg_lp129qe_mode = { |
| 1606 | .clock = 285250, |
| 1607 | .hdisplay = 2560, |
| 1608 | .hsync_start = 2560 + 48, |
| 1609 | .hsync_end = 2560 + 48 + 32, |
| 1610 | .htotal = 2560 + 48 + 32 + 80, |
| 1611 | .vdisplay = 1700, |
| 1612 | .vsync_start = 1700 + 3, |
| 1613 | .vsync_end = 1700 + 3 + 10, |
| 1614 | .vtotal = 1700 + 3 + 10 + 36, |
| 1615 | .vrefresh = 60, |
| 1616 | }; |
| 1617 | |
| 1618 | static const struct panel_desc lg_lp129qe = { |
| 1619 | .modes = &lg_lp129qe_mode, |
| 1620 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1621 | .bpc = 8, |
Thierry Reding | ec7c565 | 2013-11-15 15:59:32 +0100 | [diff] [blame] | 1622 | .size = { |
| 1623 | .width = 272, |
| 1624 | .height = 181, |
| 1625 | }, |
| 1626 | }; |
| 1627 | |
Lukasz Majewski | 65c766c | 2017-10-21 00:18:37 +0200 | [diff] [blame] | 1628 | static const struct drm_display_mode mitsubishi_aa070mc01_mode = { |
| 1629 | .clock = 30400, |
| 1630 | .hdisplay = 800, |
| 1631 | .hsync_start = 800 + 0, |
| 1632 | .hsync_end = 800 + 1, |
| 1633 | .htotal = 800 + 0 + 1 + 160, |
| 1634 | .vdisplay = 480, |
| 1635 | .vsync_start = 480 + 0, |
| 1636 | .vsync_end = 480 + 48 + 1, |
| 1637 | .vtotal = 480 + 48 + 1 + 0, |
| 1638 | .vrefresh = 60, |
| 1639 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 1640 | }; |
| 1641 | |
| 1642 | static const struct panel_desc mitsubishi_aa070mc01 = { |
| 1643 | .modes = &mitsubishi_aa070mc01_mode, |
| 1644 | .num_modes = 1, |
| 1645 | .bpc = 8, |
| 1646 | .size = { |
| 1647 | .width = 152, |
| 1648 | .height = 91, |
| 1649 | }, |
| 1650 | |
| 1651 | .delay = { |
| 1652 | .enable = 200, |
| 1653 | .unprepare = 200, |
| 1654 | .disable = 400, |
| 1655 | }, |
| 1656 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 1657 | .bus_flags = DRM_BUS_FLAG_DE_HIGH, |
| 1658 | }; |
| 1659 | |
Lucas Stach | 01bacc13 | 2017-06-08 20:07:55 +0200 | [diff] [blame] | 1660 | static const struct display_timing nec_nl12880bc20_05_timing = { |
| 1661 | .pixelclock = { 67000000, 71000000, 75000000 }, |
| 1662 | .hactive = { 1280, 1280, 1280 }, |
| 1663 | .hfront_porch = { 2, 30, 30 }, |
| 1664 | .hback_porch = { 6, 100, 100 }, |
| 1665 | .hsync_len = { 2, 30, 30 }, |
| 1666 | .vactive = { 800, 800, 800 }, |
| 1667 | .vfront_porch = { 5, 5, 5 }, |
| 1668 | .vback_porch = { 11, 11, 11 }, |
| 1669 | .vsync_len = { 7, 7, 7 }, |
| 1670 | }; |
| 1671 | |
| 1672 | static const struct panel_desc nec_nl12880bc20_05 = { |
| 1673 | .timings = &nec_nl12880bc20_05_timing, |
| 1674 | .num_timings = 1, |
| 1675 | .bpc = 8, |
| 1676 | .size = { |
| 1677 | .width = 261, |
| 1678 | .height = 163, |
| 1679 | }, |
| 1680 | .delay = { |
| 1681 | .enable = 50, |
| 1682 | .disable = 50, |
| 1683 | }, |
| 1684 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 1685 | }; |
| 1686 | |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 1687 | static const struct drm_display_mode nec_nl4827hc19_05b_mode = { |
| 1688 | .clock = 10870, |
| 1689 | .hdisplay = 480, |
| 1690 | .hsync_start = 480 + 2, |
| 1691 | .hsync_end = 480 + 2 + 41, |
| 1692 | .htotal = 480 + 2 + 41 + 2, |
| 1693 | .vdisplay = 272, |
| 1694 | .vsync_start = 272 + 2, |
| 1695 | .vsync_end = 272 + 2 + 4, |
| 1696 | .vtotal = 272 + 2 + 4 + 2, |
| 1697 | .vrefresh = 74, |
Stefan Agner | 4bc390c | 2015-11-17 19:10:29 -0800 | [diff] [blame] | 1698 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 1699 | }; |
| 1700 | |
| 1701 | static const struct panel_desc nec_nl4827hc19_05b = { |
| 1702 | .modes = &nec_nl4827hc19_05b_mode, |
| 1703 | .num_modes = 1, |
| 1704 | .bpc = 8, |
| 1705 | .size = { |
| 1706 | .width = 95, |
| 1707 | .height = 54, |
| 1708 | }, |
Stefan Agner | 2c80661 | 2016-02-08 12:50:13 -0800 | [diff] [blame] | 1709 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 1710 | .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE, |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 1711 | }; |
| 1712 | |
Maxime Ripard | e6c2f06 | 2016-09-06 16:46:17 +0200 | [diff] [blame] | 1713 | static const struct drm_display_mode netron_dy_e231732_mode = { |
| 1714 | .clock = 66000, |
| 1715 | .hdisplay = 1024, |
| 1716 | .hsync_start = 1024 + 160, |
| 1717 | .hsync_end = 1024 + 160 + 70, |
| 1718 | .htotal = 1024 + 160 + 70 + 90, |
| 1719 | .vdisplay = 600, |
| 1720 | .vsync_start = 600 + 127, |
| 1721 | .vsync_end = 600 + 127 + 20, |
| 1722 | .vtotal = 600 + 127 + 20 + 3, |
| 1723 | .vrefresh = 60, |
| 1724 | }; |
| 1725 | |
| 1726 | static const struct panel_desc netron_dy_e231732 = { |
| 1727 | .modes = &netron_dy_e231732_mode, |
| 1728 | .num_modes = 1, |
| 1729 | .size = { |
| 1730 | .width = 154, |
| 1731 | .height = 87, |
| 1732 | }, |
| 1733 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 1734 | }; |
| 1735 | |
Tomi Valkeinen | 3b39ad7 | 2018-06-18 16:22:40 +0300 | [diff] [blame] | 1736 | static const struct drm_display_mode newhaven_nhd_43_480272ef_atxl_mode = { |
| 1737 | .clock = 9000, |
| 1738 | .hdisplay = 480, |
| 1739 | .hsync_start = 480 + 2, |
| 1740 | .hsync_end = 480 + 2 + 41, |
| 1741 | .htotal = 480 + 2 + 41 + 2, |
| 1742 | .vdisplay = 272, |
| 1743 | .vsync_start = 272 + 2, |
| 1744 | .vsync_end = 272 + 2 + 10, |
| 1745 | .vtotal = 272 + 2 + 10 + 2, |
| 1746 | .vrefresh = 60, |
| 1747 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 1748 | }; |
| 1749 | |
| 1750 | static const struct panel_desc newhaven_nhd_43_480272ef_atxl = { |
| 1751 | .modes = &newhaven_nhd_43_480272ef_atxl_mode, |
| 1752 | .num_modes = 1, |
| 1753 | .bpc = 8, |
| 1754 | .size = { |
| 1755 | .width = 95, |
| 1756 | .height = 54, |
| 1757 | }, |
| 1758 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 1759 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE | |
| 1760 | DRM_BUS_FLAG_SYNC_POSEDGE, |
| 1761 | }; |
| 1762 | |
Lucas Stach | 4177fa6 | 2017-06-08 20:07:57 +0200 | [diff] [blame] | 1763 | static const struct display_timing nlt_nl192108ac18_02d_timing = { |
| 1764 | .pixelclock = { 130000000, 148350000, 163000000 }, |
| 1765 | .hactive = { 1920, 1920, 1920 }, |
| 1766 | .hfront_porch = { 80, 100, 100 }, |
| 1767 | .hback_porch = { 100, 120, 120 }, |
| 1768 | .hsync_len = { 50, 60, 60 }, |
| 1769 | .vactive = { 1080, 1080, 1080 }, |
| 1770 | .vfront_porch = { 12, 30, 30 }, |
| 1771 | .vback_porch = { 4, 10, 10 }, |
| 1772 | .vsync_len = { 4, 5, 5 }, |
| 1773 | }; |
| 1774 | |
| 1775 | static const struct panel_desc nlt_nl192108ac18_02d = { |
| 1776 | .timings = &nlt_nl192108ac18_02d_timing, |
| 1777 | .num_timings = 1, |
| 1778 | .bpc = 8, |
| 1779 | .size = { |
| 1780 | .width = 344, |
| 1781 | .height = 194, |
| 1782 | }, |
| 1783 | .delay = { |
| 1784 | .unprepare = 500, |
| 1785 | }, |
| 1786 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 1787 | }; |
| 1788 | |
Fabien Lahoudere | 05ec0e4 | 2016-10-17 11:38:01 +0200 | [diff] [blame] | 1789 | static const struct drm_display_mode nvd_9128_mode = { |
| 1790 | .clock = 29500, |
| 1791 | .hdisplay = 800, |
| 1792 | .hsync_start = 800 + 130, |
| 1793 | .hsync_end = 800 + 130 + 98, |
| 1794 | .htotal = 800 + 0 + 130 + 98, |
| 1795 | .vdisplay = 480, |
| 1796 | .vsync_start = 480 + 10, |
| 1797 | .vsync_end = 480 + 10 + 50, |
| 1798 | .vtotal = 480 + 0 + 10 + 50, |
| 1799 | }; |
| 1800 | |
| 1801 | static const struct panel_desc nvd_9128 = { |
| 1802 | .modes = &nvd_9128_mode, |
| 1803 | .num_modes = 1, |
| 1804 | .bpc = 8, |
| 1805 | .size = { |
| 1806 | .width = 156, |
| 1807 | .height = 88, |
| 1808 | }, |
| 1809 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 1810 | }; |
| 1811 | |
Gary Bisson | a99fb62 | 2015-06-10 18:44:23 +0200 | [diff] [blame] | 1812 | static const struct display_timing okaya_rs800480t_7x0gp_timing = { |
| 1813 | .pixelclock = { 30000000, 30000000, 40000000 }, |
| 1814 | .hactive = { 800, 800, 800 }, |
| 1815 | .hfront_porch = { 40, 40, 40 }, |
| 1816 | .hback_porch = { 40, 40, 40 }, |
| 1817 | .hsync_len = { 1, 48, 48 }, |
| 1818 | .vactive = { 480, 480, 480 }, |
| 1819 | .vfront_porch = { 13, 13, 13 }, |
| 1820 | .vback_porch = { 29, 29, 29 }, |
| 1821 | .vsync_len = { 3, 3, 3 }, |
| 1822 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 1823 | }; |
| 1824 | |
| 1825 | static const struct panel_desc okaya_rs800480t_7x0gp = { |
| 1826 | .timings = &okaya_rs800480t_7x0gp_timing, |
| 1827 | .num_timings = 1, |
| 1828 | .bpc = 6, |
| 1829 | .size = { |
| 1830 | .width = 154, |
| 1831 | .height = 87, |
| 1832 | }, |
| 1833 | .delay = { |
| 1834 | .prepare = 41, |
| 1835 | .enable = 50, |
| 1836 | .unprepare = 41, |
| 1837 | .disable = 50, |
| 1838 | }, |
| 1839 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 1840 | }; |
| 1841 | |
Maxime Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 1842 | static const struct drm_display_mode olimex_lcd_olinuxino_43ts_mode = { |
| 1843 | .clock = 9000, |
| 1844 | .hdisplay = 480, |
| 1845 | .hsync_start = 480 + 5, |
| 1846 | .hsync_end = 480 + 5 + 30, |
| 1847 | .htotal = 480 + 5 + 30 + 10, |
| 1848 | .vdisplay = 272, |
| 1849 | .vsync_start = 272 + 8, |
| 1850 | .vsync_end = 272 + 8 + 5, |
| 1851 | .vtotal = 272 + 8 + 5 + 3, |
| 1852 | .vrefresh = 60, |
| 1853 | }; |
| 1854 | |
| 1855 | static const struct panel_desc olimex_lcd_olinuxino_43ts = { |
| 1856 | .modes = &olimex_lcd_olinuxino_43ts_mode, |
| 1857 | .num_modes = 1, |
| 1858 | .size = { |
Jonathan Liu | 30c6d7ab9 | 2017-07-20 20:29:43 +1000 | [diff] [blame] | 1859 | .width = 95, |
| 1860 | .height = 54, |
Maxime Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 1861 | }, |
Jonathan Liu | 5c2a7c6 | 2016-09-11 20:46:55 +1000 | [diff] [blame] | 1862 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Maxime Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 1863 | }; |
| 1864 | |
Eric Anholt | e8b6f56 | 2016-03-24 17:23:48 -0700 | [diff] [blame] | 1865 | /* |
| 1866 | * 800x480 CVT. The panel appears to be quite accepting, at least as far as |
| 1867 | * pixel clocks, but this is the timing that was being used in the Adafruit |
| 1868 | * installation instructions. |
| 1869 | */ |
| 1870 | static const struct drm_display_mode ontat_yx700wv03_mode = { |
| 1871 | .clock = 29500, |
| 1872 | .hdisplay = 800, |
| 1873 | .hsync_start = 824, |
| 1874 | .hsync_end = 896, |
| 1875 | .htotal = 992, |
| 1876 | .vdisplay = 480, |
| 1877 | .vsync_start = 483, |
| 1878 | .vsync_end = 493, |
| 1879 | .vtotal = 500, |
| 1880 | .vrefresh = 60, |
| 1881 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 1882 | }; |
| 1883 | |
| 1884 | /* |
| 1885 | * Specification at: |
| 1886 | * https://www.adafruit.com/images/product-files/2406/c3163.pdf |
| 1887 | */ |
| 1888 | static const struct panel_desc ontat_yx700wv03 = { |
| 1889 | .modes = &ontat_yx700wv03_mode, |
| 1890 | .num_modes = 1, |
| 1891 | .bpc = 8, |
| 1892 | .size = { |
| 1893 | .width = 154, |
| 1894 | .height = 83, |
| 1895 | }, |
Eric Anholt | 5651e5e | 2018-03-09 15:33:32 -0800 | [diff] [blame] | 1896 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
Eric Anholt | e8b6f56 | 2016-03-24 17:23:48 -0700 | [diff] [blame] | 1897 | }; |
| 1898 | |
Philipp Zabel | 725c9d4 | 2015-02-11 18:50:11 +0100 | [diff] [blame] | 1899 | static const struct drm_display_mode ortustech_com43h4m85ulc_mode = { |
| 1900 | .clock = 25000, |
| 1901 | .hdisplay = 480, |
| 1902 | .hsync_start = 480 + 10, |
| 1903 | .hsync_end = 480 + 10 + 10, |
| 1904 | .htotal = 480 + 10 + 10 + 15, |
| 1905 | .vdisplay = 800, |
| 1906 | .vsync_start = 800 + 3, |
| 1907 | .vsync_end = 800 + 3 + 3, |
| 1908 | .vtotal = 800 + 3 + 3 + 3, |
| 1909 | .vrefresh = 60, |
| 1910 | }; |
| 1911 | |
| 1912 | static const struct panel_desc ortustech_com43h4m85ulc = { |
| 1913 | .modes = &ortustech_com43h4m85ulc_mode, |
| 1914 | .num_modes = 1, |
| 1915 | .bpc = 8, |
| 1916 | .size = { |
| 1917 | .width = 56, |
| 1918 | .height = 93, |
| 1919 | }, |
| 1920 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Marek Vasut | e0932f9 | 2016-08-26 18:26:00 +0200 | [diff] [blame] | 1921 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE, |
Philipp Zabel | 725c9d4 | 2015-02-11 18:50:11 +0100 | [diff] [blame] | 1922 | }; |
| 1923 | |
Josh Wu | d2a6f0f | 2015-10-08 17:42:41 +0200 | [diff] [blame] | 1924 | static const struct drm_display_mode qd43003c0_40_mode = { |
| 1925 | .clock = 9000, |
| 1926 | .hdisplay = 480, |
| 1927 | .hsync_start = 480 + 8, |
| 1928 | .hsync_end = 480 + 8 + 4, |
| 1929 | .htotal = 480 + 8 + 4 + 39, |
| 1930 | .vdisplay = 272, |
| 1931 | .vsync_start = 272 + 4, |
| 1932 | .vsync_end = 272 + 4 + 10, |
| 1933 | .vtotal = 272 + 4 + 10 + 2, |
| 1934 | .vrefresh = 60, |
| 1935 | }; |
| 1936 | |
| 1937 | static const struct panel_desc qd43003c0_40 = { |
| 1938 | .modes = &qd43003c0_40_mode, |
| 1939 | .num_modes = 1, |
| 1940 | .bpc = 8, |
| 1941 | .size = { |
| 1942 | .width = 95, |
| 1943 | .height = 53, |
| 1944 | }, |
| 1945 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 1946 | }; |
| 1947 | |
Jagan Teki | 23167fa | 2018-06-07 19:16:48 +0530 | [diff] [blame] | 1948 | static const struct display_timing rocktech_rk070er9427_timing = { |
| 1949 | .pixelclock = { 26400000, 33300000, 46800000 }, |
| 1950 | .hactive = { 800, 800, 800 }, |
| 1951 | .hfront_porch = { 16, 210, 354 }, |
| 1952 | .hback_porch = { 46, 46, 46 }, |
| 1953 | .hsync_len = { 1, 1, 1 }, |
| 1954 | .vactive = { 480, 480, 480 }, |
| 1955 | .vfront_porch = { 7, 22, 147 }, |
| 1956 | .vback_porch = { 23, 23, 23 }, |
| 1957 | .vsync_len = { 1, 1, 1 }, |
| 1958 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 1959 | }; |
| 1960 | |
| 1961 | static const struct panel_desc rocktech_rk070er9427 = { |
| 1962 | .timings = &rocktech_rk070er9427_timing, |
| 1963 | .num_timings = 1, |
| 1964 | .bpc = 6, |
| 1965 | .size = { |
| 1966 | .width = 154, |
| 1967 | .height = 86, |
| 1968 | }, |
| 1969 | .delay = { |
| 1970 | .prepare = 41, |
| 1971 | .enable = 50, |
| 1972 | .unprepare = 41, |
| 1973 | .disable = 50, |
| 1974 | }, |
| 1975 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 1976 | }; |
| 1977 | |
Yakir Yang | 0330eaf | 2016-06-12 10:56:13 +0800 | [diff] [blame] | 1978 | static const struct drm_display_mode samsung_lsn122dl01_c01_mode = { |
| 1979 | .clock = 271560, |
| 1980 | .hdisplay = 2560, |
| 1981 | .hsync_start = 2560 + 48, |
| 1982 | .hsync_end = 2560 + 48 + 32, |
| 1983 | .htotal = 2560 + 48 + 32 + 80, |
| 1984 | .vdisplay = 1600, |
| 1985 | .vsync_start = 1600 + 2, |
| 1986 | .vsync_end = 1600 + 2 + 5, |
| 1987 | .vtotal = 1600 + 2 + 5 + 57, |
| 1988 | .vrefresh = 60, |
| 1989 | }; |
| 1990 | |
| 1991 | static const struct panel_desc samsung_lsn122dl01_c01 = { |
| 1992 | .modes = &samsung_lsn122dl01_c01_mode, |
| 1993 | .num_modes = 1, |
| 1994 | .size = { |
| 1995 | .width = 263, |
| 1996 | .height = 164, |
| 1997 | }, |
| 1998 | }; |
| 1999 | |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 2000 | static const struct drm_display_mode samsung_ltn101nt05_mode = { |
| 2001 | .clock = 54030, |
| 2002 | .hdisplay = 1024, |
| 2003 | .hsync_start = 1024 + 24, |
| 2004 | .hsync_end = 1024 + 24 + 136, |
| 2005 | .htotal = 1024 + 24 + 136 + 160, |
| 2006 | .vdisplay = 600, |
| 2007 | .vsync_start = 600 + 3, |
| 2008 | .vsync_end = 600 + 3 + 6, |
| 2009 | .vtotal = 600 + 3 + 6 + 61, |
| 2010 | .vrefresh = 60, |
| 2011 | }; |
| 2012 | |
| 2013 | static const struct panel_desc samsung_ltn101nt05 = { |
| 2014 | .modes = &samsung_ltn101nt05_mode, |
| 2015 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 2016 | .bpc = 6, |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 2017 | .size = { |
Thierry Reding | 8159884 | 2016-06-10 15:33:13 +0200 | [diff] [blame] | 2018 | .width = 223, |
| 2019 | .height = 125, |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 2020 | }, |
| 2021 | }; |
| 2022 | |
Stéphane Marchesin | 0c93430 | 2015-03-18 10:52:18 +0100 | [diff] [blame] | 2023 | static const struct drm_display_mode samsung_ltn140at29_301_mode = { |
| 2024 | .clock = 76300, |
| 2025 | .hdisplay = 1366, |
| 2026 | .hsync_start = 1366 + 64, |
| 2027 | .hsync_end = 1366 + 64 + 48, |
| 2028 | .htotal = 1366 + 64 + 48 + 128, |
| 2029 | .vdisplay = 768, |
| 2030 | .vsync_start = 768 + 2, |
| 2031 | .vsync_end = 768 + 2 + 5, |
| 2032 | .vtotal = 768 + 2 + 5 + 17, |
| 2033 | .vrefresh = 60, |
| 2034 | }; |
| 2035 | |
| 2036 | static const struct panel_desc samsung_ltn140at29_301 = { |
| 2037 | .modes = &samsung_ltn140at29_301_mode, |
| 2038 | .num_modes = 1, |
| 2039 | .bpc = 6, |
| 2040 | .size = { |
| 2041 | .width = 320, |
| 2042 | .height = 187, |
| 2043 | }, |
| 2044 | }; |
| 2045 | |
Vladimir Zapolskiy | 03e3ec9 | 2018-07-06 21:51:01 +0300 | [diff] [blame] | 2046 | static const struct drm_display_mode sharp_lq035q7db03_mode = { |
| 2047 | .clock = 5500, |
| 2048 | .hdisplay = 240, |
| 2049 | .hsync_start = 240 + 16, |
| 2050 | .hsync_end = 240 + 16 + 7, |
| 2051 | .htotal = 240 + 16 + 7 + 5, |
| 2052 | .vdisplay = 320, |
| 2053 | .vsync_start = 320 + 9, |
| 2054 | .vsync_end = 320 + 9 + 1, |
| 2055 | .vtotal = 320 + 9 + 1 + 7, |
| 2056 | .vrefresh = 60, |
| 2057 | }; |
| 2058 | |
| 2059 | static const struct panel_desc sharp_lq035q7db03 = { |
| 2060 | .modes = &sharp_lq035q7db03_mode, |
| 2061 | .num_modes = 1, |
| 2062 | .bpc = 6, |
| 2063 | .size = { |
| 2064 | .width = 54, |
| 2065 | .height = 72, |
| 2066 | }, |
| 2067 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 2068 | }; |
| 2069 | |
Joshua Clayton | 592aa02 | 2016-07-06 15:59:16 -0700 | [diff] [blame] | 2070 | static const struct display_timing sharp_lq101k1ly04_timing = { |
| 2071 | .pixelclock = { 60000000, 65000000, 80000000 }, |
| 2072 | .hactive = { 1280, 1280, 1280 }, |
| 2073 | .hfront_porch = { 20, 20, 20 }, |
| 2074 | .hback_porch = { 20, 20, 20 }, |
| 2075 | .hsync_len = { 10, 10, 10 }, |
| 2076 | .vactive = { 800, 800, 800 }, |
| 2077 | .vfront_porch = { 4, 4, 4 }, |
| 2078 | .vback_porch = { 4, 4, 4 }, |
| 2079 | .vsync_len = { 4, 4, 4 }, |
| 2080 | .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE, |
| 2081 | }; |
| 2082 | |
| 2083 | static const struct panel_desc sharp_lq101k1ly04 = { |
| 2084 | .timings = &sharp_lq101k1ly04_timing, |
| 2085 | .num_timings = 1, |
| 2086 | .bpc = 8, |
| 2087 | .size = { |
| 2088 | .width = 217, |
| 2089 | .height = 136, |
| 2090 | }, |
| 2091 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, |
| 2092 | }; |
| 2093 | |
Sean Paul | 9f7bae2 | 2018-02-08 12:48:52 -0500 | [diff] [blame] | 2094 | static const struct display_timing sharp_lq123p1jx31_timing = { |
| 2095 | .pixelclock = { 252750000, 252750000, 266604720 }, |
| 2096 | .hactive = { 2400, 2400, 2400 }, |
| 2097 | .hfront_porch = { 48, 48, 48 }, |
| 2098 | .hback_porch = { 80, 80, 84 }, |
| 2099 | .hsync_len = { 32, 32, 32 }, |
| 2100 | .vactive = { 1600, 1600, 1600 }, |
| 2101 | .vfront_porch = { 3, 3, 3 }, |
| 2102 | .vback_porch = { 33, 33, 120 }, |
| 2103 | .vsync_len = { 10, 10, 10 }, |
| 2104 | .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW, |
Yakir Yang | 739c7de | 2016-06-12 10:56:35 +0800 | [diff] [blame] | 2105 | }; |
| 2106 | |
| 2107 | static const struct panel_desc sharp_lq123p1jx31 = { |
Sean Paul | 9f7bae2 | 2018-02-08 12:48:52 -0500 | [diff] [blame] | 2108 | .timings = &sharp_lq123p1jx31_timing, |
| 2109 | .num_timings = 1, |
zain wang | 5466a63 | 2016-11-19 10:27:16 +0800 | [diff] [blame] | 2110 | .bpc = 8, |
Yakir Yang | 739c7de | 2016-06-12 10:56:35 +0800 | [diff] [blame] | 2111 | .size = { |
| 2112 | .width = 259, |
| 2113 | .height = 173, |
| 2114 | }, |
Yakir Yang | a42f6e3 | 2016-07-21 21:14:34 +0800 | [diff] [blame] | 2115 | .delay = { |
| 2116 | .prepare = 110, |
| 2117 | .enable = 50, |
| 2118 | .unprepare = 550, |
| 2119 | }, |
Yakir Yang | 739c7de | 2016-06-12 10:56:35 +0800 | [diff] [blame] | 2120 | }; |
| 2121 | |
Gustaf Lindström | 0f9cdd7 | 2016-10-04 17:29:21 +0200 | [diff] [blame] | 2122 | static const struct drm_display_mode sharp_lq150x1lg11_mode = { |
| 2123 | .clock = 71100, |
| 2124 | .hdisplay = 1024, |
| 2125 | .hsync_start = 1024 + 168, |
| 2126 | .hsync_end = 1024 + 168 + 64, |
| 2127 | .htotal = 1024 + 168 + 64 + 88, |
| 2128 | .vdisplay = 768, |
| 2129 | .vsync_start = 768 + 37, |
| 2130 | .vsync_end = 768 + 37 + 2, |
| 2131 | .vtotal = 768 + 37 + 2 + 8, |
| 2132 | .vrefresh = 60, |
| 2133 | }; |
| 2134 | |
| 2135 | static const struct panel_desc sharp_lq150x1lg11 = { |
| 2136 | .modes = &sharp_lq150x1lg11_mode, |
| 2137 | .num_modes = 1, |
| 2138 | .bpc = 6, |
| 2139 | .size = { |
| 2140 | .width = 304, |
| 2141 | .height = 228, |
| 2142 | }, |
| 2143 | .bus_format = MEDIA_BUS_FMT_RGB565_1X16, |
| 2144 | }; |
| 2145 | |
Boris BREZILLON | 9c6615b | 2015-03-19 14:43:00 +0100 | [diff] [blame] | 2146 | static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = { |
| 2147 | .clock = 33300, |
| 2148 | .hdisplay = 800, |
| 2149 | .hsync_start = 800 + 1, |
| 2150 | .hsync_end = 800 + 1 + 64, |
| 2151 | .htotal = 800 + 1 + 64 + 64, |
| 2152 | .vdisplay = 480, |
| 2153 | .vsync_start = 480 + 1, |
| 2154 | .vsync_end = 480 + 1 + 23, |
| 2155 | .vtotal = 480 + 1 + 23 + 22, |
| 2156 | .vrefresh = 60, |
| 2157 | }; |
| 2158 | |
| 2159 | static const struct panel_desc shelly_sca07010_bfn_lnn = { |
| 2160 | .modes = &shelly_sca07010_bfn_lnn_mode, |
| 2161 | .num_modes = 1, |
| 2162 | .size = { |
| 2163 | .width = 152, |
| 2164 | .height = 91, |
| 2165 | }, |
| 2166 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 2167 | }; |
| 2168 | |
Douglas Anderson | 9bb34c4 | 2016-06-10 10:02:07 -0700 | [diff] [blame] | 2169 | static const struct drm_display_mode starry_kr122ea0sra_mode = { |
| 2170 | .clock = 147000, |
| 2171 | .hdisplay = 1920, |
| 2172 | .hsync_start = 1920 + 16, |
| 2173 | .hsync_end = 1920 + 16 + 16, |
| 2174 | .htotal = 1920 + 16 + 16 + 32, |
| 2175 | .vdisplay = 1200, |
| 2176 | .vsync_start = 1200 + 15, |
| 2177 | .vsync_end = 1200 + 15 + 2, |
| 2178 | .vtotal = 1200 + 15 + 2 + 18, |
| 2179 | .vrefresh = 60, |
| 2180 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 2181 | }; |
| 2182 | |
| 2183 | static const struct panel_desc starry_kr122ea0sra = { |
| 2184 | .modes = &starry_kr122ea0sra_mode, |
| 2185 | .num_modes = 1, |
| 2186 | .size = { |
| 2187 | .width = 263, |
| 2188 | .height = 164, |
| 2189 | }, |
Brian Norris | c46b924 | 2016-08-26 14:32:14 -0700 | [diff] [blame] | 2190 | .delay = { |
| 2191 | .prepare = 10 + 200, |
| 2192 | .enable = 50, |
| 2193 | .unprepare = 10 + 500, |
| 2194 | }, |
Douglas Anderson | 9bb34c4 | 2016-06-10 10:02:07 -0700 | [diff] [blame] | 2195 | }; |
| 2196 | |
Gary Bisson | adb973e | 2016-12-02 09:52:08 +0100 | [diff] [blame] | 2197 | static const struct display_timing tianma_tm070jdhg30_timing = { |
| 2198 | .pixelclock = { 62600000, 68200000, 78100000 }, |
| 2199 | .hactive = { 1280, 1280, 1280 }, |
| 2200 | .hfront_porch = { 15, 64, 159 }, |
| 2201 | .hback_porch = { 5, 5, 5 }, |
| 2202 | .hsync_len = { 1, 1, 256 }, |
| 2203 | .vactive = { 800, 800, 800 }, |
| 2204 | .vfront_porch = { 3, 40, 99 }, |
| 2205 | .vback_porch = { 2, 2, 2 }, |
| 2206 | .vsync_len = { 1, 1, 128 }, |
| 2207 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 2208 | }; |
| 2209 | |
| 2210 | static const struct panel_desc tianma_tm070jdhg30 = { |
| 2211 | .timings = &tianma_tm070jdhg30_timing, |
| 2212 | .num_timings = 1, |
| 2213 | .bpc = 8, |
| 2214 | .size = { |
| 2215 | .width = 151, |
| 2216 | .height = 95, |
| 2217 | }, |
| 2218 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 2219 | }; |
| 2220 | |
Lukasz Majewski | 870a0b1 | 2017-11-07 16:30:58 +0100 | [diff] [blame] | 2221 | static const struct display_timing tianma_tm070rvhg71_timing = { |
| 2222 | .pixelclock = { 27700000, 29200000, 39600000 }, |
| 2223 | .hactive = { 800, 800, 800 }, |
| 2224 | .hfront_porch = { 12, 40, 212 }, |
| 2225 | .hback_porch = { 88, 88, 88 }, |
| 2226 | .hsync_len = { 1, 1, 40 }, |
| 2227 | .vactive = { 480, 480, 480 }, |
| 2228 | .vfront_porch = { 1, 13, 88 }, |
| 2229 | .vback_porch = { 32, 32, 32 }, |
| 2230 | .vsync_len = { 1, 1, 3 }, |
| 2231 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 2232 | }; |
| 2233 | |
| 2234 | static const struct panel_desc tianma_tm070rvhg71 = { |
| 2235 | .timings = &tianma_tm070rvhg71_timing, |
| 2236 | .num_timings = 1, |
| 2237 | .bpc = 8, |
| 2238 | .size = { |
| 2239 | .width = 154, |
| 2240 | .height = 86, |
| 2241 | }, |
| 2242 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 2243 | }; |
| 2244 | |
Lucas Stach | 06e733e | 2017-10-18 19:22:40 +0200 | [diff] [blame] | 2245 | static const struct drm_display_mode toshiba_lt089ac29000_mode = { |
| 2246 | .clock = 79500, |
| 2247 | .hdisplay = 1280, |
| 2248 | .hsync_start = 1280 + 192, |
| 2249 | .hsync_end = 1280 + 192 + 128, |
| 2250 | .htotal = 1280 + 192 + 128 + 64, |
| 2251 | .vdisplay = 768, |
| 2252 | .vsync_start = 768 + 20, |
| 2253 | .vsync_end = 768 + 20 + 7, |
| 2254 | .vtotal = 768 + 20 + 7 + 3, |
| 2255 | .vrefresh = 60, |
| 2256 | }; |
| 2257 | |
| 2258 | static const struct panel_desc toshiba_lt089ac29000 = { |
| 2259 | .modes = &toshiba_lt089ac29000_mode, |
| 2260 | .num_modes = 1, |
| 2261 | .size = { |
| 2262 | .width = 194, |
| 2263 | .height = 116, |
| 2264 | }, |
| 2265 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 2266 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE, |
| 2267 | }; |
| 2268 | |
Bhuvanchandra DV | 227e4f4 | 2016-05-05 11:47:07 +0530 | [diff] [blame] | 2269 | static const struct drm_display_mode tpk_f07a_0102_mode = { |
| 2270 | .clock = 33260, |
| 2271 | .hdisplay = 800, |
| 2272 | .hsync_start = 800 + 40, |
| 2273 | .hsync_end = 800 + 40 + 128, |
| 2274 | .htotal = 800 + 40 + 128 + 88, |
| 2275 | .vdisplay = 480, |
| 2276 | .vsync_start = 480 + 10, |
| 2277 | .vsync_end = 480 + 10 + 2, |
| 2278 | .vtotal = 480 + 10 + 2 + 33, |
| 2279 | .vrefresh = 60, |
| 2280 | }; |
| 2281 | |
| 2282 | static const struct panel_desc tpk_f07a_0102 = { |
| 2283 | .modes = &tpk_f07a_0102_mode, |
| 2284 | .num_modes = 1, |
| 2285 | .size = { |
| 2286 | .width = 152, |
| 2287 | .height = 91, |
| 2288 | }, |
| 2289 | .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE, |
| 2290 | }; |
| 2291 | |
| 2292 | static const struct drm_display_mode tpk_f10a_0102_mode = { |
| 2293 | .clock = 45000, |
| 2294 | .hdisplay = 1024, |
| 2295 | .hsync_start = 1024 + 176, |
| 2296 | .hsync_end = 1024 + 176 + 5, |
| 2297 | .htotal = 1024 + 176 + 5 + 88, |
| 2298 | .vdisplay = 600, |
| 2299 | .vsync_start = 600 + 20, |
| 2300 | .vsync_end = 600 + 20 + 5, |
| 2301 | .vtotal = 600 + 20 + 5 + 25, |
| 2302 | .vrefresh = 60, |
| 2303 | }; |
| 2304 | |
| 2305 | static const struct panel_desc tpk_f10a_0102 = { |
| 2306 | .modes = &tpk_f10a_0102_mode, |
| 2307 | .num_modes = 1, |
| 2308 | .size = { |
| 2309 | .width = 223, |
| 2310 | .height = 125, |
| 2311 | }, |
| 2312 | }; |
| 2313 | |
Maciej S. Szmigiero | 06a9dc6 | 2016-02-13 22:52:03 +0100 | [diff] [blame] | 2314 | static const struct display_timing urt_umsh_8596md_timing = { |
| 2315 | .pixelclock = { 33260000, 33260000, 33260000 }, |
| 2316 | .hactive = { 800, 800, 800 }, |
| 2317 | .hfront_porch = { 41, 41, 41 }, |
| 2318 | .hback_porch = { 216 - 128, 216 - 128, 216 - 128 }, |
| 2319 | .hsync_len = { 71, 128, 128 }, |
| 2320 | .vactive = { 480, 480, 480 }, |
| 2321 | .vfront_porch = { 10, 10, 10 }, |
| 2322 | .vback_porch = { 35 - 2, 35 - 2, 35 - 2 }, |
| 2323 | .vsync_len = { 2, 2, 2 }, |
| 2324 | .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE | |
| 2325 | DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW, |
| 2326 | }; |
| 2327 | |
| 2328 | static const struct panel_desc urt_umsh_8596md_lvds = { |
| 2329 | .timings = &urt_umsh_8596md_timing, |
| 2330 | .num_timings = 1, |
| 2331 | .bpc = 6, |
| 2332 | .size = { |
| 2333 | .width = 152, |
| 2334 | .height = 91, |
| 2335 | }, |
| 2336 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
| 2337 | }; |
| 2338 | |
| 2339 | static const struct panel_desc urt_umsh_8596md_parallel = { |
| 2340 | .timings = &urt_umsh_8596md_timing, |
| 2341 | .num_timings = 1, |
| 2342 | .bpc = 6, |
| 2343 | .size = { |
| 2344 | .width = 152, |
| 2345 | .height = 91, |
| 2346 | }, |
| 2347 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 2348 | }; |
| 2349 | |
Richard Genoud | e4bac40 | 2017-03-27 12:33:23 +0200 | [diff] [blame] | 2350 | static const struct drm_display_mode winstar_wf35ltiacd_mode = { |
| 2351 | .clock = 6410, |
| 2352 | .hdisplay = 320, |
| 2353 | .hsync_start = 320 + 20, |
| 2354 | .hsync_end = 320 + 20 + 30, |
| 2355 | .htotal = 320 + 20 + 30 + 38, |
| 2356 | .vdisplay = 240, |
| 2357 | .vsync_start = 240 + 4, |
| 2358 | .vsync_end = 240 + 4 + 3, |
| 2359 | .vtotal = 240 + 4 + 3 + 15, |
| 2360 | .vrefresh = 60, |
| 2361 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 2362 | }; |
| 2363 | |
| 2364 | static const struct panel_desc winstar_wf35ltiacd = { |
| 2365 | .modes = &winstar_wf35ltiacd_mode, |
| 2366 | .num_modes = 1, |
| 2367 | .bpc = 8, |
| 2368 | .size = { |
| 2369 | .width = 70, |
| 2370 | .height = 53, |
| 2371 | }, |
| 2372 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 2373 | }; |
| 2374 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2375 | static const struct of_device_id platform_of_match[] = { |
| 2376 | { |
Yannick Fertre | 966fea7 | 2017-03-28 11:44:49 +0200 | [diff] [blame] | 2377 | .compatible = "ampire,am-480272h3tmqw-t01h", |
| 2378 | .data = &ire_am_480272h3tmqw_t01h, |
| 2379 | }, { |
Philipp Zabel | 1c550fa1 | 2015-02-11 18:50:09 +0100 | [diff] [blame] | 2380 | .compatible = "ampire,am800480r3tmqwa1h", |
| 2381 | .data = &ire_am800480r3tmqwa1h, |
| 2382 | }, { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2383 | .compatible = "auo,b101aw03", |
| 2384 | .data = &auo_b101aw03, |
| 2385 | }, { |
Huang Lin | a531bc3 | 2015-02-28 10:18:58 +0800 | [diff] [blame] | 2386 | .compatible = "auo,b101ean01", |
| 2387 | .data = &auo_b101ean01, |
| 2388 | }, { |
Rob Clark | dac746e | 2014-08-01 17:01:06 -0400 | [diff] [blame] | 2389 | .compatible = "auo,b101xtn01", |
| 2390 | .data = &auo_b101xtn01, |
| 2391 | }, { |
Ajay Kumar | e35e305 | 2014-09-01 15:40:02 +0530 | [diff] [blame] | 2392 | .compatible = "auo,b116xw03", |
| 2393 | .data = &auo_b116xw03, |
| 2394 | }, { |
Ajay Kumar | 3e51d60 | 2014-07-31 23:12:12 +0530 | [diff] [blame] | 2395 | .compatible = "auo,b133htn01", |
| 2396 | .data = &auo_b133htn01, |
| 2397 | }, { |
Stéphane Marchesin | a333f7a | 2014-05-23 19:27:59 -0700 | [diff] [blame] | 2398 | .compatible = "auo,b133xtn01", |
| 2399 | .data = &auo_b133xtn01, |
| 2400 | }, { |
Lukasz Majewski | bccfaff | 2018-05-14 21:08:49 +0200 | [diff] [blame] | 2401 | .compatible = "auo,g070vvn01", |
| 2402 | .data = &auo_g070vvn01, |
| 2403 | }, { |
Christoph Fritz | 4451c28 | 2017-12-16 14:13:36 +0100 | [diff] [blame] | 2404 | .compatible = "auo,g104sn02", |
| 2405 | .data = &auo_g104sn02, |
| 2406 | }, { |
Lucas Stach | 697035c | 2016-11-30 14:09:55 +0100 | [diff] [blame] | 2407 | .compatible = "auo,g133han01", |
| 2408 | .data = &auo_g133han01, |
| 2409 | }, { |
Lucas Stach | 8c31f60 | 2016-11-30 14:09:56 +0100 | [diff] [blame] | 2410 | .compatible = "auo,g185han01", |
| 2411 | .data = &auo_g185han01, |
| 2412 | }, { |
Lucas Stach | 70c0d5b | 2017-06-08 20:07:58 +0200 | [diff] [blame] | 2413 | .compatible = "auo,p320hvn03", |
| 2414 | .data = &auo_p320hvn03, |
| 2415 | }, { |
Haixia Shi | 7ee933a | 2016-10-11 14:59:16 -0700 | [diff] [blame] | 2416 | .compatible = "auo,t215hvn01", |
| 2417 | .data = &auo_t215hvn01, |
| 2418 | }, { |
Philipp Zabel | d47df63 | 2014-12-18 16:43:43 +0100 | [diff] [blame] | 2419 | .compatible = "avic,tm070ddh03", |
| 2420 | .data = &avic_tm070ddh03, |
| 2421 | }, { |
Andrzej Hajda | ae8cf41 | 2018-06-19 10:19:26 +0200 | [diff] [blame] | 2422 | .compatible = "boe,hv070wsa-100", |
| 2423 | .data = &boe_hv070wsa |
| 2424 | }, { |
Caesar Wang | cac1a41 | 2016-12-14 11:19:56 +0800 | [diff] [blame] | 2425 | .compatible = "boe,nv101wxmn51", |
| 2426 | .data = &boe_nv101wxmn51, |
| 2427 | }, { |
Giulio Benetti | e58edce | 2018-07-31 01:11:16 +0200 | [diff] [blame^] | 2428 | .compatible = "cdtech,s043wq26h-ct7", |
| 2429 | .data = &cdtech_s043wq26h_ct7, |
| 2430 | }, { |
Giulio Benetti | 982f944 | 2018-07-31 01:11:14 +0200 | [diff] [blame] | 2431 | .compatible = "cdtech,s070wv95-ct16", |
| 2432 | .data = &cdtech_s070wv95_ct16, |
| 2433 | }, { |
Randy Li | 2cb35c8 | 2016-09-20 03:02:51 +0800 | [diff] [blame] | 2434 | .compatible = "chunghwa,claa070wp03xg", |
| 2435 | .data = &chunghwa_claa070wp03xg, |
| 2436 | }, { |
Stephen Warren | 4c93075 | 2014-01-07 16:46:26 -0700 | [diff] [blame] | 2437 | .compatible = "chunghwa,claa101wa01a", |
| 2438 | .data = &chunghwa_claa101wa01a |
| 2439 | }, { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2440 | .compatible = "chunghwa,claa101wb01", |
| 2441 | .data = &chunghwa_claa101wb01 |
| 2442 | }, { |
Michal Vokáč | 97ceb1f | 2018-06-25 14:41:30 +0200 | [diff] [blame] | 2443 | .compatible = "dataimage,scf0700c48ggu18", |
| 2444 | .data = &dataimage_scf0700c48ggu18, |
| 2445 | }, { |
Philipp Zabel | 0ca0c82 | 2018-05-23 11:25:04 +0200 | [diff] [blame] | 2446 | .compatible = "dlc,dlc0700yzg-1", |
| 2447 | .data = &dlc_dlc0700yzg_1, |
| 2448 | }, { |
Stefan Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 2449 | .compatible = "edt,et057090dhu", |
| 2450 | .data = &edt_et057090dhu, |
| 2451 | }, { |
Philipp Zabel | fff5de4 | 2014-05-15 12:25:47 +0200 | [diff] [blame] | 2452 | .compatible = "edt,et070080dh6", |
| 2453 | .data = &edt_etm0700g0dh6, |
| 2454 | }, { |
| 2455 | .compatible = "edt,etm0700g0dh6", |
| 2456 | .data = &edt_etm0700g0dh6, |
| 2457 | }, { |
Jan Tuerk | aa7e645 | 2018-06-19 11:55:44 +0200 | [diff] [blame] | 2458 | .compatible = "edt,etm0700g0bdh6", |
| 2459 | .data = &edt_etm0700g0bdh6, |
| 2460 | }, { |
Jan Tuerk | aad34de | 2018-06-19 11:55:45 +0200 | [diff] [blame] | 2461 | .compatible = "edt,etm0700g0edh6", |
| 2462 | .data = &edt_etm0700g0bdh6, |
| 2463 | }, { |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 2464 | .compatible = "foxlink,fl500wvr00-a0t", |
| 2465 | .data = &foxlink_fl500wvr00_a0t, |
| 2466 | }, { |
Philipp Zabel | d435a2a | 2014-11-19 10:29:55 +0100 | [diff] [blame] | 2467 | .compatible = "giantplus,gpg482739qs5", |
| 2468 | .data = &giantplus_gpg482739qs5 |
| 2469 | }, { |
Philipp Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 2470 | .compatible = "hannstar,hsd070pww1", |
| 2471 | .data = &hannstar_hsd070pww1, |
| 2472 | }, { |
Eric Nelson | c0d607e | 2015-04-13 15:09:26 -0700 | [diff] [blame] | 2473 | .compatible = "hannstar,hsd100pxn1", |
| 2474 | .data = &hannstar_hsd100pxn1, |
| 2475 | }, { |
Lucas Stach | 61ac0bf | 2014-11-06 17:44:35 +0100 | [diff] [blame] | 2476 | .compatible = "hit,tx23d38vm0caa", |
| 2477 | .data = &hitachi_tx23d38vm0caa |
| 2478 | }, { |
Nicolas Ferre | 41bcceb | 2015-03-19 14:43:01 +0100 | [diff] [blame] | 2479 | .compatible = "innolux,at043tn24", |
| 2480 | .data = &innolux_at043tn24, |
| 2481 | }, { |
Riccardo Bortolato | 4fc24ab | 2016-04-20 15:37:15 +0200 | [diff] [blame] | 2482 | .compatible = "innolux,at070tn92", |
| 2483 | .data = &innolux_at070tn92, |
| 2484 | }, { |
Christoph Fritz | a5d2ade | 2018-06-04 13:16:48 +0200 | [diff] [blame] | 2485 | .compatible = "innolux,g070y2-l01", |
| 2486 | .data = &innolux_g070y2_l01, |
| 2487 | }, { |
| 2488 | .compatible = "innolux,g101ice-l01", |
Michael Olbrich | 1e29b84 | 2016-08-15 14:32:02 +0200 | [diff] [blame] | 2489 | .data = &innolux_g101ice_l01 |
| 2490 | }, { |
Christoph Fritz | a5d2ade | 2018-06-04 13:16:48 +0200 | [diff] [blame] | 2491 | .compatible = "innolux,g121i1-l01", |
Lucas Stach | d731f66 | 2014-11-06 17:44:33 +0100 | [diff] [blame] | 2492 | .data = &innolux_g121i1_l01 |
| 2493 | }, { |
Akshay Bhat | f8fa17b | 2015-11-18 15:57:47 -0500 | [diff] [blame] | 2494 | .compatible = "innolux,g121x1-l03", |
| 2495 | .data = &innolux_g121x1_l03, |
| 2496 | }, { |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 2497 | .compatible = "innolux,n116bge", |
| 2498 | .data = &innolux_n116bge, |
| 2499 | }, { |
Alban Bedel | ea44739 | 2014-07-22 08:38:55 +0200 | [diff] [blame] | 2500 | .compatible = "innolux,n156bge-l21", |
| 2501 | .data = &innolux_n156bge_l21, |
| 2502 | }, { |
spanda@codeaurora.org | da50bd4 | 2018-05-15 11:22:43 +0530 | [diff] [blame] | 2503 | .compatible = "innolux,tv123wam", |
| 2504 | .data = &innolux_tv123wam, |
| 2505 | }, { |
Michael Grzeschik | bccac3f | 2015-03-19 12:22:44 +0100 | [diff] [blame] | 2506 | .compatible = "innolux,zj070na-01p", |
| 2507 | .data = &innolux_zj070na_01p, |
| 2508 | }, { |
Jagan Teki | 8cfe834 | 2018-02-04 23:19:28 +0530 | [diff] [blame] | 2509 | .compatible = "koe,tx31d200vm0baa", |
| 2510 | .data = &koe_tx31d200vm0baa, |
| 2511 | }, { |
Lucas Stach | 8def22e | 2015-12-02 19:41:11 +0100 | [diff] [blame] | 2512 | .compatible = "kyo,tcg121xglp", |
| 2513 | .data = &kyo_tcg121xglp, |
| 2514 | }, { |
Heiko Schocher | dd01500 | 2015-05-22 10:25:57 +0200 | [diff] [blame] | 2515 | .compatible = "lg,lb070wv8", |
| 2516 | .data = &lg_lb070wv8, |
| 2517 | }, { |
Yakir Yang | c5ece40 | 2016-06-28 12:51:15 +0800 | [diff] [blame] | 2518 | .compatible = "lg,lp079qx1-sp0v", |
| 2519 | .data = &lg_lp079qx1_sp0v, |
| 2520 | }, { |
Yakir Yang | 0355dde | 2016-06-12 10:56:02 +0800 | [diff] [blame] | 2521 | .compatible = "lg,lp097qx1-spa1", |
| 2522 | .data = &lg_lp097qx1_spa1, |
| 2523 | }, { |
Jitao Shi | 690d8fa | 2016-02-22 19:01:44 +0800 | [diff] [blame] | 2524 | .compatible = "lg,lp120up1", |
| 2525 | .data = &lg_lp120up1, |
| 2526 | }, { |
Thierry Reding | ec7c565 | 2013-11-15 15:59:32 +0100 | [diff] [blame] | 2527 | .compatible = "lg,lp129qe", |
| 2528 | .data = &lg_lp129qe, |
| 2529 | }, { |
Lukasz Majewski | 65c766c | 2017-10-21 00:18:37 +0200 | [diff] [blame] | 2530 | .compatible = "mitsubishi,aa070mc01-ca1", |
| 2531 | .data = &mitsubishi_aa070mc01, |
| 2532 | }, { |
Lucas Stach | 01bacc13 | 2017-06-08 20:07:55 +0200 | [diff] [blame] | 2533 | .compatible = "nec,nl12880bc20-05", |
| 2534 | .data = &nec_nl12880bc20_05, |
| 2535 | }, { |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 2536 | .compatible = "nec,nl4827hc19-05b", |
| 2537 | .data = &nec_nl4827hc19_05b, |
| 2538 | }, { |
Maxime Ripard | e6c2f06 | 2016-09-06 16:46:17 +0200 | [diff] [blame] | 2539 | .compatible = "netron-dy,e231732", |
| 2540 | .data = &netron_dy_e231732, |
| 2541 | }, { |
Tomi Valkeinen | 3b39ad7 | 2018-06-18 16:22:40 +0300 | [diff] [blame] | 2542 | .compatible = "newhaven,nhd-4.3-480272ef-atxl", |
| 2543 | .data = &newhaven_nhd_43_480272ef_atxl, |
| 2544 | }, { |
Lucas Stach | 4177fa6 | 2017-06-08 20:07:57 +0200 | [diff] [blame] | 2545 | .compatible = "nlt,nl192108ac18-02d", |
| 2546 | .data = &nlt_nl192108ac18_02d, |
| 2547 | }, { |
Fabien Lahoudere | 05ec0e4 | 2016-10-17 11:38:01 +0200 | [diff] [blame] | 2548 | .compatible = "nvd,9128", |
| 2549 | .data = &nvd_9128, |
| 2550 | }, { |
Gary Bisson | a99fb62 | 2015-06-10 18:44:23 +0200 | [diff] [blame] | 2551 | .compatible = "okaya,rs800480t-7x0gp", |
| 2552 | .data = &okaya_rs800480t_7x0gp, |
| 2553 | }, { |
Maxime Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 2554 | .compatible = "olimex,lcd-olinuxino-43-ts", |
| 2555 | .data = &olimex_lcd_olinuxino_43ts, |
| 2556 | }, { |
Eric Anholt | e8b6f56 | 2016-03-24 17:23:48 -0700 | [diff] [blame] | 2557 | .compatible = "ontat,yx700wv03", |
| 2558 | .data = &ontat_yx700wv03, |
| 2559 | }, { |
Philipp Zabel | 725c9d4 | 2015-02-11 18:50:11 +0100 | [diff] [blame] | 2560 | .compatible = "ortustech,com43h4m85ulc", |
| 2561 | .data = &ortustech_com43h4m85ulc, |
| 2562 | }, { |
Josh Wu | d2a6f0f | 2015-10-08 17:42:41 +0200 | [diff] [blame] | 2563 | .compatible = "qiaodian,qd43003c0-40", |
| 2564 | .data = &qd43003c0_40, |
| 2565 | }, { |
Jagan Teki | 23167fa | 2018-06-07 19:16:48 +0530 | [diff] [blame] | 2566 | .compatible = "rocktech,rk070er9427", |
| 2567 | .data = &rocktech_rk070er9427, |
| 2568 | }, { |
Yakir Yang | 0330eaf | 2016-06-12 10:56:13 +0800 | [diff] [blame] | 2569 | .compatible = "samsung,lsn122dl01-c01", |
| 2570 | .data = &samsung_lsn122dl01_c01, |
| 2571 | }, { |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 2572 | .compatible = "samsung,ltn101nt05", |
| 2573 | .data = &samsung_ltn101nt05, |
| 2574 | }, { |
Stéphane Marchesin | 0c93430 | 2015-03-18 10:52:18 +0100 | [diff] [blame] | 2575 | .compatible = "samsung,ltn140at29-301", |
| 2576 | .data = &samsung_ltn140at29_301, |
| 2577 | }, { |
Vladimir Zapolskiy | 03e3ec9 | 2018-07-06 21:51:01 +0300 | [diff] [blame] | 2578 | .compatible = "sharp,lq035q7db03", |
| 2579 | .data = &sharp_lq035q7db03, |
| 2580 | }, { |
Joshua Clayton | 592aa02 | 2016-07-06 15:59:16 -0700 | [diff] [blame] | 2581 | .compatible = "sharp,lq101k1ly04", |
| 2582 | .data = &sharp_lq101k1ly04, |
| 2583 | }, { |
Yakir Yang | 739c7de | 2016-06-12 10:56:35 +0800 | [diff] [blame] | 2584 | .compatible = "sharp,lq123p1jx31", |
| 2585 | .data = &sharp_lq123p1jx31, |
| 2586 | }, { |
Gustaf Lindström | 0f9cdd7 | 2016-10-04 17:29:21 +0200 | [diff] [blame] | 2587 | .compatible = "sharp,lq150x1lg11", |
| 2588 | .data = &sharp_lq150x1lg11, |
| 2589 | }, { |
Boris BREZILLON | 9c6615b | 2015-03-19 14:43:00 +0100 | [diff] [blame] | 2590 | .compatible = "shelly,sca07010-bfn-lnn", |
| 2591 | .data = &shelly_sca07010_bfn_lnn, |
| 2592 | }, { |
Douglas Anderson | 9bb34c4 | 2016-06-10 10:02:07 -0700 | [diff] [blame] | 2593 | .compatible = "starry,kr122ea0sra", |
| 2594 | .data = &starry_kr122ea0sra, |
| 2595 | }, { |
Gary Bisson | adb973e | 2016-12-02 09:52:08 +0100 | [diff] [blame] | 2596 | .compatible = "tianma,tm070jdhg30", |
| 2597 | .data = &tianma_tm070jdhg30, |
| 2598 | }, { |
Lukasz Majewski | 870a0b1 | 2017-11-07 16:30:58 +0100 | [diff] [blame] | 2599 | .compatible = "tianma,tm070rvhg71", |
| 2600 | .data = &tianma_tm070rvhg71, |
| 2601 | }, { |
Lucas Stach | 06e733e | 2017-10-18 19:22:40 +0200 | [diff] [blame] | 2602 | .compatible = "toshiba,lt089ac29000", |
| 2603 | .data = &toshiba_lt089ac29000, |
| 2604 | }, { |
Bhuvanchandra DV | 227e4f4 | 2016-05-05 11:47:07 +0530 | [diff] [blame] | 2605 | .compatible = "tpk,f07a-0102", |
| 2606 | .data = &tpk_f07a_0102, |
| 2607 | }, { |
| 2608 | .compatible = "tpk,f10a-0102", |
| 2609 | .data = &tpk_f10a_0102, |
| 2610 | }, { |
Maciej S. Szmigiero | 06a9dc6 | 2016-02-13 22:52:03 +0100 | [diff] [blame] | 2611 | .compatible = "urt,umsh-8596md-t", |
| 2612 | .data = &urt_umsh_8596md_parallel, |
| 2613 | }, { |
| 2614 | .compatible = "urt,umsh-8596md-1t", |
| 2615 | .data = &urt_umsh_8596md_parallel, |
| 2616 | }, { |
| 2617 | .compatible = "urt,umsh-8596md-7t", |
| 2618 | .data = &urt_umsh_8596md_parallel, |
| 2619 | }, { |
| 2620 | .compatible = "urt,umsh-8596md-11t", |
| 2621 | .data = &urt_umsh_8596md_lvds, |
| 2622 | }, { |
| 2623 | .compatible = "urt,umsh-8596md-19t", |
| 2624 | .data = &urt_umsh_8596md_lvds, |
| 2625 | }, { |
| 2626 | .compatible = "urt,umsh-8596md-20t", |
| 2627 | .data = &urt_umsh_8596md_parallel, |
| 2628 | }, { |
Richard Genoud | e4bac40 | 2017-03-27 12:33:23 +0200 | [diff] [blame] | 2629 | .compatible = "winstar,wf35ltiacd", |
| 2630 | .data = &winstar_wf35ltiacd, |
| 2631 | }, { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2632 | /* sentinel */ |
| 2633 | } |
| 2634 | }; |
| 2635 | MODULE_DEVICE_TABLE(of, platform_of_match); |
| 2636 | |
| 2637 | static int panel_simple_platform_probe(struct platform_device *pdev) |
| 2638 | { |
| 2639 | const struct of_device_id *id; |
| 2640 | |
| 2641 | id = of_match_node(platform_of_match, pdev->dev.of_node); |
| 2642 | if (!id) |
| 2643 | return -ENODEV; |
| 2644 | |
| 2645 | return panel_simple_probe(&pdev->dev, id->data); |
| 2646 | } |
| 2647 | |
| 2648 | static int panel_simple_platform_remove(struct platform_device *pdev) |
| 2649 | { |
| 2650 | return panel_simple_remove(&pdev->dev); |
| 2651 | } |
| 2652 | |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 2653 | static void panel_simple_platform_shutdown(struct platform_device *pdev) |
| 2654 | { |
| 2655 | panel_simple_shutdown(&pdev->dev); |
| 2656 | } |
| 2657 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2658 | static struct platform_driver panel_simple_platform_driver = { |
| 2659 | .driver = { |
| 2660 | .name = "panel-simple", |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2661 | .of_match_table = platform_of_match, |
| 2662 | }, |
| 2663 | .probe = panel_simple_platform_probe, |
| 2664 | .remove = panel_simple_platform_remove, |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 2665 | .shutdown = panel_simple_platform_shutdown, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2666 | }; |
| 2667 | |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2668 | struct panel_desc_dsi { |
| 2669 | struct panel_desc desc; |
| 2670 | |
Thierry Reding | 462658b | 2014-03-14 11:24:57 +0100 | [diff] [blame] | 2671 | unsigned long flags; |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2672 | enum mipi_dsi_pixel_format format; |
| 2673 | unsigned int lanes; |
| 2674 | }; |
| 2675 | |
Thierry Reding | d718d79 | 2015-04-08 16:52:33 +0200 | [diff] [blame] | 2676 | static const struct drm_display_mode auo_b080uan01_mode = { |
| 2677 | .clock = 154500, |
| 2678 | .hdisplay = 1200, |
| 2679 | .hsync_start = 1200 + 62, |
| 2680 | .hsync_end = 1200 + 62 + 4, |
| 2681 | .htotal = 1200 + 62 + 4 + 62, |
| 2682 | .vdisplay = 1920, |
| 2683 | .vsync_start = 1920 + 9, |
| 2684 | .vsync_end = 1920 + 9 + 2, |
| 2685 | .vtotal = 1920 + 9 + 2 + 8, |
| 2686 | .vrefresh = 60, |
| 2687 | }; |
| 2688 | |
| 2689 | static const struct panel_desc_dsi auo_b080uan01 = { |
| 2690 | .desc = { |
| 2691 | .modes = &auo_b080uan01_mode, |
| 2692 | .num_modes = 1, |
| 2693 | .bpc = 8, |
| 2694 | .size = { |
| 2695 | .width = 108, |
| 2696 | .height = 272, |
| 2697 | }, |
| 2698 | }, |
| 2699 | .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS, |
| 2700 | .format = MIPI_DSI_FMT_RGB888, |
| 2701 | .lanes = 4, |
| 2702 | }; |
| 2703 | |
Chris Zhong | c852196 | 2015-11-20 16:15:37 +0800 | [diff] [blame] | 2704 | static const struct drm_display_mode boe_tv080wum_nl0_mode = { |
| 2705 | .clock = 160000, |
| 2706 | .hdisplay = 1200, |
| 2707 | .hsync_start = 1200 + 120, |
| 2708 | .hsync_end = 1200 + 120 + 20, |
| 2709 | .htotal = 1200 + 120 + 20 + 21, |
| 2710 | .vdisplay = 1920, |
| 2711 | .vsync_start = 1920 + 21, |
| 2712 | .vsync_end = 1920 + 21 + 3, |
| 2713 | .vtotal = 1920 + 21 + 3 + 18, |
| 2714 | .vrefresh = 60, |
| 2715 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 2716 | }; |
| 2717 | |
| 2718 | static const struct panel_desc_dsi boe_tv080wum_nl0 = { |
| 2719 | .desc = { |
| 2720 | .modes = &boe_tv080wum_nl0_mode, |
| 2721 | .num_modes = 1, |
| 2722 | .size = { |
| 2723 | .width = 107, |
| 2724 | .height = 172, |
| 2725 | }, |
| 2726 | }, |
| 2727 | .flags = MIPI_DSI_MODE_VIDEO | |
| 2728 | MIPI_DSI_MODE_VIDEO_BURST | |
| 2729 | MIPI_DSI_MODE_VIDEO_SYNC_PULSE, |
| 2730 | .format = MIPI_DSI_FMT_RGB888, |
| 2731 | .lanes = 4, |
| 2732 | }; |
| 2733 | |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 2734 | static const struct drm_display_mode lg_ld070wx3_sl01_mode = { |
| 2735 | .clock = 71000, |
| 2736 | .hdisplay = 800, |
| 2737 | .hsync_start = 800 + 32, |
| 2738 | .hsync_end = 800 + 32 + 1, |
| 2739 | .htotal = 800 + 32 + 1 + 57, |
| 2740 | .vdisplay = 1280, |
| 2741 | .vsync_start = 1280 + 28, |
| 2742 | .vsync_end = 1280 + 28 + 1, |
| 2743 | .vtotal = 1280 + 28 + 1 + 14, |
| 2744 | .vrefresh = 60, |
| 2745 | }; |
| 2746 | |
| 2747 | static const struct panel_desc_dsi lg_ld070wx3_sl01 = { |
| 2748 | .desc = { |
| 2749 | .modes = &lg_ld070wx3_sl01_mode, |
| 2750 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 2751 | .bpc = 8, |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 2752 | .size = { |
| 2753 | .width = 94, |
| 2754 | .height = 151, |
| 2755 | }, |
| 2756 | }, |
Alexandre Courbot | 5e4cc27 | 2014-07-08 21:32:12 +0900 | [diff] [blame] | 2757 | .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS, |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 2758 | .format = MIPI_DSI_FMT_RGB888, |
| 2759 | .lanes = 4, |
| 2760 | }; |
| 2761 | |
Alexandre Courbot | 499ce85 | 2014-01-21 18:57:09 +0900 | [diff] [blame] | 2762 | static const struct drm_display_mode lg_lh500wx1_sd03_mode = { |
| 2763 | .clock = 67000, |
| 2764 | .hdisplay = 720, |
| 2765 | .hsync_start = 720 + 12, |
| 2766 | .hsync_end = 720 + 12 + 4, |
| 2767 | .htotal = 720 + 12 + 4 + 112, |
| 2768 | .vdisplay = 1280, |
| 2769 | .vsync_start = 1280 + 8, |
| 2770 | .vsync_end = 1280 + 8 + 4, |
| 2771 | .vtotal = 1280 + 8 + 4 + 12, |
| 2772 | .vrefresh = 60, |
| 2773 | }; |
| 2774 | |
| 2775 | static const struct panel_desc_dsi lg_lh500wx1_sd03 = { |
| 2776 | .desc = { |
| 2777 | .modes = &lg_lh500wx1_sd03_mode, |
| 2778 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 2779 | .bpc = 8, |
Alexandre Courbot | 499ce85 | 2014-01-21 18:57:09 +0900 | [diff] [blame] | 2780 | .size = { |
| 2781 | .width = 62, |
| 2782 | .height = 110, |
| 2783 | }, |
| 2784 | }, |
| 2785 | .flags = MIPI_DSI_MODE_VIDEO, |
| 2786 | .format = MIPI_DSI_FMT_RGB888, |
| 2787 | .lanes = 4, |
| 2788 | }; |
| 2789 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2790 | static const struct drm_display_mode panasonic_vvx10f004b00_mode = { |
| 2791 | .clock = 157200, |
| 2792 | .hdisplay = 1920, |
| 2793 | .hsync_start = 1920 + 154, |
| 2794 | .hsync_end = 1920 + 154 + 16, |
| 2795 | .htotal = 1920 + 154 + 16 + 32, |
| 2796 | .vdisplay = 1200, |
| 2797 | .vsync_start = 1200 + 17, |
| 2798 | .vsync_end = 1200 + 17 + 2, |
| 2799 | .vtotal = 1200 + 17 + 2 + 16, |
| 2800 | .vrefresh = 60, |
| 2801 | }; |
| 2802 | |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2803 | static const struct panel_desc_dsi panasonic_vvx10f004b00 = { |
| 2804 | .desc = { |
| 2805 | .modes = &panasonic_vvx10f004b00_mode, |
| 2806 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 2807 | .bpc = 8, |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2808 | .size = { |
| 2809 | .width = 217, |
| 2810 | .height = 136, |
| 2811 | }, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2812 | }, |
Alexandre Courbot | 5e4cc27 | 2014-07-08 21:32:12 +0900 | [diff] [blame] | 2813 | .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | |
| 2814 | MIPI_DSI_CLOCK_NON_CONTINUOUS, |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2815 | .format = MIPI_DSI_FMT_RGB888, |
| 2816 | .lanes = 4, |
| 2817 | }; |
| 2818 | |
| 2819 | static const struct of_device_id dsi_of_match[] = { |
| 2820 | { |
Thierry Reding | d718d79 | 2015-04-08 16:52:33 +0200 | [diff] [blame] | 2821 | .compatible = "auo,b080uan01", |
| 2822 | .data = &auo_b080uan01 |
| 2823 | }, { |
Chris Zhong | c852196 | 2015-11-20 16:15:37 +0800 | [diff] [blame] | 2824 | .compatible = "boe,tv080wum-nl0", |
| 2825 | .data = &boe_tv080wum_nl0 |
| 2826 | }, { |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 2827 | .compatible = "lg,ld070wx3-sl01", |
| 2828 | .data = &lg_ld070wx3_sl01 |
| 2829 | }, { |
Alexandre Courbot | 499ce85 | 2014-01-21 18:57:09 +0900 | [diff] [blame] | 2830 | .compatible = "lg,lh500wx1-sd03", |
| 2831 | .data = &lg_lh500wx1_sd03 |
| 2832 | }, { |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2833 | .compatible = "panasonic,vvx10f004b00", |
| 2834 | .data = &panasonic_vvx10f004b00 |
| 2835 | }, { |
| 2836 | /* sentinel */ |
| 2837 | } |
| 2838 | }; |
| 2839 | MODULE_DEVICE_TABLE(of, dsi_of_match); |
| 2840 | |
| 2841 | static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi) |
| 2842 | { |
| 2843 | const struct panel_desc_dsi *desc; |
| 2844 | const struct of_device_id *id; |
| 2845 | int err; |
| 2846 | |
| 2847 | id = of_match_node(dsi_of_match, dsi->dev.of_node); |
| 2848 | if (!id) |
| 2849 | return -ENODEV; |
| 2850 | |
| 2851 | desc = id->data; |
| 2852 | |
| 2853 | err = panel_simple_probe(&dsi->dev, &desc->desc); |
| 2854 | if (err < 0) |
| 2855 | return err; |
| 2856 | |
Thierry Reding | 462658b | 2014-03-14 11:24:57 +0100 | [diff] [blame] | 2857 | dsi->mode_flags = desc->flags; |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2858 | dsi->format = desc->format; |
| 2859 | dsi->lanes = desc->lanes; |
| 2860 | |
| 2861 | return mipi_dsi_attach(dsi); |
| 2862 | } |
| 2863 | |
| 2864 | static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi) |
| 2865 | { |
| 2866 | int err; |
| 2867 | |
| 2868 | err = mipi_dsi_detach(dsi); |
| 2869 | if (err < 0) |
| 2870 | dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err); |
| 2871 | |
| 2872 | return panel_simple_remove(&dsi->dev); |
| 2873 | } |
| 2874 | |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 2875 | static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi) |
| 2876 | { |
| 2877 | panel_simple_shutdown(&dsi->dev); |
| 2878 | } |
| 2879 | |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2880 | static struct mipi_dsi_driver panel_simple_dsi_driver = { |
| 2881 | .driver = { |
| 2882 | .name = "panel-simple-dsi", |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2883 | .of_match_table = dsi_of_match, |
| 2884 | }, |
| 2885 | .probe = panel_simple_dsi_probe, |
| 2886 | .remove = panel_simple_dsi_remove, |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 2887 | .shutdown = panel_simple_dsi_shutdown, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2888 | }; |
| 2889 | |
| 2890 | static int __init panel_simple_init(void) |
| 2891 | { |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2892 | int err; |
| 2893 | |
| 2894 | err = platform_driver_register(&panel_simple_platform_driver); |
| 2895 | if (err < 0) |
| 2896 | return err; |
| 2897 | |
| 2898 | if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) { |
| 2899 | err = mipi_dsi_driver_register(&panel_simple_dsi_driver); |
| 2900 | if (err < 0) |
| 2901 | return err; |
| 2902 | } |
| 2903 | |
| 2904 | return 0; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2905 | } |
| 2906 | module_init(panel_simple_init); |
| 2907 | |
| 2908 | static void __exit panel_simple_exit(void) |
| 2909 | { |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2910 | if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) |
| 2911 | mipi_dsi_driver_unregister(&panel_simple_dsi_driver); |
| 2912 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2913 | platform_driver_unregister(&panel_simple_platform_driver); |
| 2914 | } |
| 2915 | module_exit(panel_simple_exit); |
| 2916 | |
| 2917 | MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>"); |
| 2918 | MODULE_DESCRIPTION("DRM Driver for Simple Panels"); |
| 2919 | MODULE_LICENSE("GPL and additional rights"); |