[U-Boot] [PATCH v3 0/2] net: phy: mv88e61xx: Revise as a PHY driver

Kevin Smith kevin.smith at elecsyscorp.com
Thu Mar 31 21:33:12 CEST 2016


The previous version of this driver implemented a shell command to manually
comfigure the switch.  It did not integrate with the PHY infrastructure to
allow a MAC to use it as its PHY.  This is a complete rewrite to allow this
switch to function as a driver.  Since none of the original driver remains, the
old driver is first removed and the new PHY driver is added.

This version configures the switch to have a CPU connected over an MII
interface.  It will enable PHY interfaces based on the MV88E61XX_PHY_PORTS
macro.  The switch is configured to allow PHY ports to only communicate to the
CPU.  This allows the switch to be used as a basic PHY on any/all ports.

This was developed on a board with an mv88e6176 connected over SGMII.  It is
intended to work with other configurations, but these could not be tested.  Any
testing on other configurations or with other mv88e61xx chips is appreciated.

Changes in v3:
* Clean up chip register accessor functions to be more clear.
* Support multi-chip addressing mode in the way that Linux DSA does
* Detect hardware strap configuration for CPU port settings like Linux DSA does
* Remove some unnecessary serdes settings
* Use functions in bitfield.h to clean up bit operations
* Use correct error return codes
* Comment/code formatting improvements and clarifications

Signed-off-by: Kevin Smith <kevin.smith at elecsyscorp.com>
Acked-by: Prafulla Wadaskar <prafulla at marvell.com>
Cc: Albert ARIBAUD <albert.u.boot at aribaud.net>
Cc: Joe Hershberger <joe.hershberger at ni.com>
Cc: Stefan Roese <sr at denx.de>
Cc: Marek Vasut <marex at denx.de>

Kevin Smith (2):
  net: Remove unused mv88e61xx switch driver
  net: phy: Add PHY driver for mv88e61xx switches

 drivers/net/phy/mv88e61xx.c | 1322 +++++++++++++++++++++++++++++--------------
 drivers/net/phy/mv88e61xx.h |   61 --
 drivers/net/phy/phy.c       |    3 +
 include/netdev.h            |   58 --
 include/phy.h               |    1 +
 5 files changed, 905 insertions(+), 540 deletions(-)
 delete mode 100644 drivers/net/phy/mv88e61xx.h

-- 
2.1.4


More information about the U-Boot mailing list