Changes

Jump to: navigation, search

DESK-MX6-L/Pheripherals/Ethernet

3,920 bytes added, 13:44, 21 April 2022
Accessing the peripheral
<section end="Body" />
===Gigabit ethernet ===
AXEL LITE SOM provides the 4 twisted pair data line for interfacing a magnetic transformer supporting the Gigabit ethernet interface.
Due to the most popular and cheaper 100Mbps interface used in the Industrial field, the '''standard''' configuration (hardware and software) for the ethernet interface is 100Mbps. Furthermore, the 1Gps negotiation requires a longer time so, if not required, it is better to keep the interface configured at the real speed used.
 
The following paragraphs describe how to change the default configuration for supporting 1Gbps ethernet hardware and software configuration.
 
====Hardware connections====
The [[AXEL_Lite_SOM/AXEL_Lite_Evaluation_Kit/Electrical_and_Mechanical_Documents/Schematics#Schematics |AXEL Lite EVK schematics]] show how to connect the ethernet physical interface to a 10/100Mbs or 1Gbps connectors.
For a 1Gbps connection, it is enough to connect all 4 pair lines (in the EVK schematics there is an optional R-Pack RP2 to be mounted)
 
====Software configuration====
Standard [[DESK-MX6-L | DESK-MX6-L]] BSP is configured for a 100Mbps interface configuration. For enabling 1Gbps, the following u-boot environment variable has to be defined (and saved) in the environment:
<pre class="workstation-terminal">
=> setenv disable_giga 0
=> saveenv
</pre>
 
U-Boot network driver for the ethernet PHY <code>drivers/net/phy/micrel_ksz90x1.c</code> uses this variable for enabling/disabling the speed and autonegotiation for the ''1000 speed''.
 
Moreover, the following device tree entry in the <code>imx6dl-axellite.dtsi</code> (or <code>imx6q-axellite.dtsi</code> if the SOC is a i.MX6Q) file, should be changed from:
<pre>
&ethphy {
max-speed = <100>;
};
</pre>
to:
<pre>
&ethphy {
max-speed = <1000>;
};
</pre>
 
====Limitations====
As per official NXP Chip errata documentation [https://www.nxp.com/docs/en/errata/IMX6SDLCE.pdf ERR004512], the i.MX6S/DL/Q have a maximum performance limited to '''470Mpbs''':
 
''The theoretical maximum performance of 1 Gbps ENET is limited to 470 Mbps (total for Tx and Rx). The actual measured performance in an optimized environment is up to 400 Mbps''
 
====Linux messages at boot time====
Cable connection:
 
<pre class="workstation-terminal">
...
...
[ 15.360433] fec 2188000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 15.368136] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
...
...
</pre>
 
==== Test with [https://iperf.fr/ iperf] ====
The following test shows a ''real case'' with a 390Mbps transfer rate (depending on the testbed) but a >=400Mbps (limited to 470Mbps) can be obtained:
 
<pre class="workstation-terminal">
root@desk-mx6:~# iperf3 -c 192.168.8.125
Connecting to host 192.168.8.125, port 5201
[ 5] local 192.168.8.106 port 35804 connected to 192.168.8.125 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 46.5 MBytes 390 Mbits/sec 0 352 KBytes
[ 5] 1.00-2.00 sec 46.4 MBytes 389 Mbits/sec 0 368 KBytes
[ 5] 2.00-3.00 sec 46.5 MBytes 390 Mbits/sec 0 443 KBytes
[ 5] 3.00-4.00 sec 47.0 MBytes 394 Mbits/sec 0 443 KBytes
[ 5] 4.00-5.00 sec 46.8 MBytes 393 Mbits/sec 0 462 KBytes
[ 5] 5.00-6.00 sec 45.4 MBytes 381 Mbits/sec 0 387 KBytes
[ 5] 6.00-7.00 sec 46.4 MBytes 389 Mbits/sec 0 410 KBytes
[ 5] 7.00-8.00 sec 45.9 MBytes 385 Mbits/sec 0 461 KBytes
[ 5] 8.00-9.00 sec 47.4 MBytes 397 Mbits/sec 0 474 KBytes
[ 5] 9.00-10.00 sec 46.4 MBytes 389 Mbits/sec 0 495 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 465 MBytes 390 Mbits/sec 0 sender
[ 5] 0.00-10.00 sec 463 MBytes 389 Mbits/sec receiver
 
iperf Done.
root@desk-mx6:~#
</pre>
----
[[Category:AXEL Lite]]
8,186
edits

Navigation menu