Lines Matching +full:himax83102 +full:- +full:j02

1 // SPDX-License-Identifier: GPL-2.0
5 * - Starry 10.51" WUXGA MIPI-DSI panel
7 * Based on drivers/gpu/drm/panel/panel-himax-hx8394.c
94 struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; in starry_himax83102_j02_init()
191 struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; in boe_nv110wum_init()
296 struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; in ivo_t109nw41_init()
474 struct mipi_dsi_device *dsi = ctx->dsi; in hx83102_disable()
477 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in hx83102_disable()
491 gpiod_set_value(ctx->enable_gpio, 0); in hx83102_unprepare()
493 regulator_disable(ctx->avee); in hx83102_unprepare()
494 regulator_disable(ctx->avdd); in hx83102_unprepare()
496 regulator_disable(ctx->pp1800); in hx83102_unprepare()
504 struct mipi_dsi_device *dsi = ctx->dsi; in hx83102_prepare()
507 gpiod_set_value(ctx->enable_gpio, 0); in hx83102_prepare()
510 dsi_ctx.accum_err = regulator_enable(ctx->pp1800); in hx83102_prepare()
516 dsi_ctx.accum_err = regulator_enable(ctx->avdd); in hx83102_prepare()
519 dsi_ctx.accum_err = regulator_enable(ctx->avee); in hx83102_prepare()
531 gpiod_set_value(ctx->enable_gpio, 1); in hx83102_prepare()
533 gpiod_set_value(ctx->enable_gpio, 0); in hx83102_prepare()
535 gpiod_set_value(ctx->enable_gpio, 1); in hx83102_prepare()
538 dsi_ctx.accum_err = ctx->desc->init(ctx); in hx83102_prepare()
549 gpiod_set_value(ctx->enable_gpio, 0); in hx83102_prepare()
550 regulator_disable(ctx->avee); in hx83102_prepare()
552 regulator_disable(ctx->avdd); in hx83102_prepare()
555 regulator_disable(ctx->pp1800); in hx83102_prepare()
564 const struct drm_display_mode *m = ctx->desc->modes; in hx83102_get_modes()
567 mode = drm_mode_duplicate(connector->dev, m); in hx83102_get_modes()
569 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; in hx83102_get_modes()
573 connector->display_info.width_mm = ctx->desc->size.width_mm; in hx83102_get_modes()
574 connector->display_info.height_mm = ctx->desc->size.height_mm; in hx83102_get_modes()
575 connector->display_info.bpc = 8; in hx83102_get_modes()
584 return ctx->orientation; in hx83102_get_orientation()
598 struct device *dev = &ctx->dsi->dev; in hx83102_panel_add()
601 ctx->avdd = devm_regulator_get(dev, "avdd"); in hx83102_panel_add()
602 if (IS_ERR(ctx->avdd)) in hx83102_panel_add()
603 return PTR_ERR(ctx->avdd); in hx83102_panel_add()
605 ctx->avee = devm_regulator_get(dev, "avee"); in hx83102_panel_add()
606 if (IS_ERR(ctx->avee)) in hx83102_panel_add()
607 return PTR_ERR(ctx->avee); in hx83102_panel_add()
609 ctx->pp1800 = devm_regulator_get(dev, "pp1800"); in hx83102_panel_add()
610 if (IS_ERR(ctx->pp1800)) in hx83102_panel_add()
611 return PTR_ERR(ctx->pp1800); in hx83102_panel_add()
613 ctx->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW); in hx83102_panel_add()
614 if (IS_ERR(ctx->enable_gpio)) in hx83102_panel_add()
615 return dev_err_probe(dev, PTR_ERR(ctx->enable_gpio), "Cannot get enable GPIO\n"); in hx83102_panel_add()
617 ctx->base.prepare_prev_first = true; in hx83102_panel_add()
619 drm_panel_init(&ctx->base, dev, &hx83102_drm_funcs, in hx83102_panel_add()
621 err = of_drm_get_panel_orientation(dev->of_node, &ctx->orientation); in hx83102_panel_add()
625 err = drm_panel_of_backlight(&ctx->base); in hx83102_panel_add()
629 ctx->base.funcs = &hx83102_drm_funcs; in hx83102_panel_add()
630 ctx->base.dev = &ctx->dsi->dev; in hx83102_panel_add()
632 drm_panel_add(&ctx->base); in hx83102_panel_add()
643 ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL); in hx83102_probe()
645 return -ENOMEM; in hx83102_probe()
647 desc = of_device_get_match_data(&dsi->dev); in hx83102_probe()
648 dsi->lanes = 4; in hx83102_probe()
649 dsi->format = MIPI_DSI_FMT_RGB888; in hx83102_probe()
650 dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | in hx83102_probe()
652 ctx->desc = desc; in hx83102_probe()
653 ctx->dsi = dsi; in hx83102_probe()
662 drm_panel_remove(&ctx->base); in hx83102_probe()
674 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret); in hx83102_remove()
676 if (ctx->base.dev) in hx83102_remove()
677 drm_panel_remove(&ctx->base); in hx83102_remove()
681 { .compatible = "boe,nv110wum-l60",
687 { .compatible = "starry,himax83102-j02",
698 .name = "panel-himax-hx83102",
704 MODULE_AUTHOR("Cong Yang <yangcong5@huaqin.corp-partner.google.com>");