AM335x CPSW (Ethernet) Driver's Guide

This User's Guide is for AM335x Linux Kernels Version 3.2

= Introduction =

TI Common Platform Ethernet Switch (CPSW) is a three port switch (one CPU port and two external ports). The CPSW or Ethernet Switch driver follows the standard Linux network interface architecture.

The driver supports the following features:


 * 1) 10/100/1000 Mbps mode of operation.
 * 2) Auto negotiation.
 * 3) Linux NAPI support
 * 4) Second switch port (from AM335xPSP_04.06.00.08 release)
 * 5) VLAN (Subscription common for all ports) (Supported from AM335xPSP_04.06.00.08 release)
 * 6) Ethertool (Supports only Slave 0 decided in cpsw platform data) (Supported from AM335xPSP_04.06.00.08 release)
 * 7) Switch mode of operation (Supported from AM335xPSP_04.06.00.08 release)
 * 8) Dual Standalone EMAC mode (Supported from AM335xPSP_04.06.00.08 release)

= Driver Configuration =

To enable/disable Networking support, start the Linux Kernel Configuration tool: $ make menuconfig Select Networking support from the main menu. ...   ...    Power management options ---&gt; [*] Networking support ---&gt; Device Drivers ---&gt; File systems ---&gt; Kernel hacking ---&gt; ...   ... Then select Device Drivers from the main menu. ...   ...    Power management options ---&gt; [*] Networking support ---&gt; Device Drivers ---&gt; File systems ---&gt; Kernel hacking ---&gt; ...   ... Select Network device support as shown below: ...   ...    [*]Network device support ---&gt; ISDN support ---&gt; ...   ... Select Ethernet driver support as shown below: ...   ...    *** CAIF transport drivers *** [*]  Ethernet driver support  ---> -*-  PHY Device support and infrastructure  ---> < >  PPP (point-to-point protocol) support ...   ... Select  as shown here: ...   [*]   Texas Instruments (TI) devices < >    TI DaVinci EMAC Support -*-    TI DaVinci MDIO Support -*-    TI DaVinci CPDMA Support <*>    TI CPSW Switch Support

Module Build
Module build for the cpsw driver is supported. To do this, at all the places mentioned in the section above select module build (short-cut key M).

Select  as shown here: ...   [*]   Texas Instruments (TI) devices < >    TI DaVinci EMAC Support -*-    TI DaVinci MDIO Support -*-    TI DaVinci CPDMA Support     TI CPSW Switch Support

= Interrupt Pacing = CPSW interrupt pacing feature limits the number of interrupts that occur during a given period of time. For heavily loaded systems in which interrupts can occur at a very high rate, the performance benefit is significant due to minimizing the overhead associated with servicing each interrupt.

To enable interrupt pacing, please execute below mentioned command using ethtool utility: ethtool -C eth0 rx-usecs To achieve maximum performance set to 500

CPSW driver uses Timer 5 & 6 for CPSW Interrupt Pacing. Sharing this Timer with any other module will result in Ethernet pacing not working properly.