signal; can be <0> for LOW (negative) or <1> for HIGH
(positive) polarity; default value is <0>, when this
property is ommited
+- pwr-delay delay used in enable, before enabling the clocks; this is
+ useful when the PLL needs some time to become stable;
+ this value represents milliseconds
Example:
mipi_dsi1: mipi_dsi {
u32 phyref_rate;
u32 instance;
u32 sync_pol;
+ u32 power_on_delay;
bool enabled;
};
const struct of_device_id *of_id = of_match_device(imx_nwl_dsi_dt_ids,
dev);
const struct devtype *devtype = of_id->data;
- unsigned long bit_clk;
+ unsigned long bit_clk, min_sleep, max_sleep;
int ret;
if (dsi->enabled)
dsi->bit_clk = bit_clk;
}
+ /*
+ * On some systems we need to wait some time before enabling the
+ * phy_ref clock, in order to allow the parent PLL to become stable
+ */
+ if (dsi->power_on_delay > 20) {
+ msleep(dsi->power_on_delay);
+ } else if (dsi->power_on_delay > 0) {
+ max_sleep = dsi->power_on_delay * 1000;
+ min_sleep = 1000;
+ if (max_sleep > 6000)
+ min_sleep = max_sleep - 5000;
+ usleep_range(min_sleep, max_sleep);
+ }
+
imx_nwl_dsi_set_clocks(dsi, true);
ret = devtype->poweron(dsi);
dsi->pxl2dpi_reg = devtype->pxl2dpi_reg;
of_property_read_u32(np, "sync-pol", &dsi->sync_pol);
+ of_property_read_u32(np, "pwr-delay", &dsi->power_on_delay);
/* Look for optional regmaps */
dsi->csr = syscon_regmap_lookup_by_phandle(np, "csr");