Lines Matching refs:dphy_opts

187 	       struct phy_configure_opts_mipi_dphy *dphy_opts,  in mixel_dphy_config_from_opts()  argument
197 if (dphy_opts->hs_clk_rate > DATA_RATE_MAX_SPEED || in mixel_dphy_config_from_opts()
198 dphy_opts->hs_clk_rate < DATA_RATE_MIN_SPEED) in mixel_dphy_config_from_opts()
201 numerator = dphy_opts->hs_clk_rate; in mixel_dphy_config_from_opts()
207 dphy_opts->hs_clk_rate, ref_clk); in mixel_dphy_config_from_opts()
233 dphy_opts->hs_clk_rate, ref_clk, in mixel_dphy_config_from_opts()
239 dphy_opts->hs_clk_rate, ref_clk, numerator, denominator); in mixel_dphy_config_from_opts()
243 do_div(tmp, dphy_opts->lp_clk_rate); /* ps */ in mixel_dphy_config_from_opts()
249 dphy_opts->lp_clk_rate, lp_t); in mixel_dphy_config_from_opts()
252 if (2 * dphy_opts->hs_prepare > 5 * lp_t) { in mixel_dphy_config_from_opts()
255 dphy_opts->hs_prepare, lp_t); in mixel_dphy_config_from_opts()
259 if (dphy_opts->hs_prepare < lp_t) { in mixel_dphy_config_from_opts()
262 tmp = 2 * (dphy_opts->hs_prepare - lp_t); in mixel_dphy_config_from_opts()
269 if (2 * dphy_opts->clk_prepare > 3 * lp_t) { in mixel_dphy_config_from_opts()
272 dphy_opts->clk_prepare, lp_t); in mixel_dphy_config_from_opts()
276 cfg->mc_prg_hs_prepare = dphy_opts->clk_prepare > lp_t ? 1 : 0; in mixel_dphy_config_from_opts()
279 n = (144 * (dphy_opts->hs_clk_rate / 1000000) - 47500) / 10000; in mixel_dphy_config_from_opts()
283 n = (34 * (dphy_opts->hs_clk_rate / 1000000) - 2500) / 1000; in mixel_dphy_config_from_opts()
287 n = (103 * (dphy_opts->hs_clk_rate / 1000000) + 10000) / 10000; in mixel_dphy_config_from_opts()
296 if (dphy_opts->hs_clk_rate < MBPS(80)) in mixel_dphy_config_from_opts()
298 else if (dphy_opts->hs_clk_rate < MBPS(90)) in mixel_dphy_config_from_opts()
300 else if (dphy_opts->hs_clk_rate < MBPS(125)) in mixel_dphy_config_from_opts()
302 else if (dphy_opts->hs_clk_rate < MBPS(150)) in mixel_dphy_config_from_opts()
304 else if (dphy_opts->hs_clk_rate < MBPS(225)) in mixel_dphy_config_from_opts()
306 else if (dphy_opts->hs_clk_rate < MBPS(500)) in mixel_dphy_config_from_opts()