Difference between revisions of "DESK-MX8M-L/Peripherals/Ethernet"

From DAVE Developer's Wiki
Jump to: navigation, search
(Test with iperf3)
m (U0007 moved page DESK-MX8M-L/Pheripherals/Ethernet to DESK-MX8M-L/Peripherals/Ethernet without leaving a redirect)
 
(15 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
 
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
 
|-  
 
|-  
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Version
 
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
 
|-
 
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|1.0.0
+
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|{{oldid|16714|2022/06/21}}
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|Jan 2022
+
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|First DESK-MX8M-L release
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|First DESK-MX8M release
+
|-
 +
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |{{oldid|17552|2023/02/24}}
 +
| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |DESK-MX8M-L-2.0.0 release
 +
|-
 +
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |2023/08/22
 +
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |DESK-MX8M-L-4.0.0 release
 
|-
 
|-
 
|}
 
|}
Line 20: Line 24:
  
 
=== Device tree configuration ===
 
=== Device tree configuration ===
 +
 +
==== ORCA SOM ====
 
Here below an example of device tree configuration used on standard DAVE's kit for the ORCA SOM:
 
Here below an example of device tree configuration used on standard DAVE's kit for the ORCA SOM:
  
Line 121: Line 127:
 
</pre>
 
</pre>
  
===Accessing the peripheral===
+
====MITO 8M Mini====
 +
Here below an example of device tree configuration used on standard DAVE's kit for the MITO 8M Mini SOM:
 +
 
 +
From <code>imx8mm-mito8mmini.dts</code> :
 +
<pre>
 +
...
 +
...
 +
&fec1 {
 +
pinctrl-names = "default";
 +
pinctrl-0 = <&pinctrl_fec1>, <&pinctrl_enet_reset>, <&pinctrl_enet_irq>;
 +
phy-mode = "rgmii-id";
 +
phy-handle = <&ethphy0>;
 +
fsl,magic-packet;
 +
status = "okay";
 +
 
 +
mdio {
 +
#address-cells = <1>;
 +
#size-cells = <0>;
 +
 
 +
ethphy0: ethernet-phy@7 {
 +
compatible = "ethernet-phy-ieee802.3-c22";
 +
txc-skew-ps = <1860>;
 +
txen-skew-ps = <0>;
 +
txd0-skew-ps = <0>;
 +
txd1-skew-ps = <0>;
 +
txd2-skew-ps = <0>;
 +
txd3-skew-ps = <0>;
 +
rxc-skew-ps = <1740>;
 +
reg = <7>;
 +
};
 +
};
 +
};
 +
...
 +
...
 +
&iomuxc {
 +
...
 +
...
 +
pinctrl_enet_irq: enet_irqgrp {
 +
fsl,pins = <
 +
MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10 0x41  /* ETH0_INTn */
 +
>;
 +
};
 +
 
 +
pinctrl_enet_reset: enet_resetgrp {
 +
fsl,pins = <
 +
MX8MM_IOMUXC_GPIO1_IO01_GPIO1_IO1 0x19 /* ETH0_RESETn */
 +
>;
 +
};
 +
 
 +
pinctrl_fec1: fec1grp {
 +
fsl,pins = <
 +
MX8MM_IOMUXC_ENET_MDC_ENET1_MDC 0x3
 +
MX8MM_IOMUXC_ENET_MDIO_ENET1_MDIO 0x3
 +
MX8MM_IOMUXC_ENET_TD3_ENET1_RGMII_TD3 0x1f
 +
MX8MM_IOMUXC_ENET_TD2_ENET1_RGMII_TD2 0x1f
 +
MX8MM_IOMUXC_ENET_TD1_ENET1_RGMII_TD1 0x1f
 +
MX8MM_IOMUXC_ENET_TD0_ENET1_RGMII_TD0 0x1f
 +
MX8MM_IOMUXC_ENET_RD3_ENET1_RGMII_RD3 0x91
 +
MX8MM_IOMUXC_ENET_RD2_ENET1_RGMII_RD2 0x91
 +
MX8MM_IOMUXC_ENET_RD1_ENET1_RGMII_RD1 0x91
 +
MX8MM_IOMUXC_ENET_RD0_ENET1_RGMII_RD0 0x91
 +
MX8MM_IOMUXC_ENET_TXC_ENET1_RGMII_TXC 0x1f
 +
MX8MM_IOMUXC_ENET_RXC_ENET1_RGMII_RXC 0x91
 +
MX8MM_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL 0x91
 +
MX8MM_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x1f
 +
>;
 +
};
 +
...
 +
...
 +
};
 +
 
 +
