]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net/phy: set led for rtl8211f phy
authorShengzhou Liu <Shengzhou.Liu@freescale.com>
Thu, 21 May 2015 10:07:35 +0000 (18:07 +0800)
committerJoe Hershberger <joe.hershberger@ni.com>
Tue, 11 Aug 2015 18:20:34 +0000 (13:20 -0500)
Initialize LCR rigister to configure
green LED for Link, yellow LED for Active.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
drivers/net/phy/realtek.c

index 79452a8df325d17f89f378b99946214b5ec3e46a..bba48da4099fda91558008d77e19bf373cfc7341 100644 (file)
@@ -41,6 +41,7 @@
 
 #define MIIM_RTL8211F_PAGE_SELECT      0x1f
 #define MIIM_RTL8211F_TX_DELAY         0x100
+#define MIIM_RTL8211F_LCR              0x10
 
 /* RealTek RTL8211x */
 static int rtl8211x_config(struct phy_device *phydev)
@@ -79,6 +80,13 @@ static int rtl8211f_config(struct phy_device *phydev)
                          MIIM_RTL8211F_PAGE_SELECT, 0x0);
        }
 
+       /* Set green LED for Link, yellow LED for Active */
+       phy_write(phydev, MDIO_DEVAD_NONE,
+                 MIIM_RTL8211F_PAGE_SELECT, 0xd04);
+       phy_write(phydev, MDIO_DEVAD_NONE, 0x10, 0x617f);
+       phy_write(phydev, MDIO_DEVAD_NONE,
+                 MIIM_RTL8211F_PAGE_SELECT, 0x0);
+
        genphy_config_aneg(phydev);
 
        return 0;