Lines Matching +full:vddc +full:- +full:supply

1 // SPDX-License-Identifier: GPL-2.0
28 #define FLD_MASK(start, end) (((1 << ((start) - (end) + 1)) - 1) << (end))
43 #define DSI_STARTDSI 0x0204 /* START control bit of DSI-TX */
125 #define SYS_RST_I2CS BIT(0) /* Reset I2C-Slave controller */
126 #define SYS_RST_I2CM BIT(1) /* Reset I2C-Master controller */
129 #define SYS_RST_DSIRX BIT(4) /* Reset DSI-RX and App controller */
150 "vddc", "vddio", "vddlvds"
164 int ret = ctx->error; in tc358764_clear_error()
166 ctx->error = 0; in tc358764_clear_error()
172 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in tc358764_read()
175 if (ctx->error) in tc358764_read()
183 dev_dbg(ctx->dev, "read: %d, addr: %d\n", addr, *val); in tc358764_read()
188 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in tc358764_write()
192 if (ctx->error) in tc358764_write()
204 ctx->error = ret; in tc358764_write()
217 if (ctx->error) in tc358764_init()
219 dev_info(ctx->dev, "ID: %#x\n", v); in tc358764_init()
268 gpiod_set_value(ctx->gpio_reset, 1); in tc358764_reset()
270 gpiod_set_value(ctx->gpio_reset, 0); in tc358764_reset()
281 ret = regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in tc358764_post_disable()
283 dev_err(ctx->dev, "error disabling regulators (%d)\n", ret); in tc358764_post_disable()
291 ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); in tc358764_pre_enable()
293 dev_err(ctx->dev, "error enabling regulators (%d)\n", ret); in tc358764_pre_enable()
298 dev_err(ctx->dev, "error initializing bridge (%d)\n", ret); in tc358764_pre_enable()
306 return drm_bridge_attach(bridge->encoder, ctx->panel_bridge, in tc358764_attach()
319 struct device *dev = ctx->dev; in tc358764_parse_dt()
323 ctx->gpio_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); in tc358764_parse_dt()
324 if (IS_ERR(ctx->gpio_reset)) { in tc358764_parse_dt()
326 return PTR_ERR(ctx->gpio_reset); in tc358764_parse_dt()
329 ret = drm_of_find_panel_or_bridge(dev->of_node, 1, 0, &panel, NULL); in tc358764_parse_dt()
337 ctx->panel_bridge = panel_bridge; in tc358764_parse_dt()
345 for (i = 0; i < ARRAY_SIZE(ctx->supplies); ++i) in tc358764_configure_regulators()
346 ctx->supplies[i].supply = tc358764_supplies[i]; in tc358764_configure_regulators()
348 ret = devm_regulator_bulk_get(ctx->dev, ARRAY_SIZE(ctx->supplies), in tc358764_configure_regulators()
349 ctx->supplies); in tc358764_configure_regulators()
351 dev_err(ctx->dev, "failed to get regulators: %d\n", ret); in tc358764_configure_regulators()
358 struct device *dev = &dsi->dev; in tc358764_probe()
364 return -ENOMEM; in tc358764_probe()
368 ctx->dev = dev; in tc358764_probe()
370 dsi->lanes = 4; in tc358764_probe()
371 dsi->format = MIPI_DSI_FMT_RGB888; in tc358764_probe()
372 dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST in tc358764_probe()
383 ctx->bridge.funcs = &tc358764_bridge_funcs; in tc358764_probe()
384 ctx->bridge.type = DRM_MODE_CONNECTOR_LVDS; in tc358764_probe()
385 ctx->bridge.of_node = dev->of_node; in tc358764_probe()
387 drm_bridge_add(&ctx->bridge); in tc358764_probe()
391 drm_bridge_remove(&ctx->bridge); in tc358764_probe()
403 drm_bridge_remove(&ctx->bridge); in tc358764_remove()
427 MODULE_DESCRIPTION("MIPI-DSI based Driver for TC358764 DSI/LVDS Bridge");