</pre>
 +
 
 +
===Accessing the peripheral in ORCA SOM===
 
ORCA SOM provides the network interface mapped as <code>eth0</code> and <code>eth1</code>.
 
ORCA SOM provides the network interface mapped as <code>eth0</code> and <code>eth1</code>.
  
Line 130: Line 209:
 
...
 
...
 
...
 
...
[    2.253084] fec 30be0000.ethernet eth0: registered PHC device 0
+
[    2.063873] fec 30be0000.ethernet eth0: registered PHC device 0
 
...
 
...
[   6.211939] Generic PHY 30be0000.ethernet-1:08: attached PHY driver [Generic PHY] (mii_bus:phy_addr=30be0000.ethernet-1:08, irq=POLL)
+
[   14.263053] Generic PHY 30be0000.ethernet-1:08: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:08, irq=POLL)
 
</pre>
 
</pre>
  
 
* <code>eth1</code>
 
* <code>eth1</code>
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
[   6.139981] imx-dwmac 30bf0000.ethernet eth1: PHY [stmmac-1:07] driver [Microchip KSZ9131 Gigabit PHY]
+
[   14.249319] imx-dwmac 30bf0000.ethernet eth1: PHY [stmmac-1:07] driver [Microchip KSZ9131 Gigabit PHY] (irq=POLL)
[   6.162868] imx-dwmac 30bf0000.ethernet eth1: No Safety Features support found
+
[   14.250685] imx-dwmac 30bf0000.ethernet eth1: Register MEM_TYPE_PAGE_POOL RxQ-0
[   6.170459] imx-dwmac 30bf0000.ethernet eth1: IEEE 1588-2008 Advanced Timestamp supported
+
[  14.251110] imx-dwmac 30bf0000.ethernet eth1: No Safety Features support found
[   6.181622] imx-dwmac 30bf0000.ethernet eth1: registered PTP clock
+
[   14.251133] imx-dwmac 30bf0000.ethernet eth1: IEEE 1588-2008 Advanced Timestamp supported
[   6.187870] imx-dwmac 30bf0000.ethernet eth1: configuring for phy/rgmii-id link mode
+
[   14.252851] imx-dwmac 30bf0000.ethernet eth1: registered PTP clock
 +
[   14.255249] imx-dwmac 30bf0000.ethernet eth1: FPE workqueue start
 +
[  14.255267] imx-dwmac 30bf0000.ethernet eth1: configuring for phy/rgmii-id link mode
 
</pre>
 
</pre>
  
Line 149: Line 230:
 
...
 
...
 
...
 
...
10.422034] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
+
18.346266] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
10.429651] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
+
18.353884] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
 
</pre>
 
</pre>
  
Line 157: Line 238:
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
 
root@desk-mx8mp:~# ifconfig eth0
 
root@desk-mx8mp:~# ifconfig eth0
eth0     Link encap:Ethernet HWaddr f2:b3:2f:ee:0c:69
+
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
          inet6 addr: fe80::f0b3:2fff:feee:c69/64 Scope:Link
