Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758678AbeAIOpJ (ORCPT + 1 other); Tue, 9 Jan 2018 09:45:09 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:34518 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755791AbeAIOpG (ORCPT ); Tue, 9 Jan 2018 09:45:06 -0500 Date: Tue, 9 Jan 2018 14:44:48 +0000 From: Russell King - ARM Linux To: Antoine Tenart Cc: davem@davemloft.net, kishon@ti.com, andrew@lunn.ch, gregory.clement@free-electrons.com, mw@semihalf.com, stefanc@marvell.com, ymarkman@marvell.com, thomas.petazzoni@free-electrons.com, miquel.raynal@free-electrons.com, nadavh@marvell.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v3 4/4] net: mvpp2: 2500baseX support Message-ID: <20180109144447.GI17719@n2100.armlinux.org.uk> References: <20180109085945.11916-1-antoine.tenart@free-electrons.com> <20180109085945.11916-5-antoine.tenart@free-electrons.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180109085945.11916-5-antoine.tenart@free-electrons.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, Jan 09, 2018 at 09:59:45AM +0100, Antoine Tenart wrote: > This patch adds the 2500Base-X PHY mode support in the Marvell PPv2 > driver. 2500Base-X is quite close to 1000Base-X and SGMII modes and uses > nearly the same code path. Sorry, also... > @@ -4668,6 +4692,10 @@ static void mvpp2_port_mii_gmac_configure_mode(struct mvpp2_port *port) > */ > val |= MVPP2_GMAC_CONFIG_GMII_SPEED | > MVPP2_GMAC_CONFIG_FULL_DUPLEX; > + else if (port->phy_interface == PHY_INTERFACE_MODE_2500BASEX) > + val |= MVPP2_GMAC_CONFIG_GMII_SPEED | > + MVPP2_GMAC_CONFIG_MII_SPEED | > + MVPP2_GMAC_CONFIG_FULL_DUPLEX; I think you'll find you don't need to set MII_SPEED here, since MII_SPEED selects between 10 and 100, GMII_SPEED always takes precidence selecting 1000, and 2500 is done by the comphy increasing the clocks by 2.5x. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up