summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2015-10-19 10:43:30 +0200
committerMichal Simek <michal.simek@xilinx.com>2016-01-27 15:55:54 +0100
commit0179063273484ba2a869e30d36383044dfcf4087 (patch)
tree335e1e9b3971e018889ba36b3f2de81f4f4fad8a
parent842efb3a930aac48b471573dfe380d7bffbbc3f0 (diff)
downloadu-boot-imx-0179063273484ba2a869e30d36383044dfcf4087.zip
u-boot-imx-0179063273484ba2a869e30d36383044dfcf4087.tar.gz
u-boot-imx-0179063273484ba2a869e30d36383044dfcf4087.tar.bz2
net: phy: ti: Enable automatic crossover mode
Enable automatic crossover cable detection. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r--drivers/net/phy/ti.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c
index 541a57f..c3912d5 100644
--- a/drivers/net/phy/ti.c
+++ b/drivers/net/phy/ti.c
@@ -41,6 +41,8 @@
/* PHY CTRL bits */
#define DP83867_PHYCR_FIFO_DEPTH_SHIFT 14
+#define DP83867_MDI_CROSSOVER 5
+#define DP83867_MDI_CROSSOVER_AUTO 2
/* RGMIIDCTL bits */
#define DP83867_RGMII_TX_CLK_DELAY_SHIFT 4
@@ -149,6 +151,7 @@ static int dp83867_config(struct phy_device *phydev)
if (phy_interface_is_rgmii(phydev)) {
ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_DP83867_PHYCTRL,
+ (DP83867_MDI_CROSSOVER_AUTO << DP83867_MDI_CROSSOVER) |
(FIFO_DEPTH << DP83867_PHYCR_FIFO_DEPTH_SHIFT));
if (ret)
return ret;