Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013, NVIDIA Corporation. All rights reserved. |
| 3 | * |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | * copy of this software and associated documentation files (the "Software"), |
| 6 | * to deal in the Software without restriction, including without limitation |
| 7 | * the rights to use, copy, modify, merge, publish, distribute, sub license, |
| 8 | * and/or sell copies of the Software, and to permit persons to whom the |
| 9 | * Software is furnished to do so, subject to the following conditions: |
| 10 | * |
| 11 | * The above copyright notice and this permission notice (including the |
| 12 | * next paragraph) shall be included in all copies or substantial portions |
| 13 | * of the Software. |
| 14 | * |
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL |
| 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 21 | * DEALINGS IN THE SOFTWARE. |
| 22 | */ |
| 23 | |
| 24 | #include <linux/backlight.h> |
Alexandre Courbot | cfdf054 | 2014-03-01 14:00:58 +0900 | [diff] [blame] | 25 | #include <linux/gpio/consumer.h> |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 26 | #include <linux/module.h> |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 27 | #include <linux/of_platform.h> |
| 28 | #include <linux/platform_device.h> |
| 29 | #include <linux/regulator/consumer.h> |
| 30 | |
| 31 | #include <drm/drmP.h> |
| 32 | #include <drm/drm_crtc.h> |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 33 | #include <drm/drm_mipi_dsi.h> |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 34 | #include <drm/drm_panel.h> |
| 35 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 36 | #include <video/display_timing.h> |
| 37 | #include <video/videomode.h> |
| 38 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 39 | struct panel_desc { |
| 40 | const struct drm_display_mode *modes; |
| 41 | unsigned int num_modes; |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 42 | const struct display_timing *timings; |
| 43 | unsigned int num_timings; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 44 | |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 45 | unsigned int bpc; |
| 46 | |
Ulrich Ölmann | 85533e3 | 2015-12-04 12:31:28 +0100 | [diff] [blame] | 47 | /** |
| 48 | * @width: width (in millimeters) of the panel's active display area |
| 49 | * @height: height (in millimeters) of the panel's active display area |
| 50 | */ |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 51 | struct { |
| 52 | unsigned int width; |
| 53 | unsigned int height; |
| 54 | } size; |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 55 | |
| 56 | /** |
| 57 | * @prepare: the time (in milliseconds) that it takes for the panel to |
| 58 | * become ready and start receiving video data |
| 59 | * @enable: the time (in milliseconds) that it takes for the panel to |
| 60 | * display the first valid frame after starting to receive |
| 61 | * video data |
| 62 | * @disable: the time (in milliseconds) that it takes for the panel to |
| 63 | * turn the display off (no content is visible) |
| 64 | * @unprepare: the time (in milliseconds) that it takes for the panel |
| 65 | * to power itself down completely |
| 66 | */ |
| 67 | struct { |
| 68 | unsigned int prepare; |
| 69 | unsigned int enable; |
| 70 | unsigned int disable; |
| 71 | unsigned int unprepare; |
| 72 | } delay; |
Boris Brezillon | 795f7ab | 2014-07-22 13:33:59 +0200 | [diff] [blame] | 73 | |
| 74 | u32 bus_format; |
Stefan Agner | f0aa083 | 2016-02-08 11:38:14 -0800 | [diff] [blame] | 75 | u32 bus_flags; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 76 | }; |
| 77 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 78 | struct panel_simple { |
| 79 | struct drm_panel base; |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 80 | bool prepared; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 81 | bool enabled; |
| 82 | |
| 83 | const struct panel_desc *desc; |
| 84 | |
| 85 | struct backlight_device *backlight; |
| 86 | struct regulator *supply; |
| 87 | struct i2c_adapter *ddc; |
| 88 | |
Alexandre Courbot | cfdf054 | 2014-03-01 14:00:58 +0900 | [diff] [blame] | 89 | struct gpio_desc *enable_gpio; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 90 | }; |
| 91 | |
| 92 | static inline struct panel_simple *to_panel_simple(struct drm_panel *panel) |
| 93 | { |
| 94 | return container_of(panel, struct panel_simple, base); |
| 95 | } |
| 96 | |
| 97 | static int panel_simple_get_fixed_modes(struct panel_simple *panel) |
| 98 | { |
| 99 | struct drm_connector *connector = panel->base.connector; |
| 100 | struct drm_device *drm = panel->base.drm; |
| 101 | struct drm_display_mode *mode; |
| 102 | unsigned int i, num = 0; |
| 103 | |
| 104 | if (!panel->desc) |
| 105 | return 0; |
| 106 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 107 | for (i = 0; i < panel->desc->num_timings; i++) { |
| 108 | const struct display_timing *dt = &panel->desc->timings[i]; |
| 109 | struct videomode vm; |
| 110 | |
| 111 | videomode_from_timing(dt, &vm); |
| 112 | mode = drm_mode_create(drm); |
| 113 | if (!mode) { |
| 114 | dev_err(drm->dev, "failed to add mode %ux%u\n", |
| 115 | dt->hactive.typ, dt->vactive.typ); |
| 116 | continue; |
| 117 | } |
| 118 | |
| 119 | drm_display_mode_from_videomode(&vm, mode); |
Boris Brezillon | cda5537 | 2016-04-15 18:23:33 +0200 | [diff] [blame] | 120 | |
| 121 | mode->type |= DRM_MODE_TYPE_DRIVER; |
| 122 | |
Chen-Yu Tsai | 230c5b4 | 2016-10-24 21:21:15 +0800 | [diff] [blame^] | 123 | if (panel->desc->num_timings == 1) |
Boris Brezillon | cda5537 | 2016-04-15 18:23:33 +0200 | [diff] [blame] | 124 | mode->type |= DRM_MODE_TYPE_PREFERRED; |
| 125 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 126 | drm_mode_probed_add(connector, mode); |
| 127 | num++; |
| 128 | } |
| 129 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 130 | for (i = 0; i < panel->desc->num_modes; i++) { |
| 131 | const struct drm_display_mode *m = &panel->desc->modes[i]; |
| 132 | |
| 133 | mode = drm_mode_duplicate(drm, m); |
| 134 | if (!mode) { |
| 135 | dev_err(drm->dev, "failed to add mode %ux%u@%u\n", |
| 136 | m->hdisplay, m->vdisplay, m->vrefresh); |
| 137 | continue; |
| 138 | } |
| 139 | |
Boris Brezillon | cda5537 | 2016-04-15 18:23:33 +0200 | [diff] [blame] | 140 | mode->type |= DRM_MODE_TYPE_DRIVER; |
| 141 | |
| 142 | if (panel->desc->num_modes == 1) |
| 143 | mode->type |= DRM_MODE_TYPE_PREFERRED; |
| 144 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 145 | drm_mode_set_name(mode); |
| 146 | |
| 147 | drm_mode_probed_add(connector, mode); |
| 148 | num++; |
| 149 | } |
| 150 | |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 151 | connector->display_info.bpc = panel->desc->bpc; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 152 | connector->display_info.width_mm = panel->desc->size.width; |
| 153 | connector->display_info.height_mm = panel->desc->size.height; |
Boris Brezillon | 795f7ab | 2014-07-22 13:33:59 +0200 | [diff] [blame] | 154 | if (panel->desc->bus_format) |
| 155 | drm_display_info_set_bus_formats(&connector->display_info, |
| 156 | &panel->desc->bus_format, 1); |
Stefan Agner | f0aa083 | 2016-02-08 11:38:14 -0800 | [diff] [blame] | 157 | connector->display_info.bus_flags = panel->desc->bus_flags; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 158 | |
| 159 | return num; |
| 160 | } |
| 161 | |
| 162 | static int panel_simple_disable(struct drm_panel *panel) |
| 163 | { |
| 164 | struct panel_simple *p = to_panel_simple(panel); |
| 165 | |
| 166 | if (!p->enabled) |
| 167 | return 0; |
| 168 | |
| 169 | if (p->backlight) { |
| 170 | p->backlight->props.power = FB_BLANK_POWERDOWN; |
Thierry Reding | e4aa342 | 2016-06-17 19:11:53 +0200 | [diff] [blame] | 171 | p->backlight->props.state |= BL_CORE_FBBLANK; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 172 | backlight_update_status(p->backlight); |
| 173 | } |
| 174 | |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 175 | if (p->desc->delay.disable) |
| 176 | msleep(p->desc->delay.disable); |
| 177 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 178 | p->enabled = false; |
| 179 | |
| 180 | return 0; |
| 181 | } |
| 182 | |
Ajay Kumar | c0e1d17 | 2014-07-31 23:12:04 +0530 | [diff] [blame] | 183 | static int panel_simple_unprepare(struct drm_panel *panel) |
| 184 | { |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 185 | struct panel_simple *p = to_panel_simple(panel); |
| 186 | |
| 187 | if (!p->prepared) |
| 188 | return 0; |
| 189 | |
| 190 | if (p->enable_gpio) |
| 191 | gpiod_set_value_cansleep(p->enable_gpio, 0); |
| 192 | |
| 193 | regulator_disable(p->supply); |
| 194 | |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 195 | if (p->desc->delay.unprepare) |
| 196 | msleep(p->desc->delay.unprepare); |
| 197 | |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 198 | p->prepared = false; |
| 199 | |
Ajay Kumar | c0e1d17 | 2014-07-31 23:12:04 +0530 | [diff] [blame] | 200 | return 0; |
| 201 | } |
| 202 | |
| 203 | static int panel_simple_prepare(struct drm_panel *panel) |
| 204 | { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 205 | struct panel_simple *p = to_panel_simple(panel); |
| 206 | int err; |
| 207 | |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 208 | if (p->prepared) |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 209 | return 0; |
| 210 | |
| 211 | err = regulator_enable(p->supply); |
| 212 | if (err < 0) { |
| 213 | dev_err(panel->dev, "failed to enable supply: %d\n", err); |
| 214 | return err; |
| 215 | } |
| 216 | |
Alexandre Courbot | cfdf054 | 2014-03-01 14:00:58 +0900 | [diff] [blame] | 217 | if (p->enable_gpio) |
Thierry Reding | 15c1a91 | 2014-03-14 12:03:47 +0100 | [diff] [blame] | 218 | gpiod_set_value_cansleep(p->enable_gpio, 1); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 219 | |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 220 | if (p->desc->delay.prepare) |
| 221 | msleep(p->desc->delay.prepare); |
| 222 | |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 223 | p->prepared = true; |
| 224 | |
| 225 | return 0; |
| 226 | } |
| 227 | |
| 228 | static int panel_simple_enable(struct drm_panel *panel) |
| 229 | { |
| 230 | struct panel_simple *p = to_panel_simple(panel); |
| 231 | |
| 232 | if (p->enabled) |
| 233 | return 0; |
| 234 | |
Ajay Kumar | f673c37 | 2014-07-31 23:12:11 +0530 | [diff] [blame] | 235 | if (p->desc->delay.enable) |
| 236 | msleep(p->desc->delay.enable); |
| 237 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 238 | if (p->backlight) { |
Thierry Reding | e4aa342 | 2016-06-17 19:11:53 +0200 | [diff] [blame] | 239 | p->backlight->props.state &= ~BL_CORE_FBBLANK; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 240 | p->backlight->props.power = FB_BLANK_UNBLANK; |
| 241 | backlight_update_status(p->backlight); |
| 242 | } |
| 243 | |
| 244 | p->enabled = true; |
| 245 | |
| 246 | return 0; |
| 247 | } |
| 248 | |
| 249 | static int panel_simple_get_modes(struct drm_panel *panel) |
| 250 | { |
| 251 | struct panel_simple *p = to_panel_simple(panel); |
| 252 | int num = 0; |
| 253 | |
| 254 | /* probe EDID if a DDC bus is available */ |
| 255 | if (p->ddc) { |
| 256 | struct edid *edid = drm_get_edid(panel->connector, p->ddc); |
Stephen Warren | 70bf687 | 2014-01-09 11:37:34 -0700 | [diff] [blame] | 257 | drm_mode_connector_update_edid_property(panel->connector, edid); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 258 | if (edid) { |
| 259 | num += drm_add_edid_modes(panel->connector, edid); |
| 260 | kfree(edid); |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | /* add hard-coded panel modes */ |
| 265 | num += panel_simple_get_fixed_modes(p); |
| 266 | |
| 267 | return num; |
| 268 | } |
| 269 | |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 270 | static int panel_simple_get_timings(struct drm_panel *panel, |
| 271 | unsigned int num_timings, |
| 272 | struct display_timing *timings) |
| 273 | { |
| 274 | struct panel_simple *p = to_panel_simple(panel); |
| 275 | unsigned int i; |
| 276 | |
| 277 | if (p->desc->num_timings < num_timings) |
| 278 | num_timings = p->desc->num_timings; |
| 279 | |
| 280 | if (timings) |
| 281 | for (i = 0; i < num_timings; i++) |
| 282 | timings[i] = p->desc->timings[i]; |
| 283 | |
| 284 | return p->desc->num_timings; |
| 285 | } |
| 286 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 287 | static const struct drm_panel_funcs panel_simple_funcs = { |
| 288 | .disable = panel_simple_disable, |
Ajay Kumar | c0e1d17 | 2014-07-31 23:12:04 +0530 | [diff] [blame] | 289 | .unprepare = panel_simple_unprepare, |
| 290 | .prepare = panel_simple_prepare, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 291 | .enable = panel_simple_enable, |
| 292 | .get_modes = panel_simple_get_modes, |
Philipp Zabel | a5d3e62 | 2014-12-11 18:32:45 +0100 | [diff] [blame] | 293 | .get_timings = panel_simple_get_timings, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 294 | }; |
| 295 | |
| 296 | static int panel_simple_probe(struct device *dev, const struct panel_desc *desc) |
| 297 | { |
| 298 | struct device_node *backlight, *ddc; |
| 299 | struct panel_simple *panel; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 300 | int err; |
| 301 | |
| 302 | panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL); |
| 303 | if (!panel) |
| 304 | return -ENOMEM; |
| 305 | |
| 306 | panel->enabled = false; |
Ajay Kumar | 613a633 | 2014-07-31 23:12:10 +0530 | [diff] [blame] | 307 | panel->prepared = false; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 308 | panel->desc = desc; |
| 309 | |
| 310 | panel->supply = devm_regulator_get(dev, "power"); |
| 311 | if (IS_ERR(panel->supply)) |
| 312 | return PTR_ERR(panel->supply); |
| 313 | |
Alexandre Courbot | a61400d | 2014-10-23 17:16:58 +0900 | [diff] [blame] | 314 | panel->enable_gpio = devm_gpiod_get_optional(dev, "enable", |
| 315 | GPIOD_OUT_LOW); |
Alexandre Courbot | cfdf054 | 2014-03-01 14:00:58 +0900 | [diff] [blame] | 316 | if (IS_ERR(panel->enable_gpio)) { |
| 317 | err = PTR_ERR(panel->enable_gpio); |
Alexandre Courbot | 9746c61 | 2014-07-25 23:47:25 +0900 | [diff] [blame] | 318 | dev_err(dev, "failed to request GPIO: %d\n", err); |
| 319 | return err; |
| 320 | } |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 321 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 322 | backlight = of_parse_phandle(dev->of_node, "backlight", 0); |
| 323 | if (backlight) { |
| 324 | panel->backlight = of_find_backlight_by_node(backlight); |
| 325 | of_node_put(backlight); |
| 326 | |
Alexandre Courbot | cfdf054 | 2014-03-01 14:00:58 +0900 | [diff] [blame] | 327 | if (!panel->backlight) |
| 328 | return -EPROBE_DEFER; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 329 | } |
| 330 | |
| 331 | ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0); |
| 332 | if (ddc) { |
| 333 | panel->ddc = of_find_i2c_adapter_by_node(ddc); |
| 334 | of_node_put(ddc); |
| 335 | |
| 336 | if (!panel->ddc) { |
| 337 | err = -EPROBE_DEFER; |
| 338 | goto free_backlight; |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | drm_panel_init(&panel->base); |
| 343 | panel->base.dev = dev; |
| 344 | panel->base.funcs = &panel_simple_funcs; |
| 345 | |
| 346 | err = drm_panel_add(&panel->base); |
| 347 | if (err < 0) |
| 348 | goto free_ddc; |
| 349 | |
| 350 | dev_set_drvdata(dev, panel); |
| 351 | |
| 352 | return 0; |
| 353 | |
| 354 | free_ddc: |
| 355 | if (panel->ddc) |
| 356 | put_device(&panel->ddc->dev); |
| 357 | free_backlight: |
| 358 | if (panel->backlight) |
| 359 | put_device(&panel->backlight->dev); |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 360 | |
| 361 | return err; |
| 362 | } |
| 363 | |
| 364 | static int panel_simple_remove(struct device *dev) |
| 365 | { |
| 366 | struct panel_simple *panel = dev_get_drvdata(dev); |
| 367 | |
| 368 | drm_panel_detach(&panel->base); |
| 369 | drm_panel_remove(&panel->base); |
| 370 | |
| 371 | panel_simple_disable(&panel->base); |
| 372 | |
| 373 | if (panel->ddc) |
| 374 | put_device(&panel->ddc->dev); |
| 375 | |
| 376 | if (panel->backlight) |
| 377 | put_device(&panel->backlight->dev); |
| 378 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 379 | return 0; |
| 380 | } |
| 381 | |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 382 | static void panel_simple_shutdown(struct device *dev) |
| 383 | { |
| 384 | struct panel_simple *panel = dev_get_drvdata(dev); |
| 385 | |
| 386 | panel_simple_disable(&panel->base); |
| 387 | } |
| 388 | |
Philipp Zabel | 1c550fa1 | 2015-02-11 18:50:09 +0100 | [diff] [blame] | 389 | static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = { |
| 390 | .clock = 33333, |
| 391 | .hdisplay = 800, |
| 392 | .hsync_start = 800 + 0, |
| 393 | .hsync_end = 800 + 0 + 255, |
| 394 | .htotal = 800 + 0 + 255 + 0, |
| 395 | .vdisplay = 480, |
| 396 | .vsync_start = 480 + 2, |
| 397 | .vsync_end = 480 + 2 + 45, |
| 398 | .vtotal = 480 + 2 + 45 + 0, |
| 399 | .vrefresh = 60, |
| 400 | .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, |
| 401 | }; |
| 402 | |
| 403 | static const struct panel_desc ampire_am800480r3tmqwa1h = { |
| 404 | .modes = &ire_am800480r3tmqwa1h_mode, |
| 405 | .num_modes = 1, |
| 406 | .bpc = 6, |
| 407 | .size = { |
| 408 | .width = 152, |
| 409 | .height = 91, |
| 410 | }, |
| 411 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 412 | }; |
| 413 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 414 | static const struct drm_display_mode auo_b101aw03_mode = { |
| 415 | .clock = 51450, |
| 416 | .hdisplay = 1024, |
| 417 | .hsync_start = 1024 + 156, |
| 418 | .hsync_end = 1024 + 156 + 8, |
| 419 | .htotal = 1024 + 156 + 8 + 156, |
| 420 | .vdisplay = 600, |
| 421 | .vsync_start = 600 + 16, |
| 422 | .vsync_end = 600 + 16 + 6, |
| 423 | .vtotal = 600 + 16 + 6 + 16, |
| 424 | .vrefresh = 60, |
| 425 | }; |
| 426 | |
| 427 | static const struct panel_desc auo_b101aw03 = { |
| 428 | .modes = &auo_b101aw03_mode, |
| 429 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 430 | .bpc = 6, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 431 | .size = { |
| 432 | .width = 223, |
| 433 | .height = 125, |
| 434 | }, |
| 435 | }; |
| 436 | |
Huang Lin | a531bc3 | 2015-02-28 10:18:58 +0800 | [diff] [blame] | 437 | static const struct drm_display_mode auo_b101ean01_mode = { |
| 438 | .clock = 72500, |
| 439 | .hdisplay = 1280, |
| 440 | .hsync_start = 1280 + 119, |
| 441 | .hsync_end = 1280 + 119 + 32, |
| 442 | .htotal = 1280 + 119 + 32 + 21, |
| 443 | .vdisplay = 800, |
| 444 | .vsync_start = 800 + 4, |
| 445 | .vsync_end = 800 + 4 + 20, |
| 446 | .vtotal = 800 + 4 + 20 + 8, |
| 447 | .vrefresh = 60, |
| 448 | }; |
| 449 | |
| 450 | static const struct panel_desc auo_b101ean01 = { |
| 451 | .modes = &auo_b101ean01_mode, |
| 452 | .num_modes = 1, |
| 453 | .bpc = 6, |
| 454 | .size = { |
| 455 | .width = 217, |
| 456 | .height = 136, |
| 457 | }, |
| 458 | }; |
| 459 | |
Rob Clark | dac746e | 2014-08-01 17:01:06 -0400 | [diff] [blame] | 460 | static const struct drm_display_mode auo_b101xtn01_mode = { |
| 461 | .clock = 72000, |
| 462 | .hdisplay = 1366, |
| 463 | .hsync_start = 1366 + 20, |
| 464 | .hsync_end = 1366 + 20 + 70, |
| 465 | .htotal = 1366 + 20 + 70, |
| 466 | .vdisplay = 768, |
| 467 | .vsync_start = 768 + 14, |
| 468 | .vsync_end = 768 + 14 + 42, |
| 469 | .vtotal = 768 + 14 + 42, |
| 470 | .vrefresh = 60, |
| 471 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 472 | }; |
| 473 | |
| 474 | static const struct panel_desc auo_b101xtn01 = { |
| 475 | .modes = &auo_b101xtn01_mode, |
| 476 | .num_modes = 1, |
| 477 | .bpc = 6, |
| 478 | .size = { |
| 479 | .width = 223, |
| 480 | .height = 125, |
| 481 | }, |
| 482 | }; |
| 483 | |
Ajay Kumar | e35e305 | 2014-09-01 15:40:02 +0530 | [diff] [blame] | 484 | static const struct drm_display_mode auo_b116xw03_mode = { |
| 485 | .clock = 70589, |
| 486 | .hdisplay = 1366, |
| 487 | .hsync_start = 1366 + 40, |
| 488 | .hsync_end = 1366 + 40 + 40, |
| 489 | .htotal = 1366 + 40 + 40 + 32, |
| 490 | .vdisplay = 768, |
| 491 | .vsync_start = 768 + 10, |
| 492 | .vsync_end = 768 + 10 + 12, |
| 493 | .vtotal = 768 + 10 + 12 + 6, |
| 494 | .vrefresh = 60, |
| 495 | }; |
| 496 | |
| 497 | static const struct panel_desc auo_b116xw03 = { |
| 498 | .modes = &auo_b116xw03_mode, |
| 499 | .num_modes = 1, |
| 500 | .bpc = 6, |
| 501 | .size = { |
| 502 | .width = 256, |
| 503 | .height = 144, |
| 504 | }, |
| 505 | }; |
| 506 | |
Stéphane Marchesin | a333f7a | 2014-05-23 19:27:59 -0700 | [diff] [blame] | 507 | static const struct drm_display_mode auo_b133xtn01_mode = { |
| 508 | .clock = 69500, |
| 509 | .hdisplay = 1366, |
| 510 | .hsync_start = 1366 + 48, |
| 511 | .hsync_end = 1366 + 48 + 32, |
| 512 | .htotal = 1366 + 48 + 32 + 20, |
| 513 | .vdisplay = 768, |
| 514 | .vsync_start = 768 + 3, |
| 515 | .vsync_end = 768 + 3 + 6, |
| 516 | .vtotal = 768 + 3 + 6 + 13, |
| 517 | .vrefresh = 60, |
| 518 | }; |
| 519 | |
| 520 | static const struct panel_desc auo_b133xtn01 = { |
| 521 | .modes = &auo_b133xtn01_mode, |
| 522 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 523 | .bpc = 6, |
Stéphane Marchesin | a333f7a | 2014-05-23 19:27:59 -0700 | [diff] [blame] | 524 | .size = { |
| 525 | .width = 293, |
| 526 | .height = 165, |
| 527 | }, |
| 528 | }; |
| 529 | |
Ajay Kumar | 3e51d60 | 2014-07-31 23:12:12 +0530 | [diff] [blame] | 530 | static const struct drm_display_mode auo_b133htn01_mode = { |
| 531 | .clock = 150660, |
| 532 | .hdisplay = 1920, |
| 533 | .hsync_start = 1920 + 172, |
| 534 | .hsync_end = 1920 + 172 + 80, |
| 535 | .htotal = 1920 + 172 + 80 + 60, |
| 536 | .vdisplay = 1080, |
| 537 | .vsync_start = 1080 + 25, |
| 538 | .vsync_end = 1080 + 25 + 10, |
| 539 | .vtotal = 1080 + 25 + 10 + 10, |
| 540 | .vrefresh = 60, |
| 541 | }; |
| 542 | |
| 543 | static const struct panel_desc auo_b133htn01 = { |
| 544 | .modes = &auo_b133htn01_mode, |
| 545 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 546 | .bpc = 6, |
Ajay Kumar | 3e51d60 | 2014-07-31 23:12:12 +0530 | [diff] [blame] | 547 | .size = { |
| 548 | .width = 293, |
| 549 | .height = 165, |
| 550 | }, |
| 551 | .delay = { |
| 552 | .prepare = 105, |
| 553 | .enable = 20, |
| 554 | .unprepare = 50, |
| 555 | }, |
| 556 | }; |
| 557 | |
Haixia Shi | 7ee933a | 2016-10-11 14:59:16 -0700 | [diff] [blame] | 558 | static const struct drm_display_mode auo_t215hvn01_mode = { |
| 559 | .clock = 148800, |
| 560 | .hdisplay = 1920, |
| 561 | .hsync_start = 1920 + 88, |
| 562 | .hsync_end = 1920 + 88 + 44, |
| 563 | .htotal = 1920 + 88 + 44 + 148, |
| 564 | .vdisplay = 1080, |
| 565 | .vsync_start = 1080 + 4, |
| 566 | .vsync_end = 1080 + 4 + 5, |
| 567 | .vtotal = 1080 + 4 + 5 + 36, |
| 568 | .vrefresh = 60, |
| 569 | }; |
| 570 | |
| 571 | static const struct panel_desc auo_t215hvn01 = { |
| 572 | .modes = &auo_t215hvn01_mode, |
| 573 | .num_modes = 1, |
| 574 | .bpc = 8, |
| 575 | .size = { |
| 576 | .width = 430, |
| 577 | .height = 270, |
| 578 | }, |
| 579 | .delay = { |
| 580 | .disable = 5, |
| 581 | .unprepare = 1000, |
| 582 | } |
| 583 | }; |
| 584 | |
Philipp Zabel | d47df63 | 2014-12-18 16:43:43 +0100 | [diff] [blame] | 585 | static const struct drm_display_mode avic_tm070ddh03_mode = { |
| 586 | .clock = 51200, |
| 587 | .hdisplay = 1024, |
| 588 | .hsync_start = 1024 + 160, |
| 589 | .hsync_end = 1024 + 160 + 4, |
| 590 | .htotal = 1024 + 160 + 4 + 156, |
| 591 | .vdisplay = 600, |
| 592 | .vsync_start = 600 + 17, |
| 593 | .vsync_end = 600 + 17 + 1, |
| 594 | .vtotal = 600 + 17 + 1 + 17, |
| 595 | .vrefresh = 60, |
| 596 | }; |
| 597 | |
| 598 | static const struct panel_desc avic_tm070ddh03 = { |
| 599 | .modes = &avic_tm070ddh03_mode, |
| 600 | .num_modes = 1, |
| 601 | .bpc = 8, |
| 602 | .size = { |
| 603 | .width = 154, |
| 604 | .height = 90, |
| 605 | }, |
| 606 | .delay = { |
| 607 | .prepare = 20, |
| 608 | .enable = 200, |
| 609 | .disable = 200, |
| 610 | }, |
| 611 | }; |
| 612 | |
Randy Li | 2cb35c8 | 2016-09-20 03:02:51 +0800 | [diff] [blame] | 613 | static const struct drm_display_mode chunghwa_claa070wp03xg_mode = { |
| 614 | .clock = 66770, |
| 615 | .hdisplay = 800, |
| 616 | .hsync_start = 800 + 49, |
| 617 | .hsync_end = 800 + 49 + 33, |
| 618 | .htotal = 800 + 49 + 33 + 17, |
| 619 | .vdisplay = 1280, |
| 620 | .vsync_start = 1280 + 1, |
| 621 | .vsync_end = 1280 + 1 + 7, |
| 622 | .vtotal = 1280 + 1 + 7 + 15, |
| 623 | .vrefresh = 60, |
| 624 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 625 | }; |
| 626 | |
| 627 | static const struct panel_desc chunghwa_claa070wp03xg = { |
| 628 | .modes = &chunghwa_claa070wp03xg_mode, |
| 629 | .num_modes = 1, |
| 630 | .bpc = 6, |
| 631 | .size = { |
| 632 | .width = 94, |
| 633 | .height = 150, |
| 634 | }, |
| 635 | }; |
| 636 | |
Stephen Warren | 4c93075 | 2014-01-07 16:46:26 -0700 | [diff] [blame] | 637 | static const struct drm_display_mode chunghwa_claa101wa01a_mode = { |
| 638 | .clock = 72070, |
| 639 | .hdisplay = 1366, |
| 640 | .hsync_start = 1366 + 58, |
| 641 | .hsync_end = 1366 + 58 + 58, |
| 642 | .htotal = 1366 + 58 + 58 + 58, |
| 643 | .vdisplay = 768, |
| 644 | .vsync_start = 768 + 4, |
| 645 | .vsync_end = 768 + 4 + 4, |
| 646 | .vtotal = 768 + 4 + 4 + 4, |
| 647 | .vrefresh = 60, |
| 648 | }; |
| 649 | |
| 650 | static const struct panel_desc chunghwa_claa101wa01a = { |
| 651 | .modes = &chunghwa_claa101wa01a_mode, |
| 652 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 653 | .bpc = 6, |
Stephen Warren | 4c93075 | 2014-01-07 16:46:26 -0700 | [diff] [blame] | 654 | .size = { |
| 655 | .width = 220, |
| 656 | .height = 120, |
| 657 | }, |
| 658 | }; |
| 659 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 660 | static const struct drm_display_mode chunghwa_claa101wb01_mode = { |
| 661 | .clock = 69300, |
| 662 | .hdisplay = 1366, |
| 663 | .hsync_start = 1366 + 48, |
| 664 | .hsync_end = 1366 + 48 + 32, |
| 665 | .htotal = 1366 + 48 + 32 + 20, |
| 666 | .vdisplay = 768, |
| 667 | .vsync_start = 768 + 16, |
| 668 | .vsync_end = 768 + 16 + 8, |
| 669 | .vtotal = 768 + 16 + 8 + 16, |
| 670 | .vrefresh = 60, |
| 671 | }; |
| 672 | |
| 673 | static const struct panel_desc chunghwa_claa101wb01 = { |
| 674 | .modes = &chunghwa_claa101wb01_mode, |
| 675 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 676 | .bpc = 6, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 677 | .size = { |
| 678 | .width = 223, |
| 679 | .height = 125, |
| 680 | }, |
| 681 | }; |
| 682 | |
Stefan Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 683 | static const struct drm_display_mode edt_et057090dhu_mode = { |
| 684 | .clock = 25175, |
| 685 | .hdisplay = 640, |
| 686 | .hsync_start = 640 + 16, |
| 687 | .hsync_end = 640 + 16 + 30, |
| 688 | .htotal = 640 + 16 + 30 + 114, |
| 689 | .vdisplay = 480, |
| 690 | .vsync_start = 480 + 10, |
| 691 | .vsync_end = 480 + 10 + 3, |
| 692 | .vtotal = 480 + 10 + 3 + 32, |
| 693 | .vrefresh = 60, |
| 694 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 695 | }; |
| 696 | |
| 697 | static const struct panel_desc edt_et057090dhu = { |
| 698 | .modes = &edt_et057090dhu_mode, |
| 699 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 700 | .bpc = 6, |
Stefan Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 701 | .size = { |
| 702 | .width = 115, |
| 703 | .height = 86, |
| 704 | }, |
| 705 | }; |
| 706 | |
Philipp Zabel | fff5de4 | 2014-05-15 12:25:47 +0200 | [diff] [blame] | 707 | static const struct drm_display_mode edt_etm0700g0dh6_mode = { |
| 708 | .clock = 33260, |
| 709 | .hdisplay = 800, |
| 710 | .hsync_start = 800 + 40, |
| 711 | .hsync_end = 800 + 40 + 128, |
| 712 | .htotal = 800 + 40 + 128 + 88, |
| 713 | .vdisplay = 480, |
| 714 | .vsync_start = 480 + 10, |
| 715 | .vsync_end = 480 + 10 + 2, |
| 716 | .vtotal = 480 + 10 + 2 + 33, |
| 717 | .vrefresh = 60, |
| 718 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 719 | }; |
| 720 | |
| 721 | static const struct panel_desc edt_etm0700g0dh6 = { |
| 722 | .modes = &edt_etm0700g0dh6_mode, |
| 723 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 724 | .bpc = 6, |
Philipp Zabel | fff5de4 | 2014-05-15 12:25:47 +0200 | [diff] [blame] | 725 | .size = { |
| 726 | .width = 152, |
| 727 | .height = 91, |
| 728 | }, |
| 729 | }; |
| 730 | |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 731 | static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = { |
| 732 | .clock = 32260, |
| 733 | .hdisplay = 800, |
| 734 | .hsync_start = 800 + 168, |
| 735 | .hsync_end = 800 + 168 + 64, |
| 736 | .htotal = 800 + 168 + 64 + 88, |
| 737 | .vdisplay = 480, |
| 738 | .vsync_start = 480 + 37, |
| 739 | .vsync_end = 480 + 37 + 2, |
| 740 | .vtotal = 480 + 37 + 2 + 8, |
| 741 | .vrefresh = 60, |
| 742 | }; |
| 743 | |
| 744 | static const struct panel_desc foxlink_fl500wvr00_a0t = { |
| 745 | .modes = &foxlink_fl500wvr00_a0t_mode, |
| 746 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 747 | .bpc = 8, |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 748 | .size = { |
| 749 | .width = 108, |
| 750 | .height = 65, |
| 751 | }, |
Boris Brezillon | bb276cb | 2014-07-22 13:35:47 +0200 | [diff] [blame] | 752 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 753 | }; |
| 754 | |
Philipp Zabel | d435a2a | 2014-11-19 10:29:55 +0100 | [diff] [blame] | 755 | static const struct drm_display_mode giantplus_gpg482739qs5_mode = { |
| 756 | .clock = 9000, |
| 757 | .hdisplay = 480, |
| 758 | .hsync_start = 480 + 5, |
| 759 | .hsync_end = 480 + 5 + 1, |
| 760 | .htotal = 480 + 5 + 1 + 40, |
| 761 | .vdisplay = 272, |
| 762 | .vsync_start = 272 + 8, |
| 763 | .vsync_end = 272 + 8 + 1, |
| 764 | .vtotal = 272 + 8 + 1 + 8, |
| 765 | .vrefresh = 60, |
| 766 | }; |
| 767 | |
| 768 | static const struct panel_desc giantplus_gpg482739qs5 = { |
| 769 | .modes = &giantplus_gpg482739qs5_mode, |
| 770 | .num_modes = 1, |
| 771 | .bpc = 8, |
| 772 | .size = { |
| 773 | .width = 95, |
| 774 | .height = 54, |
| 775 | }, |
Philipp Zabel | 33536a0 | 2015-02-11 18:50:07 +0100 | [diff] [blame] | 776 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Philipp Zabel | d435a2a | 2014-11-19 10:29:55 +0100 | [diff] [blame] | 777 | }; |
| 778 | |
Philipp Zabel | ab07725 | 2014-12-11 18:32:46 +0100 | [diff] [blame] | 779 | static const struct display_timing hannstar_hsd070pww1_timing = { |
| 780 | .pixelclock = { 64300000, 71100000, 82000000 }, |
| 781 | .hactive = { 1280, 1280, 1280 }, |
| 782 | .hfront_porch = { 1, 1, 10 }, |
| 783 | .hback_porch = { 1, 1, 10 }, |
Philipp Zabel | d901d2b | 2015-08-12 12:32:13 +0200 | [diff] [blame] | 784 | /* |
| 785 | * According to the data sheet, the minimum horizontal blanking interval |
| 786 | * is 54 clocks (1 + 52 + 1), but tests with a Nitrogen6X have shown the |
| 787 | * minimum working horizontal blanking interval to be 60 clocks. |
| 788 | */ |
| 789 | .hsync_len = { 58, 158, 661 }, |
Philipp Zabel | ab07725 | 2014-12-11 18:32:46 +0100 | [diff] [blame] | 790 | .vactive = { 800, 800, 800 }, |
| 791 | .vfront_porch = { 1, 1, 10 }, |
| 792 | .vback_porch = { 1, 1, 10 }, |
| 793 | .vsync_len = { 1, 21, 203 }, |
| 794 | .flags = DISPLAY_FLAGS_DE_HIGH, |
Philipp Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 795 | }; |
| 796 | |
| 797 | static const struct panel_desc hannstar_hsd070pww1 = { |
Philipp Zabel | ab07725 | 2014-12-11 18:32:46 +0100 | [diff] [blame] | 798 | .timings = &hannstar_hsd070pww1_timing, |
| 799 | .num_timings = 1, |
Philipp Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 800 | .bpc = 6, |
| 801 | .size = { |
| 802 | .width = 151, |
| 803 | .height = 94, |
| 804 | }, |
Philipp Zabel | 58d6a7b | 2015-08-12 12:32:12 +0200 | [diff] [blame] | 805 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Philipp Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 806 | }; |
| 807 | |
Eric Nelson | c0d607e | 2015-04-13 15:09:26 -0700 | [diff] [blame] | 808 | static const struct display_timing hannstar_hsd100pxn1_timing = { |
| 809 | .pixelclock = { 55000000, 65000000, 75000000 }, |
| 810 | .hactive = { 1024, 1024, 1024 }, |
| 811 | .hfront_porch = { 40, 40, 40 }, |
| 812 | .hback_porch = { 220, 220, 220 }, |
| 813 | .hsync_len = { 20, 60, 100 }, |
| 814 | .vactive = { 768, 768, 768 }, |
| 815 | .vfront_porch = { 7, 7, 7 }, |
| 816 | .vback_porch = { 21, 21, 21 }, |
| 817 | .vsync_len = { 10, 10, 10 }, |
| 818 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 819 | }; |
| 820 | |
| 821 | static const struct panel_desc hannstar_hsd100pxn1 = { |
| 822 | .timings = &hannstar_hsd100pxn1_timing, |
| 823 | .num_timings = 1, |
| 824 | .bpc = 6, |
| 825 | .size = { |
| 826 | .width = 203, |
| 827 | .height = 152, |
| 828 | }, |
Philipp Zabel | 4946b04 | 2015-05-20 11:34:08 +0200 | [diff] [blame] | 829 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
Eric Nelson | c0d607e | 2015-04-13 15:09:26 -0700 | [diff] [blame] | 830 | }; |
| 831 | |
Lucas Stach | 61ac0bf | 2014-11-06 17:44:35 +0100 | [diff] [blame] | 832 | static const struct drm_display_mode hitachi_tx23d38vm0caa_mode = { |
| 833 | .clock = 33333, |
| 834 | .hdisplay = 800, |
| 835 | .hsync_start = 800 + 85, |
| 836 | .hsync_end = 800 + 85 + 86, |
| 837 | .htotal = 800 + 85 + 86 + 85, |
| 838 | .vdisplay = 480, |
| 839 | .vsync_start = 480 + 16, |
| 840 | .vsync_end = 480 + 16 + 13, |
| 841 | .vtotal = 480 + 16 + 13 + 16, |
| 842 | .vrefresh = 60, |
| 843 | }; |
| 844 | |
| 845 | static const struct panel_desc hitachi_tx23d38vm0caa = { |
| 846 | .modes = &hitachi_tx23d38vm0caa_mode, |
| 847 | .num_modes = 1, |
| 848 | .bpc = 6, |
| 849 | .size = { |
| 850 | .width = 195, |
| 851 | .height = 117, |
| 852 | }, |
| 853 | }; |
| 854 | |
Nicolas Ferre | 41bcceb | 2015-03-19 14:43:01 +0100 | [diff] [blame] | 855 | static const struct drm_display_mode innolux_at043tn24_mode = { |
| 856 | .clock = 9000, |
| 857 | .hdisplay = 480, |
| 858 | .hsync_start = 480 + 2, |
| 859 | .hsync_end = 480 + 2 + 41, |
| 860 | .htotal = 480 + 2 + 41 + 2, |
| 861 | .vdisplay = 272, |
| 862 | .vsync_start = 272 + 2, |
| 863 | .vsync_end = 272 + 2 + 11, |
| 864 | .vtotal = 272 + 2 + 11 + 2, |
| 865 | .vrefresh = 60, |
| 866 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 867 | }; |
| 868 | |
| 869 | static const struct panel_desc innolux_at043tn24 = { |
| 870 | .modes = &innolux_at043tn24_mode, |
| 871 | .num_modes = 1, |
| 872 | .bpc = 8, |
| 873 | .size = { |
| 874 | .width = 95, |
| 875 | .height = 54, |
| 876 | }, |
| 877 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 878 | }; |
| 879 | |
Riccardo Bortolato | 4fc24ab | 2016-04-20 15:37:15 +0200 | [diff] [blame] | 880 | static const struct drm_display_mode innolux_at070tn92_mode = { |
| 881 | .clock = 33333, |
| 882 | .hdisplay = 800, |
| 883 | .hsync_start = 800 + 210, |
| 884 | .hsync_end = 800 + 210 + 20, |
| 885 | .htotal = 800 + 210 + 20 + 46, |
| 886 | .vdisplay = 480, |
| 887 | .vsync_start = 480 + 22, |
| 888 | .vsync_end = 480 + 22 + 10, |
| 889 | .vtotal = 480 + 22 + 23 + 10, |
| 890 | .vrefresh = 60, |
| 891 | }; |
| 892 | |
| 893 | static const struct panel_desc innolux_at070tn92 = { |
| 894 | .modes = &innolux_at070tn92_mode, |
| 895 | .num_modes = 1, |
| 896 | .size = { |
| 897 | .width = 154, |
| 898 | .height = 86, |
| 899 | }, |
| 900 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 901 | }; |
| 902 | |
Michael Olbrich | 1e29b84 | 2016-08-15 14:32:02 +0200 | [diff] [blame] | 903 | static const struct display_timing innolux_g101ice_l01_timing = { |
| 904 | .pixelclock = { 60400000, 71100000, 74700000 }, |
| 905 | .hactive = { 1280, 1280, 1280 }, |
| 906 | .hfront_porch = { 41, 80, 100 }, |
| 907 | .hback_porch = { 40, 79, 99 }, |
| 908 | .hsync_len = { 1, 1, 1 }, |
| 909 | .vactive = { 800, 800, 800 }, |
| 910 | .vfront_porch = { 5, 11, 14 }, |
| 911 | .vback_porch = { 4, 11, 14 }, |
| 912 | .vsync_len = { 1, 1, 1 }, |
| 913 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 914 | }; |
| 915 | |
| 916 | static const struct panel_desc innolux_g101ice_l01 = { |
| 917 | .timings = &innolux_g101ice_l01_timing, |
| 918 | .num_timings = 1, |
| 919 | .bpc = 8, |
| 920 | .size = { |
| 921 | .width = 217, |
| 922 | .height = 135, |
| 923 | }, |
| 924 | .delay = { |
| 925 | .enable = 200, |
| 926 | .disable = 200, |
| 927 | }, |
| 928 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 929 | }; |
| 930 | |
Lucas Stach | d731f66 | 2014-11-06 17:44:33 +0100 | [diff] [blame] | 931 | static const struct drm_display_mode innolux_g121i1_l01_mode = { |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 932 | .clock = 71000, |
Lucas Stach | d731f66 | 2014-11-06 17:44:33 +0100 | [diff] [blame] | 933 | .hdisplay = 1280, |
| 934 | .hsync_start = 1280 + 64, |
| 935 | .hsync_end = 1280 + 64 + 32, |
| 936 | .htotal = 1280 + 64 + 32 + 64, |
| 937 | .vdisplay = 800, |
| 938 | .vsync_start = 800 + 9, |
| 939 | .vsync_end = 800 + 9 + 6, |
| 940 | .vtotal = 800 + 9 + 6 + 9, |
| 941 | .vrefresh = 60, |
| 942 | }; |
| 943 | |
| 944 | static const struct panel_desc innolux_g121i1_l01 = { |
| 945 | .modes = &innolux_g121i1_l01_mode, |
| 946 | .num_modes = 1, |
| 947 | .bpc = 6, |
| 948 | .size = { |
| 949 | .width = 261, |
| 950 | .height = 163, |
| 951 | }, |
| 952 | }; |
| 953 | |
Akshay Bhat | f8fa17b | 2015-11-18 15:57:47 -0500 | [diff] [blame] | 954 | static const struct drm_display_mode innolux_g121x1_l03_mode = { |
| 955 | .clock = 65000, |
| 956 | .hdisplay = 1024, |
| 957 | .hsync_start = 1024 + 0, |
| 958 | .hsync_end = 1024 + 1, |
| 959 | .htotal = 1024 + 0 + 1 + 320, |
| 960 | .vdisplay = 768, |
| 961 | .vsync_start = 768 + 38, |
| 962 | .vsync_end = 768 + 38 + 1, |
| 963 | .vtotal = 768 + 38 + 1 + 0, |
| 964 | .vrefresh = 60, |
Akshay Bhat | 2e8c5eb | 2016-03-01 18:06:54 -0500 | [diff] [blame] | 965 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
Akshay Bhat | f8fa17b | 2015-11-18 15:57:47 -0500 | [diff] [blame] | 966 | }; |
| 967 | |
| 968 | static const struct panel_desc innolux_g121x1_l03 = { |
| 969 | .modes = &innolux_g121x1_l03_mode, |
| 970 | .num_modes = 1, |
| 971 | .bpc = 6, |
| 972 | .size = { |
| 973 | .width = 246, |
| 974 | .height = 185, |
| 975 | }, |
| 976 | .delay = { |
| 977 | .enable = 200, |
| 978 | .unprepare = 200, |
| 979 | .disable = 400, |
| 980 | }, |
| 981 | }; |
| 982 | |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 983 | static const struct drm_display_mode innolux_n116bge_mode = { |
Daniel Kurtz | 7fe8c77 | 2014-09-02 10:56:46 +0800 | [diff] [blame] | 984 | .clock = 76420, |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 985 | .hdisplay = 1366, |
Daniel Kurtz | 7fe8c77 | 2014-09-02 10:56:46 +0800 | [diff] [blame] | 986 | .hsync_start = 1366 + 136, |
| 987 | .hsync_end = 1366 + 136 + 30, |
| 988 | .htotal = 1366 + 136 + 30 + 60, |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 989 | .vdisplay = 768, |
| 990 | .vsync_start = 768 + 8, |
Daniel Kurtz | 7fe8c77 | 2014-09-02 10:56:46 +0800 | [diff] [blame] | 991 | .vsync_end = 768 + 8 + 12, |
| 992 | .vtotal = 768 + 8 + 12 + 12, |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 993 | .vrefresh = 60, |
| 994 | .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, |
| 995 | }; |
| 996 | |
| 997 | static const struct panel_desc innolux_n116bge = { |
| 998 | .modes = &innolux_n116bge_mode, |
| 999 | .num_modes = 1, |
| 1000 | .bpc = 6, |
| 1001 | .size = { |
| 1002 | .width = 256, |
| 1003 | .height = 144, |
| 1004 | }, |
| 1005 | }; |
| 1006 | |
Alban Bedel | ea44739 | 2014-07-22 08:38:55 +0200 | [diff] [blame] | 1007 | static const struct drm_display_mode innolux_n156bge_l21_mode = { |
| 1008 | .clock = 69300, |
| 1009 | .hdisplay = 1366, |
| 1010 | .hsync_start = 1366 + 16, |
| 1011 | .hsync_end = 1366 + 16 + 34, |
| 1012 | .htotal = 1366 + 16 + 34 + 50, |
| 1013 | .vdisplay = 768, |
| 1014 | .vsync_start = 768 + 2, |
| 1015 | .vsync_end = 768 + 2 + 6, |
| 1016 | .vtotal = 768 + 2 + 6 + 12, |
| 1017 | .vrefresh = 60, |
| 1018 | }; |
| 1019 | |
| 1020 | static const struct panel_desc innolux_n156bge_l21 = { |
| 1021 | .modes = &innolux_n156bge_l21_mode, |
| 1022 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1023 | .bpc = 6, |
Alban Bedel | ea44739 | 2014-07-22 08:38:55 +0200 | [diff] [blame] | 1024 | .size = { |
| 1025 | .width = 344, |
| 1026 | .height = 193, |
| 1027 | }, |
| 1028 | }; |
| 1029 | |
Michael Grzeschik | bccac3f | 2015-03-19 12:22:44 +0100 | [diff] [blame] | 1030 | static const struct drm_display_mode innolux_zj070na_01p_mode = { |
| 1031 | .clock = 51501, |
| 1032 | .hdisplay = 1024, |
| 1033 | .hsync_start = 1024 + 128, |
| 1034 | .hsync_end = 1024 + 128 + 64, |
| 1035 | .htotal = 1024 + 128 + 64 + 128, |
| 1036 | .vdisplay = 600, |
| 1037 | .vsync_start = 600 + 16, |
| 1038 | .vsync_end = 600 + 16 + 4, |
| 1039 | .vtotal = 600 + 16 + 4 + 16, |
| 1040 | .vrefresh = 60, |
| 1041 | }; |
| 1042 | |
| 1043 | static const struct panel_desc innolux_zj070na_01p = { |
| 1044 | .modes = &innolux_zj070na_01p_mode, |
| 1045 | .num_modes = 1, |
| 1046 | .bpc = 6, |
| 1047 | .size = { |
Thierry Reding | 8159884 | 2016-06-10 15:33:13 +0200 | [diff] [blame] | 1048 | .width = 154, |
| 1049 | .height = 90, |
Michael Grzeschik | bccac3f | 2015-03-19 12:22:44 +0100 | [diff] [blame] | 1050 | }, |
| 1051 | }; |
| 1052 | |
Lucas Stach | 8def22e | 2015-12-02 19:41:11 +0100 | [diff] [blame] | 1053 | static const struct display_timing kyo_tcg121xglp_timing = { |
| 1054 | .pixelclock = { 52000000, 65000000, 71000000 }, |
| 1055 | .hactive = { 1024, 1024, 1024 }, |
| 1056 | .hfront_porch = { 2, 2, 2 }, |
| 1057 | .hback_porch = { 2, 2, 2 }, |
| 1058 | .hsync_len = { 86, 124, 244 }, |
| 1059 | .vactive = { 768, 768, 768 }, |
| 1060 | .vfront_porch = { 2, 2, 2 }, |
| 1061 | .vback_porch = { 2, 2, 2 }, |
| 1062 | .vsync_len = { 6, 34, 73 }, |
| 1063 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 1064 | }; |
| 1065 | |
| 1066 | static const struct panel_desc kyo_tcg121xglp = { |
| 1067 | .timings = &kyo_tcg121xglp_timing, |
| 1068 | .num_timings = 1, |
| 1069 | .bpc = 8, |
| 1070 | .size = { |
| 1071 | .width = 246, |
| 1072 | .height = 184, |
| 1073 | }, |
| 1074 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 1075 | }; |
| 1076 | |
Heiko Schocher | dd01500 | 2015-05-22 10:25:57 +0200 | [diff] [blame] | 1077 | static const struct drm_display_mode lg_lb070wv8_mode = { |
| 1078 | .clock = 33246, |
| 1079 | .hdisplay = 800, |
| 1080 | .hsync_start = 800 + 88, |
| 1081 | .hsync_end = 800 + 88 + 80, |
| 1082 | .htotal = 800 + 88 + 80 + 88, |
| 1083 | .vdisplay = 480, |
| 1084 | .vsync_start = 480 + 10, |
| 1085 | .vsync_end = 480 + 10 + 25, |
| 1086 | .vtotal = 480 + 10 + 25 + 10, |
| 1087 | .vrefresh = 60, |
| 1088 | }; |
| 1089 | |
| 1090 | static const struct panel_desc lg_lb070wv8 = { |
| 1091 | .modes = &lg_lb070wv8_mode, |
| 1092 | .num_modes = 1, |
| 1093 | .bpc = 16, |
| 1094 | .size = { |
| 1095 | .width = 151, |
| 1096 | .height = 91, |
| 1097 | }, |
| 1098 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 1099 | }; |
| 1100 | |
Yakir Yang | c5ece40 | 2016-06-28 12:51:15 +0800 | [diff] [blame] | 1101 | static const struct drm_display_mode lg_lp079qx1_sp0v_mode = { |
| 1102 | .clock = 200000, |
| 1103 | .hdisplay = 1536, |
| 1104 | .hsync_start = 1536 + 12, |
| 1105 | .hsync_end = 1536 + 12 + 16, |
| 1106 | .htotal = 1536 + 12 + 16 + 48, |
| 1107 | .vdisplay = 2048, |
| 1108 | .vsync_start = 2048 + 8, |
| 1109 | .vsync_end = 2048 + 8 + 4, |
| 1110 | .vtotal = 2048 + 8 + 4 + 8, |
| 1111 | .vrefresh = 60, |
| 1112 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 1113 | }; |
| 1114 | |
| 1115 | static const struct panel_desc lg_lp079qx1_sp0v = { |
| 1116 | .modes = &lg_lp079qx1_sp0v_mode, |
| 1117 | .num_modes = 1, |
| 1118 | .size = { |
| 1119 | .width = 129, |
| 1120 | .height = 171, |
| 1121 | }, |
| 1122 | }; |
| 1123 | |
Yakir Yang | 0355dde | 2016-06-12 10:56:02 +0800 | [diff] [blame] | 1124 | static const struct drm_display_mode lg_lp097qx1_spa1_mode = { |
| 1125 | .clock = 205210, |
| 1126 | .hdisplay = 2048, |
| 1127 | .hsync_start = 2048 + 150, |
| 1128 | .hsync_end = 2048 + 150 + 5, |
| 1129 | .htotal = 2048 + 150 + 5 + 5, |
| 1130 | .vdisplay = 1536, |
| 1131 | .vsync_start = 1536 + 3, |
| 1132 | .vsync_end = 1536 + 3 + 1, |
| 1133 | .vtotal = 1536 + 3 + 1 + 9, |
| 1134 | .vrefresh = 60, |
| 1135 | }; |
| 1136 | |
| 1137 | static const struct panel_desc lg_lp097qx1_spa1 = { |
| 1138 | .modes = &lg_lp097qx1_spa1_mode, |
| 1139 | .num_modes = 1, |
| 1140 | .size = { |
| 1141 | .width = 208, |
| 1142 | .height = 147, |
| 1143 | }, |
| 1144 | }; |
| 1145 | |
Jitao Shi | 690d8fa | 2016-02-22 19:01:44 +0800 | [diff] [blame] | 1146 | static const struct drm_display_mode lg_lp120up1_mode = { |
| 1147 | .clock = 162300, |
| 1148 | .hdisplay = 1920, |
| 1149 | .hsync_start = 1920 + 40, |
| 1150 | .hsync_end = 1920 + 40 + 40, |
| 1151 | .htotal = 1920 + 40 + 40+ 80, |
| 1152 | .vdisplay = 1280, |
| 1153 | .vsync_start = 1280 + 4, |
| 1154 | .vsync_end = 1280 + 4 + 4, |
| 1155 | .vtotal = 1280 + 4 + 4 + 12, |
| 1156 | .vrefresh = 60, |
| 1157 | }; |
| 1158 | |
| 1159 | static const struct panel_desc lg_lp120up1 = { |
| 1160 | .modes = &lg_lp120up1_mode, |
| 1161 | .num_modes = 1, |
| 1162 | .bpc = 8, |
| 1163 | .size = { |
| 1164 | .width = 267, |
| 1165 | .height = 183, |
| 1166 | }, |
| 1167 | }; |
| 1168 | |
Thierry Reding | ec7c565 | 2013-11-15 15:59:32 +0100 | [diff] [blame] | 1169 | static const struct drm_display_mode lg_lp129qe_mode = { |
| 1170 | .clock = 285250, |
| 1171 | .hdisplay = 2560, |
| 1172 | .hsync_start = 2560 + 48, |
| 1173 | .hsync_end = 2560 + 48 + 32, |
| 1174 | .htotal = 2560 + 48 + 32 + 80, |
| 1175 | .vdisplay = 1700, |
| 1176 | .vsync_start = 1700 + 3, |
| 1177 | .vsync_end = 1700 + 3 + 10, |
| 1178 | .vtotal = 1700 + 3 + 10 + 36, |
| 1179 | .vrefresh = 60, |
| 1180 | }; |
| 1181 | |
| 1182 | static const struct panel_desc lg_lp129qe = { |
| 1183 | .modes = &lg_lp129qe_mode, |
| 1184 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1185 | .bpc = 8, |
Thierry Reding | ec7c565 | 2013-11-15 15:59:32 +0100 | [diff] [blame] | 1186 | .size = { |
| 1187 | .width = 272, |
| 1188 | .height = 181, |
| 1189 | }, |
| 1190 | }; |
| 1191 | |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 1192 | static const struct drm_display_mode nec_nl4827hc19_05b_mode = { |
| 1193 | .clock = 10870, |
| 1194 | .hdisplay = 480, |
| 1195 | .hsync_start = 480 + 2, |
| 1196 | .hsync_end = 480 + 2 + 41, |
| 1197 | .htotal = 480 + 2 + 41 + 2, |
| 1198 | .vdisplay = 272, |
| 1199 | .vsync_start = 272 + 2, |
| 1200 | .vsync_end = 272 + 2 + 4, |
| 1201 | .vtotal = 272 + 2 + 4 + 2, |
| 1202 | .vrefresh = 74, |
Stefan Agner | 4bc390c | 2015-11-17 19:10:29 -0800 | [diff] [blame] | 1203 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 1204 | }; |
| 1205 | |
| 1206 | static const struct panel_desc nec_nl4827hc19_05b = { |
| 1207 | .modes = &nec_nl4827hc19_05b_mode, |
| 1208 | .num_modes = 1, |
| 1209 | .bpc = 8, |
| 1210 | .size = { |
| 1211 | .width = 95, |
| 1212 | .height = 54, |
| 1213 | }, |
Stefan Agner | 2c80661 | 2016-02-08 12:50:13 -0800 | [diff] [blame] | 1214 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 1215 | .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE, |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 1216 | }; |
| 1217 | |
Fabien Lahoudere | 05ec0e4 | 2016-10-17 11:38:01 +0200 | [diff] [blame] | 1218 | static const struct drm_display_mode nvd_9128_mode = { |
| 1219 | .clock = 29500, |
| 1220 | .hdisplay = 800, |
| 1221 | .hsync_start = 800 + 130, |
| 1222 | .hsync_end = 800 + 130 + 98, |
| 1223 | .htotal = 800 + 0 + 130 + 98, |
| 1224 | .vdisplay = 480, |
| 1225 | .vsync_start = 480 + 10, |
| 1226 | .vsync_end = 480 + 10 + 50, |
| 1227 | .vtotal = 480 + 0 + 10 + 50, |
| 1228 | }; |
| 1229 | |
| 1230 | static const struct panel_desc nvd_9128 = { |
| 1231 | .modes = &nvd_9128_mode, |
| 1232 | .num_modes = 1, |
| 1233 | .bpc = 8, |
| 1234 | .size = { |
| 1235 | .width = 156, |
| 1236 | .height = 88, |
| 1237 | }, |
| 1238 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, |
| 1239 | }; |
| 1240 | |
Gary Bisson | a99fb62 | 2015-06-10 18:44:23 +0200 | [diff] [blame] | 1241 | static const struct display_timing okaya_rs800480t_7x0gp_timing = { |
| 1242 | .pixelclock = { 30000000, 30000000, 40000000 }, |
| 1243 | .hactive = { 800, 800, 800 }, |
| 1244 | .hfront_porch = { 40, 40, 40 }, |
| 1245 | .hback_porch = { 40, 40, 40 }, |
| 1246 | .hsync_len = { 1, 48, 48 }, |
| 1247 | .vactive = { 480, 480, 480 }, |
| 1248 | .vfront_porch = { 13, 13, 13 }, |
| 1249 | .vback_porch = { 29, 29, 29 }, |
| 1250 | .vsync_len = { 3, 3, 3 }, |
| 1251 | .flags = DISPLAY_FLAGS_DE_HIGH, |
| 1252 | }; |
| 1253 | |
| 1254 | static const struct panel_desc okaya_rs800480t_7x0gp = { |
| 1255 | .timings = &okaya_rs800480t_7x0gp_timing, |
| 1256 | .num_timings = 1, |
| 1257 | .bpc = 6, |
| 1258 | .size = { |
| 1259 | .width = 154, |
| 1260 | .height = 87, |
| 1261 | }, |
| 1262 | .delay = { |
| 1263 | .prepare = 41, |
| 1264 | .enable = 50, |
| 1265 | .unprepare = 41, |
| 1266 | .disable = 50, |
| 1267 | }, |
| 1268 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 1269 | }; |
| 1270 | |
Maxime Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 1271 | static const struct drm_display_mode olimex_lcd_olinuxino_43ts_mode = { |
| 1272 | .clock = 9000, |
| 1273 | .hdisplay = 480, |
| 1274 | .hsync_start = 480 + 5, |
| 1275 | .hsync_end = 480 + 5 + 30, |
| 1276 | .htotal = 480 + 5 + 30 + 10, |
| 1277 | .vdisplay = 272, |
| 1278 | .vsync_start = 272 + 8, |
| 1279 | .vsync_end = 272 + 8 + 5, |
| 1280 | .vtotal = 272 + 8 + 5 + 3, |
| 1281 | .vrefresh = 60, |
| 1282 | }; |
| 1283 | |
| 1284 | static const struct panel_desc olimex_lcd_olinuxino_43ts = { |
| 1285 | .modes = &olimex_lcd_olinuxino_43ts_mode, |
| 1286 | .num_modes = 1, |
| 1287 | .size = { |
| 1288 | .width = 105, |
| 1289 | .height = 67, |
| 1290 | }, |
Jonathan Liu | 5c2a7c6 | 2016-09-11 20:46:55 +1000 | [diff] [blame] | 1291 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Maxime Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 1292 | }; |
| 1293 | |
Eric Anholt | e8b6f56 | 2016-03-24 17:23:48 -0700 | [diff] [blame] | 1294 | /* |
| 1295 | * 800x480 CVT. The panel appears to be quite accepting, at least as far as |
| 1296 | * pixel clocks, but this is the timing that was being used in the Adafruit |
| 1297 | * installation instructions. |
| 1298 | */ |
| 1299 | static const struct drm_display_mode ontat_yx700wv03_mode = { |
| 1300 | .clock = 29500, |
| 1301 | .hdisplay = 800, |
| 1302 | .hsync_start = 824, |
| 1303 | .hsync_end = 896, |
| 1304 | .htotal = 992, |
| 1305 | .vdisplay = 480, |
| 1306 | .vsync_start = 483, |
| 1307 | .vsync_end = 493, |
| 1308 | .vtotal = 500, |
| 1309 | .vrefresh = 60, |
| 1310 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 1311 | }; |
| 1312 | |
| 1313 | /* |
| 1314 | * Specification at: |
| 1315 | * https://www.adafruit.com/images/product-files/2406/c3163.pdf |
| 1316 | */ |
| 1317 | static const struct panel_desc ontat_yx700wv03 = { |
| 1318 | .modes = &ontat_yx700wv03_mode, |
| 1319 | .num_modes = 1, |
| 1320 | .bpc = 8, |
| 1321 | .size = { |
| 1322 | .width = 154, |
| 1323 | .height = 83, |
| 1324 | }, |
| 1325 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 1326 | }; |
| 1327 | |
Philipp Zabel | 725c9d4 | 2015-02-11 18:50:11 +0100 | [diff] [blame] | 1328 | static const struct drm_display_mode ortustech_com43h4m85ulc_mode = { |
| 1329 | .clock = 25000, |
| 1330 | .hdisplay = 480, |
| 1331 | .hsync_start = 480 + 10, |
| 1332 | .hsync_end = 480 + 10 + 10, |
| 1333 | .htotal = 480 + 10 + 10 + 15, |
| 1334 | .vdisplay = 800, |
| 1335 | .vsync_start = 800 + 3, |
| 1336 | .vsync_end = 800 + 3 + 3, |
| 1337 | .vtotal = 800 + 3 + 3 + 3, |
| 1338 | .vrefresh = 60, |
| 1339 | }; |
| 1340 | |
| 1341 | static const struct panel_desc ortustech_com43h4m85ulc = { |
| 1342 | .modes = &ortustech_com43h4m85ulc_mode, |
| 1343 | .num_modes = 1, |
| 1344 | .bpc = 8, |
| 1345 | .size = { |
| 1346 | .width = 56, |
| 1347 | .height = 93, |
| 1348 | }, |
| 1349 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
Marek Vasut | e0932f9 | 2016-08-26 18:26:00 +0200 | [diff] [blame] | 1350 | .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE, |
Philipp Zabel | 725c9d4 | 2015-02-11 18:50:11 +0100 | [diff] [blame] | 1351 | }; |
| 1352 | |
Josh Wu | d2a6f0f | 2015-10-08 17:42:41 +0200 | [diff] [blame] | 1353 | static const struct drm_display_mode qd43003c0_40_mode = { |
| 1354 | .clock = 9000, |
| 1355 | .hdisplay = 480, |
| 1356 | .hsync_start = 480 + 8, |
| 1357 | .hsync_end = 480 + 8 + 4, |
| 1358 | .htotal = 480 + 8 + 4 + 39, |
| 1359 | .vdisplay = 272, |
| 1360 | .vsync_start = 272 + 4, |
| 1361 | .vsync_end = 272 + 4 + 10, |
| 1362 | .vtotal = 272 + 4 + 10 + 2, |
| 1363 | .vrefresh = 60, |
| 1364 | }; |
| 1365 | |
| 1366 | static const struct panel_desc qd43003c0_40 = { |
| 1367 | .modes = &qd43003c0_40_mode, |
| 1368 | .num_modes = 1, |
| 1369 | .bpc = 8, |
| 1370 | .size = { |
| 1371 | .width = 95, |
| 1372 | .height = 53, |
| 1373 | }, |
| 1374 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 1375 | }; |
| 1376 | |
Yakir Yang | 0330eaf | 2016-06-12 10:56:13 +0800 | [diff] [blame] | 1377 | static const struct drm_display_mode samsung_lsn122dl01_c01_mode = { |
| 1378 | .clock = 271560, |
| 1379 | .hdisplay = 2560, |
| 1380 | .hsync_start = 2560 + 48, |
| 1381 | .hsync_end = 2560 + 48 + 32, |
| 1382 | .htotal = 2560 + 48 + 32 + 80, |
| 1383 | .vdisplay = 1600, |
| 1384 | .vsync_start = 1600 + 2, |
| 1385 | .vsync_end = 1600 + 2 + 5, |
| 1386 | .vtotal = 1600 + 2 + 5 + 57, |
| 1387 | .vrefresh = 60, |
| 1388 | }; |
| 1389 | |
| 1390 | static const struct panel_desc samsung_lsn122dl01_c01 = { |
| 1391 | .modes = &samsung_lsn122dl01_c01_mode, |
| 1392 | .num_modes = 1, |
| 1393 | .size = { |
| 1394 | .width = 263, |
| 1395 | .height = 164, |
| 1396 | }, |
| 1397 | }; |
| 1398 | |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 1399 | static const struct drm_display_mode samsung_ltn101nt05_mode = { |
| 1400 | .clock = 54030, |
| 1401 | .hdisplay = 1024, |
| 1402 | .hsync_start = 1024 + 24, |
| 1403 | .hsync_end = 1024 + 24 + 136, |
| 1404 | .htotal = 1024 + 24 + 136 + 160, |
| 1405 | .vdisplay = 600, |
| 1406 | .vsync_start = 600 + 3, |
| 1407 | .vsync_end = 600 + 3 + 6, |
| 1408 | .vtotal = 600 + 3 + 6 + 61, |
| 1409 | .vrefresh = 60, |
| 1410 | }; |
| 1411 | |
| 1412 | static const struct panel_desc samsung_ltn101nt05 = { |
| 1413 | .modes = &samsung_ltn101nt05_mode, |
| 1414 | .num_modes = 1, |
Stéphane Marchesin | 0208d51 | 2014-06-19 18:18:28 -0700 | [diff] [blame] | 1415 | .bpc = 6, |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 1416 | .size = { |
Thierry Reding | 8159884 | 2016-06-10 15:33:13 +0200 | [diff] [blame] | 1417 | .width = 223, |
| 1418 | .height = 125, |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 1419 | }, |
| 1420 | }; |
| 1421 | |
Stéphane Marchesin | 0c93430 | 2015-03-18 10:52:18 +0100 | [diff] [blame] | 1422 | static const struct drm_display_mode samsung_ltn140at29_301_mode = { |
| 1423 | .clock = 76300, |
| 1424 | .hdisplay = 1366, |
| 1425 | .hsync_start = 1366 + 64, |
| 1426 | .hsync_end = 1366 + 64 + 48, |
| 1427 | .htotal = 1366 + 64 + 48 + 128, |
| 1428 | .vdisplay = 768, |
| 1429 | .vsync_start = 768 + 2, |
| 1430 | .vsync_end = 768 + 2 + 5, |
| 1431 | .vtotal = 768 + 2 + 5 + 17, |
| 1432 | .vrefresh = 60, |
| 1433 | }; |
| 1434 | |
| 1435 | static const struct panel_desc samsung_ltn140at29_301 = { |
| 1436 | .modes = &samsung_ltn140at29_301_mode, |
| 1437 | .num_modes = 1, |
| 1438 | .bpc = 6, |
| 1439 | .size = { |
| 1440 | .width = 320, |
| 1441 | .height = 187, |
| 1442 | }, |
| 1443 | }; |
| 1444 | |
Joshua Clayton | 592aa02 | 2016-07-06 15:59:16 -0700 | [diff] [blame] | 1445 | static const struct display_timing sharp_lq101k1ly04_timing = { |
| 1446 | .pixelclock = { 60000000, 65000000, 80000000 }, |
| 1447 | .hactive = { 1280, 1280, 1280 }, |
| 1448 | .hfront_porch = { 20, 20, 20 }, |
| 1449 | .hback_porch = { 20, 20, 20 }, |
| 1450 | .hsync_len = { 10, 10, 10 }, |
| 1451 | .vactive = { 800, 800, 800 }, |
| 1452 | .vfront_porch = { 4, 4, 4 }, |
| 1453 | .vback_porch = { 4, 4, 4 }, |
| 1454 | .vsync_len = { 4, 4, 4 }, |
| 1455 | .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE, |
| 1456 | }; |
| 1457 | |
| 1458 | static const struct panel_desc sharp_lq101k1ly04 = { |
| 1459 | .timings = &sharp_lq101k1ly04_timing, |
| 1460 | .num_timings = 1, |
| 1461 | .bpc = 8, |
| 1462 | .size = { |
| 1463 | .width = 217, |
| 1464 | .height = 136, |
| 1465 | }, |
| 1466 | .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, |
| 1467 | }; |
| 1468 | |
Yakir Yang | 739c7de | 2016-06-12 10:56:35 +0800 | [diff] [blame] | 1469 | static const struct drm_display_mode sharp_lq123p1jx31_mode = { |
| 1470 | .clock = 252750, |
| 1471 | .hdisplay = 2400, |
| 1472 | .hsync_start = 2400 + 48, |
| 1473 | .hsync_end = 2400 + 48 + 32, |
| 1474 | .htotal = 2400 + 48 + 32 + 80, |
| 1475 | .vdisplay = 1600, |
| 1476 | .vsync_start = 1600 + 3, |
| 1477 | .vsync_end = 1600 + 3 + 10, |
| 1478 | .vtotal = 1600 + 3 + 10 + 33, |
| 1479 | .vrefresh = 60, |
| 1480 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 1481 | }; |
| 1482 | |
| 1483 | static const struct panel_desc sharp_lq123p1jx31 = { |
| 1484 | .modes = &sharp_lq123p1jx31_mode, |
| 1485 | .num_modes = 1, |
| 1486 | .size = { |
| 1487 | .width = 259, |
| 1488 | .height = 173, |
| 1489 | }, |
Yakir Yang | a42f6e3 | 2016-07-21 21:14:34 +0800 | [diff] [blame] | 1490 | .delay = { |
| 1491 | .prepare = 110, |
| 1492 | .enable = 50, |
| 1493 | .unprepare = 550, |
| 1494 | }, |
Yakir Yang | 739c7de | 2016-06-12 10:56:35 +0800 | [diff] [blame] | 1495 | }; |
| 1496 | |
Gustaf Lindström | 0f9cdd7 | 2016-10-04 17:29:21 +0200 | [diff] [blame] | 1497 | static const struct drm_display_mode sharp_lq150x1lg11_mode = { |
| 1498 | .clock = 71100, |
| 1499 | .hdisplay = 1024, |
| 1500 | .hsync_start = 1024 + 168, |
| 1501 | .hsync_end = 1024 + 168 + 64, |
| 1502 | .htotal = 1024 + 168 + 64 + 88, |
| 1503 | .vdisplay = 768, |
| 1504 | .vsync_start = 768 + 37, |
| 1505 | .vsync_end = 768 + 37 + 2, |
| 1506 | .vtotal = 768 + 37 + 2 + 8, |
| 1507 | .vrefresh = 60, |
| 1508 | }; |
| 1509 | |
| 1510 | static const struct panel_desc sharp_lq150x1lg11 = { |
| 1511 | .modes = &sharp_lq150x1lg11_mode, |
| 1512 | .num_modes = 1, |
| 1513 | .bpc = 6, |
| 1514 | .size = { |
| 1515 | .width = 304, |
| 1516 | .height = 228, |
| 1517 | }, |
| 1518 | .bus_format = MEDIA_BUS_FMT_RGB565_1X16, |
| 1519 | }; |
| 1520 | |
Boris BREZILLON | 9c6615b | 2015-03-19 14:43:00 +0100 | [diff] [blame] | 1521 | static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = { |
| 1522 | .clock = 33300, |
| 1523 | .hdisplay = 800, |
| 1524 | .hsync_start = 800 + 1, |
| 1525 | .hsync_end = 800 + 1 + 64, |
| 1526 | .htotal = 800 + 1 + 64 + 64, |
| 1527 | .vdisplay = 480, |
| 1528 | .vsync_start = 480 + 1, |
| 1529 | .vsync_end = 480 + 1 + 23, |
| 1530 | .vtotal = 480 + 1 + 23 + 22, |
| 1531 | .vrefresh = 60, |
| 1532 | }; |
| 1533 | |
| 1534 | static const struct panel_desc shelly_sca07010_bfn_lnn = { |
| 1535 | .modes = &shelly_sca07010_bfn_lnn_mode, |
| 1536 | .num_modes = 1, |
| 1537 | .size = { |
| 1538 | .width = 152, |
| 1539 | .height = 91, |
| 1540 | }, |
| 1541 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 1542 | }; |
| 1543 | |
Douglas Anderson | 9bb34c4 | 2016-06-10 10:02:07 -0700 | [diff] [blame] | 1544 | static const struct drm_display_mode starry_kr122ea0sra_mode = { |
| 1545 | .clock = 147000, |
| 1546 | .hdisplay = 1920, |
| 1547 | .hsync_start = 1920 + 16, |
| 1548 | .hsync_end = 1920 + 16 + 16, |
| 1549 | .htotal = 1920 + 16 + 16 + 32, |
| 1550 | .vdisplay = 1200, |
| 1551 | .vsync_start = 1200 + 15, |
| 1552 | .vsync_end = 1200 + 15 + 2, |
| 1553 | .vtotal = 1200 + 15 + 2 + 18, |
| 1554 | .vrefresh = 60, |
| 1555 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 1556 | }; |
| 1557 | |
| 1558 | static const struct panel_desc starry_kr122ea0sra = { |
| 1559 | .modes = &starry_kr122ea0sra_mode, |
| 1560 | .num_modes = 1, |
| 1561 | .size = { |
| 1562 | .width = 263, |
| 1563 | .height = 164, |
| 1564 | }, |
Brian Norris | c46b924 | 2016-08-26 14:32:14 -0700 | [diff] [blame] | 1565 | .delay = { |
| 1566 | .prepare = 10 + 200, |
| 1567 | .enable = 50, |
| 1568 | .unprepare = 10 + 500, |
| 1569 | }, |
Douglas Anderson | 9bb34c4 | 2016-06-10 10:02:07 -0700 | [diff] [blame] | 1570 | }; |
| 1571 | |
Bhuvanchandra DV | 227e4f4 | 2016-05-05 11:47:07 +0530 | [diff] [blame] | 1572 | static const struct drm_display_mode tpk_f07a_0102_mode = { |
| 1573 | .clock = 33260, |
| 1574 | .hdisplay = 800, |
| 1575 | .hsync_start = 800 + 40, |
| 1576 | .hsync_end = 800 + 40 + 128, |
| 1577 | .htotal = 800 + 40 + 128 + 88, |
| 1578 | .vdisplay = 480, |
| 1579 | .vsync_start = 480 + 10, |
| 1580 | .vsync_end = 480 + 10 + 2, |
| 1581 | .vtotal = 480 + 10 + 2 + 33, |
| 1582 | .vrefresh = 60, |
| 1583 | }; |
| 1584 | |
| 1585 | static const struct panel_desc tpk_f07a_0102 = { |
| 1586 | .modes = &tpk_f07a_0102_mode, |
| 1587 | .num_modes = 1, |
| 1588 | .size = { |
| 1589 | .width = 152, |
| 1590 | .height = 91, |
| 1591 | }, |
| 1592 | .bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE, |
| 1593 | }; |
| 1594 | |
| 1595 | static const struct drm_display_mode tpk_f10a_0102_mode = { |
| 1596 | .clock = 45000, |
| 1597 | .hdisplay = 1024, |
| 1598 | .hsync_start = 1024 + 176, |
| 1599 | .hsync_end = 1024 + 176 + 5, |
| 1600 | .htotal = 1024 + 176 + 5 + 88, |
| 1601 | .vdisplay = 600, |
| 1602 | .vsync_start = 600 + 20, |
| 1603 | .vsync_end = 600 + 20 + 5, |
| 1604 | .vtotal = 600 + 20 + 5 + 25, |
| 1605 | .vrefresh = 60, |
| 1606 | }; |
| 1607 | |
| 1608 | static const struct panel_desc tpk_f10a_0102 = { |
| 1609 | .modes = &tpk_f10a_0102_mode, |
| 1610 | .num_modes = 1, |
| 1611 | .size = { |
| 1612 | .width = 223, |
| 1613 | .height = 125, |
| 1614 | }, |
| 1615 | }; |
| 1616 | |
Maciej S. Szmigiero | 06a9dc6 | 2016-02-13 22:52:03 +0100 | [diff] [blame] | 1617 | static const struct display_timing urt_umsh_8596md_timing = { |
| 1618 | .pixelclock = { 33260000, 33260000, 33260000 }, |
| 1619 | .hactive = { 800, 800, 800 }, |
| 1620 | .hfront_porch = { 41, 41, 41 }, |
| 1621 | .hback_porch = { 216 - 128, 216 - 128, 216 - 128 }, |
| 1622 | .hsync_len = { 71, 128, 128 }, |
| 1623 | .vactive = { 480, 480, 480 }, |
| 1624 | .vfront_porch = { 10, 10, 10 }, |
| 1625 | .vback_porch = { 35 - 2, 35 - 2, 35 - 2 }, |
| 1626 | .vsync_len = { 2, 2, 2 }, |
| 1627 | .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE | |
| 1628 | DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW, |
| 1629 | }; |
| 1630 | |
| 1631 | static const struct panel_desc urt_umsh_8596md_lvds = { |
| 1632 | .timings = &urt_umsh_8596md_timing, |
| 1633 | .num_timings = 1, |
| 1634 | .bpc = 6, |
| 1635 | .size = { |
| 1636 | .width = 152, |
| 1637 | .height = 91, |
| 1638 | }, |
| 1639 | .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, |
| 1640 | }; |
| 1641 | |
| 1642 | static const struct panel_desc urt_umsh_8596md_parallel = { |
| 1643 | .timings = &urt_umsh_8596md_timing, |
| 1644 | .num_timings = 1, |
| 1645 | .bpc = 6, |
| 1646 | .size = { |
| 1647 | .width = 152, |
| 1648 | .height = 91, |
| 1649 | }, |
| 1650 | .bus_format = MEDIA_BUS_FMT_RGB666_1X18, |
| 1651 | }; |
| 1652 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1653 | static const struct of_device_id platform_of_match[] = { |
| 1654 | { |
Philipp Zabel | 1c550fa1 | 2015-02-11 18:50:09 +0100 | [diff] [blame] | 1655 | .compatible = "ampire,am800480r3tmqwa1h", |
| 1656 | .data = &ire_am800480r3tmqwa1h, |
| 1657 | }, { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1658 | .compatible = "auo,b101aw03", |
| 1659 | .data = &auo_b101aw03, |
| 1660 | }, { |
Huang Lin | a531bc3 | 2015-02-28 10:18:58 +0800 | [diff] [blame] | 1661 | .compatible = "auo,b101ean01", |
| 1662 | .data = &auo_b101ean01, |
| 1663 | }, { |
Rob Clark | dac746e | 2014-08-01 17:01:06 -0400 | [diff] [blame] | 1664 | .compatible = "auo,b101xtn01", |
| 1665 | .data = &auo_b101xtn01, |
| 1666 | }, { |
Ajay Kumar | e35e305 | 2014-09-01 15:40:02 +0530 | [diff] [blame] | 1667 | .compatible = "auo,b116xw03", |
| 1668 | .data = &auo_b116xw03, |
| 1669 | }, { |
Ajay Kumar | 3e51d60 | 2014-07-31 23:12:12 +0530 | [diff] [blame] | 1670 | .compatible = "auo,b133htn01", |
| 1671 | .data = &auo_b133htn01, |
| 1672 | }, { |
Stéphane Marchesin | a333f7a | 2014-05-23 19:27:59 -0700 | [diff] [blame] | 1673 | .compatible = "auo,b133xtn01", |
| 1674 | .data = &auo_b133xtn01, |
| 1675 | }, { |
Haixia Shi | 7ee933a | 2016-10-11 14:59:16 -0700 | [diff] [blame] | 1676 | .compatible = "auo,t215hvn01", |
| 1677 | .data = &auo_t215hvn01, |
| 1678 | }, { |
Philipp Zabel | d47df63 | 2014-12-18 16:43:43 +0100 | [diff] [blame] | 1679 | .compatible = "avic,tm070ddh03", |
| 1680 | .data = &avic_tm070ddh03, |
| 1681 | }, { |
Randy Li | 2cb35c8 | 2016-09-20 03:02:51 +0800 | [diff] [blame] | 1682 | .compatible = "chunghwa,claa070wp03xg", |
| 1683 | .data = &chunghwa_claa070wp03xg, |
| 1684 | }, { |
Stephen Warren | 4c93075 | 2014-01-07 16:46:26 -0700 | [diff] [blame] | 1685 | .compatible = "chunghwa,claa101wa01a", |
| 1686 | .data = &chunghwa_claa101wa01a |
| 1687 | }, { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1688 | .compatible = "chunghwa,claa101wb01", |
| 1689 | .data = &chunghwa_claa101wb01 |
| 1690 | }, { |
Stefan Agner | 26ab006 | 2014-05-15 11:38:45 +0200 | [diff] [blame] | 1691 | .compatible = "edt,et057090dhu", |
| 1692 | .data = &edt_et057090dhu, |
| 1693 | }, { |
Philipp Zabel | fff5de4 | 2014-05-15 12:25:47 +0200 | [diff] [blame] | 1694 | .compatible = "edt,et070080dh6", |
| 1695 | .data = &edt_etm0700g0dh6, |
| 1696 | }, { |
| 1697 | .compatible = "edt,etm0700g0dh6", |
| 1698 | .data = &edt_etm0700g0dh6, |
| 1699 | }, { |
Boris BREZILLON | 102932b | 2014-06-05 15:53:32 +0200 | [diff] [blame] | 1700 | .compatible = "foxlink,fl500wvr00-a0t", |
| 1701 | .data = &foxlink_fl500wvr00_a0t, |
| 1702 | }, { |
Philipp Zabel | d435a2a | 2014-11-19 10:29:55 +0100 | [diff] [blame] | 1703 | .compatible = "giantplus,gpg482739qs5", |
| 1704 | .data = &giantplus_gpg482739qs5 |
| 1705 | }, { |
Philipp Zabel | a853205 | 2014-10-23 16:31:06 +0200 | [diff] [blame] | 1706 | .compatible = "hannstar,hsd070pww1", |
| 1707 | .data = &hannstar_hsd070pww1, |
| 1708 | }, { |
Eric Nelson | c0d607e | 2015-04-13 15:09:26 -0700 | [diff] [blame] | 1709 | .compatible = "hannstar,hsd100pxn1", |
| 1710 | .data = &hannstar_hsd100pxn1, |
| 1711 | }, { |
Lucas Stach | 61ac0bf | 2014-11-06 17:44:35 +0100 | [diff] [blame] | 1712 | .compatible = "hit,tx23d38vm0caa", |
| 1713 | .data = &hitachi_tx23d38vm0caa |
| 1714 | }, { |
Nicolas Ferre | 41bcceb | 2015-03-19 14:43:01 +0100 | [diff] [blame] | 1715 | .compatible = "innolux,at043tn24", |
| 1716 | .data = &innolux_at043tn24, |
| 1717 | }, { |
Riccardo Bortolato | 4fc24ab | 2016-04-20 15:37:15 +0200 | [diff] [blame] | 1718 | .compatible = "innolux,at070tn92", |
| 1719 | .data = &innolux_at070tn92, |
| 1720 | }, { |
Michael Olbrich | 1e29b84 | 2016-08-15 14:32:02 +0200 | [diff] [blame] | 1721 | .compatible ="innolux,g101ice-l01", |
| 1722 | .data = &innolux_g101ice_l01 |
| 1723 | }, { |
Lucas Stach | d731f66 | 2014-11-06 17:44:33 +0100 | [diff] [blame] | 1724 | .compatible ="innolux,g121i1-l01", |
| 1725 | .data = &innolux_g121i1_l01 |
| 1726 | }, { |
Akshay Bhat | f8fa17b | 2015-11-18 15:57:47 -0500 | [diff] [blame] | 1727 | .compatible = "innolux,g121x1-l03", |
| 1728 | .data = &innolux_g121x1_l03, |
| 1729 | }, { |
Thierry Reding | 0a2288c | 2014-07-03 14:02:59 +0200 | [diff] [blame] | 1730 | .compatible = "innolux,n116bge", |
| 1731 | .data = &innolux_n116bge, |
| 1732 | }, { |
Alban Bedel | ea44739 | 2014-07-22 08:38:55 +0200 | [diff] [blame] | 1733 | .compatible = "innolux,n156bge-l21", |
| 1734 | .data = &innolux_n156bge_l21, |
| 1735 | }, { |
Michael Grzeschik | bccac3f | 2015-03-19 12:22:44 +0100 | [diff] [blame] | 1736 | .compatible = "innolux,zj070na-01p", |
| 1737 | .data = &innolux_zj070na_01p, |
| 1738 | }, { |
Lucas Stach | 8def22e | 2015-12-02 19:41:11 +0100 | [diff] [blame] | 1739 | .compatible = "kyo,tcg121xglp", |
| 1740 | .data = &kyo_tcg121xglp, |
| 1741 | }, { |
Heiko Schocher | dd01500 | 2015-05-22 10:25:57 +0200 | [diff] [blame] | 1742 | .compatible = "lg,lb070wv8", |
| 1743 | .data = &lg_lb070wv8, |
| 1744 | }, { |
Yakir Yang | c5ece40 | 2016-06-28 12:51:15 +0800 | [diff] [blame] | 1745 | .compatible = "lg,lp079qx1-sp0v", |
| 1746 | .data = &lg_lp079qx1_sp0v, |
| 1747 | }, { |
Yakir Yang | 0355dde | 2016-06-12 10:56:02 +0800 | [diff] [blame] | 1748 | .compatible = "lg,lp097qx1-spa1", |
| 1749 | .data = &lg_lp097qx1_spa1, |
| 1750 | }, { |
Jitao Shi | 690d8fa | 2016-02-22 19:01:44 +0800 | [diff] [blame] | 1751 | .compatible = "lg,lp120up1", |
| 1752 | .data = &lg_lp120up1, |
| 1753 | }, { |
Thierry Reding | ec7c565 | 2013-11-15 15:59:32 +0100 | [diff] [blame] | 1754 | .compatible = "lg,lp129qe", |
| 1755 | .data = &lg_lp129qe, |
| 1756 | }, { |
jianwei wang | c6e87f9 | 2015-07-29 16:30:02 +0800 | [diff] [blame] | 1757 | .compatible = "nec,nl4827hc19-05b", |
| 1758 | .data = &nec_nl4827hc19_05b, |
| 1759 | }, { |
Fabien Lahoudere | 05ec0e4 | 2016-10-17 11:38:01 +0200 | [diff] [blame] | 1760 | .compatible = "nvd,9128", |
| 1761 | .data = &nvd_9128, |
| 1762 | }, { |
Gary Bisson | a99fb62 | 2015-06-10 18:44:23 +0200 | [diff] [blame] | 1763 | .compatible = "okaya,rs800480t-7x0gp", |
| 1764 | .data = &okaya_rs800480t_7x0gp, |
| 1765 | }, { |
Maxime Ripard | cf5c9e6 | 2016-03-23 17:38:34 +0100 | [diff] [blame] | 1766 | .compatible = "olimex,lcd-olinuxino-43-ts", |
| 1767 | .data = &olimex_lcd_olinuxino_43ts, |
| 1768 | }, { |
Eric Anholt | e8b6f56 | 2016-03-24 17:23:48 -0700 | [diff] [blame] | 1769 | .compatible = "ontat,yx700wv03", |
| 1770 | .data = &ontat_yx700wv03, |
| 1771 | }, { |
Philipp Zabel | 725c9d4 | 2015-02-11 18:50:11 +0100 | [diff] [blame] | 1772 | .compatible = "ortustech,com43h4m85ulc", |
| 1773 | .data = &ortustech_com43h4m85ulc, |
| 1774 | }, { |
Josh Wu | d2a6f0f | 2015-10-08 17:42:41 +0200 | [diff] [blame] | 1775 | .compatible = "qiaodian,qd43003c0-40", |
| 1776 | .data = &qd43003c0_40, |
| 1777 | }, { |
Yakir Yang | 0330eaf | 2016-06-12 10:56:13 +0800 | [diff] [blame] | 1778 | .compatible = "samsung,lsn122dl01-c01", |
| 1779 | .data = &samsung_lsn122dl01_c01, |
| 1780 | }, { |
Marc Dietrich | 6d54e3d | 2013-12-21 21:38:12 +0100 | [diff] [blame] | 1781 | .compatible = "samsung,ltn101nt05", |
| 1782 | .data = &samsung_ltn101nt05, |
| 1783 | }, { |
Stéphane Marchesin | 0c93430 | 2015-03-18 10:52:18 +0100 | [diff] [blame] | 1784 | .compatible = "samsung,ltn140at29-301", |
| 1785 | .data = &samsung_ltn140at29_301, |
| 1786 | }, { |
Joshua Clayton | 592aa02 | 2016-07-06 15:59:16 -0700 | [diff] [blame] | 1787 | .compatible = "sharp,lq101k1ly04", |
| 1788 | .data = &sharp_lq101k1ly04, |
| 1789 | }, { |
Yakir Yang | 739c7de | 2016-06-12 10:56:35 +0800 | [diff] [blame] | 1790 | .compatible = "sharp,lq123p1jx31", |
| 1791 | .data = &sharp_lq123p1jx31, |
| 1792 | }, { |
Gustaf Lindström | 0f9cdd7 | 2016-10-04 17:29:21 +0200 | [diff] [blame] | 1793 | .compatible = "sharp,lq150x1lg11", |
| 1794 | .data = &sharp_lq150x1lg11, |
| 1795 | }, { |
Boris BREZILLON | 9c6615b | 2015-03-19 14:43:00 +0100 | [diff] [blame] | 1796 | .compatible = "shelly,sca07010-bfn-lnn", |
| 1797 | .data = &shelly_sca07010_bfn_lnn, |
| 1798 | }, { |
Douglas Anderson | 9bb34c4 | 2016-06-10 10:02:07 -0700 | [diff] [blame] | 1799 | .compatible = "starry,kr122ea0sra", |
| 1800 | .data = &starry_kr122ea0sra, |
| 1801 | }, { |
Bhuvanchandra DV | 227e4f4 | 2016-05-05 11:47:07 +0530 | [diff] [blame] | 1802 | .compatible = "tpk,f07a-0102", |
| 1803 | .data = &tpk_f07a_0102, |
| 1804 | }, { |
| 1805 | .compatible = "tpk,f10a-0102", |
| 1806 | .data = &tpk_f10a_0102, |
| 1807 | }, { |
Maciej S. Szmigiero | 06a9dc6 | 2016-02-13 22:52:03 +0100 | [diff] [blame] | 1808 | .compatible = "urt,umsh-8596md-t", |
| 1809 | .data = &urt_umsh_8596md_parallel, |
| 1810 | }, { |
| 1811 | .compatible = "urt,umsh-8596md-1t", |
| 1812 | .data = &urt_umsh_8596md_parallel, |
| 1813 | }, { |
| 1814 | .compatible = "urt,umsh-8596md-7t", |
| 1815 | .data = &urt_umsh_8596md_parallel, |
| 1816 | }, { |
| 1817 | .compatible = "urt,umsh-8596md-11t", |
| 1818 | .data = &urt_umsh_8596md_lvds, |
| 1819 | }, { |
| 1820 | .compatible = "urt,umsh-8596md-19t", |
| 1821 | .data = &urt_umsh_8596md_lvds, |
| 1822 | }, { |
| 1823 | .compatible = "urt,umsh-8596md-20t", |
| 1824 | .data = &urt_umsh_8596md_parallel, |
| 1825 | }, { |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1826 | /* sentinel */ |
| 1827 | } |
| 1828 | }; |
| 1829 | MODULE_DEVICE_TABLE(of, platform_of_match); |
| 1830 | |
| 1831 | static int panel_simple_platform_probe(struct platform_device *pdev) |
| 1832 | { |
| 1833 | const struct of_device_id *id; |
| 1834 | |
| 1835 | id = of_match_node(platform_of_match, pdev->dev.of_node); |
| 1836 | if (!id) |
| 1837 | return -ENODEV; |
| 1838 | |
| 1839 | return panel_simple_probe(&pdev->dev, id->data); |
| 1840 | } |
| 1841 | |
| 1842 | static int panel_simple_platform_remove(struct platform_device *pdev) |
| 1843 | { |
| 1844 | return panel_simple_remove(&pdev->dev); |
| 1845 | } |
| 1846 | |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 1847 | static void panel_simple_platform_shutdown(struct platform_device *pdev) |
| 1848 | { |
| 1849 | panel_simple_shutdown(&pdev->dev); |
| 1850 | } |
| 1851 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1852 | static struct platform_driver panel_simple_platform_driver = { |
| 1853 | .driver = { |
| 1854 | .name = "panel-simple", |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1855 | .of_match_table = platform_of_match, |
| 1856 | }, |
| 1857 | .probe = panel_simple_platform_probe, |
| 1858 | .remove = panel_simple_platform_remove, |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 1859 | .shutdown = panel_simple_platform_shutdown, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1860 | }; |
| 1861 | |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 1862 | struct panel_desc_dsi { |
| 1863 | struct panel_desc desc; |
| 1864 | |
Thierry Reding | 462658b | 2014-03-14 11:24:57 +0100 | [diff] [blame] | 1865 | unsigned long flags; |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 1866 | enum mipi_dsi_pixel_format format; |
| 1867 | unsigned int lanes; |
| 1868 | }; |
| 1869 | |
Thierry Reding | d718d79 | 2015-04-08 16:52:33 +0200 | [diff] [blame] | 1870 | static const struct drm_display_mode auo_b080uan01_mode = { |
| 1871 | .clock = 154500, |
| 1872 | .hdisplay = 1200, |
| 1873 | .hsync_start = 1200 + 62, |
| 1874 | .hsync_end = 1200 + 62 + 4, |
| 1875 | .htotal = 1200 + 62 + 4 + 62, |
| 1876 | .vdisplay = 1920, |
| 1877 | .vsync_start = 1920 + 9, |
| 1878 | .vsync_end = 1920 + 9 + 2, |
| 1879 | .vtotal = 1920 + 9 + 2 + 8, |
| 1880 | .vrefresh = 60, |
| 1881 | }; |
| 1882 | |
| 1883 | static const struct panel_desc_dsi auo_b080uan01 = { |
| 1884 | .desc = { |
| 1885 | .modes = &auo_b080uan01_mode, |
| 1886 | .num_modes = 1, |
| 1887 | .bpc = 8, |
| 1888 | .size = { |
| 1889 | .width = 108, |
| 1890 | .height = 272, |
| 1891 | }, |
| 1892 | }, |
| 1893 | .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS, |
| 1894 | .format = MIPI_DSI_FMT_RGB888, |
| 1895 | .lanes = 4, |
| 1896 | }; |
| 1897 | |
Chris Zhong | c852196 | 2015-11-20 16:15:37 +0800 | [diff] [blame] | 1898 | static const struct drm_display_mode boe_tv080wum_nl0_mode = { |
| 1899 | .clock = 160000, |
| 1900 | .hdisplay = 1200, |
| 1901 | .hsync_start = 1200 + 120, |
| 1902 | .hsync_end = 1200 + 120 + 20, |
| 1903 | .htotal = 1200 + 120 + 20 + 21, |
| 1904 | .vdisplay = 1920, |
| 1905 | .vsync_start = 1920 + 21, |
| 1906 | .vsync_end = 1920 + 21 + 3, |
| 1907 | .vtotal = 1920 + 21 + 3 + 18, |
| 1908 | .vrefresh = 60, |
| 1909 | .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, |
| 1910 | }; |
| 1911 | |
| 1912 | static const struct panel_desc_dsi boe_tv080wum_nl0 = { |
| 1913 | .desc = { |
| 1914 | .modes = &boe_tv080wum_nl0_mode, |
| 1915 | .num_modes = 1, |
| 1916 | .size = { |
| 1917 | .width = 107, |
| 1918 | .height = 172, |
| 1919 | }, |
| 1920 | }, |
| 1921 | .flags = MIPI_DSI_MODE_VIDEO | |
| 1922 | MIPI_DSI_MODE_VIDEO_BURST | |
| 1923 | MIPI_DSI_MODE_VIDEO_SYNC_PULSE, |
| 1924 | .format = MIPI_DSI_FMT_RGB888, |
| 1925 | .lanes = 4, |
| 1926 | }; |
| 1927 | |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 1928 | static const struct drm_display_mode lg_ld070wx3_sl01_mode = { |
| 1929 | .clock = 71000, |
| 1930 | .hdisplay = 800, |
| 1931 | .hsync_start = 800 + 32, |
| 1932 | .hsync_end = 800 + 32 + 1, |
| 1933 | .htotal = 800 + 32 + 1 + 57, |
| 1934 | .vdisplay = 1280, |
| 1935 | .vsync_start = 1280 + 28, |
| 1936 | .vsync_end = 1280 + 28 + 1, |
| 1937 | .vtotal = 1280 + 28 + 1 + 14, |
| 1938 | .vrefresh = 60, |
| 1939 | }; |
| 1940 | |
| 1941 | static const struct panel_desc_dsi lg_ld070wx3_sl01 = { |
| 1942 | .desc = { |
| 1943 | .modes = &lg_ld070wx3_sl01_mode, |
| 1944 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 1945 | .bpc = 8, |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 1946 | .size = { |
| 1947 | .width = 94, |
| 1948 | .height = 151, |
| 1949 | }, |
| 1950 | }, |
Alexandre Courbot | 5e4cc27 | 2014-07-08 21:32:12 +0900 | [diff] [blame] | 1951 | .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS, |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 1952 | .format = MIPI_DSI_FMT_RGB888, |
| 1953 | .lanes = 4, |
| 1954 | }; |
| 1955 | |
Alexandre Courbot | 499ce85 | 2014-01-21 18:57:09 +0900 | [diff] [blame] | 1956 | static const struct drm_display_mode lg_lh500wx1_sd03_mode = { |
| 1957 | .clock = 67000, |
| 1958 | .hdisplay = 720, |
| 1959 | .hsync_start = 720 + 12, |
| 1960 | .hsync_end = 720 + 12 + 4, |
| 1961 | .htotal = 720 + 12 + 4 + 112, |
| 1962 | .vdisplay = 1280, |
| 1963 | .vsync_start = 1280 + 8, |
| 1964 | .vsync_end = 1280 + 8 + 4, |
| 1965 | .vtotal = 1280 + 8 + 4 + 12, |
| 1966 | .vrefresh = 60, |
| 1967 | }; |
| 1968 | |
| 1969 | static const struct panel_desc_dsi lg_lh500wx1_sd03 = { |
| 1970 | .desc = { |
| 1971 | .modes = &lg_lh500wx1_sd03_mode, |
| 1972 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 1973 | .bpc = 8, |
Alexandre Courbot | 499ce85 | 2014-01-21 18:57:09 +0900 | [diff] [blame] | 1974 | .size = { |
| 1975 | .width = 62, |
| 1976 | .height = 110, |
| 1977 | }, |
| 1978 | }, |
| 1979 | .flags = MIPI_DSI_MODE_VIDEO, |
| 1980 | .format = MIPI_DSI_FMT_RGB888, |
| 1981 | .lanes = 4, |
| 1982 | }; |
| 1983 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 1984 | static const struct drm_display_mode panasonic_vvx10f004b00_mode = { |
| 1985 | .clock = 157200, |
| 1986 | .hdisplay = 1920, |
| 1987 | .hsync_start = 1920 + 154, |
| 1988 | .hsync_end = 1920 + 154 + 16, |
| 1989 | .htotal = 1920 + 154 + 16 + 32, |
| 1990 | .vdisplay = 1200, |
| 1991 | .vsync_start = 1200 + 17, |
| 1992 | .vsync_end = 1200 + 17 + 2, |
| 1993 | .vtotal = 1200 + 17 + 2 + 16, |
| 1994 | .vrefresh = 60, |
| 1995 | }; |
| 1996 | |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 1997 | static const struct panel_desc_dsi panasonic_vvx10f004b00 = { |
| 1998 | .desc = { |
| 1999 | .modes = &panasonic_vvx10f004b00_mode, |
| 2000 | .num_modes = 1, |
Thierry Reding | d7a839c | 2014-11-06 10:11:01 +0100 | [diff] [blame] | 2001 | .bpc = 8, |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2002 | .size = { |
| 2003 | .width = 217, |
| 2004 | .height = 136, |
| 2005 | }, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2006 | }, |
Alexandre Courbot | 5e4cc27 | 2014-07-08 21:32:12 +0900 | [diff] [blame] | 2007 | .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | |
| 2008 | MIPI_DSI_CLOCK_NON_CONTINUOUS, |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2009 | .format = MIPI_DSI_FMT_RGB888, |
| 2010 | .lanes = 4, |
| 2011 | }; |
| 2012 | |
| 2013 | static const struct of_device_id dsi_of_match[] = { |
| 2014 | { |
Thierry Reding | d718d79 | 2015-04-08 16:52:33 +0200 | [diff] [blame] | 2015 | .compatible = "auo,b080uan01", |
| 2016 | .data = &auo_b080uan01 |
| 2017 | }, { |
Chris Zhong | c852196 | 2015-11-20 16:15:37 +0800 | [diff] [blame] | 2018 | .compatible = "boe,tv080wum-nl0", |
| 2019 | .data = &boe_tv080wum_nl0 |
| 2020 | }, { |
Alexandre Courbot | 712ac1b | 2014-01-21 18:57:10 +0900 | [diff] [blame] | 2021 | .compatible = "lg,ld070wx3-sl01", |
| 2022 | .data = &lg_ld070wx3_sl01 |
| 2023 | }, { |
Alexandre Courbot | 499ce85 | 2014-01-21 18:57:09 +0900 | [diff] [blame] | 2024 | .compatible = "lg,lh500wx1-sd03", |
| 2025 | .data = &lg_lh500wx1_sd03 |
| 2026 | }, { |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2027 | .compatible = "panasonic,vvx10f004b00", |
| 2028 | .data = &panasonic_vvx10f004b00 |
| 2029 | }, { |
| 2030 | /* sentinel */ |
| 2031 | } |
| 2032 | }; |
| 2033 | MODULE_DEVICE_TABLE(of, dsi_of_match); |
| 2034 | |
| 2035 | static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi) |
| 2036 | { |
| 2037 | const struct panel_desc_dsi *desc; |
| 2038 | const struct of_device_id *id; |
| 2039 | int err; |
| 2040 | |
| 2041 | id = of_match_node(dsi_of_match, dsi->dev.of_node); |
| 2042 | if (!id) |
| 2043 | return -ENODEV; |
| 2044 | |
| 2045 | desc = id->data; |
| 2046 | |
| 2047 | err = panel_simple_probe(&dsi->dev, &desc->desc); |
| 2048 | if (err < 0) |
| 2049 | return err; |
| 2050 | |
Thierry Reding | 462658b | 2014-03-14 11:24:57 +0100 | [diff] [blame] | 2051 | dsi->mode_flags = desc->flags; |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2052 | dsi->format = desc->format; |
| 2053 | dsi->lanes = desc->lanes; |
| 2054 | |
| 2055 | return mipi_dsi_attach(dsi); |
| 2056 | } |
| 2057 | |
| 2058 | static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi) |
| 2059 | { |
| 2060 | int err; |
| 2061 | |
| 2062 | err = mipi_dsi_detach(dsi); |
| 2063 | if (err < 0) |
| 2064 | dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err); |
| 2065 | |
| 2066 | return panel_simple_remove(&dsi->dev); |
| 2067 | } |
| 2068 | |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 2069 | static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi) |
| 2070 | { |
| 2071 | panel_simple_shutdown(&dsi->dev); |
| 2072 | } |
| 2073 | |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2074 | static struct mipi_dsi_driver panel_simple_dsi_driver = { |
| 2075 | .driver = { |
| 2076 | .name = "panel-simple-dsi", |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2077 | .of_match_table = dsi_of_match, |
| 2078 | }, |
| 2079 | .probe = panel_simple_dsi_probe, |
| 2080 | .remove = panel_simple_dsi_remove, |
Thierry Reding | d02fd93 | 2014-04-29 17:21:21 +0200 | [diff] [blame] | 2081 | .shutdown = panel_simple_dsi_shutdown, |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2082 | }; |
| 2083 | |
| 2084 | static int __init panel_simple_init(void) |
| 2085 | { |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2086 | int err; |
| 2087 | |
| 2088 | err = platform_driver_register(&panel_simple_platform_driver); |
| 2089 | if (err < 0) |
| 2090 | return err; |
| 2091 | |
| 2092 | if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) { |
| 2093 | err = mipi_dsi_driver_register(&panel_simple_dsi_driver); |
| 2094 | if (err < 0) |
| 2095 | return err; |
| 2096 | } |
| 2097 | |
| 2098 | return 0; |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2099 | } |
| 2100 | module_init(panel_simple_init); |
| 2101 | |
| 2102 | static void __exit panel_simple_exit(void) |
| 2103 | { |
Thierry Reding | 210fcd9 | 2013-11-22 19:27:11 +0100 | [diff] [blame] | 2104 | if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) |
| 2105 | mipi_dsi_driver_unregister(&panel_simple_dsi_driver); |
| 2106 | |
Thierry Reding | 280921d | 2013-08-30 15:10:14 +0200 | [diff] [blame] | 2107 | platform_driver_unregister(&panel_simple_platform_driver); |
| 2108 | } |
| 2109 | module_exit(panel_simple_exit); |
| 2110 | |
| 2111 | MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>"); |
| 2112 | MODULE_DESCRIPTION("DRM Driver for Simple Panels"); |
| 2113 | MODULE_LICENSE("GPL and additional rights"); |