summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSandor <R01008@freescale.com>2013-06-08 14:04:04 +0800
committerSandor <R01008@freescale.com>2013-06-08 17:53:20 +0800
commit44c38e9e568ddfb975054a57a7329a0ca0a47df4 (patch)
tree45420110c127b51f562bf5df59d1bd0acfdfadb5 /drivers
parent8e35856e6a682e7f0c76202990e6e0b7db2ca212 (diff)
ENGR00266158-03 Add HDCP DDC pins configuration
Add HDCP DDC pins configuration. Signed-off-by: Sandor <R01008@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/mxc/mxc_hdmi.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/drivers/video/mxc/mxc_hdmi.c b/drivers/video/mxc/mxc_hdmi.c
index 216e8e9ba756..212a5d2a9309 100644
--- a/drivers/video/mxc/mxc_hdmi.c
+++ b/drivers/video/mxc/mxc_hdmi.c
@@ -50,6 +50,7 @@
#include <linux/fsl_devices.h>
#include <linux/ipu.h>
#include <linux/regmap.h>
+#include <linux/pinctrl/consumer.h>
#include <linux/console.h>
#include <linux/types.h>
@@ -194,6 +195,10 @@ struct mxc_hdmi {
int *gpr_hdmi_base;
int *gpr_sdma_base;
struct hdmi_phy_reg_config phy_config;
+
+ struct pinctrl *pinctrl;
+ struct pinctrl_state *pins_hdcp;
+ struct pinctrl_state *pins_cec;
};
static int hdmi_major;
@@ -228,6 +233,14 @@ static void dump_fb_videomode(struct fb_videomode *m)
{}
#endif
+static int hdcp_init;
+static int __init early_init_hdcp(char *p)
+{
+ hdcp_init = 1;
+ return 0;
+}
+early_param("hdcp", early_init_hdcp);
+
static ssize_t mxc_hdmi_show_name(struct device *dev,
struct device_attribute *attr, char *buf)
{
@@ -1612,7 +1625,8 @@ static int mxc_hdmi_read_edid(struct mxc_hdmi *hdmi)
/* save old edid */
memcpy(edid_old, hdmi->edid, HDMI_EDID_LEN);
- if (!hdmi->hdmi_data.hdcp_enable)
+ /* Read EDID via HDMI DDC when HDCP Enable */
+ if (!hdcp_init)
ret = mxc_edid_read(hdmi_i2c->adapter, hdmi_i2c->addr,
hdmi->edid, &hdmi->edid_cfg, hdmi->fbi);
else {
@@ -2525,6 +2539,15 @@ static int mxc_hdmi_disp_init(struct mxc_dispdrv_handle *disp,
dev_dbg(&hdmi->pdev->dev, "Enabled HDMI clocks\n");
+ /* Init DDC pins for HDCP */
+ if (hdcp_init) {
+ hdmi->pinctrl = devm_pinctrl_get_select_default(&hdmi->pdev->dev);
+ if (IS_ERR(hdmi->pinctrl)) {
+ dev_err(&hdmi->pdev->dev, "can't get/select DDC pinctrl\n");
+ goto erate2;
+ }
+ }
+
/* Product and revision IDs */
dev_info(&hdmi->pdev->dev,
"Detected HDMI controller 0x%x:0x%x:0x%x:0x%x\n",
@@ -2725,7 +2748,8 @@ static int __devinit mxc_hdmi_probe(struct platform_device *pdev)
int ret = 0;
/* Check that I2C driver is loaded and available */
- if (!hdmi_i2c)
+ /* Skip I2C driver available check when HDCP enable */
+ if (!hdmi_i2c && !hdcp_init)
return -ENODEV;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);