The Northwest Logic MIPI DSI host controller embedded in i.MX8qxp
works with a Mixel MIPI DPHY + LVDS PHY combo to support either
a MIPI DSI display or a LVDS display.  So, this patch calls
phy_set_mode() from nwl_dsi_enable() to set PHY mode to MIPI DPHY
explicitly.

Cc: Guido Günther <a...@sigxcpu.org>
Cc: Robert Chiras <robert.chi...@nxp.com>
Cc: Martin Kepplinger <martin.kepplin...@puri.sm>
Cc: Andrzej Hajda <a.ha...@samsung.com>
Cc: Neil Armstrong <narmstr...@baylibre.com>
Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com>
Cc: Jonas Karlman <jo...@kwiboo.se>
Cc: Jernej Skrabec <jernej.skra...@siol.net>
Cc: David Airlie <airl...@linux.ie>
Cc: Daniel Vetter <dan...@ffwll.ch>
Cc: NXP Linux Team <linux-...@nxp.com>
Reviewed-by: Guido Günther <a...@sigxcpu.org>
Signed-off-by: Liu Ying <victor....@nxp.com>
---
v1->v2:
* Add Guido's R-b tag.

 drivers/gpu/drm/bridge/nwl-dsi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c
index 66b6740..be6bfc5 100644
--- a/drivers/gpu/drm/bridge/nwl-dsi.c
+++ b/drivers/gpu/drm/bridge/nwl-dsi.c
@@ -678,6 +678,12 @@ static int nwl_dsi_enable(struct nwl_dsi *dsi)
                return ret;
        }
 
+       ret = phy_set_mode(dsi->phy, PHY_MODE_MIPI_DPHY);
+       if (ret < 0) {
+               DRM_DEV_ERROR(dev, "Failed to set DSI phy mode: %d\n", ret);
+               goto uninit_phy;
+       }
+
        ret = phy_configure(dsi->phy, phy_cfg);
        if (ret < 0) {
                DRM_DEV_ERROR(dev, "Failed to configure DSI phy: %d\n", ret);
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to