Using ksz9131 phy on imx8mplus and kernel tag:lf-5.10.35-2.0.0

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

Using ksz9131 phy on imx8mplus and kernel tag:lf-5.10.35-2.0.0

4,082 Views
rayLei
Contributor I

on kernel lf-5.10.35-2.0.0. Using ksz9131 phy error:

[ 5.863248] imx-dwmac 30bf0000.ethernet eth0: PHY [stmmac-1:02] driver [Microchip KSZ9131 Gigabit PHY] (irq=POLL)
[ 6.880650] imx-dwmac 30bf0000.ethernet: Failed to reset the dma
[ 6.886683] imx-dwmac 30bf0000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
[ 6.895405] imx-dwmac 30bf0000.ethernet eth0: stmmac_open: Hw setup failed

Schematic diagram:

ksz9131.png

Device tree:

&eqos {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_eqos>;
phy-mode = "rgmii-id";
phy-handle = <&ethphy0>;

snps,reset-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
/* snps,reset-active-low; */
snps,reset-delays-us = <0 10000 50000>;

status = "okay";

mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;

phy-reset-post-delay = <150>;
phy-reset-duration = <10>;
ethphy0: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <2>;
eee-broken-1000t;
rxc-dll-2ns = <1>;
txc-dll-2ns = <1>;
};
};
};

pinctrl_eqos: eqosgrp {
fsl,pins = <
MX8MP_IOMUXC_ENET_MDC__ENET_QOS_MDC 0x3
MX8MP_IOMUXC_ENET_MDIO__ENET_QOS_MDIO 0x3
MX8MP_IOMUXC_ENET_RD0__ENET_QOS_RGMII_RD0 0x91
MX8MP_IOMUXC_ENET_RD1__ENET_QOS_RGMII_RD1 0x91
MX8MP_IOMUXC_ENET_RD2__ENET_QOS_RGMII_RD2 0x91
MX8MP_IOMUXC_ENET_RD3__ENET_QOS_RGMII_RD3 0x91
MX8MP_IOMUXC_ENET_RXC__CCM_ENET_QOS_CLOCK_GENERATE_RX_CLK 0x91
MX8MP_IOMUXC_ENET_RX_CTL__ENET_QOS_RGMII_RX_CTL 0x91
MX8MP_IOMUXC_ENET_TD0__ENET_QOS_RGMII_TD0 0x1f
MX8MP_IOMUXC_ENET_TD1__ENET_QOS_RGMII_TD1 0x1f
MX8MP_IOMUXC_ENET_TD2__ENET_QOS_RGMII_TD2 0x1f
MX8MP_IOMUXC_ENET_TD3__ENET_QOS_RGMII_TD3 0x1f
MX8MP_IOMUXC_ENET_TX_CTL__ENET_QOS_RGMII_TX_CTL 0x1f
MX8MP_IOMUXC_ENET_TXC__CCM_ENET_QOS_CLOCK_GENERATE_TX_CLK 0x1f
>;
};

0 Kudos
5 Replies

3,727 Views
rizwan_s
Contributor II

Hi rayLei,

I have a similar issue

ethernet: Failed to reset the dma

ethernet eth0: stmmac_hw_setup: DMA engine initialization failed.

 

Are you able to solve this issue,Please reply.

 

0 Kudos

3,721 Views
rayLei
Contributor I

I solved this issue.

(1) for clock and pin configure

(2)voltage changer  mismatch。

in voltage changer datasheet:

rayLei_0-1647500472287.png

 

0 Kudos

2,680 Views
changbaoma
Contributor III

您好, @rayLei 

您可以在您的板子上帮忙确认eqos +ksz9131网卡在10M速率下能否工作正常。

您可以使用以下命令强制板子的eqos 网卡为10M:

# ethtool -s eth1 speed 10 duplex full autoneg on  (注意ethx 要对于eqos 网卡)

或者修改对端网卡为10M

 

这是我遇到的问题:https://community.nxp.com/t5/i-MX-Processors/i-MX8MP-ethernet-eqos-ksz9131-can-link-but-ping-fail-at...

 

提前感谢!

0 Kudos

3,716 Views
rizwan_s
Contributor II

Hi rayLei ,

 clock is internal so "snps,rmii_refclk_ext;" is not needed in dts .

Changing to rmii also does not solve the issue.

Thanking you

Tags (1)
0 Kudos