+
        inet 192.168.10.118  netmask 255.255.255.0 broadcast 192.168.10.255
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
+
        inet6 fe80::8449:5cff:fe4a:2840  prefixlen 64  scopeid 0x20<link>
          RX packets:16657 errors:0 dropped:0 overruns:0 frame:0
+
        ether 86:49:5c:4a:28:40 txqueuelen 1000 (Ethernet)
          TX packets:109 errors:0 dropped:0 overruns:0 carrier:0
+
        RX packets 56295  bytes 9105391 (8.6 MiB)
          collisions:0 txqueuelen:1000
+
        RX errors 0 dropped 0 overruns 0 frame 0
          RX bytes:1806277 (1.7 MiB)  TX bytes:19191 (18.7 KiB)
+
        TX packets 225  bytes 23810 (23.2 KiB)
 +
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  
root@desk-mx8mp:~# ifconfig eth1
+
root@desk-mx8mp:~# ifconfig eth1  
eth1     Link encap:Ethernet HWaddr 2e:89:64:91:78:a6
+
eth1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
          UP BROADCAST MULTICAST MTU:1500 Metric:1
+
        ether b2:79:b4:e1:19:40 txqueuelen 1000 (Ethernet)
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
+
        RX packets 0 bytes 0 (0.0 B)
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
+
        RX errors 0 dropped 0 overruns 0 frame 0
          collisions:0 txqueuelen:1000
+
        TX packets 0 bytes 0 (0.0 B)
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
+
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
          Interrupt:45
+
        device interrupt 48
  
 
root@desk-mx8mp:~#
 
root@desk-mx8mp:~#
Line 180: Line 262:
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
root@desk-mx8mp:~# iperf3 -t 5 -c 192.168.0.125
+
root@desk-mx8mp:~# iperf3 -t 5 -c 192.168.4.100
Connecting to host 192.168.0.125, port 5201
+
Connecting to host 192.168.4.100, port 5201
[  5] local 192.168.0.146 port 56130 connected to 192.168.0.131 port 5201
+
[  5] local 192.168.10.118 port 51394 connected to 192.168.4.100 port 5201
 
[ ID] Interval          Transfer    Bitrate        Retr  Cwnd
 
[ ID] Interval          Transfer    Bitrate        Retr  Cwnd
[  5]  0.00-1.00  sec  114 MBytes  954 Mbits/sec    0    385 KBytes
+
[  5]  0.00-1.00  sec  114 MBytes  956 Mbits/sec    0    680 KBytes      
[  5]  1.00-2.00  sec  113 MBytes  945 Mbits/sec    0    385 KBytes
+
[  5]  1.00-2.00  sec  111 MBytes  933 Mbits/sec    0    771 KBytes      
[  5]  2.00-3.00  sec  112 MBytes  938 Mbits/sec    0    403 KBytes
+
[  5]  2.00-3.00  sec  112 MBytes  944 Mbits/sec    0    786 KBytes      
[  5]  3.00-4.00  sec  112 MBytes  940 Mbits/sec    0    423 KBytes
+
[  5]  3.00-4.00  sec  111 MBytes  933 Mbits/sec    0    829 KBytes      
[  5]  4.00-5.00  sec  112 MBytes  941 Mbits/sec    0    423 KBytes
+
[  5]  4.00-5.00  sec  111 MBytes  933 Mbits/sec    0    829 KBytes      
[  5]  5.00-6.00  sec  113 MBytes  945 Mbits/sec    0    423 KBytes
 
[  5]  6.00-7.00  sec  112 MBytes  940 Mbits/sec    0    423 KBytes
 
[  5]  7.00-8.00  sec  112 MBytes  941 Mbits/sec    0    465 KBytes
 
[  5]  8.00-9.00  sec  112 MBytes  943 Mbits/sec    0    465 KBytes
 
[  5]  9.00-10.00  sec  112 MBytes  938 Mbits/sec    0    465 KBytes
 
 
- - - - - - - - - - - - - - - - - - - - - - - - -
 
