DESK-MX9-L/Peripherals/Ethernet

From DAVE Developer's Wiki
Jump to: navigation, search
History
Issue Date Notes

2024/01/30

DESK-MX9-L-5.x.x release
2026/02/16 DESK-MX9-L-6.x.x release



Peripheral Ethernet[edit | edit source]

The ethernet interface is made available through the i.MX93 eqos interface which should be initialized on the device tree.

Device tree configuration[edit | edit source]

Here below is an example of device tree configuration used on standard DAVE's kit for the AURA SOM:

From imx93-aura.dtsi :

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

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

		ethphy1: ethernet-phy@7 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <7>;
			eee-broken-1000t;
		};
	};
};
...
...

&iomuxc {
...
	pinctrl_eqos: eqosgrp {
		fsl,pins = <
			MX93_PAD_ENET1_MDC__ENET_QOS_MDC			0x57e
			MX93_PAD_ENET1_MDIO__ENET_QOS_MDIO			0x57e
			MX93_PAD_ENET1_RD0__ENET_QOS_RGMII_RD0			0x57e
			MX93_PAD_ENET1_RD1__ENET_QOS_RGMII_RD1			0x57e
			MX93_PAD_ENET1_RD2__ENET_QOS_RGMII_RD2			0x57e
			MX93_PAD_ENET1_RD3__ENET_QOS_RGMII_RD3			0x57e
			MX93_PAD_ENET1_RXC__CCM_ENET_QOS_CLOCK_GENERATE_RX_CLK	0x5fe
			MX93_PAD_ENET1_RX_CTL__ENET_QOS_RGMII_RX_CTL		0x57e
			MX93_PAD_ENET1_TD0__ENET_QOS_RGMII_TD0			0x57e
			MX93_PAD_ENET1_TD1__ENET_QOS_RGMII_TD1			0x57e
			MX93_PAD_ENET1_TD2__ENET_QOS_RGMII_TD2			0x57e
			MX93_PAD_ENET1_TD3__ENET_QOS_RGMII_TD3			0x57e
			MX93_PAD_ENET1_TXC__CCM_ENET_QOS_CLOCK_GENERATE_TX_CLK	0x5fe
			MX93_PAD_ENET1_TX_CTL__ENET_QOS_RGMII_TX_CTL		0x57e
		>;
	};
...
};
...


Accessing the peripheral[edit | edit source]

AURA SOM provides the network interface mapped as eth0.

Linux messages at boot time[edit | edit source]

[    1.529235] 8021q: 802.1Q VLAN Support v1.8
...
[    1.654828] imx-dwmac 428a0000.ethernet: IRQ eth_lpi not found
[    1.660956] imx-dwmac 428a0000.ethernet: User ID: 0x10, Synopsys ID: 0x52
[    1.667758] imx-dwmac 428a0000.ethernet:     DWMAC4/5
[    1.672591] imx-dwmac 428a0000.ethernet: DMA HW capability register supported
[    1.679716] imx-dwmac 428a0000.ethernet: RX Checksum Offload Engine supported
[    1.686866] imx-dwmac 428a0000.ethernet: TX Checksum insertion supported
[    1.693562] imx-dwmac 428a0000.ethernet: Wake-Up On Lan supported
[    1.699702] imx-dwmac 428a0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    1.707351] imx-dwmac 428a0000.ethernet: Enabled L3L4 Flow TC (entries=8)
[    1.714128] imx-dwmac 428a0000.ethernet: Enabled RFS Flow TC (entries=10)
[    1.720911] imx-dwmac 428a0000.ethernet: Enabling HW TC (entries=256, max_off=256)
[    1.728472] imx-dwmac 428a0000.ethernet: Using 32/32 bits DMA host/device width
[    8.332289] imx-dwmac 428a0000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[    8.402295] imx-dwmac 428a0000.ethernet eth0: PHY [stmmac-0:07] driver [Microchip LAN8841 Gigabit PHY] (irq=POLL)
[    8.410904] imx-dwmac 428a0000.ethernet eth0: No Safety Features support found
[    8.410936] imx-dwmac 428a0000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[    8.412050] imx-dwmac 428a0000.ethernet eth0: registered PTP clock
[    8.416468] imx-dwmac 428a0000.ethernet eth0: FPE workqueue start
[    8.416490] imx-dwmac 428a0000.ethernet eth0: configuring for phy/rgmii-id link mode
...
[    8.417065] 8021q: adding VLAN 0 to HW filter on device eth0
...

Cable connection:

...
[   60.417963] imx-dwmac 428a0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
...

Check the interface with ifconfig[edit | edit source]

root@desk-mx93-rev1:~# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.89  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::58dd:eff:fe59:b5d8  prefixlen 64  scopeid 0x20<link>
        ether 5a:dd:0e:59:b5:d8  txqueuelen 1000  (Ethernet)
        RX packets 431  bytes 32534 (31.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 39  bytes 4840 (4.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 101

root@desk-mx93-rev1:~#

Test with iperf3[edit | edit source]

root@desk-mx93-rev1:~# iperf3 -t 5 -c 192.168.0.167
Connecting to host 192.168.0.167, port 5201
[  5] local 192.168.0.89 port 33840 connected to 192.168.0.167 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   114 MBytes   956 Mbits/sec    1    406 KBytes
[  5]   1.00-2.00   sec   110 MBytes   927 Mbits/sec    0    455 KBytes
[  5]   2.00-3.00   sec   113 MBytes   945 Mbits/sec    0    457 KBytes
[  5]   3.00-4.00   sec   112 MBytes   943 Mbits/sec    0    465 KBytes
[  5]   4.00-5.00   sec   112 MBytes   937 Mbits/sec    0    475 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec   562 MBytes   942 Mbits/sec    1             sender
[  5]   0.00-5.01   sec   560 MBytes   938 Mbits/sec                  receiver

iperf Done.
root@desk-mx93-rev1:~#

MAC Address[edit | edit source]

For the MAC Address programming, refers to the following wiki page