]> git.sur5r.net Git - u-boot/commitdiff
net: phy: ti: Enable automatic crossover mode
authorMichal Simek <michal.simek@xilinx.com>
Mon, 19 Oct 2015 08:43:30 +0000 (10:43 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 27 Jan 2016 14:55:54 +0000 (15:55 +0100)
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>
drivers/net/phy/ti.c

index 541a57f98028937965cfa8337d334aed83f5ec73..c3912d52f320d36a6bca7ac99efe32bcde1060c8 100644 (file)
@@ -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;