Lines Matching +full:imx6q +full:- +full:iomuxc +full:- +full:gpr

1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (C) 2011-2013 Freescale Semiconductor, Inc.
4 * derived from imx-hdmi.c(renamed to bridge/dw_hdmi.c now)
9 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
14 #include <video/imx-ipu-v3.h>
23 #include "imx-drm.h"
103 struct device_node *np = hdmi->dev->of_node; in dw_hdmi_imx_parse_dt()
105 hdmi->regmap = syscon_regmap_lookup_by_phandle(np, "gpr"); in dw_hdmi_imx_parse_dt()
106 if (IS_ERR(hdmi->regmap)) { in dw_hdmi_imx_parse_dt()
107 dev_err(hdmi->dev, "Unable to get gpr\n"); in dw_hdmi_imx_parse_dt()
108 return PTR_ERR(hdmi->regmap); in dw_hdmi_imx_parse_dt()
117 int mux = drm_of_encoder_active_port_id(hdmi->dev->of_node, encoder); in dw_hdmi_imx_encoder_enable()
119 regmap_update_bits(hdmi->regmap, IOMUXC_GPR3, in dw_hdmi_imx_encoder_enable()
130 imx_crtc_state->bus_format = MEDIA_BUS_FMT_RGB888_1X24; in dw_hdmi_imx_atomic_check()
131 imx_crtc_state->di_hsync_pin = 2; in dw_hdmi_imx_atomic_check()
132 imx_crtc_state->di_vsync_pin = 3; in dw_hdmi_imx_atomic_check()
147 if (mode->clock < 13500) in imx6q_hdmi_mode_valid()
150 if (mode->clock > 216000) in imx6q_hdmi_mode_valid()
161 if (mode->clock < 13500) in imx6dl_hdmi_mode_valid()
164 if (mode->clock > 216000) in imx6dl_hdmi_mode_valid()
185 { .compatible = "fsl,imx6q-hdmi",
188 .compatible = "fsl,imx6dl-hdmi",
206 if (!pdev->dev.of_node) in dw_hdmi_imx_bind()
207 return -ENODEV; in dw_hdmi_imx_bind()
212 match = of_match_node(dw_hdmi_imx_dt_ids, pdev->dev.of_node); in dw_hdmi_imx_bind()
213 plat_data = match->data; in dw_hdmi_imx_bind()
214 hdmi->dev = &pdev->dev; in dw_hdmi_imx_bind()
215 encoder = &hdmi->encoder; in dw_hdmi_imx_bind()
217 ret = imx_drm_encoder_parse_of(drm, encoder, dev->of_node); in dw_hdmi_imx_bind()
228 hdmi->hdmi = dw_hdmi_bind(pdev, encoder, plat_data); in dw_hdmi_imx_bind()
234 if (IS_ERR(hdmi->hdmi)) { in dw_hdmi_imx_bind()
235 ret = PTR_ERR(hdmi->hdmi); in dw_hdmi_imx_bind()
247 dw_hdmi_unbind(hdmi->hdmi); in dw_hdmi_imx_unbind()
259 hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL); in dw_hdmi_imx_probe()
261 return -ENOMEM; in dw_hdmi_imx_probe()
265 return component_add(&pdev->dev, &dw_hdmi_imx_ops); in dw_hdmi_imx_probe()
270 component_del(&pdev->dev, &dw_hdmi_imx_ops); in dw_hdmi_imx_remove()
279 .name = "dwhdmi-imx",
286 MODULE_AUTHOR("Andy Yan <andy.yan@rock-chips.com>");
287 MODULE_AUTHOR("Yakir Yang <ykk@rock-chips.com>");
288 MODULE_DESCRIPTION("IMX6 Specific DW-HDMI Driver Extension");
290 MODULE_ALIAS("platform:dwhdmi-imx");