Lines Matching full:hdmi
22 struct sun8i_dw_hdmi *hdmi = encoder_to_sun8i_dw_hdmi(encoder); in sun8i_dw_hdmi_encoder_mode_set() local
24 if (hdmi->quirks->set_rate) in sun8i_dw_hdmi_encoder_mode_set()
25 clk_set_rate(hdmi->clk_tmds, mode->crtc_clock * 1000); in sun8i_dw_hdmi_encoder_mode_set()
34 sun8i_dw_hdmi_mode_valid_a83t(struct dw_hdmi *hdmi, void *data, in sun8i_dw_hdmi_mode_valid_a83t() argument
45 sun8i_dw_hdmi_mode_valid_h6(struct dw_hdmi *hdmi, void *data, in sun8i_dw_hdmi_mode_valid_h6() argument
109 if (!of_device_is_compatible(remote, "hdmi-connector")) { in sun8i_dw_hdmi_find_connector_pdev()
131 struct sun8i_dw_hdmi *hdmi; in sun8i_dw_hdmi_bind() local
137 hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL); in sun8i_dw_hdmi_bind()
138 if (!hdmi) in sun8i_dw_hdmi_bind()
141 plat_data = &hdmi->plat_data; in sun8i_dw_hdmi_bind()
142 hdmi->dev = &pdev->dev; in sun8i_dw_hdmi_bind()
143 encoder = &hdmi->encoder; in sun8i_dw_hdmi_bind()
145 hdmi->quirks = of_device_get_match_data(dev); in sun8i_dw_hdmi_bind()
158 hdmi->rst_ctrl = devm_reset_control_get(dev, "ctrl"); in sun8i_dw_hdmi_bind()
159 if (IS_ERR(hdmi->rst_ctrl)) { in sun8i_dw_hdmi_bind()
161 return PTR_ERR(hdmi->rst_ctrl); in sun8i_dw_hdmi_bind()
164 hdmi->clk_tmds = devm_clk_get(dev, "tmds"); in sun8i_dw_hdmi_bind()
165 if (IS_ERR(hdmi->clk_tmds)) { in sun8i_dw_hdmi_bind()
167 return PTR_ERR(hdmi->clk_tmds); in sun8i_dw_hdmi_bind()
170 hdmi->regulator = devm_regulator_get(dev, "hvcc"); in sun8i_dw_hdmi_bind()
171 if (IS_ERR(hdmi->regulator)) { in sun8i_dw_hdmi_bind()
173 return PTR_ERR(hdmi->regulator); in sun8i_dw_hdmi_bind()
178 hdmi->ddc_en = gpiod_get_optional(&connector_pdev->dev, in sun8i_dw_hdmi_bind()
182 if (IS_ERR(hdmi->ddc_en)) { in sun8i_dw_hdmi_bind()
184 return PTR_ERR(hdmi->ddc_en); in sun8i_dw_hdmi_bind()
188 ret = regulator_enable(hdmi->regulator); in sun8i_dw_hdmi_bind()
194 gpiod_set_value(hdmi->ddc_en, 1); in sun8i_dw_hdmi_bind()
196 ret = reset_control_deassert(hdmi->rst_ctrl); in sun8i_dw_hdmi_bind()
202 ret = clk_prepare_enable(hdmi->clk_tmds); in sun8i_dw_hdmi_bind()
215 ret = sun8i_hdmi_phy_probe(hdmi, phy_node); in sun8i_dw_hdmi_bind()
218 dev_err(dev, "Couldn't get the HDMI PHY\n"); in sun8i_dw_hdmi_bind()
225 sun8i_hdmi_phy_init(hdmi->phy); in sun8i_dw_hdmi_bind()
227 plat_data->mode_valid = hdmi->quirks->mode_valid; in sun8i_dw_hdmi_bind()
228 plat_data->use_drm_infoframe = hdmi->quirks->use_drm_infoframe; in sun8i_dw_hdmi_bind()
229 sun8i_hdmi_phy_set_ops(hdmi->phy, plat_data); in sun8i_dw_hdmi_bind()
231 platform_set_drvdata(pdev, hdmi); in sun8i_dw_hdmi_bind()
233 hdmi->hdmi = dw_hdmi_bind(pdev, encoder, plat_data); in sun8i_dw_hdmi_bind()
239 if (IS_ERR(hdmi->hdmi)) { in sun8i_dw_hdmi_bind()
240 ret = PTR_ERR(hdmi->hdmi); in sun8i_dw_hdmi_bind()
248 sun8i_hdmi_phy_remove(hdmi); in sun8i_dw_hdmi_bind()
250 clk_disable_unprepare(hdmi->clk_tmds); in sun8i_dw_hdmi_bind()
252 reset_control_assert(hdmi->rst_ctrl); in sun8i_dw_hdmi_bind()
254 gpiod_set_value(hdmi->ddc_en, 0); in sun8i_dw_hdmi_bind()
255 regulator_disable(hdmi->regulator); in sun8i_dw_hdmi_bind()
257 if (hdmi->ddc_en) in sun8i_dw_hdmi_bind()
258 gpiod_put(hdmi->ddc_en); in sun8i_dw_hdmi_bind()
266 struct sun8i_dw_hdmi *hdmi = dev_get_drvdata(dev); in sun8i_dw_hdmi_unbind() local
268 dw_hdmi_unbind(hdmi->hdmi); in sun8i_dw_hdmi_unbind()
269 sun8i_hdmi_phy_remove(hdmi); in sun8i_dw_hdmi_unbind()
270 clk_disable_unprepare(hdmi->clk_tmds); in sun8i_dw_hdmi_unbind()
271 reset_control_assert(hdmi->rst_ctrl); in sun8i_dw_hdmi_unbind()
272 gpiod_set_value(hdmi->ddc_en, 0); in sun8i_dw_hdmi_unbind()
273 regulator_disable(hdmi->regulator); in sun8i_dw_hdmi_unbind()
275 if (hdmi->ddc_en) in sun8i_dw_hdmi_unbind()
276 gpiod_put(hdmi->ddc_en); in sun8i_dw_hdmi_unbind()
308 .compatible = "allwinner,sun8i-a83t-dw-hdmi",
312 .compatible = "allwinner,sun50i-h6-dw-hdmi",
323 .name = "sun8i-dw-hdmi",
330 MODULE_DESCRIPTION("Allwinner DW HDMI bridge");