Lines Matching +full:fp5 +full:- +full:rm692e5 +full:- +full:boe

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree.
35 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in rm692e5_reset()
37 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in rm692e5_reset()
39 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in rm692e5_reset()
45 dsi_ctx->dsi->mode_flags |= MIPI_DSI_MODE_LPM; in rm692e5_on()
124 struct mipi_dsi_device *dsi = ctx->dsi; in rm692e5_disable()
127 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in rm692e5_disable()
144 struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; in rm692e5_prepare()
146 dsi_ctx.accum_err = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in rm692e5_prepare()
154 drm_dsc_pps_payload_pack(&pps, &ctx->dsc); in rm692e5_prepare()
162 /* 0x05 -> 90Hz, 0x00 -> 60Hz */ in rm692e5_prepare()
168 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in rm692e5_prepare()
169 regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in rm692e5_prepare()
179 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in rm692e5_unprepare()
180 regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in rm692e5_unprepare()
204 mode = drm_mode_duplicate(connector->dev, &rm692e5_mode); in rm692e5_get_modes()
206 return -ENOMEM; in rm692e5_get_modes()
210 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; in rm692e5_get_modes()
211 connector->display_info.width_mm = mode->width_mm; in rm692e5_get_modes()
212 connector->display_info.height_mm = mode->height_mm; in rm692e5_get_modes()
231 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in rm692e5_bl_update_status()
237 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in rm692e5_bl_update_status()
248 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in rm692e5_bl_get_brightness()
254 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in rm692e5_bl_get_brightness()
267 struct device *dev = &dsi->dev; in rm692e5_create_backlight()
280 struct device *dev = &dsi->dev; in rm692e5_probe()
286 return -ENOMEM; in rm692e5_probe()
288 ctx->supplies[0].supply = "vddio"; in rm692e5_probe()
289 ctx->supplies[1].supply = "dvdd"; in rm692e5_probe()
290 ctx->supplies[2].supply = "vci"; in rm692e5_probe()
291 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), in rm692e5_probe()
292 ctx->supplies); in rm692e5_probe()
296 ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in rm692e5_probe()
297 if (IS_ERR(ctx->reset_gpio)) in rm692e5_probe()
298 return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), in rm692e5_probe()
299 "Failed to get reset-gpios\n"); in rm692e5_probe()
301 ctx->dsi = dsi; in rm692e5_probe()
304 dsi->lanes = 4; in rm692e5_probe()
305 dsi->format = MIPI_DSI_FMT_RGB888; in rm692e5_probe()
306 dsi->mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET | in rm692e5_probe()
309 drm_panel_init(&ctx->panel, dev, &rm692e5_panel_funcs, in rm692e5_probe()
311 ctx->panel.prepare_prev_first = true; in rm692e5_probe()
313 ctx->panel.backlight = rm692e5_create_backlight(dsi); in rm692e5_probe()
314 if (IS_ERR(ctx->panel.backlight)) in rm692e5_probe()
315 return dev_err_probe(dev, PTR_ERR(ctx->panel.backlight), in rm692e5_probe()
318 drm_panel_add(&ctx->panel); in rm692e5_probe()
321 dsi->dsc = &ctx->dsc; in rm692e5_probe()
324 ctx->dsc.dsc_version_major = 1; in rm692e5_probe()
325 ctx->dsc.dsc_version_minor = 1; in rm692e5_probe()
326 ctx->dsc.slice_height = 60; in rm692e5_probe()
327 ctx->dsc.slice_width = 1224; in rm692e5_probe()
329 ctx->dsc.slice_count = 1224 / ctx->dsc.slice_width; in rm692e5_probe()
330 ctx->dsc.bits_per_component = 8; in rm692e5_probe()
331 ctx->dsc.bits_per_pixel = 8 << 4; /* 4 fractional bits */ in rm692e5_probe()
332 ctx->dsc.block_pred_enable = true; in rm692e5_probe()
337 drm_panel_remove(&ctx->panel); in rm692e5_probe()
351 dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); in rm692e5_remove()
353 drm_panel_remove(&ctx->panel); in rm692e5_remove()
357 { .compatible = "fairphone,fp5-rm692e5-boe" },
366 .name = "panel-rm692e5-boe-amoled",
372 MODULE_DESCRIPTION("DRM driver for rm692e5-equipped DSI panels");