SAMA5D3 Ethernet Development System User’s Guide
DS50002789A-page 24
2018 Microchip Technology Inc.
4.4
IP AND MAC ADDRESSES
All SAMA5D3 EDS boards currently come with the same IP and MAC addresses. Use
the ipaddr or ifconfig commands to check the IP and MAC addresses:
# ipaddr
or
# ifconfig
Either address may be changed at the bootloader level as described in
Section 4.5 “Ethernet Device Register Address”
4.5
ETHERNET DEVICE REGISTER ADDRESS
When logged into Linux on the board, the registers of the Ethernet switch or PHY on
the attached daughter board can be accessed using the regs_bin utility. The
KSZ
Switch Utilities User’s Guide
provides more details about regs_bin and other utilities for
certain KSZ switches.
Below is an example of byte, word and double-word reads and writes using regs_bin.
# regs_bin spi0.0
> rb 302
// byte read
0000: 00
> rw 302
// word read
0000: 00 10
> rd 302
// double word read
0302: 00 10 a1 94
> wb 302 87
// byte write
> rd 302
0302: 87 10 a1 94
> ww 304 88 99
// word write
> rd 302
0302: 87 10 88 99
> wd 302 38 47 56 65
// double word write
> rd 302
0302: 38 47 56 65
> q
#
4.6
ETHERNET SWITCH MIB COUNTERS
When a switch daughter board is connected to the SAMA5D3 EDS board, the driver
makes the per-port MIB counters available for reading.
# cat /sys/class/net/eth0/sw0/0_mib
// read MIB counters for port 1
# cat /sys/class/net/eth0/sw1/1_mib
// read MIB counters for port 2
# cat /sys/class/net/eth0/sw2/2_mib
// read MIB counters for port 3
To clear the MIB counters for individual ports:
# echo 0 > /sys/class/net/eth0/sw0/0_mib
// clear MIB counters for port 1
# echo 0 > /sys/class/net/eth0/sw1/1_mib
// clear MIB counters for port 2
# echo 0 > /sys/class/net/eth0/sw2/2_mib
// clear MIB counters for port 3