From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Smith Date: Thu, 31 Mar 2016 19:33:12 +0000 Subject: [U-Boot] [PATCH v3 0/2] net: phy: mv88e61xx: Revise as a PHY driver In-Reply-To: <1450734319-9515-1-git-send-email-kevin.smith@elecsyscorp.com> References: <1450734319-9515-1-git-send-email-kevin.smith@elecsyscorp.com> Message-ID: <1459452766-30356-1-git-send-email-kevin.smith@elecsyscorp.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Acked-by: Prafulla Wadaskar Cc: Albert ARIBAUD Cc: Joe Hershberger Cc: Stefan Roese Cc: Marek Vasut 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