static void dw_mipi_dsi_init(struct dw_mipi_dsi *dsi)
{
+ u32 esc_clk_div;
+
dsi_write(dsi, DSI_PWR_UP, RESET);
dsi_write(dsi, DSI_PHY_RSTZ, PHY_DISFORCEPLL | PHY_DISABLECLK
| PHY_RSTZ | PHY_SHUTDOWNZ);
+
+ /* The maximum value of the escape clock frequency is 20MHz */
+ esc_clk_div = DIV_ROUND_UP(dsi->lane_mbps >> 3, 20);
dsi_write(dsi, DSI_CLKMGR_CFG, TO_CLK_DIVIDSION(10) |
- TX_ESC_CLK_DIVIDSION(7));
+ TX_ESC_CLK_DIVIDSION(esc_clk_div));
}
static void dw_mipi_dsi_dpi_config(struct dw_mipi_dsi *dsi,