Changes between Version 5 and Version 6 of venice/ethernet


Ignore:
Timestamp:
01/04/2023 07:00:14 PM (23 months ago)
Author:
Ryan Erbstoesser
Comment:

try to update formatting

Legend:

Unmodified
Added
Removed
Modified
  • venice/ethernet

    v5 v6  
    3535from the front with the user LED and barrel jack on the left these
    3636ports are:
     37{{{
    3738eth0 (IMX8MM EQOS MAC + GPY111 RGMII PHY)
    3839lan1 (KSZ9477 switch port from IMX8MM FEC MAC (eth1) CPU uplink)
     
    4142lan4 (KSZ9477 switch port from IMX8MM FEC MAC (eth1) CPU uplink)
    4243lan5 (KSZ9477 switch port from IMX8MM FEC MAC (eth1) CPU uplink)
    43 
     44}}}
    4445In U-Boot use the 'net list' command to show the available network
    4546devices as well as the 'eth' interface name and the device name that
     
    5152to the KSZ9477 switch so it is never used by itself.
    5253
     54{{{
    5355Example:
    5456# list network devs in U-Boot
     
    6769# save env if you want this to persist in U-Boot across boots
    6870saveenv
     71}}}
    6972
    7073For Linux, specifically our kernel and BSP you will see the device naming above:
     74{{{
    7175eth0 (IMX8MM EQOS MAC + GPY111 RGMII PHY)
    7276lan1 (KSZ9477 switch port from IMX8MM FEC MAC (eth1) CPU uplink)
     
    7579lan4 (KSZ9477 switch port from IMX8MM FEC MAC (eth1) CPU uplink)
    7680lan5 (KSZ9477 switch port from IMX8MM FEC MAC (eth1) CPU uplink)
     81}}}
    7782
    7883In Linux 5.12+ you do not need to bring up the CPU uplink port to the
     
    8893RJ45 it would be 'lan1', etc.
    8994
    90 For Linux here are some gory details that you should be aware of if
    91 you stray from our kernel/BSP:
    92 In Linux things can be a bit more complicated depending on if you have
    93 systemd/udev changing device names or not. Linux will register
    94 on-board network devices as 'eth%d' starting at 0 and incrementing in
    95 the order the device is registered which depends greatly on the kernel
    96 (linking order, modules vs static drivers etc) and the kernel makes NO
    97 attempt to make this consistent across reboots. Therefore there is a
    98 concept in Linux where a userspace process like systemd/udev will
    99 rename the network interfaces as they get registered to use
    100 bus/port/path specific names that are consistent across boots. This
    101 produces pretty confusing names to most users so we disable this
    102 feature in our default build by passing 'net.ifnames=0' on the kernel
    103 command line which confusing enough is not at all a kernel option but
    104 systemd/udev parses the kernel cmdline to look for this. To make
    105 things worse DSA drivers (which modern switch devices are) get their
    106 port names from device-tree so Linux will name those 'lan1', 'lan2'.
    107 And to make things really worse because the IMX8MM FEC and EQOS
    108 network devices are different MAC's (both inside the IMX8MP) they have
    109 different drivers and those drivers can register in either order so
    110 eth0/eth1 can flip around across boots. I added a kernel patch (a
    111 controversial one that will never make it upstream) to our kernel to
    112 avoid this and make them consistent.
    11395
    11496Linux 5.12 DSA drivers will bring up the cpu port interface