display: slimport: update phy register values for flo

update phy register values for flo to pass HDMI eye diagram test

Change-Id: I8075ee0f2137581fa256f378c380e41ac034ca1d
Signed-off-by: yetta_wu <yetta_wu@asus.com>
This commit is contained in:
yetta_wu 2013-06-05 19:59:55 +08:00 committed by Iliyan Malchev
parent b6da3164e7
commit 951ba1b0f4
4 changed files with 37 additions and 5 deletions

View file

@ -3268,6 +3268,13 @@ static struct i2c_registry i2c_anx7808_devices __initdata = {
static void __init add_i2c_anx7808_device(void)
{
if (machine_is_apq8064_flo()) {
anx7808_pdata.phy_reg2 = 0x39;
anx7808_pdata.phy_reg12 = 0x09;
anx7808_pdata.phy_reg6 = 0x3f;
anx7808_pdata.phy_reg16 = 0x1d;
}
i2c_register_board_info(i2c_anx7808_devices.bus,
i2c_anx7808_devices.info,
i2c_anx7808_devices.len);

View file

@ -19,6 +19,8 @@
#include <linux/slimport.h>
#include "slimport_tx_drv.h"
#include "slimport_tx_reg.h"
#include <linux/platform_data/slimport_device.h>
#include <linux/i2c.h>
static unchar bytebuf[MAX_BUF_CNT];
@ -128,6 +130,9 @@ static void sp_tx_api_m_gen_clk_select(unchar bspreading)
static void sp_tx_link_phy_initialization(void)
{
struct anx7808_platform_data *pdata =
anx7808_client->dev.platform_data;
/* PHY parameter for cts */
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG0, 0x19);
@ -148,10 +153,25 @@ static void sp_tx_link_phy_initialization(void)
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG15, 0x10);
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG18, 0x1F);
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG2, 0x36);
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG12, 0x08);
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG6, 0x3c);
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG16, 0x18);
if (!pdata->phy_reg2)
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG2, 0x36);
else
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG2, pdata->phy_reg2);
if (!pdata->phy_reg12)
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG12, 0x08);
else
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG12, pdata->phy_reg12);
if (!pdata->phy_reg6)
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG6, 0x3c);
else
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG6, pdata->phy_reg6);
if (!pdata->phy_reg16)
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG16, 0x18);
else
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG16, pdata->phy_reg16);
sp_write_reg(TX_P1, SP_TX_LT_CTRL_REG3, 0x3F);
}

View file

@ -25,6 +25,11 @@ struct anx7808_platform_data
spinlock_t lock;
int (*switch_power)(bool on);
unsigned int phy_reg2;
unsigned int phy_reg12;
unsigned int phy_reg6;
unsigned int phy_reg16;
};
#endif

View file

@ -48,7 +48,7 @@ extern unchar sp_tx_pd_mode;
extern unchar bedid_break;
extern unchar sp_tx_hw_hdcp_en;
/*extern struct i2c_client *anx7808_client;*/
extern struct i2c_client *anx7808_client;
int sp_read_reg(uint8_t slave_addr, uint8_t offset, uint8_t *buf);
int sp_write_reg(uint8_t slave_addr, uint8_t offset, uint8_t value);