- - - - - - - - - - - - - - - - - - - - - - - - -
 
[ ID] Interval          Transfer    Bitrate        Retr
 
[ ID] Interval          Transfer    Bitrate        Retr
[  5]  0.00-10.00 sec 1.10 GBytes   943 Mbits/sec    0            sender
+
[  5]  0.00-5.00   sec  560 MBytes  940 Mbits/sec    0            sender
[  5]  0.00-10.00 sec 1.10 GBytes   941 Mbits/sec                  receiver
+
[  5]  0.00-5.00   sec  558 MBytes  936 Mbits/sec                  receiver
  
 
iperf Done.
 
iperf Done.
 
root@desk-mx8mp:~#
 
root@desk-mx8mp:~#
 
</pre>
 
</pre>
 +
 +
===Accessing the peripheral in MITO 8M Mini===
 +
MIN SOM provides the network interface mapped as <code>eth0</code>.
 +
 +
====Linux messages at boot time====
 +
 +
<pre class="workstation-terminal">
 +
...
 +
[    2.909811] fec 30be0000.ethernet eth0: registered PHC device 0
 +
...
 +
[  16.285429] Micrel KSZ9031 Gigabit PHY 30be0000.ethernet-1:07: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:07, irq=POLL)
 +
...
 +
</pre>
 +
 +
Cable connection:
 +
 +
<pre class="workstation-terminal">
 +
...
 +
[  20.386519] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
 +
[  20.394322] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
 +
...
 +
</pre>
 +
 +
==== Check the interface with ifconfig ====
 +
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mm:~# ifconfig eth0
 +
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
 +
        inet 192.168.4.153  netmask 255.255.255.0  broadcast 192.168.4.255
 +
        inet6 fe80::80c9:10ff:fe49:b0ee  prefixlen 64  scopeid 0x20<link>
 +
        ether 82:c9:10:49:b0:ee  txqueuelen 1000  (Ethernet)
 +
        RX packets 65495  bytes 4562086 (4.3 MiB)
 +
        RX errors 0  dropped 0  overruns 0  frame 0
 +
        TX packets 558  bytes 134716 (131.5 KiB)
 +
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 +
 +
root@desk-mx8mm:~#
 +
</pre>
 +
 +
