From patchwork Tue Nov 11 20:45:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 409668 X-Patchwork-Delegate: marek.vasut@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 D5B7014017A for ; Wed, 12 Nov 2014 08:04:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A42FE4B9DD; Tue, 11 Nov 2014 22:04:52 +0100 (CET) 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 XfX89v6P35M6; Tue, 11 Nov 2014 22:04:51 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 98F1F4B9D3; Tue, 11 Nov 2014 22:04:51 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8C7CC4B9D3 for ; Tue, 11 Nov 2014 22:04:47 +0100 (CET) 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 ghBb3oZM0RPZ for ; Tue, 11 Nov 2014 22:04:47 +0100 (CET) X-Greylist: delayed 882 seconds by postgrey-1.32 at theia; Tue, 11 Nov 2014 22:04:43 CET 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 na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0086.outbound.protection.outlook.com [157.56.110.86]) by theia.denx.de (Postfix) with ESMTPS id 1E50F4B9CB for ; Tue, 11 Nov 2014 22:04:43 +0100 (CET) Received: from linux-builds1.altera.com (64.129.157.38) by BY1PR0301MB1191.namprd03.prod.outlook.com (25.160.195.15) with Microsoft SMTP Server (TLS) id 15.1.16.15; Tue, 11 Nov 2014 20:49:57 +0000 From: To: Date: Tue, 11 Nov 2014 14:45:48 -0600 Message-ID: <1415738748-3907-1-git-send-email-dinguyen@opensource.altera.com> X-Mailer: git-send-email 2.0.3 MIME-Version: 1.0 X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: BN1PR07CA0042.namprd07.prod.outlook.com (10.255.193.17) To BY1PR0301MB1191.namprd03.prod.outlook.com (25.160.195.15) X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB1191; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA: BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB1191; X-Forefront-PRVS: 0392679D18 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(199003)(189002)(46102003)(104166001)(120916001)(122386002)(47776003)(20776003)(64706001)(110136001)(50466002)(66066001)(99396003)(50986999)(81156004)(40100003)(69596002)(87976001)(87286001)(19580395003)(77156002)(86362001)(95666004)(93916002)(575784001)(86152002)(106356001)(92726001)(92566001)(105586002)(53416004)(102836001)(229853001)(4396001)(2351001)(88136002)(77096003)(62966003)(33646002)(21056001)(107046002)(50226001)(101416001)(19580405001)(42186005)(97736003)(48376002)(31966008)(89996001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0301MB1191; H:linux-builds1.altera.com; FPR:; MLV:sfv; PTR:InfoNoRecords; A:0; MX:1; LANG:; X-Exchange-Antispam-Report-CFA: BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB1191; X-OriginatorOrg: opensource.altera.com Cc: Marek Vasut , dinh.linux@gmail.com, Pavel Machek , Tom Rini Subject: [U-Boot] arm: socfpga: set skew settings for ethernet phy X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Dinh Nguyen Set the PHY skew settings for the ethernet phy on the SOCFPGA devkit. Signed-off-by: Dinh Nguyen Cc: Vince Bridgers Cc: Pavel Machek Cc: Marek Vasut Cc: Tom Rini Cc: Albert Aribaud Cc: Wolfgang Denk --- board/altera/socfpga/socfpga_cyclone5.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/board/altera/socfpga/socfpga_cyclone5.c b/board/altera/socfpga/socfpga_cyclone5.c index 0f81d89..a2831c8 100644 --- a/board/altera/socfpga/socfpga_cyclone5.c +++ b/board/altera/socfpga/socfpga_cyclone5.c @@ -8,7 +8,9 @@ #include #include +#include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -39,3 +41,13 @@ int board_init(void) return 0; } + +int board_phy_config(struct phy_device *phydev) +{ + ksz9021_phy_extended_write(phydev, MII_KSZ9021_EXT_RGMII_RX_DATA_SKEW, + 0x0); + ksz9021_phy_extended_write(phydev, MII_KSZ9021_EXT_RGMII_TX_DATA_SKEW, + 0x0); + ksz9021_phy_extended_write(phydev, MII_KSZ9021_EXT_RGMII_CLOCK_SKEW, + 0xf0f0); +}