Lines Matching +full:elvss +full:- +full:supply

1 // SPDX-License-Identifier: GPL-2.0-only
3 * BOE BF060Y8M-AJ0 5.99" MIPI-DSI OLED Panel on SW43404 DriverIC
47 gpiod_set_value_cansleep(boe->reset_gpio, 0); in boe_bf060y8m_aj0_reset()
49 gpiod_set_value_cansleep(boe->reset_gpio, 1); in boe_bf060y8m_aj0_reset()
51 gpiod_set_value_cansleep(boe->reset_gpio, 0); in boe_bf060y8m_aj0_reset()
57 struct mipi_dsi_device *dsi = boe->dsi; in boe_bf060y8m_aj0_on()
58 struct device *dev = &dsi->dev; in boe_bf060y8m_aj0_on()
101 struct mipi_dsi_device *dsi = boe->dsi; in boe_bf060y8m_aj0_off()
102 struct device *dev = &dsi->dev; in boe_bf060y8m_aj0_off()
106 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in boe_bf060y8m_aj0_off()
120 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in boe_bf060y8m_aj0_off()
128 struct device *dev = &boe->dsi->dev; in boe_bf060y8m_aj0_prepare()
132 * Enable EL Driving Voltage first - doing that at the beginning in boe_bf060y8m_aj0_prepare()
136 ret = regulator_enable(boe->vregs[BF060Y8M_VREG_EL_VDD].consumer); in boe_bf060y8m_aj0_prepare()
139 ret = regulator_enable(boe->vregs[BF060Y8M_VREG_EL_VSS].consumer); in boe_bf060y8m_aj0_prepare()
143 ret = regulator_enable(boe->vregs[BF060Y8M_VREG_VCC].consumer); in boe_bf060y8m_aj0_prepare()
147 ret = regulator_enable(boe->vregs[BF060Y8M_VREG_VDDIO].consumer); in boe_bf060y8m_aj0_prepare()
151 ret = regulator_enable(boe->vregs[BF060Y8M_VREG_VCI].consumer); in boe_bf060y8m_aj0_prepare()
161 gpiod_set_value_cansleep(boe->reset_gpio, 1); in boe_bf060y8m_aj0_prepare()
168 regulator_disable(boe->vregs[BF060Y8M_VREG_VDDIO].consumer); in boe_bf060y8m_aj0_prepare()
170 regulator_disable(boe->vregs[BF060Y8M_VREG_VCC].consumer); in boe_bf060y8m_aj0_prepare()
172 regulator_disable(boe->vregs[BF060Y8M_VREG_EL_VSS].consumer); in boe_bf060y8m_aj0_prepare()
174 regulator_disable(boe->vregs[BF060Y8M_VREG_EL_VDD].consumer); in boe_bf060y8m_aj0_prepare()
181 struct device *dev = &boe->dsi->dev; in boe_bf060y8m_aj0_unprepare()
186 dev_err(dev, "Failed to un-initialize panel: %d\n", ret); in boe_bf060y8m_aj0_unprepare()
188 gpiod_set_value_cansleep(boe->reset_gpio, 1); in boe_bf060y8m_aj0_unprepare()
189 ret = regulator_bulk_disable(ARRAY_SIZE(boe->vregs), boe->vregs); in boe_bf060y8m_aj0_unprepare()
213 mode = drm_mode_duplicate(connector->dev, &boe_bf060y8m_aj0_mode); in boe_bf060y8m_aj0_get_modes()
215 return -ENOMEM; in boe_bf060y8m_aj0_get_modes()
219 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; in boe_bf060y8m_aj0_get_modes()
220 connector->display_info.width_mm = mode->width_mm; in boe_bf060y8m_aj0_get_modes()
221 connector->display_info.height_mm = mode->height_mm; in boe_bf060y8m_aj0_get_modes()
267 struct device *dev = &dsi->dev; in boe_bf060y8m_aj0_create_backlight()
285 boe->vregs[BF060Y8M_VREG_VCC].supply = "vcc"; in boe_bf060y8m_aj0_init_vregs()
286 boe->vregs[BF060Y8M_VREG_VDDIO].supply = "vddio"; in boe_bf060y8m_aj0_init_vregs()
287 boe->vregs[BF060Y8M_VREG_VCI].supply = "vci"; in boe_bf060y8m_aj0_init_vregs()
288 boe->vregs[BF060Y8M_VREG_EL_VDD].supply = "elvdd"; in boe_bf060y8m_aj0_init_vregs()
289 boe->vregs[BF060Y8M_VREG_EL_VSS].supply = "elvss"; in boe_bf060y8m_aj0_init_vregs()
290 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(boe->vregs), in boe_bf060y8m_aj0_init_vregs()
291 boe->vregs); in boe_bf060y8m_aj0_init_vregs()
297 vreg = boe->vregs[BF060Y8M_VREG_VCC].consumer; in boe_bf060y8m_aj0_init_vregs()
302 vreg = boe->vregs[BF060Y8M_VREG_VDDIO].consumer; in boe_bf060y8m_aj0_init_vregs()
307 vreg = boe->vregs[BF060Y8M_VREG_VCI].consumer; in boe_bf060y8m_aj0_init_vregs()
312 vreg = boe->vregs[BF060Y8M_VREG_EL_VDD].consumer; in boe_bf060y8m_aj0_init_vregs()
317 /* ELVSS is negative: -5.00V to -1.40V */ in boe_bf060y8m_aj0_init_vregs()
318 vreg = boe->vregs[BF060Y8M_VREG_EL_VSS].consumer; in boe_bf060y8m_aj0_init_vregs()
329 * be fixed-regulator which, at the time of writing, does not in boe_bf060y8m_aj0_init_vregs()
332 vreg = boe->vregs[BF060Y8M_VREG_VDDIO].consumer; in boe_bf060y8m_aj0_init_vregs()
336 boe->vregs[1].supply, ret); in boe_bf060y8m_aj0_init_vregs()
338 vreg = boe->vregs[BF060Y8M_VREG_VCI].consumer; in boe_bf060y8m_aj0_init_vregs()
342 boe->vregs[2].supply, ret); in boe_bf060y8m_aj0_init_vregs()
349 struct device *dev = &dsi->dev; in boe_bf060y8m_aj0_probe()
355 return -ENOMEM; in boe_bf060y8m_aj0_probe()
362 boe->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_ASIS); in boe_bf060y8m_aj0_probe()
363 if (IS_ERR(boe->reset_gpio)) in boe_bf060y8m_aj0_probe()
364 return dev_err_probe(dev, PTR_ERR(boe->reset_gpio), in boe_bf060y8m_aj0_probe()
365 "Failed to get reset-gpios\n"); in boe_bf060y8m_aj0_probe()
367 boe->dsi = dsi; in boe_bf060y8m_aj0_probe()
370 dsi->lanes = 4; in boe_bf060y8m_aj0_probe()
371 dsi->format = MIPI_DSI_FMT_RGB888; in boe_bf060y8m_aj0_probe()
372 dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_NO_EOT_PACKET | in boe_bf060y8m_aj0_probe()
377 drm_panel_init(&boe->panel, dev, &boe_bf060y8m_aj0_panel_funcs, in boe_bf060y8m_aj0_probe()
380 boe->panel.prepare_prev_first = true; in boe_bf060y8m_aj0_probe()
382 boe->panel.backlight = boe_bf060y8m_aj0_create_backlight(dsi); in boe_bf060y8m_aj0_probe()
383 if (IS_ERR(boe->panel.backlight)) in boe_bf060y8m_aj0_probe()
384 return dev_err_probe(dev, PTR_ERR(boe->panel.backlight), in boe_bf060y8m_aj0_probe()
387 drm_panel_add(&boe->panel); in boe_bf060y8m_aj0_probe()
405 dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); in boe_bf060y8m_aj0_remove()
407 drm_panel_remove(&boe->panel); in boe_bf060y8m_aj0_remove()
411 { .compatible = "boe,bf060y8m-aj0" },
420 .name = "panel-sw43404-boe-fhd-amoled",
427 MODULE_DESCRIPTION("BOE BF060Y8M-AJ0 MIPI-DSI OLED panel");