==== Test with [https://iperf.fr/ iperf3] ====
 +
 +
<pre class="workstation-terminal">
 +
root@desk-mx8mm:~# iperf3 -t 5 -c 192.168.4.100
 +
Connecting to host 192.168.4.100, port 5201
 +
[  5] local 192.168.4.153 port 50938 connected to 192.168.4.100 port 5201
 +
[ ID] Interval          Transfer    Bitrate        Retr  Cwnd
 +
[  5]  0.00-1.00  sec  113 MBytes  951 Mbits/sec    0    457 KBytes     
 +
[  5]  1.00-2.00  sec  112 MBytes  941 Mbits/sec    0    499 KBytes     
 +
[  5]  2.00-3.00  sec  113 MBytes  948 Mbits/sec    0    525 KBytes     
 +
[  5]  3.00-4.00  sec  112 MBytes  941 Mbits/sec    0    525 KBytes     
 +
[  5]  4.00-5.00  sec  112 MBytes  939 Mbits/sec    0    525 KBytes     
 +
- - - - - - - - - - - - - - - - - - - - - - - - -
 +
[ ID] Interval          Transfer    Bitrate        Retr
 +
[  5]  0.00-5.00  sec  563 MBytes  944 Mbits/sec    0            sender
 +
[  5]  0.00-5.00  sec  560 MBytes  939 Mbits/sec                  receiver
 +
 +
iperf Done.
 +
root@desk-mx8mm:~#
 +
</pre>
 +
  
 
==== MAC Address ====
 
==== MAC Address ====
Line 210: Line 347:
 
----
 
----
  
[[Category:ORCA]]
+
[[Category:ORCA]] [[Category:MITO 8M Mini]]

Latest revision as of 10:21, 8 January 2024

History
Issue Date Notes

2022/06/21

First DESK-MX8M-L release

2023/02/24

DESK-MX8M-L-2.0.0 release
2023/08/22 DESK-MX8M-L-4.0.0 release


Peripheral Ethernet[edit | edit source]

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

Device tree configuration[edit | edit source]

ORCA SOM[edit | edit source]

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

From imx8mp-mito8mplus-cb1001.dts :

&fec {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_fec>;
	phy-mode = "rgmii-id";
	phy-handle = <&ethphy1>;
	fsl,magic-packet;
	status = "okay";

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

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


From imx8mp-mito8mplus.dtsi :

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

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

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

&iomuxc {
...
...
	pinctrl_eqos: eqosgrp {
		fsl,pins = <
			MX8MP_IOMUXC_ENET_MDC__ENET_QOS_MDC		0x3
			MX8MP_IOMUXC_ENET_MDIO__ENET_QOS_MDIO		0x3
			MX8MP_IOMUXC_ENET_RD0__ENET_QOS_RGMII_RD0	0x91
			MX8MP_IOMUXC_ENET_RD1__ENET_QOS_RGMII_RD1	0x91
			MX8MP_IOMUXC_ENET_RD2__ENET_QOS_RGMII_RD2	0x91
			MX8MP_IOMUXC_ENET_RD3__ENET_QOS_RGMII_RD3	0x91
			MX8MP_IOMUXC_ENET_RXC__CCM_ENET_QOS_CLOCK_GENERATE_RX_CLK	0x91
			MX8MP_IOMUXC_ENET_RX_CTL__ENET_QOS_RGMII_RX_CTL	0x91
			MX8MP_IOMUXC_ENET_TD0__ENET_QOS_RGMII_TD0	0x1f
			MX8MP_IOMUXC_ENET_TD1__ENET_QOS_RGMII_TD1	0x1f
			MX8MP_IOMUXC_ENET_TD2__ENET_QOS_RGMII_TD2	0x1f
			MX8MP_IOMUXC_ENET_TD3__ENET_QOS_RGMII_TD3	0x1f
			MX8MP_IOMUXC_ENET_TX_CTL__ENET_QOS_RGMII_TX_CTL	0x1f
			MX8MP_IOMUXC_ENET_TXC__CCM_ENET_QOS_CLOCK_GENERATE_TX_CLK	0x1f
			MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10		0x19
		>;
	};

	pinctrl_fec: fecgrp {
		fsl,pins = <
			MX8MP_IOMUXC_SAI1_RXD2__ENET1_MDC		0x3
			MX8MP_IOMUXC_SAI1_RXD3__ENET1_MDIO		0x3
			MX8MP_IOMUXC_SAI1_RXD4__ENET1_RGMII_RD0		0x91
			MX8MP_IOMUXC_SAI1_RXD5__ENET1_RGMII_RD1		0x91
			MX8MP_IOMUXC_SAI1_RXD6__ENET1_RGMII_RD2		0x91
			MX8MP_IOMUXC_SAI1_RXD7__ENET1_RGMII_RD3		0x91
			MX8MP_IOMUXC_SAI1_TXC__ENET1_RGMII_RXC		0x91
			MX8MP_IOMUXC_SAI1_TXFS__ENET1_RGMII_RX_CTL	0x91
			MX8MP_IOMUXC_SAI1_TXD0__ENET1_RGMII_TD0		0x1f
			MX8MP_IOMUXC_SAI1_TXD1__ENET1_RGMII_TD1		0x1f
			MX8MP_IOMUXC_SAI1_TXD2__ENET1_RGMII_TD2		0x1f
			MX8MP_IOMUXC_SAI1_TXD3__ENET1_RGMII_TD3		0x1f
			MX8MP_IOMUXC_SAI1_TXD4__ENET1_RGMII_TX_CTL	0x1f
			MX8MP_IOMUXC_SAI1_TXD5__ENET1_RGMII_TXC		0x1f
			MX8MP_IOMUXC_SAI1_RXD0__GPIO4_IO02		0x19
		>;
	};
...
...
};

MITO 8M Mini[edit | edit source]

Here below an example of device tree configuration used on standard DAVE's kit for the MITO 8M Mini SOM:

From imx8mm-mito8mmini.dts :

...
...
&fec1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_fec1>, <&pinctrl_enet_reset>, <&pinctrl_enet_irq>;
	phy-mode = "rgmii-id";
	phy-handle = <&ethphy0>;
	fsl,magic-packet;
	status = "okay";

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

		ethphy0: ethernet-phy@7 {
			compatible = "ethernet-phy-ieee802.3-c22";
			txc-skew-ps = <1860>;
			txen-skew-ps = <0>;
			txd0-skew-ps = <0>;
			txd1-skew-ps = <0>;
			txd2-skew-ps = <0>;
			txd3-skew-ps = <0>;
			rxc-skew-ps = <1740>;
			reg = <7>;
		};
	};
};
...
...
&iomuxc {
...
...
	pinctrl_enet_irq: enet_irqgrp {
		fsl,pins = <
			MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10				0x41   /* ETH0_INTn */
		>;
	};

	pinctrl_enet_reset: enet_resetgrp {
		fsl,pins = <
			MX8MM_IOMUXC_GPIO1_IO01_GPIO1_IO1			0x19	/* ETH0_RESETn */
		>;
	};

	pinctrl_fec1: fec1grp {
		fsl,pins = <
			MX8MM_IOMUXC_ENET_MDC_ENET1_MDC			0x3
			MX8MM_IOMUXC_ENET_MDIO_ENET1_MDIO		0x3
			MX8MM_IOMUXC_ENET_TD3_ENET1_RGMII_TD3		0x1f
			MX8MM_IOMUXC_ENET_TD2_ENET1_RGMII_TD2		0x1f
			MX8MM_IOMUXC_ENET_TD1_ENET1_RGMII_TD1		0x1f
			MX8MM_IOMUXC_ENET_TD0_ENET1_RGMII_TD0		0x1f
			MX8MM_IOMUXC_ENET_RD3_ENET1_RGMII_RD3		0x91
			MX8MM_IOMUXC_ENET_RD2_ENET1_RGMII_RD2		0x91
			MX8MM_IOMUXC_ENET_RD1_ENET1_RGMII_RD1		0x91
			MX8MM_IOMUXC_ENET_RD0_ENET1_RGMII_RD0		0x91
			MX8MM_IOMUXC_ENET_TXC_ENET1_RGMII_TXC		0x1f
			MX8MM_IOMUXC_ENET_RXC_ENET1_RGMII_RXC		0x91
			MX8MM_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL	0x91
			MX8MM_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL	0x1f
		>;
	};
...
...
};

