From patchwork Sat Jun 6 12:44:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clemens Gruber X-Patchwork-Id: 481657 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 37D3014027F for ; Sun, 7 Jun 2015 00:07:42 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1A5EA4B6E6; Sat, 6 Jun 2015 16:07:32 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tuCGdIvnoKKb; Sat, 6 Jun 2015 16:07:31 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3C44E4B70C; Sat, 6 Jun 2015 16:07:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C69594B6DB for ; Sat, 6 Jun 2015 14:50:02 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KlE7R-tjFjKN for ; Sat, 6 Jun 2015 14:50:02 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.pqgruber.com (mail.pqgruber.com [178.189.19.235]) by theia.denx.de (Postfix) with ESMTPS id 22D7C4B6DD for ; Sat, 6 Jun 2015 14:49:58 +0200 (CEST) Received: from archie.tuxnet.lan (chello213047168109.15.14.vie.surfer.at [213.47.168.109]) by mail.pqgruber.com (Postfix) with ESMTPSA id 58D954F022; Sat, 6 Jun 2015 14:49:58 +0200 (CEST) From: Clemens Gruber To: u-boot@lists.denx.de Date: Sat, 6 Jun 2015 14:44:58 +0200 Message-Id: <1433594698-7964-3-git-send-email-clemens.gruber@pqgruber.com> X-Mailer: git-send-email 2.4.2 In-Reply-To: <1433594698-7964-1-git-send-email-clemens.gruber@pqgruber.com> References: <1433594698-7964-1-git-send-email-clemens.gruber@pqgruber.com> X-Mailman-Approved-At: Sat, 06 Jun 2015 16:07:19 +0200 Cc: joe.hershberger@ni.com, Clemens Gruber , Michal Simek , Hao Zhang Subject: [U-Boot] [PATCH 2/2] net: Add support for Marvell 88E1510 PHY X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Support the 88E1510 PHY which is very similar to the 88E1518. I also set the INTn output and configured the LEDs. Signed-off-by: Clemens Gruber Cc: Joe Hershberger Cc: Hao Zhang Cc: Michal Simek Acked-by: Joe Hershberger --- This replaces the previously sent patch http://patchwork.ozlabs.org/patch/478488/ --- drivers/net/phy/marvell.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index cff5c87..eab1558 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -336,6 +336,25 @@ static int m88e1518_config(struct phy_device *phydev) return m88e1111s_config(phydev); } +/* Marvell 88E1510 */ +static int m88e1510_config(struct phy_device *phydev) +{ + /* Select page 3 */ + phy_write(phydev, MDIO_DEVAD_NONE, 22, 3); + + /* Enable INTn output on LED[2] */ + m88e1518_phy_writebits(phydev, 18, 7, 1, 1); + + /* Configure LEDs */ + m88e1518_phy_writebits(phydev, 16, 0, 4, 3); /* LED[0]:0011 (ACT) */ + m88e1518_phy_writebits(phydev, 16, 4, 4, 6); /* LED[1]:0110 (LINK) */ + + /* Reset page selection */ + phy_write(phydev, MDIO_DEVAD_NONE, 22, 0); + + return m88e1518_config(phydev); +} + /* Marvell 88E1118 */ static int m88e1118_config(struct phy_device *phydev) { @@ -548,6 +567,16 @@ static struct phy_driver M88E1149S_driver = { .shutdown = &genphy_shutdown, }; +static struct phy_driver M88E1510_driver = { + .name = "Marvell 88E1510", + .uid = 0x1410dd0, + .mask = 0xffffff0, + .features = PHY_GBIT_FEATURES, + .config = &m88e1510_config, + .startup = &m88e1011s_startup, + .shutdown = &genphy_shutdown, +}; + static struct phy_driver M88E1518_driver = { .name = "Marvell 88E1518", .uid = 0x1410dd1, @@ -578,6 +607,7 @@ int phy_marvell_init(void) phy_register(&M88E1118R_driver); phy_register(&M88E1111S_driver); phy_register(&M88E1011S_driver); + phy_register(&M88E1510_driver); phy_register(&M88E1518_driver); return 0;