ethernet: disable clkout ephy
authorZhuo Wang <zhuo.wang@amlogic.com>
Wed, 25 Apr 2018 06:57:07 +0000 (14:57 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Wed, 25 Apr 2018 09:00:35 +0000 (02:00 -0700)
PD#165111: disable ephy clk_out

Change-Id: Icecff2b903a0ae0c91cabefd15803aaa74948e74
Signed-off-by: Zhuo Wang <zhuo.wang@amlogic.com>
drivers/net/phy/realtek.c

index 9cbe645..70c4f2e 100644 (file)
@@ -113,6 +113,17 @@ static int rtl8211f_config_init(struct phy_device *phydev)
                reg &= ~RTL8211F_TX_DELAY;
 
        phy_write(phydev, 0x11, reg);
+#ifdef CONFIG_AMLOGIC_ETH_PRIVE
+       /*disable clk_out pin 35 set page 0x0a43 reg25.0 as 0*/
+       phy_write(phydev, RTL8211F_PAGE_SELECT, 0x0a43);
+       reg = phy_read(phydev, 0x19);
+       /*set reg25 bit0 as 0*/
+       reg = phy_write(phydev, 0x19, reg & 0xfffe);
+       /* switch to page 0 */
+       phy_write(phydev, RTL8211F_PAGE_SELECT, 0x0);
+       /*reset phy to apply*/
+       reg = phy_write(phydev, 0x0, 0x9200);
+#endif
        /* restore to default page 0 */
        phy_write(phydev, RTL8211F_PAGE_SELECT, 0x0);