Accessing the peripheral in ORCA SOM[edit | edit source]

ORCA SOM provides the network interface mapped as eth0 and eth1.

Linux messages at boot time[edit | edit source]

  • eth0
...
...
[    2.063873] fec 30be0000.ethernet eth0: registered PHC device 0
...
[   14.263053] Generic PHY 30be0000.ethernet-1:08: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:08, irq=POLL)
  • eth1
[   14.249319] imx-dwmac 30bf0000.ethernet eth1: PHY [stmmac-1:07] driver [Microchip KSZ9131 Gigabit PHY] (irq=POLL)
[   14.250685] imx-dwmac 30bf0000.ethernet eth1: Register MEM_TYPE_PAGE_POOL RxQ-0
[   14.251110] imx-dwmac 30bf0000.ethernet eth1: No Safety Features support found
[   14.251133] imx-dwmac 30bf0000.ethernet eth1: IEEE 1588-2008 Advanced Timestamp supported
[   14.252851] imx-dwmac 30bf0000.ethernet eth1: registered PTP clock
[   14.255249] imx-dwmac 30bf0000.ethernet eth1: FPE workqueue start
[   14.255267] imx-dwmac 30bf0000.ethernet eth1: configuring for phy/rgmii-id link mode

Cable connection:

...
...
[   18.346266] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   18.353884] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

