DESK-XZ7-L/Peripherals/Ethernet

From DAVE Developer's Wiki
Jump to: navigation, search
History
Issue Date Notes

2024/01/23

DESK-XZ7-L-1.x.x release
2025/06/12 DESK-XZ7-L 2.x.x release


Peripheral Ethernet[edit | edit source]

The ethernet interface 0 is made available through the gem0 interface, this interface should be initialized on the device tree.

Device tree configuration[edit | edit source]

Here below an example of device tree for ethernet interface 0 configuration used on standard DAVE's kit for the BORA, BORA Xpress and BORA Lite:

From bora.dtsi:

&gem0 {

    status = "okay";
    phy-mode = "rgmii-id";
    phy-handle = <&ethernet_phy>;

    ethernet_phy: ethernet-phy@7 {
        reg = <0x07>;
        device_type = "ethernet-phy";

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

            phy0: phy@7 {
                rxc-skew-ps = <0x744>;
                txc-skew-ps = <0x744>;
                micrel,led-mode = <0x01>;

                compatible = "micrel,ksz9031";
                device_type = "ethernet-phy";
                reg = <0x07>;
            };
        };
    };
};

Accessing the peripheral[edit | edit source]

Linux messages at boot time[edit | edit source]

  • eth0
[    0.819308] macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 42 (0a:f0:60:47:15:fd)
...
[    8.793934] macb e000b000.ethernet eth0: PHY [e000b000.ethernet-ffffffff:07] driver [Micrel KSZ9031 Gigabit PHY] (irq=POLL)
[    8.793999] macb e000b000.ethernet eth0: configuring for phy/rgmii-id link mode

Cable connection:

...
...
[   12.994170] macb e000b000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off

Check the interface with ifconfig[edit | edit source]

root@bora:~# 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::8f0:60ff:fe47:15fd  prefixlen 64  scopeid 0x20<link>
        ether 0a:f0:60:47:15:fd  txqueuelen 1000  (Ethernet)
        RX packets 2309  bytes 150380 (146.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 119  bytes 13662 (13.3 KiB)
        TX errors 0  dropped 0 overruns 0  carri

Test with iperf3[edit | edit source]

root@bora:~# iperf3 -t 5 -c 192.168.0.114
Connecting to host 192.168.0.114, port 5201
[  5] local 192.168.0.89 port 44352 connected to 192.168.0.114 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  75.1 MBytes   629 Mbits/sec    0    194 KBytes
[  5]   1.00-4.25   sec  0.00 Bytes  0.00 bits/sec    0    205 KBytes
[  5]   4.25-6.40   sec  0.00 Bytes  0.00 bits/sec    0    205 KBytes
[  5]   6.40-7.37   sec  0.00 Bytes  0.00 bits/sec    0    215 KBytes
[  5]   7.37-8.13   sec   128 KBytes  1.38 Mbits/sec    0    215 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-8.13   sec   611 MBytes   631 Mbits/sec    0             sender
[  5]   0.00-8.18   sec   611 MBytes   627 Mbits/sec                  receiver

iperf Done.
root@bora:~#