RK3288+RTL8201F-VB-CG网卡芯片,kernel3.10配置问题?

建成OS 2019-05-15 02:44:31
源码版本是android5.1的,内核是3.10版本的,原厂box的SDK

看RTL8201F的规格书说是10M/100M的支持

然后看内核中项目用到的dts:

&gmac {
// pmu_regulator = "act_ldo5";
// pmu_enable_level = <1>; //1->HIGH, 0->LOW
// power-gpio = <&gpio0 GPIO_A6 GPIO_ACTIVE_HIGH>;
reset-gpio = <&gpio4 GPIO_B0 GPIO_ACTIVE_LOW>;
phy-mode = "rgmii";
clock_in_out = "input";
tx_delay = <0x30>;
rx_delay = <0x10>;
};

根据原理图改成了:
&gmac {
// pmu_regulator = "act_ldo5";
// pmu_enable_level = <1>; //1->HIGH, 0->LOW
power-gpio = <&gpio1 GPIO_D0 GPIO_ACTIVE_HIGH>;
reset-gpio = <&gpio4 GPIO_B0 GPIO_ACTIVE_LOW>;
phy-mode = "rmii"; //rgmii
clock_in_out = "input";
tx_delay = <0x30>;
rx_delay = <0x10>;
};

RMII的Clock设置为input形式,得到的输出log片段:
[ 1.048658] SCSI Media Changer driver v0.25
[ 1.048939] tun: Universal TUN/TAP device driver, 1.6
[ 1.048955] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[ 1.049069] vmac_init.
[ 1.049590] stmmac_probe_config_dt: Can not read property: pmu_regulator.
[ 1.049609] stmmac_probe_config_dt: clock input/output? (input).
[ 1.049624] stmmac_probe_config_dt: TX delay(0x30).
[ 1.049637] stmmac_probe_config_dt: RX delay(0x10).
[ 1.049686] stmmac_probe_config_dt: is rockchip,rk3288-gmac
[ 1.049699] stmmc_pltfr_init:
[ 1.049718] stmmc_pltfr_init: init for RMII
[ 1.050154] stmmac - user ID: 0x10, Synopsys ID: 0x35
[ 1.050167] Normal descriptors
[ 1.050177] Ring mode enabled
[ 1.050188] DMA HW capability register supported
[ 1.050201] RX Checksum Offload Engine supported (type 2)
[ 1.050214] TX Checksum insertion supported
[ 1.050224] Wake-Up On Lan supported
[ 1.050261] Enable RX Mitigation via HW Watchdog Timer
[ 1.050663] PPP generic driver version 2.4.2
[ 1.050797] PPP BSD Compression module registered
[ 1.050812] PPP Deflate Compression module registered
[ 1.050834] PPP MPPE Compression module registered
[ 1.050848] NET: Registered protocol family 24
[ 1.050880] SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256) (6 bit encapsulation enabled).

[ 46.022695] phy_power_on: enable = 1
[ 46.062118] Read the Ethernet MAC address from IDB:00:00:00:00:00:00
[ 46.062163] eth0: device MAC address 32:75:5b:2d:c9:9b
[ 46.064612] libphy: stmmac: probed
[ 46.064626] eth0: PHY ID 001cc816 at 0 IRQ 0 (stmmac-0:00) active
[ 46.064636] eth0: PHY ID 001cc816 at 1 IRQ 0 (stmmac-0:01) active
[ 46.164089] stmmac_open: DMA initialization failed

如果Clock改成以output形式,得到的log片段:
[ 0.996533] vmac_init.
[ 0.997062] stmmac_probe_config_dt: Can not read property: pmu_regulator.
[ 0.997081] stmmac_probe_config_dt: clock input/output? (output).
[ 0.997096] stmmac_probe_config_dt: TX delay(0x30).
[ 0.997109] stmmac_probe_config_dt: RX delay(0x10).
[ 0.997160] stmmac_probe_config_dt: is rockchip,rk3288-gmac
[ 0.997172] stmmc_pltfr_init:
[ 0.997193] stmmc_pltfr_init: init for RMII
[ 0.997641] stmmac - user ID: 0x10, Synopsys ID: 0x35
[ 0.997654] Normal descriptors
[ 0.997664] Ring mode enabled
[ 0.997675] DMA HW capability register supported
[ 0.997688] RX Checksum Offload Engine supported (type 2)
[ 0.997701] TX Checksum insertion supported
[ 0.997712] Wake-Up On Lan supported
[ 0.997748] Enable RX Mitigation via HW Watchdog Timer
[ 0.998144] PPP generic driver version 2.4.2
[ 0.998284] PPP BSD Compression module registered
[ 0.998300] PPP Deflate Compression module registered
[ 0.998321] PPP MPPE Compression module registered
[ 0.998336] NET: Registered protocol family 24
[ 0.998368] SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256) (6 bit encapsulation enabled).

[ 10.014371] phy_power_on: enable = 1
[ 10.042418] android_usb gadget: high-speed config #1: android
[ 10.042744] android_work: sent uevent USB_STATE=CONFIGURED
[ 10.053832] Read the Ethernet MAC address from IDB:00:00:00:00:00:00
[ 10.053880] eth0: device MAC address 5a:7e:9a:88:22:dd
[ 10.056320] libphy: stmmac: probed
[ 10.056334] eth0: PHY ID 001cc816 at 0 IRQ 0 (stmmac-0:00) active
[ 10.056344] eth0: PHY ID 001cc816 at 1 IRQ 0 (stmmac-0:01) active

[ 12.020981] stmmc_pltfr_fix_mac_speed: fix speed to 100
[ 12.021013] stmmc_pltfr_fix_mac_speed: fix speed for RMII
[ 12.021025] libphy: stmmac-0:01 - Link is Up - 100/Full

开关系统里的Ethernet按钮,得到:
[ 151.506823] phy_power_on: enable = 0
[ 155.787585] phy_power_on: enable = 1
[ 155.830956] eth0: device MAC address 5a:7e:9a:88:22:dd
[ 155.847032] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 157.790809] stmmc_pltfr_fix_mac_speed: fix speed to 100
[ 157.790874] stmmc_pltfr_fix_mac_speed: fix speed for RMII
[ 157.790907] libphy: stmmac-0:01 - Link is Up - 100/Full
[ 157.790973] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

不知道有没有人知道,还有哪里要改的?
...全文
1363 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
建成OS 2019-05-24
  • 打赏
  • 举报
回复
引用 1 楼 枫叶会再红吗 的回复:
3288芯片 rk建议的是配成input,stmmac_open: DMA initialization failed,看下频率配对了没,硬件量下clk。


谢谢回复,现在配成input可以了,PHY也能初始化成功,但是和之前配置成output一样,自动获取不到IP地址
linuxdog2 2022-01-16
  • 举报
回复
@建成OS 我现在也遇到这个问题!
建成OS 2019-05-20
  • 打赏
  • 举报
回复
引用 1 楼 枫叶会再红吗 的回复:
3288芯片 rk建议的是配成input,stmmac_open: DMA initialization failed,看下频率配对了没,硬件量下clk。


clock-frequency我配的50M,
input的时候,硬件量PHY是没有clock出来的,不知道怎么回事
枫叶会再红吗 2019-05-17
  • 打赏
  • 举报
回复
3288芯片 rk建议的是配成input,stmmac_open: DMA initialization failed,看下频率配对了没,硬件量下clk。

4,436

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