Lines Matching +full:mipi +full:- +full:bias

1 // SPDX-License-Identifier: GPL-2.0
30 #define MCS_STBCTR 0x12 /* TE1 Output Setting Zig-Zag Connection */
31 #define MCS_SGOPCTR 0x16 /* Source Bias Current */
43 #define MCS_SW_CTRL 0x5F /* Interface Control for PFM and MIPI */
45 /* CMD2 P2 commands (GOA Timing Control) - no description in datasheet */
107 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in rm68200_dcs_write_buf()
112 dev_err_ratelimited(ctx->dev, "MIPI DSI DCS write buffer failed: %d\n", err); in rm68200_dcs_write_buf()
117 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in rm68200_dcs_write_cmd()
122 dev_err_ratelimited(ctx->dev, "MIPI DSI DCS write failed: %d\n", err); in rm68200_dcs_write_cmd()
133 * This panel is not able to auto-increment all cmd addresses so for some of
238 if (!ctx->enabled) in rm68200_disable()
241 ctx->enabled = false; in rm68200_disable()
249 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in rm68200_unprepare()
252 if (!ctx->prepared) in rm68200_unprepare()
257 dev_warn(panel->dev, "failed to set display off: %d\n", ret); in rm68200_unprepare()
261 dev_warn(panel->dev, "failed to enter sleep mode: %d\n", ret); in rm68200_unprepare()
265 if (ctx->reset_gpio) { in rm68200_unprepare()
266 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in rm68200_unprepare()
270 regulator_disable(ctx->supply); in rm68200_unprepare()
272 ctx->prepared = false; in rm68200_unprepare()
280 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in rm68200_prepare()
283 if (ctx->prepared) in rm68200_prepare()
286 ret = regulator_enable(ctx->supply); in rm68200_prepare()
288 dev_err(ctx->dev, "failed to enable supply: %d\n", ret); in rm68200_prepare()
292 if (ctx->reset_gpio) { in rm68200_prepare()
293 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in rm68200_prepare()
295 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in rm68200_prepare()
313 ctx->prepared = true; in rm68200_prepare()
322 if (ctx->enabled) in rm68200_enable()
325 ctx->enabled = true; in rm68200_enable()
335 mode = drm_mode_duplicate(connector->dev, &default_mode); in rm68200_get_modes()
337 dev_err(panel->dev, "failed to add mode %ux%u@%u\n", in rm68200_get_modes()
340 return -ENOMEM; in rm68200_get_modes()
345 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; in rm68200_get_modes()
348 connector->display_info.width_mm = mode->width_mm; in rm68200_get_modes()
349 connector->display_info.height_mm = mode->height_mm; in rm68200_get_modes()
364 struct device *dev = &dsi->dev; in rm68200_probe()
370 return -ENOMEM; in rm68200_probe()
372 ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); in rm68200_probe()
373 if (IS_ERR(ctx->reset_gpio)) { in rm68200_probe()
374 ret = PTR_ERR(ctx->reset_gpio); in rm68200_probe()
379 ctx->supply = devm_regulator_get(dev, "power"); in rm68200_probe()
380 if (IS_ERR(ctx->supply)) { in rm68200_probe()
381 ret = PTR_ERR(ctx->supply); in rm68200_probe()
382 if (ret != -EPROBE_DEFER) in rm68200_probe()
389 ctx->dev = dev; in rm68200_probe()
391 dsi->lanes = 2; in rm68200_probe()
392 dsi->format = MIPI_DSI_FMT_RGB888; in rm68200_probe()
393 dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | in rm68200_probe()
396 drm_panel_init(&ctx->panel, dev, &rm68200_drm_funcs, in rm68200_probe()
399 ret = drm_panel_of_backlight(&ctx->panel); in rm68200_probe()
403 drm_panel_add(&ctx->panel); in rm68200_probe()
408 drm_panel_remove(&ctx->panel); in rm68200_probe()
420 drm_panel_remove(&ctx->panel); in rm68200_remove()
433 .name = "panel-raydium-rm68200",
441 MODULE_DESCRIPTION("DRM Driver for Raydium RM68200 MIPI DSI panel");