]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/bridge: waveshare-dsi: support DSI LCD kits with LVDS panels
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Sun, 12 Apr 2026 17:32:25 +0000 (20:32 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Fri, 17 Apr 2026 23:12:22 +0000 (02:12 +0300)
Several Waveshare DSI LCD kits use LVDS panels and the ICN6202 DSI2LVDS
bridge. Support that setup by handling waveshare,dsi2lvds compatible.
The only difference with the existing waveshare,dsi2dpi is the bridge's
output type (LVDS vs DPI).

Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260412-ws-lcd-v3-2-db22c2631828@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
drivers/gpu/drm/bridge/waveshare-dsi.c

index 32d40414adb9ff84ffb2fac1aebee9f1d01d6618..ded57f298d6408474c373de86b9d0c6119bba6be 100644 (file)
@@ -177,7 +177,7 @@ static int ws_bridge_probe(struct i2c_client *i2c)
        regmap_write(ws->reg_map, 0xc2, 0x01);
        regmap_write(ws->reg_map, 0xac, 0x01);
 
-       ws->bridge.type = DRM_MODE_CONNECTOR_DPI;
+       ws->bridge.type = (uintptr_t)i2c_get_match_data(i2c);
        ws->bridge.of_node = dev->of_node;
        devm_drm_bridge_add(dev, &ws->bridge);
 
@@ -185,7 +185,8 @@ static int ws_bridge_probe(struct i2c_client *i2c)
 }
 
 static const struct of_device_id ws_bridge_of_ids[] = {
-       {.compatible = "waveshare,dsi2dpi",},
+       {.compatible = "waveshare,dsi2dpi", .data = (void *)DRM_MODE_CONNECTOR_DPI, },
+       {.compatible = "waveshare,dsi2lvds", .data = (void *)DRM_MODE_CONNECTOR_LVDS, },
        { }
 };