Lines Matching +full:dual +full:- +full:lane
1 // SPDX-License-Identifier: GPL-2.0
34 #define PPI_D0S_CLRSIPOCOUNT 0x0164 /* Assertion timer for Lane 0 */
35 #define PPI_D1S_CLRSIPOCOUNT 0x0168 /* Assertion timer for Lane 1 */
39 #define DSI_STARTDSI 0x0204 /* START control bit of DSI-TX */
40 #define DSI_LANEENABLE 0x0210 /* Enables each lane */
56 /* Lane enable PPI and DSI register bits */
72 int ret = ctx->error; in tc358762_clear_error()
74 ctx->error = 0; in tc358762_clear_error()
80 struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); in tc358762_write()
84 if (ctx->error) in tc358762_write()
96 ctx->error = ret; in tc358762_write()
136 if (!ctx->pre_enabled) in tc358762_post_disable()
139 ctx->pre_enabled = false; in tc358762_post_disable()
141 ret = regulator_disable(ctx->regulator); in tc358762_post_disable()
143 dev_err(ctx->dev, "error disabling regulators (%d)\n", ret); in tc358762_post_disable()
151 ret = regulator_enable(ctx->regulator); in tc358762_pre_enable()
153 dev_err(ctx->dev, "error enabling regulators (%d)\n", ret); in tc358762_pre_enable()
157 dev_err(ctx->dev, "error initializing bridge (%d)\n", ret); in tc358762_pre_enable()
159 ctx->pre_enabled = true; in tc358762_pre_enable()
167 return drm_bridge_attach(bridge->encoder, ctx->panel_bridge, in tc358762_attach()
180 struct device *dev = ctx->dev; in tc358762_parse_dt()
182 panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 1, 0); in tc358762_parse_dt()
186 ctx->panel_bridge = panel_bridge; in tc358762_parse_dt()
193 ctx->regulator = devm_regulator_get(ctx->dev, "vddc"); in tc358762_configure_regulators()
194 if (IS_ERR(ctx->regulator)) in tc358762_configure_regulators()
195 return PTR_ERR(ctx->regulator); in tc358762_configure_regulators()
202 struct device *dev = &dsi->dev; in tc358762_probe()
208 return -ENOMEM; in tc358762_probe()
212 ctx->dev = dev; in tc358762_probe()
213 ctx->pre_enabled = false; in tc358762_probe()
215 /* TODO: Find out how to get dual-lane mode working */ in tc358762_probe()
216 dsi->lanes = 1; in tc358762_probe()
217 dsi->format = MIPI_DSI_FMT_RGB888; in tc358762_probe()
218 dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | in tc358762_probe()
229 ctx->bridge.funcs = &tc358762_bridge_funcs; in tc358762_probe()
230 ctx->bridge.type = DRM_MODE_CONNECTOR_DPI; in tc358762_probe()
231 ctx->bridge.of_node = dev->of_node; in tc358762_probe()
233 drm_bridge_add(&ctx->bridge); in tc358762_probe()
237 drm_bridge_remove(&ctx->bridge); in tc358762_probe()
249 drm_bridge_remove(&ctx->bridge); in tc358762_remove()
269 MODULE_DESCRIPTION("MIPI-DSI based Driver for TC358762 DSI/DPI Bridge");