Lines Matching refs:dphy_opts
155 struct phy_configure_opts_mipi_dphy *dphy_opts, in mixel_dphy_config_from_opts() argument
165 if (dphy_opts->hs_clk_rate > DATA_RATE_MAX_SPEED || in mixel_dphy_config_from_opts()
166 dphy_opts->hs_clk_rate < DATA_RATE_MIN_SPEED) in mixel_dphy_config_from_opts()
169 numerator = dphy_opts->hs_clk_rate; in mixel_dphy_config_from_opts()
175 dphy_opts->hs_clk_rate, ref_clk); in mixel_dphy_config_from_opts()
201 dphy_opts->hs_clk_rate, ref_clk, in mixel_dphy_config_from_opts()
207 dphy_opts->hs_clk_rate, ref_clk, numerator, denominator); in mixel_dphy_config_from_opts()
211 do_div(tmp, dphy_opts->lp_clk_rate); /* ps */ in mixel_dphy_config_from_opts()
217 dphy_opts->lp_clk_rate, lp_t); in mixel_dphy_config_from_opts()
220 if (2 * dphy_opts->hs_prepare > 5 * lp_t) { in mixel_dphy_config_from_opts()
223 dphy_opts->hs_prepare, lp_t); in mixel_dphy_config_from_opts()
227 if (dphy_opts->hs_prepare < lp_t) { in mixel_dphy_config_from_opts()
230 tmp = 2 * (dphy_opts->hs_prepare - lp_t); in mixel_dphy_config_from_opts()
237 if (2 * dphy_opts->clk_prepare > 3 * lp_t) { in mixel_dphy_config_from_opts()
240 dphy_opts->clk_prepare, lp_t); in mixel_dphy_config_from_opts()
244 cfg->mc_prg_hs_prepare = dphy_opts->clk_prepare > lp_t ? 1 : 0; in mixel_dphy_config_from_opts()
247 n = (144 * (dphy_opts->hs_clk_rate / 1000000) - 47500) / 10000; in mixel_dphy_config_from_opts()
251 n = (34 * (dphy_opts->hs_clk_rate / 1000000) - 2500) / 1000; in mixel_dphy_config_from_opts()
255 n = (103 * (dphy_opts->hs_clk_rate / 1000000) + 10000) / 10000; in mixel_dphy_config_from_opts()
264 if (dphy_opts->hs_clk_rate < MBPS(80)) in mixel_dphy_config_from_opts()
266 else if (dphy_opts->hs_clk_rate < MBPS(90)) in mixel_dphy_config_from_opts()
268 else if (dphy_opts->hs_clk_rate < MBPS(125)) in mixel_dphy_config_from_opts()
270 else if (dphy_opts->hs_clk_rate < MBPS(150)) in mixel_dphy_config_from_opts()
272 else if (dphy_opts->hs_clk_rate < MBPS(225)) in mixel_dphy_config_from_opts()
274 else if (dphy_opts->hs_clk_rate < MBPS(500)) in mixel_dphy_config_from_opts()