Check the interface with ifconfig[edit | edit source]

root@desk-mx8mp:~# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.10.118  netmask 255.255.255.0  broadcast 192.168.10.255
        inet6 fe80::8449:5cff:fe4a:2840  prefixlen 64  scopeid 0x20<link>
        ether 86:49:5c:4a:28:40  txqueuelen 1000  (Ethernet)
        RX packets 56295  bytes 9105391 (8.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 225  bytes 23810 (23.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@desk-mx8mp:~# ifconfig eth1 
eth1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b2:79:b4:e1:19:40  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 48

root@desk-mx8mp:~#

Test with iperf3[edit | edit source]

root@desk-mx8mp:~# iperf3 -t 5 -c 192.168.4.100
Connecting to host 192.168.4.100, port 5201
[  5] local 192.168.10.118 port 51394 connected to 192.168.4.100 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   114 MBytes   956 Mbits/sec    0    680 KBytes       
[  5]   1.00-2.00   sec   111 MBytes   933 Mbits/sec    0    771 KBytes       
[  5]   2.00-3.00   sec   112 MBytes   944 Mbits/sec    0    786 KBytes       
[  5]   3.00-4.00   sec   111 MBytes   933 Mbits/sec    0    829 KBytes       
[  5]   4.00-5.00   sec   111 MBytes   933 Mbits/sec    0    829 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec   560 MBytes   940 Mbits/sec    0             sender
[  5]   0.00-5.00   sec   558 MBytes   936 Mbits/sec                  receiver

iperf Done.
root@desk-mx8mp:~#

Accessing the peripheral in MITO 8M Mini[edit | edit source]

MIN SOM provides the network interface mapped as eth0.

Linux messages at boot time[edit | edit source]

...
[    2.909811] fec 30be0000.ethernet eth0: registered PHC device 0
...
[   16.285429] Micrel KSZ9031 Gigabit PHY 30be0000.ethernet-1:07: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:07, irq=POLL)
...

Cable connection:

...
[   20.386519] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   20.394322] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
...

Check the interface with ifconfig[edit | edit source]

root@desk-mx8mm:~# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.4.153  netmask 255.255.255.0  broadcast 192.168.4.255
        inet6 fe80::80c9:10ff:fe49:b0ee  prefixlen 64  scopeid 0x20<link>
        ether 82:c9:10:49:b0:ee  txqueuelen 1000  (Ethernet)
        RX packets 65495  bytes 4562086 (4.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 558  bytes 134716 (131.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@desk-mx8mm:~# 

Test with iperf3[edit | edit source]

root@desk-mx8mm:~# iperf3 -t 5 -c 192.168.4.100
Connecting to host 192.168.4.100, port 5201
[  5] local 192.168.4.153 port 50938 connected to 192.168.4.100 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   113 MBytes   951 Mbits/sec    0    457 KBytes       
[  5]   1.00-2.00   sec   112 MBytes   941 Mbits/sec    0    499 KBytes       
[  5]   2.00-3.00   sec   113 MBytes   948 Mbits/sec    0    525 KBytes       
[  5]   3.00-4.00   sec   112 MBytes   941 Mbits/sec    0    525 KBytes       
[  5]   4.00-5.00   sec   112 MBytes   939 Mbits/sec    0    525 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec   563 MBytes   944 Mbits/sec    0             sender
[  5]   0.00-5.00   sec   560 MBytes   939 Mbits/sec                  receiver

iperf Done.
root@desk-mx8mm:~# 


MAC Address[edit | edit source]

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