RGMII - LAN8870 for Automotive Ethernet - Verdin IMX8MP

Hello,

I would like to kindly ask for some support to get the LAN8870 working with the Toradex Verdin IMX8MP SoM.

We have designed a custom carrier board with the Toradex IMX8MP SoM and connected the LAN8870 via RGMII.
I have used the driver from lan887x_linux/sources/5.15.75 at main · microchip-ung/lan887x_linux · GitHub and for testing I am using a Automotive Ethernet 100/1000t1 to RJ45/100/1000 base converter (SE1001 pro). I am testing with a connection to a router or laptop (static ip). I can establish a phy to phy connection but it seems that the mac-phy connection is not working properly. There is no delay in the traces (hardware delay) for the rgmii.

Please see the following logs:

Supported ports: [ TP ]
Supported link modes: 100baseT1/Full
1000baseT1/Full
Supported pause frame use: No
Supports auto-negotiation: No
Supported FEC modes: Not reported
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: off
master-slave cfg: forced master
master-slave status: master
Port: Twisted Pair
PHYAD: 3
Transceiver: external
MDI-X: Unknown
netlink error: Operation not permitted
Link detected: no

ethtool --phy-statistics ethernet1
PHY statistics:
TX Good Count: 0
RX Good Count: 536
RX ERR Count detected by PCS: 0
TX CRC ERR Count: 86
RX CRC ERR Count: 0
RX ERR Count for SGMII MII2GMII: 0

ethtool -S ethernet1
NIC statistics:
tx_dropped: 0
tx_packets: 46
tx_broadcast: 3
tx_multicast: 43
tx_crc_errors: 0
tx_undersize: 0
tx_oversize: 0
tx_fragment: 0
tx_jabber: 0
tx_collision: 0
tx_64byte: 3
tx_65to127byte: 24
tx_128to255byte: 19
tx_256to511byte: 0
tx_512to1023byte: 0
tx_1024to2047byte: 0
tx_GTE2048byte: 0
tx_octets: 5882
IEEE_tx_drop: 0
IEEE_tx_frame_ok: 46
IEEE_tx_1col: 0
IEEE_tx_mcol: 0
IEEE_tx_def: 0
IEEE_tx_lcol: 0
IEEE_tx_excol: 0
IEEE_tx_macerr: 0
IEEE_tx_cserr: 0
IEEE_tx_sqe: 0
IEEE_tx_fdxfc: 0
IEEE_tx_octets_ok: 5882
rx_packets: 291
rx_broadcast: 122
rx_multicast: 169
rx_crc_errors: 0
rx_undersize: 0
rx_oversize: 0
rx_fragment: 0
rx_jabber: 0
rx_64byte: 1
rx_65to127byte: 136
rx_128to255byte: 52
rx_256to511byte: 95
rx_512to1023byte: 7
rx_1024to2047byte: 0
rx_GTE2048byte: 0
rx_octets: 59088
IEEE_rx_drop: 0
IEEE_rx_frame_ok: 291
IEEE_rx_crc: 0
IEEE_rx_align: 0
IEEE_rx_macerr: 0
IEEE_rx_fdxfc: 0
IEEE_rx_octets_ok: 59088

Device Tree Overlay:

/dts-v1/;
/plugin/;

#include <dt-bindings/interrupt-controller/irq.h>

/ {
compatible = “toradex,verdin-imx8mp”;
};
/* Enable FEC and point it to the new PHY */
&fec {
status = “okay”;
phy-mode = “rgmii-id”;
phy-handle = <&ethphy_fixed3>;
};

/* Disable the old PHY (the one at @7 in the base tree) */
&ethphy1 {
status = “disabled”;
};

/* Create the new PHY node at address 3 under the same MDIO bus */
&fec {
mdio {
ethphy_fixed3: ethernet-phy@3 {
/*compatible = “ethernet-phy-id0007.c1f2”;
compatible = “ethernet-phy-ieee802.3-c45”, “microchip,lan8870”;
reg = <3>;

        /*interrupt-parent = <&gpio4>; */
        interrupts = <18 IRQ_TYPE_LEVEL_LOW>; 

        /*micrel,led-mode = <0>;*/

        status = "okay";
        
    };
};

};


Software summary

Bootloader: U-Boot

