imx8mp eqos can not ping in uboot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx8mp eqos can not ping in uboot

136 Views
JasonShu
Contributor II
 

Hi NXP Technical Team

1. The device information can be displayed, but cannot ping the network.

2. Using a direct connection method, the PC shows that the network is not recognized.

3. How should I investigate next?

Spoiler
------uboot  ./imx8mp-evk.dts:

&eqos {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_eqos>;
phy-mode = "rmii";
phy-handle = <&ethphy0>;
status = "okay";
max-speed = <100>;

snps,rmii_refclk_ext;

mdio {
compatible = "fsl,imx-eqos";
#address-cells = <1>;
#size-cells = <0>;

ethphy0: ethernet-phy@1 {
compatible = "NatSemi DP83848";
reg = <1>;
eee-broken-1000t;
};
};
};

pinctrl_eqos: eqosgrp {
fsl,pins = <
MX8MP_IOMUXC_ENET_MDC__ENET_QOS_MDC 0x2
MX8MP_IOMUXC_ENET_MDIO__ENET_QOS_MDIO 0x2
MX8MP_IOMUXC_ENET_RD0__ENET_QOS_RGMII_RD0 0x90
MX8MP_IOMUXC_ENET_RD1__ENET_QOS_RGMII_RD1 0x90
MX8MP_IOMUXC_ENET_TD2__CCM_ENET_QOS_CLOCK_GENERATE_REF_CLK 0x40000016
/*MX8MP_IOMUXC_ENET_TD2__CCM_ENET_QOS_CLOCK_GENERATE_REF_CLK 0x91*/
MX8MP_IOMUXC_ENET_TX_CTL__ENET_QOS_RGMII_TX_CTL 0x16
MX8MP_IOMUXC_ENET_RX_CTL__ENET_QOS_RGMII_RX_CTL 0x90
MX8MP_IOMUXC_ENET_TD0__ENET_QOS_RGMII_TD0 0x16
MX8MP_IOMUXC_ENET_TD1__ENET_QOS_RGMII_TD1 0x16
MX8MP_IOMUXC_ENET_RXC__ENET_QOS_RX_ER 0x90
MX8MP_IOMUXC_GPIO1_IO12__GPIO1_IO12 0x16
>;
};


------imx8mp.dtsi:
eqos: ethernet@30bf0000 {
compatible = "nxp,imx8mp-dwmac-eqos", "snps,dwmac-5.10a";
reg = <0x30bf0000 0x10000>;
interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "eth_wake_irq", "macirq";
clocks = <&clk IMX8MP_CLK_ENET_QOS_ROOT>,
<&clk IMX8MP_CLK_QOS_ENET_ROOT>,
<&clk IMX8MP_CLK_ENET_QOS_TIMER>,
<&clk IMX8MP_CLK_ENET_QOS>;
clock-names = "stmmaceth", "pclk", "ptp_ref", "tx";
assigned-clocks = <&clk IMX8MP_CLK_ENET_AXI>,
<&clk IMX8MP_CLK_ENET_QOS_TIMER>,
<&clk IMX8MP_CLK_ENET_QOS>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>,
<&clk IMX8MP_SYS_PLL2_100M>,
<&clk IMX8MP_SYS_PLL2_50M>;
assigned-clock-rates = <0>, <100000000>, <50000000>; // reconfigured to 50 MHz for RMII
intf_mode = <&gpr 0x4>;
status = "disabled";
};
};


------imx8mp_evk.c:

static int setup_eqos(void)
{
struct iomuxc_gpr_base_regs *gpr =
(struct iomuxc_gpr_base_regs *)IOMUXC_GPR_BASE_ADDR;

setup_iomux_eqos();


clrsetbits_le32(&gpr->gpr[1], IOMUXC_GPR_GPR1_GPR_ENET_QOS_INTF_SEL_MASK, BIT(18));

setbits_le32(&gpr->gpr[1], BIT(19)|BIT(20));

return set_clk_eqos(ENET_50MHZ);
}

------logs:
u-boot=> mii dump 1
0. (3100) -- PHY control register --
(8000:0000) 0.15 = 0 reset
(4000:0000) 0.14 = 0 loopback
(2040:2000) 0. 6,13 = b01 speed selection = 100 Mbps
(1000:1000) 0.12 = 1 A/N enable
(0800:0000) 0.11 = 0 power-down
(0400:0000) 0.10 = 0 isolate
(0200:0000) 0. 9 = 0 restart A/N
(0100:0100) 0. 8 = 1 duplex = full
(0080:0000) 0. 7 = 0 collision test enable
(003f:0000) 0. 5- 0 = 0 (reserved)


u-boot=> ping 192.168.1.3
phy_connect
get_phy_id
phy_device_create
phy_id is 536894608
phy_config
genphy_config_aneg
result is 1
phy_startup
dp83848_startup
ethernet@30bf0000 Waiting for PHY auto negotiation to complete..... done
Using ethernet@30bf0000 device

ARP Retry count exceeded; starting again
ping failed; host 192.168.1.3 is not alive

 

Best Regards

Jason

0 Kudos
1 Reply

106 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Thank you for your interest in NXP Semiconductor products,

This is replied in the following thread.

Regards

0 Kudos