Second Ethernet port not working with DHCP Verdin IMX8MP

I have a Verdin IMX8MP on a custom carrier board that has a KSZ9031 as the PHY for the secondary ethernet port (end1). The port always fails to communicate with my DHCP server and get an IPv4 address assigned. The primary ethernet port (end0) works fine, and I’ve tried swapping the cables with no luck.

I’ve also tried statically assigning an IP address to the end1. When doing so, the IP address shows up on a network scan, but it shows the MAC address of end0.

I’m using Yocto BSP 7.5.0, heres a snippet of my device tree:

#include "imx8mp-verdin.dtsi"
#include "imx8mp-verdin-wifi.dtsi"

/* Verdin ETH_2 RGMII */
/delete-node/ &verdin_eth2_mdio; 
&fec {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&pinctrl_fec>;
    pinctrl-1 = <&pinctrl_fec_sleep>;
    phy-mode = "rgmii-id"; 
    phy-handle = <&ethphy1>;
    fsl,magic-packet;
    status = "okay";

    verdin_eth2_mdio: mdio {
        #address-cells = <1>;
        #size-cells = <0>;

        ethphy1: ethernet-phy@2 {
            compatible = "ethernet-phy-ieee802.3-c22";
            reg = <0x2>; 
            interrupt-parent = <&gpio4>;
	        interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
            enet-phy-lane-swap;
        };
    };
};

running 'ip addr':

2: end1: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:14:2d:94:8c:1a brd ff:ff:ff:ff:ff:ff
    inet 169.254.46.186/16 brd 169.254.255.255 scope global end1
       valid_lft forever preferred_lft forever
    inet6 fe80::214:2dff:fe94:8c1a/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever
3: end0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:14:2d:84:8c:1a brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.214/24 brd 192.168.1.255 scope global end0
       valid_lft forever preferred_lft forever
    inet6 fe80::214:2dff:fe84:8c1a/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever

running 'ethtool end1':

Settings for end1:
        Supported ports: [ TP    MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Auto-negotiation: on
        master-slave cfg: preferred slave
        master-slave status: slave
        Port: Twisted Pair
        PHYAD: 2
        Transceiver: external
        MDI-X: Unknown
        Supports Wake-on: g
        Wake-on: d
        Link detected: yes


Any help here would be greatly appreciated.


Further Testing:

I followed this documentation to manually configure the ports.

systemctl stop connman.service
systemctl stop systemd-networkd.socket
systemctl stop systemd-networkd.service
  • Confirmed neither port is no longer detected on the network

Try manual configuration with known working port (end0):

ip link set end0 up
ip addr add 192.168.1.26/24 broadcast 192.168.1.255 dev end0
ip route add default via 192.168.1.1
  • Confirmed end0 detected on network scan.

Attempted to enable end1:

ip link set end1 up
ip addr add 192.168.1.27/24 broadcast 192.168.1.255 dev end7
ip route add default via 192.168.1.1
   (ERROR): RTNETLINK answers: File exists

Retry after flushing alll:

ip addr flush dev end0
ip route flush dev end0
ip link set end0 down

ip addr flush dev end1
ip route flush dev end1
ip link set end1 down

ip link set end1 up
ip addr add 192.168.1.27/24 broadcast 192.168.1.255 dev end1
ip route add default via 192.168.1.1
  • end1 not detected by network scan

Hi, I’m the Toradex AI Assistant.

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


To help troubleshoot your second Ethernet port issue on the Verdin iMX8MP, could you provide the exact version of Yocto BSP 7.5.0 you’re running? You can get this information by running the tdx-info command on your device. You can find more details about this command at https://developer.toradex.com/software/development-resources/tdx-info/.

Based on your description, you’re using a custom carrier board with a KSZ9031 PHY, but I notice a potential mismatch. According to the Verdin Carrier Board Design Guide, the recommended Ethernet PHY for best software compatibility is the KSZ9131RNX from Microchip, which supports the 1.8V I/O voltage level of the RGMII interface(1). The KSZ9031 you’re using may have different voltage requirements or driver compatibility issues.

Looking at your device tree configuration, there are a few areas that need attention:

Device Tree Issues

Your current device tree shows the PHY at address 0x2, but the MAC address issue you’re experiencing (both interfaces showing similar MAC addresses) suggests there might be a configuration problem with the second Ethernet controller setup.

For the second Ethernet port to work properly, you need to ensure that:

  1. Power switching is correctly configured - The second Ethernet port typically requires power control through a GPIO(2)
  2. The PHY address matches your hardware strapping - Verify that your KSZ9031 is actually strapped to address 0x2
  3. The correct pin configuration - The RGMII signals need proper pinmux configuration

Network Configuration

Your output shows that end1 is getting a link-local address (169.254.46.186), which indicates DHCP is failing. This could be due to:

  • PHY driver issues with the KSZ9031
  • Incorrect RGMII timing configuration
  • Missing power control for the PHY

Recommended Next Steps

  1. Verify your hardware setup matches the reference design for RGMII implementation
  2. Check if your KSZ9031 PHY requires specific timing delays that differ from the KSZ9131RNX
  3. Confirm the PHY address strapping on your hardware
  4. Add proper power control for the second Ethernet PHY if not already present

Once you provide the exact BSP version information, I can give more specific guidance for your 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.

Please share a schematic snippet depicting the KSZ9031 connection, a full boot log (as text), and the output of the ifconfig -a command.

Please try to force ETH to lover speed. ie

sudo ethtool -s end1 speed 100 duplex full autoneg off
sudo ethtool -s end1 speed 10 duplex full autoneg off

Hi @alex.tx

Thank you for your response.

We were able to solve our issue. The Rx/Tx lanes were swapped, so we attempted to use the enet-phy-lane-swap property listed in the kernel documentation.

After much testing with adjusting timings, lowering speeds, etc, we decided to modify our board to fix the lane swap issue. It now works perfectly. We believe the verdin-imx8mp does not support lane swapping the Rx/Tx, but we haven’t been able to fully confirm this.

This snippet in the Verdin Carrier Board Design Guide seems to suggest it likely does not support lane swapping.
image