使用PX30,现在调测网口,网口不通。使用的PHY芯片没有时钟能力,是PX30提供的时钟。DTS配置如下:
版本发布的px30.dtsi中的内容:
gmac: ethernet@ff360000 {
compatible = "rockchip,px30-gmac";
reg = <0x0 0xff360000 0x0 0x10000>;
interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "macirq";
clocks = <&cru SCLK_GMAC>, <&cru SCLK_GMAC_RX_TX>,
<&cru SCLK_GMAC_RX_TX>, <&cru SCLK_MAC_REF>,
<&cru SCLK_MAC_REFOUT>, <&cru ACLK_GMAC>,
<&cru PCLK_GMAC>, <&cru SCLK_GMAC_RMII>;
clock-names = "stmmaceth", "mac_clk_rx",
"mac_clk_tx", "clk_mac_ref",
"clk_mac_refout", "aclk_mac",
"pclk_mac", "clk_mac_speed";
rockchip,grf = <&grf>;
phy-mode = "rmii";
pinctrl-names = "default";
pinctrl-0 = <&rmii_pins &mac_refclk_12ma>;
power-domains = <&power PX30_PD_GMAC>;
resets = <&cru SRST_GMAC_A>;
reset-names = "stmmaceth";
status = "disabled";
};
下面是自己定义的gmac内容:
&gmac {
phy-supply = <&vcc_3v0>;
clock_in_out = "output";
snps,reset-gpio = <&gpio2 13 GPIO_ACTIVE_LOW>;
snps,reset-active-low;
snps,reset-delays-us = <0 50000 50000>;
assigned-clocks = <&cru SCLK_GMAC>;
assigned-clock-rates = <50000000>;
tx_delay = <0x30>;
rx_delay = <0x10>;
status = "okay";
};
PHY芯片的电压、时钟测量都是正确的,MDIO上有波形,但是MDC无波形。串口打印有一个“cannot get clock clk_mac_refout”错误,具体网口相关打印如下:
[ 1.972939] rk_gmac-dwmac ff360000.ethernet: IRQ eth_wake_irq not found
[ 1.973556] rk_gmac-dwmac ff360000.ethernet: IRQ eth_lpi not found
[ 1.974411] rk_gmac-dwmac ff360000.ethernet: PTP uses main clock
[ 1.975475] rk_gmac-dwmac ff360000.ethernet: clock input or output? (output).
[ 1.976167] rk_gmac-dwmac ff360000.ethernet: TX delay(0x30).
[ 1.976688] rk_gmac-dwmac ff360000.ethernet: RX delay(0x10).
[ 1.977253] rk_gmac-dwmac ff360000.ethernet: integrated PHY? (no).
[ 1.977995] rk_gmac-dwmac ff360000.ethernet: cannot get clock clk_mac_refout
[ 1.978980] rk_gmac-dwmac ff360000.ethernet: init for RMII
[ 1.980044] rk_gmac-dwmac ff360000.ethernet: User ID: 0x10, Synopsys ID: 0x35
[ 1.980698] rk_gmac-dwmac ff360000.ethernet: DWMAC1000
[ 1.981226] rk_gmac-dwmac ff360000.ethernet: DMA HW capability register supported
[ 1.981930] rk_gmac-dwmac ff360000.ethernet: RX Checksum Offload Engine supported
[ 1.982606] rk_gmac-dwmac ff360000.ethernet: COE Type 2
[ 1.983115] rk_gmac-dwmac ff360000.ethernet: TX Checksum insertion supported
[ 1.983756] rk_gmac-dwmac ff360000.ethernet: Wake-Up On Lan supported
[ 1.984550] rk_gmac-dwmac ff360000.ethernet: Normal descriptors
[ 1.985122] rk_gmac-dwmac ff360000.ethernet: Ring mode enabled
[ 1.985652] rk_gmac-dwmac ff360000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 2.103284] mdio_bus stmmac-0:00: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:00, irq=POLL)
[ 2.104197] mdio_bus stmmac-0:01: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:01, irq=POLL)
请各位专家帮忙分析下,是那个地方配置错误了吗?谢谢!