I am working on a imx8mp based custom board. I am using single ethernet of eqos port and KSZ9131 ethernet Phy. I have disabled feos and configured eqos RGMI interface as per our schematic design.
&eqos {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_eqos>;
phy-mode = "rgmii-id";
phy-handle = <ðphy0>;
status = "okay";
mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;
ethphy0: ethernet-phy@3 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <3>;
eee-broken-1000t;
reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
reset-assert-us = <10000>;
reset-deassert-us = <80000>;
};
};
};
&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec>;
phy-mode = "rgmii-id";
phy-handle = <ðphy1>;
fsl,magic-packet;
status = "disabled";
mdio {
#address-cells = <1>;
#size-cells = <0>;
ethphy1: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
eee-broken-1000t;
reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
reset-assert-us = <10000>;
reset-deassert-us = <80000>;
realtek,aldps-enable;
realtek,clkout-disable;
};
};
};
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_RD2__ENET_QOS_RGMII_RD2 0x90
MX8MP_IOMUXC_ENET_RD3__ENET_QOS_RGMII_RD3 0x90
MX8MP_IOMUXC_ENET_RXC__CCM_ENET_QOS_CLOCK_GENERATE_RX_CLK 0x90
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_TD2__ENET_QOS_RGMII_TD2 0x16
MX8MP_IOMUXC_ENET_TD3__ENET_QOS_RGMII_TD3 0x16
MX8MP_IOMUXC_ENET_TX_CTL__ENET_QOS_RGMII_TX_CTL 0x16
MX8MP_IOMUXC_ENET_TXC__CCM_ENET_QOS_CLOCK_GENERATE_TX_CLK 0x16
MX8MP_IOMUXC_SAI2_RXC__GPIO4_IO22 0x10
>;
};
pinctrl_fec: fecgrp {
fsl,pins = <
MX8MP_IOMUXC_SAI1_RXD2__ENET1_MDC 0x2
MX8MP_IOMUXC_SAI1_RXD3__ENET1_MDIO 0x2
MX8MP_IOMUXC_SAI1_RXD4__ENET1_RGMII_RD0 0x90
MX8MP_IOMUXC_SAI1_RXD5__ENET1_RGMII_RD1 0x90
MX8MP_IOMUXC_SAI1_RXD6__ENET1_RGMII_RD2 0x90
MX8MP_IOMUXC_SAI1_RXD7__ENET1_RGMII_RD3 0x90
MX8MP_IOMUXC_SAI1_TXC__ENET1_RGMII_RXC 0x90
MX8MP_IOMUXC_SAI1_TXFS__ENET1_RGMII_RX_CTL 0x90
MX8MP_IOMUXC_SAI1_TXD0__ENET1_RGMII_TD0 0x16
MX8MP_IOMUXC_SAI1_TXD1__ENET1_RGMII_TD1 0x16
MX8MP_IOMUXC_SAI1_TXD2__ENET1_RGMII_TD2 0x16
MX8MP_IOMUXC_SAI1_TXD3__ENET1_RGMII_TD3 0x16
MX8MP_IOMUXC_SAI1_TXD4__ENET1_RGMII_TX_CTL 0x16
MX8MP_IOMUXC_SAI1_TXD5__ENET1_RGMII_TXC 0x16
MX8MP_IOMUXC_SAI1_RXD0__GPIO4_IO02 0x10
>;
};
I am facing an issue that the board sometimes gets an IP address and sometimes doesnot get IP. When I checked dmesg, I found that sometimes the ethernet link goes up and down continuously and getting below logs.
[ 1603.431182] 8021q: adding VLAN 0 to HW filter on device eth0
[ 1603.431215] imx-dwmac 30bf0000.ethernet eth0: Timeout accessing MAC_VLAN_Tag_Filter
[ 1606.495340] imx-dwmac 30bf0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 1611.997123] imx-dwmac 30bf0000.ethernet eth0: Reset adapter.
[ 1612.018437] imx-dwmac 30bf0000.ethernet eth0: FPE workqueue stop
[ 1612.021049] imx-dwmac 30bf0000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 1612.172780] imx-dwmac 30bf0000.ethernet eth0: PHY [stmmac-1:03] driver [Microchip KSZ9131 Gigabit PHY] (irq=POLL)
[ 1612.172817] imx-dwmac 30bf0000.ethernet eth0: No Safety Features support found
[ 1612.376691] imx-dwmac 30bf0000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[ 1612.377609] imx-dwmac 30bf0000.ethernet eth0: registered PTP clock
[ 1612.377777] imx-dwmac 30bf0000.ethernet eth0: FPE workqueue start
[ 1612.377785] imx-dwmac 30bf0000.ethernet eth0: configuring for phy/rgmii-id link mode
[ 1612.380276] 8021q: adding VLAN 0 to HW filter on device eth0
[ 1612.380312] imx-dwmac 30bf0000.ethernet eth0: Timeout accessing MAC_VLAN_Tag_Filter
[ 1615.455292] imx-dwmac 30bf0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 1620.961118] imx-dwmac 30bf0000.ethernet eth0: Reset adapter.
[ 1620.973075] imx-dwmac 30bf0000.ethernet eth0: FPE workqueue stop
[ 1620.978104] imx-dwmac 30bf0000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 1621.124776] imx-dwmac 30bf0000.ethernet eth0: PHY [stmmac-1:03] driver [Microchip KSZ9131 Gigabit PHY] (irq=POLL)
[ 1621.124814] imx-dwmac 30bf0000.ethernet eth0: No Safety Features support found
[ 1621.328999] imx-dwmac 30bf0000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[ 1621.329195] imx-dwmac 30bf0000.ethernet eth0: registered PTP clock
[ 1621.329503] imx-dwmac 30bf0000.ethernet eth0: FPE workqueue start
[ 1621.329512] imx-dwmac 30bf0000.ethernet eth0: configuring for phy/rgmii-id link mode
[ 1621.332051] 8021q: adding VLAN 0 to HW filter on device eth0
[ 1621.332085] imx-dwmac 30bf0000.ethernet eth0: Timeout accessing MAC_VLAN_Tag_Filter
[ 1624.415398] imx-dwmac 30bf0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 1629.917111] imx-dwmac 30bf0000.ethernet eth0: Reset adapter.
[ 1629.933853] imx-dwmac 30bf0000.ethernet eth0: FPE workqueue stop
[ 1629.937071] imx-dwmac 30bf0000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[ 1630.088780] imx-dwmac 30bf0000.ethernet eth0: PHY [stmmac-1:03] driver [Microchip KSZ9131 Gigabit PHY] (irq=POLL)
[ 1630.088817] imx-dwmac 30bf0000.ethernet eth0: No Safety Features support found
[ 1630.292783] imx-dwmac 30bf0000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[ 1630.293269] imx-dwmac 30bf0000.ethernet eth0: registered PTP clock
[ 1630.293429] imx-dwmac 30bf0000.ethernet eth0: FPE workqueue start
[ 1630.293438] imx-dwmac 30bf0000.ethernet eth0: configuring for phy/rgmii-id link mode
[ 1630.295842] 8021q: adding VLAN 0 to HW filter on device eth0
[ 1630.295875] imx-dwmac 30bf0000.ethernet eth0: Timeout accessing MAC_VLAN_Tag_Filter
[ 1633.379042] imx-dwmac 30bf0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off




I have disabled TSN as guided in https://www.nxp.com/design/design-center/software/development-software/real-time-edge-software:REALT...
I also try to disable VLAN Filtering, still getting the same issue. Sometimes reducing speed by "ethtool -s eth0 speed 100" works but not all times.
Can someone help me to understand the debug the issue.