mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
disp: msm: dp: add support for diff values of pre-emp and swing levels
Update the DP controller and PHY programming to support different values for pre-emp and voltage swing levels at different link rates. Change-Id: I974c47cd1bf71b76dea4f270031a9cdfe320725e Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
This commit is contained in:
parent
d8ffbf3d39
commit
9ea7fca99f
1 changed files with 44 additions and 2 deletions
|
|
@ -74,6 +74,34 @@ static u8 const vm_voltage_swing[4][4] = {
|
|||
{0xFF, 0xFF, 0xFF, 0xFF} /* sw1, 1.2 v, optional */
|
||||
};
|
||||
|
||||
static u8 const vm_pre_emphasis_hbr3_hbr2[4][4] = {
|
||||
{0x00, 0x0C, 0x15, 0x1A},
|
||||
{0x02, 0x0E, 0x16, 0xFF},
|
||||
{0x02, 0x11, 0xFF, 0xFF},
|
||||
{0x04, 0xFF, 0xFF, 0xFF}
|
||||
};
|
||||
|
||||
static u8 const vm_voltage_swing_hbr3_hbr2[4][4] = {
|
||||
{0x02, 0x12, 0x16, 0x1A},
|
||||
{0x09, 0x19, 0x1F, 0xFF},
|
||||
{0x10, 0x1F, 0xFF, 0xFF},
|
||||
{0x1F, 0xFF, 0xFF, 0xFF}
|
||||
};
|
||||
|
||||
static u8 const vm_pre_emphasis_hbr_rbr[4][4] = {
|
||||
{0x00, 0x0C, 0x14, 0x19},
|
||||
{0x00, 0x0B, 0x12, 0xFF},
|
||||
{0x00, 0x0B, 0xFF, 0xFF},
|
||||
{0x04, 0xFF, 0xFF, 0xFF}
|
||||
};
|
||||
|
||||
static u8 const vm_voltage_swing_hbr_rbr[4][4] = {
|
||||
{0x08, 0x0F, 0x16, 0x1F},
|
||||
{0x11, 0x1E, 0x1F, 0xFF},
|
||||
{0x19, 0x1F, 0xFF, 0xFF},
|
||||
{0x1F, 0xFF, 0xFF, 0xFF}
|
||||
};
|
||||
|
||||
enum dp_flush_bit {
|
||||
DP_PPS_FLUSH,
|
||||
DP_DHDR_FLUSH,
|
||||
|
|
@ -1722,6 +1750,7 @@ static void dp_catalog_ctrl_update_vx_px(struct dp_catalog_ctrl *ctrl,
|
|||
struct dp_catalog_private *catalog;
|
||||
struct dp_io_data *io_data;
|
||||
u8 value0, value1;
|
||||
u32 version;
|
||||
|
||||
if (!ctrl) {
|
||||
DP_ERR("invalid input\n");
|
||||
|
|
@ -1732,8 +1761,21 @@ static void dp_catalog_ctrl_update_vx_px(struct dp_catalog_ctrl *ctrl,
|
|||
|
||||
DP_DEBUG("hw: v=%d p=%d\n", v_level, p_level);
|
||||
|
||||
value0 = vm_voltage_swing[v_level][p_level];
|
||||
value1 = vm_pre_emphasis[v_level][p_level];
|
||||
io_data = catalog->io.dp_ahb;
|
||||
version = dp_read(DP_HW_VERSION);
|
||||
|
||||
if (version == 0x10020004) {
|
||||
if (high) {
|
||||
value0 = vm_voltage_swing_hbr3_hbr2[v_level][p_level];
|
||||
value1 = vm_pre_emphasis_hbr3_hbr2[v_level][p_level];
|
||||
} else {
|
||||
value0 = vm_voltage_swing_hbr_rbr[v_level][p_level];
|
||||
value1 = vm_pre_emphasis_hbr_rbr[v_level][p_level];
|
||||
}
|
||||
} else {
|
||||
value0 = vm_voltage_swing[v_level][p_level];
|
||||
value1 = vm_pre_emphasis[v_level][p_level];
|
||||
}
|
||||
|
||||
/* program default setting first */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue