diff options
author | Sandor Yu <R01008@freescale.com> | 2013-01-11 15:28:51 +0800 |
---|---|---|
committer | Tapani <tapani@vmail.me> | 2013-03-29 14:35:46 +0800 |
commit | 9dbb887850fafe64eeae61b2e1e3f7fbb139d179 (patch) | |
tree | 1f29357d774cb23a5f2e67786346df90c2859b95 /drivers | |
parent | e2b5c5adca133b880409992411ee15ac49ba8fcf (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>
(cherry picked from commit 844aab72e7edcdced9f8e4e0d8e54eb4b0461cd9)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/mxc_hdmi.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/video/mxc_hdmi.c b/drivers/video/mxc_hdmi.c index 68f66450c26f..c0dff37250c0 100644 --- a/drivers/video/mxc_hdmi.c +++ b/drivers/video/mxc_hdmi.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2012 Freescale Semiconductor, Inc. + * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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; @@ -180,6 +186,8 @@ struct mxc_hdmi { struct fb_videomode previous_non_vga_mode; bool requesting_vga_for_initialization; struct switch_dev sdev; + + struct hdmi_phy_reg_config phy_config; }; struct i2c_client *hdmi_i2c; @@ -1051,6 +1059,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 */ @@ -2152,6 +2168,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); |