immortalwrt/target/linux/rockchip/patches-6.1/601-net-phy-motorcomm-add-LED-configuration-for-yt8521.patch

17 lines
521 B
Diff
Raw Normal View History

--- a/drivers/net/phy/motorcomm.c
+++ b/drivers/net/phy/motorcomm.c
@@ -1487,6 +1487,13 @@ static int yt8521_config_init(struct phy
if (ret < 0)
goto err_restore_page;
}
+
+ /* LED0: Unused/Off, LED1: Link, LED2: Activity, 8Hz */
+ ytphy_write_ext(phydev, 0xa00b, 0xe004);
+ ytphy_write_ext(phydev, 0xa00c, 0);
+ ytphy_write_ext(phydev, 0xa00d, 0x2600);
+ ytphy_write_ext(phydev, 0xa00e, 0x0070);
+ ytphy_write_ext(phydev, 0xa00f, 0x000a);
err_restore_page:
return phy_restore_page(phydev, old_page, ret);
}