Lines Matching +full:vpll +full:- +full:supply
1 // SPDX-License-Identifier: GPL-2.0-only
39 * page[5]: for VPLL
79 struct i2c_client *client = ps_bridge->page[PAGE3_DSI_CNTL1]; in ps8640_bridge_vdo_control()
97 struct i2c_client *client = ps_bridge->page[PAGE2_TOP_CNTL]; in ps8640_bridge_poweron()
101 if (ps_bridge->powered) in ps8640_bridge_poweron()
104 ret = regulator_bulk_enable(ARRAY_SIZE(ps_bridge->supplies), in ps8640_bridge_poweron()
105 ps_bridge->supplies); in ps8640_bridge_poweron()
111 gpiod_set_value(ps_bridge->gpio_powerdown, 0); in ps8640_bridge_poweron()
112 gpiod_set_value(ps_bridge->gpio_reset, 1); in ps8640_bridge_poweron()
114 gpiod_set_value(ps_bridge->gpio_reset, 0); in ps8640_bridge_poweron()
166 ps_bridge->powered = true; in ps8640_bridge_poweron()
171 regulator_bulk_disable(ARRAY_SIZE(ps_bridge->supplies), in ps8640_bridge_poweron()
172 ps_bridge->supplies); in ps8640_bridge_poweron()
179 if (!ps_bridge->powered) in ps8640_bridge_poweroff()
182 gpiod_set_value(ps_bridge->gpio_reset, 1); in ps8640_bridge_poweroff()
183 gpiod_set_value(ps_bridge->gpio_powerdown, 1); in ps8640_bridge_poweroff()
184 ret = regulator_bulk_disable(ARRAY_SIZE(ps_bridge->supplies), in ps8640_bridge_poweroff()
185 ps_bridge->supplies); in ps8640_bridge_poweroff()
189 ps_bridge->powered = false; in ps8640_bridge_poweroff()
216 struct device *dev = &ps_bridge->page[0]->dev; in ps8640_bridge_attach()
227 return -EINVAL; in ps8640_bridge_attach()
230 in_ep = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1); in ps8640_bridge_attach()
232 return -ENODEV; in ps8640_bridge_attach()
237 return -ENODEV; in ps8640_bridge_attach()
242 return -ENODEV; in ps8640_bridge_attach()
251 ps_bridge->dsi = dsi; in ps8640_bridge_attach()
253 dsi->host = host; in ps8640_bridge_attach()
254 dsi->mode_flags = MIPI_DSI_MODE_VIDEO | in ps8640_bridge_attach()
256 dsi->format = MIPI_DSI_FMT_RGB888; in ps8640_bridge_attach()
257 dsi->lanes = DP_NUM_LANES; in ps8640_bridge_attach()
262 /* Attach the panel-bridge to the dsi bridge */ in ps8640_bridge_attach()
263 return drm_bridge_attach(bridge->encoder, ps_bridge->panel_bridge, in ps8640_bridge_attach()
264 &ps_bridge->bridge, flags); in ps8640_bridge_attach()
275 bool poweroff = !ps_bridge->powered; in ps8640_bridge_get_edid()
282 * -> drm_helper_probe_single_connector_modes in ps8640_bridge_get_edid()
283 * -> drm_bridge_connector_get_modes in ps8640_bridge_get_edid()
284 * -> ps8640_bridge_get_edid in ps8640_bridge_get_edid()
293 ps_bridge->page[PAGE0_DP_CNTL]->adapter); in ps8640_bridge_get_edid()
314 struct device *dev = &client->dev; in ps8640_probe()
315 struct device_node *np = dev->of_node; in ps8640_probe()
323 return -ENOMEM; in ps8640_probe()
330 return -ENODEV; in ps8640_probe()
332 ps_bridge->panel_bridge = devm_drm_panel_bridge_add(dev, panel); in ps8640_probe()
333 if (IS_ERR(ps_bridge->panel_bridge)) in ps8640_probe()
334 return PTR_ERR(ps_bridge->panel_bridge); in ps8640_probe()
336 ps_bridge->supplies[0].supply = "vdd33"; in ps8640_probe()
337 ps_bridge->supplies[1].supply = "vdd12"; in ps8640_probe()
338 ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ps_bridge->supplies), in ps8640_probe()
339 ps_bridge->supplies); in ps8640_probe()
343 ps_bridge->gpio_powerdown = devm_gpiod_get(&client->dev, "powerdown", in ps8640_probe()
345 if (IS_ERR(ps_bridge->gpio_powerdown)) in ps8640_probe()
346 return PTR_ERR(ps_bridge->gpio_powerdown); in ps8640_probe()
351 ps_bridge->gpio_reset = devm_gpiod_get(&client->dev, "reset", in ps8640_probe()
353 if (IS_ERR(ps_bridge->gpio_reset)) in ps8640_probe()
354 return PTR_ERR(ps_bridge->gpio_reset); in ps8640_probe()
356 ps_bridge->bridge.funcs = &ps8640_bridge_funcs; in ps8640_probe()
357 ps_bridge->bridge.of_node = dev->of_node; in ps8640_probe()
358 ps_bridge->bridge.ops = DRM_BRIDGE_OP_EDID; in ps8640_probe()
359 ps_bridge->bridge.type = DRM_MODE_CONNECTOR_eDP; in ps8640_probe()
361 ps_bridge->page[PAGE0_DP_CNTL] = client; in ps8640_probe()
363 for (i = 1; i < ARRAY_SIZE(ps_bridge->page); i++) { in ps8640_probe()
364 ps_bridge->page[i] = devm_i2c_new_dummy_device(&client->dev, in ps8640_probe()
365 client->adapter, in ps8640_probe()
366 client->addr + i); in ps8640_probe()
367 if (IS_ERR(ps_bridge->page[i])) { in ps8640_probe()
369 client->addr + i); in ps8640_probe()
370 return PTR_ERR(ps_bridge->page[i]); in ps8640_probe()
376 drm_bridge_add(&ps_bridge->bridge); in ps8640_probe()
385 drm_bridge_remove(&ps_bridge->bridge); in ps8640_remove()
409 MODULE_DESCRIPTION("PARADE ps8640 DSI-eDP converter driver");