Lines Matching +full:tv101wum +full:- +full:nl6

1 // SPDX-License-Identifier: GPL-2.0
436 struct mipi_dsi_device *dsi = boe->dsi; in boe_panel_init_dcs_cmd()
437 struct drm_panel *panel = &boe->base; in boe_panel_init_dcs_cmd()
440 if (boe->desc->init_cmds) { in boe_panel_init_dcs_cmd()
441 const struct panel_init_cmd *init_cmds = boe->desc->init_cmds; in boe_panel_init_dcs_cmd()
446 switch (cmd->type) { in boe_panel_init_dcs_cmd()
448 msleep(cmd->data[0]); in boe_panel_init_dcs_cmd()
453 err = mipi_dsi_dcs_write(dsi, cmd->data[0], in boe_panel_init_dcs_cmd()
454 cmd->len <= 1 ? NULL : in boe_panel_init_dcs_cmd()
455 &cmd->data[1], in boe_panel_init_dcs_cmd()
456 cmd->len - 1); in boe_panel_init_dcs_cmd()
460 err = -EINVAL; in boe_panel_init_dcs_cmd()
464 dev_err(panel->dev, in boe_panel_init_dcs_cmd()
475 struct mipi_dsi_device *dsi = boe->dsi; in boe_panel_enter_sleep_mode()
478 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in boe_panel_enter_sleep_mode()
496 if (!boe->prepared) in boe_panel_unprepare()
501 dev_err(panel->dev, "failed to set panel off: %d\n", ret); in boe_panel_unprepare()
507 if (boe->desc->discharge_on_disable) { in boe_panel_unprepare()
508 regulator_disable(boe->avee); in boe_panel_unprepare()
509 regulator_disable(boe->avdd); in boe_panel_unprepare()
511 gpiod_set_value(boe->enable_gpio, 0); in boe_panel_unprepare()
513 regulator_disable(boe->pp1800); in boe_panel_unprepare()
515 gpiod_set_value(boe->enable_gpio, 0); in boe_panel_unprepare()
517 regulator_disable(boe->avee); in boe_panel_unprepare()
518 regulator_disable(boe->avdd); in boe_panel_unprepare()
520 regulator_disable(boe->pp1800); in boe_panel_unprepare()
523 boe->prepared = false; in boe_panel_unprepare()
533 if (boe->prepared) in boe_panel_prepare()
536 gpiod_set_value(boe->enable_gpio, 0); in boe_panel_prepare()
539 ret = regulator_enable(boe->pp1800); in boe_panel_prepare()
545 ret = regulator_enable(boe->avdd); in boe_panel_prepare()
548 ret = regulator_enable(boe->avee); in boe_panel_prepare()
554 gpiod_set_value(boe->enable_gpio, 1); in boe_panel_prepare()
556 gpiod_set_value(boe->enable_gpio, 0); in boe_panel_prepare()
558 gpiod_set_value(boe->enable_gpio, 1); in boe_panel_prepare()
563 dev_err(panel->dev, "failed to init panel: %d\n", ret); in boe_panel_prepare()
567 boe->prepared = true; in boe_panel_prepare()
572 regulator_disable(boe->avee); in boe_panel_prepare()
574 regulator_disable(boe->avdd); in boe_panel_prepare()
577 regulator_disable(boe->pp1800); in boe_panel_prepare()
578 gpiod_set_value(boe->enable_gpio, 0); in boe_panel_prepare()
728 const struct drm_display_mode *m = boe->desc->modes; in boe_panel_get_modes()
731 mode = drm_mode_duplicate(connector->dev, m); in boe_panel_get_modes()
733 dev_err(panel->dev, "failed to add mode %ux%u@%u\n", in boe_panel_get_modes()
734 m->hdisplay, m->vdisplay, drm_mode_vrefresh(m)); in boe_panel_get_modes()
735 return -ENOMEM; in boe_panel_get_modes()
738 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; in boe_panel_get_modes()
742 connector->display_info.width_mm = boe->desc->size.width_mm; in boe_panel_get_modes()
743 connector->display_info.height_mm = boe->desc->size.height_mm; in boe_panel_get_modes()
744 connector->display_info.bpc = boe->desc->bpc; in boe_panel_get_modes()
745 drm_connector_set_panel_orientation(connector, boe->orientation); in boe_panel_get_modes()
759 struct device *dev = &boe->dsi->dev; in boe_panel_add()
762 boe->avdd = devm_regulator_get(dev, "avdd"); in boe_panel_add()
763 if (IS_ERR(boe->avdd)) in boe_panel_add()
764 return PTR_ERR(boe->avdd); in boe_panel_add()
766 boe->avee = devm_regulator_get(dev, "avee"); in boe_panel_add()
767 if (IS_ERR(boe->avee)) in boe_panel_add()
768 return PTR_ERR(boe->avee); in boe_panel_add()
770 boe->pp1800 = devm_regulator_get(dev, "pp1800"); in boe_panel_add()
771 if (IS_ERR(boe->pp1800)) in boe_panel_add()
772 return PTR_ERR(boe->pp1800); in boe_panel_add()
774 boe->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW); in boe_panel_add()
775 if (IS_ERR(boe->enable_gpio)) { in boe_panel_add()
776 dev_err(dev, "cannot get reset-gpios %ld\n", in boe_panel_add()
777 PTR_ERR(boe->enable_gpio)); in boe_panel_add()
778 return PTR_ERR(boe->enable_gpio); in boe_panel_add()
781 gpiod_set_value(boe->enable_gpio, 0); in boe_panel_add()
783 drm_panel_init(&boe->base, dev, &boe_panel_funcs, in boe_panel_add()
785 err = of_drm_get_panel_orientation(dev->of_node, &boe->orientation); in boe_panel_add()
787 dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, err); in boe_panel_add()
791 err = drm_panel_of_backlight(&boe->base); in boe_panel_add()
795 boe->base.funcs = &boe_panel_funcs; in boe_panel_add()
796 boe->base.dev = &boe->dsi->dev; in boe_panel_add()
798 drm_panel_add(&boe->base); in boe_panel_add()
809 boe = devm_kzalloc(&dsi->dev, sizeof(*boe), GFP_KERNEL); in boe_panel_probe()
811 return -ENOMEM; in boe_panel_probe()
813 desc = of_device_get_match_data(&dsi->dev); in boe_panel_probe()
814 dsi->lanes = desc->lanes; in boe_panel_probe()
815 dsi->format = desc->format; in boe_panel_probe()
816 dsi->mode_flags = desc->mode_flags; in boe_panel_probe()
817 boe->desc = desc; in boe_panel_probe()
818 boe->dsi = dsi; in boe_panel_probe()
827 drm_panel_remove(&boe->base); in boe_panel_probe()
836 drm_panel_disable(&boe->base); in boe_panel_shutdown()
837 drm_panel_unprepare(&boe->base); in boe_panel_shutdown()
849 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret); in boe_panel_remove()
851 if (boe->base.dev) in boe_panel_remove()
852 drm_panel_remove(&boe->base); in boe_panel_remove()
858 { .compatible = "boe,tv101wum-nl6",
861 { .compatible = "auo,kd101n80-45na",
864 { .compatible = "boe,tv101wum-n53",
870 { .compatible = "boe,tv105wum-nw0",
879 .name = "panel-boe-tv101wum-nl6",
889 MODULE_DESCRIPTION("BOE tv101wum-nl6 1200x1920 video mode panel driver");