Lines Matching +full:mt8173 +full:- +full:cec
1 // SPDX-License-Identifier: GPL-2.0-only
7 #include <linux/arm-smccc.h>
24 #include <sound/hdmi-codec.h>
192 return readl(hdmi->regs + offset); in mtk_hdmi_read()
197 writel(val, hdmi->regs + offset); in mtk_hdmi_write()
202 void __iomem *reg = hdmi->regs + offset; in mtk_hdmi_clear_bits()
212 void __iomem *reg = hdmi->regs + offset; in mtk_hdmi_set_bits()
222 void __iomem *reg = hdmi->regs + offset; in mtk_hdmi_mask()
241 * MT8173 HDMI hardware has an output control bit to enable/disable HDMI in mtk_hdmi_hw_make_reg_writable()
246 if (hdmi->conf && hdmi->conf->tz_disabled) in mtk_hdmi_hw_make_reg_writable()
247 regmap_update_bits(hdmi->sys_regmap, in mtk_hdmi_hw_make_reg_writable()
248 hdmi->sys_offset + HDMI_SYS_CFG20, in mtk_hdmi_hw_make_reg_writable()
254 regmap_update_bits(hdmi->sys_regmap, hdmi->sys_offset + HDMI_SYS_CFG20, in mtk_hdmi_hw_make_reg_writable()
256 regmap_update_bits(hdmi->sys_regmap, hdmi->sys_offset + HDMI_SYS_CFG1C, in mtk_hdmi_hw_make_reg_writable()
262 regmap_update_bits(hdmi->sys_regmap, hdmi->sys_offset + HDMI_SYS_CFG20, in mtk_hdmi_hw_1p4_version_enable()
278 regmap_update_bits(hdmi->sys_regmap, hdmi->sys_offset + HDMI_SYS_CFG1C, in mtk_hdmi_hw_reset()
280 regmap_update_bits(hdmi->sys_regmap, hdmi->sys_offset + HDMI_SYS_CFG1C, in mtk_hdmi_hw_reset()
283 regmap_update_bits(hdmi->sys_regmap, hdmi->sys_offset + HDMI_SYS_CFG1C, in mtk_hdmi_hw_reset()
321 dev_dbg(hdmi->dev, in mtk_hdmi_hw_send_info_frame()
343 dev_err(hdmi->dev, "Unknown infoframe type %d\n", frame_type); in mtk_hdmi_hw_send_info_frame()
366 regmap_update_bits(hdmi->sys_regmap, hdmi->sys_offset + HDMI_SYS_CFG20, in mtk_hdmi_hw_config_sys()
369 regmap_update_bits(hdmi->sys_regmap, hdmi->sys_offset + HDMI_SYS_CFG20, in mtk_hdmi_hw_config_sys()
375 regmap_update_bits(hdmi->sys_regmap, hdmi->sys_offset + HDMI_SYS_CFG20, in mtk_hdmi_hw_set_deep_color_mode()
414 if (mode->flags & DRM_MODE_FLAG_INTERLACE && in mtk_hdmi_hw_msic_setting()
415 mode->clock == 74250 && in mtk_hdmi_hw_msic_setting()
416 mode->vdisplay == 1080) in mtk_hdmi_hw_msic_setting()
655 /* Recommended N values from HDMI specification, tables 7-1 to 7-3 */
667 * hdmi_recommended_n() - Return N value recommended by HDMI specification
676 for (i = 0; i < ARRAY_SIZE(hdmi_rec_n_table) - 1; i++) { in hdmi_recommended_n()
684 return recommended->n[0]; in hdmi_recommended_n()
686 return recommended->n[1]; in hdmi_recommended_n()
688 return recommended->n[2]; in hdmi_recommended_n()
690 return recommended->n[1] * 2; in hdmi_recommended_n()
692 return recommended->n[2] * 2; in hdmi_recommended_n()
694 return recommended->n[1] * 4; in hdmi_recommended_n()
696 return recommended->n[2] * 4; in hdmi_recommended_n()
758 dev_dbg(hdmi->dev, "%s: sample_rate=%u, clock=%d, cts=%u, n=%u\n", in mtk_hdmi_hw_aud_set_ncts()
842 ret = clk_set_rate(hdmi->clk[MTK_HDMI_CLK_HDMI_PLL], clock); in mtk_hdmi_video_change_vpll()
844 dev_err(hdmi->dev, "Failed to set PLL to %u Hz: %d\n", clock, in mtk_hdmi_video_change_vpll()
849 rate = clk_get_rate(hdmi->clk[MTK_HDMI_CLK_HDMI_PLL]); in mtk_hdmi_video_change_vpll()
852 dev_warn(hdmi->dev, "Want PLL %u Hz, got %lu Hz\n", clock, in mtk_hdmi_video_change_vpll()
855 dev_dbg(hdmi->dev, "Want PLL %u Hz, got %lu Hz\n", clock, rate); in mtk_hdmi_video_change_vpll()
868 mtk_hdmi_hw_enable_dvi_mode(hdmi, hdmi->dvi_mode); in mtk_hdmi_video_set_display_mode()
884 if (hdmi->aud_param.aud_input_type == HDMI_AUD_INPUT_SPDIF && in mtk_hdmi_aud_set_input()
885 hdmi->aud_param.aud_codec == HDMI_AUDIO_CODING_TYPE_DST) { in mtk_hdmi_aud_set_input()
887 } else if (hdmi->aud_param.aud_i2s_fmt == HDMI_I2S_MODE_LJT_24BIT) { in mtk_hdmi_aud_set_input()
888 hdmi->aud_param.aud_i2s_fmt = HDMI_I2S_MODE_LJT_16BIT; in mtk_hdmi_aud_set_input()
891 mtk_hdmi_hw_aud_set_i2s_fmt(hdmi, hdmi->aud_param.aud_i2s_fmt); in mtk_hdmi_aud_set_input()
894 dst = ((hdmi->aud_param.aud_input_type == HDMI_AUD_INPUT_SPDIF) && in mtk_hdmi_aud_set_input()
895 (hdmi->aud_param.aud_codec == HDMI_AUDIO_CODING_TYPE_DST)); in mtk_hdmi_aud_set_input()
898 if (hdmi->aud_param.aud_input_type == HDMI_AUD_INPUT_SPDIF) in mtk_hdmi_aud_set_input()
901 chan_type = hdmi->aud_param.aud_input_chan_type; in mtk_hdmi_aud_set_input()
904 mtk_hdmi_hw_aud_set_input_type(hdmi, hdmi->aud_param.aud_input_type); in mtk_hdmi_aud_set_input()
910 unsigned int sample_rate = hdmi->aud_param.codec_params.sample_rate; in mtk_hdmi_aud_set_src()
916 if (hdmi->aud_param.aud_input_type == HDMI_AUD_INPUT_I2S) { in mtk_hdmi_aud_set_src()
925 return -EINVAL; in mtk_hdmi_aud_set_src()
927 mtk_hdmi_hw_aud_set_mclk(hdmi, hdmi->aud_param.aud_mclk); in mtk_hdmi_aud_set_src()
935 return -EINVAL; in mtk_hdmi_aud_set_src()
940 mtk_hdmi_hw_aud_set_ncts(hdmi, sample_rate, display_mode->clock); in mtk_hdmi_aud_set_src()
955 hdmi->aud_param.codec_params.iec.status); in mtk_hdmi_aud_output_config()
973 hdmi->curr_conn, mode); in mtk_hdmi_setup_avi_infoframe()
975 dev_err(hdmi->dev, in mtk_hdmi_setup_avi_infoframe()
982 dev_err(hdmi->dev, "Failed to pack AVI infoframe: %zd\n", err); in mtk_hdmi_setup_avi_infoframe()
1000 dev_err(hdmi->dev, "Failed to initialize SPD infoframe: %zd\n", in mtk_hdmi_setup_spd_infoframe()
1007 dev_err(hdmi->dev, "Failed to pack SDP infoframe: %zd\n", err); in mtk_hdmi_setup_spd_infoframe()
1023 dev_err(hdmi->dev, "Failed to setup audio infoframe: %zd\n", in mtk_hdmi_setup_audio_infoframe()
1032 hdmi->aud_param.aud_input_chan_type); in mtk_hdmi_setup_audio_infoframe()
1036 dev_err(hdmi->dev, "Failed to pack audio infoframe: %zd\n", in mtk_hdmi_setup_audio_infoframe()
1053 hdmi->curr_conn, mode); in mtk_hdmi_setup_vendor_specific_infoframe()
1055 dev_err(hdmi->dev, in mtk_hdmi_setup_vendor_specific_infoframe()
1062 dev_err(hdmi->dev, "Failed to pack vendor infoframe: %zd\n", in mtk_hdmi_setup_vendor_specific_infoframe()
1073 struct hdmi_audio_param *aud_param = &hdmi->aud_param; in mtk_hdmi_output_init()
1075 hdmi->csp = HDMI_COLORSPACE_RGB; in mtk_hdmi_output_init()
1076 aud_param->aud_codec = HDMI_AUDIO_CODING_TYPE_PCM; in mtk_hdmi_output_init()
1077 aud_param->aud_sampe_size = HDMI_AUDIO_SAMPLE_SIZE_16; in mtk_hdmi_output_init()
1078 aud_param->aud_input_type = HDMI_AUD_INPUT_I2S; in mtk_hdmi_output_init()
1079 aud_param->aud_i2s_fmt = HDMI_I2S_MODE_I2S_24BIT; in mtk_hdmi_output_init()
1080 aud_param->aud_mclk = HDMI_AUD_MCLK_128FS; in mtk_hdmi_output_init()
1081 aud_param->aud_input_chan_type = HDMI_AUD_CHAN_TYPE_2_0; in mtk_hdmi_output_init()
1089 hdmi->audio_enable = true; in mtk_hdmi_audio_enable()
1095 hdmi->audio_enable = false; in mtk_hdmi_audio_disable()
1101 if (!hdmi->audio_enable) { in mtk_hdmi_audio_set_param()
1102 dev_err(hdmi->dev, "hdmi audio is in disable state!\n"); in mtk_hdmi_audio_set_param()
1103 return -EINVAL; in mtk_hdmi_audio_set_param()
1105 dev_dbg(hdmi->dev, "codec:%d, input:%d, channel:%d, fs:%d\n", in mtk_hdmi_audio_set_param()
1106 param->aud_codec, param->aud_input_type, in mtk_hdmi_audio_set_param()
1107 param->aud_input_chan_type, param->codec_params.sample_rate); in mtk_hdmi_audio_set_param()
1108 memcpy(&hdmi->aud_param, param, sizeof(*param)); in mtk_hdmi_audio_set_param()
1109 return mtk_hdmi_aud_output_config(hdmi, &hdmi->mode); in mtk_hdmi_audio_set_param()
1120 phy_power_off(hdmi->phy); in mtk_hdmi_output_set_display_mode()
1123 mode->clock * 1000); in mtk_hdmi_output_set_display_mode()
1125 dev_err(hdmi->dev, "Failed to set vpll: %d\n", ret); in mtk_hdmi_output_set_display_mode()
1130 phy_power_on(hdmi->phy); in mtk_hdmi_output_set_display_mode()
1153 hdmi->clk[i] = of_clk_get_by_name(np, in mtk_hdmi_get_all_clk()
1155 if (IS_ERR(hdmi->clk[i])) in mtk_hdmi_get_all_clk()
1156 return PTR_ERR(hdmi->clk[i]); in mtk_hdmi_get_all_clk()
1165 ret = clk_prepare_enable(hdmi->clk[MTK_HDMI_CLK_AUD_BCLK]); in mtk_hdmi_clk_enable_audio()
1169 ret = clk_prepare_enable(hdmi->clk[MTK_HDMI_CLK_AUD_SPDIF]); in mtk_hdmi_clk_enable_audio()
1175 clk_disable_unprepare(hdmi->clk[MTK_HDMI_CLK_AUD_BCLK]); in mtk_hdmi_clk_enable_audio()
1181 clk_disable_unprepare(hdmi->clk[MTK_HDMI_CLK_AUD_BCLK]); in mtk_hdmi_clk_disable_audio()
1182 clk_disable_unprepare(hdmi->clk[MTK_HDMI_CLK_AUD_SPDIF]); in mtk_hdmi_clk_disable_audio()
1190 mutex_lock(&hdmi->update_plugged_status_lock); in mtk_hdmi_update_plugged_status()
1191 connected = mtk_cec_hpd_high(hdmi->cec_dev); in mtk_hdmi_update_plugged_status()
1192 if (hdmi->plugged_cb && hdmi->codec_dev) in mtk_hdmi_update_plugged_status()
1193 hdmi->plugged_cb(hdmi->codec_dev, connected); in mtk_hdmi_update_plugged_status()
1194 mutex_unlock(&hdmi->update_plugged_status_lock); in mtk_hdmi_update_plugged_status()
1212 dev_dbg(hdmi->dev, "xres=%d, yres=%d, refresh=%d, intl=%d clock=%d\n", in mtk_hdmi_bridge_mode_valid()
1213 mode->hdisplay, mode->vdisplay, drm_mode_vrefresh(mode), in mtk_hdmi_bridge_mode_valid()
1214 !!(mode->flags & DRM_MODE_FLAG_INTERLACE), mode->clock * 1000); in mtk_hdmi_bridge_mode_valid()
1216 next_bridge = drm_bridge_get_next_bridge(&hdmi->bridge); in mtk_hdmi_bridge_mode_valid()
1226 if (hdmi->conf) { in mtk_hdmi_bridge_mode_valid()
1227 if (hdmi->conf->cea_modes_only && !drm_match_cea_mode(mode)) in mtk_hdmi_bridge_mode_valid()
1230 if (hdmi->conf->max_mode_clock && in mtk_hdmi_bridge_mode_valid()
1231 mode->clock > hdmi->conf->max_mode_clock) in mtk_hdmi_bridge_mode_valid()
1235 if (mode->clock < 27000) in mtk_hdmi_bridge_mode_valid()
1237 if (mode->clock > 297000) in mtk_hdmi_bridge_mode_valid()
1247 if (hdmi && hdmi->bridge.encoder && hdmi->bridge.encoder->dev) { in mtk_hdmi_hpd_event()
1251 drm_helper_hpd_irq_event(hdmi->bridge.encoder->dev); in mtk_hdmi_hpd_event()
1252 drm_bridge_hpd_notify(&hdmi->bridge, status); in mtk_hdmi_hpd_event()
1273 if (!hdmi->ddc_adpt) in mtk_hdmi_bridge_get_edid()
1275 edid = drm_get_edid(connector, hdmi->ddc_adpt); in mtk_hdmi_bridge_get_edid()
1278 hdmi->dvi_mode = !drm_detect_monitor_audio(edid); in mtk_hdmi_bridge_get_edid()
1291 return -EINVAL; in mtk_hdmi_bridge_attach()
1294 if (hdmi->next_bridge) { in mtk_hdmi_bridge_attach()
1295 ret = drm_bridge_attach(bridge->encoder, hdmi->next_bridge, in mtk_hdmi_bridge_attach()
1301 mtk_cec_set_hpd_event(hdmi->cec_dev, mtk_hdmi_hpd_event, hdmi->dev); in mtk_hdmi_bridge_attach()
1318 if (!hdmi->enabled) in mtk_hdmi_bridge_atomic_disable()
1321 phy_power_off(hdmi->phy); in mtk_hdmi_bridge_atomic_disable()
1322 clk_disable_unprepare(hdmi->clk[MTK_HDMI_CLK_HDMI_PIXEL]); in mtk_hdmi_bridge_atomic_disable()
1323 clk_disable_unprepare(hdmi->clk[MTK_HDMI_CLK_HDMI_PLL]); in mtk_hdmi_bridge_atomic_disable()
1325 hdmi->curr_conn = NULL; in mtk_hdmi_bridge_atomic_disable()
1327 hdmi->enabled = false; in mtk_hdmi_bridge_atomic_disable()
1335 if (!hdmi->powered) in mtk_hdmi_bridge_atomic_post_disable()
1341 hdmi->powered = false; in mtk_hdmi_bridge_atomic_post_disable()
1350 dev_dbg(hdmi->dev, "cur info: name:%s, hdisplay:%d\n", in mtk_hdmi_bridge_mode_set()
1351 adjusted_mode->name, adjusted_mode->hdisplay); in mtk_hdmi_bridge_mode_set()
1352 dev_dbg(hdmi->dev, "hsync_start:%d,hsync_end:%d, htotal:%d", in mtk_hdmi_bridge_mode_set()
1353 adjusted_mode->hsync_start, adjusted_mode->hsync_end, in mtk_hdmi_bridge_mode_set()
1354 adjusted_mode->htotal); in mtk_hdmi_bridge_mode_set()
1355 dev_dbg(hdmi->dev, "hskew:%d, vdisplay:%d\n", in mtk_hdmi_bridge_mode_set()
1356 adjusted_mode->hskew, adjusted_mode->vdisplay); in mtk_hdmi_bridge_mode_set()
1357 dev_dbg(hdmi->dev, "vsync_start:%d, vsync_end:%d, vtotal:%d", in mtk_hdmi_bridge_mode_set()
1358 adjusted_mode->vsync_start, adjusted_mode->vsync_end, in mtk_hdmi_bridge_mode_set()
1359 adjusted_mode->vtotal); in mtk_hdmi_bridge_mode_set()
1360 dev_dbg(hdmi->dev, "vscan:%d, flag:%d\n", in mtk_hdmi_bridge_mode_set()
1361 adjusted_mode->vscan, adjusted_mode->flags); in mtk_hdmi_bridge_mode_set()
1363 drm_mode_copy(&hdmi->mode, adjusted_mode); in mtk_hdmi_bridge_mode_set()
1374 hdmi->powered = true; in mtk_hdmi_bridge_atomic_pre_enable()
1382 mtk_hdmi_setup_spd_infoframe(hdmi, "mediatek", "On-chip HDMI"); in mtk_hdmi_send_infoframe()
1383 if (mode->flags & DRM_MODE_FLAG_3D_MASK) in mtk_hdmi_send_infoframe()
1390 struct drm_atomic_state *state = old_state->base.state; in mtk_hdmi_bridge_atomic_enable()
1394 hdmi->curr_conn = drm_atomic_get_new_connector_for_encoder(state, in mtk_hdmi_bridge_atomic_enable()
1395 bridge->encoder); in mtk_hdmi_bridge_atomic_enable()
1397 mtk_hdmi_output_set_display_mode(hdmi, &hdmi->mode); in mtk_hdmi_bridge_atomic_enable()
1398 clk_prepare_enable(hdmi->clk[MTK_HDMI_CLK_HDMI_PLL]); in mtk_hdmi_bridge_atomic_enable()
1399 clk_prepare_enable(hdmi->clk[MTK_HDMI_CLK_HDMI_PIXEL]); in mtk_hdmi_bridge_atomic_enable()
1400 phy_power_on(hdmi->phy); in mtk_hdmi_bridge_atomic_enable()
1401 mtk_hdmi_send_infoframe(hdmi, &hdmi->mode); in mtk_hdmi_bridge_atomic_enable()
1403 hdmi->enabled = true; in mtk_hdmi_bridge_atomic_enable()
1425 struct device *dev = &pdev->dev; in mtk_hdmi_dt_parse_pdata()
1426 struct device_node *np = dev->of_node; in mtk_hdmi_dt_parse_pdata()
1435 if (ret != -EPROBE_DEFER) in mtk_hdmi_dt_parse_pdata()
1441 /* The CEC module handles HDMI hotplug detection */ in mtk_hdmi_dt_parse_pdata()
1442 cec_np = of_get_compatible_child(np->parent, "mediatek,mt8173-cec"); in mtk_hdmi_dt_parse_pdata()
1444 dev_err(dev, "Failed to find CEC node\n"); in mtk_hdmi_dt_parse_pdata()
1445 return -EINVAL; in mtk_hdmi_dt_parse_pdata()
1450 dev_err(hdmi->dev, "Waiting for CEC device %pOF\n", in mtk_hdmi_dt_parse_pdata()
1453 return -EPROBE_DEFER; in mtk_hdmi_dt_parse_pdata()
1456 hdmi->cec_dev = &cec_pdev->dev; in mtk_hdmi_dt_parse_pdata()
1459 * The mediatek,syscon-hdmi property contains a phandle link to the in mtk_hdmi_dt_parse_pdata()
1463 regmap = syscon_regmap_lookup_by_phandle(np, "mediatek,syscon-hdmi"); in mtk_hdmi_dt_parse_pdata()
1464 ret = of_property_read_u32_index(np, "mediatek,syscon-hdmi", 1, in mtk_hdmi_dt_parse_pdata()
1465 &hdmi->sys_offset); in mtk_hdmi_dt_parse_pdata()
1474 hdmi->sys_regmap = regmap; in mtk_hdmi_dt_parse_pdata()
1477 hdmi->regs = devm_ioremap_resource(dev, mem); in mtk_hdmi_dt_parse_pdata()
1478 if (IS_ERR(hdmi->regs)) { in mtk_hdmi_dt_parse_pdata()
1479 ret = PTR_ERR(hdmi->regs); in mtk_hdmi_dt_parse_pdata()
1485 ret = -EINVAL; in mtk_hdmi_dt_parse_pdata()
1489 if (!of_device_is_compatible(remote, "hdmi-connector")) { in mtk_hdmi_dt_parse_pdata()
1490 hdmi->next_bridge = of_drm_find_bridge(remote); in mtk_hdmi_dt_parse_pdata()
1491 if (!hdmi->next_bridge) { in mtk_hdmi_dt_parse_pdata()
1494 ret = -EPROBE_DEFER; in mtk_hdmi_dt_parse_pdata()
1499 i2c_np = of_parse_phandle(remote, "ddc-i2c-bus", 0); in mtk_hdmi_dt_parse_pdata()
1501 dev_err(dev, "Failed to find ddc-i2c-bus node in %pOF\n", in mtk_hdmi_dt_parse_pdata()
1504 ret = -EINVAL; in mtk_hdmi_dt_parse_pdata()
1509 hdmi->ddc_adpt = of_find_i2c_adapter_by_node(i2c_np); in mtk_hdmi_dt_parse_pdata()
1511 if (!hdmi->ddc_adpt) { in mtk_hdmi_dt_parse_pdata()
1513 ret = -EINVAL; in mtk_hdmi_dt_parse_pdata()
1519 put_device(hdmi->cec_dev); in mtk_hdmi_dt_parse_pdata()
1533 unsigned int chan = params->cea.channels; in mtk_hdmi_audio_hw_params()
1535 dev_dbg(hdmi->dev, "%s: %u Hz, %d bit, %d channels\n", __func__, in mtk_hdmi_audio_hw_params()
1536 params->sample_rate, params->sample_width, chan); in mtk_hdmi_audio_hw_params()
1538 if (!hdmi->bridge.encoder) in mtk_hdmi_audio_hw_params()
1539 return -ENODEV; in mtk_hdmi_audio_hw_params()
1555 dev_err(hdmi->dev, "channel[%d] not supported!\n", chan); in mtk_hdmi_audio_hw_params()
1556 return -EINVAL; in mtk_hdmi_audio_hw_params()
1559 switch (params->sample_rate) { in mtk_hdmi_audio_hw_params()
1569 dev_err(hdmi->dev, "rate[%d] not supported!\n", in mtk_hdmi_audio_hw_params()
1570 params->sample_rate); in mtk_hdmi_audio_hw_params()
1571 return -EINVAL; in mtk_hdmi_audio_hw_params()
1574 switch (daifmt->fmt) { in mtk_hdmi_audio_hw_params()
1588 dev_err(hdmi->dev, "%s: Invalid DAI format %d\n", __func__, in mtk_hdmi_audio_hw_params()
1589 daifmt->fmt); in mtk_hdmi_audio_hw_params()
1590 return -EINVAL; in mtk_hdmi_audio_hw_params()
1635 if (hdmi->enabled) in mtk_hdmi_audio_get_eld()
1636 memcpy(buf, hdmi->curr_conn->eld, min(sizeof(hdmi->curr_conn->eld), len)); in mtk_hdmi_audio_get_eld()
1648 mutex_lock(&hdmi->update_plugged_status_lock); in mtk_hdmi_audio_hook_plugged_cb()
1649 hdmi->plugged_cb = fn; in mtk_hdmi_audio_hook_plugged_cb()
1650 hdmi->codec_dev = codec_dev; in mtk_hdmi_audio_hook_plugged_cb()
1651 mutex_unlock(&hdmi->update_plugged_status_lock); in mtk_hdmi_audio_hook_plugged_cb()
1692 struct device *dev = &pdev->dev; in mtk_drm_hdmi_probe()
1697 return -ENOMEM; in mtk_drm_hdmi_probe()
1699 hdmi->dev = dev; in mtk_drm_hdmi_probe()
1700 hdmi->conf = of_device_get_match_data(dev); in mtk_drm_hdmi_probe()
1706 hdmi->phy = devm_phy_get(dev, "hdmi"); in mtk_drm_hdmi_probe()
1707 if (IS_ERR(hdmi->phy)) { in mtk_drm_hdmi_probe()
1708 ret = PTR_ERR(hdmi->phy); in mtk_drm_hdmi_probe()
1713 mutex_init(&hdmi->update_plugged_status_lock); in mtk_drm_hdmi_probe()
1728 hdmi->bridge.funcs = &mtk_hdmi_bridge_funcs; in mtk_drm_hdmi_probe()
1729 hdmi->bridge.of_node = pdev->dev.of_node; in mtk_drm_hdmi_probe()
1730 hdmi->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID in mtk_drm_hdmi_probe()
1732 hdmi->bridge.type = DRM_MODE_CONNECTOR_HDMIA; in mtk_drm_hdmi_probe()
1733 drm_bridge_add(&hdmi->bridge); in mtk_drm_hdmi_probe()
1744 drm_bridge_remove(&hdmi->bridge); in mtk_drm_hdmi_probe()
1752 drm_bridge_remove(&hdmi->bridge); in mtk_drm_hdmi_remove()
1794 { .compatible = "mediatek,mt2701-hdmi",
1797 { .compatible = "mediatek,mt8167-hdmi",
1800 { .compatible = "mediatek,mt8173-hdmi",
1810 .name = "mediatek-drm-hdmi",