@@ -147,6 +147,7 @@ struct sn65dsi83 {
struct regulator *vcc;
bool lvds_dual_link;
bool lvds_dual_link_even_odd_swap;
+ u32 lvds_vcom;
};
static const struct regmap_range sn65dsi83_readable_ranges[] = {
@@ -435,7 +436,7 @@ static void sn65dsi83_atomic_pre_enable(struct drm_bridge *bridge,
val |= REG_LVDS_FMT_LVDS_LINK_CFG;
regmap_write(ctx->regmap, REG_LVDS_FMT, val);
- regmap_write(ctx->regmap, REG_LVDS_VCOM, 0x05);
+ regmap_write(ctx->regmap, REG_LVDS_VCOM, ctx->lvds_vcom);
regmap_write(ctx->regmap, REG_LVDS_LANE,
(ctx->lvds_dual_link_even_odd_swap ?
REG_LVDS_LANE_EVEN_ODD_SWAP : 0) |
@@ -580,6 +581,13 @@ static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model)
{
struct drm_bridge *panel_bridge;
struct device *dev = ctx->dev;
+ struct device_node *endpoint;
+
+ ctx->lvds_vcom = 0x05;
+
+ endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 0, 0);
+ of_property_read_u32(endpoint, "ti,lvds-vcom", &ctx->lvds_vcom);
+ of_node_put(endpoint);
ctx->lvds_dual_link = false;
ctx->lvds_dual_link_even_odd_swap = false;