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