1.修改代码路径
/home/salesdmcf/works/SDK/Linux/kernel/drivers/net/phy/realtek.c
static int phy_rtl8211f_led_fixup(struct phy_device *phydev)
{
u32 val, val2;
printk("lyc-----> in : %s\n", __func__);
/*set led1(green) Link 10/100/1000M, and set led2(yellow) Link 10/100/1000M+Active*/
val = phy_read_paged(phydev, LCR_PAGE_SELECT,RTL_8211F_LCR_ADDR);
val |= (1<<5);
val |= (1<<8);
val &= (~(1<<9));
val |= (1<<10);
val |= (1<<11);
phy_write_paged(phydev, LCR_PAGE_SELECT,RTL_8211F_LCR_ADDR, val);
/*set led1(green) EEE LED function disabled so it can keep on when linked*/
val2 = phy_read_paged(phydev, LCR_PAGE_SELECT,RTL_8211F_EEELCR_ADDR);
val2 &= (~(1<<2));
phy_write_paged(phydev,LCR_PAGE_SELECT, RTL_8211F_EEELCR_ADDR, val2);
return 0;
}
2.参考
https://blog.csdn.net/weixin_46396932/article/details/142746435
https://www.ebaina.com/articles/140000016859
标签:led,val,RTL8211F,rK3568,phydev,phy,val2,LCR,SELECT From: https://www.cnblogs.com/loongson-artc-lyc/p/18674973