Open main menu

DAVE Developer's Wiki β

DESK-MX6UL-L/Peripherals/Ethernet

< DESK-MX6UL-L
Revision as of 10:55, 16 March 2022 by U0007 (talk | contribs)

History
Version Issue Date Notes

1.0.0

Apr 2021 First DESK release
2.0.0 Mar 2022 DESK 3.0.0 release



Contents

Peripheral EthernetEdit

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

Device tree configurationEdit

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

From imx6ul-axelulite.dtsi:

&fec1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet1>;
        phy-mode = "rmii";
        phy-handle = <&ethphy0>;
        status = "okay";

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

                ethphy0: ethernet-phy@3 {
                        compatible = "ethernet-phy-ieee802.3-c22";
                        reg = <3>;
                };
        };
};
...
...
&iomuxc {
...
...
                pinctrl_enet1: enet1grp {
                        fsl,pins = <
                                MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN      0x1b0b0
                                MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER      0x1b0b0
                                MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00 0x1b0b0
                                MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01 0x1b0b0
                                MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN      0x1b0b0
                                MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00 0x1b0b0
                                MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01 0x1b0b0
                                MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1  0x4001b0a8
                                MX6UL_PAD_GPIO1_IO07__ENET1_MDC         0x1b0b0
                                MX6UL_PAD_GPIO1_IO06__ENET1_MDIO        0x1b0b0
                                MX6UL_PAD_SNVS_TAMPER1__GPIO5_IO01      0x1b0b0         /* ETH_PHY_RST */
                                MX6UL_PAD_SNVS_TAMPER2__GPIO5_IO02      0x1b0b0         /* ETH_INT */
                        >;
                };

...
...
};

Accessing the peripheralEdit

AXEL ULite SOM provides the primary network interface mapped at eth0.

Linux messages at boot timeEdit

...
...
[    2.542709] libphy: fec_enet_mii_bus: probed
[    2.550888] fec 2188000.ethernet eth0: registered PHC device 0
[   28.416349] fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
...
...
[   25.277622] Micrel KSZ8081 or KSZ8091 2188000.ethernet-1:03: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=2188000.ethernet-1:03, irq=POLL)
...
...

Cable connection:

...
...
[  194.804822] fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[  194.812820] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
...
...

Check the interface with ifconfigEdit

root@desk-mx6ul-axelulite:~# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.4.79  netmask 255.255.255.0  broadcast 192.168.4.255
        inet6 fe80::ec4e:d7ff:fe22:686b  prefixlen 64  scopeid 0x20<link>
        ether ee:4e:d7:22:68:6b  txqueuelen 1000  (Ethernet)
        RX packets 360  bytes 87455 (85.4 KiB)
        RX errors 0  dropped 95  overruns 0  frame 0
        TX packets 134  bytes 20021 (19.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Test with iperfEdit

root@desk-mx6ul-axelulite:~# iperf3 -t 5 -c 192.168.4.47
Connecting to host 192.168.4.47, port 5201
[  5] local 192.168.4.79 port 57824 connected to 192.168.4.47 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  11.1 MBytes  93.0 Mbits/sec    0    150 KBytes       
[  5]   1.00-2.00   sec  10.9 MBytes  91.3 Mbits/sec    0    150 KBytes       
[  5]   2.00-3.00   sec  10.8 MBytes  90.2 Mbits/sec    0    150 KBytes       
[  5]   3.00-4.00   sec  10.8 MBytes  90.7 Mbits/sec    0    150 KBytes       
[  5]   4.00-5.00   sec  10.6 MBytes  89.0 Mbits/sec    0    150 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  54.2 MBytes  90.8 Mbits/sec    0             sender
[  5]   0.00-5.02   sec  53.9 MBytes  90.0 Mbits/sec                  receiver

iperf Done.