summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSandor Yu <R01008@freescale.com>2013-01-11 15:28:51 +0800
committerSandor Yu <R01008@freescale.com>2013-01-18 14:43:02 +0800
commit844aab72e7edcdced9f8e4e0d8e54eb4b0461cd9 (patch)
treee7b5ea597303e8e933d787aa8bd862db17bc0f8e /drivers
parent84cdc6e9acfc36c18e5b289e1e0d80810e284dcb (diff)
ENGR00239734 Mx6 HDMI PHY: Add 2 variable to pass board specific config
The PHY register 0x9 and 0xe should setting to different value in different board to pass HCT. Add variable phy_reg_vlev and phy_reg_cksymtx to pass phy config data. Signed-off-by: Sandor Yu <R01008@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/mxc_hdmi.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/video/mxc_hdmi.c b/drivers/video/mxc_hdmi.c
index ddfa0276a905..34fb1b282173 100644
--- a/drivers/video/mxc_hdmi.c
+++ b/drivers/video/mxc_hdmi.c
@@ -152,6 +152,12 @@ struct hdmi_data_info {
struct hdmi_vmode video_mode;
};
+struct hdmi_phy_reg_config {
+ /* HDMI PHY register config for pass HCT */
+ u16 reg_vlev;
+ u16 reg_cksymtx;
+};
+
struct mxc_hdmi {
struct platform_device *pdev;
struct platform_device *core_pdev;
@@ -179,6 +185,8 @@ struct mxc_hdmi {
struct fb_videomode previous_mode;
struct fb_videomode previous_non_vga_mode;
bool requesting_vga_for_initialization;
+
+ struct hdmi_phy_reg_config phy_config;
};
struct i2c_client *hdmi_i2c;
@@ -1087,6 +1095,14 @@ static int hdmi_phy_configure(struct mxc_hdmi *hdmi, unsigned char pRep,
hdmi_phy_i2c_write(hdmi, 0x800d, 0x09); /* CKSYMTXCTRL */
/* TX/CK LVL 10 */
hdmi_phy_i2c_write(hdmi, 0x01ad, 0x0E); /* VLEVCTRL */
+
+ /* Board specific setting for PHY register 0x09, 0x0e to pass HCT */
+ if (hdmi->phy_config.reg_cksymtx != 0)
+ hdmi_phy_i2c_write(hdmi, hdmi->phy_config.reg_cksymtx, 0x09);
+
+ if (hdmi->phy_config.reg_vlev != 0)
+ hdmi_phy_i2c_write(hdmi, hdmi->phy_config.reg_vlev, 0x0E);
+
/* REMOVE CLK TERM */
hdmi_phy_i2c_write(hdmi, 0x8000, 0x05); /* CKCALCTRL */
@@ -2189,6 +2205,10 @@ static int mxc_hdmi_disp_init(struct mxc_dispdrv_handle *disp,
if (plat->init)
plat->init(mxc_hdmi_ipu_id, mxc_hdmi_disp_id);
+ /* Specific phy config */
+ hdmi->phy_config.reg_cksymtx = plat->phy_reg_cksymtx;
+ hdmi->phy_config.reg_vlev = plat->phy_reg_vlev;
+
hdmi->hdmi_isfr_clk = clk_get(&hdmi->pdev->dev, "hdmi_isfr_clk");
if (IS_ERR(hdmi->hdmi_isfr_clk)) {
ret = PTR_ERR(hdmi->hdmi_isfr_clk);