Lines Matching +full:lcd +full:- +full:olinuxino
17 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
130 for (i = 0; i < panel->desc->num_timings; i++) { in panel_simple_get_timings_modes()
131 const struct display_timing *dt = &panel->desc->timings[i]; in panel_simple_get_timings_modes()
135 mode = drm_mode_create(connector->dev); in panel_simple_get_timings_modes()
137 dev_err(panel->base.dev, "failed to add mode %ux%u\n", in panel_simple_get_timings_modes()
138 dt->hactive.typ, dt->vactive.typ); in panel_simple_get_timings_modes()
144 mode->type |= DRM_MODE_TYPE_DRIVER; in panel_simple_get_timings_modes()
146 if (panel->desc->num_timings == 1) in panel_simple_get_timings_modes()
147 mode->type |= DRM_MODE_TYPE_PREFERRED; in panel_simple_get_timings_modes()
162 for (i = 0; i < panel->desc->num_modes; i++) { in panel_simple_get_display_modes()
163 const struct drm_display_mode *m = &panel->desc->modes[i]; in panel_simple_get_display_modes()
165 mode = drm_mode_duplicate(connector->dev, m); in panel_simple_get_display_modes()
167 dev_err(panel->base.dev, "failed to add mode %ux%u@%u\n", in panel_simple_get_display_modes()
168 m->hdisplay, m->vdisplay, in panel_simple_get_display_modes()
173 mode->type |= DRM_MODE_TYPE_DRIVER; in panel_simple_get_display_modes()
175 if (panel->desc->num_modes == 1) in panel_simple_get_display_modes()
176 mode->type |= DRM_MODE_TYPE_PREFERRED; in panel_simple_get_display_modes()
191 bool has_override = panel->override_mode.type; in panel_simple_get_non_edid_modes()
194 if (!panel->desc) in panel_simple_get_non_edid_modes()
198 mode = drm_mode_duplicate(connector->dev, in panel_simple_get_non_edid_modes()
199 &panel->override_mode); in panel_simple_get_non_edid_modes()
204 dev_err(panel->base.dev, "failed to add override mode\n"); in panel_simple_get_non_edid_modes()
209 if (num == 0 && panel->desc->num_timings) in panel_simple_get_non_edid_modes()
218 WARN_ON(panel->desc->num_timings && panel->desc->num_modes); in panel_simple_get_non_edid_modes()
222 connector->display_info.bpc = panel->desc->bpc; in panel_simple_get_non_edid_modes()
223 connector->display_info.width_mm = panel->desc->size.width; in panel_simple_get_non_edid_modes()
224 connector->display_info.height_mm = panel->desc->size.height; in panel_simple_get_non_edid_modes()
225 if (panel->desc->bus_format) in panel_simple_get_non_edid_modes()
226 drm_display_info_set_bus_formats(&connector->display_info, in panel_simple_get_non_edid_modes()
227 &panel->desc->bus_format, 1); in panel_simple_get_non_edid_modes()
228 connector->display_info.bus_flags = panel->desc->bus_flags; in panel_simple_get_non_edid_modes()
237 if (!p->enabled) in panel_simple_disable()
240 if (p->desc->delay.disable) in panel_simple_disable()
241 msleep(p->desc->delay.disable); in panel_simple_disable()
243 p->enabled = false; in panel_simple_disable()
252 if (!p->prepared) in panel_simple_unprepare()
255 gpiod_set_value_cansleep(p->enable_gpio, 0); in panel_simple_unprepare()
257 regulator_disable(p->supply); in panel_simple_unprepare()
259 if (p->desc->delay.unprepare) in panel_simple_unprepare()
260 msleep(p->desc->delay.unprepare); in panel_simple_unprepare()
262 p->prepared = false; in panel_simple_unprepare()
272 p->hpd_gpio = devm_gpiod_get_optional(dev, "hpd", GPIOD_IN); in panel_simple_get_hpd_gpio()
273 if (IS_ERR(p->hpd_gpio)) { in panel_simple_get_hpd_gpio()
274 err = PTR_ERR(p->hpd_gpio); in panel_simple_get_hpd_gpio()
277 * If we're called from probe we won't consider '-EPROBE_DEFER' in panel_simple_get_hpd_gpio()
278 * to be an error--we'll leave the error code in "hpd_gpio". in panel_simple_get_hpd_gpio()
283 if (err != -EPROBE_DEFER || !from_probe) { in panel_simple_get_hpd_gpio()
299 if (p->prepared) in panel_simple_prepare()
302 err = regulator_enable(p->supply); in panel_simple_prepare()
304 dev_err(panel->dev, "failed to enable supply: %d\n", err); in panel_simple_prepare()
308 gpiod_set_value_cansleep(p->enable_gpio, 1); in panel_simple_prepare()
310 delay = p->desc->delay.prepare; in panel_simple_prepare()
311 if (p->no_hpd) in panel_simple_prepare()
312 delay += p->desc->delay.hpd_absent_delay; in panel_simple_prepare()
316 if (p->hpd_gpio) { in panel_simple_prepare()
317 if (IS_ERR(p->hpd_gpio)) { in panel_simple_prepare()
318 err = panel_simple_get_hpd_gpio(panel->dev, p, false); in panel_simple_prepare()
323 err = readx_poll_timeout(gpiod_get_value_cansleep, p->hpd_gpio, in panel_simple_prepare()
330 dev_err(panel->dev, in panel_simple_prepare()
336 p->prepared = true; in panel_simple_prepare()
345 if (p->enabled) in panel_simple_enable()
348 if (p->desc->delay.enable) in panel_simple_enable()
349 msleep(p->desc->delay.enable); in panel_simple_enable()
351 p->enabled = true; in panel_simple_enable()
363 if (p->ddc) { in panel_simple_get_modes()
364 struct edid *edid = drm_get_edid(connector, p->ddc); in panel_simple_get_modes()
373 /* add hard-coded panel modes */ in panel_simple_get_modes()
377 drm_connector_set_panel_orientation(connector, p->orientation); in panel_simple_get_modes()
389 if (p->desc->num_timings < num_timings) in panel_simple_get_timings()
390 num_timings = p->desc->num_timings; in panel_simple_get_timings()
394 timings[i] = p->desc->timings[i]; in panel_simple_get_timings()
396 return p->desc->num_timings; in panel_simple_get_timings()
420 np = dev->of_node; in panel_dpi_probe()
423 return -ENOMEM; in panel_dpi_probe()
427 return -ENOMEM; in panel_dpi_probe()
429 ret = of_get_display_timing(np, "panel-timing", timing); in panel_dpi_probe()
431 dev_err(dev, "%pOF: no panel-timing node found for \"panel-dpi\" binding\n", in panel_dpi_probe()
436 desc->timings = timing; in panel_dpi_probe()
437 desc->num_timings = 1; in panel_dpi_probe()
439 of_property_read_u32(np, "width-mm", &desc->size.width); in panel_dpi_probe()
440 of_property_read_u32(np, "height-mm", &desc->size.height); in panel_dpi_probe()
444 vm.flags = timing->flags; in panel_dpi_probe()
446 desc->bus_flags = bus_flags; in panel_dpi_probe()
449 desc->connector_type = DRM_MODE_CONNECTOR_DPI; in panel_dpi_probe()
451 panel->desc = desc; in panel_dpi_probe()
457 (to_check->field.typ >= bounds->field.min && \
458 to_check->field.typ <= bounds->field.max)
463 const struct panel_desc *desc = panel->desc; in panel_simple_parse_panel_timing_node()
467 if (WARN_ON(desc->num_modes)) { in panel_simple_parse_panel_timing_node()
471 if (WARN_ON(!desc->num_timings)) { in panel_simple_parse_panel_timing_node()
476 for (i = 0; i < panel->desc->num_timings; i++) { in panel_simple_parse_panel_timing_node()
477 const struct display_timing *dt = &panel->desc->timings[i]; in panel_simple_parse_panel_timing_node()
489 if (ot->flags != dt->flags) in panel_simple_parse_panel_timing_node()
493 drm_display_mode_from_videomode(&vm, &panel->override_mode); in panel_simple_parse_panel_timing_node()
494 panel->override_mode.type |= DRM_MODE_TYPE_DRIVER | in panel_simple_parse_panel_timing_node()
499 if (WARN_ON(!panel->override_mode.type)) in panel_simple_parse_panel_timing_node()
514 return -ENOMEM; in panel_simple_probe()
516 panel->enabled = false; in panel_simple_probe()
517 panel->prepared = false; in panel_simple_probe()
518 panel->desc = desc; in panel_simple_probe()
520 panel->no_hpd = of_property_read_bool(dev->of_node, "no-hpd"); in panel_simple_probe()
521 if (!panel->no_hpd) { in panel_simple_probe()
527 panel->supply = devm_regulator_get(dev, "power"); in panel_simple_probe()
528 if (IS_ERR(panel->supply)) in panel_simple_probe()
529 return PTR_ERR(panel->supply); in panel_simple_probe()
531 panel->enable_gpio = devm_gpiod_get_optional(dev, "enable", in panel_simple_probe()
533 if (IS_ERR(panel->enable_gpio)) { in panel_simple_probe()
534 err = PTR_ERR(panel->enable_gpio); in panel_simple_probe()
535 if (err != -EPROBE_DEFER) in panel_simple_probe()
540 err = of_drm_get_panel_orientation(dev->of_node, &panel->orientation); in panel_simple_probe()
542 dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, err); in panel_simple_probe()
546 ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0); in panel_simple_probe()
548 panel->ddc = of_find_i2c_adapter_by_node(ddc); in panel_simple_probe()
551 if (!panel->ddc) in panel_simple_probe()
552 return -EPROBE_DEFER; in panel_simple_probe()
556 /* Handle the generic panel-dpi binding */ in panel_simple_probe()
561 if (!of_get_display_timing(dev->of_node, "panel-timing", &dt)) in panel_simple_probe()
565 connector_type = desc->connector_type; in panel_simple_probe()
573 WARN_ON(desc->bus_flags & in panel_simple_probe()
578 WARN_ON(desc->bus_format != MEDIA_BUS_FMT_RGB666_1X7X3_SPWG && in panel_simple_probe()
579 desc->bus_format != MEDIA_BUS_FMT_RGB888_1X7X4_SPWG && in panel_simple_probe()
580 desc->bus_format != MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA); in panel_simple_probe()
581 WARN_ON(desc->bus_format == MEDIA_BUS_FMT_RGB666_1X7X3_SPWG && in panel_simple_probe()
582 desc->bpc != 6); in panel_simple_probe()
583 WARN_ON((desc->bus_format == MEDIA_BUS_FMT_RGB888_1X7X4_SPWG || in panel_simple_probe()
584 desc->bus_format == MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA) && in panel_simple_probe()
585 desc->bpc != 8); in panel_simple_probe()
588 if (desc->bus_format == 0) in panel_simple_probe()
590 if (desc->bpc != 6 && desc->bpc != 8) in panel_simple_probe()
591 dev_warn(dev, "Expected bpc in {6,8} but got: %u\n", desc->bpc); in panel_simple_probe()
594 if (desc->bpc != 6 && desc->bpc != 8) in panel_simple_probe()
595 dev_warn(dev, "Expected bpc in {6,8} but got: %u\n", desc->bpc); in panel_simple_probe()
606 if (desc->bus_flags & ~bus_flags) in panel_simple_probe()
607 dev_warn(dev, "Unexpected bus_flags(%d)\n", desc->bus_flags & ~bus_flags); in panel_simple_probe()
608 if (!(desc->bus_flags & bus_flags)) in panel_simple_probe()
610 if (desc->bus_format == 0) in panel_simple_probe()
612 if (desc->bpc != 6 && desc->bpc != 8) in panel_simple_probe()
613 dev_warn(dev, "Expected bpc in {6,8} but got: %u\n", desc->bpc); in panel_simple_probe()
616 dev_warn(dev, "Specify a valid connector_type: %d\n", desc->connector_type); in panel_simple_probe()
621 drm_panel_init(&panel->base, dev, &panel_simple_funcs, connector_type); in panel_simple_probe()
623 err = drm_panel_of_backlight(&panel->base); in panel_simple_probe()
627 drm_panel_add(&panel->base); in panel_simple_probe()
634 if (panel->ddc) in panel_simple_probe()
635 put_device(&panel->ddc->dev); in panel_simple_probe()
644 drm_panel_remove(&panel->base); in panel_simple_remove()
645 drm_panel_disable(&panel->base); in panel_simple_remove()
646 drm_panel_unprepare(&panel->base); in panel_simple_remove()
648 if (panel->ddc) in panel_simple_remove()
649 put_device(&panel->ddc->dev); in panel_simple_remove()
658 drm_panel_disable(&panel->base); in panel_simple_shutdown()
659 drm_panel_unprepare(&panel->base); in panel_simple_shutdown()
1350 * - If HPD isn't hooked up you still have 200 ms delay.
1351 * - If HPD is hooked up we won't try to look at it for the
1419 /* S070PWS19HP-FC21 2017/04/22 */
1446 /* S070SWV29HG-DC44 2017/09/21 */
2235 * - total horizontal time: { 1506, 1592, 1716 }
2236 * - total vertical time: { 788, 800, 868 }
3027 * https://www.adafruit.com/images/product-files/2406/c3163.pdf
3794 .hback_porch = { 216 - 128, 216 - 128, 216 - 128 },
3798 .vback_porch = { 35 - 2, 35 - 2, 35 - 2 },
3904 .compatible = "ampire,am-1280800n3tzqw-t00h",
3907 .compatible = "ampire,am-480272h3tmqw-t01h",
3913 .compatible = "arm,rtsm-display",
3916 .compatible = "armadeus,st0700-adapt",
3973 .compatible = "bananapi,s070wv20-ct16",
3976 .compatible = "boe,hv070wsa-100",
3982 .compatible = "boe,nv133fhm-n61",
3985 .compatible = "boe,nv133fhm-n62",
3991 .compatible = "cdtech,s043wq26h-ct7",
3994 .compatible = "cdtech,s070pws19hp-fc21",
3997 .compatible = "cdtech,s070swv29hg-dc44",
4000 .compatible = "cdtech,s070wv95-ct16",
4003 .compatible = "chefree,ch101olhlwh-002",
4018 .compatible = "dlc,dlc0700yzg-1",
4051 .compatible = "foxlink,fl500wvr00-a0t",
4081 .compatible = "innolux,g070y2-l01",
4084 .compatible = "innolux,g101ice-l01",
4087 .compatible = "innolux,g121i1-l01",
4090 .compatible = "innolux,g121x1-l03",
4096 .compatible = "innolux,n156bge-l21",
4099 .compatible = "innolux,p120zdg-bf1",
4102 .compatible = "innolux,zj070na-01p",
4105 .compatible = "ivo,m133nwf4-r0",
4108 .compatible = "kingdisplay,kd116n21-30nv-a010",
4123 .compatible = "lemaker,bl035-rgb-002",
4129 .compatible = "lg,lp079qx1-sp0v",
4132 .compatible = "lg,lp097qx1-spa1",
4144 .compatible = "logictechno,lt161010-2nhc",
4147 .compatible = "logictechno,lt161010-2nhr",
4150 .compatible = "logictechno,lt170410-2whc",
4153 .compatible = "mitsubishi,aa070mc01-ca1",
4156 .compatible = "nec,nl12880bc20-05",
4159 .compatible = "nec,nl4827hc19-05b",
4162 .compatible = "netron-dy,e231732",
4168 .compatible = "newhaven,nhd-4.3-480272ef-atxl",
4171 .compatible = "nlt,nl192108ac18-02d",
4177 .compatible = "okaya,rs800480t-7x0gp",
4180 .compatible = "olimex,lcd-olinuxino-43-ts",
4195 .compatible = "osddisplays,osd070t1718-19ts",
4198 .compatible = "pda,91-00156-a0",
4201 .compatible = "powertip,ph800480t013-idf02",
4204 .compatible = "qiaodian,qd43003c0-40",
4210 .compatible = "rocktech,rk101ii01d-ct",
4213 .compatible = "samsung,lsn122dl01-c01",
4219 .compatible = "samsung,ltn140at29-301",
4225 .compatible = "sharp,ld-d5116z01b",
4243 .compatible = "shelly,sca07010-bfn-lnn",
4252 .compatible = "tfc,s9700rtwv43tr-01b",
4264 .compatible = "ti,nspire-cx-lcd-panel",
4267 .compatible = "ti,nspire-classic-lcd-panel",
4273 .compatible = "tpk,f07a-0102",
4276 .compatible = "tpk,f10a-0102",
4279 .compatible = "urt,umsh-8596md-t",
4282 .compatible = "urt,umsh-8596md-1t",
4285 .compatible = "urt,umsh-8596md-7t",
4288 .compatible = "urt,umsh-8596md-11t",
4291 .compatible = "urt,umsh-8596md-19t",
4294 .compatible = "urt,umsh-8596md-20t",
4297 .compatible = "vxt,vl050-8048nt-c01",
4304 .compatible = "panel-dpi",
4316 id = of_match_node(platform_of_match, pdev->dev.of_node); in panel_simple_platform_probe()
4318 return -ENODEV; in panel_simple_platform_probe()
4320 return panel_simple_probe(&pdev->dev, id->data); in panel_simple_platform_probe()
4325 return panel_simple_remove(&pdev->dev); in panel_simple_platform_remove()
4330 panel_simple_shutdown(&pdev->dev); in panel_simple_platform_shutdown()
4335 .name = "panel-simple",
4558 .compatible = "boe,tv080wum-nl0",
4561 .compatible = "lg,ld070wx3-sl01",
4564 .compatible = "lg,lh500wx1-sd03",
4570 .compatible = "lg,acx467akm-7",
4573 .compatible = "osddisplays,osd101t2045-53ts",
4587 id = of_match_node(dsi_of_match, dsi->dev.of_node); in panel_simple_dsi_probe()
4589 return -ENODEV; in panel_simple_dsi_probe()
4591 desc = id->data; in panel_simple_dsi_probe()
4593 err = panel_simple_probe(&dsi->dev, &desc->desc); in panel_simple_dsi_probe()
4597 dsi->mode_flags = desc->flags; in panel_simple_dsi_probe()
4598 dsi->format = desc->format; in panel_simple_dsi_probe()
4599 dsi->lanes = desc->lanes; in panel_simple_dsi_probe()
4603 struct panel_simple *panel = dev_get_drvdata(&dsi->dev); in panel_simple_dsi_probe()
4605 drm_panel_remove(&panel->base); in panel_simple_dsi_probe()
4617 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err); in panel_simple_dsi_remove()
4619 return panel_simple_remove(&dsi->dev); in panel_simple_dsi_remove()
4624 panel_simple_shutdown(&dsi->dev); in panel_simple_dsi_shutdown()
4629 .name = "panel-simple-dsi",