Commit 1d1bae72 authored by Roger Quadros's avatar Roger Quadros Committed by Kishon Vijay Abraham I

phy: ti-pipe3: Fix PCIe power up sequence

TRM [1] mentions that we need to power up
PCIESS_PHY_TX and PCIESS_PHY_RX before configuring
PCIe_PHY_RX SCP settings.

See "Table 26-81. PCIePHY Subsystem Low-Level Programming Sequence".

[1] DRA75x, DRA74x TRM - http://www.ti.com/lit/ug/sprui30f/sprui30f.pdfSigned-off-by: default avatarRoger Quadros <rogerq@ti.com>
Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
parent 9d009d9c
...@@ -341,6 +341,8 @@ static int ti_pipe3_power_off(struct phy *x) ...@@ -341,6 +341,8 @@ static int ti_pipe3_power_off(struct phy *x)
return ret; return ret;
} }
static void ti_pipe3_calibrate(struct ti_pipe3 *phy);
static int ti_pipe3_power_on(struct phy *x) static int ti_pipe3_power_on(struct phy *x)
{ {
u32 val; u32 val;
...@@ -386,6 +388,9 @@ static int ti_pipe3_power_on(struct phy *x) ...@@ -386,6 +388,9 @@ static int ti_pipe3_power_on(struct phy *x)
mask, val); mask, val);
} }
if (phy->mode == PIPE3_MODE_PCIE)
ti_pipe3_calibrate(phy);
return 0; return 0;
} }
...@@ -520,12 +525,7 @@ static int ti_pipe3_init(struct phy *x) ...@@ -520,12 +525,7 @@ static int ti_pipe3_init(struct phy *x)
val = 0x96 << OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT; val = 0x96 << OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT;
ret = regmap_update_bits(phy->pcs_syscon, phy->pcie_pcs_reg, ret = regmap_update_bits(phy->pcs_syscon, phy->pcie_pcs_reg,
PCIE_PCS_MASK, val); PCIE_PCS_MASK, val);
if (ret)
return ret; return ret;
ti_pipe3_calibrate(phy);
return 0;
} }
/* Bring it out of IDLE if it is IDLE */ /* Bring it out of IDLE if it is IDLE */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment