Open main menu

DAVE Developer's Wiki β

DESK-MX6-L/Pheripherals/Ethernet

< DESK-MX6-L
Revision as of 16:20, 3 March 2022 by U0007 (talk | contribs)

History
Version Issue Date Notes

1.0.0

Oct 2020 First DESK release
2.0.0 Feb 2022 DESK 3.0.0 release


Contents

Peripheral EthernetEdit

The ethernet interface is made available through the i.MX6 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 Lite SOM:

From imx6qdl-axelcommon.dtsi :

&fec {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_enet_axel>;
    phy-mode = "rgmii";
    phy-handle = <&ethphy>;
    status = "okay";

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

        ethphy: ethernet-phy@7 {
            compatible = "ethernet-phy-ieee802.3-c22";
            reg = <7>;
        };
    };
};

&iomuxc {
...
...
    enet {
        pinctrl_enet_axel: enetgrp-1 {
            fsl,pins = <
                MX6QDL_PAD_ENET_MDIO__ENET_MDIO       0x1b0b0
                MX6QDL_PAD_ENET_MDC__ENET_MDC         0x1b0b0
                MX6QDL_PAD_RGMII_TXC__RGMII_TXC       0x1b0b0
                MX6QDL_PAD_RGMII_TD0__RGMII_TD0       0x1b0b0
                MX6QDL_PAD_RGMII_TD1__RGMII_TD1       0x1b0b0
                MX6QDL_PAD_RGMII_TD2__RGMII_TD2       0x1b0b0
                MX6QDL_PAD_RGMII_TD3__RGMII_TD3       0x1b0b0
                MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0
                MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK  0x1b0b0
                MX6QDL_PAD_RGMII_RXC__RGMII_RXC       0x1b0b0
                MX6QDL_PAD_RGMII_RD0__RGMII_RD0       0x1b0b0
                MX6QDL_PAD_RGMII_RD1__RGMII_RD1       0x1b0b0
                MX6QDL_PAD_RGMII_RD2__RGMII_RD2       0x1b0b0
                MX6QDL_PAD_RGMII_RD3__RGMII_RD3       0x1b0b0
                MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0
                MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28     0xb0b1
                MX6QDL_PAD_SD4_DAT3__GPIO2_IO11        0xb0b1
                MX6QDL_PAD_SD4_DAT2__GPIO2_IO10        0xb0b1
            >;
        };
    };
...
...
};

Accessing the peripheralEdit

AXEL LITE SOM provides the network interface mapped at eth0.

Linux messages at boot timeEdit

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

Cable connection:

...
...
[ 12.850105] fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
...
...

Check the interface with ifconfigEdit

root@desk-mx6:~# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.4.39  netmask 255.255.255.0  broadcast 192.168.4.255
        inet6 fe80::e4ec:efff:fe76:fcf7  prefixlen 64  scopeid 0x20<link>
        ether e6:ec:ef:76:fc:f7  txqueuelen 1000  (Ethernet)
        RX packets 3588  bytes 762212 (744.3 KiB)
        RX errors 0  dropped 1070  overruns 0  frame 0
        TX packets 217  bytes 51775 (50.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Test with iperfEdit

root@desk-mx6:~# iperf3 -t 5 -c 192.168.4.47
Connecting to host 192.168.4.47, port 5201
[  5] local 192.168.4.39 port 42232 connected to 192.168.4.47 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  11.4 MBytes  95.2 Mbits/sec    0    132 KBytes       
[  5]   1.00-2.00   sec  11.1 MBytes  92.8 Mbits/sec    0    146 KBytes       
[  5]   2.00-3.00   sec  11.0 MBytes  92.3 Mbits/sec    0    146 KBytes       
[  5]   3.00-4.00   sec  11.0 MBytes  92.3 Mbits/sec    0    146 KBytes       
[  5]   4.00-5.00   sec  11.1 MBytes  92.8 Mbits/sec    0    153 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  55.5 MBytes  93.1 Mbits/sec    0             sender
[  5]   0.00-5.01   sec  55.2 MBytes  92.4 Mbits/sec                  receiver

iperf Done.