Kernel version: 5.15.177-6.8.2+git.5a6602cc6c32 #1-TorizonCore SMP PREEMPT Fri Mar 21 16:22:58 UTC 2025
Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/1225da7c87abaa609c52ac2f403379c0315a4702d58817f20248163a60aa7e85/0
Distro name: NAME=“TorizonCore”
Distro version: VERSION_ID=6.8.2-build.30
Distro variant: VARIANT=“Docker”
Hostname: verdin-imx8mp-08652330

Hardware info

HW model: Toradex Verdin iMX8M Plus on Mallow Board
Toradex version: 0063 V1.1B
Serial number: 08652330
Processor arch: aarch64

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I can help you troubleshoot the LAN8870 RGMII connection on your Verdin iMX8M Plus SoM. Based on your logs showing TX CRC errors (86) and “Link detected: no”, there appear to be MAC-PHY communication issues.

Ethernet Interface Configuration on Torizon OS

Torizon OS uses specific ethernet interface naming conventions where Ethernet interfaces are always named ethernetX, being X a number starting from 0, for instance, ethernet0, ethernet1 and so on(1).

Device Tree Overlay Analysis

Your device tree overlay configuration needs some adjustments. Here’s what I recommend based on Toradex documentation:

1. Device Tree Overlay Structure

Your overlay follows the correct basic syntax for Torizon OS(2). The overlay should include:

/dts-v1/;
/plugin/;

/ {
    compatible = "toradex,verdin-imx8mp";
};

(3)

2. RGMII Configuration Issues

The main issue appears to be in your RGMII timing configuration. You’re using phy-mode = "rgmii-id" which enables delays on both TX and RX. Since you mentioned “There is no delay in the traces (hardware delay) for the rgmii”, this suggests your hardware doesn’t provide the required delays.

3. Recommended Device Tree Overlay Modifications

Based on Toradex documentation for device tree overlays(2), consider these modifications:

  1. Verify PHY Address: Ensure the PHY is actually at address 3 on the MDIO bus

  2. Check RGMII Mode: Try different RGMII modes:

    • rgmii (no delays)
    • rgmii-txid (TX delay only)
    • rgmii-rxid (RX delay only)
    • rgmii-id (both delays - your current setting)
  3. Interrupt Configuration: Your interrupt configuration seems incomplete. Ensure the interrupt parent is correctly specified.

Deployment and Testing

To deploy your device tree overlay on Torizon OS, you can use TorizonCore Builder(3). For quick testing during development, you can use:

$ torizoncore-builder dto deploy --remote-host <your_ip> --remote-username torizon --remote-password torizon --force --reboot <your_overlay.dts>

(3)

Network Configuration

Once the PHY link is established, you can configure the network interface using NetworkManager commands(1):

# nmcli con mod '<Connection_name>' ipv4.addresses "<desired IP/mask>"
# nmcli con mod '<Connection_name>' ipv4.gateway "<desired gateway>"
# nmcli con mod '<Connection_name>' ipv4.method "manual"

(1)

Troubleshooting Steps

  1. Verify PHY Detection: Check if the PHY is detected on the MDIO bus
  2. Test Different RGMII Modes: Since you have no hardware delays, try rgmii mode first
  3. Check Driver Compatibility: Ensure the LAN8870 driver is properly loaded as a kernel module
  4. Validate Overlay Application: Verify your overlay was successfully applied(3)

The TX CRC errors in your statistics suggest timing issues between the MAC and PHY, which is typically resolved by proper RGMII delay configuration.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

It did not help:

  1. This is already in the device tree overlay (as shown)

2/3) Phy Adress is correct. I tried all delay options for the delay. How do I complete the interrupt settings?

Any suggestions?

Thank you.

Hi @MK_S2V!

Thanks for sharing the details of your use case.

Based on what you’ve described, your setup requires a significant level of customization, and, unfortunately, we don’t have the necessary hardware (custom board and LAN8870) to test or reproduce your issue.

While we’re glad to assist where we can, this particular setup involves some design-specific elements that aren’t typically covered by our usual support resources, as it involves integration work tied to your custom design.

That said, we’re keen to help you move forward as efficiently as possible. In similar cases, we typically recommend working with one of our specialized partners who can provide more targeted support. Please refer to our Partner Network to find more information about our partners.

If you face any issue trying to find the right partner for your use case, we’re happy to connect you directly with them.

Best regards.