Lines Matching refs:combtxphy
14 struct rk628_combtxphy *combtxphy = &rk628->combtxphy; in rk628_combtxphy_dsi_power_on() local
22 if (combtxphy->flags & COMBTXPHY_MODULEA_EN) in rk628_combtxphy_dsi_power_on()
26 if (combtxphy->flags & COMBTXPHY_MODULEB_EN) in rk628_combtxphy_dsi_power_on()
31 SW_REF_DIV(combtxphy->ref_div - 1) | in rk628_combtxphy_dsi_power_on()
32 SW_PLL_FB_DIV(combtxphy->fb_div) | in rk628_combtxphy_dsi_power_on()
33 SW_PLL_FRAC_DIV(combtxphy->frac_div) | in rk628_combtxphy_dsi_power_on()
34 SW_RATE(combtxphy->rate_div / 2)); in rk628_combtxphy_dsi_power_on()
55 struct rk628_combtxphy *combtxphy = &rk628->combtxphy; in rk628_combtxphy_lvds_power_on() local
72 if (combtxphy->flags & COMBTXPHY_MODULEA_EN) in rk628_combtxphy_lvds_power_on()
76 if (combtxphy->flags & COMBTXPHY_MODULEB_EN) in rk628_combtxphy_lvds_power_on()
81 SW_REF_DIV(combtxphy->ref_div - 1) | in rk628_combtxphy_lvds_power_on()
82 SW_PLL_FB_DIV(combtxphy->fb_div) | in rk628_combtxphy_lvds_power_on()
83 SW_PLL_FRAC_DIV(combtxphy->frac_div) | in rk628_combtxphy_lvds_power_on()
84 SW_RATE(combtxphy->rate_div / 2)); in rk628_combtxphy_lvds_power_on()
101 struct rk628_combtxphy *combtxphy = &rk628->combtxphy; in rk628_combtxphy_gvi_power_on() local
104 if (combtxphy->ref_div % 2) { in rk628_combtxphy_gvi_power_on()
105 ref_div = combtxphy->ref_div - 1; in rk628_combtxphy_gvi_power_on()
108 ref_div |= combtxphy->ref_div / 2 - 1; in rk628_combtxphy_gvi_power_on()
113 SW_PLL_FB_DIV(combtxphy->fb_div) | in rk628_combtxphy_gvi_power_on()
114 SW_PLL_FRAC_DIV(combtxphy->frac_div) | in rk628_combtxphy_gvi_power_on()
115 SW_RATE(combtxphy->rate_div / 2)); in rk628_combtxphy_gvi_power_on()
132 struct rk628_combtxphy *combtxphy = &rk628->combtxphy; in rk628_combtxphy_power_on() local
139 switch (combtxphy->mode) { in rk628_combtxphy_power_on()
174 rk628->combtxphy.bus_width = bus_width; in rk628_combtxphy_set_bus_width()
179 return rk628->combtxphy.bus_width; in rk628_combtxphy_get_bus_width()
184 rk628->combtxphy.division_mode = division; in rk628_combtxphy_set_gvi_division_mode()
189 struct rk628_combtxphy *combtxphy = &rk628->combtxphy; in rk628_combtxphy_set_mode() local
203 combtxphy->rate_div = 4; in rk628_combtxphy_set_mode()
205 combtxphy->rate_div = 2; in rk628_combtxphy_set_mode()
207 combtxphy->rate_div = 1; in rk628_combtxphy_set_mode()
209 combtxphy->flags = flags; in rk628_combtxphy_set_mode()
211 fvco = fhsc * 2 * combtxphy->rate_div; in rk628_combtxphy_set_mode()
212 combtxphy->ref_div = 1; in rk628_combtxphy_set_mode()
213 combtxphy->fb_div = fvco / 8 / fin; in rk628_combtxphy_set_mode()
214 frac_rate = fvco - (fin * 8 * combtxphy->fb_div); in rk628_combtxphy_set_mode()
218 combtxphy->frac_div = frac_rate; in rk628_combtxphy_set_mode()
220 combtxphy->frac_div = 0; in rk628_combtxphy_set_mode()
223 fvco = fin * (1024 * combtxphy->fb_div + combtxphy->frac_div); in rk628_combtxphy_set_mode()
225 fvco = DIV_ROUND_UP(fvco, 1024 * combtxphy->ref_div); in rk628_combtxphy_set_mode()
226 fhsc = fvco / 2 / combtxphy->rate_div; in rk628_combtxphy_set_mode()
227 combtxphy->bus_width = fhsc; in rk628_combtxphy_set_mode()
237 combtxphy->flags = flags; in rk628_combtxphy_set_mode()
238 combtxphy->ref_div = 1; in rk628_combtxphy_set_mode()
239 combtxphy->fb_div = 14; in rk628_combtxphy_set_mode()
240 combtxphy->frac_div = 0; in rk628_combtxphy_set_mode()
243 combtxphy->rate_div = 4; in rk628_combtxphy_set_mode()
245 combtxphy->rate_div = 2; in rk628_combtxphy_set_mode()
247 combtxphy->rate_div = 1; in rk628_combtxphy_set_mode()
260 combtxphy->rate_div = 4; in rk628_combtxphy_set_mode()
262 combtxphy->rate_div = 2; in rk628_combtxphy_set_mode()
264 combtxphy->rate_div = 1; in rk628_combtxphy_set_mode()
265 fvco = bus_width * combtxphy->rate_div; in rk628_combtxphy_set_mode()
267 if (combtxphy->division_mode) in rk628_combtxphy_set_mode()
280 combtxphy->ref_div = i; in rk628_combtxphy_set_mode()
287 pre_clk = (unsigned long long)fvco / 8 * combtxphy->ref_div * 1024; in rk628_combtxphy_set_mode()
294 bus_width = ref_clk / combtxphy->ref_div * 8; in rk628_combtxphy_set_mode()
296 bus_width /= combtxphy->rate_div; in rk628_combtxphy_set_mode()
298 combtxphy->frac_div = 0; in rk628_combtxphy_set_mode()
299 combtxphy->fb_div = fb_div; in rk628_combtxphy_set_mode()
301 combtxphy->bus_width = bus_width; in rk628_combtxphy_set_mode()
308 combtxphy->mode = mode; in rk628_combtxphy_set_mode()