#define DSIM_VERSION (0x0)
+#define M4S4_TOP_ISO_BYPASS (0x1 << 0)
+#define M4S4_MODULE_ISO_BYPASS (0x1 << 0)
+#define MIPI_PHY_M4S4_CON 0x1186070C
+
#define DSIM_SWRST (0x4)
#define DSIM_DPHY_RST (1 << 16)
#define DSIM_SWRST_FUNCRST (1 << 8)
return 0;
}
+static void dsim_phy_status(struct phy *phy)
+{
+ void __iomem *phy_iso_regs;
+ u32 phy_iso = 0;
+ /* 1: Isolation bypassed, 0: Isolation enabled */
+
+ dsim_dbg("%s, PHY count : %d\n", __func__, phy->power_count);
+ phy_iso_regs = ioremap(MIPI_PHY_M4S4_CON, 0x10);
+ phy_iso = readl(phy_iso_regs);
+ if ((phy_iso & M4S4_TOP_ISO_BYPASS) != M4S4_TOP_ISO_BYPASS) {
+ dsim_err("Isolation bypass should be set\n");
+ phy_iso = M4S4_TOP_ISO_BYPASS;
+ writel(phy_iso, phy_iso_regs);
+ dsim_err("Isolation bypass was set\n");
+ }
+ iounmap(phy_iso_regs);
+}
+
static int _dsim_enable(struct dsim_device *dsim, enum dsim_state state)
{
bool panel_ctrl;
if (dsim->phy_ex)
phy_power_on(dsim->phy_ex);
+ /* DPHY status */
+ dsim_phy_status(dsim->phy);
+
panel_ctrl = (state == DSIM_STATE_ON) ? true : false;
dsim_reg_init(dsim->id, &dsim->lcd_info, &dsim->clks, panel_ctrl);
dsim_reg_start(dsim->id);
if (dsim->phy_ex)
phy_power_on(dsim->phy_ex);
+ /* DPHY status */
+ dsim_phy_status(dsim->phy);
+
dsim_reg_init(dsim->id, &dsim->lcd_info, &dsim->clks, false);
ret = dsim_reg_exit_ulps_and_start(dsim->id, dsim->lcd_info.ddi_type,
dsim->data_lane);