
11
Using Ethernet with OSD335x-
AM335x System in Package
Rev.1 2/18/2019
Octavo Systems LLC
Copyright 2019
4
Setting up Ethernet (Device Tree)
By default, most Ethernet PHYs follow the IEEE 802.3 (clause 22.2.4) management
register set. While each PHY will have vendor specific extensions, the standardization
of the management register set means that it is straight forward to set up an Ethernet
PHY within Linux to interface with the OSD335x Family of devices. In order to get
Ethernet working within Linux, we must properly specify the device tree properties. This
section will walk through the information necessary for the Linux device tree.
Most of the device tree declaration for the AM335x Ethernet MAC has been done in the
device tree include files for the OSD335x Family of devices (
osd335x-sm.dtsi
and
osd335x-csip.dtsi
which can be found at
https://github.com/octavosystems/OSD335x-
). In the main device tree file for your board, you will need to:
1.
Define the Pin MUX for each Ethernet Interface:
For each of the pins used for
a given Ethernet interface, you need to configure the internal pullups/pulldowns
and set the pinmux mode (MII/RMII/RGMII). This needs to be done when the
Ethernet interface is enabled (i.e.
cpsw_default
state) and disabled (i.e.
cpsw_sleep
state). An example configuring Ethernet MAC 1 as an RGMII
interface is shown in
Error! Reference source not found.
. Similarly, you need
to configure the pins for the MDIO interface as shown in
Error! Reference
source not found.
.
Perk:
OSD335x Lesson 2: Linux Device Tree
before moving forward in this section. The article will help you understand device
tree usage and configuration, which is necessary to follow the rest of this section.