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



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]

[    8.031281] imx-dwmac 428a0000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[    8.105959] imx-dwmac 428a0000.ethernet eth0: PHY [stmmac-1:07] driver [Microchip LAN8841 Gigabit PHY] (irq=POLL)
[    8.114909] imx-dwmac 428a0000.ethernet eth0: No Safety Features support found
[    8.114940] imx-dwmac 428a0000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[    8.115479] imx-dwmac 428a0000.ethernet eth0: registered PTP clock
[    8.144953] imx-dwmac 428a0000.ethernet eth0: FPE workqueue start
[    8.144975] imx-dwmac 428a0000.ethernet eth0: configuring for phy/rgmii-id link mode
[    8.145479] 8021q: adding VLAN 0 to HW filter on device eth0

Cable connection:

...
[   79.845148] imx-dwmac 428a0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   79.853449] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
...

Check the interface with ifconfig[edit | edit source]

root@desk-mx93:~# 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::140a:71ff:fe2d:ce0e  prefixlen 64  scopeid 0x20<link>
        ether 16:0a:71:2d:ce:0e  txqueuelen 1000  (Ethernet)
        RX packets 1224  bytes 91175 (89.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 120  bytes 20793 (20.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 101

Test with iperf3[edit | edit source]

root@desk-mx93:~#  iperf3 -t 5 -c 192.168.0.168
Connecting to host 192.168.0.168, port 5201
[  5] local 192.168.0.89 port 42688 connected to 192.168.0.168 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   109 MBytes   915 Mbits/sec    4    481 KBytes       
[  5]   1.00-2.00   sec   109 MBytes   912 Mbits/sec    0    549 KBytes       
[  5]   2.00-3.00   sec   110 MBytes   923 Mbits/sec    0    608 KBytes       
[  5]   3.00-4.00   sec   111 MBytes   933 Mbits/sec    0    643 KBytes       
[  5]   4.00-5.00   sec   110 MBytes   923 Mbits/sec    0    660 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec   549 MBytes   921 Mbits/sec    4             sender
[  5]   0.00-5.04   sec   546 MBytes   908 Mbits/sec 

iperf Done.
root@desk-mx93:~#

MAC Address[edit | edit source]

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