Lines Matching refs:txphy
15 struct rk628_combtxphy *txphy = rk628->txphy; in rk628_txphy_set_bus_width() local
17 txphy->bus_width = bus_width; in rk628_txphy_set_bus_width()
23 struct rk628_combtxphy *txphy = rk628->txphy; in rk628_txphy_get_bus_width() local
25 return txphy->bus_width; in rk628_txphy_get_bus_width()
31 struct rk628_combtxphy *txphy = rk628->txphy; in rk628_combtxphy_dsi_power_on() local
38 if (txphy->flags & COMBTXPHY_MODULEA_EN) in rk628_combtxphy_dsi_power_on()
41 if (txphy->flags & COMBTXPHY_MODULEB_EN) in rk628_combtxphy_dsi_power_on()
45 rk628_i2c_write(rk628, COMBTXPHY_CON5, SW_REF_DIV(txphy->ref_div - 1) | in rk628_combtxphy_dsi_power_on()
46 SW_PLL_FB_DIV(txphy->fb_div) | in rk628_combtxphy_dsi_power_on()
47 SW_PLL_FRAC_DIV(txphy->frac_div) | in rk628_combtxphy_dsi_power_on()
48 SW_RATE(txphy->rate_div / 2)); in rk628_combtxphy_dsi_power_on()
59 struct rk628_combtxphy *txphy = rk628->txphy; in rk628_combtxphy_lvds_power_on() local
67 if (txphy->flags & COMBTXPHY_MODULEA_EN) in rk628_combtxphy_lvds_power_on()
70 if (txphy->flags & COMBTXPHY_MODULEB_EN) in rk628_combtxphy_lvds_power_on()
74 rk628_i2c_write(rk628, COMBTXPHY_CON5, SW_REF_DIV(txphy->ref_div - 1) | in rk628_combtxphy_lvds_power_on()
75 SW_PLL_FB_DIV(txphy->fb_div) | in rk628_combtxphy_lvds_power_on()
76 SW_PLL_FRAC_DIV(txphy->frac_div) | in rk628_combtxphy_lvds_power_on()
77 SW_RATE(txphy->rate_div / 2)); in rk628_combtxphy_lvds_power_on()
85 struct rk628_combtxphy *txphy = rk628->txphy; in rk628_combtxphy_gvi_power_on() local
87 rk628_i2c_write(rk628, COMBTXPHY_CON5, SW_REF_DIV(txphy->ref_div - 1) | in rk628_combtxphy_gvi_power_on()
88 SW_PLL_FB_DIV(txphy->fb_div) | in rk628_combtxphy_gvi_power_on()
89 SW_PLL_FRAC_DIV(txphy->frac_div) | in rk628_combtxphy_gvi_power_on()
90 SW_RATE(txphy->rate_div / 2)); in rk628_combtxphy_gvi_power_on()
104 struct rk628_combtxphy *txphy = rk628->txphy; in rk628_txphy_set_mode() local
117 txphy->rate_div = 4; in rk628_txphy_set_mode()
119 txphy->rate_div = 2; in rk628_txphy_set_mode()
121 txphy->rate_div = 1; in rk628_txphy_set_mode()
123 txphy->flags = flags; in rk628_txphy_set_mode()
125 fvco = fhsc * 2 * txphy->rate_div; in rk628_txphy_set_mode()
126 txphy->ref_div = 1; in rk628_txphy_set_mode()
127 txphy->fb_div = fvco / 8 / fin; in rk628_txphy_set_mode()
128 frac_rate = fvco - (fin * 8 * txphy->fb_div); in rk628_txphy_set_mode()
132 txphy->frac_div = frac_rate; in rk628_txphy_set_mode()
134 txphy->frac_div = 0; in rk628_txphy_set_mode()
137 fvco = fin * (1024 * txphy->fb_div + txphy->frac_div); in rk628_txphy_set_mode()
139 fvco = DIV_ROUND_UP(fvco, 1024 * txphy->ref_div); in rk628_txphy_set_mode()
140 fhsc = fvco / 2 / txphy->rate_div; in rk628_txphy_set_mode()
141 txphy->bus_width = fhsc; in rk628_txphy_set_mode()
151 txphy->flags = flags; in rk628_txphy_set_mode()
152 txphy->ref_div = 1; in rk628_txphy_set_mode()
153 txphy->fb_div = 14; in rk628_txphy_set_mode()
154 txphy->frac_div = 0; in rk628_txphy_set_mode()
157 txphy->rate_div = 4; in rk628_txphy_set_mode()
159 txphy->rate_div = 2; in rk628_txphy_set_mode()
161 txphy->rate_div = 1; in rk628_txphy_set_mode()
171 txphy->rate_div = 4; in rk628_txphy_set_mode()
173 txphy->rate_div = 2; in rk628_txphy_set_mode()
175 txphy->rate_div = 1; in rk628_txphy_set_mode()
176 fvco = fhsc * txphy->rate_div; in rk628_txphy_set_mode()
178 txphy->ref_div = 1; in rk628_txphy_set_mode()
179 txphy->fb_div = fvco / 8 / fin; in rk628_txphy_set_mode()
180 frac_rate = fvco - (fin * 8 * txphy->fb_div); in rk628_txphy_set_mode()
185 txphy->frac_div = frac_rate; in rk628_txphy_set_mode()
187 txphy->frac_div = 0; in rk628_txphy_set_mode()
190 fvco = fin * (1024 * txphy->fb_div + txphy->frac_div); in rk628_txphy_set_mode()
192 fvco /= 1024 * txphy->ref_div; in rk628_txphy_set_mode()
193 fhsc = fvco / txphy->rate_div; in rk628_txphy_set_mode()
194 txphy->bus_width = fhsc; in rk628_txphy_set_mode()
201 txphy->mode = mode; in rk628_txphy_set_mode()
207 struct rk628_combtxphy *txphy = rk628->txphy; in rk628_txphy_power_on() local
218 switch (txphy->mode) { in rk628_txphy_power_on()
255 struct rk628_combtxphy *txphy; in rk628_txphy_register() local
257 txphy = devm_kzalloc(rk628->dev, sizeof(*txphy), GFP_KERNEL); in rk628_txphy_register()
258 if (!txphy) in rk628_txphy_register()
261 rk628->txphy = txphy; in rk628_txphy_register()
263 return txphy; in rk628_txphy_register()