How to use 2 ethernet in verdin1.1 Ivy carrier board

Hi,

By default I can use eth0. How to use other Ethernet?

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

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


Using Additional Ethernet Interfaces on Toradex Modules

Identifying Available Ethernet Interfaces

First, identify all available network interfaces on your system using the ip link command(1):

# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,DYNAMIC> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:14:2d:59:ca:81 brd ff:ff:ff:ff:ff:ff
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default 
    link/sit 0.0.0.0 brd 0.0.0.0
4: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
    link/can

(1)

For the BSP, Ethernet interfaces are named eth<x>, where <x> represents the number of the interface(1).

Second Ethernet Port Configuration

Some Toradex SoMs feature a second Ethernet controller available as a reduced gigabit media independent interface (RGMII)(2). To use it, a second Ethernet PHY on your carrier board is required(2).

Hardware Requirements

The second Ethernet port requires specific hardware implementation on the carrier board(2). For example, on the Verdin iMX8M Plus, the device tree configuration includes power switching controlled by the PWR_CTRL_4 signal connected to a GPIO Expander(2):

reg_eth2phy: regulator-eth2phy {
    compatible = "regulator-fixed";
    enable-active-high;
    gpio = <&gpio_expander_21 4 GPIO_ACTIVE_HIGH>; /* PWR_CTRL_4/ETH_PWR_EN */
    off-on-delay = <500000>;
    regulator-max-microvolt = <3300000>;
    regulator-min-microvolt = <3300000>;
    regulator-name = "+V3.3_ETH";
    startup-delay-us = <200000>;
    vin-supply = <&reg_3p3v>;
};

(2)

Manual Configuration of Additional Ethernet Interfaces

Static Configuration

To configure a second Ethernet interface (e.g., eth1) with a static IP address(1):

  1. Enable the network interface:
# ip link set eth1 up

(1)

  1. Assign a static IP address:
# ip addr add 192.168.20.2/24 broadcast 192.168.20.255 dev eth1

(1)

  1. Add a gateway if needed:
# ip route add default via 192.168.20.1

(1)

Dynamic Configuration (DHCP)

To configure the second Ethernet interface to obtain an IP address via DHCP(1):

# udhcpc -i eth1

(1)

Using ConnMan for Additional Interfaces

You can also use ConnMan to manage additional Ethernet interfaces. First, identify the interface using ConnMan(1):

# connmanctl services

(1)

Then configure it for static IP:

# connmanctl config ethernet_<MAC_ADDRESS>_cable --ipv4 manual 192.168.20.2 255.255.255.0 192.168.20.1

(1)

Or for DHCP:

# connmanctl config ethernet_<MAC_ADDRESS>_cable --ipv4 dhcp

(1)

Important Notes

  • Make sure to disable networking management daemons to avoid interference when doing manual configuration(1)
  • For Torizon OS, ethernet interfaces are named ethernet<x> instead of eth<x>(1)
  • The second Ethernet port availability depends on your specific SoM and carrier board design(2)

Best regards, Toradex AI Assistant.

I am using verdin iMX8M Plus SOM.

Please find below image to see all available interface in my board

How to get eth1?

Hello @khaled.hassan,

To use the second ethernet on the Ivy, you need to enable its device tree.
This can only be done in Torizon OS 7.

To do so, you can run the following command:

If using a module without wifi:

sudo fw_setenv fdtfile imx8mp-verdin-nonwifi-ivy.dtb

If using a module with wifi:

sudo fw_setenv fdtfile imx8mp-verdin-wifi-ivy.dtb

Afterwards, you can reboot the board and the second ethernet interface will be up and running.

Best Regards,
Bruno

Found thanks

1 Like