RK3568默认是千兆网口,我们需要改为百兆网口,芯片采用Micrel的百兆网口。
百兆网口驱动,根据我的资源文件,Rockchip-Developer-Guide-Linux-GMAC-CN
配置DTS后,发现网口还存在一些问题。ifconfig down , ifconfig up后,就不正常。
通过查看PHY寄存器地址:可以看出哪些值不对
cat /sys/bus/mdio_bus/devices/stmmac-0\:01/phy_registers
root# cat /sys/bus/mdio_bus/devices/stmmac-0\:01/phy_registers
0: 0x3100
1: 0x7849
2: 0x22
3: 0x1560
4: 0x8de1
5: 0x0
6: 0x4
7: 0x2001
8: 0x0
9: 0x0
10: 0x0
11: 0x0
12: 0x0
13: 0x0
14: 0x0
15: 0x0
16: 0x0
17: 0x0
18: 0x0
19: 0x0
20: 0x0
21: 0x0
22: 0x202
23: 0x3c02
24: 0x801
25: 0x7777
26: 0x7777
27: 0x0
28: 0x0
29: 0x0
30: 0x0
31: 0x8180
这是调试正常的网口了。
改的驱动部分./drivers/net/phy/micrel.c文件,使能这个块代码,时钟频率需要50MHz。
/* Support legacy board-file configuration */
if (phydev->dev_flags & MICREL_PHY_50MHZ_CLK) {
priv->rmii_ref_clk_sel = true;
priv->rmii_ref_clk_sel_val = true;
}
文章讲述了如何将RK3568的默认千兆网口修改为百兆,涉及驱动配置、DTS调整以及使用PHY寄存器检查和Micrel百兆网口的相关代码,特别强调了50MHz时钟频率的设置。
2710

被折叠的 条评论
为什么被折叠?



